Skip to content

Commit

Permalink
add convex webhook support (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
erquhart authored Dec 11, 2024
1 parent 13dee2b commit 48d8935
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions convex/_generated/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @module
*/

import type * as http from "../http.js";
import type * as stats from "../stats.js";

import type {
Expand All @@ -24,6 +25,7 @@ import type {
* ```
*/
declare const fullApi: ApiFromModules<{
http: typeof http;
stats: typeof stats;
}>;
declare const fullApiWithMounts: typeof fullApi;
Expand Down
8 changes: 8 additions & 0 deletions convex/http.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ossStats } from './stats'
import { httpRouter } from 'convex/server'

const http = httpRouter()

ossStats.registerRoutes(http)

export default http
2 changes: 1 addition & 1 deletion convex/stats.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OssStats } from '@erquhart/convex-oss-stats'
import { components } from './_generated/api'

const ossStats = new OssStats(components.ossStats, {
export const ossStats = new OssStats(components.ossStats, {
githubOwners: ['tanstack'],
npmOrgs: ['tanstack'],
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"dev": "vinxi dev",
"dev:convex": "convex dev",
"dev:convex": "convex dev --tail-logs",
"build": "vinxi build",
"start": "vinxi start",
"lint": "prettier --check '**/*' --ignore-unknown && eslint --ext .ts,.tsx ./app",
Expand Down

0 comments on commit 48d8935

Please sign in to comment.