File tree Expand file tree Collapse file tree 5 files changed +630
-0
lines changed
packages/cli/src/commands Expand file tree Collapse file tree 5 files changed +630
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ import * as setupI18n from './setup/i18n/i18n.js'
1919// @ts -expect-error - Types not available for JS files
2020import * as setupJobs from './setup/jobs/jobs.js'
2121// @ts -expect-error - Types not available for JS files
22+ import * as setupLiveQueries from './setup/live-queries/liveQueries.js'
23+ // @ts -expect-error - Types not available for JS files
2224import * as setupMailer from './setup/mailer/mailer.js'
2325import * as setupMiddleware from './setup/middleware/middleware.js'
2426import * as setupMonitoring from './setup/monitoring/monitoring.js'
@@ -50,6 +52,7 @@ export const builder = (yargs: Argv) =>
5052 . command ( setupGraphql )
5153 . command ( setupI18n )
5254 . command ( setupJobs )
55+ . command ( setupLiveQueries )
5356 . command ( setupMailer )
5457 // @ts -expect-error - Yargs TS types aren't very good
5558 . command ( setupMiddleware )
Original file line number Diff line number Diff line change 1+ import { recordTelemetryAttributes } from '@cedarjs/cli-helpers'
2+
3+ export const command = 'live-queries'
4+
5+ export const description =
6+ 'Setup live query invalidation with Postgres notifications'
7+
8+ export function builder ( yargs ) {
9+ yargs
10+ . option ( 'force' , {
11+ alias : 'f' ,
12+ default : false ,
13+ description : 'Overwrite existing configuration' ,
14+ type : 'boolean' ,
15+ } )
16+ . option ( 'verbose' , {
17+ alias : 'v' ,
18+ default : false ,
19+ description : 'Print more logs' ,
20+ type : 'boolean' ,
21+ } )
22+ }
23+
24+ export async function handler ( options ) {
25+ recordTelemetryAttributes ( {
26+ command : 'setup live-queries' ,
27+ force : options . force ,
28+ verbose : options . verbose ,
29+ } )
30+
31+ const { handler } = await import ( './liveQueriesHandler.js' )
32+ return handler ( options )
33+ }
You can’t perform that action at this time.
0 commit comments