-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-imports.sh
More file actions
executable file
·31 lines (23 loc) · 1.26 KB
/
fix-imports.sh
File metadata and controls
executable file
·31 lines (23 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Fix @shared/constants imports to use relative paths
set -e
echo "🔧 Fixing @shared/constants imports..."
# Module files (2 levels deep)
sed -i.bak "s|from '@shared/constants'|from '../../shared/constants'|g" src/module/composables/use-activity-analytics.ts
sed -i.bak "s|from '@shared/constants'|from '../../shared/constants'|g" src/module/composables/use-collection-analytics.ts
sed -i.bak "s|from '@shared/constants'|from '../../shared/constants'|g" src/module/utils/chart-helpers.ts
# Module index (1 level deep)
sed -i.bak "s|from '@shared/constants'|from '../shared/constants'|g" src/module/index.ts
# Endpoint services (2 levels deep)
sed -i.bak "s|from '@shared/constants'|from '../../shared/constants'|g" src/endpoint/services/activity-service.ts
sed -i.bak "s|from '@shared/constants'|from '../../shared/constants'|g" src/endpoint/services/cache-service.ts
sed -i.bak "s|from '@shared/constants'|from '../../shared/constants'|g" src/endpoint/services/collection-service.ts
# Remove backup files
rm -f src/module/composables/*.bak
rm -f src/module/utils/*.bak
rm -f src/module/*.bak
rm -f src/endpoint/services/*.bak
echo "✅ All imports fixed!"
echo ""
echo "Changed files:"
grep -r "from '.*shared/constants'" src --include="*.ts" | cut -d: -f1 | sort -u