Skip to content

Commit 819ada5

Browse files
committed
add convex webhook support
1 parent 13dee2b commit 819ada5

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

convex/_generated/api.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @module
99
*/
1010

11+
import type * as http from "../http.js";
1112
import type * as stats from "../stats.js";
1213

1314
import type {
@@ -24,6 +25,7 @@ import type {
2425
* ```
2526
*/
2627
declare const fullApi: ApiFromModules<{
28+
http: typeof http;
2729
stats: typeof stats;
2830
}>;
2931
declare const fullApiWithMounts: typeof fullApi;

convex/http.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ossStats } from './stats'
2+
import { httpRouter } from 'convex/server'
3+
4+
const http = httpRouter()
5+
6+
ossStats.registerRoutes(http)
7+
8+
export default http

convex/stats.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { OssStats } from '@erquhart/convex-oss-stats'
22
import { components } from './_generated/api'
33

4-
const ossStats = new OssStats(components.ossStats, {
4+
export const ossStats = new OssStats(components.ossStats, {
55
githubOwners: ['tanstack'],
66
npmOrgs: ['tanstack'],
77
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "module",
88
"scripts": {
99
"dev": "vinxi dev",
10-
"dev:convex": "convex dev",
10+
"dev:convex": "convex dev --tail-logs",
1111
"build": "vinxi build",
1212
"start": "vinxi start",
1313
"lint": "prettier --check '**/*' --ignore-unknown && eslint --ext .ts,.tsx ./app",

0 commit comments

Comments
 (0)