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
38 changes: 0 additions & 38 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,49 +140,11 @@ jobs:
npm install eslint -g
eslint . --fix --ignore-pattern "cli/**"

# echo "Running autoflake to remove unused imports..."
# pip install autoflake
# autoflake --remove-all-unused-imports --recursive --in-place .

# echo "Running ts-prune to remove unused file references..."
# npm install -g ts-prune
# ts-prune | awk '{print $1}' | xargs rm -f

rsync -av --delete ${{ env.RSYNC_SITECORE_API_SRC_SERVICES_EXCLUDES }} ../api/ ./api/
rsync -av --delete ../ui/ ./ui/
rsync -av --delete ${{ env.RSYNC_SITECORE_UPLOAD_API_SRC_EXCLUDES }} ../upload-api/src/ ./upload-api/src/
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

# Remove unused imports
# 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' {}

# # 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' {}
node remove-broken-imports.js

Expand Down
1 change: 1 addition & 0 deletions api/src/services/contentful.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import jsonRTE from "./contentful/jsonRTE.js";
import { getAllLocales, getLogMessage } from "../utils/index.js";
import customLogger from "../utils/custom-logger.utils.js";


const {
DATA,
// DIR
Expand Down
1 change: 1 addition & 0 deletions api/src/services/sitecore.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { getLogMessage } from '../utils/index.js';
import customLogger from '../utils/custom-logger.utils.js';
import { getSafePath } from '../utils/sanitize-path.utils.js';


const append = 'a';
const baseDirName = MIGRATION_DATA_CONFIG.DATA;
const {
Expand Down
1 change: 0 additions & 1 deletion api/src/services/wordpress.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { getLogMessage } from "../utils/index.js";
import { v4 as uuidv4 } from "uuid";
import { orgService } from "./org.service.js";


const { JSDOM } = jsdom;
const virtualConsole = new jsdom.VirtualConsole();
// Get the current file's path
Expand Down
Loading