dexbot 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +287 -0
- package/claw/README.md +513 -0
- package/claw/scripts/memu_runner.py +385 -0
- package/claw/skills/bitshares-guide/SKILL.md +14 -0
- package/claw/skills/bitshares-guide/references/example-skill-shells.md +18 -0
- package/claw/skills/bitshares-guide/references/presentation-patterns.md +19 -0
- package/claw/skills/bitshares-guide/references/scope-guardrails.md +9 -0
- package/claw/skills/launcher-ops/SKILL.md +18 -0
- package/claw/skills/launcher-ops/references/launcher-workflow.md +23 -0
- package/claw/skills/margin-trading/SKILL.md +23 -0
- package/claw/skills/margin-trading/references/honest-asset-list.md +74 -0
- package/claw/skills/margin-trading/references/honest-assets.md +44 -0
- package/claw/skills/margin-trading/references/position-management.md +203 -0
- package/claw/skills/margin-trading/references/trading-concepts.md +80 -0
- package/claw/skills/memu-memory/SKILL.md +218 -0
- package/claw/skills/shared/references/js-automation-overview.md +24 -0
- package/claw/skills/shared/references/safety-and-staleness.md +11 -0
- package/claw/skills/shared/references/skill-boundaries.md +17 -0
- package/claw/skills/trend-detection/SKILL.md +33 -0
- package/claw/skills/trend-detection/agents/openai.yaml +3 -0
- package/claw/skills/trend-detection/references/service.md +45 -0
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.d.ts +3 -0
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.d.ts.map +1 -0
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.js +149 -0
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.js.map +1 -0
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.d.ts +3 -0
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.d.ts.map +1 -0
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.js +387 -0
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.js.map +1 -0
- package/dist/analysis/ama_fitting/calibrate_convergence_er.d.ts +3 -0
- package/dist/analysis/ama_fitting/calibrate_convergence_er.d.ts.map +1 -0
- package/dist/analysis/ama_fitting/calibrate_convergence_er.js +200 -0
- package/dist/analysis/ama_fitting/calibrate_convergence_er.js.map +1 -0
- package/dist/analysis/ama_fitting/fetch_lp_candles.d.ts +3 -0
- package/dist/analysis/ama_fitting/fetch_lp_candles.d.ts.map +1 -0
- package/dist/analysis/ama_fitting/fetch_lp_candles.js +212 -0
- package/dist/analysis/ama_fitting/fetch_lp_candles.js.map +1 -0
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.d.ts +31 -0
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.d.ts.map +1 -0
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.js +249 -0
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.js.map +1 -0
- package/dist/analysis/ama_fitting/optimizer_high_resolution.d.ts +2 -0
- package/dist/analysis/ama_fitting/optimizer_high_resolution.d.ts.map +1 -0
- package/dist/analysis/ama_fitting/optimizer_high_resolution.js +782 -0
- package/dist/analysis/ama_fitting/optimizer_high_resolution.js.map +1 -0
- package/dist/analysis/analyze_derivatives.d.ts +95 -0
- package/dist/analysis/analyze_derivatives.d.ts.map +1 -0
- package/dist/analysis/analyze_derivatives.js +295 -0
- package/dist/analysis/analyze_derivatives.js.map +1 -0
- package/dist/analysis/analyze_dynamic_weight.d.ts +14 -0
- package/dist/analysis/analyze_dynamic_weight.d.ts.map +1 -0
- package/dist/analysis/analyze_dynamic_weight.js +208 -0
- package/dist/analysis/analyze_dynamic_weight.js.map +1 -0
- package/dist/analysis/analyze_kalman.d.ts +13 -0
- package/dist/analysis/analyze_kalman.d.ts.map +1 -0
- package/dist/analysis/analyze_kalman.js +123 -0
- package/dist/analysis/analyze_kalman.js.map +1 -0
- package/dist/analysis/analyze_regime.d.ts +20 -0
- package/dist/analysis/analyze_regime.d.ts.map +1 -0
- package/dist/analysis/analyze_regime.js +139 -0
- package/dist/analysis/analyze_regime.js.map +1 -0
- package/dist/analysis/analyze_regime_windows.d.ts +19 -0
- package/dist/analysis/analyze_regime_windows.d.ts.map +1 -0
- package/dist/analysis/analyze_regime_windows.js +413 -0
- package/dist/analysis/analyze_regime_windows.js.map +1 -0
- package/dist/analysis/analyze_risk_profile.d.ts +3 -0
- package/dist/analysis/analyze_risk_profile.d.ts.map +1 -0
- package/dist/analysis/analyze_risk_profile.js +159 -0
- package/dist/analysis/analyze_risk_profile.js.map +1 -0
- package/dist/analysis/analyze_trade_heatmap.d.ts +3 -0
- package/dist/analysis/analyze_trade_heatmap.d.ts.map +1 -0
- package/dist/analysis/analyze_trade_heatmap.js +367 -0
- package/dist/analysis/analyze_trade_heatmap.js.map +1 -0
- package/dist/analysis/analyze_volatility.d.ts +22 -0
- package/dist/analysis/analyze_volatility.d.ts.map +1 -0
- package/dist/analysis/analyze_volatility.js +172 -0
- package/dist/analysis/analyze_volatility.js.map +1 -0
- package/dist/analysis/bot_fitting/backtest_ama_sweep.d.ts +99 -0
- package/dist/analysis/bot_fitting/backtest_ama_sweep.d.ts.map +1 -0
- package/dist/analysis/bot_fitting/backtest_ama_sweep.js +804 -0
- package/dist/analysis/bot_fitting/backtest_ama_sweep.js.map +1 -0
- package/dist/analysis/bot_fitting/backtest_bot_fitting.d.ts +2 -0
- package/dist/analysis/bot_fitting/backtest_bot_fitting.d.ts.map +1 -0
- package/dist/analysis/bot_fitting/backtest_bot_fitting.js +347 -0
- package/dist/analysis/bot_fitting/backtest_bot_fitting.js.map +1 -0
- package/dist/analysis/bot_fitting/shared_utils.d.ts +15 -0
- package/dist/analysis/bot_fitting/shared_utils.d.ts.map +1 -0
- package/dist/analysis/bot_fitting/shared_utils.js +48 -0
- package/dist/analysis/bot_fitting/shared_utils.js.map +1 -0
- package/dist/analysis/bot_key_utils.d.ts +16 -0
- package/dist/analysis/bot_key_utils.d.ts.map +1 -0
- package/dist/analysis/bot_key_utils.js +61 -0
- package/dist/analysis/bot_key_utils.js.map +1 -0
- package/dist/analysis/bot_usage/discover_bot_accounts.d.ts +3 -0
- package/dist/analysis/bot_usage/discover_bot_accounts.d.ts.map +1 -0
- package/dist/analysis/bot_usage/discover_bot_accounts.js +498 -0
- package/dist/analysis/bot_usage/discover_bot_accounts.js.map +1 -0
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts +546 -0
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts.map +1 -0
- package/dist/analysis/bot_usage/kibana_bot_queries.js +427 -0
- package/dist/analysis/bot_usage/kibana_bot_queries.js.map +1 -0
- package/dist/analysis/chart_utils.d.ts +13 -0
- package/dist/analysis/chart_utils.d.ts.map +1 -0
- package/dist/analysis/chart_utils.js +142 -0
- package/dist/analysis/chart_utils.js.map +1 -0
- package/dist/analysis/derivative_chart_generator.d.ts +18 -0
- package/dist/analysis/derivative_chart_generator.d.ts.map +1 -0
- package/dist/analysis/derivative_chart_generator.js +896 -0
- package/dist/analysis/derivative_chart_generator.js.map +1 -0
- package/dist/analysis/math_utils.d.ts +35 -0
- package/dist/analysis/math_utils.d.ts.map +1 -0
- package/dist/analysis/math_utils.js +121 -0
- package/dist/analysis/math_utils.js.map +1 -0
- package/dist/analysis/price_sources.d.ts +34 -0
- package/dist/analysis/price_sources.d.ts.map +1 -0
- package/dist/analysis/price_sources.js +103 -0
- package/dist/analysis/price_sources.js.map +1 -0
- package/dist/analysis/trade_profitability.d.ts +115 -0
- package/dist/analysis/trade_profitability.d.ts.map +1 -0
- package/dist/analysis/trade_profitability.js +1247 -0
- package/dist/analysis/trade_profitability.js.map +1 -0
- package/dist/analysis/tradingview/analyze_tradingview.d.ts +38 -0
- package/dist/analysis/tradingview/analyze_tradingview.d.ts.map +1 -0
- package/dist/analysis/tradingview/analyze_tradingview.js +212 -0
- package/dist/analysis/tradingview/analyze_tradingview.js.map +1 -0
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.d.ts +9 -0
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.d.ts.map +1 -0
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js +1717 -0
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js.map +1 -0
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts +250 -0
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts.map +1 -0
- package/dist/analysis/trend_detection/derivative_analyzer.js +903 -0
- package/dist/analysis/trend_detection/derivative_analyzer.js.map +1 -0
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.d.ts +6 -0
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.d.ts.map +1 -0
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.js +1449 -0
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.js.map +1 -0
- package/dist/analysis/trend_detection/hurst_analyzer.d.ts +42 -0
- package/dist/analysis/trend_detection/hurst_analyzer.d.ts.map +1 -0
- package/dist/analysis/trend_detection/hurst_analyzer.js +159 -0
- package/dist/analysis/trend_detection/hurst_analyzer.js.map +1 -0
- package/dist/analysis/trend_detection/kalman_chart_generator.d.ts +6 -0
- package/dist/analysis/trend_detection/kalman_chart_generator.d.ts.map +1 -0
- package/dist/analysis/trend_detection/kalman_chart_generator.js +408 -0
- package/dist/analysis/trend_detection/kalman_chart_generator.js.map +1 -0
- package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts +103 -0
- package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts.map +1 -0
- package/dist/analysis/trend_detection/kalman_trend_analyzer.js +229 -0
- package/dist/analysis/trend_detection/kalman_trend_analyzer.js.map +1 -0
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts +34 -0
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts.map +1 -0
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.js +89 -0
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.js.map +1 -0
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts +39 -0
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts.map +1 -0
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.js +132 -0
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.js.map +1 -0
- package/dist/analysis/trend_detection/regime_chart_generator.d.ts +6 -0
- package/dist/analysis/trend_detection/regime_chart_generator.d.ts.map +1 -0
- package/dist/analysis/trend_detection/regime_chart_generator.js +345 -0
- package/dist/analysis/trend_detection/regime_chart_generator.js.map +1 -0
- package/dist/analysis/trend_detection/tests/test_kalman_trend.d.ts +2 -0
- package/dist/analysis/trend_detection/tests/test_kalman_trend.d.ts.map +1 -0
- package/dist/analysis/trend_detection/tests/test_kalman_trend.js +130 -0
- package/dist/analysis/trend_detection/tests/test_kalman_trend.js.map +1 -0
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.d.ts +2 -0
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.d.ts.map +1 -0
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.js +38 -0
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.js.map +1 -0
- package/dist/analysis/trend_detection/volatility_chart_generator.d.ts +6 -0
- package/dist/analysis/trend_detection/volatility_chart_generator.d.ts.map +1 -0
- package/dist/analysis/trend_detection/volatility_chart_generator.js +732 -0
- package/dist/analysis/trend_detection/volatility_chart_generator.js.map +1 -0
- package/dist/bot.d.ts +49 -0
- package/dist/bot.d.ts.map +1 -0
- package/dist/bot.js +221 -0
- package/dist/bot.js.map +1 -0
- package/dist/credential-daemon.d.ts +64 -0
- package/dist/credential-daemon.d.ts.map +1 -0
- package/dist/credential-daemon.js +987 -0
- package/dist/credential-daemon.js.map +1 -0
- package/dist/dexbot.d.ts +87 -0
- package/dist/dexbot.d.ts.map +1 -0
- package/dist/dexbot.js +1222 -0
- package/dist/dexbot.js.map +1 -0
- package/dist/market_adapter/ama_signal_runner.d.ts +3 -0
- package/dist/market_adapter/ama_signal_runner.d.ts.map +1 -0
- package/dist/market_adapter/ama_signal_runner.js +175 -0
- package/dist/market_adapter/ama_signal_runner.js.map +1 -0
- package/dist/market_adapter/candle_utils.d.ts +57 -0
- package/dist/market_adapter/candle_utils.d.ts.map +1 -0
- package/dist/market_adapter/candle_utils.js +252 -0
- package/dist/market_adapter/candle_utils.js.map +1 -0
- package/dist/market_adapter/core/asymmetric_bounds.d.ts +20 -0
- package/dist/market_adapter/core/asymmetric_bounds.d.ts.map +1 -0
- package/dist/market_adapter/core/asymmetric_bounds.js +88 -0
- package/dist/market_adapter/core/asymmetric_bounds.js.map +1 -0
- package/dist/market_adapter/core/config_normalizers.d.ts +10 -0
- package/dist/market_adapter/core/config_normalizers.d.ts.map +1 -0
- package/dist/market_adapter/core/config_normalizers.js +24 -0
- package/dist/market_adapter/core/config_normalizers.js.map +1 -0
- package/dist/market_adapter/core/kibana_candles.d.ts +74 -0
- package/dist/market_adapter/core/kibana_candles.d.ts.map +1 -0
- package/dist/market_adapter/core/kibana_candles.js +249 -0
- package/dist/market_adapter/core/kibana_candles.js.map +1 -0
- package/dist/market_adapter/core/kibana_client.d.ts +27 -0
- package/dist/market_adapter/core/kibana_client.d.ts.map +1 -0
- package/dist/market_adapter/core/kibana_client.js +120 -0
- package/dist/market_adapter/core/kibana_client.js.map +1 -0
- package/dist/market_adapter/core/kibana_market_candles.d.ts +143 -0
- package/dist/market_adapter/core/kibana_market_candles.d.ts.map +1 -0
- package/dist/market_adapter/core/kibana_market_candles.js +170 -0
- package/dist/market_adapter/core/kibana_market_candles.js.map +1 -0
- package/dist/market_adapter/core/market_adapter_service.d.ts +210 -0
- package/dist/market_adapter/core/market_adapter_service.d.ts.map +1 -0
- package/dist/market_adapter/core/market_adapter_service.js +2328 -0
- package/dist/market_adapter/core/market_adapter_service.js.map +1 -0
- package/dist/market_adapter/core/strategies/ama.d.ts +2 -0
- package/dist/market_adapter/core/strategies/ama.d.ts.map +1 -0
- package/dist/market_adapter/core/strategies/ama.js +138 -0
- package/dist/market_adapter/core/strategies/ama.js.map +1 -0
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts +50 -0
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts.map +1 -0
- package/dist/market_adapter/core/strategies/ama_slope_model.js +143 -0
- package/dist/market_adapter/core/strategies/ama_slope_model.js.map +1 -0
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts +12 -0
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts.map +1 -0
- package/dist/market_adapter/core/strategies/atr/calculator.js +47 -0
- package/dist/market_adapter/core/strategies/atr/calculator.js.map +1 -0
- package/dist/market_adapter/core/strategies/collateral_manager.d.ts +32 -0
- package/dist/market_adapter/core/strategies/collateral_manager.d.ts.map +1 -0
- package/dist/market_adapter/core/strategies/collateral_manager.js +68 -0
- package/dist/market_adapter/core/strategies/collateral_manager.js.map +1 -0
- package/dist/market_adapter/core/strategies/regime_gate.d.ts +66 -0
- package/dist/market_adapter/core/strategies/regime_gate.d.ts.map +1 -0
- package/dist/market_adapter/core/strategies/regime_gate.js +189 -0
- package/dist/market_adapter/core/strategies/regime_gate.js.map +1 -0
- package/dist/market_adapter/index.d.ts +10 -0
- package/dist/market_adapter/index.d.ts.map +1 -0
- package/dist/market_adapter/index.js +71 -0
- package/dist/market_adapter/index.js.map +1 -0
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.d.ts +3 -0
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.d.ts.map +1 -0
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js +1165 -0
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js.map +1 -0
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts +54 -0
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts.map +1 -0
- package/dist/market_adapter/inputs/fetch_lp_data.js +743 -0
- package/dist/market_adapter/inputs/fetch_lp_data.js.map +1 -0
- package/dist/market_adapter/inputs/kibana_source.d.ts +68 -0
- package/dist/market_adapter/inputs/kibana_source.d.ts.map +1 -0
- package/dist/market_adapter/inputs/kibana_source.js +143 -0
- package/dist/market_adapter/inputs/kibana_source.js.map +1 -0
- package/dist/market_adapter/interval_utils.d.ts +6 -0
- package/dist/market_adapter/interval_utils.d.ts.map +1 -0
- package/dist/market_adapter/interval_utils.js +14 -0
- package/dist/market_adapter/interval_utils.js.map +1 -0
- package/dist/market_adapter/log_format.d.ts +16 -0
- package/dist/market_adapter/log_format.d.ts.map +1 -0
- package/dist/market_adapter/log_format.js +72 -0
- package/dist/market_adapter/log_format.js.map +1 -0
- package/dist/market_adapter/lp_chart_core.d.ts +6 -0
- package/dist/market_adapter/lp_chart_core.d.ts.map +1 -0
- package/dist/market_adapter/lp_chart_core.js +874 -0
- package/dist/market_adapter/lp_chart_core.js.map +1 -0
- package/dist/market_adapter/lp_chart_runner.d.ts +135 -0
- package/dist/market_adapter/lp_chart_runner.d.ts.map +1 -0
- package/dist/market_adapter/lp_chart_runner.js +337 -0
- package/dist/market_adapter/lp_chart_runner.js.map +1 -0
- package/dist/market_adapter/lp_chart_strategy_loader.d.ts +23 -0
- package/dist/market_adapter/lp_chart_strategy_loader.d.ts.map +1 -0
- package/dist/market_adapter/lp_chart_strategy_loader.js +169 -0
- package/dist/market_adapter/lp_chart_strategy_loader.js.map +1 -0
- package/dist/market_adapter/market_adapter.d.ts +133 -0
- package/dist/market_adapter/market_adapter.d.ts.map +1 -0
- package/dist/market_adapter/market_adapter.js +1331 -0
- package/dist/market_adapter/market_adapter.js.map +1 -0
- package/dist/market_adapter/merge_lp_data.d.ts +3 -0
- package/dist/market_adapter/merge_lp_data.d.ts.map +1 -0
- package/dist/market_adapter/merge_lp_data.js +125 -0
- package/dist/market_adapter/merge_lp_data.js.map +1 -0
- package/dist/market_adapter/test_helpers.d.ts +14 -0
- package/dist/market_adapter/test_helpers.d.ts.map +1 -0
- package/dist/market_adapter/test_helpers.js +22 -0
- package/dist/market_adapter/test_helpers.js.map +1 -0
- package/dist/market_adapter/utils/adapter_client.d.ts +20 -0
- package/dist/market_adapter/utils/adapter_client.d.ts.map +1 -0
- package/dist/market_adapter/utils/adapter_client.js +88 -0
- package/dist/market_adapter/utils/adapter_client.js.map +1 -0
- package/dist/market_adapter/utils/atomic_write.d.ts +9 -0
- package/dist/market_adapter/utils/atomic_write.d.ts.map +1 -0
- package/dist/market_adapter/utils/atomic_write.js +13 -0
- package/dist/market_adapter/utils/atomic_write.js.map +1 -0
- package/dist/market_adapter/utils/chain.d.ts +50 -0
- package/dist/market_adapter/utils/chain.d.ts.map +1 -0
- package/dist/market_adapter/utils/chain.js +196 -0
- package/dist/market_adapter/utils/chain.js.map +1 -0
- package/dist/market_adapter/utils/data_discovery.d.ts +6 -0
- package/dist/market_adapter/utils/data_discovery.d.ts.map +1 -0
- package/dist/market_adapter/utils/data_discovery.js +35 -0
- package/dist/market_adapter/utils/data_discovery.js.map +1 -0
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts +15 -0
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts.map +1 -0
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js +60 -0
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js.map +1 -0
- package/dist/market_adapter/utils/file_lock.d.ts +19 -0
- package/dist/market_adapter/utils/file_lock.d.ts.map +1 -0
- package/dist/market_adapter/utils/file_lock.js +191 -0
- package/dist/market_adapter/utils/file_lock.js.map +1 -0
- package/dist/market_adapter/utils/native_history.d.ts +19 -0
- package/dist/market_adapter/utils/native_history.d.ts.map +1 -0
- package/dist/market_adapter/utils/native_history.js +172 -0
- package/dist/market_adapter/utils/native_history.js.map +1 -0
- package/dist/market_adapter/utils/paths.d.ts +5 -0
- package/dist/market_adapter/utils/paths.d.ts.map +1 -0
- package/dist/market_adapter/utils/paths.js +7 -0
- package/dist/market_adapter/utils/paths.js.map +1 -0
- package/dist/modules/account_bots.d.ts +112 -0
- package/dist/modules/account_bots.d.ts.map +1 -0
- package/dist/modules/account_bots.js +1259 -0
- package/dist/modules/account_bots.js.map +1 -0
- package/dist/modules/account_orders.d.ts +273 -0
- package/dist/modules/account_orders.d.ts.map +1 -0
- package/dist/modules/account_orders.js +662 -0
- package/dist/modules/account_orders.js.map +1 -0
- package/dist/modules/authority_resolver.d.ts +2 -0
- package/dist/modules/authority_resolver.d.ts.map +1 -0
- package/dist/modules/authority_resolver.js +231 -0
- package/dist/modules/authority_resolver.js.map +1 -0
- package/dist/modules/bitshares-native/chain_client.d.ts +38 -0
- package/dist/modules/bitshares-native/chain_client.d.ts.map +1 -0
- package/dist/modules/bitshares-native/chain_client.js +322 -0
- package/dist/modules/bitshares-native/chain_client.js.map +1 -0
- package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts +59 -0
- package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts.map +1 -0
- package/dist/modules/bitshares-native/crypto/ecc.browser.js +456 -0
- package/dist/modules/bitshares-native/crypto/ecc.browser.js.map +1 -0
- package/dist/modules/bitshares-native/crypto/ecc.d.ts +66 -0
- package/dist/modules/bitshares-native/crypto/ecc.d.ts.map +1 -0
- package/dist/modules/bitshares-native/crypto/ecc.js +557 -0
- package/dist/modules/bitshares-native/crypto/ecc.js.map +1 -0
- package/dist/modules/bitshares-native/crypto/ecc_selector.d.ts +2 -0
- package/dist/modules/bitshares-native/crypto/ecc_selector.d.ts.map +1 -0
- package/dist/modules/bitshares-native/crypto/ecc_selector.js +20 -0
- package/dist/modules/bitshares-native/crypto/ecc_selector.js.map +1 -0
- package/dist/modules/bitshares-native/index.d.ts +3 -0
- package/dist/modules/bitshares-native/index.d.ts.map +1 -0
- package/dist/modules/bitshares-native/index.js +32 -0
- package/dist/modules/bitshares-native/index.js.map +1 -0
- package/dist/modules/bitshares-native/resolvers.d.ts +40 -0
- package/dist/modules/bitshares-native/resolvers.d.ts.map +1 -0
- package/dist/modules/bitshares-native/resolvers.js +161 -0
- package/dist/modules/bitshares-native/resolvers.js.map +1 -0
- package/dist/modules/bitshares-native/serial/chain_constants.d.ts +56 -0
- package/dist/modules/bitshares-native/serial/chain_constants.d.ts.map +1 -0
- package/dist/modules/bitshares-native/serial/chain_constants.js +92 -0
- package/dist/modules/bitshares-native/serial/chain_constants.js.map +1 -0
- package/dist/modules/bitshares-native/serial/index.d.ts +10 -0
- package/dist/modules/bitshares-native/serial/index.d.ts.map +1 -0
- package/dist/modules/bitshares-native/serial/index.js +14 -0
- package/dist/modules/bitshares-native/serial/index.js.map +1 -0
- package/dist/modules/bitshares-native/serial/operations.d.ts +102 -0
- package/dist/modules/bitshares-native/serial/operations.d.ts.map +1 -0
- package/dist/modules/bitshares-native/serial/operations.js +615 -0
- package/dist/modules/bitshares-native/serial/operations.js.map +1 -0
- package/dist/modules/bitshares-native/serial/serializer.d.ts +64 -0
- package/dist/modules/bitshares-native/serial/serializer.d.ts.map +1 -0
- package/dist/modules/bitshares-native/serial/serializer.js +252 -0
- package/dist/modules/bitshares-native/serial/serializer.js.map +1 -0
- package/dist/modules/bitshares-native/serial/types.d.ts +120 -0
- package/dist/modules/bitshares-native/serial/types.d.ts.map +1 -0
- package/dist/modules/bitshares-native/serial/types.js +837 -0
- package/dist/modules/bitshares-native/serial/types.js.map +1 -0
- package/dist/modules/bitshares-native/signing_client.d.ts +6 -0
- package/dist/modules/bitshares-native/signing_client.d.ts.map +1 -0
- package/dist/modules/bitshares-native/signing_client.js +141 -0
- package/dist/modules/bitshares-native/signing_client.js.map +1 -0
- package/dist/modules/bitshares-native/subscriptions.d.ts +6 -0
- package/dist/modules/bitshares-native/subscriptions.d.ts.map +1 -0
- package/dist/modules/bitshares-native/subscriptions.js +865 -0
- package/dist/modules/bitshares-native/subscriptions.js.map +1 -0
- package/dist/modules/bitshares-native/transport.d.ts +51 -0
- package/dist/modules/bitshares-native/transport.d.ts.map +1 -0
- package/dist/modules/bitshares-native/transport.js +447 -0
- package/dist/modules/bitshares-native/transport.js.map +1 -0
- package/dist/modules/bitshares-native/tx/builder.d.ts +30 -0
- package/dist/modules/bitshares-native/tx/builder.d.ts.map +1 -0
- package/dist/modules/bitshares-native/tx/builder.js +262 -0
- package/dist/modules/bitshares-native/tx/builder.js.map +1 -0
- package/dist/modules/bitshares_client.d.ts +129 -0
- package/dist/modules/bitshares_client.d.ts.map +1 -0
- package/dist/modules/bitshares_client.js +627 -0
- package/dist/modules/bitshares_client.js.map +1 -0
- package/dist/modules/bot_settings.d.ts +33 -0
- package/dist/modules/bot_settings.d.ts.map +1 -0
- package/dist/modules/bot_settings.js +328 -0
- package/dist/modules/bot_settings.js.map +1 -0
- package/dist/modules/bots_file_lock.d.ts +88 -0
- package/dist/modules/bots_file_lock.d.ts.map +1 -0
- package/dist/modules/bots_file_lock.js +161 -0
- package/dist/modules/bots_file_lock.js.map +1 -0
- package/dist/modules/chain_keys.d.ts +302 -0
- package/dist/modules/chain_keys.d.ts.map +1 -0
- package/dist/modules/chain_keys.js +1095 -0
- package/dist/modules/chain_keys.js.map +1 -0
- package/dist/modules/chain_orders.d.ts +423 -0
- package/dist/modules/chain_orders.d.ts.map +1 -0
- package/dist/modules/chain_orders.js +1201 -0
- package/dist/modules/chain_orders.js.map +1 -0
- package/dist/modules/cli_whitelist_args.d.ts +6 -0
- package/dist/modules/cli_whitelist_args.d.ts.map +1 -0
- package/dist/modules/cli_whitelist_args.js +13 -0
- package/dist/modules/cli_whitelist_args.js.map +1 -0
- package/dist/modules/config.d.ts +57 -0
- package/dist/modules/config.d.ts.map +1 -0
- package/dist/modules/config.js +107 -0
- package/dist/modules/config.js.map +1 -0
- package/dist/modules/constants.d.ts +635 -0
- package/dist/modules/constants.d.ts.map +1 -0
- package/dist/modules/constants.js +1464 -0
- package/dist/modules/constants.js.map +1 -0
- package/dist/modules/cr_planner.d.ts +51 -0
- package/dist/modules/cr_planner.d.ts.map +1 -0
- package/dist/modules/cr_planner.js +299 -0
- package/dist/modules/cr_planner.js.map +1 -0
- package/dist/modules/credential_policy.d.ts +188 -0
- package/dist/modules/credential_policy.d.ts.map +1 -0
- package/dist/modules/credential_policy.js +1452 -0
- package/dist/modules/credential_policy.js.map +1 -0
- package/dist/modules/credential_runtime.d.ts +42 -0
- package/dist/modules/credential_runtime.d.ts.map +1 -0
- package/dist/modules/credential_runtime.js +148 -0
- package/dist/modules/credential_runtime.js.map +1 -0
- package/dist/modules/credential_session_cache.d.ts +36 -0
- package/dist/modules/credential_session_cache.d.ts.map +1 -0
- package/dist/modules/credential_session_cache.js +106 -0
- package/dist/modules/credential_session_cache.js.map +1 -0
- package/dist/modules/credit_runtime.d.ts +412 -0
- package/dist/modules/credit_runtime.d.ts.map +1 -0
- package/dist/modules/credit_runtime.js +2866 -0
- package/dist/modules/credit_runtime.js.map +1 -0
- package/dist/modules/crypto/browser_provider.d.ts +15 -0
- package/dist/modules/crypto/browser_provider.d.ts.map +1 -0
- package/dist/modules/crypto/browser_provider.js +113 -0
- package/dist/modules/crypto/browser_provider.js.map +1 -0
- package/dist/modules/crypto/index.d.ts +9 -0
- package/dist/modules/crypto/index.d.ts.map +1 -0
- package/dist/modules/crypto/index.js +44 -0
- package/dist/modules/crypto/index.js.map +1 -0
- package/dist/modules/crypto/node_provider.d.ts +15 -0
- package/dist/modules/crypto/node_provider.d.ts.map +1 -0
- package/dist/modules/crypto/node_provider.js +74 -0
- package/dist/modules/crypto/node_provider.js.map +1 -0
- package/dist/modules/crypto/provider.d.ts +34 -0
- package/dist/modules/crypto/provider.d.ts.map +1 -0
- package/dist/modules/crypto/provider.js +3 -0
- package/dist/modules/crypto/provider.js.map +1 -0
- package/dist/modules/crypto/pure_ripemd160.d.ts +8 -0
- package/dist/modules/crypto/pure_ripemd160.d.ts.map +1 -0
- package/dist/modules/crypto/pure_ripemd160.js +142 -0
- package/dist/modules/crypto/pure_ripemd160.js.map +1 -0
- package/dist/modules/crypto/pure_scrypt.d.ts +23 -0
- package/dist/modules/crypto/pure_scrypt.d.ts.map +1 -0
- package/dist/modules/crypto/pure_scrypt.js +161 -0
- package/dist/modules/crypto/pure_scrypt.js.map +1 -0
- package/dist/modules/crypto/pure_secp256k1.d.ts +29 -0
- package/dist/modules/crypto/pure_secp256k1.d.ts.map +1 -0
- package/dist/modules/crypto/pure_secp256k1.js +195 -0
- package/dist/modules/crypto/pure_secp256k1.js.map +1 -0
- package/dist/modules/crypto/sync.d.ts +13 -0
- package/dist/modules/crypto/sync.d.ts.map +1 -0
- package/dist/modules/crypto/sync.js +37 -0
- package/dist/modules/crypto/sync.js.map +1 -0
- package/dist/modules/dexbot_class.d.ts +1074 -0
- package/dist/modules/dexbot_class.d.ts.map +1 -0
- package/dist/modules/dexbot_class.js +4613 -0
- package/dist/modules/dexbot_class.js.map +1 -0
- package/dist/modules/dexbot_credential_client.d.ts +71 -0
- package/dist/modules/dexbot_credential_client.d.ts.map +1 -0
- package/dist/modules/dexbot_credential_client.js +224 -0
- package/dist/modules/dexbot_credential_client.js.map +1 -0
- package/dist/modules/dexbot_fill_runtime.d.ts +173 -0
- package/dist/modules/dexbot_fill_runtime.d.ts.map +1 -0
- package/dist/modules/dexbot_fill_runtime.js +217 -0
- package/dist/modules/dexbot_fill_runtime.js.map +1 -0
- package/dist/modules/dexbot_maintenance_runtime.d.ts +279 -0
- package/dist/modules/dexbot_maintenance_runtime.d.ts.map +1 -0
- package/dist/modules/dexbot_maintenance_runtime.js +1613 -0
- package/dist/modules/dexbot_maintenance_runtime.js.map +1 -0
- package/dist/modules/env.d.ts +12 -0
- package/dist/modules/env.d.ts.map +1 -0
- package/dist/modules/env.js +57 -0
- package/dist/modules/env.js.map +1 -0
- package/dist/modules/fund_registry.d.ts +96 -0
- package/dist/modules/fund_registry.d.ts.map +1 -0
- package/dist/modules/fund_registry.js +261 -0
- package/dist/modules/fund_registry.js.map +1 -0
- package/dist/modules/general_settings.d.ts +36 -0
- package/dist/modules/general_settings.d.ts.map +1 -0
- package/dist/modules/general_settings.js +63 -0
- package/dist/modules/general_settings.js.map +1 -0
- package/dist/modules/graceful_shutdown.d.ts +86 -0
- package/dist/modules/graceful_shutdown.d.ts.map +1 -0
- package/dist/modules/graceful_shutdown.js +164 -0
- package/dist/modules/graceful_shutdown.js.map +1 -0
- package/dist/modules/key_store.d.ts +60 -0
- package/dist/modules/key_store.d.ts.map +1 -0
- package/dist/modules/key_store.js +215 -0
- package/dist/modules/key_store.js.map +1 -0
- package/dist/modules/launcher/bot_supervisor.d.ts +84 -0
- package/dist/modules/launcher/bot_supervisor.d.ts.map +1 -0
- package/dist/modules/launcher/bot_supervisor.js +1067 -0
- package/dist/modules/launcher/bot_supervisor.js.map +1 -0
- package/dist/modules/launcher/child_env.d.ts +9 -0
- package/dist/modules/launcher/child_env.d.ts.map +1 -0
- package/dist/modules/launcher/child_env.js +78 -0
- package/dist/modules/launcher/child_env.js.map +1 -0
- package/dist/modules/launcher/credential_bootstrap.d.ts +22 -0
- package/dist/modules/launcher/credential_bootstrap.d.ts.map +1 -0
- package/dist/modules/launcher/credential_bootstrap.js +303 -0
- package/dist/modules/launcher/credential_bootstrap.js.map +1 -0
- package/dist/modules/launcher/credential_daemon.d.ts +32 -0
- package/dist/modules/launcher/credential_daemon.d.ts.map +1 -0
- package/dist/modules/launcher/credential_daemon.js +173 -0
- package/dist/modules/launcher/credential_daemon.js.map +1 -0
- package/dist/modules/launcher/credential_secret.d.ts +6 -0
- package/dist/modules/launcher/credential_secret.d.ts.map +1 -0
- package/dist/modules/launcher/credential_secret.js +15 -0
- package/dist/modules/launcher/credential_secret.js.map +1 -0
- package/dist/modules/launcher/foreign_cred_daemon.d.ts +2 -0
- package/dist/modules/launcher/foreign_cred_daemon.d.ts.map +1 -0
- package/dist/modules/launcher/foreign_cred_daemon.js +166 -0
- package/dist/modules/launcher/foreign_cred_daemon.js.map +1 -0
- package/dist/modules/launcher/headless_password.d.ts +8 -0
- package/dist/modules/launcher/headless_password.d.ts.map +1 -0
- package/dist/modules/launcher/headless_password.js +33 -0
- package/dist/modules/launcher/headless_password.js.map +1 -0
- package/dist/modules/launcher/launch_modes.d.ts +36 -0
- package/dist/modules/launcher/launch_modes.d.ts.map +1 -0
- package/dist/modules/launcher/launch_modes.js +129 -0
- package/dist/modules/launcher/launch_modes.js.map +1 -0
- package/dist/modules/launcher/market_adapter_runtime.d.ts +43 -0
- package/dist/modules/launcher/market_adapter_runtime.d.ts.map +1 -0
- package/dist/modules/launcher/market_adapter_runtime.js +217 -0
- package/dist/modules/launcher/market_adapter_runtime.js.map +1 -0
- package/dist/modules/launcher/market_adapter_watchdog.d.ts +26 -0
- package/dist/modules/launcher/market_adapter_watchdog.d.ts.map +1 -0
- package/dist/modules/launcher/market_adapter_watchdog.js +214 -0
- package/dist/modules/launcher/market_adapter_watchdog.js.map +1 -0
- package/dist/modules/launcher/monolithic_runtime.d.ts +89 -0
- package/dist/modules/launcher/monolithic_runtime.d.ts.map +1 -0
- package/dist/modules/launcher/monolithic_runtime.js +425 -0
- package/dist/modules/launcher/monolithic_runtime.js.map +1 -0
- package/dist/modules/launcher/runtime_entry.d.ts +26 -0
- package/dist/modules/launcher/runtime_entry.d.ts.map +1 -0
- package/dist/modules/launcher/runtime_entry.js +49 -0
- package/dist/modules/launcher/runtime_entry.js.map +1 -0
- package/dist/modules/launcher/status_reporting.d.ts +48 -0
- package/dist/modules/launcher/status_reporting.d.ts.map +1 -0
- package/dist/modules/launcher/status_reporting.js +113 -0
- package/dist/modules/launcher/status_reporting.js.map +1 -0
- package/dist/modules/launcher/supervisor_control.d.ts +6 -0
- package/dist/modules/launcher/supervisor_control.d.ts.map +1 -0
- package/dist/modules/launcher/supervisor_control.js +59 -0
- package/dist/modules/launcher/supervisor_control.js.map +1 -0
- package/dist/modules/logger.d.ts +2 -0
- package/dist/modules/logger.d.ts.map +1 -0
- package/dist/modules/logger.js +71 -0
- package/dist/modules/logger.js.map +1 -0
- package/dist/modules/market_adapter_whitelist.d.ts +22 -0
- package/dist/modules/market_adapter_whitelist.d.ts.map +1 -0
- package/dist/modules/market_adapter_whitelist.js +82 -0
- package/dist/modules/market_adapter_whitelist.js.map +1 -0
- package/dist/modules/node_health_cache.d.ts +55 -0
- package/dist/modules/node_health_cache.d.ts.map +1 -0
- package/dist/modules/node_health_cache.js +134 -0
- package/dist/modules/node_health_cache.js.map +1 -0
- package/dist/modules/node_manager.d.ts +215 -0
- package/dist/modules/node_manager.d.ts.map +1 -0
- package/dist/modules/node_manager.js +628 -0
- package/dist/modules/node_manager.js.map +1 -0
- package/dist/modules/order/accounting.d.ts +349 -0
- package/dist/modules/order/accounting.d.ts.map +1 -0
- package/dist/modules/order/accounting.js +1191 -0
- package/dist/modules/order/accounting.js.map +1 -0
- package/dist/modules/order/async_lock.d.ts +126 -0
- package/dist/modules/order/async_lock.d.ts.map +1 -0
- package/dist/modules/order/async_lock.js +195 -0
- package/dist/modules/order/async_lock.js.map +1 -0
- package/dist/modules/order/export.d.ts +129 -0
- package/dist/modules/order/export.d.ts.map +1 -0
- package/dist/modules/order/export.js +316 -0
- package/dist/modules/order/export.js.map +1 -0
- package/dist/modules/order/format.d.ts +158 -0
- package/dist/modules/order/format.d.ts.map +1 -0
- package/dist/modules/order/format.js +232 -0
- package/dist/modules/order/format.js.map +1 -0
- package/dist/modules/order/grid.d.ts +549 -0
- package/dist/modules/order/grid.d.ts.map +1 -0
- package/dist/modules/order/grid.js +1746 -0
- package/dist/modules/order/grid.js.map +1 -0
- package/dist/modules/order/grid_reconcile.d.ts +154 -0
- package/dist/modules/order/grid_reconcile.d.ts.map +1 -0
- package/dist/modules/order/grid_reconcile.js +1192 -0
- package/dist/modules/order/grid_reconcile.js.map +1 -0
- package/dist/modules/order/index.d.ts +55 -0
- package/dist/modules/order/index.d.ts.map +1 -0
- package/dist/modules/order/index.js +79 -0
- package/dist/modules/order/index.js.map +1 -0
- package/dist/modules/order/logger.d.ts +136 -0
- package/dist/modules/order/logger.d.ts.map +1 -0
- package/dist/modules/order/logger.js +614 -0
- package/dist/modules/order/logger.js.map +1 -0
- package/dist/modules/order/logger_state.d.ts +133 -0
- package/dist/modules/order/logger_state.d.ts.map +1 -0
- package/dist/modules/order/logger_state.js +170 -0
- package/dist/modules/order/logger_state.js.map +1 -0
- package/dist/modules/order/manager.d.ts +413 -0
- package/dist/modules/order/manager.d.ts.map +1 -0
- package/dist/modules/order/manager.js +1605 -0
- package/dist/modules/order/manager.js.map +1 -0
- package/dist/modules/order/processed_fill_store.d.ts +135 -0
- package/dist/modules/order/processed_fill_store.d.ts.map +1 -0
- package/dist/modules/order/processed_fill_store.js +288 -0
- package/dist/modules/order/processed_fill_store.js.map +1 -0
- package/dist/modules/order/runner.d.ts +70 -0
- package/dist/modules/order/runner.d.ts.map +1 -0
- package/dist/modules/order/runner.js +140 -0
- package/dist/modules/order/runner.js.map +1 -0
- package/dist/modules/order/strategy.d.ts +196 -0
- package/dist/modules/order/strategy.d.ts.map +1 -0
- package/dist/modules/order/strategy.js +398 -0
- package/dist/modules/order/strategy.js.map +1 -0
- package/dist/modules/order/sync_engine.d.ts +386 -0
- package/dist/modules/order/sync_engine.d.ts.map +1 -0
- package/dist/modules/order/sync_engine.js +1459 -0
- package/dist/modules/order/sync_engine.js.map +1 -0
- package/dist/modules/order/utils/math.d.ts +677 -0
- package/dist/modules/order/utils/math.d.ts.map +1 -0
- package/dist/modules/order/utils/math.js +1172 -0
- package/dist/modules/order/utils/math.js.map +1 -0
- package/dist/modules/order/utils/order.d.ts +572 -0
- package/dist/modules/order/utils/order.d.ts.map +1 -0
- package/dist/modules/order/utils/order.js +1145 -0
- package/dist/modules/order/utils/order.js.map +1 -0
- package/dist/modules/order/utils/system.d.ts +268 -0
- package/dist/modules/order/utils/system.d.ts.map +1 -0
- package/dist/modules/order/utils/system.js +1261 -0
- package/dist/modules/order/utils/system.js.map +1 -0
- package/dist/modules/order/utils/validate.d.ts +280 -0
- package/dist/modules/order/utils/validate.d.ts.map +1 -0
- package/dist/modules/order/utils/validate.js +918 -0
- package/dist/modules/order/utils/validate.js.map +1 -0
- package/dist/modules/order/working_grid.d.ts +212 -0
- package/dist/modules/order/working_grid.d.ts.map +1 -0
- package/dist/modules/order/working_grid.js +279 -0
- package/dist/modules/order/working_grid.js.map +1 -0
- package/dist/modules/path_api.d.ts +32 -0
- package/dist/modules/path_api.d.ts.map +1 -0
- package/dist/modules/path_api.js +148 -0
- package/dist/modules/path_api.js.map +1 -0
- package/dist/modules/paths.d.ts +58 -0
- package/dist/modules/paths.d.ts.map +1 -0
- package/dist/modules/paths.js +82 -0
- package/dist/modules/paths.js.map +1 -0
- package/dist/modules/process_discovery.d.ts +58 -0
- package/dist/modules/process_discovery.d.ts.map +1 -0
- package/dist/modules/process_discovery.js +265 -0
- package/dist/modules/process_discovery.js.map +1 -0
- package/dist/modules/runtime.d.ts +34 -0
- package/dist/modules/runtime.d.ts.map +1 -0
- package/dist/modules/runtime.js +98 -0
- package/dist/modules/runtime.js.map +1 -0
- package/dist/modules/runtime_settings.d.ts +12 -0
- package/dist/modules/runtime_settings.d.ts.map +1 -0
- package/dist/modules/runtime_settings.js +122 -0
- package/dist/modules/runtime_settings.js.map +1 -0
- package/dist/modules/settings_merge.d.ts +38 -0
- package/dist/modules/settings_merge.d.ts.map +1 -0
- package/dist/modules/settings_merge.js +246 -0
- package/dist/modules/settings_merge.js.map +1 -0
- package/dist/modules/storage/browser_adapter.d.ts +56 -0
- package/dist/modules/storage/browser_adapter.d.ts.map +1 -0
- package/dist/modules/storage/browser_adapter.js +231 -0
- package/dist/modules/storage/browser_adapter.js.map +1 -0
- package/dist/modules/storage/index.d.ts +28 -0
- package/dist/modules/storage/index.d.ts.map +1 -0
- package/dist/modules/storage/index.js +52 -0
- package/dist/modules/storage/index.js.map +1 -0
- package/dist/modules/storage/node_adapter.d.ts +49 -0
- package/dist/modules/storage/node_adapter.d.ts.map +1 -0
- package/dist/modules/storage/node_adapter.js +167 -0
- package/dist/modules/storage/node_adapter.js.map +1 -0
- package/dist/modules/storage/types.d.ts +92 -0
- package/dist/modules/storage/types.d.ts.map +1 -0
- package/dist/modules/storage/types.js +3 -0
- package/dist/modules/storage/types.js.map +1 -0
- package/dist/modules/types.d.ts +1382 -0
- package/dist/modules/types.d.ts.map +1 -0
- package/dist/modules/types.js +11 -0
- package/dist/modules/types.js.map +1 -0
- package/dist/modules/utils/base58check.d.ts +12 -0
- package/dist/modules/utils/base58check.d.ts.map +1 -0
- package/dist/modules/utils/base58check.js +112 -0
- package/dist/modules/utils/base58check.js.map +1 -0
- package/dist/modules/utils/build_dir.d.ts +7 -0
- package/dist/modules/utils/build_dir.d.ts.map +1 -0
- package/dist/modules/utils/build_dir.js +8 -0
- package/dist/modules/utils/build_dir.js.map +1 -0
- package/dist/modules/utils/fs_utils.d.ts +25 -0
- package/dist/modules/utils/fs_utils.d.ts.map +1 -0
- package/dist/modules/utils/fs_utils.js +27 -0
- package/dist/modules/utils/fs_utils.js.map +1 -0
- package/dist/modules/utils/math_utils.d.ts +10 -0
- package/dist/modules/utils/math_utils.d.ts.map +1 -0
- package/dist/modules/utils/math_utils.js +17 -0
- package/dist/modules/utils/math_utils.js.map +1 -0
- package/dist/modules/validate_profiles.d.ts +37 -0
- package/dist/modules/validate_profiles.d.ts.map +1 -0
- package/dist/modules/validate_profiles.js +369 -0
- package/dist/modules/validate_profiles.js.map +1 -0
- package/dist/pm2.d.ts +167 -0
- package/dist/pm2.d.ts.map +1 -0
- package/dist/pm2.js +998 -0
- package/dist/pm2.js.map +1 -0
- package/dist/scripts/analyze-git.d.ts +11 -0
- package/dist/scripts/analyze-git.d.ts.map +1 -0
- package/dist/scripts/analyze-git.js +851 -0
- package/dist/scripts/analyze-git.js.map +1 -0
- package/dist/scripts/analyze-orders.d.ts +17 -0
- package/dist/scripts/analyze-orders.d.ts.map +1 -0
- package/dist/scripts/analyze-orders.js +1568 -0
- package/dist/scripts/analyze-orders.js.map +1 -0
- package/dist/scripts/diagnose-kibana-candles.d.ts +3 -0
- package/dist/scripts/diagnose-kibana-candles.d.ts.map +1 -0
- package/dist/scripts/diagnose-kibana-candles.js +82 -0
- package/dist/scripts/diagnose-kibana-candles.js.map +1 -0
- package/dist/scripts/diagnose-pool-history.d.ts +3 -0
- package/dist/scripts/diagnose-pool-history.d.ts.map +1 -0
- package/dist/scripts/diagnose-pool-history.js +296 -0
- package/dist/scripts/diagnose-pool-history.js.map +1 -0
- package/dist/scripts/divergence-calc.d.ts +26 -0
- package/dist/scripts/divergence-calc.d.ts.map +1 -0
- package/dist/scripts/divergence-calc.js +119 -0
- package/dist/scripts/divergence-calc.js.map +1 -0
- package/dist/scripts/generate_lp_chart.d.ts +31 -0
- package/dist/scripts/generate_lp_chart.d.ts.map +1 -0
- package/dist/scripts/generate_lp_chart.js +92 -0
- package/dist/scripts/generate_lp_chart.js.map +1 -0
- package/dist/scripts/generate_mainnet_corpus_report.d.ts +24 -0
- package/dist/scripts/generate_mainnet_corpus_report.d.ts.map +1 -0
- package/dist/scripts/generate_mainnet_corpus_report.js +237 -0
- package/dist/scripts/generate_mainnet_corpus_report.js.map +1 -0
- package/dist/scripts/generate_market_adapter_whitelist.d.ts +2 -0
- package/dist/scripts/generate_market_adapter_whitelist.d.ts.map +1 -0
- package/dist/scripts/generate_market_adapter_whitelist.js +111 -0
- package/dist/scripts/generate_market_adapter_whitelist.js.map +1 -0
- package/dist/scripts/migrate_bot_keys.d.ts +6 -0
- package/dist/scripts/migrate_bot_keys.d.ts.map +1 -0
- package/dist/scripts/migrate_bot_keys.js +301 -0
- package/dist/scripts/migrate_bot_keys.js.map +1 -0
- package/dist/scripts/native_release_gates.d.ts +3 -0
- package/dist/scripts/native_release_gates.d.ts.map +1 -0
- package/dist/scripts/native_release_gates.js +52 -0
- package/dist/scripts/native_release_gates.js.map +1 -0
- package/dist/scripts/print_grid.d.ts +16 -0
- package/dist/scripts/print_grid.d.ts.map +1 -0
- package/dist/scripts/print_grid.js +80 -0
- package/dist/scripts/print_grid.js.map +1 -0
- package/dist/scripts/run-tests.d.ts +2 -0
- package/dist/scripts/run-tests.d.ts.map +1 -0
- package/dist/scripts/run-tests.js +49 -0
- package/dist/scripts/run-tests.js.map +1 -0
- package/dist/scripts/sync-version.d.ts +14 -0
- package/dist/scripts/sync-version.d.ts.map +1 -0
- package/dist/scripts/sync-version.js +158 -0
- package/dist/scripts/sync-version.js.map +1 -0
- package/dist/scripts/test-credit-renewal.d.ts +2 -0
- package/dist/scripts/test-credit-renewal.d.ts.map +1 -0
- package/dist/scripts/test-credit-renewal.js +329 -0
- package/dist/scripts/test-credit-renewal.js.map +1 -0
- package/dist/scripts/update.d.ts +24 -0
- package/dist/scripts/update.d.ts.map +1 -0
- package/dist/scripts/update.js +650 -0
- package/dist/scripts/update.js.map +1 -0
- package/dist/scripts/validate_bots.d.ts +16 -0
- package/dist/scripts/validate_bots.d.ts.map +1 -0
- package/dist/scripts/validate_bots.js +106 -0
- package/dist/scripts/validate_bots.js.map +1 -0
- package/dist/scripts/verify-browser-bundle.d.ts +22 -0
- package/dist/scripts/verify-browser-bundle.d.ts.map +1 -0
- package/dist/scripts/verify-browser-bundle.js +339 -0
- package/dist/scripts/verify-browser-bundle.js.map +1 -0
- package/dist/unlock.d.ts +48 -0
- package/dist/unlock.d.ts.map +1 -0
- package/dist/unlock.js +925 -0
- package/dist/unlock.js.map +1 -0
- package/package.json +112 -0
- package/scripts/README.md +356 -0
- package/scripts/clear-all.sh +195 -0
- package/scripts/clear-logs.sh +95 -0
- package/scripts/clear-market-adapter.sh +196 -0
- package/scripts/clear-orders.sh +113 -0
- package/scripts/create-bot-symlinks.sh +51 -0
- package/scripts/postinstall.js +9 -0
- package/scripts/reset-settings.sh +118 -0
|
@@ -0,0 +1,851 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* DEXBot2 Repository Statistics Analyzer
|
|
5
|
+
*
|
|
6
|
+
* Analyzes git history and generates a chart showing:
|
|
7
|
+
* - Lines added vs deleted by file
|
|
8
|
+
*
|
|
9
|
+
* Usage: tsx scripts/analyze-git.ts
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const { execSync } = require('child_process');
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
const Format = require('../modules/order/format');
|
|
16
|
+
const { ensureDir } = require('../modules/utils/fs_utils');
|
|
17
|
+
/**
|
|
18
|
+
* RepoAnalyzer Class
|
|
19
|
+
*
|
|
20
|
+
* Encapsulates git statistics analysis and report generation.
|
|
21
|
+
* Parses git history and generates both console and HTML visualizations.
|
|
22
|
+
*/
|
|
23
|
+
class RepoAnalyzer {
|
|
24
|
+
stats;
|
|
25
|
+
allStats;
|
|
26
|
+
filePatterns;
|
|
27
|
+
/**
|
|
28
|
+
* constructor: Initialize analyzer with empty stats and filter patterns
|
|
29
|
+
*
|
|
30
|
+
* Stats structure tracks:
|
|
31
|
+
* - files: Map of file paths to their add/delete/edit counts
|
|
32
|
+
* - totalAdded/Deleted/Edits: Cumulative counts across all files
|
|
33
|
+
* - commits: Total commits analyzed
|
|
34
|
+
* - dailyStats: Changes grouped by date (for trend analysis)
|
|
35
|
+
*
|
|
36
|
+
* Tracked files are filtered by patterns:
|
|
37
|
+
* - README* (any README file)
|
|
38
|
+
* - Root-level .js/.ts files (only matches files without directory separators)
|
|
39
|
+
* - modules/* folder (core business logic)
|
|
40
|
+
* - scripts/* folder (utility scripts)
|
|
41
|
+
*
|
|
42
|
+
* This ensures we focus on actual project code, not generated/transient files
|
|
43
|
+
*/
|
|
44
|
+
constructor() {
|
|
45
|
+
// Statistics aggregation structure
|
|
46
|
+
this.stats = {
|
|
47
|
+
files: {}, // filename -> {added, deleted, edits}
|
|
48
|
+
totalAdded: 0, // Total lines added across tracked files
|
|
49
|
+
totalDeleted: 0, // Total lines deleted across tracked files
|
|
50
|
+
totalEdits: 0, // Sum of added + deleted
|
|
51
|
+
commits: 0, // Number of commits processed
|
|
52
|
+
dailyStats: {} // date -> {added, deleted, edits, commits}
|
|
53
|
+
};
|
|
54
|
+
// All files statistics (no filtering)
|
|
55
|
+
this.allStats = {
|
|
56
|
+
files: {},
|
|
57
|
+
totalAdded: 0,
|
|
58
|
+
totalDeleted: 0,
|
|
59
|
+
totalEdits: 0,
|
|
60
|
+
commits: 0,
|
|
61
|
+
dailyStats: {}
|
|
62
|
+
};
|
|
63
|
+
// Regular expressions to filter which files to track
|
|
64
|
+
// This prevents noise from auto-generated files, tests, etc.
|
|
65
|
+
this.filePatterns = [
|
|
66
|
+
/^README/i, // All README files
|
|
67
|
+
/^[^/]+\.(js|ts)$/, // Root-level .js/.ts files (no subdirectories)
|
|
68
|
+
/^modules\//, // Everything under modules/ (core code)
|
|
69
|
+
/^scripts\// // Everything under scripts/ (tooling)
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* isTrackedFile: Check if file path matches tracked file patterns
|
|
74
|
+
*
|
|
75
|
+
* Returns true if file matches ANY pattern (OR logic)
|
|
76
|
+
* Used to filter git log entries to focus on project code
|
|
77
|
+
*
|
|
78
|
+
* @param {string} filePath - File path from git log
|
|
79
|
+
* @returns {boolean} - True if file should be included in stats
|
|
80
|
+
*/
|
|
81
|
+
isTrackedFile(filePath) {
|
|
82
|
+
return this.filePatterns.some(pattern => pattern.test(filePath));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* analyzeGitLog: Parse git history and build statistics
|
|
86
|
+
*
|
|
87
|
+
* Executes: git log --numstat --date=short --pretty=format:"%ad %h %s"
|
|
88
|
+
* Output format (line by line):
|
|
89
|
+
* - Commit lines: "YYYY-MM-DD hash message"
|
|
90
|
+
* - File change lines: "added\tdeleted\tfilepath"
|
|
91
|
+
*
|
|
92
|
+
* Flow:
|
|
93
|
+
* 1. Parse commit lines to track current date
|
|
94
|
+
* 2. Parse file change lines (only tracked files)
|
|
95
|
+
* 3. Aggregate statistics per file and per day
|
|
96
|
+
* 4. Update cumulative totals
|
|
97
|
+
*
|
|
98
|
+
* Error handling: Throws if git command fails (not a repo, etc.)
|
|
99
|
+
*/
|
|
100
|
+
analyzeGitLog() {
|
|
101
|
+
console.log('📊 Analyzing DEXBot2 Repository...\n');
|
|
102
|
+
try {
|
|
103
|
+
// Get all commits with file changes and dates
|
|
104
|
+
const gitLog = execSync('git log --numstat --date=short --pretty=format:"%ad %h %s"', { encoding: 'utf8', cwd: process.cwd() });
|
|
105
|
+
const lines = gitLog.split('\n');
|
|
106
|
+
let currentDate = null;
|
|
107
|
+
let commitCount = 0;
|
|
108
|
+
for (const line of lines) {
|
|
109
|
+
// Check if this is a commit line (date + hash + message)
|
|
110
|
+
if (/^\d{4}-\d{2}-\d{2}/.test(line)) {
|
|
111
|
+
const datePart = line.substring(0, 10);
|
|
112
|
+
currentDate = datePart;
|
|
113
|
+
// Initialize daily stats if not exists
|
|
114
|
+
if (!this.stats.dailyStats[currentDate]) {
|
|
115
|
+
this.stats.dailyStats[currentDate] = {
|
|
116
|
+
added: 0,
|
|
117
|
+
deleted: 0,
|
|
118
|
+
edits: 0,
|
|
119
|
+
commits: 0
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
if (!this.allStats.dailyStats[currentDate]) {
|
|
123
|
+
this.allStats.dailyStats[currentDate] = {
|
|
124
|
+
added: 0,
|
|
125
|
+
deleted: 0,
|
|
126
|
+
edits: 0,
|
|
127
|
+
commits: 0
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
this.stats.dailyStats[currentDate].commits++;
|
|
131
|
+
this.allStats.dailyStats[currentDate].commits++;
|
|
132
|
+
commitCount++;
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
// Parse numstat line: added\tdeleted\tfilename
|
|
136
|
+
if (line.trim() && /^\d+/.test(line)) {
|
|
137
|
+
const parts = line.split('\t');
|
|
138
|
+
if (parts.length >= 3) {
|
|
139
|
+
const added = parseInt(parts[0]) || 0;
|
|
140
|
+
const deleted = parseInt(parts[1]) || 0;
|
|
141
|
+
const filePath = parts[2];
|
|
142
|
+
// Track ALL files (no filtering)
|
|
143
|
+
if (!this.allStats.files[filePath]) {
|
|
144
|
+
this.allStats.files[filePath] = { added: 0, deleted: 0, edits: 0 };
|
|
145
|
+
}
|
|
146
|
+
this.allStats.files[filePath].added += added;
|
|
147
|
+
this.allStats.files[filePath].deleted += deleted;
|
|
148
|
+
this.allStats.files[filePath].edits += (added + deleted);
|
|
149
|
+
this.allStats.totalAdded += added;
|
|
150
|
+
this.allStats.totalDeleted += deleted;
|
|
151
|
+
this.allStats.totalEdits += (added + deleted);
|
|
152
|
+
if (currentDate) {
|
|
153
|
+
if (!this.allStats.dailyStats[currentDate]) {
|
|
154
|
+
this.allStats.dailyStats[currentDate] = { added: 0, deleted: 0, edits: 0, commits: 0 };
|
|
155
|
+
}
|
|
156
|
+
this.allStats.dailyStats[currentDate].added += added;
|
|
157
|
+
this.allStats.dailyStats[currentDate].deleted += deleted;
|
|
158
|
+
this.allStats.dailyStats[currentDate].edits += (added + deleted);
|
|
159
|
+
}
|
|
160
|
+
// Only track files matching our patterns
|
|
161
|
+
if (this.isTrackedFile(filePath)) {
|
|
162
|
+
// Update file stats
|
|
163
|
+
if (!this.stats.files[filePath]) {
|
|
164
|
+
this.stats.files[filePath] = {
|
|
165
|
+
added: 0,
|
|
166
|
+
deleted: 0,
|
|
167
|
+
edits: 0
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
this.stats.files[filePath].added += added;
|
|
171
|
+
this.stats.files[filePath].deleted += deleted;
|
|
172
|
+
this.stats.files[filePath].edits += (added + deleted);
|
|
173
|
+
// Update daily stats
|
|
174
|
+
if (currentDate && this.stats.dailyStats[currentDate]) {
|
|
175
|
+
this.stats.dailyStats[currentDate].added += added;
|
|
176
|
+
this.stats.dailyStats[currentDate].deleted += deleted;
|
|
177
|
+
this.stats.dailyStats[currentDate].edits += (added + deleted);
|
|
178
|
+
}
|
|
179
|
+
// Update totals
|
|
180
|
+
this.stats.totalAdded += added;
|
|
181
|
+
this.stats.totalDeleted += deleted;
|
|
182
|
+
this.stats.totalEdits += (added + deleted);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
this.stats.commits = commitCount;
|
|
188
|
+
}
|
|
189
|
+
catch (err) {
|
|
190
|
+
console.error('Error analyzing git log:', err.message);
|
|
191
|
+
process.exit(1);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* generateCharts: Generate all output visualizations
|
|
196
|
+
*
|
|
197
|
+
* Creates two output formats:
|
|
198
|
+
* 1. Console output: Terminal-friendly ASCII tables and stats
|
|
199
|
+
* 2. HTML output: Interactive charts with Chart.js library
|
|
200
|
+
*
|
|
201
|
+
* Files are sorted by total edits (most active files first)
|
|
202
|
+
* for meaningful visualization
|
|
203
|
+
*/
|
|
204
|
+
generateCharts() {
|
|
205
|
+
// Sort files by total edits (descending) for most-active-first display
|
|
206
|
+
const sortedFiles = Object.entries(this.stats.files)
|
|
207
|
+
.sort((a, b) => b[1].edits - a[1].edits);
|
|
208
|
+
// Output 1: Console visualization with tables
|
|
209
|
+
this.printConsoleCharts(sortedFiles);
|
|
210
|
+
// Output 2: HTML file with interactive charts
|
|
211
|
+
this.generateHtmlChart(sortedFiles);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* printConsoleCharts: Print formatted ASCII statistics to console
|
|
215
|
+
*
|
|
216
|
+
* Displays:
|
|
217
|
+
* 1. Summary stats: Total commits, lines added/deleted, net change
|
|
218
|
+
* 2. File listing: All tracked files with their change counts
|
|
219
|
+
* 3. Add/Delete ratio: Metric for code quality (more adds vs deletes)
|
|
220
|
+
* 4. Daily activity: Last 10 days of changes (trend analysis)
|
|
221
|
+
*
|
|
222
|
+
* Output format uses Unicode box drawing and padding for readability
|
|
223
|
+
* Suitable for terminal display with fixed-width fonts
|
|
224
|
+
*/
|
|
225
|
+
printConsoleCharts(_sortedFiles) {
|
|
226
|
+
console.log('='.repeat(80));
|
|
227
|
+
console.log('📈 DEXBot2 Repository Statistics');
|
|
228
|
+
console.log('='.repeat(80));
|
|
229
|
+
console.log();
|
|
230
|
+
// Summary stats
|
|
231
|
+
console.log('📊 Overall Statistics:');
|
|
232
|
+
console.log('─'.repeat(80));
|
|
233
|
+
console.log(` Total Commits Analyzed: ${this.stats.commits}`);
|
|
234
|
+
console.log(` Total Lines Added: ${this.stats.totalAdded.toLocaleString()}`);
|
|
235
|
+
console.log(` Total Lines Deleted: ${this.stats.totalDeleted.toLocaleString()}`);
|
|
236
|
+
console.log(` Total Lines Changed: ${this.stats.totalEdits.toLocaleString()}`);
|
|
237
|
+
console.log(` Net Change: ${(this.stats.totalAdded - this.stats.totalDeleted).toLocaleString()}`);
|
|
238
|
+
console.log();
|
|
239
|
+
// All tracked files
|
|
240
|
+
console.log('📋 All Tracked Files:');
|
|
241
|
+
console.log('─'.repeat(80));
|
|
242
|
+
console.log(`${'File'.padEnd(45)} ${'Added'.padStart(10)} ${'Deleted'.padStart(10)} ${'Total'.padStart(10)}`);
|
|
243
|
+
console.log('─'.repeat(80));
|
|
244
|
+
const allFiles = Object.entries(this.stats.files)
|
|
245
|
+
.sort((a, b) => b[1].edits - a[1].edits);
|
|
246
|
+
for (const [file, stats] of allFiles) {
|
|
247
|
+
const fileName = file.length > 43 ? '...' + file.slice(-40) : file;
|
|
248
|
+
console.log(`${fileName.padEnd(45)} ${stats.added.toString().padStart(10)} ${stats.deleted.toString().padStart(10)} ${stats.edits.toString().padStart(10)}`);
|
|
249
|
+
}
|
|
250
|
+
console.log();
|
|
251
|
+
// Add/Delete ratio
|
|
252
|
+
console.log('🎯 Add vs Delete Ratio:');
|
|
253
|
+
console.log('─'.repeat(80));
|
|
254
|
+
const ratio = (this.stats.totalAdded / Math.max(1, this.stats.totalDeleted));
|
|
255
|
+
console.log(`Ratio (Added/Deleted): ${Format.formatMetric2(ratio)}x`);
|
|
256
|
+
console.log();
|
|
257
|
+
// Daily stats summary
|
|
258
|
+
const dailyDates = Object.keys(this.stats.dailyStats).sort();
|
|
259
|
+
if (dailyDates.length > 0) {
|
|
260
|
+
console.log('📅 Daily Activity (Last 10 days):');
|
|
261
|
+
console.log('─'.repeat(80));
|
|
262
|
+
console.log(`${'Date'.padEnd(15)} ${'Added'.padStart(10)} ${'Deleted'.padStart(10)} ${'Total'.padStart(10)} ${'Commits'.padStart(8)}`);
|
|
263
|
+
console.log('─'.repeat(80));
|
|
264
|
+
const last10Days = dailyDates.slice(-10);
|
|
265
|
+
for (const date of last10Days) {
|
|
266
|
+
const daily = this.stats.dailyStats[date];
|
|
267
|
+
console.log(`${date.padEnd(15)} ${daily.added.toString().padStart(10)} ${daily.deleted.toString().padStart(10)} ${daily.edits.toString().padStart(10)} ${daily.commits.toString().padStart(8)}`);
|
|
268
|
+
}
|
|
269
|
+
console.log();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* generateHtmlChart: Create interactive HTML visualization with uPlot
|
|
274
|
+
*
|
|
275
|
+
* Generates an HTML file with 5 interactive charts:
|
|
276
|
+
* 1. File comparison: Stacked bar chart (added vs deleted by file)
|
|
277
|
+
* 2. Daily trends: Line chart (daily changes over time)
|
|
278
|
+
* 3. Cumulative progress: Line chart (total growth trajectory)
|
|
279
|
+
* 4. Net core lines: Line chart (added - deleted over time for core files)
|
|
280
|
+
* 5. Net repo lines: Line chart (added - deleted over time for all files)
|
|
281
|
+
*
|
|
282
|
+
* Data preparation:
|
|
283
|
+
* - Truncates file names to fit in chart labels
|
|
284
|
+
* - Escapes quotes in labels for JSON embedding
|
|
285
|
+
* - Builds daily stats arrays aligned with dates
|
|
286
|
+
* - Calculates cumulative sums for growth visualization
|
|
287
|
+
*
|
|
288
|
+
* Output: Writes file to analysis/charts/repo-stats.html
|
|
289
|
+
* Uses vendored uPlot from analysis/uplot/
|
|
290
|
+
*
|
|
291
|
+
* @param {Array<[string, Object]>} sortedFiles - Sorted files with their stats
|
|
292
|
+
*/
|
|
293
|
+
generateHtmlChart(sortedFiles) {
|
|
294
|
+
// Show only the top N most-changed files in the bar chart so labels stay readable.
|
|
295
|
+
// Reverse so the most-changed file is at the top of the chart.
|
|
296
|
+
const MAX_BAR_FILES = 25;
|
|
297
|
+
const barFiles = sortedFiles.slice(0, MAX_BAR_FILES).reverse();
|
|
298
|
+
const totalTrackedFiles = sortedFiles.length;
|
|
299
|
+
// Prepare file labels: prefer basename, keep paths readable and short
|
|
300
|
+
const labels = barFiles.map(([file]) => {
|
|
301
|
+
let short = file;
|
|
302
|
+
// For long paths keep the basename plus one parent dir when useful
|
|
303
|
+
if (short.length > 36) {
|
|
304
|
+
const parts = short.split('/');
|
|
305
|
+
const base = parts.pop() || '';
|
|
306
|
+
const parent = parts.pop();
|
|
307
|
+
short = parent ? parent + '/' + base : base;
|
|
308
|
+
}
|
|
309
|
+
if (short.length > 36)
|
|
310
|
+
short = '...' + short.slice(-33);
|
|
311
|
+
// Escape quotes for safe JSON embedding in HTML
|
|
312
|
+
return short.replace(/"/g, '\\"');
|
|
313
|
+
});
|
|
314
|
+
// Extract added/deleted data arrays for chart datasets
|
|
315
|
+
const addedData = barFiles.map(([_, stats]) => stats.added);
|
|
316
|
+
const deletedData = barFiles.map(([_, stats]) => stats.deleted);
|
|
317
|
+
/**
|
|
318
|
+
* Daily Statistics Preparation
|
|
319
|
+
* Sorted by date (ISO format) for chronological display
|
|
320
|
+
*/
|
|
321
|
+
const dailyDates = Object.keys(this.stats.dailyStats).sort();
|
|
322
|
+
const dailyAdded = dailyDates.map(date => this.stats.dailyStats[date].added);
|
|
323
|
+
const dailyDeleted = dailyDates.map(date => this.stats.dailyStats[date].deleted);
|
|
324
|
+
const dailyEdits = dailyDates.map(date => this.stats.dailyStats[date].edits);
|
|
325
|
+
/**
|
|
326
|
+
* Cumulative Statistics Calculation
|
|
327
|
+
* Shows running total over time (useful for trend analysis)
|
|
328
|
+
* Cumulative sum: each value = sum of all previous + current
|
|
329
|
+
*/
|
|
330
|
+
let cumulativeAdded = 0;
|
|
331
|
+
let cumulativeDeleted = 0;
|
|
332
|
+
let cumulativeEdits = 0;
|
|
333
|
+
// Build cumulative arrays using running total pattern
|
|
334
|
+
const cumulativeAddedData = dailyDates.map(date => {
|
|
335
|
+
cumulativeAdded += this.stats.dailyStats[date].added;
|
|
336
|
+
return cumulativeAdded;
|
|
337
|
+
});
|
|
338
|
+
const cumulativeDeletedData = dailyDates.map(date => {
|
|
339
|
+
cumulativeDeleted += this.stats.dailyStats[date].deleted;
|
|
340
|
+
return cumulativeDeleted;
|
|
341
|
+
});
|
|
342
|
+
const cumulativeEditsData = dailyDates.map(date => {
|
|
343
|
+
cumulativeEdits += this.stats.dailyStats[date].edits;
|
|
344
|
+
return cumulativeEdits;
|
|
345
|
+
});
|
|
346
|
+
/**
|
|
347
|
+
* Net Lines Calculation
|
|
348
|
+
* Shows net growth: (cumulative added) - (cumulative deleted)
|
|
349
|
+
* Positive value = code growing, negative = code shrinking
|
|
350
|
+
*/
|
|
351
|
+
const netLinesData = cumulativeAddedData.map((added, index) => {
|
|
352
|
+
return added - cumulativeDeletedData[index];
|
|
353
|
+
});
|
|
354
|
+
/**
|
|
355
|
+
* All Files Net Lines Calculation
|
|
356
|
+
* Covers all folders in the GitHub repo (no filtering)
|
|
357
|
+
*/
|
|
358
|
+
const allDailyDates = Object.keys(this.allStats.dailyStats).sort();
|
|
359
|
+
let allCumulativeAdded = 0;
|
|
360
|
+
let allCumulativeDeleted = 0;
|
|
361
|
+
const allCumulativeAddedData = allDailyDates.map(date => {
|
|
362
|
+
allCumulativeAdded += this.allStats.dailyStats[date].added;
|
|
363
|
+
return allCumulativeAdded;
|
|
364
|
+
});
|
|
365
|
+
const allCumulativeDeletedData = allDailyDates.map(date => {
|
|
366
|
+
allCumulativeDeleted += this.allStats.dailyStats[date].deleted;
|
|
367
|
+
return allCumulativeDeleted;
|
|
368
|
+
});
|
|
369
|
+
const allNetLinesData = allCumulativeAddedData.map((added, index) => {
|
|
370
|
+
return added - allCumulativeDeletedData[index];
|
|
371
|
+
});
|
|
372
|
+
const html = `<!DOCTYPE html>
|
|
373
|
+
<html lang="en">
|
|
374
|
+
<head>
|
|
375
|
+
<meta charset="UTF-8">
|
|
376
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
377
|
+
<meta name="darkreader-lock">
|
|
378
|
+
<meta name="color-scheme" content="dark">
|
|
379
|
+
<title>DEXBot2 Repository Statistics</title>
|
|
380
|
+
<link rel="stylesheet" href="../uplot/uPlot.min.css">
|
|
381
|
+
<script src="../uplot/uPlot.iife.min.js"></script>
|
|
382
|
+
<style>
|
|
383
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
384
|
+
body {
|
|
385
|
+
background: #0e1117;
|
|
386
|
+
color: #e0e0e0;
|
|
387
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
388
|
+
padding: 40px 20px;
|
|
389
|
+
}
|
|
390
|
+
.container { max-width: 1400px; margin: 0 auto; }
|
|
391
|
+
.header { text-align: center; margin-bottom: 40px; }
|
|
392
|
+
.header h1 { font-size: 2.5em; margin-bottom: 10px; color: #e6edf3; }
|
|
393
|
+
.header p { font-size: 1.2em; color: #8b949e; }
|
|
394
|
+
.stats-grid {
|
|
395
|
+
display: grid;
|
|
396
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
397
|
+
gap: 16px;
|
|
398
|
+
margin-bottom: 40px;
|
|
399
|
+
}
|
|
400
|
+
.stat-card {
|
|
401
|
+
background: #161b22;
|
|
402
|
+
border-radius: 12px;
|
|
403
|
+
padding: 24px;
|
|
404
|
+
border: 1px solid #30363d;
|
|
405
|
+
text-align: center;
|
|
406
|
+
}
|
|
407
|
+
.stat-card h3 {
|
|
408
|
+
color: #8b949e;
|
|
409
|
+
font-size: 0.9em;
|
|
410
|
+
text-transform: uppercase;
|
|
411
|
+
margin-bottom: 8px;
|
|
412
|
+
letter-spacing: 1px;
|
|
413
|
+
}
|
|
414
|
+
.stat-card .value {
|
|
415
|
+
font-size: 2.5em;
|
|
416
|
+
font-weight: bold;
|
|
417
|
+
}
|
|
418
|
+
.stat-card.added .value { color: #3fb950; }
|
|
419
|
+
.stat-card.deleted .value { color: #ff7b72; }
|
|
420
|
+
.stat-card.total .value { color: #58a6ff; }
|
|
421
|
+
.chart-container {
|
|
422
|
+
background: #161b22;
|
|
423
|
+
border-radius: 12px;
|
|
424
|
+
padding: 24px;
|
|
425
|
+
border: 1px solid #30363d;
|
|
426
|
+
margin-bottom: 32px;
|
|
427
|
+
}
|
|
428
|
+
.chart-container h2 {
|
|
429
|
+
color: #e6edf3;
|
|
430
|
+
margin-bottom: 6px;
|
|
431
|
+
font-size: 1.4em;
|
|
432
|
+
text-align: center;
|
|
433
|
+
}
|
|
434
|
+
.chart-subtitle {
|
|
435
|
+
color: #8b949e;
|
|
436
|
+
font-size: 0.9em;
|
|
437
|
+
text-align: center;
|
|
438
|
+
margin-bottom: 16px;
|
|
439
|
+
}
|
|
440
|
+
.chart-wrap {
|
|
441
|
+
position: relative;
|
|
442
|
+
height: 500px;
|
|
443
|
+
}
|
|
444
|
+
.chart-wrap.tall { height: 600px; }
|
|
445
|
+
.chart-wrap.short { height: 350px; }
|
|
446
|
+
.uplot { background: transparent; }
|
|
447
|
+
.u-axis.u-left .u-value,
|
|
448
|
+
.u-axis.u-3 .u-value {
|
|
449
|
+
text-align: right;
|
|
450
|
+
white-space: nowrap;
|
|
451
|
+
}
|
|
452
|
+
.u-title { display: none; }
|
|
453
|
+
.footer { text-align: center; margin-top: 40px; font-size: 1em; color: #484f58; }
|
|
454
|
+
@media (max-width: 768px) {
|
|
455
|
+
.header h1 { font-size: 1.6em; }
|
|
456
|
+
.chart-wrap { height: 350px; }
|
|
457
|
+
.chart-wrap.tall { height: 400px; }
|
|
458
|
+
}
|
|
459
|
+
</style>
|
|
460
|
+
</head>
|
|
461
|
+
<body>
|
|
462
|
+
<div class="container">
|
|
463
|
+
<div class="header">
|
|
464
|
+
<h1>📊 DEXBot2 Repository Statistics</h1>
|
|
465
|
+
<p>Lines Added vs Deleted Analysis</p>
|
|
466
|
+
</div>
|
|
467
|
+
|
|
468
|
+
<div class="stats-grid">
|
|
469
|
+
<div class="stat-card added">
|
|
470
|
+
<h3>Lines Added</h3>
|
|
471
|
+
<div class="value">${this.stats.totalAdded.toLocaleString()}</div>
|
|
472
|
+
</div>
|
|
473
|
+
<div class="stat-card deleted">
|
|
474
|
+
<h3>Lines Deleted</h3>
|
|
475
|
+
<div class="value">${this.stats.totalDeleted.toLocaleString()}</div>
|
|
476
|
+
</div>
|
|
477
|
+
<div class="stat-card total">
|
|
478
|
+
<h3>Total Changes</h3>
|
|
479
|
+
<div class="value">${this.stats.totalEdits.toLocaleString()}</div>
|
|
480
|
+
</div>
|
|
481
|
+
<div class="stat-card total">
|
|
482
|
+
<h3>Commits Analyzed</h3>
|
|
483
|
+
<div class="value">${this.stats.commits.toLocaleString()}</div>
|
|
484
|
+
</div>
|
|
485
|
+
</div>
|
|
486
|
+
|
|
487
|
+
<div class="chart-container" style="padding-top:8px;padding-bottom:36px">
|
|
488
|
+
<h2>Added vs Deleted by File</h2>
|
|
489
|
+
<p class="chart-subtitle">Showing top ${labels.length} of ${totalTrackedFiles} tracked files by total changes</p>
|
|
490
|
+
<div class="chart-wrap" id="barChart" style="height:${Math.max(300, labels.length * 24 + 60)}px"></div>
|
|
491
|
+
</div>
|
|
492
|
+
|
|
493
|
+
<div class="chart-container" style="padding-bottom:34px">
|
|
494
|
+
<h2>Changes Over Time (Daily)</h2>
|
|
495
|
+
<div class="chart-wrap short" id="timeChart"></div>
|
|
496
|
+
</div>
|
|
497
|
+
|
|
498
|
+
<div class="chart-container" style="padding-bottom:34px">
|
|
499
|
+
<h2>Cumulative Changes Over Time</h2>
|
|
500
|
+
<div class="chart-wrap short" id="cumulativeChart"></div>
|
|
501
|
+
</div>
|
|
502
|
+
|
|
503
|
+
<div class="chart-container" style="padding-bottom:34px">
|
|
504
|
+
<h2>Net Core Lines Over Time</h2>
|
|
505
|
+
<div class="chart-wrap short" id="netLinesChart"></div>
|
|
506
|
+
</div>
|
|
507
|
+
|
|
508
|
+
<div class="chart-container" style="padding-bottom:34px">
|
|
509
|
+
<h2>Net Repo Lines Over Time</h2>
|
|
510
|
+
<div class="chart-wrap short" id="allNetLinesChart"></div>
|
|
511
|
+
</div>
|
|
512
|
+
|
|
513
|
+
<div class="footer">
|
|
514
|
+
<p>Generated on ${new Date().toLocaleString()} | DEXBot2 Repository Analysis</p>
|
|
515
|
+
</div>
|
|
516
|
+
</div>
|
|
517
|
+
|
|
518
|
+
<script>
|
|
519
|
+
// ===== Shared helpers =====
|
|
520
|
+
function initChart(id, opts, data) {
|
|
521
|
+
const el = document.getElementById(id);
|
|
522
|
+
const rect = el.getBoundingClientRect();
|
|
523
|
+
opts.width = Math.max(320, Math.floor(rect.width));
|
|
524
|
+
opts.height = Math.max(200, Math.floor(rect.height));
|
|
525
|
+
const chart = new uPlot(opts, data, el);
|
|
526
|
+
const ro = new ResizeObserver(function() {
|
|
527
|
+
const r = el.getBoundingClientRect();
|
|
528
|
+
chart.setSize({ width: Math.max(320, Math.floor(r.width)), height: Math.max(200, Math.floor(r.height)) });
|
|
529
|
+
});
|
|
530
|
+
ro.observe(el);
|
|
531
|
+
return chart;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
function fmt(v) { return typeof v === 'number' ? v.toLocaleString() : String(v); }
|
|
535
|
+
|
|
536
|
+
function line( label, color, fill, dash ) {
|
|
537
|
+
var s = {
|
|
538
|
+
label: label,
|
|
539
|
+
stroke: color,
|
|
540
|
+
width: 2,
|
|
541
|
+
points: { show: false },
|
|
542
|
+
};
|
|
543
|
+
if (fill) s.fill = fill;
|
|
544
|
+
if (dash) s.dash = dash;
|
|
545
|
+
return s;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
function clamp(mn, mx, lo, hi) {
|
|
549
|
+
var nmin = mn, nmax = mx;
|
|
550
|
+
if (nmin < lo) { nmax += lo - nmin; nmin = lo; }
|
|
551
|
+
if (nmax > hi) { nmin -= nmax - hi; nmax = hi; }
|
|
552
|
+
if (nmin < lo) nmin = lo;
|
|
553
|
+
if (nmax > hi) nmax = hi;
|
|
554
|
+
if (nmax <= nmin) return { min: lo, max: hi };
|
|
555
|
+
return { min: nmin, max: nmax };
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
function makeTimeAxis(side) {
|
|
559
|
+
return {
|
|
560
|
+
stroke: '#8b949e',
|
|
561
|
+
grid: { stroke: '#21262d', width: 1 },
|
|
562
|
+
ticks: { stroke: '#30363d' },
|
|
563
|
+
size: 50,
|
|
564
|
+
font: '12px sans-serif',
|
|
565
|
+
values: (u, vals) => vals.map(function(v) {
|
|
566
|
+
var d = new Date(v * 1000);
|
|
567
|
+
var mm = String(d.getUTCMonth() + 1).padStart(2, '0');
|
|
568
|
+
var dd = String(d.getUTCDate()).padStart(2, '0');
|
|
569
|
+
return mm + '/' + dd;
|
|
570
|
+
}),
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
function makeValAxis(side) {
|
|
575
|
+
return {
|
|
576
|
+
stroke: '#8b949e',
|
|
577
|
+
grid: { stroke: '#21262d', width: 1 },
|
|
578
|
+
ticks: { stroke: '#30363d' },
|
|
579
|
+
size: 70,
|
|
580
|
+
font: '12px sans-serif',
|
|
581
|
+
values: (u, vals) => vals.map(function(v) { return fmt(v); }),
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
function addWheelZoom(chart, lo, hi) {
|
|
586
|
+
chart.root.addEventListener('wheel', function(e) {
|
|
587
|
+
if (!e.ctrlKey && !e.metaKey) return;
|
|
588
|
+
e.preventDefault();
|
|
589
|
+
e.stopPropagation();
|
|
590
|
+
var rect = chart.root.getBoundingClientRect();
|
|
591
|
+
var left = e.clientX - rect.left - (chart.bbox.left / (chart.pxRatio || 1));
|
|
592
|
+
var center = chart.posToVal(left, 'x');
|
|
593
|
+
var s = chart.scales.x || {};
|
|
594
|
+
var currMin = Number.isFinite(s.min) ? s.min : lo;
|
|
595
|
+
var currMax = Number.isFinite(s.max) ? s.max : hi;
|
|
596
|
+
var span = currMax - currMin;
|
|
597
|
+
if (!Number.isFinite(span) || span <= 0) return;
|
|
598
|
+
var factor = e.deltaY < 0 ? 0.85 : 1.15;
|
|
599
|
+
var nextSpan = Math.max(1, Math.min(hi - lo, span * factor));
|
|
600
|
+
var ratio = (center - currMin) / span;
|
|
601
|
+
var nmin = center - nextSpan * ratio;
|
|
602
|
+
var nmax = nmin + nextSpan;
|
|
603
|
+
var clamped = clamp(nmin, nmax, lo, hi);
|
|
604
|
+
chart.batch(function() { chart.setScale('x', clamped); });
|
|
605
|
+
}, { passive: false });
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// ===== Chart 1: Added vs Deleted by File (horizontal stacked bars via uPlot.paths.bars) =====
|
|
609
|
+
(function() {
|
|
610
|
+
// Stacking helper (from uPlot demos/stack.js)
|
|
611
|
+
function stack(data, omit) {
|
|
612
|
+
var data2 = [];
|
|
613
|
+
var bands = [];
|
|
614
|
+
var d0Len = data[0].length;
|
|
615
|
+
var accum = [];
|
|
616
|
+
for (var i = 0; i < d0Len; i++) accum[i] = 0;
|
|
617
|
+
for (var i = 1; i < data.length; i++)
|
|
618
|
+
data2.push(omit(i) ? data[i] : data[i].map(function(v, j) { return (accum[j] += +v); }));
|
|
619
|
+
for (var i = 1; i < data.length; i++)
|
|
620
|
+
!omit(i) && bands.push({
|
|
621
|
+
series: [data.findIndex(function(s, j) { return j > i && !omit(j); }), i],
|
|
622
|
+
});
|
|
623
|
+
bands = bands.filter(function(b) { return b.series[1] > -1; });
|
|
624
|
+
return { data: [data[0]].concat(data2), bands: bands };
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
var labels = ${JSON.stringify(labels)};
|
|
628
|
+
var added = ${JSON.stringify(addedData)};
|
|
629
|
+
var deleted = ${JSON.stringify(deletedData)};
|
|
630
|
+
|
|
631
|
+
labels.reverse();
|
|
632
|
+
added.reverse();
|
|
633
|
+
deleted.reverse();
|
|
634
|
+
|
|
635
|
+
var idx = labels.map(function(_, i) { return i; });
|
|
636
|
+
var rawData = [idx, added, deleted];
|
|
637
|
+
var stacked = stack(rawData, function() { return false; });
|
|
638
|
+
|
|
639
|
+
var opts = {
|
|
640
|
+
padding: [0, null, -20, null],
|
|
641
|
+
scales: {
|
|
642
|
+
x: {
|
|
643
|
+
time: false,
|
|
644
|
+
distr: 2,
|
|
645
|
+
ori: 1,
|
|
646
|
+
dir: -1,
|
|
647
|
+
range: function(u, min, max) {
|
|
648
|
+
return [-0.5, u.data[0].length - 0.5];
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
y: {
|
|
652
|
+
range: [0, null],
|
|
653
|
+
ori: 0,
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
bands: stacked.bands,
|
|
657
|
+
series: [
|
|
658
|
+
{ label: 'File' },
|
|
659
|
+
{
|
|
660
|
+
label: 'Added',
|
|
661
|
+
fill: '#3fb950',
|
|
662
|
+
stroke: '#3fb950',
|
|
663
|
+
width: 0,
|
|
664
|
+
paths: uPlot.paths.bars({ size: [0.7, 100] }),
|
|
665
|
+
value: function(u, v, si, di) { return added[di]; },
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
label: 'Deleted',
|
|
669
|
+
fill: '#ff7b72',
|
|
670
|
+
stroke: '#ff7b72',
|
|
671
|
+
width: 0,
|
|
672
|
+
paths: uPlot.paths.bars({ size: [0.7, 100] }),
|
|
673
|
+
value: function(u, v, si, di) { return deleted[di]; },
|
|
674
|
+
},
|
|
675
|
+
],
|
|
676
|
+
axes: [
|
|
677
|
+
{
|
|
678
|
+
scale: 'x',
|
|
679
|
+
side: 3,
|
|
680
|
+
splits: function(u) { return u._data[0].slice(); },
|
|
681
|
+
values: function(u, vals) {
|
|
682
|
+
return (vals || u.data[0]).map(function(v) {
|
|
683
|
+
var lbl = labels[v] || '';
|
|
684
|
+
if (lbl.length > 34) lbl = lbl.slice(0, 31) + '...';
|
|
685
|
+
return lbl;
|
|
686
|
+
});
|
|
687
|
+
},
|
|
688
|
+
gap: 15,
|
|
689
|
+
size: function(u, values, axisIdx, cycleNum) {
|
|
690
|
+
var axis = u.axes[axisIdx];
|
|
691
|
+
if (cycleNum > 2) return axis._size;
|
|
692
|
+
var size = (axis.ticks ? axis.ticks.size : 0) + axis.gap;
|
|
693
|
+
var longest = '';
|
|
694
|
+
var vals = values || [];
|
|
695
|
+
for (var i = 0; i < vals.length; i++) {
|
|
696
|
+
if (vals[i].length > longest.length) longest = vals[i];
|
|
697
|
+
}
|
|
698
|
+
if (longest !== '') {
|
|
699
|
+
var font = Array.isArray(axis.font) ? axis.font[0] : axis.font;
|
|
700
|
+
u.ctx.font = font;
|
|
701
|
+
size += u.ctx.measureText(longest).width / (u.pxRatio || 1);
|
|
702
|
+
}
|
|
703
|
+
return Math.ceil(size);
|
|
704
|
+
},
|
|
705
|
+
font: '12px sans-serif',
|
|
706
|
+
stroke: '#8b949e',
|
|
707
|
+
grid: { show: false },
|
|
708
|
+
ticks: { show: false },
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
scale: 'y',
|
|
712
|
+
side: 2,
|
|
713
|
+
stroke: '#8b949e',
|
|
714
|
+
grid: { stroke: '#21262d', width: 1 },
|
|
715
|
+
ticks: { stroke: '#30363d' },
|
|
716
|
+
font: '12px sans-serif',
|
|
717
|
+
size: 70,
|
|
718
|
+
splits: function(u, axisIdx, scaleMin, scaleMax) {
|
|
719
|
+
var out = [];
|
|
720
|
+
for (var v = 0; v <= scaleMax; v += 2000) out.push(v);
|
|
721
|
+
return out;
|
|
722
|
+
},
|
|
723
|
+
values: function(u, vals) { return vals.map(function(v) { return fmt(v); }); },
|
|
724
|
+
},
|
|
725
|
+
],
|
|
726
|
+
cursor: {
|
|
727
|
+
show: true,
|
|
728
|
+
drag: { x: true, y: false },
|
|
729
|
+
},
|
|
730
|
+
legend: { show: true },
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
initChart('barChart', opts, stacked.data);
|
|
734
|
+
})();
|
|
735
|
+
|
|
736
|
+
// ===== Charts 2-4: Time series (shared date domain) =====
|
|
737
|
+
(function() {
|
|
738
|
+
var dates = ${JSON.stringify(dailyDates)};
|
|
739
|
+
var ts = dates.map(function(d) { return new Date(d).getTime() / 1000; });
|
|
740
|
+
var xMin = ts[0], xMax = ts[ts.length - 1];
|
|
741
|
+
|
|
742
|
+
var dailyAdded = ${JSON.stringify(dailyAdded)};
|
|
743
|
+
var dailyDeleted = ${JSON.stringify(dailyDeleted)};
|
|
744
|
+
var dailyEdits = ${JSON.stringify(dailyEdits)};
|
|
745
|
+
var cumAdded = ${JSON.stringify(cumulativeAddedData)};
|
|
746
|
+
var cumDeleted = ${JSON.stringify(cumulativeDeletedData)};
|
|
747
|
+
var cumEdits = ${JSON.stringify(cumulativeEditsData)};
|
|
748
|
+
var netLines = ${JSON.stringify(netLinesData)};
|
|
749
|
+
|
|
750
|
+
function makeTimeSeries(titleHtml, id, seriesDefs, dataArrays) {
|
|
751
|
+
var opts = {
|
|
752
|
+
scales: {
|
|
753
|
+
x: { time: true, range: [xMin, xMax] },
|
|
754
|
+
y: { range: function(u, min, max) { return min === max ? [0, max * 1.1 || 1] : [Math.min(0, min), max * 1.05]; } },
|
|
755
|
+
},
|
|
756
|
+
series: [{ label: 'Date' }].concat(seriesDefs),
|
|
757
|
+
axes: [
|
|
758
|
+
makeTimeAxis(2),
|
|
759
|
+
makeValAxis(3),
|
|
760
|
+
],
|
|
761
|
+
cursor: {
|
|
762
|
+
show: true,
|
|
763
|
+
drag: { x: true, y: false },
|
|
764
|
+
},
|
|
765
|
+
legend: { show: true },
|
|
766
|
+
};
|
|
767
|
+
var chart = initChart(id, opts, [ts].concat(dataArrays));
|
|
768
|
+
addWheelZoom(chart, xMin, xMax);
|
|
769
|
+
|
|
770
|
+
var over = chart.over;
|
|
771
|
+
var legend = document.createElement('div');
|
|
772
|
+
legend.style.cssText = 'position:absolute;top:-6px;left:12px;font-size:11px;color:#8b949e;display:flex;gap:14px;z-index:10;pointer-events:none;white-space:nowrap;';
|
|
773
|
+
var items = '';
|
|
774
|
+
for (var i = 0; i < seriesDefs.length; i++) {
|
|
775
|
+
var s = seriesDefs[i];
|
|
776
|
+
items += '<span><span style="color:' + s.stroke + ';">' + s.label + '</span></span>';
|
|
777
|
+
}
|
|
778
|
+
legend.innerHTML = items;
|
|
779
|
+
over.parentElement.appendChild(legend);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
// Chart 2: Daily changes
|
|
783
|
+
makeTimeSeries('Daily Changes', 'timeChart', [
|
|
784
|
+
line('Added', '#3fb950'),
|
|
785
|
+
line('Deleted', '#ff7b72'),
|
|
786
|
+
line('Edits', '#58a6ff', null, [5, 5]),
|
|
787
|
+
], [dailyAdded, dailyDeleted, dailyEdits]);
|
|
788
|
+
|
|
789
|
+
// Chart 3: Cumulative changes
|
|
790
|
+
makeTimeSeries('Cumulative Changes', 'cumulativeChart', [
|
|
791
|
+
line('Cum Added', '#3fb950', 'rgba(63,185,80,0.10)'),
|
|
792
|
+
line('Cum Deleted', '#ff7b72', 'rgba(255,123,114,0.10)'),
|
|
793
|
+
line('Cum Edits', '#58a6ff', null, [5, 5]),
|
|
794
|
+
], [cumAdded, cumDeleted, cumEdits]);
|
|
795
|
+
|
|
796
|
+
// Chart 4: Net core lines
|
|
797
|
+
makeTimeSeries('Net Core Lines', 'netLinesChart', [
|
|
798
|
+
line('Net Lines', '#d2a8ff', 'rgba(210,168,255,0.10)'),
|
|
799
|
+
], [netLines]);
|
|
800
|
+
})();
|
|
801
|
+
|
|
802
|
+
// ===== Chart 5: Net repo lines (all files, separate date domain) =====
|
|
803
|
+
(function() {
|
|
804
|
+
var dates = ${JSON.stringify(allDailyDates)};
|
|
805
|
+
var ts = dates.map(function(d) { return new Date(d).getTime() / 1000; });
|
|
806
|
+
var xMin = ts[0], xMax = ts[ts.length - 1];
|
|
807
|
+
var allNet = ${JSON.stringify(allNetLinesData)};
|
|
808
|
+
|
|
809
|
+
var opts = {
|
|
810
|
+
scales: {
|
|
811
|
+
x: { time: true, range: [xMin, xMax] },
|
|
812
|
+
y: { range: function(u, min, max) { return min === max ? [0, max * 1.1 || 1] : [Math.min(0, min), max * 1.05]; } },
|
|
813
|
+
},
|
|
814
|
+
series: [
|
|
815
|
+
{ label: 'Date' },
|
|
816
|
+
line('Net Lines (All)', '#d29922', 'rgba(210,153,34,0.10)'),
|
|
817
|
+
],
|
|
818
|
+
axes: [
|
|
819
|
+
makeTimeAxis(2),
|
|
820
|
+
makeValAxis(3),
|
|
821
|
+
],
|
|
822
|
+
cursor: {
|
|
823
|
+
show: true,
|
|
824
|
+
drag: { x: true, y: false },
|
|
825
|
+
},
|
|
826
|
+
legend: { show: true },
|
|
827
|
+
};
|
|
828
|
+
var chart = initChart('allNetLinesChart', opts, [ts, allNet]);
|
|
829
|
+
addWheelZoom(chart, xMin, xMax);
|
|
830
|
+
|
|
831
|
+
var over = chart.over;
|
|
832
|
+
var legend = document.createElement('div');
|
|
833
|
+
legend.style.cssText = 'position:absolute;top:-20px;left:12px;font-size:11px;color:#8b949e;display:flex;gap:14px;z-index:10;pointer-events:none;';
|
|
834
|
+
legend.innerHTML = '<span><span style="color:#d29922;">Net Lines (All)</span></span>';
|
|
835
|
+
over.parentElement.appendChild(legend);
|
|
836
|
+
})();
|
|
837
|
+
</script>
|
|
838
|
+
</body>
|
|
839
|
+
</html>`;
|
|
840
|
+
const outputPath = path.join(process.cwd(), 'analysis', 'charts', 'repo-stats.html');
|
|
841
|
+
ensureDir(path.dirname(outputPath));
|
|
842
|
+
fs.writeFileSync(outputPath, html);
|
|
843
|
+
console.log('HTML chart generated: ' + outputPath);
|
|
844
|
+
console.log(' Open in browser: file://' + outputPath);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
// Run the analyzer
|
|
848
|
+
const analyzer = new RepoAnalyzer();
|
|
849
|
+
analyzer.analyzeGitLog();
|
|
850
|
+
analyzer.generateCharts();
|
|
851
|
+
//# sourceMappingURL=analyze-git.js.map
|