Skip to content

Commit 6a36601

Browse files
committed
feat: lint and test
1 parent 04a41a3 commit 6a36601

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/commands/init/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For more information about getting started with Netlify CLI, see ${terminalLink(
2222
// Check for experimental AI rules flag
2323
if (options.aiRules) {
2424
const { initWithAiRules } = await import('./ai-rules.js')
25-
await initWithAiRules(options.aiRules, command)
25+
await initWithAiRules(options.aiRules as string, command)
2626
return
2727
}
2828

src/lib/functions/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ export const createHandler = function (options: GetFunctionsServerOptions): Requ
169169
const rawQuery = new URL(request.originalUrl, 'http://example.com').search.slice(1)
170170
// TODO(serhalp): Update several tests to pass realistic `config` objects and remove nullish coalescing.
171171
const protocol = options.config?.dev?.https ? 'https' : 'http'
172-
const url = new URL(requestPath, `${protocol}://${request.get('host') || 'localhost'}`)
172+
const hostname = request.get('host') || 'localhost'
173+
const url = new URL(requestPath, `${protocol}://${hostname}`)
173174
url.search = rawQuery
174175
const rawUrl = url.toString()
175176
const event = {

0 commit comments

Comments
 (0)