MCPcopy Create free account
hub / github.com/Effect-TS/effect / get

Function get

packages/platform/node-shared/src/internal/proxyProcess.ts:515–530  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

513 // Retired proxy processes still running commands
514 const retired = new Set<Proxy>()
515 const get = () => {
516 if (current.exited) {
517 current = new Proxy(options)
518 } else if (current.credentials !== credentials()) {
519 // The application changed its credentials, so its commands must not
520 // run with the old ones
521 const previous = current
522 current = new Proxy(options)
523 retired.add(previous)
524 previous.retire()
525 }
526 for (const proxy of retired) {
527 if (proxy.exited) retired.delete(proxy)
528 }
529 return current
530 }
531 const toError = toStartError(options)
532 // Waits, interruptibly, for a proxy process that is ready to take spawns.
533 // Nothing has been sent while waiting, so interruption has nothing to undo.

Callers 1

makeFunction · 0.70

Calls 4

credentialsFunction · 0.85
retireMethod · 0.80
addMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected