Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add convex webhook support #316

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading