From f0eca03738dd5a9f15bde378da9218c17d7ecae2 Mon Sep 17 00:00:00 2001 From: hamid Date: Tue, 23 Sep 2025 00:21:35 +0200 Subject: [PATCH 01/10] [Ethereum-analysis] Improve analysis input type --- src/api/api_handlers_db.ml | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/src/api/api_handlers_db.ml b/src/api/api_handlers_db.ml index a93ac864..b528e00f 100644 --- a/src/api/api_handlers_db.ml +++ b/src/api/api_handlers_db.ml @@ -547,6 +547,7 @@ let get_transaction_tags_db_eth (_, hash) _ = (txr.trd_transaction_receipt.r_transaction_hash :> string) tx_hash) receipts_decode in +<<<<<<< HEAD let live_analyses = List.map (fun analysis_type -> @@ -566,11 +567,70 @@ let get_transaction_tags_db_eth (_, hash) _ = | `liquidate -> Eth_analysis.Eth_analyse.tx_detect (TAI_Flashloan receipt_decode) +======= + let> live_analyses = + Lwt_list.map_s + (fun analysis_type -> + match analysis_type with + | `arbitrage -> + let> analyse = + Eth_analysis.Eth_analyse.tx_detect + (TAI_Arbitrage (traces_decode, cft_input)) in + Lwt.return @@ Option.to_list analyse + | `transfer -> + let> analyse = + Eth_analysis.Eth_analyse.tx_detect + (TAI_Transfer (traces_decode, cft_input)) in + Lwt.return @@ Option.to_list analyse + | `sandwich -> + let sandwitches = + Eth_analysis.Eth_analysis_sandwich.detect_sandwich + receipts_decode in + let include_tx_s = + List.map (fun sandwich -> + A_Sandwich + { + bao_block_number = Int64.to_int block_number; + bao_resume = sandwich; + }) + @@ List.filter + (fun sandwich -> + String.equal + (sandwich.sdo_front_run.sto_transaction_hash + :> string) + hash + || String.equal + (sandwich.sdo_back_run.sto_transaction_hash + :> string) + hash + || List.exists + (fun vitim -> + String.equal + (vitim.sto_transaction_hash :> string) + hash) + sandwich.sdo_victims) + sandwitches in + Lwt.return @@ include_tx_s + | `flashloan -> + let> analysis = + Eth_analysis.Eth_analyse.tx_detect + (TAI_Flashloan receipt_decode) in + Lwt.return @@ Option.to_list analysis + | `liquidate -> + let> analysis = + Eth_analysis.Eth_analyse.tx_detect + (TAI_Liquidate receipt_decode) in + Lwt.return @@ Option.to_list analysis +>>>>>>> 2c48047 ([Ethereum-analysis] Improve analysis input type) | `bottom (_ : bottom) -> .) not_stored_analyses in let analyses = Tools.concat_list (List.flatten live_analyses) analyses_decode in +<<<<<<< HEAD EzAPIServer.return_ok @@ analyses)) +======= + EzAPIServer.return_ok @@ filter_analyses analyses)) +>>>>>>> 2c48047 ([Ethereum-analysis] Improve analysis input type) [@@service Api_services_db.get_transaction_tags_db_eth] module DayAnalyses = Map.Make (Int) -- GitLab From 0604dd67ea07faa2ae3d3c24972fddf2dca2b933 Mon Sep 17 00:00:00 2001 From: hamid Date: Fri, 26 Sep 2025 16:52:27 +0200 Subject: [PATCH 02/10] [Common] Remove statistics uses and use __FUNCTION__ instead of re-write the function name --- src/api/api_common.ml | 4 - src/api/api_handlers_db.ml | 84 ++-- src/api/api_handlers_node.ml | 132 +++---- src/bitcoin_indexer/btc_db_psql.ml | 120 +++--- src/bitcoin_indexer/btc_node.ml | 10 +- src/common/log.ml | 104 ++--- src/common/log.mli | 17 +- src/common/pool.ml | 31 +- src/ethereum_decode/eth_decode.ml | 2 - .../eth_db_psql/eth_db_psql_analysis.ml | 114 ++---- .../eth_db_psql/eth_db_psql_external.ml | 72 ++-- .../eth_db_psql/eth_db_psql_raw.ml | 194 ++++------ .../eth_db_psql/eth_db_psql_signatures.ml | 34 +- .../eth_db_psql/eth_db_psql_stats.ml | 20 +- .../eth_db_psql_store_information.ml | 364 ++++-------------- .../eth_db_psql_sourcify.ml | 6 +- src/ethereum_indexer/eth_stats.ml | 7 - 17 files changed, 408 insertions(+), 907 deletions(-) diff --git a/src/api/api_common.ml b/src/api/api_common.ml index 935021af..e36d2053 100644 --- a/src/api/api_common.ml +++ b/src/api/api_common.ml @@ -36,10 +36,6 @@ let error_404 = ~select:(fun x -> Some x) ~deselect:Fun.id -let log_func_lwt ~category func_name args f = - let _ = Common.Log.log ~color:Green func_name in - Common.Log.log_func_lwt ~category func_name args f - let get_sourcify_contract_information_aux address = let address = a @@ String.lowercase_ascii (Common.Tools.remove_0x address) in let> data_r = diff --git a/src/api/api_handlers_db.ml b/src/api/api_handlers_db.ml index b528e00f..cd4cda23 100644 --- a/src/api/api_handlers_db.ml +++ b/src/api/api_handlers_db.ml @@ -1,6 +1,7 @@ open Lwt open Eth open Common +open Log open Common.Types.Api open Api_common open Api_handlers_common @@ -13,7 +14,7 @@ module Db_psql_btc = Api_handlers_common.Db_psql_btc module Decode_btc = Api_handlers_common.Decode_btc let get_block_by_hash_db_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_block_by_hash_db_eth" hash @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = String.lowercase_ascii (Common.Tools.remove_0x hash) in let> block = Db_psql_eth.Eth_db_psql_raw.get_block_transaction_by_hash ~hash () in @@ -29,8 +30,7 @@ let get_block_by_hash_db_eth (_, hash) _ = [@@service Api_services_db.get_block_by_hash_db_eth] let get_block_receipts_by_hash_db_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_block_receipts_by_hash_db_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = String.lowercase_ascii (Common.Tools.remove_0x hash) in let> block = Db_psql_eth.Eth_db_psql_raw.get_block_transaction_receipts_by_hash ~hash () @@ -47,9 +47,7 @@ let get_block_receipts_by_hash_db_eth (_, hash) _ = [@@service Api_services_db.get_block_receipts_by_hash_db_eth] let get_block_by_number_db_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_by_number_db_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let> block = Db_psql_eth.Eth_db_psql_raw.get_block_transaction_by_number ~block_number () in @@ -65,9 +63,7 @@ let get_block_by_number_db_eth (_, block_number) _ = [@@service Api_services_db.get_block_by_number_db_eth] let get_block_receipts_by_number_db_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_receipts_by_number_db_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let> block = Db_psql_eth.Eth_db_psql_raw.get_block_transaction_receipts_by_number ~block_number () in @@ -83,9 +79,7 @@ let get_block_receipts_by_number_db_eth (_, block_number) _ = [@@service Api_services_db.get_block_receipts_by_number_db_eth] let get_block_traces_db_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_traces_db_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let> block_traces = Db_psql_eth.Eth_db_psql_raw.get_block_traces ~block_number () in let> trace_decode = Lwt_list.map_s Decode_eth.decode_traces block_traces in @@ -93,8 +87,7 @@ let get_block_traces_db_eth (_, block_number) _ = [@@service Api_services_db.get_block_traces_db_eth] let get_transaction_by_hash_db_eth (_, tx_hash) _ = - log_func_lwt ~category:"service" "get_transaction_by_hash_db_eth" tx_hash - @@ fun () -> + log_func_lwt __FUNCTION__ tx_hash @@ fun () -> let tx_hash = String.lowercase_ascii (Common.Tools.remove_0x tx_hash) in let> transaction = Db_psql_eth.Eth_db_psql_raw.get_transaction_by_hash ~tx_hash () in @@ -110,8 +103,7 @@ let get_transaction_by_hash_db_eth (_, tx_hash) _ = [@@service Api_services_db.get_transaction_by_hash_db_eth] let get_transactions_by_address_db_eth (_, address) _ = - log_func_lwt ~category:"service" "get_transactions_by_address_db_eth" address - @@ fun () -> + log_func_lwt __FUNCTION__ address @@ fun () -> let address = String.lowercase_ascii (Common.Tools.remove_0x address) in let> transaction = Db_psql_eth.Eth_db_psql_raw.get_transactions_address ~address () in @@ -119,8 +111,7 @@ let get_transactions_by_address_db_eth (_, address) _ = [@@service Api_services_db.get_transactions_by_address_db_eth] let get_latest_block_number_db_eth _ _ = - log_func_lwt ~category:"service" "get_latest_block_number_db_eth" "" - @@ fun () -> + log_func_lwt __FUNCTION__ "" @@ fun () -> let> block_number = Db_psql_eth.Eth_db_psql_store_information.get_latest_block_trace_stored () in @@ -136,7 +127,7 @@ let get_latest_block_number_db_eth _ _ = [@@service Api_services_db.get_latest_block_number_db_eth] let get_latest_block_db_eth _ _ = - log_func_lwt ~category:"service" "get_latest_block_db_eth" "" @@ fun () -> + log_func_lwt __FUNCTION__ "" @@ fun () -> let> block_number_opt = Db_psql_eth.Eth_db_psql_store_information.get_latest_block_trace_stored () in @@ -164,9 +155,7 @@ let get_latest_block_db_eth _ _ = [@@service Api_services_db.get_latest_block_db_eth] let get_transaction_receipt_by_hash_db_eth (_, tx_hash) _ = - log_func_lwt ~category:"service" "get_transaction_receipt_by_hash_db_eth" - tx_hash - @@ fun () -> + log_func_lwt __FUNCTION__ tx_hash @@ fun () -> let tx_hash = String.lowercase_ascii (Common.Tools.remove_0x tx_hash) in let> transaction = Db_psql_eth.Eth_db_psql_raw.get_transaction_receipts_by_hash ~tx_hash () @@ -183,8 +172,7 @@ let get_transaction_receipt_by_hash_db_eth (_, tx_hash) _ = [@@service Api_services_db.get_transaction_receipt_by_hash_db_eth] let get_transaction_trace_db_eth (_, tx_hash) _ = - log_func_lwt ~category:"service" "get_transaction_trace_db_eth" tx_hash - @@ fun () -> + log_func_lwt __FUNCTION__ tx_hash @@ fun () -> let tx_hash = String.lowercase_ascii (Common.Tools.remove_0x tx_hash) in let> transaction_trace = Db_psql_eth.Eth_db_psql_raw.get_trace_of_transaction ~tx_hash () in @@ -202,8 +190,7 @@ let get_transaction_trace_db_eth (_, tx_hash) _ = [@@service Api_services_db.get_transaction_trace_db_eth] let get_transaction_decode_db_eth (_, tx_hash) _ = - log_func_lwt ~category:"service" "get_transaction_decode_db_eth" tx_hash - @@ fun () -> + log_func_lwt __FUNCTION__ tx_hash @@ fun () -> let tx_hash = String.lowercase_ascii (Common.Tools.remove_0x tx_hash) in Db_psql_eth.Eth_db_psql_raw.get_transaction_by_hash ~tx_hash () >>= function | None -> @@ -219,9 +206,7 @@ let get_transaction_decode_db_eth (_, tx_hash) _ = [@@service Api_services_db.get_transaction_decode_db_eth] let get_transaction_receipt_decode_db_eth (_, tx_hash) _ = - log_func_lwt ~category:"service" "get_transaction_receipt_decode_db_eth" - tx_hash - @@ fun () -> + log_func_lwt __FUNCTION__ tx_hash @@ fun () -> let tx_hash = String.lowercase_ascii (Common.Tools.remove_0x tx_hash) in Db_psql_eth.Eth_db_psql_raw.get_transaction_receipts_by_hash ~tx_hash () >>= function @@ -238,8 +223,7 @@ let get_transaction_receipt_decode_db_eth (_, tx_hash) _ = [@@service Api_services_db.get_transaction_receipt_decode_db_eth] let get_block_decode_by_hash_db_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_block_decode_by_hash_db_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = String.lowercase_ascii (Common.Tools.remove_0x hash) in let> block = Db_psql_eth.Eth_db_psql_raw.get_block_transaction_by_hash ~hash () in @@ -277,9 +261,7 @@ let get_block_decode_by_hash_db_eth (_, hash) _ = [@@service Api_services_db.get_block_decode_by_hash_db_eth] let get_block_decode_by_number_db_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_decode_by_number_db_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let> block = Db_psql_eth.Eth_db_psql_raw.get_block_transaction_by_number ~block_number () in @@ -316,9 +298,7 @@ let get_block_decode_by_number_db_eth (_, block_number) _ = [@@service Api_services_db.get_block_decode_by_number_db_eth] let get_stat_of_block_db_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_stat_of_block_db_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let aux () = Db_psql_eth.Eth_db_psql_raw.get_block_by_number ~block_number () >>= function @@ -379,8 +359,7 @@ let get_stat_of_block_db_eth (_, block_number) _ = [@@service Api_services_db.get_stat_of_block_db_eth] let get_address_information_db_eth (_, address) _ = - log_func_lwt ~category:"service" "get_address_information_db_eth" address - @@ fun () -> + log_func_lwt __FUNCTION__ address @@ fun () -> let address = String.lowercase_ascii (Common.Tools.remove_0x address) in let> address_information = Db_psql_eth.Eth_db_psql_external.get_address_information ~address () in @@ -396,9 +375,7 @@ let get_address_information_db_eth (_, address) _ = [@@service Api_services_db.get_address_information_db_eth] let get_block_tags_db_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_tags_db_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let open Common.Types.Ethereum_analysis in let open Common.Types.Ethereum_indexer in let> analyses_type_stored = @@ -481,8 +458,7 @@ let get_block_tags_db_eth (_, block_number) _ = [@@service Api_services_db.get_block_tags_db_eth] let get_transaction_tags_db_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_transaction_tags_db_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let tx_hash = Common.Tools.remove_0x hash in let> block_number_opt = Db_psql_eth.Eth_db_psql_raw.get_transaction_block_number ~tx_hash () in @@ -686,7 +662,7 @@ let rec update_cache_analyses_week () = update_cache_analyses_week () let get_analyses_week_db_eth _ _ = - log_func_lwt ~category:"service" "get_analyses_week_db_eth" "" @@ fun () -> + log_func_lwt __FUNCTION__ "" @@ fun () -> let> result = Lwt_mutex.with_lock cache_analyses_mutex (fun () -> Lwt.return @@ -697,13 +673,12 @@ let get_analyses_week_db_eth _ _ = [@@service Api_services_db.get_analyses_week_db_eth] let get_sourcify_contract_information_db (_, address) _ = - log_func_lwt ~category:"service" "get_sourcify_contract_information_db" - address - @@ fun () -> get_sourcify_contract_information_aux address + log_func_lwt __FUNCTION__ address @@ fun () -> + get_sourcify_contract_information_aux address [@@service Api_services_db.get_sourcify_contract_information_db] let get_signature_of_event (_, hash) _ = - log_func_lwt ~category:"service" "get_signature_of_event" hash @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = String.lowercase_ascii (Common.Tools.remove_0x hash) in let> signature_opt = Db_psql_eth.Eth_db_psql_signatures.get_signature_by_hash ~hash () in @@ -719,8 +694,7 @@ let get_signature_of_event (_, hash) _ = [@@service Api_services_db.get_signature_of_event] let get_signature_of_operation (_, hash) _ = - log_func_lwt ~category:"service" "get_signature_of_operation" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = String.lowercase_ascii (Common.Tools.remove_0x hash) in let> signature = Db_psql_eth.Eth_db_psql_signatures.get_signature_by_operation_hash ~hash () @@ -729,7 +703,7 @@ let get_signature_of_operation (_, hash) _ = [@@service Api_services_db.get_signature_of_operation] let get_block_by_hash_db_btc (_, hash) _ = - log_func_lwt ~category:"service" "get_block_by_hash_db_btc" hash @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let> block_opt = Db_psql_btc.get_block_transactions_by_hash ~block_hash:hash () in match block_opt with @@ -744,7 +718,7 @@ let get_block_by_hash_db_btc (_, hash) _ = [@@service Api_services_db.get_block_by_hash_db_btc] let get_transaction_db_btc (_, tx_hash) _ = - log_func_lwt ~category:"service" "get_transaction_db_btc" tx_hash @@ fun () -> + log_func_lwt __FUNCTION__ tx_hash @@ fun () -> let> transaction_opt = Db_psql_btc.get_transaction_by_hash ~tx_hash () in match transaction_opt with | None -> @@ -758,7 +732,7 @@ let get_transaction_db_btc (_, tx_hash) _ = [@@service Api_services_db.get_transaction_db_btc] let get_latest_block_db_btc _ _ = - log_func_lwt ~category:"service" "get_latest_block_db_btc" "" @@ fun () -> + log_func_lwt __FUNCTION__ "" @@ fun () -> let> block_hash = Db_psql_btc.get_latest_block_stored () in match block_hash with | None -> @@ -776,7 +750,7 @@ let get_latest_block_db_btc _ _ = [@@service Api_services_db.get_latest_block_db_btc] let get_block_stats_db_btc (_, hash) _ = - log_func_lwt ~category:"service" "get_block_stats_db_btc" hash @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let> block_opt = Db_psql_btc.get_block_stats ~block_hash:hash () in match block_opt with | None -> diff --git a/src/api/api_handlers_node.ml b/src/api/api_handlers_node.ml index d3b182f4..d1b83f52 100644 --- a/src/api/api_handlers_node.ml +++ b/src/api/api_handlers_node.ml @@ -1,6 +1,7 @@ open Lwt open Eth open Common +open Log open Types.Api open Api_common open Api_handlers_common @@ -12,9 +13,7 @@ module Decode_eth = Api_handlers_common.Decode_eth module Stats_eth = Api_handlers_common.Stats_eth let get_block_by_number_node_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_by_number_node_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let> block = Node_eth.get_block_by_number (Int64.to_int block_number) in match block with | Ok block -> EzAPIServer.return_ok block @@ -22,14 +21,13 @@ let get_block_by_number_node_eth (_, block_number) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_by_number_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) [@@service Api_services_node.get_block_by_number_node_eth] let get_block_receipts_by_hash_node_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_block_receipts_by_hash_node_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = b (String.lowercase_ascii (Common.Tools.remove_0x hash)) in let> block = Node_eth.get_block_by_hash hash in match block with @@ -42,21 +40,20 @@ let get_block_receipts_by_hash_node_eth (_, hash) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_receipts_by_hash_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; })) | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_by_hash_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) [@@service Api_services_node.get_block_receipts_by_hash_node_eth] let get_block_by_hash_node_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_block_by_hash_node_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = b (String.lowercase_ascii (Common.Tools.remove_0x hash)) in let> block = Node_eth.get_block_by_hash hash in @@ -66,15 +63,13 @@ let get_block_by_hash_node_eth (_, hash) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_by_hash_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) [@@service Api_services_node.get_block_by_hash_node_eth] let get_block_receipts_by_number_node_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_receipts_by_number_node_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let block_number = Int64.to_int block_number in let> block = Node_eth.get_block_by_number block_number in match block with @@ -87,21 +82,20 @@ let get_block_receipts_by_number_node_eth (_, block_number) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_receipts_by_number_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; })) | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_receipts_by_number_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) [@@service Api_services_node.get_block_receipts_by_number_node_eth] let get_transaction_by_hash_node_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_transaction_by_hash_node_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = b (String.lowercase_ascii (Common.Tools.remove_0x hash)) in let> transaction = Node_eth.get_transaction_by_hash hash in match transaction with @@ -109,53 +103,49 @@ let get_transaction_by_hash_node_eth (_, hash) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_transaction_by_hash_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok transaction -> EzAPIServer.return_ok transaction [@@service Api_services_node.get_transaction_by_hash_node_eth] let get_latest_block_number_node_eth _ _ = - log_func_lwt ~category:"service" "get_latest_block_number_node_eth" "" - @@ fun () -> + log_func_lwt __FUNCTION__ "" @@ fun () -> let> block_number = Node_eth.get_latest_block_number () in match block_number with | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_latest_block_number_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok block_number -> EzAPIServer.return_ok block_number [@@service Api_services_node.get_latest_block_number_node_eth] let get_latest_block_number_node_eth _ _ = - log_func_lwt ~category:"service" "get_latest_block_number_node_eth" "" - @@ fun () -> + log_func_lwt __FUNCTION__ "" @@ fun () -> let> block_number = Node_eth.get_latest_block () in match block_number with | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_latest_block_number_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok block_number -> EzAPIServer.return_ok block_number [@@service Api_services_node.get_latest_block_node_eth] let get_block_traces_node_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_traces_node_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let> block_traces_r = Node_eth.get_block_traces (Int64.to_int block_number) in match block_traces_r with | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_traces_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok block_traces -> @@ -164,9 +154,7 @@ let get_block_traces_node_eth (_, block_number) _ = [@@service Api_services_node.get_block_traces_node_eth] let get_transaction_receipt_by_hash_node_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_transaction_receipt_by_hash_node_eth" - hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = b (String.lowercase_ascii (Common.Tools.remove_0x hash)) in let> transaction = Node_eth.get_transaction_receipt hash in match transaction with @@ -174,15 +162,14 @@ let get_transaction_receipt_by_hash_node_eth (_, hash) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_transaction_receipt_by_hash_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok transaction -> EzAPIServer.return_ok transaction [@@service Api_services_node.get_transaction_receipt_by_hash_node_eth] let get_transaction_trace_node_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_transaction_trace_node_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = b (String.lowercase_ascii (Common.Tools.remove_0x hash)) in let> transaction_trace_r = Node_eth.get_transaction_trace hash in match transaction_trace_r with @@ -190,7 +177,7 @@ let get_transaction_trace_node_eth (_, hash) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_transaction_trace_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok transaction_trace -> @@ -199,8 +186,7 @@ let get_transaction_trace_node_eth (_, hash) _ = [@@service Api_services_node.get_transaction_trace_node_eth] let get_transaction_decode_node_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_transaction_decode_node_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = b (String.lowercase_ascii (Common.Tools.remove_0x hash)) in let> transaction = Node_eth.get_transaction_by_hash hash in match transaction with @@ -208,7 +194,7 @@ let get_transaction_decode_node_eth (_, hash) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_transaction_decode_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok transaction -> @@ -217,16 +203,14 @@ let get_transaction_decode_node_eth (_, hash) _ = [@@service Api_services_node.get_transaction_decode_node_eth] let get_transaction_receipt_decode_node_eth (_, tx_hash) _ = - log_func_lwt ~category:"service" "get_transaction_receipt_decode_node_eth" - tx_hash - @@ fun () -> + log_func_lwt __FUNCTION__ tx_hash @@ fun () -> let tx_hash = b @@ String.lowercase_ascii (Common.Tools.remove_0x tx_hash) in Node_eth.get_transaction_receipt tx_hash >>= function | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_transaction_decode_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok transaction_r -> @@ -235,8 +219,7 @@ let get_transaction_receipt_decode_node_eth (_, tx_hash) _ = [@@service Api_services_node.get_transaction_receipt_decode_node_eth] let get_block_decode_by_hash_node_eth (_, hash) _ = - log_func_lwt ~category:"service" "get_block_decode_by_hash_node_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = b (String.lowercase_ascii (Common.Tools.remove_0x hash)) in let> block = Node_eth.get_block_by_hash @@ hash in match block with @@ -244,7 +227,7 @@ let get_block_decode_by_hash_node_eth (_, hash) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_decode_by_number_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok block -> ( @@ -254,7 +237,7 @@ let get_block_decode_by_hash_node_eth (_, hash) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_decode_by_number_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok block_receipts -> @@ -270,16 +253,14 @@ let get_block_decode_by_hash_node_eth (_, hash) _ = [@@service Api_services_node.get_block_decode_by_hash_node_eth] let get_block_decode_by_number_node_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_decode_by_number_node_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let> block = Node_eth.get_block_by_number @@ Int64.to_int block_number in match block with | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_decode_by_number_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok block -> ( @@ -290,7 +271,7 @@ let get_block_decode_by_number_node_eth (_, block_number) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_decode_by_number_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok block_receipts -> @@ -306,16 +287,14 @@ let get_block_decode_by_number_node_eth (_, block_number) _ = [@@service Api_services_node.get_block_decode_by_number_node_eth] let get_stat_of_block_node_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_stat_of_block_node_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let block_number_64 = Int64.to_int block_number in Node_eth.get_block_by_number block_number_64 >>= function | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_stat_of_block_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok block -> ( @@ -325,7 +304,7 @@ let get_stat_of_block_node_eth (_, block_number) _ = EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_stat_of_block_node_eth"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Eth.error_enc e; }) | Ok traces -> ( @@ -403,17 +382,14 @@ let get_block_analyses_node_aux block_number = Lwt.return @@ List.flatten analysis let get_block_tags_node_eth (_, block_number) _ = - log_func_lwt ~category:"service" "get_block_tags_node_eth" - (Int64.to_string block_number) - @@ fun () -> + log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let> analyses = get_block_analyses_node_aux (Int64.to_int block_number) in EzAPIServer.return_ok analyses [@@service Api_services_node.get_block_tags_node_eth] let get_transaction_tags_node_eth (_, hash) _ = let open Common.Types.Ethereum_analysis in - log_func_lwt ~category:"service" "get_transaction_tags_node_eth" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let hash = Common.Tools.remove_0x hash in Lwt.catch (fun () -> @@ -478,81 +454,77 @@ let get_transaction_tags_node_eth (_, hash) _ = [@@service Api_services_node.get_transaction_tags_node_eth] let get_analyses_week_node_eth _ _ = - log_func_lwt ~category:"service" "get_analyses_week_node_eth" "" @@ fun () -> + log_func_lwt __FUNCTION__ "" @@ fun () -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_analyses_week_node_eth"; + op_error = __FUNCTION__; op_exception = "Service not supported using node "; }) [@@service Api_services_node.get_analyses_week_node_eth] let get_address_information_node_eth (_, address) _ = - log_func_lwt ~category:"service" "get_address_information_node_eth" address - @@ fun () -> + log_func_lwt __FUNCTION__ address @@ fun () -> EzAPIServer.return ~code:404 (Result.Error { - op_error = "get_address_information_node_eth"; + op_error = __FUNCTION__; op_exception = "This services is not available for the node server"; }) [@@service Api_services_node.get_address_information_node_eth] let get_sourcify_contract_information_node (_, address) _ = - log_func_lwt ~category:"service" "get_sourcify_contract_information_node" - address - @@ fun () -> get_sourcify_contract_information_aux address + log_func_lwt __FUNCTION__ address @@ fun () -> + get_sourcify_contract_information_aux address [@@service Api_services_node.get_sourcify_contract_information_node] let get_block_by_hash_node_btc (_, hash) _ = - log_func_lwt ~category:"service" "get_block_by_hash_node_btc" hash - @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let> block = Node_btc.get_block_transactions hash in match block with | Ok block -> EzAPIServer.return_ok block | Error e -> EzAPIServer.return ~code:e.code - (Result.Error - { op_error = "get_block_by_hash_node_btc"; op_exception = e.message }) + (Result.Error { op_error = __FUNCTION__; op_exception = e.message }) [@@service Api_services_node.get_block_by_hash_node_btc] let get_transaction_node_btc (_, hash) _ = - log_func_lwt ~category:"service" "get_transaction_node_btc" hash @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let> transaction = Node_btc.get_transaction hash in match transaction with | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_transaction_by_hash_node_btc"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Btc.error_enc e; }) | Ok transaction -> EzAPIServer.return_ok transaction [@@service Api_services_node.get_transaction_node_btc] let get_latest_block_node_btc _ _ = - log_func_lwt ~category:"service" "get_latest_block_node_btc" "" @@ fun () -> + log_func_lwt __FUNCTION__ "" @@ fun () -> let> block = Node_btc.get_latest_block () in match block with | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_latest_block_node_btc"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Btc.error_enc e; }) | Ok block -> EzAPIServer.return_ok block [@@service Api_services_node.get_latest_block_node_btc] let get_block_stats_node_btc (_, hash) _ = - log_func_lwt ~category:"service" "get_block_stats_node_btc" hash @@ fun () -> + log_func_lwt __FUNCTION__ hash @@ fun () -> let> block_s_r = Node_btc.get_block_stats hash in match block_s_r with | Error e -> EzAPIServer.return ~code:400 (Result.Error { - op_error = "get_block_stats_node_btc"; + op_error = __FUNCTION__; op_exception = EzEncoding.construct Btc.error_enc e; }) | Ok block -> EzAPIServer.return_ok block diff --git a/src/bitcoin_indexer/btc_db_psql.ml b/src/bitcoin_indexer/btc_db_psql.ml index 76c1d5c8..65620463 100644 --- a/src/bitcoin_indexer/btc_db_psql.ml +++ b/src/bitcoin_indexer/btc_db_psql.ml @@ -361,14 +361,14 @@ let row_address_information } let get_tx_hash_by_tx_id ?dbh ~tx_id () = - use "get_tx_hash_by_tx_id" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql dbh "select tx_hash from tx_hashes where tx_id = $tx_id"] in match l with | [] -> Log.log_error_lwt_fail ~here:[%here] "Tx id doesn't exists" | tx_hash :: _ -> Lwt.return tx_hash let get_tx_id_by_tx_hash_opt ?dbh ~tx_hash () = - use "get_tx_hash_by_tx_id" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql dbh "select tx_id from tx_hashes where tx_hash = $tx_hash"] in match l with | [] -> Lwt.return_none @@ -381,7 +381,7 @@ let get_tx_id_by_tx_hash ?dbh ~tx_hash () = | Some tx_id -> Lwt.return tx_id let create_tx_id ?dbh ~tx_hash () = - use "create_tx_id" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> tx_ids = [%pgsql dbh @@ -391,7 +391,7 @@ let create_tx_id ?dbh ~tx_hash () = with _ -> get_tx_id_by_tx_hash ~dbh ~tx_hash () let get_block_hash_by_block_id ?dbh ~block_hash_id () = - use "get_block_hash_by_block_id" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql dbh @@ -402,7 +402,7 @@ let get_block_hash_by_block_id ?dbh ~block_hash_id () = | block_hash :: _ -> Lwt.return block_hash let get_block_id_by_block_hash_opt ?dbh ~block_hash () = - use "get_block_id_by_block_hash_opt" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql dbh @@ -419,7 +419,7 @@ let get_block_id_by_block_hash ?dbh ~block_hash () = | Some block_id -> Lwt.return block_id let create_block_id ?dbh ~block_hash () = - use "create_block_id" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> tx_ids = [%pgsql dbh @@ -429,9 +429,8 @@ let create_block_id ?dbh ~block_hash () = with _ -> get_block_id_by_block_hash ~dbh ~block_hash () let get_vouts_of_transaction ?dbh ?tx_id ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_vouts_of_transaction" tx_hash - @@ fun () -> - use "get_vouts_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> tx_id_opt = match tx_id with | Some tx_id -> Lwt.return_some tx_id @@ -448,10 +447,10 @@ let get_vouts_of_transaction ?dbh ?tx_id ~tx_hash () = l let get_vout ?dbh ~tx_hash ~index () = - Log.log_func_lwt ~category:"fetch_db" "get_vouts" + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s,%s" tx_hash (Int64.to_string index)) @@ fun () -> - use "get_vouts" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> tx_id_opt = get_tx_id_by_tx_hash_opt ~dbh ~tx_hash () in match tx_id_opt with | None -> Lwt.return_none @@ -466,9 +465,8 @@ let get_vout ?dbh ~tx_hash ~index () = | x :: _ -> Lwt.return_some @@ row_vout x) let get_vins_of_transaction ?dbh ?tx_id ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_vins_of_transaction" tx_hash - @@ fun () -> - use "get_vins_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> tx_id_opt = match tx_id with | Some tx_id -> Lwt.return_some tx_id @@ -487,10 +485,8 @@ let get_vins_of_transaction ?dbh ?tx_id ~tx_hash () = l let get_vins_coinbase_of_transaction ?dbh ?tx_id ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_vins_coinbase_of_transaction" - tx_hash - @@ fun () -> - use "get_vins_coinbase_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> tx_id_opt = match tx_id with | Some tx_id -> Lwt.return_some tx_id @@ -505,10 +501,10 @@ let get_vins_coinbase_of_transaction ?dbh ?tx_id ~tx_hash () = Lwt.return @@ List.map row_vin_coinbase l let get_tx_hash_used_vout ?dbh ?tx_id ~tx_hash ~vout_index () = - Log.log_func_lwt ~category:"fetch_db" "get_vin_of_vout" + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s,%d" tx_hash @@ Int64.to_int vout_index) @@ fun () -> - use "get_vins_of_transaction" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> tx_id_opt = match tx_id with | Some tx_id -> Lwt.return_some tx_id @@ -582,17 +578,12 @@ let get_transaction_aux ~dbh ~tx_hash () = }) let get_transaction_by_hash ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_transaction_by_hash" - (Format.sprintf "%s" tx_hash) - @@ fun () -> - use "get_transaction_by_hash" dbh @@ fun dbh -> - get_transaction_aux ~dbh ~tx_hash () + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" tx_hash) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> get_transaction_aux ~dbh ~tx_hash () let get_transaction_of_block ?dbh ?block_hash_id ~block_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_transaction_of_block" - (Format.sprintf "%s" block_hash) - @@ fun () -> - use "get_transaction_of_block" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" block_hash) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_hash_id_opt = match block_hash_id with | Some block_hash_id -> Lwt.return block_hash_id @@ -653,10 +644,8 @@ let get_transaction_of_block ?dbh ?block_hash_id ~block_hash () = @@ List.fast_sort (fun tx1 tx2 -> Int64.compare tx1#tx_index tx2#tx_index) l let get_block_by_hash ?dbh ~block_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_block_by_hash" - (Format.sprintf "%s" block_hash) - @@ fun () -> - use "get_block_by_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" block_hash) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_hash_id_opt = get_block_id_by_block_hash_opt ~dbh ~block_hash () in match block_hash_id_opt with | None -> Lwt.return_none @@ -680,10 +669,8 @@ let get_block_by_hash ?dbh ~block_hash () = @@ row_block block_obj block_hash previous_block_hash next_block_khash) let get_block_transactions_by_hash ?dbh ~block_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_block_transactions_by_hash" - block_hash - @@ fun () -> - use "get_block_transactions_by_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ block_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = get_block_by_hash ~dbh ~block_hash () in match l with | None -> Lwt.return_none @@ -692,10 +679,8 @@ let get_block_transactions_by_hash ?dbh ~block_hash () = Lwt.return_some @@ { block with tx } let get_block_by_height ?dbh ~block_height () = - Log.log_func_lwt ~category:"fetch_db" "get_block_by_height" - (Int32.to_string block_height) - @@ fun () -> - use "get_block_by_height" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int32.to_string block_height) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh "SELECT * FROM blocks WHERE block_height = $block_height"] in @@ -718,10 +703,8 @@ let get_block_by_height ?dbh ~block_height () = @@ row_block block_obj block_hash previous_block_hash next_block_khash let get_block_transactions_by_height ?dbh ~block_height () = - Log.log_func_lwt ~category:"fetch_db" "get_block_transactions_by_height" - (Int32.to_string block_height) - @@ fun () -> - use "get_block_transactions_by_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int32.to_string block_height) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = get_block_by_height ~dbh ~block_height () in match l with | None -> Lwt.return_none @@ -730,10 +713,8 @@ let get_block_transactions_by_height ?dbh ~block_height () = Lwt.return_some @@ { block with tx } let add_transaction_out ?dbh ~index ~(txout : txout) ~tx_id () = - Log.log_func_lwt ~category:"insert_db" "add_transaction_out" - (Int64.to_string tx_id) - @@ fun () -> - use "add_transaction_out" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string tx_id) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> [%pgsql dbh {| INSERT INTO vouts ( @@ -757,10 +738,8 @@ let add_transaction_out ?dbh ~index ~(txout : txout) ~tx_id () = ${txout.pubkey.typ},$index ) |}] let add_transaction_in ?dbh ~index ~(txin : txin) ~tx_id () = - Log.log_func_lwt ~category:"insert_db" "add_transaction_in" - (Int64.to_string tx_id) - @@ fun () -> - use "add_transaction_in" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string tx_id) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let txinwitness = List.map (fun x -> Some x) txin.txinwitness in match txin.kind with | Coinbase data -> @@ -802,10 +781,9 @@ VALUES ( |}] let add_transaction ?dbh ~index ~(transaction : txn) ~block_hash_id () = - Log.log_func_lwt ~category:"insert_db" "add_transaction" - (Format.sprintf "%s" transaction.txid) + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" transaction.txid) @@ fun () -> - use "add_transaction" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> tx_id = create_tx_id ~dbh ~tx_hash:transaction.txid () in let> x = [%pgsql.object @@ -862,10 +840,9 @@ RETURNING Lwt.return_unit let add_block ?dbh ~(block : txn block) () = - Log.log_func_lwt ~category:"insert_db" "add_block" - (Format.sprintf "%s" block.header.hash) + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" block.header.hash) @@ fun () -> - use "add_block" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_hash_id = create_block_id ~dbh ~block_hash:block.header.hash () in let> previous_block_hash_id = create_block_id ~dbh ~block_hash:block.header.previousblockhash () in @@ -927,10 +904,9 @@ INSERT INTO blocks ( Lwt.return_unit let set_next_block_hash ?dbh ~block () = - Log.log_func_lwt ~category:"update_db" "set_next_block_hash" - (Format.sprintf "%s" block.header.hash) + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" block.header.hash) @@ fun () -> - use "set_next_block_hash" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_hash_id = create_block_id ~dbh ~block_hash:block.header.hash () in let> next_block_hash_id = match block.header.nextblockhash with @@ -948,9 +924,8 @@ let set_next_block_hash ?dbh ~block () = Lwt.return_unit let get_latest_block_stored ?dbh ?old () = - Log.log_func_lwt ~category:"fetch_db" "get_latest_block_stored" "" - @@ fun () -> - use "get_latest_block_stored" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_height = match old with | None -> ( @@ -976,9 +951,8 @@ let get_latest_block_stored ?dbh ?old () = | Some block_height -> get_block_by_height ~dbh ~block_height () let add_block_stat ?dbh ~(block_stat : stats) () = - Log.log_func_lwt ~category:"insert_db" "add_block_stat" block_stat.blockhash - @@ fun () -> - use "add_block_stat" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ block_stat.blockhash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_hash_id = create_block_id ~dbh ~block_hash:block_stat.blockhash () in let feerate_pct1, feerate_pct2, feerate_pct3, feerate_pct4, feerate_pct5 = @@ -1064,9 +1038,8 @@ INSERT INTO stats ( Lwt.return_unit let get_block_stats ?dbh ~block_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_block_stats" block_hash - @@ fun () -> - use "get_block_stats" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ block_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_hash_id_opt = get_block_id_by_block_hash_opt ~dbh ~block_hash () in match block_hash_id_opt with | None -> Lwt.return_none @@ -1118,9 +1091,8 @@ let get_block_stats ?dbh ~block_hash () = }) let get_latest_block_stat_stored ?dbh ?old () = - Log.log_func_lwt ~category:"fetch_db" "get_latest_block_stat_stored" "" - @@ fun () -> - use "get_latest_block_stored" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_height = match old with | None -> ( diff --git a/src/bitcoin_indexer/btc_node.ml b/src/bitcoin_indexer/btc_node.ml index 555a1346..e9b7d36e 100644 --- a/src/bitcoin_indexer/btc_node.ml +++ b/src/bitcoin_indexer/btc_node.ml @@ -22,18 +22,18 @@ let get_base_url_node () = | Some base -> base let get_block_transactions ?base_url block_hash = - Log.log_func_lwt ~category:"node" "get_block_transactions" block_hash - @@ fun () -> post ?base:base_url @@ Block2 block_hash + Log.log_func_lwt __FUNCTION__ block_hash @@ fun () -> + post ?base:base_url @@ Block2 block_hash let get_transaction ?base_url tx_hash = - Log.log_func_lwt ~category:"node" "get_transaction" tx_hash @@ fun () -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> post ?base:base_url @@ Raw_transaction (tx_hash, None) let get_latest_block ?base_url () = - Log.log_func_lwt ~category:"node" "get_latest_block" "" @@ fun () -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> let>? last_block_hash = post ?base:base_url @@ Best in get_block_transactions ?base_url last_block_hash let get_block_stats ?base_url block_hash = - Log.log_func_lwt ~category:"node" "get_block_stats" block_hash @@ fun () -> + Log.log_func_lwt __FUNCTION__ block_hash @@ fun () -> post ?base:base_url @@ Stats (`hash block_hash) diff --git a/src/common/log.ml b/src/common/log.ml index 8e9338a1..8cab8bf5 100644 --- a/src/common/log.ml +++ b/src/common/log.ml @@ -127,93 +127,37 @@ let log_warning_fail ~here message = let _ = log_warning ~here message in failwith message -module Time_env = Map.Make (String) - -let category_time = ref Time_env.empty - -let category_count = ref Time_env.empty - -let func_time = ref Time_env.empty - -let func_count = ref Time_env.empty - -let update_statistics category f_name exec_time result = - let _ = - match category with - | Some category -> - let gauge_number = category ^ "_number" in - let gauge_average = category ^ "_average_time" in - let time, count = - match Time_env.find_opt category !category_time with - | Some time -> - let count = Time_env.find category !category_count in - (time +. exec_time, count + 1) - | None -> (exec_time, 1) in - Statistics.set_or_update_gauge gauge_average (time /. float_of_int count) ; - Statistics.set_or_update_gauge_add_and_reset gauge_number 1. ; - category_time := Time_env.add category time !category_time ; - category_count := Time_env.add category count !category_count - | None -> () in - let gauge_number = f_name ^ "_number" in - let gauge_average = f_name ^ "_average_time" in - let time, count = - match Time_env.find_opt f_name !func_time with - | Some time -> - let count = Time_env.find f_name !func_count in - (time +. exec_time, count + 1) - | None -> (exec_time, 1) in - Statistics.set_or_update_gauge gauge_average (time /. float_of_int count) ; - Statistics.set_or_update_gauge_add_and_reset gauge_number 1. ; - category_time := Time_env.add f_name time !category_time ; - category_count := Time_env.add f_name count !category_count ; - result - -let log_func_lwt ?color ?category f_name args f = +let log_func_lwt ?color f_name args f = match !log_verbose with - | Nothing -> - let|> result, exec_time = time_counter_lwt f in - update_statistics category f_name exec_time result - | Low -> - let|> result, exec_time = time_counter_lwt f in - update_statistics category f_name exec_time result + | Nothing -> f () + | Low -> f () | Medium -> - log_aux ?color - (Format.sprintf "Category %s | Call %s(%s)" - (EzEncoding.construct Json_encoding.(option string) category) - f_name args) ; - let|> result, exec_time = time_counter_lwt f in - update_statistics category f_name exec_time result + let _ = log_aux ?color (Format.sprintf "Call %s(%s)" f_name args) in + f () | High -> - log_aux ?color - (Format.sprintf "Category %s | Call %s(%s)" - (EzEncoding.construct Json_encoding.(option string) category) - f_name args) ; - let|> result, exec_time = time_counter_lwt f in - log_aux ?color - (Format.sprintf "Category %s | Return call %s(%s) execution time : %f" - (EzEncoding.construct Json_encoding.(option string) category) - f_name args exec_time) ; - update_statistics category f_name exec_time result - -let log_func ?color ?category f_name args f = + let _ = log_aux ?color (Format.sprintf "Call %s(%s)" f_name args) in + let> result, exec_time = time_counter_lwt f in + let _ = + log_aux ?color + (Format.sprintf "Return call %s(%s) execution time : %f" f_name args + exec_time) in + Lwt.return result + +let log_func ?color f_name args f = match !log_verbose with - | Nothing -> - let result, exec_time = time_counter f in - update_statistics category f_name exec_time result - | Low -> - let result, exec_time = time_counter f in - update_statistics category f_name exec_time result + | Nothing -> f () + | Low -> f () | Medium -> - log_aux ?color (Format.sprintf "Call %s(%s)" f_name args) ; - let result, exec_time = time_counter f in - update_statistics category f_name exec_time result + let _ = log_aux ?color (Format.sprintf "Call %s(%s)" f_name args) in + f () | High -> - log_aux ?color (Format.sprintf "Call %s(%s)" f_name args) ; + let _ = log_aux ?color (Format.sprintf "Call %s(%s)" f_name args) in let result, exec_time = time_counter f in - log_aux ?color - (Format.sprintf "Return call %s(%s) execution time : %f" f_name args - exec_time) ; - update_statistics category f_name exec_time result + let _ = + log_aux ?color + (Format.sprintf "Return call %s(%s) execution time : %f" f_name args + exec_time) in + result let log_finish_block_store ?details block_number time = log ~tag:"INFO" diff --git a/src/common/log.mli b/src/common/log.mli index 5f7e86b1..14dc7404 100644 --- a/src/common/log.mli +++ b/src/common/log.mli @@ -63,31 +63,18 @@ val log_warning_fail : here:Lexing.position -> string -> 'a (** Log a message and execute a function, returning its result as a Lwt promise. @param color An optional color for the log message. - @param category An optional category (like module name). @param arg The log message. @param func The function to execute. @return A promise that resolves to the result of the function. *) val log_func_lwt : - ?color:Types.color -> - ?category:string -> - string -> - string -> - (unit -> 'a Lwt.t) -> - 'a Lwt.t + ?color:Types.color -> string -> string -> (unit -> 'a Lwt.t) -> 'a Lwt.t (** Log a message and execute a function, returning its result. @param color An optional color for the log message. - @param category An optional category (like module name). @param arg The log message. @param func The function to execute. @return The result of the function. *) -val log_func : - ?color:Types.color -> - ?category:string -> - string -> - string -> - (unit -> 'a) -> - 'a +val log_func : ?color:Types.color -> string -> string -> (unit -> 'a) -> 'a (** Logging Helper Interface diff --git a/src/common/pool.ml b/src/common/pool.ml index ec3d0d53..e1618241 100644 --- a/src/common/pool.ml +++ b/src/common/pool.ml @@ -9,14 +9,8 @@ module Pool (D : Db_module) = struct let pool = ref (None : PGOCaml.pa_pg_data PGOCaml.t Lwt_pool.t option) - let cpt_pool = ref 0 - let init ?(n = 20) ?host ?port ?user ?password ?(database = D.dbname) - ?unix_domain_socket_dir - ?(check = - fun _conn ok -> - Log.log_high @@ Format.sprintf "%d" !cpt_pool ; - ok false) () = + ?unix_domain_socket_dir ?(check = fun _conn ok -> ok false) () = pool := Some (Lwt_pool.create n ~check ~validate:PGOCaml.alive ~dispose:(fun x -> @@ -29,32 +23,23 @@ module Pool (D : Db_module) = struct let use_pool function_name f = match !pool with - | None -> Log.log_error_fail ~here:[%here] "database pool not initialised" + | None -> + Log.log_error_fail ~here:[%here] + @@ Format.sprintf "Function : %s database pool not initialised" + function_name | Some pool -> Lwt_pool.use pool (fun x -> - cpt_pool := !cpt_pool + 1 ; - Log.log_high - @@ Format.sprintf "add thread %d for %s" !cpt_pool function_name ; let> r = f x in - cpt_pool := !cpt_pool - 1 ; - Log.log_high - @@ Format.sprintf "remove thread %d from %s" !cpt_pool function_name ; Lwt.return r) let use function_name dbh f = match dbh with - | None -> - Log.log_high - @@ Format.sprintf "Use :: use global pool, function :%s" function_name ; - use_pool function_name f - | Some dbh -> - Log.log_high - @@ Format.sprintf "Use :: use dbh exists, function :%s" function_name ; - f dbh + | None -> use_pool function_name f + | Some dbh -> f dbh let wrap_begin_commit ?dbh (f : EzPG_lwt.PGOCaml.pa_pg_data EzPG_lwt.PGOCaml.t -> unit Lwt.t) = - use "wrap_begin_commit" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let max_retry = 10 in let rec aux dbh f retry_step = if retry_step >= max_retry then diff --git a/src/ethereum_decode/eth_decode.ml b/src/ethereum_decode/eth_decode.ml index ee1bfb8e..911742bd 100644 --- a/src/ethereum_decode/eth_decode.ml +++ b/src/ethereum_decode/eth_decode.ml @@ -72,14 +72,12 @@ struct let operation_cache = Operation_cache.create Operation_cache.default_capacity let get_event_description_aux (hash : string) = - Log.log_func_lwt "get_event_description" hash @@ fun () -> let> result_items = get_signature_by_hash ~hash () in match result_items with | None -> Lwt.return_none | Some x -> Lwt.return_some (x.s_id, x.s_description) let get_operation_descriptions_aux (hash : string) = - Log.log_func_lwt "get_operation_descriptions" hash @@ fun () -> let hash = try Tools.sub_string hash 0 8 with _ -> hash in let> result_items = get_signature_by_operation_hash ~hash () in match result_items with diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_analysis.ml b/src/ethereum_indexer/eth_db_psql/eth_db_psql_analysis.ml index 546f3013..b3579283 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_analysis.ml +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_analysis.ml @@ -38,10 +38,8 @@ let analysis_to_analysis_type (analysis : 'a analysis) = | A_Arbitrage _ -> `arbitrage let add_sandwich_swap_transaction_swap ?dbh ~(swap : swap) ~st_id () = - Log.log_func_lwt ~category:"insert_db" " add_sandwich_swap_transaction_swap" - "" - @@ fun () -> - use "add_sandwich_swap_transaction_swap" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let amount_in = Z.to_string swap.s_amountIn in let amount_out = Z.to_string swap.s_amountOut in let token_in = swap.s_in_token in @@ -65,9 +63,8 @@ let add_sandwich_swap_transaction_swap ?dbh ~(swap : swap) ~st_id () = let add_sandwich_swap_transaction ?dbh ~(swap_transaction : swap_transaction_output) () = - Log.log_func_lwt ~category:"insert_db" "add_sandwich_swap_transaction" "" - @@ fun () -> - use "add_sandwich_swap_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let tx_hash = (swap_transaction.sto_transaction_hash :> string) in let tx_index = Int64.of_int swap_transaction.sto_index in let sender = @@ -93,10 +90,8 @@ let add_sandwich_swap_transaction ?dbh Lwt.return st_id let add_sandwich ?dbh ~(sandwich : sandwich_output) ~block_number () = - Log.log_func_lwt ~category:"insert_db" "add_sandwich" - (Int64.to_string block_number) - @@ fun () -> - use "add_sandwich" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> front_run_id = add_sandwich_swap_transaction ~dbh ~swap_transaction:sandwich.sdo_front_run () in @@ -125,10 +120,8 @@ let add_sandwich ?dbh ~(sandwich : sandwich_output) ~block_number () = Lwt.return sandwich_id let get_or_create_known_address_or_address_by_address_id ?dbh ~address () = - Log.log_func_lwt ~category:"fetch_db" - "get_or_create_known_address_or_address_by_address_id" address - @@ fun () -> - use "get_or_create_known_address_or_address_by_address_id" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ address @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> information_opt = Eth_db_psql_external.get_address_information ~dbh ~address () in let contract = @@ -138,10 +131,8 @@ let get_or_create_known_address_or_address_by_address_id ?dbh ~address () = Lwt.return contract let get_sandwich_swap_transaction_swap ?dbh ~st_id () = - Log.log_func_lwt ~category:"fetch_db" "get_sandwich_swap_transaction_swap" - (Int64.to_string st_id) - @@ fun () -> - use "get_sandwich_swap_transaction_swap" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string st_id) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> swap_object_list = [%pgsql.object dbh @@ -169,10 +160,8 @@ select * from sandwich_swap_transaction_swap where swap_transaction_id = $st_id swap_object_list let get_sandwich_swap_transaction ?dbh ~st_id () = - Log.log_func_lwt ~category:"fetch_db" "get_sandwich_swap_transaction" - (Int64.to_string st_id) - @@ fun () -> - use "get_sandwich_swap_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string st_id) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> swap_transaction_object = [%pgsql.object dbh @@ -230,20 +219,16 @@ let get_sandwiches_aux ~dbh sandwiches = Lwt.return sandwiches let get_sandwiches_of_block ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_sandwich_of_block" - (Int64.to_string block_number) - @@ fun () -> - use "get_sandwich_of_block" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> sandwich_object_list = [%pgsql.object dbh {|SELECT * FROM sandwich where block_number = ${block_number}|}] in get_sandwiches_aux ~dbh sandwich_object_list let get_sandwiches_by_id ?dbh ~sandwich_id () = - Log.log_func_lwt ~category:"fetch_db" "get_sandwiches_by_id" - (Int64.to_string sandwich_id) - @@ fun () -> - use "get_sandwiches_by_id" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string sandwich_id) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> sandwich_object_list = [%pgsql.object dbh {|SELECT * FROM sandwich where sandwich_id = ${sandwich_id}|}] in @@ -253,9 +238,8 @@ let get_sandwiches_by_id ?dbh ~sandwich_id () = | x :: _ -> Lwt.return_some x let get_sandwiches_of_transaction ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_sandwiches_of_transaction" tx_hash - @@ fun () -> - use "get_sandwiches_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> sandwiches = [%pgsql.object dbh @@ -274,9 +258,8 @@ WHERE st1.transaction_id = decode($tx_hash,'hex') get_sandwiches_aux ~dbh sandwiches let get_sandwiches_of_address ?dbh ~address () = - Log.log_func_lwt ~category:"fetch_db" "get_sandwiches_of_address" address - @@ fun () -> - use "get_sandwiches_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ address @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> sandwiches = [%pgsql.object dbh @@ -296,10 +279,8 @@ WHERE st1.sender = decode($address,'hex') get_sandwiches_aux ~dbh sandwiches let add_block_analysis ?dbh ~block_number ~analysis () = - Log.log_func_lwt ~category:"insert_db" "add_block_analysis" - (Int64.to_string block_number) - @@ fun () -> - use "add_block_analysis" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let analysis_type_integer = Int64.of_int @@ analysis_type_to_integer @@ analysis_to_analysis_type analysis in @@ -511,10 +492,8 @@ let get_analyses_aux dbh tags = Lwt.return @@ normalize_analyses analyses let get_block_analyses ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_block_analyses" - (Int64.to_string block_number) - @@ fun () -> - use "get_block_analyses" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_tags = [%pgsql.object dbh @@ -523,9 +502,8 @@ let get_block_analyses ?dbh ~block_number () = get_analyses_aux dbh block_tags let get_transaction_analyses ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_transaction_analyses" tx_hash - @@ fun () -> - use "get_block_analysis" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> tx_tags = [%pgsql.object dbh @@ -534,10 +512,8 @@ let get_transaction_analyses ?dbh ~tx_hash () = get_analyses_aux dbh tx_tags let get_latest_analyses ?dbh ~number () = - Log.log_func_lwt ~category:"fetch_db" "get_latest_analyses" - (Int64.to_string number) - @@ fun () -> - use "get_block_analyses" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let%pg pagination = "LIMIT $number" in let> block_tags = [%pgsql.object @@ -547,10 +523,8 @@ let get_latest_analyses ?dbh ~number () = get_analyses_aux dbh block_tags let get_latest_analyses_after_block_number ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_latest_analyses_after_block_number" - (Int64.to_string block_number) - @@ fun () -> - use "get_block_analyses" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block_tags = [%pgsql.object dbh {|select * from transaction_tags where block_number > $block_number|}] @@ -671,10 +645,8 @@ let transfers_to_csv_lines block_number let add_block_transfers_csv ?dbh ~block_number ~(transfers : transfer_output tx_analysis_output list) () = - Log.log_func_lwt ~category:"insert_db" "add_block_transfers_csv" - (Int64.to_string block_number) - @@ fun () -> - use "add_block_transfers_csv" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let csv_dir = "/tmp/" in let csv_file_name = Filename.concat csv_dir @@ -718,10 +690,8 @@ WITH ( let add_block_transfers ?dbh ~block_number ~(transfers : transfer_output tx_analysis_output list) () = - Log.log_func_lwt ~category:"insert_db" "add_block_transfers" - (Int64.to_string block_number) - @@ fun () -> - use "add_block_transfers" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let aux dbh (tx_hash : b) (tx_index : int) (transfer : transfer_analysis) = let transfers_from = get_address_of_eth_address transfer.tan_from in let transfers_to = get_address_of_eth_address transfer.tan_to in @@ -873,9 +843,8 @@ let normalize_transfer (transfers : transfer_analysis tx_analysis_output list) = TX_analysis_map.empty transfers let get_transfers_by_address ?dbh ~address () = - Log.log_func_lwt ~category:"fetch_db" "get_transfers_by_address" address - @@ fun () -> - use "get_transfers_by_address" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ address @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> transfers_obj = [%pgsql.object dbh @@ -886,10 +855,8 @@ let get_transfers_by_address ?dbh ~address () = Lwt.return @@ normalize_transfer transfers_list let get_transfers_by_block_number ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_transfers_by_block_number" - (Int64.to_string block_number) - @@ fun () -> - use "get_transfers_by_block_number" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> transfers_obj = [%pgsql.object dbh @@ -900,9 +867,8 @@ let get_transfers_by_block_number ?dbh ~block_number () = Lwt.return @@ normalize_transfer transfers_list let get_transfers_by_tx_hash ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_transfers_by_tx_hash" tx_hash - @@ fun () -> - use "get_transfers_by_tx_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> transfers_obj = [%pgsql.object dbh diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_external.ml b/src/ethereum_indexer/eth_db_psql/eth_db_psql_external.ml index ce807c81..1177d2f4 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_external.ml +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_external.ml @@ -18,10 +18,10 @@ let integer_to_address_tag = function @@ Format.sprintf "Tag integer %d doesn't exists " i let get_source_by_id ?dbh ~source_id () = - Log.log_func_lwt ~category:"fetch_db" "get_source_by_id" + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" (Int64.to_string source_id)) @@ fun () -> - use "get_source_by_id" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> ids = [%pgsql.object dbh @@ -32,10 +32,8 @@ let get_source_by_id ?dbh ~source_id () = | x :: _ -> Lwt.return_some x#source let get_source_id ?dbh ~source () = - Log.log_func_lwt ~category:"fetch_db" "get_source_id" - (Format.sprintf "%s" source) - @@ fun () -> - use "get_source_id" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" source) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> ids = [%pgsql.object dbh {|select source_id from information_sources where source = ${source}|}] @@ -45,10 +43,8 @@ let get_source_id ?dbh ~source () = | x :: _ -> Lwt.return_some x#source_id let add_source ?dbh ~source () = - Log.log_func_lwt ~category:"insert_db" "add_source" - (Format.sprintf "%s" source) - @@ fun () -> - use "add_source" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" source) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> ids = [%pgsql dbh @@ -68,7 +64,7 @@ let add_source ?dbh ~source () = | x :: _ -> Lwt.return x let add_pool_information ?dbh ~pool ~token1 ~token2 () = - use "add_pool_information" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> [%pgsql dbh {| @@ -77,7 +73,7 @@ VALUES (decode($pool,'hex'), decode($token1,'hex'), decode($token2,'hex')) ON CONFLICT (pool_id) DO NOTHING|}] let add_contract_category ?dbh ~category () = - use "add_contract_category" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> id = [%pgsql.object dbh @@ -102,10 +98,10 @@ SELECT category_id FROM contract_category WHERE category = $category; let add_contract_information ?dbh ~contract ~(contract_info : contract_information) () = - Log.log_func_lwt ~category:"insert_db" "add_contract_information" + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" (contract_info.ci_address :> string)) @@ fun () -> - use "add_contract_information" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let symbol = contract_info.ci_symbol in let name = contract_info.ci_name in let decimals = Option.map Int32.of_int contract_info.ci_decimals in @@ -146,10 +142,8 @@ let add_contract_information ?dbh ~contract add_pool_information ~dbh ~pool:contract ~token1 ~token2 () let get_or_create_alias_id ?dbh ~(alias : string) () = - Log.log_func_lwt ~category:"insert_db" "get_or_create_alias_id" - (Format.sprintf "%s" alias) - @@ fun () -> - use "get_or_create_alias_id" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" alias) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> rows = [%pgsql.object dbh @@ -172,9 +166,8 @@ SELECT alias_id FROM alias WHERE alias = $alias; Lwt.return id let add_address_alias ?dbh ~address ~(address_alias : address_alias) () = - Log.log_func_lwt ~category:"insert_db" "add_address_alias" address - @@ fun () -> - use "add_address_alias" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ address @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> source_id = add_source ~dbh ~source:address_alias.aa_information_source () in let> alias_id = get_or_create_alias_id ~dbh ~alias:address_alias.aa_alias () in @@ -188,8 +181,8 @@ let add_address_alias ?dbh ~address ~(address_alias : address_alias) () = |}] let add_address_tag ?dbh ~address ~(address_tag : address_tag) () = - Log.log_func_lwt ~category:"insert_db" "add_address_tag" address @@ fun () -> - use "add_address_tag" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ address @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let tag_id = Int64.of_int @@ address_tag_to_integer address_tag in [%pgsql dbh @@ -200,10 +193,10 @@ let add_address_tag ?dbh ~address ~(address_tag : address_tag) () = let add_address_information ?dbh ~(address_information : address_information) () = - Log.log_func_lwt ~category:"insert_db" "add_address_information" + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s" (address_information.ai_address :> string)) @@ fun () -> - use "add_address_information" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let address = (address_information.ai_address :> string) in let> _ = Lwt_list.iter_s @@ -220,10 +213,8 @@ let add_address_information ?dbh ~(address_information : address_information) () ~contract:address () let get_contract_category ?dbh ~category_id () = - Log.log_func_lwt ~category:"fetch_db" "get_contract_category" - (Int64.to_string category_id) - @@ fun () -> - use "get_contract_category" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string category_id) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> c_l = [%pgsql.object dbh @@ -235,9 +226,7 @@ let get_contract_category ?dbh ~category_id () = | c :: _ -> Lwt.return_some c#category let rec get_contract_information ?dbh ~contract_address () = - Log.log_func_lwt ~category:"fetch_db" "get_contract_information " - contract_address - @@ fun () -> + Log.log_func_lwt "get_contract_information " contract_address @@ fun () -> use "get_contract_information " dbh @@ fun dbh -> let address = (contract_address :> string) in let> l = @@ -284,10 +273,8 @@ let rec get_contract_information ?dbh ~contract_address () = let get_contracts_by_type ?dbh ~contract_type () = let type_i = Olympus.Decode.Contract.contract_type_to_integer contract_type in - Log.log_func_lwt ~category:"fetch_db" "get_contracts_by_type" - (Int32.to_string type_i) - @@ fun () -> - use "get_contracts_by_type" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int32.to_string type_i) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh {|select * from contract_information where contract_type = $type_i ;|}] @@ -309,8 +296,8 @@ let get_contracts_by_type ?dbh ~contract_type () = l let get_address_alias ?dbh ~address () = - Log.log_func_lwt ~category:"fetch_db" "get_address_alias" address @@ fun () -> - use "get_address_alias" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ address @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> alias_objs = [%pgsql.object dbh @@ -341,8 +328,8 @@ let get_address_alias ?dbh ~address () = alias_objs let get_address_tags ?dbh ~address () = - Log.log_func_lwt ~category:"fetch_db" "get_address_tags" address @@ fun () -> - use "get_address_tags" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ address @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> tags_l = [%pgsql.object dbh "select * from address_tag where address_id = decode($address,'hex');"] @@ -353,9 +340,8 @@ let get_address_tags ?dbh ~address () = tags_l let get_address_information ?dbh ~address () = - Log.log_func_lwt ~category:"fetch_db" "get_address_information" address - @@ fun () -> - use "get_address_information" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ address @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> address_alias = get_address_alias ~dbh ~address () in let> contract_info = get_contract_information ~dbh ~contract_address:address () in diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_raw.ml b/src/ethereum_indexer/eth_db_psql/eth_db_psql_raw.ml index a7cbd11a..11776b22 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_raw.ml +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_raw.ml @@ -10,7 +10,7 @@ open Olympus.Types [%%pg { loose }] let get_block_hash_by_block_number ?dbh ~block_number () = - use "get_block_hash_by_block_number" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql dbh "select block_hash from blocks where block_number = $block_number"] @@ -23,10 +23,8 @@ let get_block_hash_by_block_number ?dbh ~block_number () = | Some block_hash -> Lwt.return block_hash) let get_block_timestamp ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_block_timestamp" - (Int64.to_string block_number) - @@ fun () -> - use "get_block_timestamp" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -37,23 +35,21 @@ let get_block_timestamp ?dbh ~block_number () = | block_timestamp_obj :: _ -> Lwt.return block_timestamp_obj#block_timestamp let get_blocks_number_by_timestamps ?dbh ~timestamp1 ~timestamp2 () = - Log.log_func_lwt ~category:"insert_db" "get_blocks_number_by_timestamps" + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s,%s" (Int64.to_string timestamp1) (Int64.to_string timestamp2)) @@ fun () -> - use "get_blocks_number_by_timestamps" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> [%pgsql dbh "select block_number,block_timestamp from blocks where block_timestamp \ >= $timestamp1 and block_timestamp < $timestamp2"] let add_transaction ?dbh ~(transaction : transaction) () = - Log.log_func_lwt ~category:"insert_db" "add_transaction" - (transaction.tx_hash :> string) - @@ fun () -> + Log.log_func_lwt __FUNCTION__ (transaction.tx_hash :> string) @@ fun () -> let add_access_list ~dbh ~access_address ~storage_keys ~tx_hash ~index () = - Log.log_func_lwt ~category:"insert_db" "add_access_list" + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s,%s" access_address tx_hash) @@ fun () -> let> _ = @@ -64,7 +60,7 @@ let add_transaction ?dbh ~(transaction : transaction) () = VALUES (decode($tx_hash,'hex'), \ decode($access_address,'hex'),$storage_keys,$index);"] in Lwt.return_unit in - use "add_transaction" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let from_address = (transaction.from :> string) in let dst_address = (transaction.dst :> string option) in let block_number = @@ -149,11 +145,11 @@ let add_transaction ?dbh ~(transaction : transaction) () = let add_transaction_receipt ?dbh ~(transaction_receipt : transaction_receipt) () = - Log.log_func_lwt ~category:"insert_db" "add_transaction_receipt" + Log.log_func_lwt __FUNCTION__ (transaction_receipt.r_transaction_hash :> string) @@ fun () -> let add_logs ~dbh (log : b log) tx_hash log_index = - Log.log_func_lwt ~category:"insert_db" "add_logs" "" @@ fun () -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> let log_index = Option.value ~default:log_index @@ Tools.type_option_to_type_option log.l_log_index Int64.of_int in @@ -211,7 +207,7 @@ let add_transaction_receipt ?dbh ~(transaction_receipt : transaction_receipt) () )|}] in Lwt.return_unit in - use "add_transaction_receipt" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let tx_hash = (transaction_receipt.r_transaction_hash :> string) in let r_transaction_index = Int64.of_int transaction_receipt.r_transaction_index in @@ -268,10 +264,8 @@ INSERT INTO transactions_receipts ( Lwt.return_unit let add_block ?dbh ~(block : 'a block) () = - Log.log_func_lwt ~category:"insert_db" "add_block" - (Format.sprintf "%d" block.number) - @@ fun () -> - use "add_block" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%d" block.number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let number = Int64.of_int block.number in let hash = (block.hash :> string option) in let parent_hash = (block.parent_hash :> string) in @@ -356,9 +350,7 @@ let add_block ?dbh ~(block : 'a block) () = block.uncles let add_block_transaction ?dbh ~block () = - Log.log_func_lwt ~category:"insert_db" "add_block_transaction" - (Format.sprintf "%d" block.number) - @@ fun () -> + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%d" block.number) @@ fun () -> let> _ = add_block ?dbh ~block () in Lwt_list.iter_s (fun x -> add_transaction ?dbh ~transaction:x ()) @@ -369,18 +361,15 @@ let add_receipts ?dbh ~(block_receipts : transaction_receipt list) () = Lwt.return_unit else let block_number = (List.hd block_receipts).r_block_number in - Log.log_func_lwt ~category:"insert_db" "add_receipts" - (Format.sprintf "%d" block_number) + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%d" block_number) @@ fun () -> Lwt_list.iter_s (fun x -> add_transaction_receipt ?dbh ~transaction_receipt:x ()) block_receipts let add_block_validator ?dbh ~block_number ~validator_index ~graffiti () = - Log.log_func_lwt ~category:"insert_db" "add_block_validator" - (Int64.to_string block_number) - @@ fun () -> - use "add_block_validator" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> [%pgsql dbh "INSERT INTO block_validator (block_number, graffiti, validator_index) \ @@ -388,10 +377,8 @@ let add_block_validator ?dbh ~block_number ~validator_index ~graffiti () = (block_number) DO NOTHING;"] let get_block_validator ?dbh ~block_number () = - Log.log_func_lwt ~category:"insert_db" "add_block_validator" - (Int64.to_string block_number) - @@ fun () -> - use "add_block_validator" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> validator = [%pgsql.object dbh @@ -452,9 +439,8 @@ let get_log_aux dbh block_hash f_log tx_hash l = logs let get_log_of_transaction ?dbh ?block_hash ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_log_of_transaction" tx_hash - @@ fun () -> - use "get_log_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -466,9 +452,8 @@ let get_log_of_transaction ?dbh ?block_hash ~tx_hash () = | f_log :: _ as l -> get_log_aux dbh block_hash f_log tx_hash l let get_log_by_index ?dbh ?block_hash ~tx_hash ~log_index () = - Log.log_func_lwt ~category:"fetch_db" "get_log_of_transaction" tx_hash - @@ fun () -> - use "get_log_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -482,9 +467,8 @@ let get_log_by_index ?dbh ?block_hash ~tx_hash ~log_index () = Lwt.return_some @@ List.hd result_l let get_transaction_index ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_transaction_index" tx_hash - @@ fun () -> - use "get_transaction_index" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> result_l = [%pgsql.object dbh @@ -495,9 +479,8 @@ let get_transaction_index ?dbh ~tx_hash () = | tx_index :: _ -> Lwt.return tx_index#transaction_index let get_transaction_block_number ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_transaction_block_number" tx_hash - @@ fun () -> - use "get_transaction_block_number" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> result_l = [%pgsql.object dbh @@ -508,10 +491,8 @@ let get_transaction_block_number ?dbh ~tx_hash () = | tx_index :: _ -> Lwt.return_some tx_index#transaction_block_number let get_transaction_receipts_of_block ?dbh ?block_hash ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_transaction_receipts_of_block" - (Int64.to_string block_number) - @@ fun () -> - use "get_transaction_receipts_of_block" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -556,10 +537,8 @@ let get_transaction_receipts_of_block ?dbh ?block_hash ~block_number () = tx_rs let get_transaction_receipts_by_hash ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_transaction_receipts_by_hash" - tx_hash - @@ fun () -> - use "get_transaction_receipts_by_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -589,9 +568,8 @@ let get_transaction_receipts_by_hash ?dbh ~tx_hash () = Lwt.return_some { tx_r with r_logs } let get_access_list_of_transaction ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_access_list_of_transaction" tx_hash - @@ fun () -> - use "get_access_list_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -611,10 +589,8 @@ let get_access_list_of_transaction ?dbh ~tx_hash () = l_sort let get_transaction_of_block ?dbh ?block_hash ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_transaction_of_block" - (Int64.to_string block_number) - @@ fun () -> - use "get_transaction_of_block" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -660,9 +636,8 @@ let get_transaction_of_block ?dbh ?block_hash ~block_number () = transactions let get_transaction_by_hash ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_transaction_by_hash" tx_hash - @@ fun () -> - use "get_transaction_by_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -689,10 +664,8 @@ let get_transaction_by_hash ?dbh ~tx_hash () = Lwt.return_some { tx with blob_versioned_hashes; access_list } let get_uncles_of_block ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_uncles_of_block" - (Int64.to_string block_number) - @@ fun () -> - use "get_uncles_of_block" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -701,10 +674,8 @@ let get_uncles_of_block ?dbh ~block_number () = Lwt.return @@ List.map (fun x -> b x#block_uncles_uncle_hash) l let get_block_transaction_gas_used ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_block_transaction_gas_used" - (Int64.to_string block_number) - @@ fun () -> - use "get_block_transaction_gas_used" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql dbh @@ -717,8 +688,8 @@ let get_block_transaction_gas_used ?dbh ~block_number () = l let get_block_by_hash ?dbh ~hash () = - Log.log_func_lwt ~category:"fetch_db" "get_block_by_hash" hash @@ fun () -> - use "get_block_by_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh "select * from blocks where block_hash = decode($hash,'hex')"] in @@ -734,10 +705,8 @@ let get_block_by_hash ?dbh ~hash () = Lwt.return_some { block with uncles } let get_block_by_number ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_block_by_number" - (Int64.to_string block_number) - @@ fun () -> - use "get_block_by_number" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh "select * from blocks where block_number = $block_number"] in @@ -753,9 +722,8 @@ let get_block_by_number ?dbh ~block_number () = Lwt.return_some { block with uncles } let get_block_transaction_by_hash ?dbh ~hash () = - Log.log_func_lwt ~category:"fetch_db" "get_block_transaction_by_hash" hash - @@ fun () -> - use "get_block_transaction_by_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block = get_block_by_hash ~dbh ~hash () in match block with | None -> Lwt.return_none @@ -765,10 +733,8 @@ let get_block_transaction_by_hash ?dbh ~hash () = Lwt.return_some { block with transactions } let get_block_transaction_by_number ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_block_transaction_by_number" - (Int64.to_string block_number) - @@ fun () -> - use "get_block_transaction_by_number" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block = get_block_by_number ~dbh ~block_number () in match block with | None -> Lwt.return_none @@ -778,8 +744,8 @@ let get_block_transaction_by_number ?dbh ~block_number () = Lwt.return_some { block with transactions } let get_transactions_address ?dbh ~address () = - Log.log_func_lwt ~category:"fetch_db" "get_address_txs" address @@ fun () -> - use "get_address_transactions" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ address @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -792,11 +758,8 @@ let get_transactions_address ?dbh ~address () = l let get_block_transaction_receipts_by_number ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" - "get_block_transaction_receipts_by_number" - (Int64.to_string block_number) - @@ fun () -> - use "get_block_transaction_receipts_by_number" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block = get_block_by_number ~dbh ~block_number () in match block with | None -> Lwt.return_none @@ -807,10 +770,8 @@ let get_block_transaction_receipts_by_number ?dbh ~block_number () = Lwt.return_some { block with transactions } let get_block_transaction_receipts_by_hash ?dbh ~hash () = - Log.log_func_lwt ~category:"fetch_db" "get_block_transaction_receipts_by_hash" - hash - @@ fun () -> - use "get_block_transaction_receipts_by_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> block = get_block_by_hash ~dbh ~hash () in match block with | None -> Lwt.return_none @@ -821,8 +782,7 @@ let get_block_transaction_receipts_by_hash ?dbh ~hash () = Lwt.return_some { block with transactions } let add_logs_of_trace ~dbh tx_hash logs call_id = - Log.log_func_lwt ~category:"insert_db" "add_logs_of_trace" tx_hash - @@ fun () -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> Lwt_list.iteri_s (fun i log -> let index = Int64.of_int log.dtrl_index in @@ -918,9 +878,8 @@ let rec add_call_trace ~dbh tx_hash trace parent_id index = let add_trace_of_transaction ?dbh ~trace ~block_number () = let tx_hash = (trace.dt_tx_hash :> string) in - Log.log_func_lwt ~category:"insert_db" "add_trace_of_transaction" tx_hash - @@ fun () -> - use "add_trace_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let tx_hash = (tx_hash :> string) in let> _ = [%pgsql @@ -933,19 +892,15 @@ let add_trace_of_transaction ?dbh ~trace ~block_number () = add_call_trace ~dbh tx_hash trace.dt_result None 1 let add_block_traces ?dbh ~traces ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "add_block_traces" - (Int64.to_string block_number) - @@ fun () -> - use "add_block_traces" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> Lwt_list.iter_s (fun trace -> add_trace_of_transaction ~dbh ~trace ~block_number ()) traces let get_log_of_trace ?dbh ~trace_calls_id () = - Log.log_func_lwt ~category:"fetch_db" "get_log_of_trace" - (Int64.to_string trace_calls_id) - @@ fun () -> - use "get_log_of_trace" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string trace_calls_id) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -1053,7 +1008,7 @@ let get_trace_of_transaction_aux ?dbh dtr_calls = List.rev sub_calls; dtr_decode_operation = None; } in - use "get_trace_of_transaction_aux" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> calls = [%pgsql.object dbh @@ -1073,9 +1028,8 @@ let get_trace_of_transaction_aux ?dbh } let get_trace_of_transaction ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_trace_of_transaction" tx_hash - @@ fun () -> - use "get_trace_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -1088,10 +1042,8 @@ let get_trace_of_transaction ?dbh ~tx_hash () = Lwt.return_some r let get_block_traces ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_block_traces" - (Int64.to_string block_number) - @@ fun () -> - use "get_block_traces" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -1107,10 +1059,8 @@ let get_block_traces ?dbh ~block_number () = @@ List.fast_sort (fun a b -> Int.compare a.dt_tx_index b.dt_tx_index) traces let get_gas_and_miner_of_transaction ?dbh ~tx_hash () = - Log.log_func_lwt ~category:"fetch_db" "get_gas_and_miner_of_transaction" - tx_hash - @@ fun () -> - use "get_gas_and_miner_of_transaction" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ tx_hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -1142,10 +1092,8 @@ let get_gas_and_miner_of_transaction ?dbh ~tx_hash () = } let get_gas_and_miner_of_block ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_gas_and_miner_by_block_number" - (Int64.to_string block_number) - @@ fun () -> - use "get_gas_and_miner_by_block_number" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_signatures.ml b/src/ethereum_indexer/eth_db_psql/eth_db_psql_signatures.ml index 95b3dcbe..65f5a6da 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_signatures.ml +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_signatures.ml @@ -7,10 +7,8 @@ open Eth_db_psql_helpers [%%pg { loose }] let get_signature_by_id ?dbh ~id () = - Log.log_func_lwt ~category:"fetch_db" "get_signature_by_id" - (Int64.to_string id) - @@ fun () -> - use "get_signature_by_id" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string id) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh "select * from signatures where signature_id = ${id}"] in @@ -19,9 +17,8 @@ let get_signature_by_id ?dbh ~id () = | x :: _ -> Lwt.return_some (row_signature x) let get_signature_by_hash ?dbh ~hash () = - Log.log_func_lwt ~category:"fetch_db" "get_signature_by_hash" hash - @@ fun () -> - use "get_signature_by_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh "select * from signatures where signature_hash = ${hash}"] in @@ -30,10 +27,8 @@ let get_signature_by_hash ?dbh ~hash () = | x :: _ -> Lwt.return_some (row_signature x) let get_signature_by_description ?dbh ~description () = - Log.log_func_lwt ~category:"fetch_db" "get_signature_by_description" - description - @@ fun () -> - use "get_signature_by_description" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ description @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -44,20 +39,19 @@ let get_signature_by_description ?dbh ~description () = | x :: _ -> Lwt.return_some (row_signature x) let update_signature_description ~hash ?description () = - Log.log_func_lwt ~category:"update_db" "update_signature_description" - (Option.value ~default:"" description) + Log.log_func_lwt __FUNCTION__ (Option.value ~default:"" description) @@ fun () -> - use "update_signature_description" None @@ fun dbh -> + use __FUNCTION__ None @@ fun dbh -> [%pgsql dbh "UPDATE signatures SET signature_description = $?description WHERE \ signature_hash = ${hash}"] let add_signature ?dbh ~hash ?(description : string option) () = - Log.log_func_lwt ~category:"insert_db" "add_signature" + Log.log_func_lwt __FUNCTION__ (Format.sprintf "%s,%s" hash @@ Option.value ~default:"" description) @@ fun () -> - use "add_signature" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> ids = [%pgsql dbh @@ -74,9 +68,8 @@ RETURNING signature_id;|}] | x :: _ -> Lwt.return @@ Z.of_int64 x let get_signature_by_operation_hash ?dbh ~hash () = - Log.log_func_lwt ~category:"fetch_db" "get_signature_by_operation_hash" hash - @@ fun () -> - use "get_signature_by_operation_hash" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ hash @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh @@ -85,8 +78,7 @@ let get_signature_by_operation_hash ?dbh ~hash () = Lwt.return @@ List.map (fun x -> row_signature x) l let store_signatures_csv (csv_file : string) = - Log.log_func_lwt ~category:"store_csv_db" "store_signatures_csv" csv_file - @@ fun () -> + Log.log_func_lwt __FUNCTION__ csv_file @@ fun () -> let csv = Csv.load csv_file in Lwt_list.iter_p (fun x -> diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_stats.ml b/src/ethereum_indexer/eth_db_psql/eth_db_psql_stats.ml index cded4816..71f7fede 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_stats.ml +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_stats.ml @@ -10,13 +10,9 @@ open Olympus.Types [%%pg { loose }] let add_stat_block ?dbh ~block_stat ~block_number () = - Log.log_func_lwt ~category:"insert_db" "add_stat_block" - (Int64.to_string block_number) - @@ fun () -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> let add_stats_events ~dbh block_number (event_stat : stat_sub_events list) = - Log.log_func_lwt ~category:"insert_db" "add_stats_events" - (Int64.to_string block_number) - @@ fun () -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> Lwt_list.iter_s (fun (event : stat_sub_events) -> let> signature_id = @@ -62,9 +58,7 @@ let add_stat_block ?dbh ~block_stat ~block_number () = event.sse_tx_hashes) event_stat in let add_stats_operations ~dbh block_number operations_stat = - Log.log_func_lwt ~category:"insert_db" "add_stats_operations" - (Int64.to_string block_number) - @@ fun () -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> Lwt_list.iter_s (fun x -> let> signature_id = @@ -109,7 +103,7 @@ INSERT INTO stat_operations_transaction |}]) x.sso_tx_hashes) operations_stat in - use "add_stat_block" dbh @@ fun dbh -> + use __FUNCTION__ dbh @@ fun dbh -> let> _ = [%pgsql dbh @@ -137,10 +131,8 @@ INSERT INTO stat_operations_transaction add_stats_events ~dbh block_number block_stat.sb_events let get_stats_of_block ?dbh ~block_number () = - Log.log_func_lwt ~category:"fetch_db" "get_stats_of_block" - (Int64.to_string block_number) - @@ fun () -> - use "get_stats_of_block" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> l = [%pgsql.object dbh {|select * from stat_blocks where stat_block_number = $block_number|}] diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.ml b/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.ml index 97f9e59f..5b1184a9 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.ml +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.ml @@ -6,42 +6,14 @@ open Common.Types.Ethereum_analysis [%%pg { loose }] -let block_count_gauge_name = "block_count" - -let block_count_stats = ref None - -let block_count_trace_gauge_name = "block_trace_count" - -let block_count_trace_stats = ref None - -let block_count_analysis_gauge_name = "block_analysis_count" - -let block_count_analysis_stats = ref None - -let block_count_stats_gauge_name = "block_count_stat" - -let block_count_stats_stats = ref None - -let block_count_pool_gauge_name = "block_count_pool" - -let block_count_pool_stats = ref None - -let block_count_transfer_gauge_name = "block_count_transfer" - -let block_count_transfer_stats = ref None - let get_latest_block_stored ?dbh ?old () = - Log.log_func_lwt ~category:"fetch_db" "get_latest_block_stored" "" - @@ fun () -> - use "get_latest_block_stored" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> match old with | None -> ( let> l = [%pgsql.object - dbh - {| - select MAX(block_number) from blocks where block_is_stored = true; - |}] + dbh "select MAX(block_number) from blocks where block_is_stored = true;"] in match l with | [] -> Lwt.return_none @@ -49,56 +21,30 @@ let get_latest_block_stored ?dbh ?old () = | Some () -> ( let> l = [%pgsql.object - dbh - {| - select MIN(block_number) from blocks where block_is_stored = true; - |}] + dbh "select MIN(block_number) from blocks where block_is_stored = true;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#min) let set_store_block_finish ?dbh ~block_number () = - Log.log_func_lwt ~category:"update_db" "set_store_block_finish" - (Int64.to_string block_number) - @@ fun () -> - use "set_store_block_finish" dbh @@ fun dbh -> - let> _ = - [%pgsql - dbh - {| -UPDATE blocks SET -block_is_stored = TRUE -WHERE -block_number = $block_number -|}] - in - let> count = - match !block_count_stats with - | None -> ( - let> r = get_latest_block_stored () in - match r with - | None -> Lwt.return 0. - | Some value -> Lwt.return @@ Int64.to_float value) - | Some block_count_stats_tmp -> Lwt.return @@ (1. +. block_count_stats_tmp) - in - block_count_stats := Some count ; - let _ = Statistics.set_or_update_gauge block_count_gauge_name count in - Lwt.return_unit + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> + [%pgsql + dbh + "UPDATE blocks SET block_is_stored = TRUE WHERE block_number = \ + $block_number"] let get_latest_block_trace_stored ?dbh ?old () = - Log.log_func_lwt ~category:"fetch_db" "get_latest_block_trace_stored" "" - @@ fun () -> - use "get_latest_block_trace_stored" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> match old with | None -> ( let> l = [%pgsql.object dbh - {| - select MAX(block_number) from blocks where block_is_trace_stored = true; - |}] - in + "select MAX(block_number) from blocks where block_is_trace_stored = \ + true;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#max) @@ -106,53 +52,30 @@ let get_latest_block_trace_stored ?dbh ?old () = let> l = [%pgsql.object dbh - {| - select MIN(block_number) from blocks where block_is_trace_stored = true; - |}] - in + "select MIN(block_number) from blocks where block_is_trace_stored = \ + true;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#min) let set_store_block_trace_finish ?dbh ~block_number () = - Log.log_func_lwt ~category:"update_db" "set_store_block_trace_finish" - (Int64.to_string block_number) - @@ fun () -> - use "set_store_block_trace_finish" dbh @@ fun dbh -> - let> _ = - [%pgsql - dbh - {| - UPDATE blocks SET - block_is_trace_stored = TRUE - WHERE - block_number = $block_number - |}] - in - let> count = - match !block_count_trace_stats with - | None -> ( - let> r = get_latest_block_trace_stored () in - match r with - | None -> Lwt.return 0. - | Some value -> Lwt.return @@ Int64.to_float value) - | Some block_count_stats_tmp -> Lwt.return @@ (1. +. block_count_stats_tmp) - in - block_count_trace_stats := Some count ; - let _ = Statistics.set_or_update_gauge block_count_trace_gauge_name count in - Lwt.return_unit + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> + [%pgsql + dbh + "UPDATE blocks SET block_is_trace_stored = TRUE WHERE block_number = \ + $block_number"] let get_latest_block_stats_stored ?dbh ?old () = - Log.log_func_lwt ~category:"fetch_db" "get_latest_block_stats_stored" "" - @@ fun () -> - use "get_latest_block_stats_stored" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> match old with | None -> ( let> l = [%pgsql.object dbh - {|select MAX(stat_block_number) from stat_blocks where stat_block_is_stored = true;|}] - in + "select MAX(stat_block_number) from stat_blocks where \ + stat_block_is_stored = true;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#max) @@ -160,45 +83,24 @@ let get_latest_block_stats_stored ?dbh ?old () = let> l = [%pgsql.object dbh - {|select MIN(stat_block_number) from stat_blocks where stat_block_is_stored = true;|}] - in + "select MIN(stat_block_number) from stat_blocks where \ + stat_block_is_stored = true;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#min) let set_store_block_stats_finish ?dbh ~block_number () = - Log.log_func_lwt ~category:"update_db" "set_store_block_trace_finish" - (Int64.to_string block_number) - @@ fun () -> - use "set_store_block_trace_finish" dbh @@ fun dbh -> - let> _ = - [%pgsql - dbh - {| - UPDATE stat_blocks SET - stat_block_is_stored = TRUE - WHERE - stat_block_number = $block_number - |}] - in - let> count = - match !block_count_stats_stats with - | None -> ( - let> r = get_latest_block_stats_stored () in - match r with - | None -> Lwt.return 0. - | Some value -> Lwt.return @@ Int64.to_float value) - | Some block_count_stats_tmp -> Lwt.return @@ (1. +. block_count_stats_tmp) - in - block_count_stats_stats := Some count ; - let _ = Statistics.set_or_update_gauge block_count_stats_gauge_name count in - Lwt.return_unit + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> + [%pgsql + dbh + "UPDATE stat_blocks SET stat_block_is_stored = TRUE WHERE \ + stat_block_number = $block_number"] let get_latest_block_analysis_stored ?dbh ?old ~(analysis : bottom eth_analysis_type) () = - Log.log_func_lwt ~category:"fetch_db" "get_latest_analysis_stored" "" - @@ fun () -> - use "get_latest_analysis_stored" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let analysis_integer = Int64.of_int @@ Eth_db_psql_analysis.analysis_type_to_integer analysis in match old with @@ -206,10 +108,8 @@ let get_latest_block_analysis_stored ?dbh ?old let> l = [%pgsql.object dbh - {|select MAX(block_number) from transaction_tags_store_information where - tag = ${analysis_integer}; - |}] - in + "select MAX(block_number) from transaction_tags_store_information \ + where tag = ${analysis_integer};"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#max) @@ -217,11 +117,8 @@ let get_latest_block_analysis_stored ?dbh ?old let> l = [%pgsql.object dbh - {| - select MIN(block_number) from transaction_tags_store_information where - tag = ${analysis_integer}; -|}] - in + "select MIN(block_number) from transaction_tags_store_information \ + where tag = ${analysis_integer};"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#min) @@ -229,27 +126,21 @@ let get_latest_block_analysis_stored ?dbh ?old module Analyses_type_set = Set.Make (Int) let is_analyses_stored_block ?dbh ~block_number ~analysis () = - Log.log_func_lwt ~category:"fetch_db" "is_analyses_stored_block" "" - @@ fun () -> - use "is_analyses_stored_block" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let analysis_integer = Int64.of_int @@ Eth_db_psql_analysis.analysis_type_to_integer analysis in let> l = [%pgsql dbh - {| - select * from transaction_tags_store_information where - tag = ${analysis_integer} AND block_number = ${block_number}; -|}] - in + "select * from transaction_tags_store_information where tag = \ + ${analysis_integer} AND block_number = ${block_number};"] in Lwt.return (l <> []) let get_stored_analyses_type_block ?dbh ?(analyses = [`sandwich; `liquidate; `flashloan]) ~block_number () = - Log.log_func_lwt ~category:"fetch_db" " get_stored_analyses_type_block" - (Int64.to_string block_number) - @@ fun () -> - use "get_stored_analyses_type_block" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> Lwt_list.filter_s (fun analysis_type -> is_analyses_stored_block ~dbh ~analysis:analysis_type ~block_number ()) @@ -257,97 +148,49 @@ let get_stored_analyses_type_block ?dbh let set_store_block_analysis_finish ?dbh ~block_number ~(analysis : bottom eth_analysis_type) () = - Log.log_func_lwt ~category:"insert_db" "set_store_block_analysis_finish" "" - @@ fun () -> - use "set_store_block_analysis_finish" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let analysis_integer = Int64.of_int @@ Eth_db_psql_analysis.analysis_type_to_integer analysis in - let> _ = - [%pgsql - dbh - {| - INSERT INTO - transaction_tags_store_information (block_number,tag) - VALUES ($block_number,$analysis_integer) - |}] - in - let> count = - match !block_count_analysis_stats with - | None -> ( - let> r = get_latest_block_analysis_stored ~analysis () in - match r with - | None -> Lwt.return 0. - | Some value -> Lwt.return @@ Int64.to_float value) - | Some block_count_stats_tmp -> Lwt.return @@ (1. +. block_count_stats_tmp) - in - block_count_analysis_stats := Some count ; - let _ = Statistics.set_or_update_gauge block_count_analysis_gauge_name count in - Lwt.return_unit + [%pgsql + dbh + "INSERT INTO transaction_tags_store_information (block_number,tag) \ + VALUES ($block_number,$analysis_integer)"] let get_latest_block_number_pool_stored ?dbh ?old () = - Log.log_func_lwt ~category:"fetch_db" "get_latest_block_number_pool_stored" "" - @@ fun () -> - use "get_latest_block_number_pool_stored" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> match old with | None -> ( let> l = [%pgsql.object - dbh {| - select MAX(block_number) from pool_store_information; - |}] - in + dbh "select MAX(block_number) from pool_store_information;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#max) | Some () -> ( let> l = [%pgsql.object - dbh {| - select MIN(block_number) from pool_store_information; - |}] - in + dbh "select MIN(block_number) from pool_store_information;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#min) let set_store_block_pool_finish ?dbh ~block_number () = - Log.log_func_lwt ~category:"insert_db" "set_store_block_pool_finish" - (Int64.to_string block_number) - @@ fun () -> - use "set_store_block_pool_finish" dbh @@ fun dbh -> - let> _ = - [%pgsql - dbh - {| -INSERT INTO pool_store_information(block_number) VALUES ($block_number) -|}] - in - let> count = - match !block_count_pool_stats with - | None -> ( - let> r = get_latest_block_number_pool_stored () in - match r with - | None -> Lwt.return 0. - | Some value -> Lwt.return @@ Int64.to_float value) - | Some block_count_stats_tmp -> Lwt.return @@ (1. +. block_count_stats_tmp) - in - block_count_pool_stats := Some count ; - let _ = Statistics.set_or_update_gauge block_count_pool_gauge_name count in - Lwt.return_unit + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> + [%pgsql + dbh + "INSERT INTO pool_store_information(block_number) VALUES ($block_number)"] let get_latest_block_number_transfer_neo4j_stored ?dbh ?old () = - Log.log_func_lwt ~category:"fetch_db" - "get_latest_block_number_transfer_neo4j_stored" "" - @@ fun () -> - use "get_latest_block_number_transfer_neo4j_stored" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> match old with | None -> ( let> l = [%pgsql.object - dbh - {| - select MAX(block_number) from transfer_store_information_neo4j; - |}] + dbh "select MAX(block_number) from transfer_store_information_neo4j;"] in match l with | [] -> Lwt.return_none @@ -355,88 +198,43 @@ let get_latest_block_number_transfer_neo4j_stored ?dbh ?old () = | Some () -> ( let> l = [%pgsql.object - dbh - {| - select MIN(block_number) from transfer_store_information_neo4j; - |}] + dbh "select MIN(block_number) from transfer_store_information_neo4j;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#min) let set_store_block_transfer_neo4j_finish ?dbh ~block_number () = - Log.log_func_lwt ~category:"insert_db" "set_store_block_transfer_neo4j_finish" - (Int64.to_string block_number) - @@ fun () -> - use "set_store_block_transfer_neo4j_finish" dbh @@ fun dbh -> - let> _ = - [%pgsql - dbh - {| -INSERT INTO transfer_store_information_neo4j(block_number) VALUES ($block_number) -|}] - in - let> count = - match !block_count_pool_stats with - | None -> ( - let> r = get_latest_block_number_transfer_neo4j_stored () in - match r with - | None -> Lwt.return 0. - | Some value -> Lwt.return @@ Int64.to_float value) - | Some block_count_stats_tmp -> Lwt.return @@ (1. +. block_count_stats_tmp) - in - block_count_transfer_stats := Some count ; - let _ = Statistics.set_or_update_gauge block_count_transfer_gauge_name count in - Lwt.return_unit + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> + [%pgsql + dbh + "INSERT INTO transfer_store_information_neo4j(block_number) VALUES \ + ($block_number)"] let get_latest_block_number_transfer_stored ?dbh ?old () = - Log.log_func_lwt ~category:"fetch_db" - "get_latest_block_number_transfer_stored" "" - @@ fun () -> - use "get_latest_block_number_transfer_stored" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ "" @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> match old with | None -> ( let> l = [%pgsql.object - dbh {| - select MAX(block_number) from transfer_store_information; - |}] - in + dbh "select MAX(block_number) from transfer_store_information;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#max) | Some () -> ( let> l = [%pgsql.object - dbh {| - select MIN(block_number) from transfer_store_information; - |}] - in + dbh "select MIN(block_number) from transfer_store_information;"] in match l with | [] -> Lwt.return_none | x :: _ -> Lwt.return x#min) let set_store_block_transfer_finish ?dbh ~block_number () = - Log.log_func_lwt ~category:"insert_db" "set_store_block_transfer_finish" - (Int64.to_string block_number) - @@ fun () -> - use "set_store_block_transfer_finish" dbh @@ fun dbh -> - let> _ = - [%pgsql - dbh - {| -INSERT INTO transfer_store_information(block_number) VALUES ($block_number) -|}] - in - let> count = - match !block_count_pool_stats with - | None -> ( - let> r = get_latest_block_number_transfer_stored () in - match r with - | None -> Lwt.return 0. - | Some value -> Lwt.return @@ Int64.to_float value) - | Some block_count_stats_tmp -> Lwt.return @@ (1. +. block_count_stats_tmp) - in - block_count_transfer_stats := Some count ; - let _ = Statistics.set_or_update_gauge block_count_transfer_gauge_name count in - Lwt.return_unit + Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> + [%pgsql + dbh + "INSERT INTO transfer_store_information(block_number) \ + VALUES($block_number)"] diff --git a/src/ethereum_indexer/eth_db_psql_sourcify/eth_db_psql_sourcify.ml b/src/ethereum_indexer/eth_db_psql_sourcify/eth_db_psql_sourcify.ml index 706af231..626771fb 100644 --- a/src/ethereum_indexer/eth_db_psql_sourcify/eth_db_psql_sourcify.ml +++ b/src/ethereum_indexer/eth_db_psql_sourcify/eth_db_psql_sourcify.ml @@ -383,10 +383,8 @@ ON sourcify_matches (verified_contract_id); }] let get_contract_abi ?dbh ~contract_address () = - Log.log_func_lwt ~category:"fetch_db" "get_contract_abi" - (contract_address :> string) - @@ fun () -> - use "get_contract_abi" dbh @@ fun dbh -> + Log.log_func_lwt __FUNCTION__ (contract_address :> string) @@ fun () -> + use __FUNCTION__ dbh @@ fun dbh -> let> metadata_l = [%pgsql dbh diff --git a/src/ethereum_indexer/eth_stats.ml b/src/ethereum_indexer/eth_stats.ml index 6f70ef09..e765a661 100644 --- a/src/ethereum_indexer/eth_stats.ml +++ b/src/ethereum_indexer/eth_stats.ml @@ -93,13 +93,9 @@ let add_to_mtrace operation_decode traces_stats signature_id description tx_hash eth_transfer_operation_total_gas_used ) let stats_traces_decode traces_decode = - Log.log_func ~category:"stats" "stats_traces_decode" - (Format.sprintf "%d" @@ List.length traces_decode) - @@ fun () -> let rec state_trace_decode traces_decode (tx_hash : b) (traces_stats : stat_sub_operation MTRACE.t) eth_transfer_operation_number eth_transfer_operation_total_gas_used = - Log.log_func "state_trace_decode" (tx_hash :> string) @@ fun () -> let ( traces_stats, eth_transfer_operation_number, eth_transfer_operation_total_gas_used ) = @@ -236,9 +232,6 @@ let stats_event (receipts : transaction_receipt_decode list) = MEVENT.fold (fun _ v acc -> v :: acc) events_stats_map [] let stats_of_block block receipts traces = - Log.log_func ~category:"stats" "stats_of_block" - (Format.sprintf "%d" block.number) - @@ fun () -> if block.gas_used = 0 then Lwt.return { -- GitLab From 2f168151477a275e4e633e36af6e30271699105a Mon Sep 17 00:00:00 2001 From: hamid Date: Mon, 29 Sep 2025 17:28:59 +0200 Subject: [PATCH 03/10] [Statistics] Add statistics server --- src/api/api_server_db.ml | 36 +- src/api/api_server_node.ml | 20 - .../btc_main_real_time_store.ml | 17 +- .../btc_main_real_time_store_stats.ml | 15 +- src/common/common.ml | 1 - src/common/common.mli | 3 - src/common/dune | 11 +- src/common/statistics.ml | 348 ------------------ src/common/statistics.mli | 48 --- src/common/types.ml | 25 +- src/ethereum_scripts/eth_main_store_lib.ml | 24 +- 11 files changed, 28 insertions(+), 520 deletions(-) delete mode 100644 src/common/statistics.ml delete mode 100644 src/common/statistics.mli diff --git a/src/api/api_server_db.ml b/src/api/api_server_db.ml index e69088b2..04847620 100644 --- a/src/api/api_server_db.ml +++ b/src/api/api_server_db.ml @@ -1,6 +1,4 @@ -open Lwt open Common.Types.Api -open Eth module Log = Common.Log module Handlers = Api_handlers_db @@ -12,31 +10,11 @@ let () = let arg = parse_command_db () in let _ = Log.set_verbose (Option.value ~default:Nothing arg.verbose) in let _ = Api_common.set_sourcify_base_url arg.sourcify_base_url in - let config_stat = - match arg.statistics with - | Some config_file -> - let config_s = - Common.Tools.destruct_json config_file Common.Types.statistic_config_enc - in - Some config_s - | None -> None in - let s () = - match config_stat with - | Some config_stat -> - Common.Statistics.run_statistic config_stat >>= fun s -> Lwt.return s - | None -> fst @@ Lwt.wait () in Lwt_main.run - @@ - let> _ = - match config_stat with - | Some config_stat -> - Common.Statistics.run_prometheus_and_grafana config_stat - | None -> Lwt.return_unit in - Lwt.pick - [ - Handlers.update_cache_eth_db (); - Handlers.update_cache_analyses_week (); - Handlers.update_cache_btc_db (); - s (); - [%server { dir = Handlers.ppx_dir; port = arg.port }]; - ] + @@ Lwt.pick + [ + Handlers.update_cache_eth_db (); + Handlers.update_cache_analyses_week (); + Handlers.update_cache_btc_db (); + [%server { dir = Handlers.ppx_dir; port = arg.port }]; + ] diff --git a/src/api/api_server_node.ml b/src/api/api_server_node.ml index cd8c6021..2bf067cb 100644 --- a/src/api/api_server_node.ml +++ b/src/api/api_server_node.ml @@ -1,4 +1,3 @@ -open Lwt open Common.Types.Api open Eth module Log = Common.Log @@ -18,14 +17,6 @@ let () = Common.Tools.destruct_json arg.config_bitcoin Common.Types.Bitcoin_indexer.config_node_enc in let _ = Node_btc.init config_btc in - let config_stat = - match arg.statistics with - | Some config_file -> - let config_s = - Common.Tools.destruct_json config_file Common.Types.statistic_config_enc - in - Some config_s - | None -> None in Lwt_main.run @@ let config_eth = @@ -38,20 +29,9 @@ let () = Log.log_error_fail ~here:[%here] @@ Format.sprintf "Connection error to %s" config_eth.cn_base_node | Ok _ -> () in - let> _ = - match config_stat with - | Some config_stat -> - Common.Statistics.run_prometheus_and_grafana config_stat - | None -> Lwt.return_unit in - let s () = - match config_stat with - | Some config_stat -> - Common.Statistics.run_statistic config_stat >>= fun s -> Lwt.return s - | None -> fst @@ Lwt.wait () in Lwt.pick [ Handlers.update_cache_eth_node (); Handlers.update_cache_btc_node (); - s (); [%server { dir = Handlers.ppx_dir; port = arg.port }]; ] diff --git a/src/bitcoin_scripts/btc_main_real_time_store.ml b/src/bitcoin_scripts/btc_main_real_time_store.ml index f9992ba9..af4d5368 100644 --- a/src/bitcoin_scripts/btc_main_real_time_store.ml +++ b/src/bitcoin_scripts/btc_main_real_time_store.ml @@ -15,7 +15,7 @@ type command = { }|}] [@req] verbose : Common.Types.verbose option; [@conv verbose_of_string] - statistics : string option; + statistics_port : int option; verbose_file : string option; } [@@deriving arg { exe = "main_real_time_store.exe" }] @@ -75,20 +75,7 @@ let main command = let _ = Log.set_verbose (Option.value ~default:Nothing command.verbose) in let _ = Option.map Log.set_and_open_file command.verbose_file in let _ = Node.init config in - let config_stat = - match command.statistics with - | Some config_file -> - Some (Tools.destruct_json config_file Common.Types.statistic_config_enc) - | None -> None in - let> _ = - match config_stat with - | Some config -> Common.Statistics.run_prometheus_and_grafana config - | None -> Lwt.return_unit in - let _ = - match config_stat with - | Some config -> Common.Statistics.run_statistic config - | None -> Lwt.return_unit in - if Common.Handlers.is_execution_stopped () then + if Common.Handlers.is_execution_stopped () then Lwt.return_unit else let _ = diff --git a/src/bitcoin_scripts/btc_main_real_time_store_stats.ml b/src/bitcoin_scripts/btc_main_real_time_store_stats.ml index 1ab6aae0..88282130 100644 --- a/src/bitcoin_scripts/btc_main_real_time_store_stats.ml +++ b/src/bitcoin_scripts/btc_main_real_time_store_stats.ml @@ -15,7 +15,7 @@ type command = { }|}] [@req] verbose : Common.Types.verbose option; [@conv verbose_of_string] - statistics : string option; + statistics_port : int option; verbose_file : string option; } [@@deriving arg { exe = "main_real_time_store.exe" }] @@ -68,19 +68,6 @@ let main command = let _ = Log.set_verbose (Option.value ~default:Nothing command.verbose) in let _ = Option.map Log.set_and_open_file command.verbose_file in let _ = Node.init config in - let config_stat = - match command.statistics with - | Some config_file -> - Some (Tools.destruct_json config_file Common.Types.statistic_config_enc) - | None -> None in - let> _ = - match config_stat with - | Some config -> Common.Statistics.run_prometheus_and_grafana config - | None -> Lwt.return_unit in - let _ = - match config_stat with - | Some config -> Common.Statistics.run_statistic config - | None -> Lwt.return_unit in if Common.Handlers.is_execution_stopped () then Lwt.return_unit else diff --git a/src/common/common.ml b/src/common/common.ml index f9ef0db8..abb8e231 100644 --- a/src/common/common.ml +++ b/src/common/common.ml @@ -1,7 +1,6 @@ module Tools = Tools module Types = Types module Handlers = Ctrl_handlers -module Statistics = Statistics module Log = Log module Pool = Pool module Env = Env diff --git a/src/common/common.mli b/src/common/common.mli index 52769b63..10dd64e9 100644 --- a/src/common/common.mli +++ b/src/common/common.mli @@ -10,9 +10,6 @@ module Types = Types (** Controller handlers for HTTP/WebSocket APIs. *) module Handlers = Ctrl_handlers -(** Statistics computation and retrieval. *) -module Statistics = Statistics - (** Logging utilities. *) module Log = Log diff --git a/src/common/dune b/src/common/dune index d5de3bbb..3c671e1d 100644 --- a/src/common/dune +++ b/src/common/dune @@ -1,6 +1,6 @@ (library (name common) - (modules common cache ctrl_handlers tools types statistics log pool env) + (modules common cache ctrl_handlers tools types log pool env) (preprocess (pps ppx_deriving_arg @@ -9,11 +9,4 @@ ez_api.ppx_req pgorm ppx_here)) - (libraries - ez_pgocaml.lwt - cohttp-lwt-unix - efunc - bfunc - prometheus - prometheus-app - olympus)) + (libraries ez_pgocaml.lwt cohttp-lwt-unix efunc bfunc olympus)) diff --git a/src/common/statistics.ml b/src/common/statistics.ml deleted file mode 100644 index c6d133ea..00000000 --- a/src/common/statistics.ml +++ /dev/null @@ -1,348 +0,0 @@ -open Eth -open Lwt -open Prometheus -module Gauges = Map.Make (String) -module Gauges_value = Map.Make (String) - -let docker_compose_file_name dir_name = - Filename.concat dir_name "docker-compose.yml" - -let prometheus_config_file_name dir_name = - Filename.concat dir_name "prometheus.yml" - -let provisioning_dir_name dir_name = Filename.concat dir_name "provisioning" - -let dashboards_dir_name provisioning_dir_name = - Filename.concat provisioning_dir_name "dashboards" - -let dashboards_file_name dashboards_dir_name = - Filename.concat dashboards_dir_name "dashboards.yaml" - -let system_metrics_file_name dashboards_dir_name = - Filename.concat dashboards_dir_name "system_metrics.json" - -let datasources_dir_name provisioning_dir_name = - Filename.concat provisioning_dir_name "datasources" - -let datasources_file_name datasources_dir_name = - Filename.concat datasources_dir_name "datasources.yaml" - -let docker_compose_file_content (config : Types.statistic_config) = - Format.sprintf - {| -name : %s -services: - prometheus: - image: prom/prometheus:latest - container_name: %s - volumes: - - ./prometheus.yml:/etc/prometheus/prometheus.yml - ports: - - "%d:9090" - restart: always - healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost:9090/-/healthy || exit 1"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 10s - networks: - - monitoring - - grafana: - image: grafana/grafana:latest - container_name: %s - environment: - - GF_SECURITY_ADMIN_PASSWORD=admin - - GF_AUTH_ANONYMOUS_ENABLED=true - - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org. - - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin - ports: - - "%d:3000" - volumes: - - grafana-storage:/var/lib/grafana - - ./provisioning/dashboards:/etc/grafana/provisioning/dashboards - - ./provisioning/datasources:/etc/grafana/provisioning/datasources - restart: always - healthcheck: - test: ["CMD-SHELL", "wget -qO- http://localhost:3000/api/health || exit 1"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 10s - networks: - - monitoring - -networks: - monitoring: - name: %s - driver: bridge - -volumes: - grafana-storage: - - |} - config.sc_docker_compose_name config.sc_prometheus_container_name - config.sc_prometheus_port config.sc_grafana_container_name - config.sc_grafana_port config.sc_network_name - -let system_metrics_content = - {| -{ - "id": null, - "editable": true, - "uid": "system-metrics", - "title": "System Metrics", - "tags": [], - "timezone": "browser", - "schemaVersion": 16, - "version": 0, - "refresh": "5s", - "templating": { - "list": [ - { - "type": "query", - "datasource": "Prometheus", - "name": "metric_name", - "label": "Metrics", - "query": "label_values(__name__)", - "includeAll": true, - "multi": true, - "refresh": 1, - "default": "up" - } - ] - }, - "panels": [ - { - "type": "graph", - "title": "$metric_name", - "targets": [ - { - "expr": "$metric_name", - "refId": "A" - } - ], - "lines": true, - "linewidth": 2, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 0 - }, - "repeat": "metric_name", - "repeatDirection": "h", - "maxPerRow": 2, - "options": { - "legend": { - "calcs": [ - "last", - "min", - "max", - "mean" - ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - } - } - } - ] -} - -|} - -let datasources_content = - {| -apiVersion: 1 -datasources: - - name: Prometheus - type: prometheus - access: proxy - url: http://prometheus:9090 - isDefault: true - editable: false -|} - -let dashboards_content = - {| -apiVersion: 1 -providers: - - name: 'default' - orgId: 1 - folder: '' - type: file - options: - path: /etc/grafana/provisioning/dashboards - homeDashboardUid: 'system-metrics' - updateIntervalSeconds: 10 -|} - -let prometheus_config (config : Types.statistic_config) = - Format.sprintf - {| -global: - scrape_interval: 5s - -scrape_configs: - - job_name: 'rust-metrics' - static_configs: - - targets: - - 'host.docker.internal:%d' - - '172.17.0.1:%d' - - job_name: 'prometheus' - static_configs: - - targets: ['prometheus:9090'] -|} - config.sc_prometheus_internal_api_port - config.sc_prometheus_internal_api_port - -let gauges = ref Gauges.empty - -let gauges_value_reset = ref Gauges_value.empty - -let gauges_value = ref Gauges_value.empty - -let statistics = ref false - -let registry = CollectorRegistry.create () - -let v_labels_gauge = - Gauge.v_labels ~label_names:[] ~help:"Average of execution time" ~registry - -let v_gauge name = v_labels_gauge name - -let set_or_update_gauge gauge_id value = - if !statistics then - match Gauges.find_opt gauge_id !gauges with - | None -> - let gauge = v_gauge gauge_id in - gauges := Gauges.add gauge_id gauge !gauges ; - gauges_value := Gauges_value.add gauge_id value !gauges_value - | Some _ -> gauges_value := Gauges_value.add gauge_id value !gauges_value - -let set_or_update_gauge_add_and_reset gauge_id value = - if !statistics then - match Gauges.find_opt gauge_id !gauges with - | None -> - let gauge = v_gauge gauge_id in - gauges := Gauges.add gauge_id gauge !gauges ; - gauges_value_reset := Gauges_value.add gauge_id value !gauges_value_reset - | Some _ -> - gauges_value_reset := Gauges_value.add gauge_id value !gauges_value_reset - -let update_gauges () = - Gauges_value.iter - (fun key value -> - let gauge_family = Gauges.find key !gauges in - let gauge = Gauge.labels gauge_family [] in - gauges_value_reset := Gauges_value.add key 0.0 !gauges_value_reset ; - Gauge.set gauge value) - !gauges_value_reset ; - Gauges_value.iter - (fun key value -> - let gauge_family = Gauges.find key !gauges in - let gauge = Gauge.labels gauge_family [] in - Gauge.set gauge value) - !gauges_value - -let generate_files (config : Types.statistic_config) = - let mkdir_p dir_name = try Unix.mkdir dir_name 0o755 with _ -> () in - let write_in_file file_name content = - let ch_out = open_out file_name in - let formater = Format.formatter_of_out_channel ch_out in - Format.fprintf formater "%s" content ; - close_out ch_out in - let provisioning_dir_name = provisioning_dir_name config.sc_dir_name in - let datasources_dir_name = datasources_dir_name provisioning_dir_name in - let dashboards_dir_name = dashboards_dir_name provisioning_dir_name in - let docker_compose_file_name = docker_compose_file_name config.sc_dir_name in - let prometheus_config_file_name = - prometheus_config_file_name config.sc_dir_name in - let dashboards_file_name = dashboards_file_name dashboards_dir_name in - let system_metrics_file_name = system_metrics_file_name dashboards_dir_name in - let datasources_file_name = datasources_file_name datasources_dir_name in - - let _ = mkdir_p config.sc_dir_name in - let _ = mkdir_p provisioning_dir_name in - let _ = mkdir_p datasources_dir_name in - let _ = mkdir_p dashboards_dir_name in - write_in_file docker_compose_file_name (docker_compose_file_content config) ; - write_in_file prometheus_config_file_name (prometheus_config config) ; - write_in_file dashboards_file_name dashboards_content ; - write_in_file system_metrics_file_name system_metrics_content ; - write_in_file datasources_file_name datasources_content - -let run_and_wait_docker_compose (config : Types.statistic_config) = - let wait_time = ref 300 in - let rec health_check docker_container = - if Ctrl_handlers.is_execution_stopped () then - Lwt.return_unit - else if !wait_time <= 0 then - Lwt.fail_with "Timeout statistics health check " - else - let command_health = - Format.sprintf - {|cd %s;docker ps --filter "name=%s" --filter "health=healthy" --format "{{.Names}}" | wc -l|} - config.sc_dir_name docker_container in - let result = Tools.exec_command_wait_stdout command_health in - let result = String.trim result in - if String.equal "1" result then - Lwt.return - @@ Format.printf "Grafana started : http://localhost:%d@." - config.sc_grafana_port - else ( - Format.printf - "Wait for prometheus and grafana health check %d seconds@." - !wait_time ; - Lwt_unix.sleep 1. >>= fun _ -> - wait_time := !wait_time - 1 ; - health_check docker_container - ) in - let command = - Format.sprintf "cd %s; docker compose up -d 2> /dev/null" config.sc_dir_name - in - if Sys.command command = 0 then - let> _ = health_check config.sc_prometheus_container_name in - health_check config.sc_grafana_container_name - else - Lwt.return_unit - -let run_prometheus_and_grafana (config : Types.statistic_config) = - let docker_down_command = - Format.sprintf "cd %s; docker compose down" config.sc_dir_name in - let handler_sigint _x = - ignore @@ Sys.command docker_down_command ; - Ctrl_handlers.set_stop_execution true in - let _ = Ctrl_handlers.add_handler_sigint (fun x -> handler_sigint x) in - let _ = at_exit (fun () -> ignore @@ Sys.command docker_down_command) in - let _ = generate_files config in - run_and_wait_docker_compose config - -let metric_server (statistic_conf : Types.statistic_config) = - let callback _conn req _body = - match Cohttp.Request.uri req |> Uri.path with - | "/metrics" -> - let _ = update_gauges () in - let> data = Prometheus.CollectorRegistry.(collect registry) in - let body = Fmt.to_to_string Prometheus_app.TextFormat_0_0_4.output data in - let headers = - Cohttp.Header.init_with "Content-Type" "text/plain; version=0.0.4" in - Lwt.return - ( Cohttp.Response.make ~status:`OK ~headers (), - Cohttp_lwt.Body.of_string body ) - | _ -> - Lwt.return - (Cohttp.Response.make ~status:`Not_found (), Cohttp_lwt.Body.empty) - in - if !statistics then - let config = `TCP (`Port statistic_conf.sc_prometheus_internal_api_port) in - let server = Cohttp_lwt_unix.Server.make ~callback () in - Cohttp_lwt_unix.Server.create ~mode:config server - else - Lwt.return_unit - -let run_statistic (statistic_conf : Types.statistic_config) = - statistics := true ; - metric_server statistic_conf diff --git a/src/common/statistics.mli b/src/common/statistics.mli deleted file mode 100644 index 6b336a8d..00000000 --- a/src/common/statistics.mli +++ /dev/null @@ -1,48 +0,0 @@ -(** Module type [Statistics_type] This module handles the generation and - management of Prometheus and Grafana instances using Docker Compose. It also - starts a CoHTTP server to expose custom metrics for Prometheus. *) - -module Gauges : sig - type key = string - - type 'a t = 'a Map.Make(String).t -end - -module Gauges_value : sig - type key = string - - type 'a t = 'a Gauges.t -end - -val set_or_update_gauge : Gauges_value.key -> float -> unit - -val set_or_update_gauge_add_and_reset : Gauges_value.key -> float -> unit - -(** [run_prometheus_and_grafana ()] initializes and manages system monitoring - with Prometheus and Grafana. - - This function performs the following steps: - - 1. **Configuration Generation**: - - Generates all necessary configuration files for Prometheus and Grafana, - including Docker Compose configuration. - - 2. **Container Management**: - - Starts the Docker Compose setup using the generated configurations. - - Checks the health of the containers (Prometheus and Grafana) with a - timeout of 300 seconds. - - 3. **Signal Handling**: - - Registers a handler for the SIGINT signal (Ctrl+C) to gracefully stop and - clean up Docker Compose containers when the application is interrupted. - - @return A Lwt thread *) -val run_prometheus_and_grafana : Types.statistic_config -> unit Lwt.t - -(** [run_statistic ()] Launches a CoHTTP server that exposes an endpoint to - serve application-specific metrics for Prometheus to scrape. - - @return - A Lwt thread that runs until the CoHTTP server is stopped or the SIGINT - signal is received. *) -val run_statistic : Types.statistic_config -> unit Lwt.t diff --git a/src/common/types.ml b/src/common/types.ml index 34633280..718839a3 100644 --- a/src/common/types.ml +++ b/src/common/types.ml @@ -14,18 +14,6 @@ type color = | Blue | Yellow -type statistic_config = { - sc_prometheus_container_name : string; - sc_prometheus_port : int; - sc_prometheus_internal_api_port : int; - sc_grafana_container_name : string; - sc_grafana_port : int; - sc_docker_compose_name : string; - sc_network_name : string; - sc_dir_name : string; -} -[@@deriving encoding { camel; remove_prefix = "sc_" }] - let verbose_of_string v_s = let v_s = String.lowercase_ascii v_s in match v_s with @@ -45,7 +33,7 @@ type command = { }|}] [@req] verbose : verbose option; [@conv verbose_of_string] - statistics : string option; + statistics_port : int option; decreasing : bool; verbose_file : string option; } @@ -61,6 +49,17 @@ let equal_bint (bint1 : bint) (bint2 : bint) = let equal_address (address1 : address) (address2 : address) = String.equal (address1 :> string) (address2 :> string) +module Statistics = struct + type gauge_data = { + gd_name : string; + gd_value : float; + } + [@@deriving encoding { camel; remove_prefix = "gd_" }] + + type statistic_config = { sc_port : int } + [@@deriving arg { exe = "statistics_api_server.exe" }] +end + module Ethereum_decode = struct type contract_information = { ci_address : address; diff --git a/src/ethereum_scripts/eth_main_store_lib.ml b/src/ethereum_scripts/eth_main_store_lib.ml index e1016459..64922f0d 100644 --- a/src/ethereum_scripts/eth_main_store_lib.ml +++ b/src/ethereum_scripts/eth_main_store_lib.ml @@ -3,25 +3,11 @@ open Common open Olympus.Types open Eth_db_psql_common -let run_prometheus config_stat = - match config_stat with - | Some config -> Statistics.run_statistic config - | None -> Lwt.return_unit - let init_config (command : Types.command) = let config = Tools.destruct_json command.config config_node_enc in let _ = Log.set_verbose (Option.value ~default:Nothing command.verbose) in let _ = Option.map Log.set_and_open_file command.verbose_file in let> set_node_result = Node.set_config config in - let config_stat = - match command.statistics with - | Some config_file -> - Some (Tools.destruct_json config_file Common.Types.statistic_config_enc) - | None -> None in - let> _ = - match config_stat with - | Some config -> Statistics.run_prometheus_and_grafana config - | None -> Lwt.return_unit in let _ = Handlers.add_handler_sigint (fun _x -> let _ = Option.map (fun _ -> Log.close_file ()) command.verbose_file in @@ -29,7 +15,7 @@ let init_config (command : Types.command) = match set_node_result with | Error e -> Log.log_error_lwt_fail ~here:[%here] @@ EzEncoding.construct error_enc e - | Ok _ -> Lwt.return config_stat + | Ok _ -> Lwt.return_unit let condition_to_wait lbs direction block_number_to_store = if direction < Int64.zero then @@ -79,7 +65,7 @@ let store_main command ?old:unit -> unit -> int64 option Lwt.t) store_func = - let> config_stat = init_config command in + let> _ = init_config command in if Handlers.is_execution_stopped () then Lwt.return_unit else @@ -110,7 +96,5 @@ let store_main command (Int64.to_int block_number) (Int64.to_int latest_block_stored) command.decreasing in - let result = - store_loop block_number latest_block_stored direction old get_final_block - store_func in - Lwt.join [run_prometheus config_stat; result] + store_loop block_number latest_block_stored direction old get_final_block + store_func -- GitLab From fdb44f56fe1ace65eb30b989cd015e7f44f9b809 Mon Sep 17 00:00:00 2001 From: hamid Date: Wed, 1 Oct 2025 09:38:05 +0200 Subject: [PATCH 04/10] [Statistics] Create an API proxy that expose one service for Argos to send metrics and on for Prometheus to retrieve metrcis --- src/statistics/dune | 32 +++++++++++ src/statistics/statistics_api.ml | 4 ++ src/statistics/statistics_client.ml | 8 +++ src/statistics/statistics_handlers.ml | 80 +++++++++++++++++++++++++++ src/statistics/statistics_services.ml | 26 +++++++++ 5 files changed, 150 insertions(+) create mode 100644 src/statistics/dune create mode 100644 src/statistics/statistics_api.ml create mode 100644 src/statistics/statistics_client.ml create mode 100644 src/statistics/statistics_handlers.ml create mode 100644 src/statistics/statistics_services.ml diff --git a/src/statistics/dune b/src/statistics/dune new file mode 100644 index 00000000..ca90543a --- /dev/null +++ b/src/statistics/dune @@ -0,0 +1,32 @@ +(library + (name statistics_services) + (modules statistics_services) + (preprocess + (pps ez_api.ppx_req)) + (libraries common)) + +(library + (name statistics_handlers) + (modules statistics_handlers) + (preprocess + (pps ez_api.ppx_server ppx_here)) + (libraries + cohttp-lwt-unix + prometheus + prometheus-app + common + statistics_services)) + +(library + (name statistics_client) + (modules statistics_client) + (preprocess + (pps ez_api.ppx_client ppx_here)) + (libraries statistics_services)) + +(executable + (name statistics_api) + (modules statistics_api) + (preprocess + (pps ez_api.ppx_server)) + (libraries statistics_handlers)) diff --git a/src/statistics/statistics_api.ml b/src/statistics/statistics_api.ml new file mode 100644 index 00000000..56f164a2 --- /dev/null +++ b/src/statistics/statistics_api.ml @@ -0,0 +1,4 @@ +let () = + Lwt_main.run + [%server + { dir = Statistics_handlers.ppx_dir; port = Statistics_services.api_port }] diff --git a/src/statistics/statistics_client.ml b/src/statistics/statistics_client.ml new file mode 100644 index 00000000..18865e52 --- /dev/null +++ b/src/statistics/statistics_client.ml @@ -0,0 +1,8 @@ +open Common.Types.Statistics + +let statistics_api_url = + EzAPI.BASE (Format.sprintf "http://localhost:%d" Statistics_services.api_port) + +let send_gauge_data data_key data_value = + let data = { gd_name = data_key; gd_value = data_value } in + Statistics_services.post_post_metrics ~input:[data] statistics_api_url diff --git a/src/statistics/statistics_handlers.ml b/src/statistics/statistics_handlers.ml new file mode 100644 index 00000000..cef5d1a2 --- /dev/null +++ b/src/statistics/statistics_handlers.ml @@ -0,0 +1,80 @@ +open Common +open Types.Statistics +open Prometheus +open Eth + +let registry = CollectorRegistry.create () + +let max_gauge = 20 + +let gauge_family_tbl = Hashtbl.create max_gauge + +let gauge_sum_tbl = Hashtbl.create max_gauge + +let mutex = Lwt_mutex.create () + +let metric_prefix = Format.sprintf "argos_%s" + +let metric_moy_prefix n = metric_prefix @@ Format.sprintf "moy_%s" n + +let v_labels_gauge = Gauge.v_labels ~label_names:[] ~help:"argos_" ~registry + +let v_gauge name = v_labels_gauge name + +let create_or_get_gauge_family key = + let gauge_family_opt = Hashtbl.find_opt gauge_family_tbl key in + let gauge_family = + match gauge_family_opt with + | None -> + let gauge = v_gauge key in + let _ = Hashtbl.add gauge_family_tbl key gauge in + gauge + | Some gauge_family -> gauge_family in + gauge_family + +let add_gauge_value key value = + let key_moy = metric_moy_prefix key in + let key = metric_prefix key in + Lwt_mutex.with_lock mutex @@ fun () -> + let gauge_family = create_or_get_gauge_family key in + let gauge = Gauge.labels gauge_family [] in + let _ = Gauge.set gauge value in + let gauge_sum_opt = Hashtbl.find_opt gauge_sum_tbl key_moy in + let _ = + match gauge_sum_opt with + | Some (sum, count) -> + Hashtbl.add gauge_sum_tbl key_moy (sum +. value, count + 1) + | None -> Hashtbl.add gauge_sum_tbl key_moy (value, 1) in + Lwt.return_unit + +let update_gauge_moy () = + Lwt_mutex.with_lock mutex (fun () -> + let _ = + Hashtbl.iter + (fun key (sum, count) -> + let gauge_family = create_or_get_gauge_family key in + let gauge = Gauge.labels gauge_family [] in + let _ = Gauge.set gauge (sum /. float_of_int count) in + ()) + gauge_sum_tbl in + let _ = Hashtbl.reset gauge_sum_tbl in + Lwt.return_unit) + +let get_metrics _ _ = + let> _ = update_gauge_moy () in + let> data = + Lwt_mutex.with_lock mutex @@ fun () -> + Prometheus.CollectorRegistry.(collect registry) in + let body = Fmt.to_to_string Prometheus_app.TextFormat_0_0_4.output data in + EzAPIServer.return_ok body +[@@service Statistics_services.get_metrics] + +let ping _ _ = EzAPIServer.return_ok "pong" [@@service Statistics_services.ping] + +let post_metrics _ (inputs : gauge_data list) = + Lwt.bind + (Lwt_list.iter_s + (fun data -> add_gauge_value data.gd_name data.gd_value) + inputs) + @@ EzAPIServer.return_ok +[@@service Statistics_services.post_metrics] diff --git a/src/statistics/statistics_services.ml b/src/statistics/statistics_services.ml new file mode 100644 index 00000000..9cd74945 --- /dev/null +++ b/src/statistics/statistics_services.ml @@ -0,0 +1,26 @@ +let api_port = 3005 + +let%get ping = + { + operationId = "ping"; + path = "/ping"; + name = "ping"; + output = Json_encoding.string; + } + +let%get get_metrics = + { + operationId = "get_metrics"; + path = "/metrics"; + name = "metrics"; + output = ["text/plain"]; + } + +let%post post_metrics = + { + operationId = "post_metrics"; + path = "/metrics"; + name = "metrics"; + output = Json_encoding.unit; + input = Json_encoding.list Common.Types.Statistics.gauge_data_enc; + } -- GitLab From 627aa72f38e8fa6d08d5529a2da2efcc0b010527 Mon Sep 17 00:00:00 2001 From: hamid Date: Thu, 2 Oct 2025 17:45:16 +0200 Subject: [PATCH 05/10] [Docker] Add and improve Dockerfiles that build and install deps of the project And add docker-compose file to build the dockers and push it localy --- .dockerignore | 36 +++++++++++++++++++++++++++++++++ Makefile | 18 ++++++++++------- docker/Dockerfile-build | 16 +++++++++++++++ docker/Dockerfile-runner | 9 ++++++--- docker/docker-compose.build.yml | 6 ++++++ docker/docker-compose.deps.yml | 6 ++++++ 6 files changed, 81 insertions(+), 10 deletions(-) create mode 100644 .dockerignore create mode 100644 docker/Dockerfile-build create mode 100644 docker/docker-compose.build.yml create mode 100644 docker/docker-compose.deps.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..6038994f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,36 @@ +_build +_opam +.vscode +bin +/db/ +config/ +statistics*/ +target/ +node_modules +build +dist +app-name/ +myenv +openapi.json +makefile.config +_pid +tsconfig.json +config +ethereum_event_hashes/dict/* +.env.el +.res.json +.envrc +.DS_Store +tmp/* +logs/* +pids/* +csv/* +plot/* +.transactions_erc1155 +.transactions_graph_cycles +.graph_debug +.transfer_debug +.local +doc/ocaml-doc +bin-v2 +logs-v2/* diff --git a/Makefile b/Makefile index 5e9cac8e..2c2d2328 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ -BIN=bin-v2 +BIN ?= bin FRONT_DIR=./src/frontend ETHEREUM_INDEXER_BIN_DIR=ethereum_scripts BITCOIN_INDEXER_BIN_DIR=bitcoin_scripts +STATISTICS_BIN_DIR=statistics API_BIN_DIR=api +TEST_BIN_DIR=test ETHEREUM_INDEXER_MONGODB_BIN=ethereum_indexer_mongodb BITCOIN_INDEXER_MONGODB_BIN=bitcoin_indexer_mongodb API_MONGODB_BIN=api_mongodb @@ -22,17 +24,17 @@ build: build-front build-rust build-ocaml create-bin: @mkdir -p $(BIN)/ - @mkdir -p $(BIN)/test + @mkdir -p $(BIN)/$(TEST_BIN_DIR) @mkdir -p $(BIN)/$(API_BIN_DIR)/ @mkdir -p $(BIN)/$(ETHEREUM_INDEXER_BIN_DIR)/ @mkdir -p $(BIN)/$(BITCOIN_INDEXER_BIN_DIR)/ - + @mkdir -p $(BIN)/$(STATISTICS_BIN_DIR)/ + @mkdir -p $(BIN)/frontend/ ENV_FILE ?= .env NPM_ENV_ARG := --env envFile=$(ENV_FILE) build-front: create-bin - @mkdir -p $(BIN)/frontend/ @$(FRONT_BUILD) run build -- $(NPM_ENV_ARG) @cp -rf dist $(BIN)/frontend/ @@ -47,8 +49,9 @@ build-ocaml: create-bin @cp -f _build/default/src/$(API_BIN_DIR)/*.exe ./$(BIN)/$(API_BIN_DIR)/ @cp -f _build/default/src/$(ETHEREUM_INDEXER_BIN_DIR)/*.exe ./$(BIN)/$(ETHEREUM_INDEXER_BIN_DIR)/ @cp -f _build/default/src/$(BITCOIN_INDEXER_BIN_DIR)/*.exe ./$(BIN)/$(BITCOIN_INDEXER_BIN_DIR)/ - @cp -f _build/default/test/*/*.exe ./$(BIN)/test/ - @cp -f _build/default/debug/graph/debug_graph.exe $(BIN)/ethereum_scripts/ + @cp -f _build/default/test/*/*.exe ./$(BIN)/$(TEST_BIN_DIR)/ + @cp -f _build/default/debug/graph/debug_graph.exe $(BIN)/$(ETHEREUM_INDEXER_BIN_DIR)/ + @cp -f _build/default/src/$(STATISTICS_BIN_DIR)/*.exe ./$(BIN)/$(STATISTICS_BIN_DIR)/ clean: @$(OCAML_BUILD) clean @@ -60,7 +63,8 @@ test: build-ocaml @. $(CURDIR)/$(SCRIPTS_DIR)/export-project-dir.sh; $(CURDIR)/$(SCRIPTS_DIR)/unittest/run-analyses-test.sh install-front-deps: - @$(FRONT_BUILD) install --legacy-peer-deps + @$(FRONT_BUILD) config set legacy-peer-deps true + @$(FRONT_BUILD) ci install-ocaml-deps: @$(SCRIPTS_DIR)/install-deps.sh diff --git a/docker/Dockerfile-build b/docker/Dockerfile-build new file mode 100644 index 00000000..036efc7b --- /dev/null +++ b/docker/Dockerfile-build @@ -0,0 +1,16 @@ +FROM argos-deps:local AS builder + +COPY --chown=functori . ./argos +WORKDIR ./argos + +RUN mkdir -p data \ + && $(pg_config --bindir)/pg_ctl init -D data \ + && $(pg_config --bindir)/pg_ctl -s start -D data \ + && eval "$(opam env)" \ + && createdb functori \ + && ENV=bin make build \ + && mv bin .. + +WORKDIR .. +RUN rm -rf argos + diff --git a/docker/Dockerfile-runner b/docker/Dockerfile-runner index 6d23099e..e61b5e0a 100644 --- a/docker/Dockerfile-runner +++ b/docker/Dockerfile-runner @@ -20,12 +20,15 @@ SHELL ["/bin/bash", "-c"] RUN source /home/functori/.profile SHELL ["/bin/sh", "-c"] -RUN NODE_PATH=$(npm root -g) && echo "NODE_PATH=$NODE_PATH" &&\ +ENV NODE_ENV=development +RUN npm config set prefix "$HOME/.local" &&\ +NODE_PATH=$(npm root -g) && echo "NODE_PATH=$NODE_PATH" &&\ make install-front-deps && cp -rf ./node_modules/* $NODE_PATH &&\ npm install -g --legacy-peer-deps react react-dom @types/react @types/react-dom && \ npm install -g webpack webpack-cli html-webpack-plugin --legacy-peer-deps && \ -npm install -g --legacy-peer-deps @mui/system react react-router-dom @types/node ethers &&\ -opam switch create --no-install ocaml-system && \ +npm install -g --legacy-peer-deps @mui/system react react-router-dom @types/node ethers + +RUN opam switch create --no-install ocaml-system && \ eval $(opam env) && \ opam update && \ make install-ocaml-deps && \ diff --git a/docker/docker-compose.build.yml b/docker/docker-compose.build.yml new file mode 100644 index 00000000..2b9bd875 --- /dev/null +++ b/docker/docker-compose.build.yml @@ -0,0 +1,6 @@ +services: + builder: + build: + context: .. + dockerfile: ./docker/Dockerfile-build + image: registry.local/argos-builder:latest diff --git a/docker/docker-compose.deps.yml b/docker/docker-compose.deps.yml new file mode 100644 index 00000000..914b088b --- /dev/null +++ b/docker/docker-compose.deps.yml @@ -0,0 +1,6 @@ +services: + deps: + build: + context: .. + dockerfile: ./docker/Dockerfile-runner + image: registry.local/argos-deps:latest -- GitLab From d4b6e04fbb54576eb0065ea4d1779fa459f4157d Mon Sep 17 00:00:00 2001 From: hamid Date: Thu, 2 Oct 2025 18:17:02 +0200 Subject: [PATCH 06/10] [Statistics] Run prometheus, alertmanager, statistics argos api and grafana using docker-compose --- statistics/alertmanager.yml | 20 ++ statistics/docker-compose.yml | 95 ++++++ statistics/prometheus.yml | 27 ++ .../dashboards/argos-metrics.json | 277 ++++++++++++++++++ .../provisioning/dashboards/dashboards.yaml | 10 + .../dashboards/system_metrics.json | 98 +++++++ .../provisioning/datasources/datasources.yaml | 9 + statistics/system_alerts.yml | 73 +++++ 8 files changed, 609 insertions(+) create mode 100644 statistics/alertmanager.yml create mode 100644 statistics/docker-compose.yml create mode 100644 statistics/prometheus.yml create mode 100644 statistics/provisioning/dashboards/argos-metrics.json create mode 100644 statistics/provisioning/dashboards/dashboards.yaml create mode 100644 statistics/provisioning/dashboards/system_metrics.json create mode 100644 statistics/provisioning/datasources/datasources.yaml create mode 100644 statistics/system_alerts.yml diff --git a/statistics/alertmanager.yml b/statistics/alertmanager.yml new file mode 100644 index 00000000..0c6a6325 --- /dev/null +++ b/statistics/alertmanager.yml @@ -0,0 +1,20 @@ +global: + slack_api_url_file: '/etc/alertmanager/slack_url' + +route: + receiver: slack + + group_by: ['alertname', 'instance', '__name__'] + group_wait: 0s + group_interval: 1s + repeat_interval: 1s + +receivers: +- name: slack + slack_configs: + - channel: '#alert' + send_resolved: false + text: | + {{- range .Alerts }} + [{{ toUpper .Labels.severity }}] [{{ .StartsAt.Format "2006-01-02 15:04:05" }}] [{{ .Labels.__name__ }}] [{{ .Labels.instance }}] {{ .Annotations.summary }} – {{ .Annotations.description }} + {{- end }} diff --git a/statistics/docker-compose.yml b/statistics/docker-compose.yml new file mode 100644 index 00000000..a68cbc08 --- /dev/null +++ b/statistics/docker-compose.yml @@ -0,0 +1,95 @@ +services: + node_exporter: + image: prom/node-exporter:latest + container_name: node_exporter + command: + - '--path.rootfs=/host' + - '--collector.filesystem.ignored-mount-points="^/(sys|proc|dev|host|etc)($|/)"' + volumes: + - /:/host:ro + ports: + - "9100:9100" + restart: always + networks: + - monitoring + + prometheus: + image: prom/prometheus:latest + container_name: prometheus + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro + - ./system_alerts.yml:/etc/prometheus/rules/system_alerts.yml:ro + ports: + - "9096:9090" + restart: always + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://localhost:9090/-/healthy || exit 1"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + networks: + - monitoring + depends_on: + - node_exporter + - statistics_api + + alertmanager: + image: prom/alertmanager:latest + container_name: alertmanager + ports: + - "9093:9093" + volumes: + - ./alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro + - ./slack_url:/etc/alertmanager/slack_url:ro + restart: always + networks: + - monitoring + depends_on: + - prometheus + + grafana: + image: grafana/grafana:latest + container_name: grafana + env_file: ./grafana.env + ports: + - "3006:3000" + volumes: + - grafana-storage:/var/lib/grafana + - ./provisioning/dashboards:/etc/grafana/provisioning/dashboards + - ./provisioning/datasources:/etc/grafana/provisioning/datasources + restart: always + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://localhost:3000/api/health || exit 1"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + networks: + - monitoring + depends_on: + - prometheus + + statistics_api: + container_name: statistics_api + image: registry.local/argos-builder:latest + ports: + - "3005:3005" + entrypoint: ["bin/statistics/statistics_api.exe"] + restart: always + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://localhost:3005/ping || exit 1"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + networks: + - monitoring + +networks: + monitoring: + name: argos_monitoring + driver: bridge + +volumes: + grafana-storage: diff --git a/statistics/prometheus.yml b/statistics/prometheus.yml new file mode 100644 index 00000000..feaa0a49 --- /dev/null +++ b/statistics/prometheus.yml @@ -0,0 +1,27 @@ +# prometheus.yml +global: + scrape_interval: 5s + evaluation_interval: 5s + +rule_files: + - 'rules/system_alerts.yml' + +alerting: + alertmanagers: + - static_configs: + - targets: + - 'alertmanager:9093' + +scrape_configs: + - job_name: 'node_exporter' + static_configs: + - targets: ['node_exporter:9100'] + + - job_name: 'prometheus' + static_configs: + - targets: ['prometheus:9090'] + + - job_name: 'statistics_api' + metrics_path: /metrics + static_configs: + - targets: ['statistics_api:3005'] diff --git a/statistics/provisioning/dashboards/argos-metrics.json b/statistics/provisioning/dashboards/argos-metrics.json new file mode 100644 index 00000000..af19c2df --- /dev/null +++ b/statistics/provisioning/dashboards/argos-metrics.json @@ -0,0 +1,277 @@ +{ + "id": null, + "uid": "argos-metrics", + "title": "Argos Profiling & System Consumption", + "schemaVersion": 16, + "version": 7, + "refresh": "5s", + "timezone": "browser", + "templating": { + "list": [ + { + "type": "query", + "datasource": "Prometheus", + "name": "metric_name", + "label": "Argos Metrics", + "query": "label_values({__name__=~\"argos_.*\"}, __name__)", + "includeAll": true, + "multi": true, + "refresh": 1, + "allValue": "{__name__=~\"argos_.*\"}", + "default": ["__all"] + }, + { + "type": "query", + "datasource": "Prometheus", + "name": "disk", + "label": "Select Disk", + "query": "label_values(node_filesystem_size_bytes{fstype!~\"tmpfs|aufs|overlay\"}, mountpoint)", + "includeAll": false, + "multi": false, + "refresh": 1, + "default": [] + } + ] + }, + "panels": [ + { + "type": "row", + "title": "System Overview", + "gridPos": { "x": 0, "y": 0, "w": 24, "h": 1 }, + "collapsed": false + }, + { + "type": "piechart", + "title": "Memory Usage (Current)", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)", + "legendFormat": "Used", + "refId": "A" + }, + { + "expr": "100 * node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes", + "legendFormat": "Free", + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { "unit": "percent", "min": 0, "max": 100 } + }, + "options": { + "pieType": "pie", + "legend": { "displayMode": "list", "placement": "bottom" } + }, + "gridPos": { "x": 0, "y": 1, "w": 12, "h": 7 } + }, + { + "type": "graph", + "title": "Memory Usage Over Time", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)", + "refId": "A" + } + ], + "options": { + "showAxes": true, + "showLegend": true, + "tooltip": { "show": true, "mode": "single" } + }, + "xaxis": { "show": true, "mode": "time" }, + "yaxes": [ + { "format": "percent", "min": 0, "max": 100, "show": true }, + { "show": false } + ], + "lines": true, + "linewidth": 2, + "gridPos": { "x": 12, "y": 1, "w": 12, "h": 7 } + }, + { + "type": "piechart", + "title": "CPU Usage (Current)", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * sum(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])) / sum(rate(node_cpu_seconds_total[5m]))", + "legendFormat": "Active", + "refId": "A" + }, + { + "expr": "100 * sum(rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) / sum(rate(node_cpu_seconds_total[5m]))", + "legendFormat": "Idle", + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { "unit": "percent", "min": 0, "max": 100 } + }, + "options": { + "pieType": "pie", + "legend": { "displayMode": "list", "placement": "bottom" } + }, + "gridPos": { "x": 0, "y": 8, "w": 12, "h": 7 } + }, + { + "type": "graph", + "title": "CPU Usage Over Time", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * sum(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])) / sum(rate(node_cpu_seconds_total[5m]))", + "refId": "A" + } + ], + "options": { + "showAxes": true, + "showLegend": true, + "tooltip": { "show": true, "mode": "single" } + }, + "xaxis": { "show": true, "mode": "time" }, + "yaxes": [ + { "format": "percent", "min": 0, "max": 100, "show": true }, + { "show": false } + ], + "lines": true, + "linewidth": 2, + "gridPos": { "x": 12, "y": 8, "w": 12, "h": 7 } + }, + { + "type": "piechart", + "title": "Swap Usage (Current)", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * (node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes) / node_memory_SwapTotal_bytes", + "legendFormat": "Used", + "refId": "A" + }, + { + "expr": "100 * node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes", + "legendFormat": "Free", + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { "unit": "percent", "min": 0, "max": 100 } + }, + "options": { + "pieType": "pie", + "legend": { "displayMode": "list", "placement": "bottom" } + }, + "gridPos": { "x": 0, "y": 15, "w": 12, "h": 7 } + }, + { + "type": "graph", + "title": "Swap Usage Over Time", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * (node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes) / node_memory_SwapTotal_bytes", + "refId": "A" + } + ], + "options": { + "showAxes": true, + "showLegend": true, + "tooltip": { "show": true, "mode": "single" } + }, + "xaxis": { "show": true, "mode": "time" }, + "yaxes": [ + { "format": "percent", "min": 0, "max": 100, "show": true }, + { "show": false } + ], + "lines": true, + "linewidth": 2, + "gridPos": { "x": 12, "y": 15, "w": 12, "h": 7 } + }, + { + "type": "row", + "title": "Disk Consumption", + "gridPos": { "x": 0, "y": 22, "w": 24, "h": 1 }, + "collapsed": false + }, + { + "type": "piechart", + "title": "$disk Usage (Current)", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * (1 - node_filesystem_free_bytes{mountpoint=\"$disk\"} / node_filesystem_size_bytes{mountpoint=\"$disk\"})", + "legendFormat": "Used", + "refId": "A" + }, + { + "expr": "100 * node_filesystem_free_bytes{mountpoint=\"$disk\"} / node_filesystem_size_bytes{mountpoint=\"$disk\"}", + "legendFormat": "Free", + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { "unit": "percent", "min": 0, "max": 100 } + }, + "options": { + "pieType": "pie", + "legend": { "displayMode": "list", "placement": "bottom" } + }, + "gridPos": { "x": 0, "y": 23, "w": 12, "h": 7 } + }, + { + "type": "graph", + "title": "$disk Usage Over Time", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * (1 - node_filesystem_free_bytes{mountpoint=\"$disk\"} / node_filesystem_size_bytes{mountpoint=\"$disk\"})", + "legendFormat": "$disk", + "refId": "A" + } + ], + "options": { + "showAxes": true, + "showLegend": true, + "tooltip": { "show": true, "mode": "single" } + }, + "xaxis": { "show": true, "mode": "time" }, + "yaxes": [ + { "format": "percent", "min": 0, "max": 100, "show": true }, + { "show": false } + ], + "lines": true, + "linewidth": 2, + "gridPos": { "x": 12, "y": 23, "w": 12, "h": 7 } + }, + { + "type": "row", + "title": "Argos Metrics", + "gridPos": { "x": 0, "y": 30, "w": 24, "h": 1 }, + "collapsed": false + }, + { + "type": "graph", + "title": "$metric_name", + "datasource": "Prometheus", + "targets": [{ "expr": "$metric_name", "refId": "A" }], + "lines": true, + "linewidth": 2, + "gridPos": { "x": 0, "y": 31, "w": 12, "h": 7 }, + "repeat": "metric_name", + "repeatDirection": "h", + "maxPerRow": 2, + "fieldConfig": { + "defaults": { "unit": "short" } + }, + "options": { + "legend": { + "showLegend": true, + "displayMode": "list", + "placement": "bottom", + "calcs": ["last", "min", "max", "mean"] + } + } + } + ], + "annotations": { "list": [] } +} diff --git a/statistics/provisioning/dashboards/dashboards.yaml b/statistics/provisioning/dashboards/dashboards.yaml new file mode 100644 index 00000000..dc8e4649 --- /dev/null +++ b/statistics/provisioning/dashboards/dashboards.yaml @@ -0,0 +1,10 @@ +apiVersion: 1 +providers: + - name: 'argos-metrics' + orgId: 1 + folder: '' + type: file + options: + path: /etc/grafana/provisioning/dashboards + homeDashboardUid: 'argos-metrics' + updateIntervalSeconds: 1 diff --git a/statistics/provisioning/dashboards/system_metrics.json b/statistics/provisioning/dashboards/system_metrics.json new file mode 100644 index 00000000..70d1c22d --- /dev/null +++ b/statistics/provisioning/dashboards/system_metrics.json @@ -0,0 +1,98 @@ +{ + "id": null, + "uid": "system-metrics", + "title": "System Consumption", + "schemaVersion": 16, + "version": 1, + "refresh": "5s", + "timezone": "browser", + "panels": [ + { + "type": "piechart", + "title": "Memory Usage", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)", + "legendFormat": "Used", + "refId": "A" + }, + { + "expr": "100 * node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes", + "legendFormat": "Free", + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100 + } + }, + "options": { + "pieType": "pie", + "legend": { + "displayMode": "list", + "placement": "bottom" + } + }, + "gridPos": { "x": 0, "y": 0, "w": 6, "h": 8 } + }, + { + "type": "piechart", + "title": "CPU Usage", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * sum(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])) / sum(rate(node_cpu_seconds_total[5m]))", + "legendFormat": "Active", + "refId": "A" + }, + { + "expr": "100 * sum(rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) / sum(rate(node_cpu_seconds_total[5m]))", + "legendFormat": "Idle", + "refId": "B" + } + ], + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100 + } + }, + "options": { + "pieType": "pie", + "legend": { + "displayMode": "list", + "placement": "bottom" + } + }, + "gridPos": { "x": 6, "y": 0, "w": 6, "h": 8 } + }, + { + "type": "graph", + "title": "Disk Usage (%)", + "datasource": "Prometheus", + "targets": [ + { + "expr": "100 * (1 - node_filesystem_free_bytes{fstype!~\"tmpfs|aufs|overlay\"} / node_filesystem_size_bytes{fstype!~\"tmpfs|aufs|overlay\"})", + "legendFormat": "{{mountpoint}}", + "refId": "A" + } + ], + "yaxes": [ + { "format": "percent", "min": 0, "max": 100 }, + { "format": "short", "show": false } + ], + "gridPos": { "x": 0, "y": 8, "w": 12, "h": 8 }, + "lines": true, + "linewidth": 2 + } + ], + "templating": { "list": [] }, + "annotations": { "list": [] }, + "schemaVersion": 16, + "version": 1 +} diff --git a/statistics/provisioning/datasources/datasources.yaml b/statistics/provisioning/datasources/datasources.yaml new file mode 100644 index 00000000..52d848fa --- /dev/null +++ b/statistics/provisioning/datasources/datasources.yaml @@ -0,0 +1,9 @@ + +apiVersion: 1 +datasources: + - name: Prometheus + type: prometheus + access: proxy + url: http://prometheus:9090 + isDefault: true + editable: false diff --git a/statistics/system_alerts.yml b/statistics/system_alerts.yml new file mode 100644 index 00000000..73fbfc1d --- /dev/null +++ b/statistics/system_alerts.yml @@ -0,0 +1,73 @@ +groups: +- name: system-resource-alerts + rules: + + - alert: HighMemoryUsage + expr: 100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) > 90 + for: 1m + labels: + severity: critical + annotations: + summary: "Memory > 90% on {{ $labels.instance }}" + description: | + Memory usage has exceeded 90%: + Current value is {{ printf "%.1f" $value }}% + + - alert: HighCPUUsage + expr: 100 * sum(rate(node_cpu_seconds_total{mode!="idle"}[5m])) / + sum(rate(node_cpu_seconds_total[5m])) > 90 + for: 2m + labels: + severity: critical + annotations: + summary: "CPU > 90% on {{ $labels.instance }}" + description: | + CPU usage has exceeded 90%: + Current value is {{ printf "%.1f" $value }}% + + - alert: HighDiskUsage + expr: 100 * (1 - node_filesystem_free_bytes{fstype!~"tmpfs|aufs|overlay"} / + node_filesystem_size_bytes{fstype!~"tmpfs|aufs|overlay"}) > 90 + for: 30s + labels: + severity: critical + annotations: + summary: "Disk > 90% on {{ $labels.mountpoint }} ({{ $labels.instance }})" + description: | + Disk usage has exceeded 90% on mountpoint `{{ $labels.mountpoint }}`: + Current value is {{ printf "%.1f" $value }}% + + - alert: ArgosEthereumLatencyHigh + expr: | + {__name__=~"argos_(moy_)?eth_.*"} > 5 + for: 0s + labels: + severity: critical + metric: "{{ $labels.__name__ }}" + annotations: + summary: "Argos Ethereum latency > 5s on {{ $labels.instance }}" + description: | + Argos metric `{{ $labels.__name__ }}` has exceeded 5s latency: + Current value is {{ printf "%.1f" $value }}s + + - alert: ArgosBTCLatencyHigh + expr: | + {__name__=~"argos_(moy_)?btc_.*"} > 30 + for: 0s + labels: + severity: critical + metric: "{{ $labels.__name__ }}" + annotations: + summary: "Argos BTC latency > 30s on {{ $labels.instance }}" + description: | + Argos metric `{{ $labels.__name__ }}` has exceeded 30s latency: + Current value is {{ printf "%.1f" $value }}s + + - alert: InstanceDown + expr: up == 0 + for: 5m + labels: + severity: page + annotations: + summary: "Instance {{ $labels.instance }} down" + description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes." -- GitLab From 4ef7bd339b51ab1fb831774cc70b6d28a79cd324 Mon Sep 17 00:00:00 2001 From: hamid Date: Thu, 2 Oct 2025 18:18:09 +0200 Subject: [PATCH 07/10] [Ethereum-Bitcoin-scripts] Send execution times to argos statistic api --- .../btc_main_real_time_store.ml | 4 +- .../btc_main_real_time_store_stats.ml | 2 +- src/bitcoin_scripts/dune | 4 +- src/ethereum_scripts/dune | 2 +- .../eth_main_real_time_store.ml | 44 +++--- .../eth_main_real_time_store_analyses.ml | 90 ++++++------ .../eth_main_real_time_store_pool.ml | 8 +- .../eth_main_real_time_store_stats.ml | 61 ++++---- .../eth_main_real_time_store_trace.ml | 8 +- .../eth_main_real_time_store_transfers.ml | 100 +++++++------ ...th_main_real_time_store_transfers_neo4j.ml | 127 ++++++++--------- src/ethereum_scripts/eth_main_store_lib.ml | 133 ++++++++++++------ 12 files changed, 306 insertions(+), 277 deletions(-) diff --git a/src/bitcoin_scripts/btc_main_real_time_store.ml b/src/bitcoin_scripts/btc_main_real_time_store.ml index af4d5368..7ca757e9 100644 --- a/src/bitcoin_scripts/btc_main_real_time_store.ml +++ b/src/bitcoin_scripts/btc_main_real_time_store.ml @@ -15,7 +15,6 @@ type command = { }|}] [@req] verbose : Common.Types.verbose option; [@conv verbose_of_string] - statistics_port : int option; verbose_file : string option; } [@@deriving arg { exe = "main_real_time_store.exe" }] @@ -32,6 +31,7 @@ let aux block block_hash dbh = let> _ = Db_psql.add_block ~dbh ~block:decode_block () in Lwt.return_unit) in let _ = Log.log_finish_block_store block.header.height time in + let _ = Statistics_client.send_gauge_data "btc_store_transactions" time in Lwt.return_unit let block_confirmation_tips = 10 @@ -75,7 +75,7 @@ let main command = let _ = Log.set_verbose (Option.value ~default:Nothing command.verbose) in let _ = Option.map Log.set_and_open_file command.verbose_file in let _ = Node.init config in - if Common.Handlers.is_execution_stopped () then + if Common.Handlers.is_execution_stopped () then Lwt.return_unit else let _ = diff --git a/src/bitcoin_scripts/btc_main_real_time_store_stats.ml b/src/bitcoin_scripts/btc_main_real_time_store_stats.ml index 88282130..22052f1e 100644 --- a/src/bitcoin_scripts/btc_main_real_time_store_stats.ml +++ b/src/bitcoin_scripts/btc_main_real_time_store_stats.ml @@ -15,7 +15,6 @@ type command = { }|}] [@req] verbose : Common.Types.verbose option; [@conv verbose_of_string] - statistics_port : int option; verbose_file : string option; } [@@deriving arg { exe = "main_real_time_store.exe" }] @@ -30,6 +29,7 @@ let aux (block_stat : stats) block_hash dbh = let> _ = Db_psql.add_block_stat ~dbh ~block_stat () in Lwt.return_unit) in let _ = Log.log_finish_block_store block_stat.stat_height time in + let _ = Statistics_client.send_gauge_data "btc_store_stats" time in Lwt.return_unit let get_height () = diff --git a/src/bitcoin_scripts/dune b/src/bitcoin_scripts/dune index bce0ffe1..457ff3ad 100644 --- a/src/bitcoin_scripts/dune +++ b/src/bitcoin_scripts/dune @@ -3,11 +3,11 @@ (modules btc_main_real_time_store) (preprocess (pps ppx_deriving_arg ppx_here)) - (libraries btc_indexer rope ez_api.icurl_lwt)) + (libraries btc_indexer rope ez_api.icurl_lwt statistics_client)) (executable (name btc_main_real_time_store_stats) (modules btc_main_real_time_store_stats) (preprocess (pps ppx_deriving_arg ppx_here)) - (libraries btc_indexer rope ez_api.icurl_lwt)) + (libraries btc_indexer rope ez_api.icurl_lwt statistics_client)) diff --git a/src/ethereum_scripts/dune b/src/ethereum_scripts/dune index ae12b889..1dbf25b9 100644 --- a/src/ethereum_scripts/dune +++ b/src/ethereum_scripts/dune @@ -3,7 +3,7 @@ (modules eth_main_store_lib) (preprocess (pps ppx_deriving_arg ppx_here)) - (libraries eth_indexer eth_decode)) + (libraries eth_indexer eth_decode statistics_client)) (executable (name eth_main_db) diff --git a/src/ethereum_scripts/eth_main_real_time_store.ml b/src/ethereum_scripts/eth_main_real_time_store.ml index e595f8ee..aef93a81 100644 --- a/src/ethereum_scripts/eth_main_real_time_store.ml +++ b/src/ethereum_scripts/eth_main_real_time_store.ml @@ -13,27 +13,22 @@ let _ = let store_information_block block_number dbh = let block_number_i = Int64.to_int block_number in - let> result, time = - Tools.time_counter_lwt (fun () -> - let> block_r = Node.get_block_by_number block_number_i in - match block_r with - | Error e -> - Log.log_error_lwt_fail ~here:[%here] - @@ Format.sprintf "Error : %s" (EzEncoding.construct error_enc e) - | Ok block -> ( - let> block_receipt_result = - Node.get_block_receipts_by_number block_number_i in - match block_receipt_result with - | Error e -> - Log.log_error_lwt_fail ~here:[%here] - @@ Format.sprintf "Error : %s" (EzEncoding.construct error_enc e) - | Ok block_receipts -> - let> _ = add_block_transaction ~dbh ~block () in - let> _ = add_receipts ~dbh ~block_receipts () in - let|> _ = set_store_block_finish ~dbh ~block_number () in - ())) in - let _ = Log.log_finish_block_store block_number_i time in - Lwt.return result + let> block_r = Node.get_block_by_number block_number_i in + match block_r with + | Error e -> + Log.log_error_lwt_fail ~here:[%here] + @@ Format.sprintf "Error : %s" (EzEncoding.construct error_enc e) + | Ok block -> ( + let> block_receipt_result = + Node.get_block_receipts_by_number block_number_i in + match block_receipt_result with + | Error e -> + Log.log_error_lwt_fail ~here:[%here] + @@ Format.sprintf "Error : %s" (EzEncoding.construct error_enc e) + | Ok block_receipts -> + let> _ = add_block_transaction ~dbh ~block () in + let> _ = add_receipts ~dbh ~block_receipts () in + Lwt.return_unit) let get_latest_block_node ?dbh ?old () : int64 option Lwt.t = let _ = dbh in @@ -47,6 +42,9 @@ let get_latest_block_node ?dbh ?old () : int64 option Lwt.t = let () = let _ = Lwt_main.run - @@ Eth_main_store_lib.store_main (parse_command ()) get_latest_block_node - get_latest_block_stored store_information_block in + @@ Eth_main_store_lib.store_main ~command:(parse_command ()) + ~get_latest_block_to_store:get_latest_block_node + ~get_latest_block_stored ~store_func:store_information_block + ~set_finish:set_store_block_finish + ~binary_name:"eth_store_transactions" () in Log.close_file () diff --git a/src/ethereum_scripts/eth_main_real_time_store_analyses.ml b/src/ethereum_scripts/eth_main_real_time_store_analyses.ml index c2ac5492..3da9c4b6 100644 --- a/src/ethereum_scripts/eth_main_real_time_store_analyses.ml +++ b/src/ethereum_scripts/eth_main_real_time_store_analyses.ml @@ -27,60 +27,58 @@ module Block_receipt_cache = let cache = Block_receipt_cache.create Block_receipt_cache.default_capacity let store_information_block analysis block_number dbh = - let analysis_str = - EzEncoding.construct - Types.Ethereum_analysis.(eth_analysis_type_enc bottom_enc) - analysis in let block_number_i = Int64.to_int block_number in - let> result, time = - Tools.time_counter_lwt (fun () -> - let> block_receipt_decode_opt = - Block_receipt_cache.fetch_or_insert cache block_number_i (fun () -> - let> receipts_block = - get_block_transaction_receipts_by_number ~block_number () in - let block_r = Option.get receipts_block in - let> decode = - Lwt_list.map_s - Eth_decode.Decode_without_address.decode_transaction_receipt - block_r.transactions in - Lwt.return_some decode) in - let block_receipt_decode = Option.get block_receipt_decode_opt in - let analyses = - match analysis with - | `flashloan -> - Eth_analysis.Eth_analyse.blk_detect - (BAI_Flashloan block_receipt_decode) - | `liquidate -> - Eth_analysis.Eth_analyse.blk_detect - (BAI_Liquidate block_receipt_decode) - | `sandwich -> - Eth_analysis.Eth_analyse.blk_detect - (BAI_Sandwich block_receipt_decode) - | _ -> - Log.log_error_fail ~here:[%here] - @@ Format.sprintf "Can't store %s analysis in the sql database" - analysis_str in - let> _ = - Lwt_list.iter_s - (fun analysis -> - Eth_db_psql.Eth_db_psql_analysis.add_block_analysis ~dbh - ~block_number ~analysis ()) - analyses in - let|> _ = - set_store_block_analysis_finish ~dbh ~block_number ~analysis () in - ()) in - let _ = Log.log_finish_block_store ~details:analysis_str block_number_i time in - Lwt.return result + let> block_receipt_decode_opt = + Block_receipt_cache.fetch_or_insert cache block_number_i (fun () -> + let> receipts_block = + get_block_transaction_receipts_by_number ~block_number () in + let block_r = Option.get receipts_block in + let> decode = + Lwt_list.map_s + Eth_decode.Decode_without_address.decode_transaction_receipt + block_r.transactions in + Lwt.return_some decode) in + let block_receipt_decode = Option.get block_receipt_decode_opt in + let analyses = + match analysis with + | `flashloan -> + Eth_analysis.Eth_analyse.blk_detect (BAI_Flashloan block_receipt_decode) + | `liquidate -> + Eth_analysis.Eth_analyse.blk_detect (BAI_Liquidate block_receipt_decode) + | `sandwich -> + Eth_analysis.Eth_analyse.blk_detect (BAI_Sandwich block_receipt_decode) + | _ -> + Log.log_error_fail ~here:[%here] + "Can't store analysis in the sql database" in + let> _ = + Lwt_list.iter_s + (fun analysis -> + Eth_db_psql.Eth_db_psql_analysis.add_block_analysis ~dbh ~block_number + ~analysis ()) + analyses in + Lwt.return_unit let () = let _ = Lwt_main.run @@ Lwt_list.iter_p (fun analysis -> + let log_details = + EzEncoding.construct + Types.Ethereum_analysis.(eth_analysis_type_enc bottom_enc) + analysis in let get_latest_block_analysis_stored_aux ?dbh ?old () = get_latest_block_analysis_stored ?dbh ?old ~analysis () in - Eth_main_store_lib.store_main (parse_command ()) - get_latest_block_stored get_latest_block_analysis_stored_aux - (store_information_block analysis)) + let set_finish_analysis ?dbh ~block_number () = + set_store_block_analysis_finish ?dbh ~block_number ~analysis () + in + Eth_main_store_lib.store_main ~log_details + ~command:(parse_command ()) + ~get_latest_block_to_store:get_latest_block_stored + ~get_latest_block_stored:get_latest_block_analysis_stored_aux + ~store_func:(store_information_block analysis) + ~set_finish:set_finish_analysis + ~binary_name:(Format.sprintf "eth_store_analysis_%s" log_details) + ()) Eth_db_psql.Eth_db_psql_analysis.available_analyses in Log.close_file () diff --git a/src/ethereum_scripts/eth_main_real_time_store_pool.ml b/src/ethereum_scripts/eth_main_real_time_store_pool.ml index f09013af..93bcb041 100644 --- a/src/ethereum_scripts/eth_main_real_time_store_pool.ml +++ b/src/ethereum_scripts/eth_main_real_time_store_pool.ml @@ -215,6 +215,10 @@ let store_information_block block_number dbh = let () = let _ = Lwt_main.run - @@ Eth_main_store_lib.store_main (parse_command ()) get_latest_block_stored - get_latest_block_number_pool_stored store_information_block in + @@ Eth_main_store_lib.store_main ~command:(parse_command ()) + ~get_latest_block_to_store:get_latest_block_stored + ~get_latest_block_stored:get_latest_block_pool_stored + ~store_func:store_information_block + ~set_finish:set_store_block_pool_finish ~binary_name:"eth_store_pool" + () in Log.close_file () diff --git a/src/ethereum_scripts/eth_main_real_time_store_stats.ml b/src/ethereum_scripts/eth_main_real_time_store_stats.ml index 32c51406..a4a2b833 100644 --- a/src/ethereum_scripts/eth_main_real_time_store_stats.ml +++ b/src/ethereum_scripts/eth_main_real_time_store_stats.ml @@ -16,41 +16,36 @@ let _ = let store_information_block block_number dbh = let block_number_i = Int64.to_int block_number in - let> result, time = - Tools.time_counter_lwt (fun () -> - let> traces = get_block_traces ~block_number () in - let> traces_decode = - Lwt_list.map_s - (fun trace -> - let> trace_decode = decode_traces trace in - Lwt.return @@ trace_decode) - traces in - let> block_r = Node.get_block_by_number block_number_i in - match block_r with - | Error e -> - Log.log_error_lwt_fail ~here:[%here] - @@ Format.sprintf "Error : %s" (EzEncoding.construct error_enc e) - | Ok block -> ( - let> receipts = - get_block_transaction_receipts_by_number ~block_number () in - match receipts with - | None -> Log.log_error_lwt_fail ~here:[%here] "Receipts not found" - | Some block_r -> - let> receipts_decode = - Lwt_list.map_p decode_transaction_receipt block_r.transactions - in - let> stats = - Stats.stats_of_block block receipts_decode traces_decode in - let> _ = add_stat_block ~dbh ~block_stat:stats ~block_number () in - let|> _ = set_store_block_stats_finish ~dbh ~block_number () in - ())) in - let _ = Log.log_finish_block_store block_number_i time in - Lwt.return result + let> traces = get_block_traces ~block_number () in + let> traces_decode = + Lwt_list.map_s + (fun trace -> + let> trace_decode = decode_traces trace in + Lwt.return @@ trace_decode) + traces in + let> block_r = Node.get_block_by_number block_number_i in + match block_r with + | Error e -> + Log.log_error_lwt_fail ~here:[%here] + @@ Format.sprintf "Error : %s" (EzEncoding.construct error_enc e) + | Ok block -> ( + let> receipts = get_block_transaction_receipts_by_number ~block_number () in + match receipts with + | None -> Log.log_error_lwt_fail ~here:[%here] "Receipts not found" + | Some block_r -> + let> receipts_decode = + Lwt_list.map_s decode_transaction_receipt block_r.transactions in + let> stats = Stats.stats_of_block block receipts_decode traces_decode in + let> _ = add_stat_block ~dbh ~block_stat:stats ~block_number () in + Lwt.return_unit) let () = let _ = Lwt_main.run - @@ Eth_main_store_lib.store_main (parse_command ()) - get_latest_block_trace_stored get_latest_block_stats_stored - store_information_block in + @@ Eth_main_store_lib.store_main ~command:(parse_command ()) + ~get_latest_block_to_store:get_latest_block_trace_stored + ~get_latest_block_stored:get_latest_block_stats_stored + ~store_func:store_information_block + ~set_finish:set_store_block_stats_finish ~binary_name:"eth_store_stats" + () in Log.close_file () diff --git a/src/ethereum_scripts/eth_main_real_time_store_trace.ml b/src/ethereum_scripts/eth_main_real_time_store_trace.ml index 319872f2..9b01f3db 100644 --- a/src/ethereum_scripts/eth_main_real_time_store_trace.ml +++ b/src/ethereum_scripts/eth_main_real_time_store_trace.ml @@ -53,6 +53,10 @@ let store_information_block block_number dbh = let () = let _ = Lwt_main.run - @@ Eth_main_store_lib.store_main (parse_command ()) get_latest_block_stored - get_latest_block_trace_stored store_information_block in + @@ Eth_main_store_lib.store_main ~command:(parse_command ()) + ~get_latest_block_to_store:get_latest_block_stored + ~get_latest_block_stored:get_latest_block_trace_stored + ~store_func:store_information_block + ~set_finish:set_store_block_trace_finish + ~binary_name:"eth_store_traces" () in Log.close_file () diff --git a/src/ethereum_scripts/eth_main_real_time_store_transfers.ml b/src/ethereum_scripts/eth_main_real_time_store_transfers.ml index 763204ed..851c1ec1 100644 --- a/src/ethereum_scripts/eth_main_real_time_store_transfers.ml +++ b/src/ethereum_scripts/eth_main_real_time_store_transfers.ml @@ -16,61 +16,55 @@ let _ = @@ Printexc.to_string exn let store_information_block block_number dbh = - let block_number_i = Int64.to_int block_number in - let> result, time = - Tools.time_counter_lwt (fun () -> - let> traces = get_block_traces ~block_number () in - let> traces_decode = Lwt_list.map_s decode_traces traces in - let> cft_inputs_db = get_gas_and_miner_of_block ~dbh ~block_number () in - let> miner_decode = - match cft_inputs_db with - | [] -> Lwt.return_none - | r :: _ -> - Common.lift_lwt_opt - @@ Option.map (fun miner -> decode_address miner) r.dci_block_miner - in - let cft_inputs_db_sort = - List.sort - (fun x y -> - Int64.compare x.dci_transaction_index y.dci_transaction_index) - cft_inputs_db in - let cft_inputs = - List.map - (fun cft_input_db -> - { - cfti_block_number = Int64.to_int block_number; - cfti_block_builder = miner_decode; - cfti_base_fee = cft_input_db.dci_base_fee_per_gas; - cfti_effective_price = cft_input_db.dci_effective_gas_price; - cfti_max_fee_per_gas = cft_input_db.dci_max_fee_per_gas; - cfti_gas_used = cft_input_db.dci_gas_used; - }) - cft_inputs_db_sort in - let traces_decode_sort = - List.sort (fun x y -> x.dt_tx_index - y.dt_tx_index) traces_decode - in - let analyses = - Eth_analysis.Eth_analyse.blk_detect - (BAI_Transfer (traces_decode_sort, cft_inputs)) in - let transfers = - List.map - (fun analysis -> - match analysis with - | A_Transfer tr -> tr - | _ -> Log.log_error_fail ~here:[%here] "Bottom") - analyses in - let> _ = - Eth_indexer.Db_psql.Eth_db_psql_analysis.add_block_transfers ~dbh - ~block_number ~transfers () in - let|> _ = set_store_block_transfer_finish ~dbh ~block_number () in - ()) in - let _ = Log.log_finish_block_store block_number_i time in - Lwt.return result + let> traces = get_block_traces ~block_number () in + let> traces_decode = Lwt_list.map_s decode_traces traces in + let> cft_inputs_db = get_gas_and_miner_of_block ~dbh ~block_number () in + let> miner_decode = + match cft_inputs_db with + | [] -> Lwt.return_none + | r :: _ -> + Common.lift_lwt_opt + @@ Option.map (fun miner -> decode_address miner) r.dci_block_miner in + let cft_inputs_db_sort = + List.sort + (fun x y -> Int64.compare x.dci_transaction_index y.dci_transaction_index) + cft_inputs_db in + let cft_inputs = + List.map + (fun cft_input_db -> + { + cfti_block_number = Int64.to_int block_number; + cfti_block_builder = miner_decode; + cfti_base_fee = cft_input_db.dci_base_fee_per_gas; + cfti_effective_price = cft_input_db.dci_effective_gas_price; + cfti_max_fee_per_gas = cft_input_db.dci_max_fee_per_gas; + cfti_gas_used = cft_input_db.dci_gas_used; + }) + cft_inputs_db_sort in + let traces_decode_sort = + List.sort (fun x y -> x.dt_tx_index - y.dt_tx_index) traces_decode in + let analyses = + Eth_analysis.Eth_analyse.blk_detect + (BAI_Transfer (traces_decode_sort, cft_inputs)) in + let transfers = + List.map + (fun analysis -> + match analysis with + | A_Transfer tr -> tr + | _ -> Log.log_error_fail ~here:[%here] "Bottom") + analyses in + let> _ = + Eth_indexer.Db_psql.Eth_db_psql_analysis.add_block_transfers ~dbh + ~block_number ~transfers () in + Lwt.return_unit let () = let _ = Lwt_main.run - @@ Eth_main_store_lib.store_main (parse_command ()) - get_latest_block_trace_stored get_latest_block_number_transfer_stored - store_information_block in + @@ Eth_main_store_lib.store_main ~command:(parse_command ()) + ~get_latest_block_to_store:get_latest_block_trace_stored + ~get_latest_block_stored:get_latest_block_transfer_stored + ~store_func:store_information_block + ~set_finish:set_store_block_transfer_finish + ~binary_name:"eth_store_transfers_pqsl" () in Log.close_file () diff --git a/src/ethereum_scripts/eth_main_real_time_store_transfers_neo4j.ml b/src/ethereum_scripts/eth_main_real_time_store_transfers_neo4j.ml index 97f42fd6..bdbb7d18 100644 --- a/src/ethereum_scripts/eth_main_real_time_store_transfers_neo4j.ml +++ b/src/ethereum_scripts/eth_main_real_time_store_transfers_neo4j.ml @@ -16,78 +16,69 @@ let _ = @@ Printexc.to_string exn let store_information_block block_number dbh = - let block_number_i = Int64.to_int block_number in - let> result, time = - Tools.time_counter_lwt (fun () -> - let> traces = get_block_traces ~block_number () in - let> traces_decode = Lwt_list.map_s decode_traces traces in - let> cft_inputs_db = get_gas_and_miner_of_block ~dbh ~block_number () in - let> miner_decode = - match cft_inputs_db with - | [] -> Lwt.return_none - | r :: _ -> - Common.lift_lwt_opt - @@ Option.map (fun miner -> decode_address miner) r.dci_block_miner - in - let cft_inputs_db_sort = - List.sort - (fun x y -> - Int64.compare x.dci_transaction_index y.dci_transaction_index) - cft_inputs_db in - let cft_inputs = - List.map - (fun cft_input_db -> - { - cfti_block_number = Int64.to_int block_number; - cfti_block_builder = miner_decode; - cfti_base_fee = cft_input_db.dci_base_fee_per_gas; - cfti_effective_price = cft_input_db.dci_effective_gas_price; - cfti_max_fee_per_gas = cft_input_db.dci_max_fee_per_gas; - cfti_gas_used = cft_input_db.dci_gas_used; - }) - cft_inputs_db_sort in - let traces_decode_sort = - List.sort (fun x y -> x.dt_tx_index - y.dt_tx_index) traces_decode - in - let analyses = - Eth_analysis.Eth_analyse.blk_detect - (BAI_Transfer (traces_decode_sort, cft_inputs)) in - let> _ = - Lwt_list.iter_s - (fun analysis -> - match analysis with - | A_Transfer tr -> ( - let trs = - List.flatten - @@ List.map (fun out -> out.txaio_resume) tr.txao_output in - let> res = - Eth_indexer.Db_neo4j.insert_transfers trs - (tr.txao_transaction_hash :> string) - tr.txao_block_number tr.txao_transaction_index in - match res.errors with - | [] -> Lwt.return_unit - | errors -> - Log.log_error_lwt_fail ~here:[%here] - @@ Format.sprintf "Neo4j Errors : %s " - @@ EzEncoding.construct - (Json_encoding.list Neo4j.error_enc) - errors) - | _ -> - Log.log_error_lwt_fail ~here:[%here] - "Can't store other analyses in Neo4j") - analyses in - let|> _ = set_store_block_transfer_neo4j_finish ~dbh ~block_number () in - ()) in - let _ = Log.log_finish_block_store block_number_i time in - Lwt.return result + let> traces = get_block_traces ~block_number () in + let> traces_decode = Lwt_list.map_s decode_traces traces in + let> cft_inputs_db = get_gas_and_miner_of_block ~dbh ~block_number () in + let> miner_decode = + match cft_inputs_db with + | [] -> Lwt.return_none + | r :: _ -> + Common.lift_lwt_opt + @@ Option.map (fun miner -> decode_address miner) r.dci_block_miner in + let cft_inputs_db_sort = + List.sort + (fun x y -> Int64.compare x.dci_transaction_index y.dci_transaction_index) + cft_inputs_db in + let cft_inputs = + List.map + (fun cft_input_db -> + { + cfti_block_number = Int64.to_int block_number; + cfti_block_builder = miner_decode; + cfti_base_fee = cft_input_db.dci_base_fee_per_gas; + cfti_effective_price = cft_input_db.dci_effective_gas_price; + cfti_max_fee_per_gas = cft_input_db.dci_max_fee_per_gas; + cfti_gas_used = cft_input_db.dci_gas_used; + }) + cft_inputs_db_sort in + let traces_decode_sort = + List.sort (fun x y -> x.dt_tx_index - y.dt_tx_index) traces_decode in + let analyses = + Eth_analysis.Eth_analyse.blk_detect + (BAI_Transfer (traces_decode_sort, cft_inputs)) in + let> _ = + Lwt_list.iter_s + (fun analysis -> + match analysis with + | A_Transfer tr -> ( + let trs = + List.flatten + @@ List.map (fun out -> out.txaio_resume) tr.txao_output in + let> res = + Eth_indexer.Db_neo4j.insert_transfers trs + (tr.txao_transaction_hash :> string) + tr.txao_block_number tr.txao_transaction_index in + match res.errors with + | [] -> Lwt.return_unit + | errors -> + Log.log_error_lwt_fail ~here:[%here] + @@ Format.sprintf "Neo4j Errors : %s " + @@ EzEncoding.construct (Json_encoding.list Neo4j.error_enc) errors) + | _ -> + Log.log_error_lwt_fail ~here:[%here] + "Can't store other analyses in Neo4j") + analyses in + Lwt.return_unit let () = let neo4j_password = Env.get_env Env.neo4j_var in let _ = Neo4j.password := neo4j_password in let _ = Lwt_main.run - @@ Eth_main_store_lib.store_main (parse_command ()) - get_latest_block_trace_stored - get_latest_block_number_transfer_neo4j_stored store_information_block - in + @@ Eth_main_store_lib.store_main ~command:(parse_command ()) + ~get_latest_block_to_store:get_latest_block_trace_stored + ~get_latest_block_stored:get_latest_block_transfer_neo4j_stored + ~store_func:store_information_block + ~set_finish:set_store_block_transfer_neo4j_finish + ~binary_name:"eth_store_transfers_neo4j" () in Log.close_file () diff --git a/src/ethereum_scripts/eth_main_store_lib.ml b/src/ethereum_scripts/eth_main_store_lib.ml index 64922f0d..55e8b113 100644 --- a/src/ethereum_scripts/eth_main_store_lib.ml +++ b/src/ethereum_scripts/eth_main_store_lib.ml @@ -23,48 +23,95 @@ let condition_to_wait lbs direction block_number_to_store = else block_number_to_store > lbs -let rec store_loop block_number_to_store final_block direction old - (get_final_block : +let rec get_latest_block_to_store_aux + (get_latest_block_to_store : ?dbh:EzPG_lwt.PGOCaml.pa_pg_data PGOCaml_generic.Make(EzPG_lwt__Thread).t -> ?old:unit -> unit -> - int64 option Lwt.t) store_func = - if Handlers.is_execution_stopped () then - Lwt.return_unit - else if condition_to_wait final_block direction block_number_to_store then - let> latest_block_stored_opt = get_final_block ?old () in + int64 option Lwt.t) old direction current_block_number_opt = + let> latest_block_to_store = + let> latest_block_stored_opt = get_latest_block_to_store ?old () in match latest_block_stored_opt with - | None -> Log.log_error_lwt_fail ~here:[%here] "No block stored" - | Some latest_block_stored_2 -> - if condition_to_wait latest_block_stored_2 direction block_number_to_store - then - let _ = - Log.log ~color:Red - @@ Format.sprintf "Wait 2 seconde for %s " - (Int64.to_string block_number_to_store) in - let> _ = Lwt_unix.sleep 2. in - store_loop block_number_to_store latest_block_stored_2 direction old - get_final_block store_func - else - store_loop block_number_to_store latest_block_stored_2 direction old - get_final_block store_func - else - let> _ = wrap_begin_commit (store_func block_number_to_store) in - let next_block_number = Int64.add block_number_to_store direction in - store_loop next_block_number final_block direction old get_final_block - store_func + | None -> + let _ = Log.log ~color:Red @@ "Wait 2 seconde for block dependecies" in + let> _ = Lwt_unix.sleep 2. in + get_latest_block_to_store_aux get_latest_block_to_store old direction + current_block_number_opt + | Some block_number -> ( + match current_block_number_opt with + | Some current_block_number -> + if condition_to_wait block_number direction current_block_number then + let _ = + Log.log ~color:Red + @@ Format.sprintf "Wait 2 seconde for %s " + (Int64.to_string current_block_number) in + let> _ = Lwt_unix.sleep 2. in + get_latest_block_to_store_aux get_latest_block_to_store old direction + current_block_number_opt + else + Lwt.return block_number + | None -> Lwt.return block_number) in + Lwt.return latest_block_to_store -let store_main command +let rec store_loop ?log_details block_number_to_store final_block direction old (get_final_block : ?dbh:EzPG_lwt.PGOCaml.pa_pg_data PGOCaml_generic.Make(EzPG_lwt__Thread).t -> ?old:unit -> unit -> - int64 option Lwt.t) - (get_latest_block_stored : - ?dbh:EzPG_lwt.PGOCaml.pa_pg_data PGOCaml_generic.Make(EzPG_lwt__Thread).t -> - ?old:unit -> + int64 option Lwt.t) store_func + (set_finish : + ?dbh:EzPG_lwt.PGOCaml.pa_pg_data EzPG_lwt.PGOCaml.t -> + block_number:bint64 -> unit -> - int64 option Lwt.t) store_func = + none Lwt.t) binary_name = + if Handlers.is_execution_stopped () then + Lwt.return_unit + else if condition_to_wait final_block direction block_number_to_store then + let> latest_block_stored_2 = + get_latest_block_to_store_aux get_final_block old direction + (Some block_number_to_store) in + store_loop ?log_details block_number_to_store latest_block_stored_2 + direction old get_final_block store_func set_finish binary_name + else + let gauge_key = + Format.sprintf "%s%s" binary_name + @@ + if Option.is_some old then + "_decreasing" + else + "_latest" in + let> _ = + wrap_begin_commit (fun dbh -> + let> _, time = + Tools.time_counter_lwt (fun () -> + let> _ = store_func block_number_to_store dbh in + set_finish ~dbh ~block_number:block_number_to_store ()) in + let _ = Statistics_client.send_gauge_data gauge_key time in + let _ = + Log.log_finish_block_store ?details:log_details + (Int64.to_int block_number_to_store) + time in + Lwt.return_unit) in + let next_block_number = Int64.add block_number_to_store direction in + store_loop ?log_details next_block_number final_block direction old + get_final_block store_func set_finish binary_name + +let store_main ?log_details ~command + ~(get_latest_block_to_store : + ?dbh:EzPG_lwt.PGOCaml.pa_pg_data PGOCaml_generic.Make(EzPG_lwt__Thread).t -> + ?old:unit -> + unit -> + int64 option Lwt.t) + ~(get_latest_block_stored : + ?dbh:EzPG_lwt.PGOCaml.pa_pg_data PGOCaml_generic.Make(EzPG_lwt__Thread).t -> + ?old:unit -> + unit -> + int64 option Lwt.t) ~store_func + ~(set_finish : + ?dbh:EzPG_lwt.PGOCaml.pa_pg_data EzPG_lwt.PGOCaml.t -> + block_number:bint64 -> + unit -> + none Lwt.t) ~binary_name () = let> _ = init_config command in if Handlers.is_execution_stopped () then Lwt.return_unit @@ -79,22 +126,20 @@ let store_main command Int64.minus_one else Int64.one in - let> latest_block_stored = - let> latest_block_stored_opt = get_final_block ?old () in + let> latest_block_to_store = + get_latest_block_to_store_aux get_latest_block_to_store old direction None + in + let> latest_block_stored_opt = get_latest_block_stored ?old () in + let next_block_to_store = match latest_block_stored_opt with - | None -> Log.log_error_lwt_fail ~here:[%here] "No block stored" - | Some block_number -> Lwt.return block_number in - let> latest_pool_block_stored_opt = get_latest_block_stored ?old () in - let block_number = - match latest_pool_block_stored_opt with - | None -> latest_block_stored + | None -> latest_block_to_store | Some block_number -> Int64.add block_number direction in let _ = Log.log ~color:Blue @@ Format.sprintf "block to store is %d and current latest block %d, decreasing %b" - (Int64.to_int block_number) - (Int64.to_int latest_block_stored) + (Int64.to_int next_block_to_store) + (Int64.to_int latest_block_to_store) command.decreasing in - store_loop block_number latest_block_stored direction old get_final_block - store_func + store_loop ?log_details next_block_to_store latest_block_to_store direction + old get_latest_block_to_store store_func set_finish binary_name -- GitLab From c3f7b623626d782cf9e58ac7c3243d7b6d07caeb Mon Sep 17 00:00:00 2001 From: hamid Date: Thu, 2 Oct 2025 18:21:46 +0200 Subject: [PATCH 08/10] [Makefile] Update makefile and gitignore --- .gitignore | 5 ++--- Makefile | 13 +++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 479bad70..dfcb81d9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ _opam bin /db/ config/ -statistics*/ target/ node_modules build @@ -16,7 +15,6 @@ openapi.json makefile.config _pid tsconfig.json -package-lock.json config ethereum_event_hashes/dict/* .env.el @@ -36,4 +34,5 @@ plot/* doc/ocaml-doc bin-v2 logs-v2/* - +slack_url +grafana.env diff --git a/Makefile b/Makefile index 2c2d2328..0351fe1a 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ BITCOIN_INDEXER_BIN_DIR=bitcoin_scripts STATISTICS_BIN_DIR=statistics API_BIN_DIR=api TEST_BIN_DIR=test +DOCKER_DIR=docker +STATISTICS_DIR=statistics ETHEREUM_INDEXER_MONGODB_BIN=ethereum_indexer_mongodb BITCOIN_INDEXER_MONGODB_BIN=bitcoin_indexer_mongodb API_MONGODB_BIN=api_mongodb @@ -15,6 +17,7 @@ DOC=doc OCAML_BUILD=dune RUST_BUILD=cargo FRONT_BUILD=npm +DOCKER_BUILD=docker-compose SCRIPTS_DIR=scripts/devops @@ -94,4 +97,14 @@ openapi: build-ocaml @mkdir -p $(PUBLIC)/ @_build/default/src/api/generate_openapi.exe -o ./$(PUBLIC)/openapi +build-dockerfiles: + @cd $(DOCKER_DIR);$(DOCKER_BUILD) -f docker-compose.deps.yml build + @cd $(DOCKER_DIR);$(DOCKER_BUILD) -f docker-compose.build.yml build + +run-statistics: + @cd $(STATISTICS_DIR);$(DOCKER_BUILD) up -d + +stop-statistics: + @cd $(STATISTICS_DIR);$(DOCKER_BUILD) down + -include makefile.config -- GitLab From 24209b6e2cd99a772f6b196d6bebb1434f675731 Mon Sep 17 00:00:00 2001 From: hamid Date: Thu, 2 Oct 2025 18:22:14 +0200 Subject: [PATCH 09/10] [Typo] Typo, format and rebase --- package-lock.json | 10278 ++++++++++++++++ src/api/api_handlers_db.ml | 60 - .../btc_main_real_time_store.ml | 2 +- src/common/types.ml | 4 - .../eth_db_psql/eth_db_psql_raw.ml | 2 +- .../eth_db_psql/eth_db_psql_stats.ml | 33 +- .../eth_db_psql_store_information.ml | 6 +- .../eth_db_psql_store_information.mli | 6 +- 8 files changed, 10301 insertions(+), 90 deletions(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..e3f17c42 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,10278 @@ +{ + "name": "argos", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "argos", + "version": "0.1.0", + "dependencies": { + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.0", + "@mui/icons-material": "^6.4.6", + "@mui/material": "^6.4.8", + "@mui/styled-engine-sc": "^6.4.6", + "@mui/x-charts": "^7.27.1", + "@mui/x-tree-view": "^7.28.0", + "@ts-graphviz/react": "^0.11.0", + "@types/dagre": "^0.7.52", + "@types/react-dom": "^19.0.4", + "@xyflow/react": "^12.4.4", + "cra-template-typescript": "1.3.0", + "dagre": "^0.8.5", + "elkjs": "^0.10.0", + "ethers": "^6.13.5", + "graphviz-react": "^1.2.5", + "graphviz-wasm": "^3.0.2", + "html-to-image": "^1.11.13", + "npm": "^11.3.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-force-graph": "^1.29.3", + "react-router-dom": "^7.2.0", + "react-syntax-highlighter": "^15.6.1", + "reactflow": "^11.11.4", + "serve": "^14.2.4", + "styled-components": "^6.1.16", + "ts-graphviz": "^3.0.0", + "typechain": "^8.3.2", + "typescript": "^5.8.2", + "typescript-language-server": "^4.3.4" + }, + "devDependencies": { + "@babel/plugin-proposal-private-property-in-object": "^7.21.11", + "@types/node": "^22.13.13", + "copy-webpack-plugin": "^13.0.0", + "cross-env": "^7.0.3", + "css-loader": "^7.1.2", + "dotenv-webpack": "^8.1.0", + "html-webpack-plugin": "^5.6.3", + "prettier": "^3.6.2", + "style-loader": "^4.0.0", + "ts-loader": "^9.5.2", + "webpack": "^5.98.0", + "webpack-cli": "^6.0.1", + "webpack-dev-server": "^5.2.0" + } + }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "license": "MIT" + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.25.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.27.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/helper-replace-supers": "^7.26.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/traverse": "^7.27.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.25.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.25.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.26.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.26.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/traverse": "^7.26.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.25.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.3.tgz", + "integrity": "sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.11", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.27.0", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.3.tgz", + "integrity": "sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.3", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.2", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.17.0" + } + }, + "node_modules/@emotion/babel-plugin": { + "version": "11.13.5", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/serialize": "^1.3.3", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.14.0", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.2", + "license": "MIT" + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.3.1", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.9.0" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.9.0", + "license": "MIT" + }, + "node_modules/@emotion/react": { + "version": "11.14.0", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/cache": "^11.14.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.3.3", + "license": "MIT", + "dependencies": { + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.10.0", + "@emotion/utils": "^1.4.2", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.4.0", + "license": "MIT" + }, + "node_modules/@emotion/styled": { + "version": "11.14.0", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/is-prop-valid": "^1.3.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.10.0", + "license": "MIT" + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.2.0", + "license": "MIT", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.4.2", + "license": "MIT" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.4.0", + "license": "MIT" + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jsonjoy.com/base64": { + "version": "1.1.2", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack": { + "version": "1.2.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/base64": "^1.1.1", + "@jsonjoy.com/util": "^1.1.2", + "hyperdyperid": "^1.2.0", + "thingies": "^1.20.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/util": { + "version": "1.5.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "6.4.10", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/icons-material": { + "version": "6.4.10", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@mui/material": "^6.4.10", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material": { + "version": "6.4.10", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/core-downloads-tracker": "^6.4.10", + "@mui/system": "^6.4.10", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.9", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.12", + "clsx": "^2.1.1", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^19.0.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@mui/material-pigment-css": "^6.4.10", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@mui/material-pigment-css": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/private-theming": { + "version": "6.4.9", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/utils": "^6.4.9", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "6.4.9", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@emotion/cache": "^11.13.5", + "@emotion/serialize": "^1.3.3", + "@emotion/sheet": "^1.4.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine-sc": { + "version": "6.4.9", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@types/hoist-non-react-statics": "^3.3.6", + "csstype": "^3.1.3", + "hoist-non-react-statics": "^3.3.2", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "styled-components": "^6.0.0" + } + }, + "node_modules/@mui/system": { + "version": "6.4.10", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/private-theming": "^6.4.9", + "@mui/styled-engine": "^6.4.9", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.9", + "clsx": "^2.1.1", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.24", + "license": "MIT", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "6.4.9", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/types": "~7.2.24", + "@types/prop-types": "^15.7.14", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-is": "^19.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/x-charts": { + "version": "7.28.0", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.7", + "@mui/utils": "^5.16.6 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta", + "@mui/x-charts-vendor": "7.20.0", + "@mui/x-internals": "7.28.0", + "@react-spring/rafz": "^9.7.5", + "@react-spring/web": "^9.7.5", + "clsx": "^2.1.1", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta", + "@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/x-charts-vendor": { + "version": "7.20.0", + "license": "MIT AND ISC", + "dependencies": { + "@babel/runtime": "^7.25.7", + "@types/d3-color": "^3.1.3", + "@types/d3-delaunay": "^6.0.4", + "@types/d3-interpolate": "^3.0.4", + "@types/d3-scale": "^4.0.8", + "@types/d3-shape": "^3.1.6", + "@types/d3-time": "^3.0.3", + "d3-color": "^3.1.0", + "d3-delaunay": "^6.0.4", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.2.0", + "d3-time": "^3.1.0", + "delaunator": "^5.0.1", + "robust-predicates": "^3.0.2" + } + }, + "node_modules/@mui/x-internals": { + "version": "7.28.0", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.7", + "@mui/utils": "^5.16.6 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@mui/x-tree-view": { + "version": "7.28.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.7", + "@mui/utils": "^5.16.6 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta", + "@mui/x-internals": "7.28.0", + "@types/react-transition-group": "^4.4.11", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta", + "@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@noble/curves": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.2", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@react-spring/animated": { + "version": "9.7.5", + "license": "MIT", + "dependencies": { + "@react-spring/shared": "~9.7.5", + "@react-spring/types": "~9.7.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@react-spring/core": { + "version": "9.7.5", + "license": "MIT", + "dependencies": { + "@react-spring/animated": "~9.7.5", + "@react-spring/shared": "~9.7.5", + "@react-spring/types": "~9.7.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-spring/donate" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@react-spring/rafz": { + "version": "9.7.5", + "license": "MIT" + }, + "node_modules/@react-spring/shared": { + "version": "9.7.5", + "license": "MIT", + "dependencies": { + "@react-spring/rafz": "~9.7.5", + "@react-spring/types": "~9.7.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@react-spring/types": { + "version": "9.7.5", + "license": "MIT" + }, + "node_modules/@react-spring/web": { + "version": "9.7.5", + "license": "MIT", + "dependencies": { + "@react-spring/animated": "~9.7.5", + "@react-spring/core": "~9.7.5", + "@react-spring/shared": "~9.7.5", + "@react-spring/types": "~9.7.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@reactflow/background": { + "version": "11.3.14", + "license": "MIT", + "dependencies": { + "@reactflow/core": "11.11.4", + "classcat": "^5.0.3", + "zustand": "^4.4.1" + }, + "peerDependencies": { + "react": ">=17", + "react-dom": ">=17" + } + }, + "node_modules/@reactflow/controls": { + "version": "11.2.14", + "license": "MIT", + "dependencies": { + "@reactflow/core": "11.11.4", + "classcat": "^5.0.3", + "zustand": "^4.4.1" + }, + "peerDependencies": { + "react": ">=17", + "react-dom": ">=17" + } + }, + "node_modules/@reactflow/core": { + "version": "11.11.4", + "license": "MIT", + "dependencies": { + "@types/d3": "^7.4.0", + "@types/d3-drag": "^3.0.1", + "@types/d3-selection": "^3.0.3", + "@types/d3-zoom": "^3.0.1", + "classcat": "^5.0.3", + "d3-drag": "^3.0.0", + "d3-selection": "^3.0.0", + "d3-zoom": "^3.0.0", + "zustand": "^4.4.1" + }, + "peerDependencies": { + "react": ">=17", + "react-dom": ">=17" + } + }, + "node_modules/@reactflow/minimap": { + "version": "11.7.14", + "license": "MIT", + "dependencies": { + "@reactflow/core": "11.11.4", + "@types/d3-selection": "^3.0.3", + "@types/d3-zoom": "^3.0.1", + "classcat": "^5.0.3", + "d3-selection": "^3.0.0", + "d3-zoom": "^3.0.0", + "zustand": "^4.4.1" + }, + "peerDependencies": { + "react": ">=17", + "react-dom": ">=17" + } + }, + "node_modules/@reactflow/node-resizer": { + "version": "2.2.14", + "license": "MIT", + "dependencies": { + "@reactflow/core": "11.11.4", + "classcat": "^5.0.4", + "d3-drag": "^3.0.0", + "d3-selection": "^3.0.0", + "zustand": "^4.4.1" + }, + "peerDependencies": { + "react": ">=17", + "react-dom": ">=17" + } + }, + "node_modules/@reactflow/node-toolbar": { + "version": "1.3.14", + "license": "MIT", + "dependencies": { + "@reactflow/core": "11.11.4", + "classcat": "^5.0.3", + "zustand": "^4.4.1" + }, + "peerDependencies": { + "react": ">=17", + "react-dom": ">=17" + } + }, + "node_modules/@ts-graphviz/adapter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@ts-graphviz/adapter/-/adapter-3.0.0.tgz", + "integrity": "sha512-BswrHyMK4FbwnyXfWc3vi6vtapXYs7BNW4wZTJnmF0qLi708UNGhsfoaHO27JMYhhMlTv5O/Kn7jBgr8TEBVLw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ts-graphviz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ts-graphviz" + } + ], + "license": "MIT", + "dependencies": { + "@ts-graphviz/common": "^3.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@ts-graphviz/ast": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@ts-graphviz/ast/-/ast-3.0.0.tgz", + "integrity": "sha512-wWSXlHb7BkwBxMsbm11Rpc9JXSVHSrt47CbQPKOxXgoPbe9mrJPrk6Gzw0mKVsxZHYLmBr8c8gVxfQbC+x9Gng==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ts-graphviz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ts-graphviz" + } + ], + "license": "MIT", + "dependencies": { + "@ts-graphviz/common": "^3.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@ts-graphviz/common": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@ts-graphviz/common/-/common-3.0.0.tgz", + "integrity": "sha512-lFEvb6jjuPCqzYcCekVoMMX83VWNZDyiYSo31qzDRUhePlNhLxSAgoTBCrsAX2hU/M1SqjgJSGoPeeIhe/YzMA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ts-graphviz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ts-graphviz" + } + ], + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/@ts-graphviz/core": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@ts-graphviz/core/-/core-3.0.0.tgz", + "integrity": "sha512-Ssx9Cm8UGfbzwYq1RnCN10p6ihBoUS5cf0P4My28AD5SFTjYnZYB+JzV+8oub3ifCe6NahM97YXnNigsGPbMEw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ts-graphviz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ts-graphviz" + } + ], + "license": "MIT", + "dependencies": { + "@ts-graphviz/ast": "^3.0.0", + "@ts-graphviz/common": "^3.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@ts-graphviz/react": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@ts-graphviz/react/-/react-0.11.0.tgz", + "integrity": "sha512-S5X2Q7WyTLqX33zfIfTcYdfZFP05NcbqGuZN2+k5Lg6iUdnAlfLkev/bHNK/LnxVQUAllBRzF/FZqERXPSJ24Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ts-graphviz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ts-graphviz" + } + ], + "license": "MIT", + "dependencies": { + "@ts-graphviz/common": "^3.0.0", + "react-reconciler": "^0.32.0", + "ts-graphviz": "^3.0.0" + }, + "peerDependencies": { + "react": ">=19" + } + }, + "node_modules/@tweenjs/tween.js": { + "version": "25.0.0", + "license": "MIT" + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/bonjour": { + "version": "3.5.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect-history-api-fallback": { + "version": "1.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "license": "MIT" + }, + "node_modules/@types/d3": { + "version": "7.4.3", + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/d3-axis": "*", + "@types/d3-brush": "*", + "@types/d3-chord": "*", + "@types/d3-color": "*", + "@types/d3-contour": "*", + "@types/d3-delaunay": "*", + "@types/d3-dispatch": "*", + "@types/d3-drag": "*", + "@types/d3-dsv": "*", + "@types/d3-ease": "*", + "@types/d3-fetch": "*", + "@types/d3-force": "*", + "@types/d3-format": "*", + "@types/d3-geo": "*", + "@types/d3-hierarchy": "*", + "@types/d3-interpolate": "*", + "@types/d3-path": "*", + "@types/d3-polygon": "*", + "@types/d3-quadtree": "*", + "@types/d3-random": "*", + "@types/d3-scale": "*", + "@types/d3-scale-chromatic": "*", + "@types/d3-selection": "*", + "@types/d3-shape": "*", + "@types/d3-time": "*", + "@types/d3-time-format": "*", + "@types/d3-timer": "*", + "@types/d3-transition": "*", + "@types/d3-zoom": "*" + } + }, + "node_modules/@types/d3-array": { + "version": "3.2.1", + "license": "MIT" + }, + "node_modules/@types/d3-axis": { + "version": "3.0.6", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-brush": { + "version": "3.0.6", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-chord": { + "version": "3.0.6", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "license": "MIT" + }, + "node_modules/@types/d3-contour": { + "version": "3.0.6", + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-delaunay": { + "version": "6.0.4", + "license": "MIT" + }, + "node_modules/@types/d3-dispatch": { + "version": "3.0.6", + "license": "MIT" + }, + "node_modules/@types/d3-drag": { + "version": "3.0.7", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-dsv": { + "version": "3.0.7", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "license": "MIT" + }, + "node_modules/@types/d3-fetch": { + "version": "3.0.7", + "license": "MIT", + "dependencies": { + "@types/d3-dsv": "*" + } + }, + "node_modules/@types/d3-force": { + "version": "3.0.10", + "license": "MIT" + }, + "node_modules/@types/d3-format": { + "version": "3.0.4", + "license": "MIT" + }, + "node_modules/@types/d3-geo": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-hierarchy": { + "version": "3.1.7", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "license": "MIT" + }, + "node_modules/@types/d3-polygon": { + "version": "3.0.2", + "license": "MIT" + }, + "node_modules/@types/d3-quadtree": { + "version": "3.0.6", + "license": "MIT" + }, + "node_modules/@types/d3-random": { + "version": "3.0.3", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-scale-chromatic": { + "version": "3.1.0", + "license": "MIT" + }, + "node_modules/@types/d3-selection": { + "version": "3.0.11", + "license": "MIT" + }, + "node_modules/@types/d3-shape": { + "version": "3.1.7", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "license": "MIT" + }, + "node_modules/@types/d3-time-format": { + "version": "4.0.3", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "license": "MIT" + }, + "node_modules/@types/d3-transition": { + "version": "3.0.9", + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-zoom": { + "version": "3.0.8", + "license": "MIT", + "dependencies": { + "@types/d3-interpolate": "*", + "@types/d3-selection": "*" + } + }, + "node_modules/@types/dagre": { + "version": "0.7.52", + "license": "MIT" + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "4.17.21", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "license": "MIT" + }, + "node_modules/@types/hast": { + "version": "2.3.10", + "license": "MIT", + "dependencies": { + "@types/unist": "^2" + } + }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.6", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, + "node_modules/@types/html-minifier-terser": { + "version": "6.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/http-proxy": { + "version": "1.17.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.14.0", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/node-forge": { + "version": "1.3.11", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "license": "MIT" + }, + "node_modules/@types/prettier": { + "version": "2.7.3", + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.14", + "license": "MIT" + }, + "node_modules/@types/qs": { + "version": "6.9.18", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.1.0", + "license": "MIT", + "dependencies": { + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.1.1", + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.0.0" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.12", + "license": "MIT", + "peerDependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/retry": { + "version": "0.12.2", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-index": { + "version": "1.9.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/@types/sockjs": { + "version": "0.3.36", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/stylis": { + "version": "4.2.5", + "license": "MIT" + }, + "node_modules/@types/unist": { + "version": "2.0.11", + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "8.18.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@xyflow/react": { + "version": "12.5.4", + "license": "MIT", + "dependencies": { + "@xyflow/system": "0.0.54", + "classcat": "^5.0.3", + "zustand": "^4.4.0" + }, + "peerDependencies": { + "react": ">=17", + "react-dom": ">=17" + } + }, + "node_modules/@xyflow/system": { + "version": "0.0.54", + "license": "MIT", + "dependencies": { + "@types/d3-drag": "^3.0.7", + "@types/d3-selection": "^3.0.10", + "@types/d3-transition": "^3.0.8", + "@types/d3-zoom": "^3.0.8", + "d3-drag": "^3.0.0", + "d3-selection": "^3.0.0", + "d3-zoom": "^3.0.0" + } + }, + "node_modules/@zeit/schemas": { + "version": "2.36.0", + "license": "MIT" + }, + "node_modules/3d-force-graph": { + "version": "1.77.0", + "license": "MIT", + "dependencies": { + "accessor-fn": "1", + "kapsule": "^1.16", + "three": ">=0.118 <1", + "three-forcegraph": "1", + "three-render-objects": "^1.35" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/3d-force-graph-ar": { + "version": "1.9.5", + "license": "MIT", + "dependencies": { + "aframe-forcegraph-component": "3", + "kapsule": "^1.16" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/3d-force-graph-vr": { + "version": "3.0.3", + "license": "MIT", + "dependencies": { + "accessor-fn": "1", + "aframe-extras": "^7.2", + "aframe-forcegraph-component": "3", + "kapsule": "^1.16", + "polished": "4" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "aframe": "^1.5" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accessor-fn": { + "version": "1.5.3", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/acorn": { + "version": "8.14.1", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "license": "MIT" + }, + "node_modules/aframe-extras": { + "version": "7.5.4", + "license": "MIT", + "dependencies": { + "nipplejs": "^0.10.2", + "three": "^0.164.0", + "three-pathfinding": "^1.3.0" + } + }, + "node_modules/aframe-extras/node_modules/three": { + "version": "0.164.1", + "license": "MIT" + }, + "node_modules/aframe-forcegraph-component": { + "version": "3.2.3", + "license": "MIT", + "dependencies": { + "three-forcegraph": "1" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "aframe": "*" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-align": { + "version": "3.0.1", + "license": "ISC", + "dependencies": { + "string-width": "^4.1.0" + } + }, + "node_modules/ansi-align/node_modules/emoji-regex": { + "version": "8.0.0", + "license": "MIT" + }, + "node_modules/ansi-align/node_modules/string-width": { + "version": "4.2.3", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-html-community": { + "version": "0.0.8", + "dev": true, + "engines": [ + "node >= 0.8.0" + ], + "license": "Apache-2.0", + "bin": { + "ansi-html": "bin/ansi-html" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/arch": { + "version": "2.2.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/arg": { + "version": "5.0.2", + "license": "MIT" + }, + "node_modules/array-back": { + "version": "3.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/batch": { + "version": "0.6.1", + "dev": true, + "license": "MIT" + }, + "node_modules/bezier-js": { + "version": "6.1.4", + "license": "MIT", + "funding": { + "type": "individual", + "url": "https://github.com/Pomax/bezierjs/blob/master/FUNDING.md" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/bytes": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/bonjour-service": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/boxen": { + "version": "7.0.0", + "license": "MIT", + "dependencies": { + "ansi-align": "^3.0.1", + "camelcase": "^7.0.0", + "chalk": "^5.0.1", + "cli-boxes": "^3.0.0", + "string-width": "^5.1.2", + "type-fest": "^2.13.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.0.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.24.4", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bytes": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camel-case": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, + "node_modules/camelcase": { + "version": "7.0.1", + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelize": { + "version": "1.0.1", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001709", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/canvas-color-tracker": { + "version": "1.3.2", + "license": "MIT", + "dependencies": { + "tinycolor2": "^1.6.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/chalk": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk-template": { + "version": "0.4.0", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/chalk-template?sponsor=1" + } + }, + "node_modules/chalk-template/node_modules/ansi-styles": { + "version": "4.3.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/chalk-template/node_modules/chalk": { + "version": "4.1.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk-template/node_modules/supports-color": { + "version": "7.2.0", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/character-entities": { + "version": "1.2.4", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/classcat": { + "version": "5.0.5", + "license": "MIT" + }, + "node_modules/clean-css": { + "version": "5.3.3", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "node_modules/clean-css/node_modules/source-map": { + "version": "0.6.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-boxes": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clipboardy": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "arch": "^2.2.0", + "execa": "^5.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "dev": true, + "license": "MIT" + }, + "node_modules/comma-separated-tokens": { + "version": "1.0.8", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "license": "MIT", + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.3", + "license": "MIT", + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/ansi-styles": { + "version": "3.2.1", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/chalk": { + "version": "2.4.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/color-convert": { + "version": "1.9.3", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/command-line-usage/node_modules/color-name": { + "version": "1.1.3", + "license": "MIT" + }, + "node_modules/command-line-usage/node_modules/escape-string-regexp": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/command-line-usage/node_modules/has-flag": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/supports-color": { + "version": "5.5.0", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/compressible": { + "version": "2.0.18", + "license": "MIT", + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.7.4", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "license": "MIT" + }, + "node_modules/connect-history-api-fallback": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "license": "MIT" + }, + "node_modules/cookie": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/copy-webpack-plugin": { + "version": "13.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-parent": "^6.0.1", + "normalize-path": "^3.0.0", + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2", + "tinyglobby": "^0.2.12" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "license": "MIT", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cra-template-typescript": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/cross-env": { + "version": "7.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-color-keywords": { + "version": "1.0.0", + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/css-loader": { + "version": "7.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.27.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/css-loader/node_modules/semver": { + "version": "7.7.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/css-select": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-to-react-native": { + "version": "3.2.0", + "license": "MIT", + "dependencies": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^4.0.2" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "license": "MIT" + }, + "node_modules/d3-array": { + "version": "3.2.4", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-binarytree": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/d3-color": { + "version": "3.1.0", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-delaunay": { + "version": "6.0.4", + "license": "ISC", + "dependencies": { + "delaunator": "5" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dispatch": { + "version": "3.0.1", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-drag": { + "version": "3.0.0", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-selection": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-force-3d": { + "version": "3.0.5", + "license": "MIT", + "dependencies": { + "d3-binarytree": "1", + "d3-dispatch": "1 - 3", + "d3-octree": "1", + "d3-quadtree": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-graphviz": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/d3-graphviz/-/d3-graphviz-2.6.1.tgz", + "integrity": "sha512-878AFSagQyr5tTOrM7YiVYeUC2/NoFcOB3/oew+LAML0xekyJSw9j3WOCUMBsc95KYe9XBYZ+SKKuObVya1tJQ==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-dispatch": "^1.0.3", + "d3-format": "^1.2.0", + "d3-interpolate": "^1.1.5", + "d3-path": "^1.0.5", + "d3-selection": "^1.1.0", + "d3-timer": "^1.0.6", + "d3-transition": "^1.1.1", + "d3-zoom": "^1.5.0", + "viz.js": "^1.8.2" + } + }, + "node_modules/d3-graphviz/node_modules/d3-color": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.4.1.tgz", + "integrity": "sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q==", + "license": "BSD-3-Clause" + }, + "node_modules/d3-graphviz/node_modules/d3-dispatch": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.6.tgz", + "integrity": "sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA==", + "license": "BSD-3-Clause" + }, + "node_modules/d3-graphviz/node_modules/d3-drag": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-1.2.5.tgz", + "integrity": "sha512-rD1ohlkKQwMZYkQlYVCrSFxsWPzI97+W+PaEIBNTMxRuxz9RF0Hi5nJWHGVJ3Om9d2fRTe1yOBINJyy/ahV95w==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-dispatch": "1", + "d3-selection": "1" + } + }, + "node_modules/d3-graphviz/node_modules/d3-ease": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.7.tgz", + "integrity": "sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ==", + "license": "BSD-3-Clause" + }, + "node_modules/d3-graphviz/node_modules/d3-format": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.4.5.tgz", + "integrity": "sha512-J0piedu6Z8iB6TbIGfZgDzfXxUFN3qQRMofy2oPdXzQibYGqPB/9iMcxr/TGalU+2RsyDO+U4f33id8tbnSRMQ==", + "license": "BSD-3-Clause" + }, + "node_modules/d3-graphviz/node_modules/d3-interpolate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.4.0.tgz", + "integrity": "sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-color": "1" + } + }, + "node_modules/d3-graphviz/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "license": "BSD-3-Clause" + }, + "node_modules/d3-graphviz/node_modules/d3-selection": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.4.2.tgz", + "integrity": "sha512-SJ0BqYihzOjDnnlfyeHT0e30k0K1+5sR3d5fNueCNeuhZTnGw4M4o8mqJchSwgKMXCNFo+e2VTChiSJ0vYtXkg==", + "license": "BSD-3-Clause" + }, + "node_modules/d3-graphviz/node_modules/d3-timer": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.10.tgz", + "integrity": "sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw==", + "license": "BSD-3-Clause" + }, + "node_modules/d3-graphviz/node_modules/d3-transition": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.3.2.tgz", + "integrity": "sha512-sc0gRU4PFqZ47lPVHloMn9tlPcv8jxgOQg+0zjhfZXMQuvppjG6YuwdMBE0TuqCZjeJkLecku/l9R0JPcRhaDA==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-color": "1", + "d3-dispatch": "1", + "d3-ease": "1", + "d3-interpolate": "1", + "d3-selection": "^1.1.0", + "d3-timer": "1" + } + }, + "node_modules/d3-graphviz/node_modules/d3-zoom": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-1.8.3.tgz", + "integrity": "sha512-VoLXTK4wvy1a0JpH2Il+F2CiOhVu7VRXWF5M/LroMIh3/zBAC3WAt7QoIvPibOavVo20hN6/37vwAsdBejLyKQ==", + "license": "BSD-3-Clause", + "dependencies": { + "d3-dispatch": "1", + "d3-drag": "1", + "d3-interpolate": "1", + "d3-selection": "1", + "d3-transition": "1" + } + }, + "node_modules/d3-graphviz/node_modules/viz.js": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/viz.js/-/viz.js-1.8.2.tgz", + "integrity": "sha512-W+1+N/hdzLpQZEcvz79n2IgUE9pfx6JLdHh3Kh8RGvLL8P1LdJVQmi2OsDcLdY4QVID4OUy+FPelyerX0nJxIQ==", + "deprecated": "2.x is no longer supported, 3.x published as @viz-js/viz", + "license": "MIT" + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-octree": { + "version": "1.1.0", + "license": "MIT" + }, + "node_modules/d3-path": { + "version": "3.1.0", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-quadtree": { + "version": "3.0.1", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale-chromatic": { + "version": "3.1.0", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-interpolate": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-selection": { + "version": "3.0.0", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-transition": { + "version": "3.0.1", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-dispatch": "1 - 3", + "d3-ease": "1 - 3", + "d3-interpolate": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "d3-selection": "2 - 3" + } + }, + "node_modules/d3-zoom": { + "version": "3.0.0", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "2 - 3", + "d3-transition": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/dagre": { + "version": "0.8.5", + "license": "MIT", + "dependencies": { + "graphlib": "^2.1.8", + "lodash": "^4.17.15" + } + }, + "node_modules/data-bind-mapper": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "accessor-fn": "1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decode-base64": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/decode-base64/-/decode-base64-3.0.2.tgz", + "integrity": "sha512-hgXhqIon8A1gznsTnvsyHFH+n2Jh20VVHnbiSDCBtpoaeCxpzbFJDtkWFVEaGF179d0y67Akdnxz4ipi/7Dcjg==", + "license": "MIT", + "dependencies": { + "node-buffer-encoding": "^1.0.3" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/default-browser": { + "version": "5.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delaunator": { + "version": "5.0.1", + "license": "ISC", + "dependencies": { + "robust-predicates": "^3.0.2" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/dns-packet": { + "version": "5.6.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@leichtgewicht/ip-codec": "^2.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dom-converter": { + "version": "0.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "utila": "~0.4" + } + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/dom-serializer": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "4.3.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.8.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/dotenv": { + "version": "8.6.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=10" + } + }, + "node_modules/dotenv-defaults": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "dotenv": "^8.2.0" + } + }, + "node_modules/dotenv-webpack": { + "version": "8.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "dotenv-defaults": "^2.0.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "webpack": "^4 || ^5" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.130", + "dev": true, + "license": "ISC" + }, + "node_modules/elkjs": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/elkjs/-/elkjs-0.10.0.tgz", + "integrity": "sha512-v/3r+3Bl2NMrWmVoRTMBtHtWvRISTix/s9EfnsfEWApNrsmNjqgqJOispCGg46BPwIFdkag3N/HYSxJczvCm6w==", + "license": "EPL-2.0" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.1", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "2.2.0", + "dev": true, + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/envinfo": { + "version": "7.14.0", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.6.0", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ethers": { + "version": "6.13.5", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ethers/node_modules/@types/node": { + "version": "22.7.5", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/ethers/node_modules/undici-types": { + "version": "6.19.8", + "license": "MIT" + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "dev": true, + "license": "MIT" + }, + "node_modules/events": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/express": { + "version": "4.21.2", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/content-disposition": { + "version": "0.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.7.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/express/node_modules/path-to-regexp": { + "version": "0.1.12", + "dev": true, + "license": "MIT" + }, + "node_modules/express/node_modules/range-parser": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.6", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fault": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fdir": { + "version": "6.4.3", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/find-replace": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/find-root": { + "version": "1.1.0", + "license": "MIT" + }, + "node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/float-tooltip": { + "version": "1.7.5", + "license": "MIT", + "dependencies": { + "d3-selection": "2 - 3", + "kapsule": "^1.16", + "preact": "10" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/force-graph": { + "version": "1.49.5", + "license": "MIT", + "dependencies": { + "@tweenjs/tween.js": "18 - 25", + "accessor-fn": "1", + "bezier-js": "3 - 6", + "canvas-color-tracker": "^1.3", + "d3-array": "1 - 3", + "d3-drag": "2 - 3", + "d3-force-3d": "2 - 3", + "d3-scale": "1 - 4", + "d3-scale-chromatic": "1 - 3", + "d3-selection": "2 - 3", + "d3-zoom": "2 - 3", + "float-tooltip": "^1.6", + "index-array-by": "1", + "kapsule": "^1.16", + "lodash-es": "4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/format": { + "version": "0.2.2", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "7.0.1", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function-once": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/function-once/-/function-once-3.0.1.tgz", + "integrity": "sha512-bE3E8REk4jANDot3l0sLFkXgywBwzFKsmbwdnVHLJUnt/3kV6dNG0oJJqoRBuS1Z9Lr4ZoQgwV0ZNLDgWDbv7Q==", + "license": "MIT" + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.1.7", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/gopd": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "license": "ISC" + }, + "node_modules/graphlib": { + "version": "2.1.8", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.15" + } + }, + "node_modules/graphviz-react": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/graphviz-react/-/graphviz-react-1.2.5.tgz", + "integrity": "sha512-IRFDzEt09hRzfqrrvAW1PAPBqG4t8hykArcoxq7UhEqO5RUKCBN6126D6rjiL2QAwAznbUSg0Fba2RnSH2V4sA==", + "license": "MIT", + "dependencies": { + "d3-graphviz": "^2.6.1" + }, + "engines": { + "npm": ">= 8.3" + }, + "peerDependencies": { + "react": ">= 16.13.1" + } + }, + "node_modules/graphviz-wasm": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/graphviz-wasm/-/graphviz-wasm-3.0.2.tgz", + "integrity": "sha512-aaO9dxQ7LTk9zvelCajRRSdSB+ZLniL5DNSkuLXAfIAbVvYCqlLmxz4zWC2LBbNNT+w6vp8Du8SvAVxH1bSVBQ==", + "dependencies": { + "decode-base64": "^3.0.1", + "function-once": "^3.0.0" + } + }, + "node_modules/handle-thing": { + "version": "2.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hast-util-parse-selector": { + "version": "2.2.5", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "6.0.0", + "license": "MIT", + "dependencies": { + "@types/hast": "^2.0.0", + "comma-separated-tokens": "^1.0.0", + "hast-util-parse-selector": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/he": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/highlight.js": { + "version": "10.7.3", + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/highlightjs-vue": { + "version": "1.0.0", + "license": "CC0-1.0" + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "license": "MIT" + }, + "node_modules/hpack.js": { + "version": "2.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "node_modules/hpack.js/node_modules/readable-stream": { + "version": "2.3.8", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/hpack.js/node_modules/safe-buffer": { + "version": "5.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/hpack.js/node_modules/string_decoder": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/html-minifier-terser": { + "version": "6.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "camel-case": "^4.1.2", + "clean-css": "^5.2.2", + "commander": "^8.3.0", + "he": "^1.2.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.10.0" + }, + "bin": { + "html-minifier-terser": "cli.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/html-to-image": { + "version": "1.11.13", + "resolved": "https://registry.npmjs.org/html-to-image/-/html-to-image-1.11.13.tgz", + "integrity": "sha512-cuOPoI7WApyhBElTTb9oqsawRvZ0rHhaHwghRLlTuffoD1B2aDemlCruLeZrUIIdvG7gs9xeELEPm6PhuASqrg==", + "license": "MIT" + }, + "node_modules/html-webpack-plugin": { + "version": "5.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/html-minifier-terser": "^6.0.0", + "html-minifier-terser": "^6.0.2", + "lodash": "^4.17.21", + "pretty-error": "^4.0.0", + "tapable": "^2.0.0" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/html-webpack-plugin" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.20.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/htmlparser2": { + "version": "6.1.0", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, + "node_modules/http-deceiver": { + "version": "1.2.7", + "dev": true, + "license": "MIT" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.9", + "dev": true, + "license": "MIT" + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "dev": true, + "license": "MIT", + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-middleware": { + "version": "2.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-proxy": "^1.17.8", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "@types/express": "^4.17.13" + }, + "peerDependenciesMeta": { + "@types/express": { + "optional": true + } + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/hyperdyperid": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.18" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/index-array-by": { + "version": "1.4.2", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "license": "ISC" + }, + "node_modules/internmap": { + "version": "2.0.3", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/interpret": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ipaddr.js": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-decimal": { + "version": "1.0.4", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-network-error": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-port-reachable": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jerrypick": { + "version": "1.1.1", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/kapsule": { + "version": "1.16.3", + "license": "MIT", + "dependencies": { + "lodash-es": "4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/launch-editor": { + "version": "2.10.0", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "shell-quote": "^1.8.1" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "license": "MIT" + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "license": "MIT" + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "license": "MIT" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/lowlight": { + "version": "1.20.0", + "license": "MIT", + "dependencies": { + "fault": "^1.0.0", + "highlight.js": "~10.7.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "4.17.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/json-pack": "^1.0.3", + "@jsonjoy.com/util": "^1.3.0", + "tree-dump": "^1.0.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">= 4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/methods": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types/node_modules/mime-db": { + "version": "1.52.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "dev": true, + "license": "ISC" + }, + "node_modules/minimatch": { + "version": "3.1.2", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/multicast-dns": { + "version": "7.2.5", + "dev": true, + "license": "MIT", + "dependencies": { + "dns-packet": "^5.2.2", + "thunky": "^1.0.2" + }, + "bin": { + "multicast-dns": "cli.js" + } + }, + "node_modules/nanoid": { + "version": "3.3.11", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "dev": true, + "license": "MIT" + }, + "node_modules/ngraph.events": { + "version": "1.2.2", + "license": "BSD-3-Clause" + }, + "node_modules/ngraph.forcelayout": { + "version": "3.3.1", + "license": "BSD-3-Clause", + "dependencies": { + "ngraph.events": "^1.0.0", + "ngraph.merge": "^1.0.0", + "ngraph.random": "^1.0.0" + } + }, + "node_modules/ngraph.graph": { + "version": "20.0.1", + "license": "BSD-3-Clause", + "dependencies": { + "ngraph.events": "^1.2.1" + } + }, + "node_modules/ngraph.merge": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/ngraph.random": { + "version": "1.2.0", + "license": "BSD-3-Clause" + }, + "node_modules/nipplejs": { + "version": "0.10.2", + "license": "MIT" + }, + "node_modules/no-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-buffer-encoding": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/node-buffer-encoding/-/node-buffer-encoding-1.0.3.tgz", + "integrity": "sha512-9hJZNChhQoCN1rCFScJiEwtzvWEJw2wSnu2nhDLD/YOYl1Ce8GbtnorsnjwwjpSk4sWE7zSp2etX6j7+bO7fVA==", + "license": "MIT" + }, + "node_modules/node-forge": { + "version": "1.3.1", + "dev": true, + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-releases": { + "version": "2.0.19", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/npm/-/npm-11.3.0.tgz", + "integrity": "sha512-luthFIP0nFX3+nTfYbWI3p4hP4CiVnKOZ5jdxnF2x7B+Shz8feiSJCLLzgJUNxQ2cDdTaVUiH6RRsMT++vIMZg==", + "bundleDependencies": [ + "@isaacs/string-locale-compare", + "@npmcli/arborist", + "@npmcli/config", + "@npmcli/fs", + "@npmcli/map-workspaces", + "@npmcli/package-json", + "@npmcli/promise-spawn", + "@npmcli/redact", + "@npmcli/run-script", + "@sigstore/tuf", + "abbrev", + "archy", + "cacache", + "chalk", + "ci-info", + "cli-columns", + "fastest-levenshtein", + "fs-minipass", + "glob", + "graceful-fs", + "hosted-git-info", + "ini", + "init-package-json", + "is-cidr", + "json-parse-even-better-errors", + "libnpmaccess", + "libnpmdiff", + "libnpmexec", + "libnpmfund", + "libnpmorg", + "libnpmpack", + "libnpmpublish", + "libnpmsearch", + "libnpmteam", + "libnpmversion", + "make-fetch-happen", + "minimatch", + "minipass", + "minipass-pipeline", + "ms", + "node-gyp", + "nopt", + "normalize-package-data", + "npm-audit-report", + "npm-install-checks", + "npm-package-arg", + "npm-pick-manifest", + "npm-profile", + "npm-registry-fetch", + "npm-user-validate", + "p-map", + "pacote", + "parse-conflict-json", + "proc-log", + "qrcode-terminal", + "read", + "semver", + "spdx-expression-parse", + "ssri", + "supports-color", + "tar", + "text-table", + "tiny-relative-date", + "treeverse", + "validate-npm-package-name", + "which" + ], + "license": "Artistic-2.0", + "workspaces": [ + "docs", + "smoke-tests", + "mock-globals", + "mock-registry", + "workspaces/*" + ], + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/arborist": "^9.0.2", + "@npmcli/config": "^10.2.0", + "@npmcli/fs": "^4.0.0", + "@npmcli/map-workspaces": "^4.0.2", + "@npmcli/package-json": "^6.1.1", + "@npmcli/promise-spawn": "^8.0.2", + "@npmcli/redact": "^3.1.1", + "@npmcli/run-script": "^9.1.0", + "@sigstore/tuf": "^3.0.0", + "abbrev": "^3.0.0", + "archy": "~1.0.0", + "cacache": "^19.0.1", + "chalk": "^5.4.1", + "ci-info": "^4.2.0", + "cli-columns": "^4.0.0", + "fastest-levenshtein": "^1.0.16", + "fs-minipass": "^3.0.3", + "glob": "^10.4.5", + "graceful-fs": "^4.2.11", + "hosted-git-info": "^8.0.2", + "ini": "^5.0.0", + "init-package-json": "^8.0.0", + "is-cidr": "^5.1.1", + "json-parse-even-better-errors": "^4.0.0", + "libnpmaccess": "^10.0.0", + "libnpmdiff": "^8.0.2", + "libnpmexec": "^10.1.1", + "libnpmfund": "^7.0.2", + "libnpmorg": "^8.0.0", + "libnpmpack": "^9.0.2", + "libnpmpublish": "^11.0.0", + "libnpmsearch": "^9.0.0", + "libnpmteam": "^8.0.0", + "libnpmversion": "^8.0.0", + "make-fetch-happen": "^14.0.3", + "minimatch": "^9.0.5", + "minipass": "^7.1.1", + "minipass-pipeline": "^1.2.4", + "ms": "^2.1.2", + "node-gyp": "^11.2.0", + "nopt": "^8.1.0", + "normalize-package-data": "^7.0.0", + "npm-audit-report": "^6.0.0", + "npm-install-checks": "^7.1.1", + "npm-package-arg": "^12.0.2", + "npm-pick-manifest": "^10.0.0", + "npm-profile": "^11.0.1", + "npm-registry-fetch": "^18.0.2", + "npm-user-validate": "^3.0.0", + "p-map": "^7.0.3", + "pacote": "^21.0.0", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", + "qrcode-terminal": "^0.12.0", + "read": "^4.1.0", + "semver": "^7.7.1", + "spdx-expression-parse": "^4.0.0", + "ssri": "^12.0.0", + "supports-color": "^10.0.0", + "tar": "^6.2.1", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^3.0.0", + "validate-npm-package-name": "^6.0.0", + "which": "^5.0.0" + }, + "bin": { + "npm": "bin/npm-cli.js", + "npx": "bin/npx-cli.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/@isaacs/cliui": { + "version": "8.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/npm/node_modules/@isaacs/string-locale-compare": { + "version": "1.1.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/@npmcli/agent": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/arborist": { + "version": "9.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^4.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/metavuln-calculator": "^9.0.0", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.1", + "@npmcli/query": "^4.0.0", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^9.0.1", + "bin-links": "^5.0.0", + "cacache": "^19.0.1", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^8.0.0", + "json-stringify-nice": "^1.1.4", + "lru-cache": "^10.2.2", + "minimatch": "^9.0.4", + "nopt": "^8.0.0", + "npm-install-checks": "^7.1.0", + "npm-package-arg": "^12.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.1", + "pacote": "^21.0.0", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", + "proggy": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^3.0.1", + "read-package-json-fast": "^4.0.0", + "semver": "^7.3.7", + "ssri": "^12.0.0", + "treeverse": "^3.0.0", + "walk-up-path": "^4.0.0" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/@npmcli/config": { + "version": "10.2.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/package-json": "^6.0.1", + "ci-info": "^4.0.0", + "ini": "^5.0.0", + "nopt": "^8.1.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "walk-up-path": "^4.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/@npmcli/fs": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/git": { + "version": "6.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/promise-spawn": "^8.0.0", + "ini": "^5.0.0", + "lru-cache": "^10.0.1", + "npm-pick-manifest": "^10.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/installed-package-contents": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-bundled": "^4.0.0", + "npm-normalize-package-bin": "^4.0.0" + }, + "bin": { + "installed-package-contents": "bin/index.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/map-workspaces": { + "version": "4.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/package-json": "^6.0.0", + "glob": "^10.2.2", + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { + "version": "9.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cacache": "^19.0.0", + "json-parse-even-better-errors": "^4.0.0", + "pacote": "^21.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/@npmcli/name-from-folder": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/node-gyp": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/package-json": { + "version": "6.1.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^6.0.0", + "glob": "^10.2.2", + "hosted-git-info": "^8.0.0", + "json-parse-even-better-errors": "^4.0.0", + "proc-log": "^5.0.0", + "semver": "^7.5.3", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/promise-spawn": { + "version": "8.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "which": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/query": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^6.1.2" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/redact": { + "version": "3.1.1", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/run-script": { + "version": "9.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.0", + "@npmcli/promise-spawn": "^8.0.0", + "node-gyp": "^11.0.0", + "proc-log": "^5.0.0", + "which": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/npm/node_modules/@sigstore/bundle": { + "version": "3.1.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.4.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@sigstore/core": { + "version": "2.0.0", + "inBundle": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@sigstore/protobuf-specs": { + "version": "0.4.0", + "inBundle": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@sigstore/sign": { + "version": "3.1.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^3.1.0", + "@sigstore/core": "^2.0.0", + "@sigstore/protobuf-specs": "^0.4.0", + "make-fetch-happen": "^14.0.2", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@sigstore/tuf": { + "version": "3.1.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.4.0", + "tuf-js": "^3.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@sigstore/verify": { + "version": "2.1.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^3.1.0", + "@sigstore/core": "^2.0.0", + "@sigstore/protobuf-specs": "^0.4.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@tufjs/canonical-json": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@tufjs/models": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^9.0.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/abbrev": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/agent-base": { + "version": "7.1.3", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/npm/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/ansi-styles": { + "version": "6.2.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/npm/node_modules/aproba": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/archy": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/balanced-match": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/bin-links": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cmd-shim": "^7.0.0", + "npm-normalize-package-bin": "^4.0.0", + "proc-log": "^5.0.0", + "read-cmd-shim": "^5.0.0", + "write-file-atomic": "^6.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/binary-extensions": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=18.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/brace-expansion": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm/node_modules/cacache": { + "version": "19.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^4.0.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "tar": "^7.4.3", + "unique-filename": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/chownr": { + "version": "3.0.0", + "inBundle": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/minizlib": { + "version": "3.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/mkdirp": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/tar": { + "version": "7.4.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/yallist": { + "version": "5.0.0", + "inBundle": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/chalk": { + "version": "5.4.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/npm/node_modules/chownr": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ci-info": { + "version": "4.2.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/cidr-regex": { + "version": "4.1.3", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "ip-regex": "^5.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/npm/node_modules/cli-columns": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/cmd-shim": { + "version": "7.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/color-convert": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/npm/node_modules/color-name": { + "version": "1.1.4", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/common-ancestor-path": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/cross-spawn": { + "version": "7.0.6", + "inBundle": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/cssesc": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/debug": { + "version": "4.4.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/npm/node_modules/diff": { + "version": "7.0.0", + "inBundle": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/npm/node_modules/eastasianwidth": { + "version": "0.2.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/emoji-regex": { + "version": "8.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/encoding": { + "version": "0.1.13", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/npm/node_modules/env-paths": { + "version": "2.2.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/err-code": { + "version": "2.0.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/exponential-backoff": { + "version": "3.1.2", + "inBundle": true, + "license": "Apache-2.0" + }, + "node_modules/npm/node_modules/fastest-levenshtein": { + "version": "1.0.16", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/npm/node_modules/foreground-child": { + "version": "3.3.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/fs-minipass": { + "version": "3.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/glob": { + "version": "10.4.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/graceful-fs": { + "version": "4.2.11", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/hosted-git-info": { + "version": "8.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/http-cache-semantics": { + "version": "4.1.1", + "inBundle": true, + "license": "BSD-2-Clause" + }, + "node_modules/npm/node_modules/http-proxy-agent": { + "version": "7.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/npm/node_modules/https-proxy-agent": { + "version": "7.0.6", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/npm/node_modules/iconv-lite": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm/node_modules/ignore-walk": { + "version": "7.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/imurmurhash": { + "version": "0.1.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/npm/node_modules/ini": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/init-package-json": { + "version": "8.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/package-json": "^6.1.0", + "npm-package-arg": "^12.0.0", + "promzard": "^2.0.0", + "read": "^4.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "^6.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/ip-address": { + "version": "9.0.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/npm/node_modules/ip-regex": { + "version": "5.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/is-cidr": { + "version": "5.1.1", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "cidr-regex": "^4.1.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/npm/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/isexe": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/jackspeak": { + "version": "3.4.3", + "inBundle": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/npm/node_modules/jsbn": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/json-parse-even-better-errors": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/json-stringify-nice": { + "version": "1.1.4", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/jsonparse": { + "version": "1.3.1", + "engines": [ + "node >= 0.2.0" + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff": { + "version": "6.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff-apply": { + "version": "5.5.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/libnpmaccess": { + "version": "10.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-package-arg": "^12.0.0", + "npm-registry-fetch": "^18.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/libnpmdiff": { + "version": "8.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^9.0.2", + "@npmcli/installed-package-contents": "^3.0.0", + "binary-extensions": "^3.0.0", + "diff": "^7.0.0", + "minimatch": "^9.0.4", + "npm-package-arg": "^12.0.0", + "pacote": "^21.0.0", + "tar": "^6.2.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/libnpmexec": { + "version": "10.1.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^9.0.2", + "@npmcli/package-json": "^6.1.1", + "@npmcli/run-script": "^9.0.1", + "ci-info": "^4.0.0", + "npm-package-arg": "^12.0.0", + "pacote": "^21.0.0", + "proc-log": "^5.0.0", + "read": "^4.0.0", + "read-package-json-fast": "^4.0.0", + "semver": "^7.3.7", + "walk-up-path": "^4.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/libnpmfund": { + "version": "7.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^9.0.2" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/libnpmorg": { + "version": "8.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^18.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/libnpmpack": { + "version": "9.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^9.0.2", + "@npmcli/run-script": "^9.0.1", + "npm-package-arg": "^12.0.0", + "pacote": "^21.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/libnpmpublish": { + "version": "11.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ci-info": "^4.0.0", + "normalize-package-data": "^7.0.0", + "npm-package-arg": "^12.0.0", + "npm-registry-fetch": "^18.0.1", + "proc-log": "^5.0.0", + "semver": "^7.3.7", + "sigstore": "^3.0.0", + "ssri": "^12.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/libnpmsearch": { + "version": "9.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^18.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/libnpmteam": { + "version": "8.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^18.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/libnpmversion": { + "version": "8.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^6.0.1", + "@npmcli/run-script": "^9.0.1", + "json-parse-even-better-errors": "^4.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.7" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/lru-cache": { + "version": "10.4.3", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/make-fetch-happen": { + "version": "14.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^3.0.0", + "cacache": "^19.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "ssri": "^12.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/make-fetch-happen/node_modules/negotiator": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/npm/node_modules/minimatch": { + "version": "9.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/minipass": { + "version": "7.1.2", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/npm/node_modules/minipass-collect": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/npm/node_modules/minipass-fetch": { + "version": "4.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^3.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/minipass-fetch/node_modules/minizlib": { + "version": "3.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/npm/node_modules/minipass-flush": { + "version": "1.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline": { + "version": "1.2.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized": { + "version": "1.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minizlib": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/mkdirp": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ms": { + "version": "2.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/mute-stream": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/node-gyp": { + "version": "11.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^14.0.3", + "nopt": "^8.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "tar": "^7.4.3", + "tinyglobby": "^0.2.12", + "which": "^5.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/chownr": { + "version": "3.0.0", + "inBundle": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minizlib": { + "version": "3.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/mkdirp": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/tar": { + "version": "7.4.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/yallist": { + "version": "5.0.0", + "inBundle": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/nopt": { + "version": "8.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^3.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/normalize-package-data": { + "version": "7.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^8.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-audit-report": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-bundled": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-normalize-package-bin": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-install-checks": { + "version": "7.1.1", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-normalize-package-bin": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-package-arg": { + "version": "12.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "hosted-git-info": "^8.0.0", + "proc-log": "^5.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^6.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-packlist": { + "version": "10.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ignore-walk": "^7.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/npm-pick-manifest": { + "version": "10.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-install-checks": "^7.1.0", + "npm-normalize-package-bin": "^4.0.0", + "npm-package-arg": "^12.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-profile": { + "version": "11.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^18.0.0", + "proc-log": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-registry-fetch": { + "version": "18.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/redact": "^3.0.0", + "jsonparse": "^1.3.1", + "make-fetch-happen": "^14.0.0", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minizlib": "^3.0.1", + "npm-package-arg": "^12.0.0", + "proc-log": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-registry-fetch/node_modules/minizlib": { + "version": "3.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/npm/node_modules/npm-user-validate": { + "version": "3.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/p-map": { + "version": "7.0.3", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/package-json-from-dist": { + "version": "1.0.1", + "inBundle": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/npm/node_modules/pacote": { + "version": "21.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^6.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/package-json": "^6.0.0", + "@npmcli/promise-spawn": "^8.0.0", + "@npmcli/run-script": "^9.0.0", + "cacache": "^19.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^7.0.2", + "npm-package-arg": "^12.0.0", + "npm-packlist": "^10.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "sigstore": "^3.0.0", + "ssri": "^12.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm/node_modules/parse-conflict-json": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^4.0.0", + "just-diff": "^6.0.0", + "just-diff-apply": "^5.2.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/path-key": { + "version": "3.1.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/path-scurry": { + "version": "1.11.1", + "inBundle": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/postcss-selector-parser": { + "version": "6.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/proc-log": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/proggy": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/promise-all-reject-late": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-call-limit": { + "version": "3.0.2", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-retry": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/promzard": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "read": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/qrcode-terminal": { + "version": "0.12.0", + "inBundle": true, + "bin": { + "qrcode-terminal": "bin/qrcode-terminal.js" + } + }, + "node_modules/npm/node_modules/read": { + "version": "4.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "mute-stream": "^2.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/read-cmd-shim": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/read-package-json-fast": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^4.0.0", + "npm-normalize-package-bin": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/retry": { + "version": "0.12.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm/node_modules/safer-buffer": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/npm/node_modules/semver": { + "version": "7.7.1", + "inBundle": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/shebang-command": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/shebang-regex": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/signal-exit": { + "version": "4.1.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/sigstore": { + "version": "3.1.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^3.1.0", + "@sigstore/core": "^2.0.0", + "@sigstore/protobuf-specs": "^0.4.0", + "@sigstore/sign": "^3.1.0", + "@sigstore/tuf": "^3.1.0", + "@sigstore/verify": "^2.1.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/smart-buffer": { + "version": "4.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks": { + "version": "2.8.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks-proxy-agent": { + "version": "8.0.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/npm/node_modules/spdx-correct": { + "version": "3.2.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-exceptions": { + "version": "2.5.0", + "inBundle": true, + "license": "CC-BY-3.0" + }, + "node_modules/npm/node_modules/spdx-expression-parse": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-license-ids": { + "version": "3.0.21", + "inBundle": true, + "license": "CC0-1.0" + }, + "node_modules/npm/node_modules/sprintf-js": { + "version": "1.1.3", + "inBundle": true, + "license": "BSD-3-Clause" + }, + "node_modules/npm/node_modules/ssri": { + "version": "12.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/string-width": { + "version": "4.2.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/supports-color": { + "version": "10.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/npm/node_modules/tar": { + "version": "6.2.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/text-table": { + "version": "0.2.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/tiny-relative-date": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/tinyglobby": { + "version": "0.2.12", + "inBundle": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/npm/node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.3", + "inBundle": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/npm/node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/npm/node_modules/treeverse": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/tuf-js": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tufjs/models": "3.0.1", + "debug": "^4.3.6", + "make-fetch-happen": "^14.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/unique-filename": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/unique-slug": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/util-deprecate": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/validate-npm-package-license": { + "version": "3.0.4", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/validate-npm-package-name": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/walk-up-path": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/npm/node_modules/which": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/which/node_modules/isexe": { + "version": "3.1.1", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/npm/node_modules/wrap-ansi": { + "version": "8.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "9.2.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { + "version": "5.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/write-file-atomic": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/yallist": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/nth-check": { + "version": "2.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/on-finished": { + "version": "2.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "10.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open/node_modules/is-wsl": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-retry": { + "version": "6.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/retry": "0.12.2", + "is-network-error": "^1.0.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/param-case": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-entities": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascal-case": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "license": "(WTFPL OR MIT)" + }, + "node_modules/path-key": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "license": "MIT" + }, + "node_modules/path-to-regexp": { + "version": "3.3.0", + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/polished": { + "version": "4.3.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.17.8" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postcss": { + "version": "8.5.3", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.2.1", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "7.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "license": "MIT" + }, + "node_modules/preact": { + "version": "10.26.4", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-error": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.20", + "renderkid": "^3.0.0" + } + }, + "node_modules/prismjs": { + "version": "1.30.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/prop-types": { + "version": "15.8.1", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "license": "MIT" + }, + "node_modules/property-information": { + "version": "5.6.0", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-addr/node_modules/ipaddr.js": { + "version": "1.9.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/bytes": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/react": { + "version": "18.3.1", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-force-graph": { + "version": "1.47.6", + "license": "MIT", + "dependencies": { + "3d-force-graph": "^1.76", + "3d-force-graph-ar": "^1.9", + "3d-force-graph-vr": "^3.0", + "force-graph": "^1.49", + "prop-types": "15", + "react-kapsule": "^2.5" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "react": "*" + } + }, + "node_modules/react-is": { + "version": "19.1.0", + "license": "MIT" + }, + "node_modules/react-kapsule": { + "version": "2.5.7", + "license": "MIT", + "dependencies": { + "jerrypick": "^1.1.1" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "react": ">=16.13.1" + } + }, + "node_modules/react-reconciler": { + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.32.0.tgz", + "integrity": "sha512-2NPMOzgTlG0ZWdIf3qG+dcbLSoAc/uLfOwckc3ofy5sSK0pLJqnQLpUFxvGcN2rlXSjnVtGeeFLNimCQEj5gOQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.26.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "react": "^19.1.0" + } + }, + "node_modules/react-reconciler/node_modules/scheduler": { + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", + "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", + "license": "MIT" + }, + "node_modules/react-router": { + "version": "7.4.1", + "license": "MIT", + "dependencies": { + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.4.1", + "license": "MIT", + "dependencies": { + "react-router": "7.4.1" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/react-syntax-highlighter": { + "version": "15.6.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.3.1", + "highlight.js": "^10.4.1", + "highlightjs-vue": "^1.0.0", + "lowlight": "^1.17.0", + "prismjs": "^1.27.0", + "refractor": "^3.6.0" + }, + "peerDependencies": { + "react": ">= 0.14.0" + } + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/reactflow": { + "version": "11.11.4", + "license": "MIT", + "dependencies": { + "@reactflow/background": "11.3.14", + "@reactflow/controls": "11.2.14", + "@reactflow/core": "11.11.4", + "@reactflow/minimap": "11.7.14", + "@reactflow/node-resizer": "2.2.14", + "@reactflow/node-toolbar": "1.3.14" + }, + "peerDependencies": { + "react": ">=17", + "react-dom": ">=17" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/rechoir": { + "version": "0.8.0", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/refractor": { + "version": "3.6.0", + "license": "MIT", + "dependencies": { + "hastscript": "^6.0.0", + "parse-entities": "^2.0.0", + "prismjs": "~1.27.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/refractor/node_modules/prismjs": { + "version": "1.27.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "license": "MIT" + }, + "node_modules/registry-auth-token": { + "version": "3.3.2", + "license": "MIT", + "dependencies": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/registry-url": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "rc": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/relateurl": { + "version": "0.2.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/renderkid": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "css-select": "^4.1.3", + "dom-converter": "^0.2.0", + "htmlparser2": "^6.1.0", + "lodash": "^4.17.21", + "strip-ansi": "^6.0.1" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/resolve": { + "version": "1.22.10", + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/robust-predicates": { + "version": "3.0.2", + "license": "Unlicense" + }, + "node_modules/run-applescript": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/scheduler": { + "version": "0.23.2", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/schema-utils": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/select-hose": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/selfsigned": { + "version": "2.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node-forge": "^1.3.0", + "node-forge": "^1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/send": { + "version": "0.19.0", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/range-parser": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve": { + "version": "14.2.4", + "license": "MIT", + "dependencies": { + "@zeit/schemas": "2.36.0", + "ajv": "8.12.0", + "arg": "5.0.2", + "boxen": "7.0.0", + "chalk": "5.0.1", + "chalk-template": "0.4.0", + "clipboardy": "3.0.0", + "compression": "1.7.4", + "is-port-reachable": "4.0.0", + "serve-handler": "6.1.6", + "update-check": "1.5.4" + }, + "bin": { + "serve": "build/main.js" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/serve-handler": { + "version": "6.1.6", + "license": "MIT", + "dependencies": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "mime-types": "2.1.18", + "minimatch": "3.1.2", + "path-is-inside": "1.0.2", + "path-to-regexp": "3.3.0", + "range-parser": "1.2.0" + } + }, + "node_modules/serve-handler/node_modules/mime-db": { + "version": "1.33.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-handler/node_modules/mime-types": { + "version": "2.1.18", + "license": "MIT", + "dependencies": { + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/debug": { + "version": "2.6.9", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/statuses": { + "version": "1.5.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-static": { + "version": "1.16.2", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve/node_modules/ajv": { + "version": "8.12.0", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "license": "MIT" + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "dev": true, + "license": "ISC" + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shallowequal": { + "version": "1.1.0", + "license": "MIT" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "license": "ISC" + }, + "node_modules/sockjs": { + "version": "0.3.24", + "dev": true, + "license": "MIT", + "dependencies": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/space-separated-tokens": { + "version": "1.1.5", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/spdy": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/spdy-transport": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-format": { + "version": "2.0.0", + "license": "WTFPL OR MIT" + }, + "node_modules/string-width": { + "version": "5.1.2", + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.1.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/style-loader": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.27.0" + } + }, + "node_modules/styled-components": { + "version": "6.1.17", + "license": "MIT", + "dependencies": { + "@emotion/is-prop-valid": "1.2.2", + "@emotion/unitless": "0.8.1", + "@types/stylis": "4.2.5", + "css-to-react-native": "3.2.0", + "csstype": "3.1.3", + "postcss": "8.4.49", + "shallowequal": "1.1.0", + "stylis": "4.3.2", + "tslib": "2.6.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/styled-components" + }, + "peerDependencies": { + "react": ">= 16.8.0", + "react-dom": ">= 16.8.0" + } + }, + "node_modules/styled-components/node_modules/@emotion/is-prop-valid": { + "version": "1.2.2", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.8.1" + } + }, + "node_modules/styled-components/node_modules/@emotion/memoize": { + "version": "0.8.1", + "license": "MIT" + }, + "node_modules/styled-components/node_modules/@emotion/unitless": { + "version": "0.8.1", + "license": "MIT" + }, + "node_modules/styled-components/node_modules/postcss": { + "version": "8.4.49", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/styled-components/node_modules/stylis": { + "version": "4.3.2", + "license": "MIT" + }, + "node_modules/styled-components/node_modules/tslib": { + "version": "2.6.2", + "license": "0BSD" + }, + "node_modules/stylis": { + "version": "4.2.0", + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "8.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/table-layout": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/terser": { + "version": "5.39.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.14", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "dev": true, + "license": "MIT" + }, + "node_modules/thingies": { + "version": "1.21.0", + "dev": true, + "license": "Unlicense", + "engines": { + "node": ">=10.18" + }, + "peerDependencies": { + "tslib": "^2" + } + }, + "node_modules/three": { + "version": "0.175.0", + "license": "MIT" + }, + "node_modules/three-forcegraph": { + "version": "1.42.13", + "license": "MIT", + "dependencies": { + "accessor-fn": "1", + "d3-array": "1 - 3", + "d3-force-3d": "2 - 3", + "d3-scale": "1 - 4", + "d3-scale-chromatic": "1 - 3", + "data-bind-mapper": "1", + "kapsule": "^1.16", + "ngraph.forcelayout": "3", + "ngraph.graph": "20", + "tinycolor2": "1" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "three": ">=0.118.3" + } + }, + "node_modules/three-pathfinding": { + "version": "1.3.0", + "license": "MIT", + "peerDependencies": { + "three": "0.x.x" + } + }, + "node_modules/three-render-objects": { + "version": "1.39.3", + "license": "MIT", + "dependencies": { + "@tweenjs/tween.js": "18 - 25", + "accessor-fn": "1", + "float-tooltip": "^1.7", + "kapsule": "^1.16", + "polished": "4" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "three": ">=0.168" + } + }, + "node_modules/thunky": { + "version": "1.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/tinycolor2": { + "version": "1.6.0", + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.12", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tree-dump": { + "version": "1.0.2", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/ts-command-line-args": { + "version": "2.5.1", + "license": "ISC", + "dependencies": { + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.0.0" + }, + "bin": { + "write-markdown": "dist/write-markdown.js" + } + }, + "node_modules/ts-command-line-args/node_modules/ansi-styles": { + "version": "4.3.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ts-command-line-args/node_modules/chalk": { + "version": "4.1.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ts-command-line-args/node_modules/supports-color": { + "version": "7.2.0", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-essentials": { + "version": "7.0.3", + "license": "MIT", + "peerDependencies": { + "typescript": ">=3.7.0" + } + }, + "node_modules/ts-graphviz": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ts-graphviz/-/ts-graphviz-3.0.0.tgz", + "integrity": "sha512-SZWxL/WVOGm/5TUO+6n6MxJXjIxZ5uLcxpJGdXkTsFJ738pJNKXWIfbF/KBselW/7+WdCLwz29nGQwbsoKNIsg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ts-graphviz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ts-graphviz" + } + ], + "license": "MIT", + "dependencies": { + "@ts-graphviz/adapter": "^3.0.0", + "@ts-graphviz/ast": "^3.0.0", + "@ts-graphviz/common": "^3.0.0", + "@ts-graphviz/core": "^3.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/ts-loader": { + "version": "9.5.2", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4", + "source-map": "^0.7.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "typescript": "*", + "webpack": "^5.0.0" + } + }, + "node_modules/ts-loader/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ts-loader/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ts-loader/node_modules/semver": { + "version": "7.7.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-loader/node_modules/source-map": { + "version": "0.7.4", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 8" + } + }, + "node_modules/ts-loader/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tslib": { + "version": "2.7.0", + "license": "0BSD" + }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "license": "ISC" + }, + "node_modules/type-fest": { + "version": "2.19.0", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "dev": true, + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typechain": { + "version": "8.3.2", + "license": "MIT", + "dependencies": { + "@types/prettier": "^2.1.1", + "debug": "^4.3.1", + "fs-extra": "^7.0.0", + "glob": "7.1.7", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "prettier": "^2.3.1", + "ts-command-line-args": "^2.2.0", + "ts-essentials": "^7.0.1" + }, + "bin": { + "typechain": "dist/cli/cli.js" + }, + "peerDependencies": { + "typescript": ">=4.3.0" + } + }, + "node_modules/typechain/node_modules/prettier": { + "version": "2.8.8", + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/typescript": { + "version": "5.8.2", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-language-server": { + "version": "4.3.4", + "license": "Apache-2.0", + "bin": { + "typescript-language-server": "lib/cli.mjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "dev": true, + "license": "MIT" + }, + "node_modules/universalify": { + "version": "0.1.2", + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/update-check": { + "version": "1.5.4", + "license": "MIT", + "dependencies": { + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/use-sync-external-store": { + "version": "1.5.0", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/utila": { + "version": "0.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/watchpack": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wbuf": { + "version": "1.7.3", + "dev": true, + "license": "MIT", + "dependencies": { + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/webpack": { + "version": "5.98.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.11", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "^0.6.1", + "@webpack-cli/configtest": "^3.0.1", + "@webpack-cli/info": "^3.0.1", + "@webpack-cli/serve": "^3.0.1", + "colorette": "^2.0.14", + "commander": "^12.1.0", + "cross-spawn": "^7.0.3", + "envinfo": "^7.14.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^6.0.1" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.82.0" + }, + "peerDependenciesMeta": { + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "12.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/webpack-dev-middleware": { + "version": "7.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "colorette": "^2.0.10", + "memfs": "^4.6.0", + "mime-types": "^2.1.31", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + } + } + }, + "node_modules/webpack-dev-middleware/node_modules/range-parser": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/webpack-dev-server": { + "version": "5.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/bonjour": "^3.5.13", + "@types/connect-history-api-fallback": "^1.5.4", + "@types/express": "^4.17.21", + "@types/express-serve-static-core": "^4.17.21", + "@types/serve-index": "^1.9.4", + "@types/serve-static": "^1.15.5", + "@types/sockjs": "^0.3.36", + "@types/ws": "^8.5.10", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.2.1", + "chokidar": "^3.6.0", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "express": "^4.21.2", + "graceful-fs": "^4.2.6", + "http-proxy-middleware": "^2.0.7", + "ipaddr.js": "^2.1.0", + "launch-editor": "^2.6.1", + "open": "^10.0.3", + "p-retry": "^6.2.0", + "schema-utils": "^4.2.0", + "selfsigned": "^2.4.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^7.4.2", + "ws": "^8.18.0" + }, + "bin": { + "webpack-dev-server": "bin/webpack-dev-server.js" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server/node_modules/ws": { + "version": "8.18.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/webpack-merge": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/widest-line": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "string-width": "^5.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/wordwrapjs": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.17.1", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yaml": { + "version": "1.10.2", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/zustand": { + "version": "4.5.6", + "license": "MIT", + "dependencies": { + "use-sync-external-store": "^1.2.2" + }, + "engines": { + "node": ">=12.7.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "immer": ">=9.0.6", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + } + } + } + } +} diff --git a/src/api/api_handlers_db.ml b/src/api/api_handlers_db.ml index cd4cda23..2f923f00 100644 --- a/src/api/api_handlers_db.ml +++ b/src/api/api_handlers_db.ml @@ -523,7 +523,6 @@ let get_transaction_tags_db_eth (_, hash) _ = (txr.trd_transaction_receipt.r_transaction_hash :> string) tx_hash) receipts_decode in -<<<<<<< HEAD let live_analyses = List.map (fun analysis_type -> @@ -543,70 +542,11 @@ let get_transaction_tags_db_eth (_, hash) _ = | `liquidate -> Eth_analysis.Eth_analyse.tx_detect (TAI_Flashloan receipt_decode) -======= - let> live_analyses = - Lwt_list.map_s - (fun analysis_type -> - match analysis_type with - | `arbitrage -> - let> analyse = - Eth_analysis.Eth_analyse.tx_detect - (TAI_Arbitrage (traces_decode, cft_input)) in - Lwt.return @@ Option.to_list analyse - | `transfer -> - let> analyse = - Eth_analysis.Eth_analyse.tx_detect - (TAI_Transfer (traces_decode, cft_input)) in - Lwt.return @@ Option.to_list analyse - | `sandwich -> - let sandwitches = - Eth_analysis.Eth_analysis_sandwich.detect_sandwich - receipts_decode in - let include_tx_s = - List.map (fun sandwich -> - A_Sandwich - { - bao_block_number = Int64.to_int block_number; - bao_resume = sandwich; - }) - @@ List.filter - (fun sandwich -> - String.equal - (sandwich.sdo_front_run.sto_transaction_hash - :> string) - hash - || String.equal - (sandwich.sdo_back_run.sto_transaction_hash - :> string) - hash - || List.exists - (fun vitim -> - String.equal - (vitim.sto_transaction_hash :> string) - hash) - sandwich.sdo_victims) - sandwitches in - Lwt.return @@ include_tx_s - | `flashloan -> - let> analysis = - Eth_analysis.Eth_analyse.tx_detect - (TAI_Flashloan receipt_decode) in - Lwt.return @@ Option.to_list analysis - | `liquidate -> - let> analysis = - Eth_analysis.Eth_analyse.tx_detect - (TAI_Liquidate receipt_decode) in - Lwt.return @@ Option.to_list analysis ->>>>>>> 2c48047 ([Ethereum-analysis] Improve analysis input type) | `bottom (_ : bottom) -> .) not_stored_analyses in let analyses = Tools.concat_list (List.flatten live_analyses) analyses_decode in -<<<<<<< HEAD EzAPIServer.return_ok @@ analyses)) -======= - EzAPIServer.return_ok @@ filter_analyses analyses)) ->>>>>>> 2c48047 ([Ethereum-analysis] Improve analysis input type) [@@service Api_services_db.get_transaction_tags_db_eth] module DayAnalyses = Map.Make (Int) diff --git a/src/bitcoin_scripts/btc_main_real_time_store.ml b/src/bitcoin_scripts/btc_main_real_time_store.ml index 7ca757e9..4d768a0a 100644 --- a/src/bitcoin_scripts/btc_main_real_time_store.ml +++ b/src/bitcoin_scripts/btc_main_real_time_store.ml @@ -31,7 +31,7 @@ let aux block block_hash dbh = let> _ = Db_psql.add_block ~dbh ~block:decode_block () in Lwt.return_unit) in let _ = Log.log_finish_block_store block.header.height time in - let _ = Statistics_client.send_gauge_data "btc_store_transactions" time in + let _ = Statistics_client.send_gauge_data "btc_store_transactions" time in Lwt.return_unit let block_confirmation_tips = 10 diff --git a/src/common/types.ml b/src/common/types.ml index 718839a3..863a554e 100644 --- a/src/common/types.ml +++ b/src/common/types.ml @@ -33,7 +33,6 @@ type command = { }|}] [@req] verbose : verbose option; [@conv verbose_of_string] - statistics_port : int option; decreasing : bool; verbose_file : string option; } @@ -55,9 +54,6 @@ module Statistics = struct gd_value : float; } [@@deriving encoding { camel; remove_prefix = "gd_" }] - - type statistic_config = { sc_port : int } - [@@deriving arg { exe = "statistics_api_server.exe" }] end module Ethereum_decode = struct diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_raw.ml b/src/ethereum_indexer/eth_db_psql/eth_db_psql_raw.ml index 11776b22..f0b52ac3 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_raw.ml +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_raw.ml @@ -20,7 +20,7 @@ let get_block_hash_by_block_number ?dbh ~block_number () = | block_hash_obj :: _ -> ( match block_hash_obj with | None -> Log.log_error_lwt_fail ~here:[%here] "Block hash is None" - | Some block_hash -> Lwt.return block_hash) + | Some block_hash -> Lwt.return @@ Tools.hex_to_string block_hash) let get_block_timestamp ?dbh ~block_number () = Log.log_func_lwt __FUNCTION__ (Int64.to_string block_number) @@ fun () -> diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_stats.ml b/src/ethereum_indexer/eth_db_psql/eth_db_psql_stats.ml index 71f7fede..a68538c6 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_stats.ml +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_stats.ml @@ -163,16 +163,15 @@ let get_stats_of_block ?dbh ~block_number () = dbh {|select * from stat_operations_transaction where stat_operations_transaction_op_id = ${x#stat_operations_id}|}] in - let> sso_tx_hashes = - Lwt_list.map_s + let sso_tx_hashes = + List.map (fun x -> - Lwt.return - @@ { - sseopto_tx_hash = - b @@ Tools.hex_to_string x#stat_operations_transaction_id; - sseopto_number = - Int64.to_int x#stat_operations_transaction_number; - }) + { + sseopto_tx_hash = + b @@ Tools.hex_to_string x#stat_operations_transaction_id; + sseopto_number = + Int64.to_int x#stat_operations_transaction_number; + }) txs in let> signature = get_signature_by_id ~dbh ~id:x#stat_operations_signature_id () in @@ -205,16 +204,14 @@ let get_stats_of_block ?dbh ~block_number () = dbh {|select * from stat_event_transaction where stat_event_transaction_op_id = ${x#stat_event_id}|}] in - let> sse_tx_hashes = - Lwt_list.map_s + let sse_tx_hashes = + List.map (fun x -> - Lwt.return - @@ { - sseopto_tx_hash = - b @@ Tools.hex_to_string x#stat_event_transaction_id; - sseopto_number = - Int64.to_int x#stat_event_transaction_number; - }) + { + sseopto_tx_hash = + b @@ Tools.hex_to_string x#stat_event_transaction_id; + sseopto_number = Int64.to_int x#stat_event_transaction_number; + }) txs in let> signature = get_signature_by_id ~dbh ~id:x#stat_event_signature_id () in diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.ml b/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.ml index 5b1184a9..5ad2a60b 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.ml +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.ml @@ -157,7 +157,7 @@ let set_store_block_analysis_finish ?dbh ~block_number "INSERT INTO transaction_tags_store_information (block_number,tag) \ VALUES ($block_number,$analysis_integer)"] -let get_latest_block_number_pool_stored ?dbh ?old () = +let get_latest_block_pool_stored ?dbh ?old () = Log.log_func_lwt __FUNCTION__ "" @@ fun () -> use __FUNCTION__ dbh @@ fun dbh -> match old with @@ -183,7 +183,7 @@ let set_store_block_pool_finish ?dbh ~block_number () = dbh "INSERT INTO pool_store_information(block_number) VALUES ($block_number)"] -let get_latest_block_number_transfer_neo4j_stored ?dbh ?old () = +let get_latest_block_transfer_neo4j_stored ?dbh ?old () = Log.log_func_lwt __FUNCTION__ "" @@ fun () -> use __FUNCTION__ dbh @@ fun dbh -> match old with @@ -212,7 +212,7 @@ let set_store_block_transfer_neo4j_finish ?dbh ~block_number () = "INSERT INTO transfer_store_information_neo4j(block_number) VALUES \ ($block_number)"] -let get_latest_block_number_transfer_stored ?dbh ?old () = +let get_latest_block_transfer_stored ?dbh ?old () = Log.log_func_lwt __FUNCTION__ "" @@ fun () -> use __FUNCTION__ dbh @@ fun dbh -> match old with diff --git a/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.mli b/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.mli index 923a8032..86a822b9 100644 --- a/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.mli +++ b/src/ethereum_indexer/eth_db_psql/eth_db_psql_store_information.mli @@ -100,7 +100,7 @@ val set_store_block_analysis_finish : (** [get_latest_pool_block_number_stored ?dbh ?old ()] Retrieve the highest block number with stored liquidity pool data. *) -val get_latest_block_number_pool_stored : +val get_latest_block_pool_stored : ?dbh:EzPG_lwt.PGOCaml.pa_pg_data EzPG_lwt.PGOCaml.t -> ?old:unit -> unit -> @@ -116,7 +116,7 @@ val set_store_block_pool_finish : (** [get_latest_block_number_transfer_neo4j_stored ?dbh ?old ()] Retrieve the highest block number with stored transfer data in neo4j database. *) -val get_latest_block_number_transfer_neo4j_stored : +val get_latest_block_transfer_neo4j_stored : ?dbh:EzPG_lwt.PGOCaml.pa_pg_data EzPG_lwt.PGOCaml.t -> ?old:unit -> unit -> @@ -132,7 +132,7 @@ val set_store_block_transfer_neo4j_finish : (** [get_latest_block_number_transfer_stored ?dbh ?old ()] Retrieve the highest block number with stored transfer data. *) -val get_latest_block_number_transfer_stored : +val get_latest_block_transfer_stored : ?dbh:EzPG_lwt.PGOCaml.pa_pg_data EzPG_lwt.PGOCaml.t -> ?old:unit -> unit -> -- GitLab From 46cb319e09e33e5274b19b99b7bbb9b8281c290e Mon Sep 17 00:00:00 2001 From: hamid Date: Fri, 3 Oct 2025 00:09:07 +0200 Subject: [PATCH 10/10] [Env] Use a file to list all argos VAR_ENV --- .dockerignore | 1 + .envrc | 4 + .gitignore | 4 +- .gitlab-ci.yml | 14 ++- Makefile | 95 +++++++++---------- argos.env | 39 ++++++++ docker/Dockerfile-build | 17 ++-- docker/Dockerfile-runner | 32 ++++--- scripts/debug/graph_cleanup.sh | 16 ---- scripts/devops/env.sh | 36 +++---- .../monitor/watch-errors-services-log.sh | 4 +- .../start-stop/generate-services-launchctl.sh | 3 +- scripts/devops/unittest/run-analyses-test.sh | 2 +- 13 files changed, 151 insertions(+), 116 deletions(-) create mode 100644 .envrc create mode 100644 argos.env delete mode 100755 scripts/debug/graph_cleanup.sh mode change 100644 => 100755 scripts/devops/env.sh diff --git a/.dockerignore b/.dockerignore index 6038994f..5ab4bf14 100644 --- a/.dockerignore +++ b/.dockerignore @@ -34,3 +34,4 @@ plot/* doc/ocaml-doc bin-v2 logs-v2/* +argos.secret.env diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..ae9f56ec --- /dev/null +++ b/.envrc @@ -0,0 +1,4 @@ +export PGDATABASE=ethereum +set -o allexport \ + && . ./argos.env \ + && set +o allexport diff --git a/.gitignore b/.gitignore index dfcb81d9..c30c9c14 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,6 @@ config ethereum_event_hashes/dict/* .env.el .res.json -.envrc .DS_Store tmp/* logs/* @@ -36,3 +35,6 @@ bin-v2 logs-v2/* slack_url grafana.env +argos.secret.env +react.env + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dcb23690..9e034347 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,14 +70,22 @@ deps: - package.json - package-lock.json +.default-runner: &default-runner + image: "$CI_REGISTRY_IMAGE:runner" + before_script: + - set -o allexport + - . argos.env + - set +o allexport + - eval $(opam env) + build: + <<: *default-runner dependencies: - deps image: $CI_REGISTRY_IMAGE:runner stage: build interruptible: true script: - - eval $(opam env) - make build rules: - if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "merge_request_event"' @@ -87,6 +95,7 @@ build: - test/**/* lint: + <<: *default-runner dependencies: - deps image: $CI_REGISTRY_IMAGE:runner @@ -107,6 +116,7 @@ lint: - src/frontend/.prettierignore test: + <<: *default-runner dependencies: - build stage: test @@ -120,4 +130,4 @@ test: changes: - src/common/* - src/ethereum*/* - - test/ethereum_analysis/* \ No newline at end of file + - test/ethereum_analysis/* diff --git a/Makefile b/Makefile index 0351fe1a..085d126d 100644 --- a/Makefile +++ b/Makefile @@ -1,76 +1,75 @@ -BIN ?= bin -FRONT_DIR=./src/frontend -ETHEREUM_INDEXER_BIN_DIR=ethereum_scripts -BITCOIN_INDEXER_BIN_DIR=bitcoin_scripts -STATISTICS_BIN_DIR=statistics -API_BIN_DIR=api -TEST_BIN_DIR=test -DOCKER_DIR=docker -STATISTICS_DIR=statistics -ETHEREUM_INDEXER_MONGODB_BIN=ethereum_indexer_mongodb -BITCOIN_INDEXER_MONGODB_BIN=bitcoin_indexer_mongodb -API_MONGODB_BIN=api_mongodb -PUBLIC=public -GRAPHCLEANUP=./scripts/debug/graph_cleanup.sh -DOC=doc - -OCAML_BUILD=dune -RUST_BUILD=cargo -FRONT_BUILD=npm -DOCKER_BUILD=docker-compose - -SCRIPTS_DIR=scripts/devops +OCAML_BUILD="dune" +RUST_BUILD="cargo" +FRONT_BUILD="npm" +DOCKER_BUILD="docker-compose" + +ifndef EXPORTED + $(error Please export argos.env variable `set -o allexport && . ./argos.env && set +o allexport`) +endif + +DIRS := \ + $(CSV_DIR) \ + $(PLOT_DIR) \ + $(LOGS_DIR) \ + $(BINDIR) \ + $(PID_DIR) \ + $(FETCH_CSV_DIR) \ + $(FETCH_PLOT_DIR) + +.PHONY: dirs + +dirs: + @mkdir -p $(DIRS) + +%: dirs ; all: build build: build-front build-rust build-ocaml create-bin: - @mkdir -p $(BIN)/ - @mkdir -p $(BIN)/$(TEST_BIN_DIR) - @mkdir -p $(BIN)/$(API_BIN_DIR)/ - @mkdir -p $(BIN)/$(ETHEREUM_INDEXER_BIN_DIR)/ - @mkdir -p $(BIN)/$(BITCOIN_INDEXER_BIN_DIR)/ - @mkdir -p $(BIN)/$(STATISTICS_BIN_DIR)/ - @mkdir -p $(BIN)/frontend/ -ENV_FILE ?= .env - -NPM_ENV_ARG := --env envFile=$(ENV_FILE) + @mkdir -p $(BINDIR)/ + @mkdir -p $(BINDIR)/$(TEST_BIN_DIR) + @mkdir -p $(BINDIR)/$(API_BIN_DIR)/ + @mkdir -p $(BINDIR)/$(ETHEREUM_INDEXER_BIN_DIR)/ + @mkdir -p $(BINDIR)/$(BITCOIN_INDEXER_BIN_DIR)/ + @mkdir -p $(BINDIR)/$(STATISTICS_BIN_DIR)/ + @mkdir -p $(BINDIR)/$(FRONTEND_BIN_DIR)/ build-front: create-bin - @$(FRONT_BUILD) run build -- $(NPM_ENV_ARG) - @cp -rf dist $(BIN)/frontend/ + @$(FRONT_BUILD) run build -- --env envFile=$(REACT_ENV) + @cp -rf dist $(BINDIR)/frontend/ build-rust: create-bin @$(RUST_BUILD) build - @cp -f target/debug/$(BITCOIN_INDEXER_MONGODB_BIN) ./$(BIN)/$(BITCOIN_INDEXER_BIN_DIR)/ - @cp -f target/debug/$(ETHEREUM_INDEXER_MONGODB_BIN) ./$(BIN)/$(ETHEREUM_INDEXER_BIN_DIR)/ - @cp -f target/debug/$(API_MONGODB_BIN) ./$(BIN)/$(API_BIN_DIR)/ + @cp -f target/debug/$(BITCOIN_INDEXER_MONGODB_BIN) $(BINDIR)/$(BITCOIN_INDEXER_BIN_DIR)/ + @cp -f target/debug/$(ETHEREUM_INDEXER_MONGODB_BIN) $(BINDIR)/$(ETHEREUM_INDEXER_BIN_DIR)/ + @cp -f target/debug/$(API_MONGODB_BIN) $(BINDIR)/$(API_BIN_DIR)/ build-ocaml: create-bin @$(OCAML_BUILD) build - @cp -f _build/default/src/$(API_BIN_DIR)/*.exe ./$(BIN)/$(API_BIN_DIR)/ - @cp -f _build/default/src/$(ETHEREUM_INDEXER_BIN_DIR)/*.exe ./$(BIN)/$(ETHEREUM_INDEXER_BIN_DIR)/ - @cp -f _build/default/src/$(BITCOIN_INDEXER_BIN_DIR)/*.exe ./$(BIN)/$(BITCOIN_INDEXER_BIN_DIR)/ - @cp -f _build/default/test/*/*.exe ./$(BIN)/$(TEST_BIN_DIR)/ - @cp -f _build/default/debug/graph/debug_graph.exe $(BIN)/$(ETHEREUM_INDEXER_BIN_DIR)/ - @cp -f _build/default/src/$(STATISTICS_BIN_DIR)/*.exe ./$(BIN)/$(STATISTICS_BIN_DIR)/ + @cp -f _build/default/src/$(API_BIN_DIR)/*.exe $(BINDIR)/$(API_BIN_DIR)/ + @cp -f _build/default/src/$(ETHEREUM_INDEXER_BIN_DIR)/*.exe $(BINDIR)/$(ETHEREUM_INDEXER_BIN_DIR)/ + @cp -f _build/default/src/$(BITCOIN_INDEXER_BIN_DIR)/*.exe $(BINDIR)/$(BITCOIN_INDEXER_BIN_DIR)/ + @cp -f _build/default/test/*/*.exe $(BINDIR)/$(TEST_BIN_DIR)/ + @cp -f _build/default/debug/graph/debug_graph.exe $(BINDIR)/$(ETHEREUM_INDEXER_BIN_DIR)/ + @cp -f _build/default/src/$(STATISTICS_BIN_DIR)/*.exe $(BINDIR)/$(STATISTICS_BIN_DIR)/ clean: @$(OCAML_BUILD) clean @$(RUST_BUILD) clean - @rm -rf bin - @ABSPATH="." $(GRAPHCLEANUP) + @rm -rf -r .graph_debug/ + @rm -rf $(BINDIR) test: build-ocaml - @. $(CURDIR)/$(SCRIPTS_DIR)/export-project-dir.sh; $(CURDIR)/$(SCRIPTS_DIR)/unittest/run-analyses-test.sh + @$(DEVOPS_DIR)/unittest/run-analyses-test.sh install-front-deps: @$(FRONT_BUILD) config set legacy-peer-deps true @$(FRONT_BUILD) ci install-ocaml-deps: - @$(SCRIPTS_DIR)/install-deps.sh + @$(DEVOPS_DIR)/install-deps.sh install-rust-deps: @$(RUST_BUILD) build @@ -86,7 +85,7 @@ format: @$(FRONT_BUILD) run format 2>/dev/null >/dev/null lint: - @$(SCRIPTS_DIR)/lint.sh || exit 1 + @$(DEVOPS_DIR)/lint.sh || exit 1 doc: build-ocaml @mkdir -p ./$(DOC)/ocaml-doc diff --git a/argos.env b/argos.env new file mode 100644 index 00000000..90295b42 --- /dev/null +++ b/argos.env @@ -0,0 +1,39 @@ +PROJECT_DIR="${PROJECT_DIR:-$PWD}" + +BIN="bin-v2" +LOGS="logs-v2" +ETHEREUM_INDEXER_BIN_DIR="ethereum_scripts" +BITCOIN_INDEXER_BIN_DIR="bitcoin_scripts" +STATISTICS_BIN_DIR="statistics" +API_BIN_DIR="api" +TEST_BIN_DIR="test" +FRONTEND_BIN_DIR="frontend" + +DOCKER_DIR="docker" +PUBLIC_DIR="public" +DOC_DIR="doc" +SCRIPTS_DIR="scripts" + +ETHEREUM_INDEXER_MONGODB_BIN="ethereum_indexer_mongodb" +BITCOIN_INDEXER_MONGODB_BIN="bitcoin_indexer_mongodb" +API_MONGODB_BIN="api_mongodb" + +REACT_ENV="react.env" +BINDIR="${PROJECT_DIR}/${BIN}" +HASHESDIR="${PROJECT_DIR}/ethereum_event_hashes" +ETHEREUM_CONFIG="${PROJECT_DIR}/config/ethereum/config.json" +BITCOIN_CONFIG="${PROJECT_DIR}/config/bitcoin/config.json" +PID_DIR="${PROJECT_DIR}/pids" +ETHEREUM_SCRIPTS="${PROJECT_DIR}/${BIN}/${ETHEREUM_INDEXER_BIN_DIR}" +TEST_SCRIPTS="${PROJECT_DIR}/${BIN}/${TEST_BIN_DIR}" +API_SCRIPTS="${PROJECT_DIR}/${BIN}/${API_BIN_DIR}" +BITCOIN_SCRIPTS="${PROJECT_DIR}/${BIN}/${BITCOIN_INDEXER_BIN_DIR}" +LOGS_DIR="${PROJECT_DIR}/${LOGS}" +DEVOPS_DIR="${PROJECT_DIR}/${SCRIPTS_DIR}/devops" +CSV_DIR="${PROJECT_DIR}/csv" +PLOT_DIR="${PROJECT_DIR}/plot" +SERVICES_CONFIG="${DEVOPS_DIR}/data/services.json" +FETCH_CSV_DIR="${CSV_DIR}/monitor-fetch" +FETCH_PLOT_DIR="${PLOT_DIR}/monitor-fetch" + +EXPORTED="TRUE" diff --git a/docker/Dockerfile-build b/docker/Dockerfile-build index 036efc7b..5e7960b9 100644 --- a/docker/Dockerfile-build +++ b/docker/Dockerfile-build @@ -3,13 +3,16 @@ FROM argos-deps:local AS builder COPY --chown=functori . ./argos WORKDIR ./argos -RUN mkdir -p data \ - && $(pg_config --bindir)/pg_ctl init -D data \ - && $(pg_config --bindir)/pg_ctl -s start -D data \ - && eval "$(opam env)" \ - && createdb functori \ - && ENV=bin make build \ - && mv bin .. +RUN set -o allexport \ + && . ./argos.env \ + && set +o allexport \ + && mkdir -p data \ + && $(pg_config --bindir)/pg_ctl init -D data \ + && $(pg_config --bindir)/pg_ctl -s start -D data \ + && eval "$(opam env)" \ + && createdb functori \ + && make build \ + && mv ${BIN} ../bin WORKDIR .. RUN rm -rf argos diff --git a/docker/Dockerfile-runner b/docker/Dockerfile-runner index e61b5e0a..94850a5e 100644 --- a/docker/Dockerfile-runner +++ b/docker/Dockerfile-runner @@ -21,19 +21,25 @@ RUN source /home/functori/.profile SHELL ["/bin/sh", "-c"] ENV NODE_ENV=development -RUN npm config set prefix "$HOME/.local" &&\ -NODE_PATH=$(npm root -g) && echo "NODE_PATH=$NODE_PATH" &&\ -make install-front-deps && cp -rf ./node_modules/* $NODE_PATH &&\ -npm install -g --legacy-peer-deps react react-dom @types/react @types/react-dom && \ -npm install -g webpack webpack-cli html-webpack-plugin --legacy-peer-deps && \ -npm install -g --legacy-peer-deps @mui/system react react-router-dom @types/node ethers - -RUN opam switch create --no-install ocaml-system && \ -eval $(opam env) && \ -opam update && \ -make install-ocaml-deps && \ -sudo apt-get update && \ -sudo apt-get install -y jq +RUN set -o allexport \ + && . ./argos.env \ + && set +o allexport \ + && npm config set prefix "$HOME/.local" \ + && NODE_PATH=$(npm root -g) && echo "NODE_PATH=$NODE_PATH" \ + && make install-front-deps \ + && cp -rf ./node_modules/* $NODE_PATH \ + && npm install -g --legacy-peer-deps react react-dom @types/react @types/react-dom \ + webpack webpack-cli html-webpack-plugin @mui/system react react-router-dom @types/node ethers + +RUN set -o allexport \ + && . ./argos.env \ + && set +o allexport \ + && opam switch create --no-install ocaml-system \ + && eval $(opam env) \ + && opam update \ + && make install-ocaml-deps \ + && sudo apt-get update \ + && sudo apt-get install -y jq WORKDIR .. diff --git a/scripts/debug/graph_cleanup.sh b/scripts/debug/graph_cleanup.sh deleted file mode 100755 index 70b7c2eb..00000000 --- a/scripts/debug/graph_cleanup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# --- Source project-specific environment setup --- -. "$ABSPATH/scripts/devops/export-project-dir.sh" -. "$ABSPATH/scripts/devops/env.sh" - -OUTDIR="$PROJECT_DIR/.graph_debug/" - -: "${ABSPATH?Environment variable ABSPATH must be provided as input}" -: "${PROJECT_DIR?Environment variable PROJECT_DIR must be set}" -: "${OUTDIR:?Environment variable OUTDIR not set}" - -# Delete contents, not the directories themselves -echo "Cleaning $OUTDIR..." -rm -rf -r "$OUTDIR" \ No newline at end of file diff --git a/scripts/devops/env.sh b/scripts/devops/env.sh old mode 100644 new mode 100755 index e3100c69..b4f5987b --- a/scripts/devops/env.sh +++ b/scripts/devops/env.sh @@ -1,30 +1,18 @@ #!/usr/bin/env bash +if [[ -f "argos.env" ]]; then + set -a + source "argos.env" + set +a +else + echo "Warning: argos.env not found. Please create this file or set variables manually." +fi -: "${PROJECT_DIR?Environment variable PROJECT_DIR must be set}" - - -BIN="bin-v2" -ETHEREUM_INDEXER_BIN_DIR="ethereum_scripts" -TEST_BIN_DIR="test" -BITCOIN_INDEXER_BIN_DIR="bitcoin_scripts" -API_BIN_DIR="api" - -export HASHESDIR=${PROJECT_DIR}/ethereum_event_hashes/ -export ETHEREUM_CONFIG=${PROJECT_DIR}/config/ethereum/config.json -export BITCOIN_CONFIG=${PROJECT_DIR}/config/bitcoin/config.json -export PID_DIR=${PROJECT_DIR}/pids/ -export ETHEREUM_SCRIPTS=${PROJECT_DIR}/${BIN}/${ETHEREUM_INDEXER_BIN_DIR} -export TEST_SCRIPTS=${PROJECT_DIR}/${BIN}/${TEST_BIN_DIR} -export API_SCRIPTS=${PROJECT_DIR}/${BIN}/${API_BIN_DIR} -export BITCOIN_SCRIPTS=${PROJECT_DIR}/${BIN}/${BITCOIN_INDEXER_BIN_DIR} -export LOGS=${PROJECT_DIR}/logs-v2 -export SCRIPT_DIR=${PROJECT_DIR}/scripts/devops -export CSV_DIR=${PROJECT_DIR}/csv -export PLOT_DIR=${PROJECT_DIR}/plot -export SERVICES_CONFIG=${SCRIPT_DIR}/data/services.json -export FETCH_CSV_DIR="$CSV_DIR/monitor-fetch" -export FETCH_PLOT_DIR="$PLOT_DIR/monitor-fetch" +if [[ -f "argos.secret.env" ]]; then + set -a + source "argos.secret.env" + set +a +fi mkdir -p "$CSV_DIR" mkdir -p "$PLOT_DIR" diff --git a/scripts/devops/monitor/watch-errors-services-log.sh b/scripts/devops/monitor/watch-errors-services-log.sh index 7524f3c1..3bfbe203 100755 --- a/scripts/devops/monitor/watch-errors-services-log.sh +++ b/scripts/devops/monitor/watch-errors-services-log.sh @@ -8,8 +8,8 @@ set +a : "${LOGS?Environment variable LOGS must be set in env.sh}" -WATCH_ERROR_BIN="${SCRIPT_DIR}/monitor/watch-errors.sh" -START_BIN="${SCRIPT_DIR}/start-stop/start.sh" +WATCH_ERROR_BIN="${DEVOPS_DIR}/monitor/watch-errors.sh" +START_BIN="${DEVOPS_DIR}/start-stop/start.sh" if [ ! -x "$WATCH_ERROR_BIN" ]; then echo "Error: watcher script not found or not executable at $WATCH_ERROR_BIN" >&2 exit 1 diff --git a/scripts/devops/start-stop/generate-services-launchctl.sh b/scripts/devops/start-stop/generate-services-launchctl.sh index 9b4b00aa..cbd7215a 100755 --- a/scripts/devops/start-stop/generate-services-launchctl.sh +++ b/scripts/devops/start-stop/generate-services-launchctl.sh @@ -3,12 +3,11 @@ set -euo pipefail : "${PROJECT_DIR?Environment variable PROJECT_DIR must be set}" -# load all your shared env vars (ETHEREUM_SCRIPTS, SERVICES_CONFIG, SCRIPT_DIR, PLIST_DIR…) set -a source "$PROJECT_DIR/scripts/devops/env.sh" set +a -GENERATOR="$SCRIPT_DIR/start-stop/generate-launchctl.sh" +GENERATOR="$DEVOPS_DIR/start-stop/generate-launchctl.sh" CONFIG="$SERVICES_CONFIG" : "${PLIST_DIR?Please set PLIST_DIR in env.sh or env}" diff --git a/scripts/devops/unittest/run-analyses-test.sh b/scripts/devops/unittest/run-analyses-test.sh index 0650c7e7..fb1e36cf 100755 --- a/scripts/devops/unittest/run-analyses-test.sh +++ b/scripts/devops/unittest/run-analyses-test.sh @@ -8,7 +8,7 @@ source "$PROJECT_DIR/scripts/devops/env.sh" set +a -TYPES_FILE="$SCRIPT_DIR/data/analyses-types.json" +TYPES_FILE="$DEVOPS_DIR/data/analyses-types.json" [ -f "$TYPES_FILE" ] || { echo "File $TYPES_FILE not found" >&2; exit 1; } DATA_DIR="$PROJECT_DIR/test/data" -- GitLab