chore: Phase 2c - second Repository port: Environment - #10335
Draft
gatzjames wants to merge 1 commit into
Draft
Conversation
Same pattern as WorkspaceRepository, second data point to validate it before tackling Request's multiple variant types: - domain/src/environment/environment.entity.ts - Environment entity plus EnvironmentType/EnvironmentKvPairDataType enums and EnvironmentKvPairData, defined fresh in domain (zero import from insomnia-data). - domain/src/environment/environment-repository.port.ts - EnvironmentRepository interface. findByParentId (not findByWorkspaceId): an Environment's parent is either a Workspace (base environment) or another Environment (sub-environment), so the relationship is generic. - infrastructure/src/persistence/nedb/nedb-environment-repository.ts - thin adapter delegating to insomnia-data's existing services.environment calls. save() uses the same raw database.update() call services.workspace.upsert() used for Workspace, since insomnia-data has no services.environment.upsert() equivalent. delete() fetches the doc first since services.environment.remove() only accepts a full object, unlike services.workspace.remove()'s string-or-object overload. - domain/src/testing/environment-repository.contract.ts - shared contract test suite, same shape as the Workspace one. Nothing in apps/desktop or apps/cli switches over yet, same as the Workspace PR. Verified: lint, type-check, check-boundaries, and the full test suite all pass clean across every workspace (infrastructure now has 2 test files / 10 contract tests).
✅ Circular References ReportGenerated at: 2026-08-05T12:00:06.672Z Summary
Click to view all circular references in PR (13)Click to view all circular references in base branch (13)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.