Skip to content

Commit 067e4f9

Browse files
chore(api-server): use terminalLink for route names in lambdaLoader output
- Use pathToFileURL for proper cross-platform file URLs - Add termi-link dependency to package.json - Update yarn.lock
1 parent 7f88c60 commit 067e4f9

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/api-server/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
"pretty-bytes": "5.6.0",
132132
"pretty-ms": "7.0.1",
133133
"split2": "4.2.0",
134+
"termi-link": "1.1.0",
134135
"yargs": "17.7.2"
135136
},
136137
"devDependencies": {

packages/api-server/src/plugins/lambdaLoader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type {
1313
FastifyRequest,
1414
RequestGenericInterface,
1515
} from 'fastify'
16+
import { terminalLink } from 'termi-link'
1617

1718
import type {
1819
CedarHandler,
@@ -131,9 +132,8 @@ export const setLambdaFunctions = async (foundFunctions: string[]) => {
131132
entry: fnPath,
132133
})
133134

134-
// TODO: Use terminal link.
135135
console.log(
136-
ansis.magenta('/' + routeName),
136+
terminalLink(ansis.magenta('/' + routeName), pathToFileURL(fnPath).href),
137137
ansis.dim.italic(Date.now() - ts + ' ms'),
138138
)
139139
})

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,6 +2185,7 @@ __metadata:
21852185
pretty-bytes: "npm:5.6.0"
21862186
pretty-ms: "npm:7.0.1"
21872187
split2: "npm:4.2.0"
2188+
termi-link: "npm:1.1.0"
21882189
tsx: "npm:4.21.0"
21892190
typescript: "npm:5.9.3"
21902191
vitest: "npm:3.2.4"

0 commit comments

Comments
 (0)