Skip to content

Conversation

@pyramation
Copy link
Contributor

@pyramation pyramation commented Dec 31, 2025

Summary

Adds an optional serviceOutdir parameter to exportMigrations that allows the service/meta module to be exported to a different directory than the main DB module. When not provided, it defaults to the same outdir (backwards compatible).

This enables use cases like:

  • DB module → application/constructive
  • Service module → services/constructive-services

Review & Testing Checklist for Human

  • Verify the svcOutdir calculation logic is correct: (serviceOutdir || outdir.slice(0, -1)) + '/' - this handles the case where outdir already has a trailing slash appended
  • Test that existing callers without serviceOutdir still work (backwards compatibility)
  • Test with both outdir and serviceOutdir provided to verify modules go to different directories

Suggested test plan: Run an export with both parameters set to different directories and verify the DB module lands in outdir while the service module lands in serviceOutdir.

Notes


Note

Enables exporting the service/meta module to a separate directory while keeping the DB module in the original outdir.

  • Adds optional serviceOutdir to ExportOptions and ExportMigrationsToDiskOptions
  • Computes svcOutdir as (serviceOutdir || outdir.slice(0, -1)) + '/'
  • Uses svcOutdir when preparing the service/meta module directory; DB module still uses outdir
  • Propagates the new parameter through exportMigrations and exportMigrationsToDisk (backwards compatible)

Written by Cursor Bugbot for commit c3127f4. This will update automatically on new commits. Configure here.

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 28

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

metaExtensionDesc,
prompter,
repoName,
username
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Service module files written to wrong directory

The opts.outdir is never updated to svcOutdir before writing the service module files. While preparePackage correctly uses svcOutdir to create the directory structure at line 292, the subsequent calls to writePgpmPlan and writePgpmFiles at lines 353-354 still use opts which contains the original outdir. Only opts.replacer and opts.name are updated at lines 350-351, but opts.outdir remains unchanged. This causes service module migration files to be written to the DB module's directory instead of serviceOutdir, completely breaking the feature this PR aims to implement.

Additional Locations (1)

Fix in Cursor Fix in Web

@pyramation pyramation merged commit 1a970b9 into main Dec 31, 2025
35 checks passed
@pyramation pyramation deleted the devin/1767159956-add-service-outdir branch December 31, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants