Skip to content

feat(arch): add create/update/delete Environment use-cases to the Insomnia facade - #10342

Draft
gatzjames wants to merge 1 commit into
arch-phase-2c-workspace-crud-use-casesfrom
arch-phase-2c-environment-crud-use-cases
Draft

feat(arch): add create/update/delete Environment use-cases to the Insomnia facade#10342
gatzjames wants to merge 1 commit into
arch-phase-2c-workspace-crud-use-casesfrom
arch-phase-2c-environment-crud-use-cases

Conversation

@gatzjames

Copy link
Copy Markdown
Contributor

No description provided.

…omnia facade

Rounds out the Environment aggregate's core CRUD on the application-layer
facade, mirroring the Workspace pattern from the prior PR. EnvironmentModule
gains create()/updateById()/deleteById(), wired to their real route call
sites: environment.create.tsx, environment.update.tsx (a generic patch,
matching the route's existing shape), and environment.delete.tsx. The
"cannot delete the base environment" business rule moves into
deleteEnvironment() itself (parentId === workspaceId), replacing the route's
previous two-lookup invariant with a single check inside the use-case.

EnvironmentRepository gains a create() port method (backed by
services.environment.create in the NeDB adapter), with a matching
contract-test case. environment.duplicate.tsx and both set-active routes are
intentionally left untouched: duplicate() needs sibling-sort-key querying
the current repository port doesn't expose, and set-active/set-active-global
mutate WorkspaceMeta, not Environment.
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.

1 participant