Загрузка данных
{
echo "===== 1. Публичные методы и основные потоки symbol ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'mainSymbol\$|getSymbol\(|setSymbol\(|\.symbol\(\)|symbol\$' \
. || true
echo
echo "===== 2. Объявление DataSource ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'interface[[:space:]]+DataSource|type[[:space:]]+DataSource|class[[:space:]]+DataSource' \
. || true
echo
echo "===== 3. Все использования DataSource ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'dataSource|DataSource' \
src || true
echo
echo "===== 4. Прямые вызовы методов dataSource ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'(this\.)?dataSource\.[A-Za-z0-9_]+' \
src || true
echo
echo "===== 5. Где symbol участвует в загрузке или подписке ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'(subscribe|get|load|fetch|request|history|realtime|data).*symbol|symbol.*(subscribe|get|load|fetch|request|history|realtime|data)' \
src || true
echo
echo "===== 6. Метод subscribeDataSource и связанные подписки ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'subscribeDataSource|dataSub|realtimeSub' \
src || true
echo
echo "===== 7. Все параметры и поля с названием symbol ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'\bsymbol\b|initialSymbol|activeSymbols|CompareInstrument|CompareItem' \
src stories || true
echo
echo "===== 8. Текущие новые названия ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' --include='*.md' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'symbolName|symbolTicker|mainSymbolName|mainSymbolTicker|initialSymbolName|initialSymbolTicker' \
src stories CHANGELOG.md || true
echo
echo "===== 9. Использование symbol в snapshot ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'ChartSnapshot|MoexChartSnapshot|snapshot.*symbol|symbol.*snapshot|symbolName|symbolTicker' \
src || true
echo
echo "===== 10. Использование symbol в IndicatorConfig ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'IndicatorConfig|config\.symbol|config\.symbolName|config\.symbolTicker|config\.label' \
src || true
echo
echo "===== 11. Отображение symbol в title, name и label ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'(title|name|label)[[:space:]]*:.*symbol|symbol.*(title|name|label)' \
src || true
echo
echo "===== 12. Извлечение тикера через split ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
"symbol.*split|split\\(['\"]:\\?['\"]\\)|symbolParts" \
src || true
echo
echo "===== 13. Вызовы setSymbolMode ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'setSymbolMode\(' \
. || true
echo
echo "===== 14. Вызовы setSymbol ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'\.setSymbol\(|setSymbol\(' \
. || true
echo
echo "===== 15. Использование symbol в тестах и stories ====="
grep -RInIE \
--include='*.ts' --include='*.tsx' \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=build --exclude-dir=coverage \
'symbol|symbolName|symbolTicker|setSymbol|setSymbolMode' \
stories tests test __tests__ 2>/dev/null || true
} | tee symbol-audit.txt