@@ -4,13 +4,13 @@ import * as HttpServerRequest from "@effect/platform/HttpServerRequest"
44import * as HttpServerError from "@effect/platform/HttpServerError"
55import * as HttpServerResponse from "@effect/platform/HttpServerResponse"
66import type { PlatformError } from "@effect/platform/Error"
7- import { listProjectItems } from "@effect-template/lib"
87import type { ListProjectsContext } from "@effect-template/lib/usecases/projects-list"
98import { Effect } from "effect"
109import * as Stream from "effect/Stream"
1110
1211import { ApiBadRequestError , ApiConflictError , ApiInternalError , ApiNotFoundError } from "../api/errors.js"
1312import { listProjectPortForwards } from "./project-port-forwards.js"
13+ import { readProjectItemsForInventory } from "./projects.js"
1414import {
1515 normalizeForwardedPrefix ,
1616 parseLinuxDefaultGatewayIp ,
@@ -134,13 +134,13 @@ const fetchUpstream = (
134134
135135const resolveProxyProjectId = (
136136 target : ProjectPortProxyPath
137- ) : Effect . Effect < string , ApiConflictError | ApiNotFoundError | PlatformError , ListProjectsContext > => {
137+ ) : Effect . Effect < string , ApiConflictError | ApiInternalError | ApiNotFoundError , ListProjectsContext > => {
138138 if ( target . _tag === "ProjectId" ) {
139139 return Effect . succeed ( target . projectId )
140140 }
141141
142142 return Effect . gen ( function * ( _ ) {
143- const projects = yield * _ ( listProjectItems )
143+ const projects = yield * _ ( readProjectItemsForInventory ( ) )
144144 const matches = projects . filter ( ( project ) => projectShortKey ( project . projectDir ) === target . projectKey )
145145 if ( matches . length === 0 ) {
146146 return yield * _ ( Effect . fail ( new ApiNotFoundError ( { message : `Project key not found: ${ target . projectKey } ` } ) ) )
0 commit comments