Skip to content

chore: Phase 2c - second Repository port: Environment - #10335

Draft
gatzjames wants to merge 1 commit into
arch-phase-2c-workspace-repositoryfrom
arch-phase-2c-environment-repository
Draft

chore: Phase 2c - second Repository port: Environment#10335
gatzjames wants to merge 1 commit into
arch-phase-2c-workspace-repositoryfrom
arch-phase-2c-environment-repository

Conversation

@gatzjames

Copy link
Copy Markdown
Contributor

No description provided.

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).
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

✅ Circular References Report

Generated at: 2026-08-05T12:00:06.672Z
Status: ✅ NO CHANGE

Summary

Metric Base (arch-phase-2c-workspace-repository) PR Change
Total Circular References 13 13 0 (0.00%)
Click to view all circular references in PR (13)
../apps/desktop/src/common/render.ts -> ../apps/desktop/src/network/network.ts
../apps/desktop/src/network/network.ts -> ../apps/desktop/src/network/concurrency.renderer.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
../packages/insomnia-scripting-environment/src/objects/collection.ts -> ../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts -> ../packages/insomnia-scripting-environment/src/objects/insomnia.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts -> ../packages/insomnia-scripting-environment/src/objects/insomnia.ts -> ../packages/insomnia-scripting-environment/src/objects/send-request.ts
desktop/src/main/prompt-bridge.ts -> desktop/src/main/window-utils.ts -> desktop/src/main/plugin-window.ts
desktop/src/main/window-utils.ts -> desktop/src/main/plugin-window.ts
desktop/src/network/network.ts -> desktop/src/common/render.ts
desktop/src/ui/components/settings/import-export.tsx -> desktop/src/ui/components/modals/export-requests-modal.tsx
desktop/src/ui/components/tabs/tab-list.tsx -> desktop/src/ui/components/tabs/tab.tsx
desktop/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> desktop/src/ui/components/templating/external-vault/external-vault-form.tsx
desktop/src/ui/components/viewers/response-viewer.tsx -> desktop/src/ui/components/viewers/response-multipart-viewer.tsx
Click to view all circular references in base branch (13)
../apps/desktop/src/common/render.ts -> ../apps/desktop/src/network/network.ts
../apps/desktop/src/network/network.ts -> ../apps/desktop/src/network/concurrency.renderer.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
../packages/insomnia-scripting-environment/src/objects/collection.ts -> ../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts -> ../packages/insomnia-scripting-environment/src/objects/insomnia.ts
../packages/insomnia-scripting-environment/src/objects/response.ts -> desktop/src/network/network.ts -> ../packages/insomnia-scripting-environment/src/objects/index.ts -> ../packages/insomnia-scripting-environment/src/objects/insomnia.ts -> ../packages/insomnia-scripting-environment/src/objects/send-request.ts
desktop/src/main/prompt-bridge.ts -> desktop/src/main/window-utils.ts -> desktop/src/main/plugin-window.ts
desktop/src/main/window-utils.ts -> desktop/src/main/plugin-window.ts
desktop/src/network/network.ts -> desktop/src/common/render.ts
desktop/src/ui/components/settings/import-export.tsx -> desktop/src/ui/components/modals/export-requests-modal.tsx
desktop/src/ui/components/tabs/tab-list.tsx -> desktop/src/ui/components/tabs/tab.tsx
desktop/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> desktop/src/ui/components/templating/external-vault/external-vault-form.tsx
desktop/src/ui/components/viewers/response-viewer.tsx -> desktop/src/ui/components/viewers/response-multipart-viewer.tsx

Analysis

No Change: This PR does not introduce or remove any circular references.


This report was generated automatically by comparing against the arch-phase-2c-workspace-repository branch.

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