-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CX-5945] Warn about https file (#24871)
If there is a `https.ts` or `https.js` file at the top level directory of user convex code and the file imports `httpRouter`: 1. Warn user that this file will not be used to set up HTTP actions 2. Log to Sentry GitOrigin-RevId: 8bb9b523d4510894923daa205aa284d7c2c9dbb5
- Loading branch information
Showing
10 changed files
with
164 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { httpRouter } from "convex/server"; | ||
|
||
export const val = 1; | ||
|
||
export let otherHttp = 20; | ||
|
||
const http = httpRouter(); | ||
|
||
export default http; |
3 changes: 3 additions & 0 deletions
3
src/bundler/test_fixtures/js/project_with_https_not_at_top_level/default.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default async function defaultExport() { | ||
return 1; | ||
} |
5 changes: 5 additions & 0 deletions
5
src/bundler/test_fixtures/js/project_with_https_not_at_top_level/more_code/https.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { httpRouter } from "convex/server"; | ||
|
||
const http = httpRouter(); | ||
|
||
export default http; |
1 change: 1 addition & 0 deletions
1
src/bundler/test_fixtures/js/project_with_https_without_router/https.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const val = 1; |