Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 27 additions & 24 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ jobs:
git gc --prune=now # Garbage collect and prune unreachable objects

# echo "Installing ESLint dependencies..."
# npm install --save-dev eslint @eslint/js globals
npm install --save-dev eslint @eslint/js globals


# if [ ! -f "eslint.config.cjs" ]; then
# echo "Creating default ESLint config..."
Expand Down Expand Up @@ -143,34 +144,36 @@ jobs:
rsync -av --delete ../upload-api/migration-sitecore/ ./upload-api/migration-sitecore/

# Ensure tsconfig.json exists, create a default one if missing
if [ ! -f "tsconfig.json" ]; then
echo "Creating default tsconfig.json..."
cat <<EOL > tsconfig.json
{
"compilerOptions": {
"target": "ES6",
"module": "CommonJS",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
EOL
fi
# if [ ! -f "tsconfig.json" ]; then
# echo "Creating default tsconfig.json..."
# cat <<EOL > tsconfig.json
# {
# "compilerOptions": {
# "target": "ES6",
# "module": "CommonJS",
# "strict": true,
# "esModuleInterop": true,
# "skipLibCheck": true,
# "forceConsistentCasingInFileNames": true
# },
# "include": ["src/**/*"],
# "exclude": ["node_modules", "dist"]
# }
# EOL
# fi

# Remove unused imports
npx ts-remove-unused-imports api/
npx ts-remove-unused-imports ui/
npx ts-remove-unused-imports upload-api/
# npx ts-remove-unused-imports api/
# npx ts-remove-unused-imports ui/
# npx ts-remove-unused-imports upload-api/

# Remove missing imports
npx ts-prune | grep -E '^(api/|ui/|upload-api/)/' | awk '{print $1}' | xargs -I {} sed -i '/import/d' {}
# npx ts-prune | grep -E '^(api/|ui/|upload-api/)/' | awk '{print $1}' | xargs -I {} sed -i '/import/d' {}

# # Format code
# npx prettier --write .

# Format code
npx prettier --write .
eslint api/ ui/ upload-api/ --rule 'import/no-unresolved: error' --format compact | awk -F ':' '{print $1}' | sort -u | xargs -I {} sed -i '/import/d' {}

git add .
git commit -m "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}"
Expand Down
1 change: 0 additions & 1 deletion api/src/services/sitecore.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { orgService } from './org.service.js';
import { getLogMessage } from '../utils/index.js';
import customLogger from '../utils/custom-logger.utils.js';


const append = "a";
const baseDirName = MIGRATION_DATA_CONFIG.DATA
const {
Expand Down
Loading