-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfix-push-types.sh
More file actions
executable file
·19 lines (14 loc) · 1.05 KB
/
fix-push-types.sh
File metadata and controls
executable file
·19 lines (14 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
echo "Fixing TypeScript errors in push module..."
# Fix 'phase' to 'stage' in all test files
find src/modules/push -name "*.spec.ts" -type f -exec sed -i '' "s/\\.phase/\\.stage/g" {} \;
find src/modules/push -name "*.spec.ts" -type f -exec sed -i '' "s/phase:/stage:/g" {} \;
# Fix 'public: true' to 'visibility: PackageVisibility.Public' in test files
find src/modules/push -name "*.spec.ts" -type f -exec sed -i '' "s/public: true/visibility: PackageVisibility.Public/g" {} \;
find src/modules/push -name "*.spec.ts" -type f -exec sed -i '' "s/private: true/visibility: PackageVisibility.Private/g" {} \;
find src/modules/push -name "*.spec.ts" -type f -exec sed -i '' "s/public: false/visibility: PackageVisibility.Private/g" {} \;
# Fix remaining phase references in service files
find src/modules/push -name "*.ts" ! -name "*.spec.ts" -type f -exec sed -i '' "s/\\.phase/\\.stage/g" {} \;
find src/modules/push -name "*.ts" ! -name "*.spec.ts" -type f -exec sed -i '' "s/phase:/stage:/g" {} \;
echo "Fixes applied. Running typecheck..."
pnpm run typecheck