refactor(import): remove non-functional DOCX/PDF/Confluence import stubs #1

Merged
vvzvlad merged 1 commits from remove-broken-import-formats-backend into develop 2026-06-20 04:07:41 +03:00

Context

These import paths relied on the private EE module that was deleted from the repo. In the community build they either threw "This feature requires a valid enterprise license" (DOCX/PDF) or silently no-op'd (Confluence). The frontend buttons were already removed in 38064064; this PR cleans up the dead backend stubs.

Changes

apps/server/src/integrations/import/services/import.service.ts

  • Drop processDocx / processPdf methods, their dispatcher branches in importPage, the pageId computation and the insertPage spread.
  • Remove the now-unused moduleRef constructor param and ModuleRef import.
  • uuid7 import kept — still used in importZip.

apps/server/src/integrations/import/services/file-import-task.service.ts

  • Drop the if (fileTask.source === FileImportSource.Confluence) {...} branch.
  • Remove the now-unused moduleRef constructor param and ModuleRef import.
  • FileImportSource import kept — Generic/Notion still used.

apps/server/src/integrations/import/import.controller.ts

  • validFileExtensions['.md', '.html']
  • sourceMap → drop .docx / .pdf
  • validZipSources['generic', 'notion']
  • Error message → "...must either be generic or notion."

apps/server/src/integrations/import/utils/file.utils.ts

  • Remove Confluence = 'confluence' from FileImportSource enum.

apps/server/src/common/features.ts

  • Remove the unused CONFLUENCE_IMPORT / DOCX_IMPORT / PDF_IMPORT feature keys.

Out of scope

The isConfluenceImport logic in import-attachment.service.ts is intentionally left in place — it's real shared attachment-parsing code, not a stub. Its removal is a separate, riskier refactor.

Verification

  • tsc --noEmit on server: clean.
  • pnpm --filter server lint: only a pre-existing unrelated error in common/helpers/utils.ts.
  • Grep confirms zero remaining references to FileImportSource.Confluence, processDocx, processPdf, CONFLUENCE_IMPORT, DOCX_IMPORT, PDF_IMPORT outside docs/.
## Context These import paths relied on the private EE module that was deleted from the repo. In the community build they either threw `"This feature requires a valid enterprise license"` (DOCX/PDF) or silently no-op'd (Confluence). The frontend buttons were already removed in `38064064`; this PR cleans up the dead backend stubs. ## Changes **`apps/server/src/integrations/import/services/import.service.ts`** - Drop `processDocx` / `processPdf` methods, their dispatcher branches in `importPage`, the `pageId` computation and the `insertPage` spread. - Remove the now-unused `moduleRef` constructor param and `ModuleRef` import. - `uuid7` import kept — still used in `importZip`. **`apps/server/src/integrations/import/services/file-import-task.service.ts`** - Drop the `if (fileTask.source === FileImportSource.Confluence) {...}` branch. - Remove the now-unused `moduleRef` constructor param and `ModuleRef` import. - `FileImportSource` import kept — `Generic`/`Notion` still used. **`apps/server/src/integrations/import/import.controller.ts`** - `validFileExtensions` → `['.md', '.html']` - `sourceMap` → drop `.docx` / `.pdf` - `validZipSources` → `['generic', 'notion']` - Error message → `"...must either be generic or notion."` **`apps/server/src/integrations/import/utils/file.utils.ts`** - Remove `Confluence = 'confluence'` from `FileImportSource` enum. **`apps/server/src/common/features.ts`** - Remove the unused `CONFLUENCE_IMPORT` / `DOCX_IMPORT` / `PDF_IMPORT` feature keys. ## Out of scope The `isConfluenceImport` logic in `import-attachment.service.ts` is intentionally left in place — it's real shared attachment-parsing code, not a stub. Its removal is a separate, riskier refactor. ## Verification - `tsc --noEmit` on server: clean. - `pnpm --filter server lint`: only a pre-existing unrelated error in `common/helpers/utils.ts`. - Grep confirms zero remaining references to `FileImportSource.Confluence`, `processDocx`, `processPdf`, `CONFLUENCE_IMPORT`, `DOCX_IMPORT`, `PDF_IMPORT` outside `docs/`.
Ghost added 1 commit 2026-06-20 04:06:54 +03:00
These import paths relied on the private EE module that was deleted from
the repo. In the community build they either threw 'enterprise license'
(DOCX/PDF) or silently no-op'd (Confluence). The frontend buttons were
already removed in 38064064; this cleans up the dead backend stubs.

- import.service.ts: drop processDocx/processPdf methods, their dispatcher
  branches, the pageId computation + insertPage spread, and the now-unused
  moduleRef param/ModuleRef import
- file-import-task.service.ts: drop the Confluence branch and the now-unused
  moduleRef param/ModuleRef import
- import.controller.ts: restrict file extensions to .md/.html and zip
  sources to generic/notion; update the error message accordingly
- file.utils.ts: remove Confluence from the FileImportSource enum
- features.ts: remove the unused CONFLUENCE_IMPORT/DOCX_IMPORT/PDF_IMPORT
  feature keys

The isConfluenceImport logic in import-attachment.service.ts is intentionally
left in place (real shared attachment-parsing code, not a stub); its removal
is a separate, riskier refactor.
vvzvlad merged commit efc36890ec into develop 2026-06-20 04:07:41 +03:00
vvzvlad deleted branch remove-broken-import-formats-backend 2026-06-20 04:07:41 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vvzvlad/gitmost#1