From 3df8007e5f5bec7273dd7714eee88d2c9cd39df7 Mon Sep 17 00:00:00 2001 From: RohitKini <57343193+RohitKini@users.noreply.github.com> Date: Thu, 24 Apr 2025 19:26:21 +0530 Subject: [PATCH] final test with workflow --- .github/workflows/repo-sync.yml | 38 -------------------------- api/src/services/contentful.service.ts | 1 + api/src/services/sitecore.service.ts | 1 + api/src/services/wordpress.service.ts | 1 - 4 files changed, 2 insertions(+), 39 deletions(-) diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index 6035753d0..322f35e6d 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -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 < 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 diff --git a/api/src/services/contentful.service.ts b/api/src/services/contentful.service.ts index fb220820b..62cf4e5b2 100644 --- a/api/src/services/contentful.service.ts +++ b/api/src/services/contentful.service.ts @@ -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 diff --git a/api/src/services/sitecore.service.ts b/api/src/services/sitecore.service.ts index 539291442..24757e6a7 100644 --- a/api/src/services/sitecore.service.ts +++ b/api/src/services/sitecore.service.ts @@ -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 { diff --git a/api/src/services/wordpress.service.ts b/api/src/services/wordpress.service.ts index efaff7778..72b517c6e 100644 --- a/api/src/services/wordpress.service.ts +++ b/api/src/services/wordpress.service.ts @@ -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