Skip to content

chore: Phase 1b - move configure-v3-client/insomnia-fetch behind insomnia-api - #10329

Draft
gatzjames wants to merge 1 commit into
arch-phase-1a-cli-data-layerfrom
arch-phase-1b-configure-v3-client-boundary
Draft

chore: Phase 1b - move configure-v3-client/insomnia-fetch behind insomnia-api#10329
gatzjames wants to merge 1 commit into
arch-phase-1a-cli-data-layerfrom
arch-phase-1b-configure-v3-client-boundary

Conversation

@gatzjames

Copy link
Copy Markdown
Contributor

No description provided.

…mnia-api

Relocates configureV3ClientDefaults, insomniaFetch/proxyAwareFetch, and
the four small constants they depend on (getApiBaseURL, getClientString,
INSOMNIA_FETCH_TIME_OUT, PLAYWRIGHT_TEST) from packages/insomnia/src into
insomnia-api, which both desktop and the CLI already depend on. Desktop's
own common/constants.ts, common/insomnia-fetch.ts and
common/configure-v3-client.ts become thin re-export shims (same pattern
already used for generateId in misc.ts), so every existing desktop import
path keeps working unchanged.

insomnia-inso's cli.ts now imports configureV3ClientDefaults/insomniaFetch
from insomnia-api directly instead of reaching into packages/insomnia/src.

getClientString's version string now reads insomnia-api's own package.json
instead of desktop's - safe because every workspace package in this
monorepo is released with the same synchronized version number, so the
resulting string is identical today and stays identical going forward.

send-request.node.ts's relocation is deliberately deferred (curl/scripting/
vault coupling makes it a separate, higher-risk piece of work) - the CLI
still reaches into packages/insomnia/src/network/send-request.node for now.

Verified via insomnia-api/insomnia-inso/insomnia unit tests (139 test files,
2175 tests passing in packages/insomnia alone) and the full inso dev-bundle
e2e suite, including tests that exercise the real network path
(insomnia.sendRequest, run collection HTTP requests) - all pass unchanged.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

✅ Circular References Report

Generated at: 2026-08-04T19:27:53.149Z
Status: ✅ NO CHANGE

Summary

Metric Base (arch-phase-1a-cli-data-layer) PR Change
Total Circular References 8 8 0 (0.00%)
Click to view all circular references in PR (8)
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/src/ui/components/viewers/response-multipart-viewer.tsx
Click to view all circular references in base branch (8)
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/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-1a-cli-data-layer branch.

@@ -0,0 +1,96 @@
import { generateRequestId, getApiBaseURL, getClientString, INSOMNIA_FETCH_TIME_OUT, PLAYWRIGHT_TEST } from './client-defaults';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we should move insomnia-fetch into insomnia-api since fetch is runtime-related and insomnia-api is runtime-agnostic. What do you think?

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