File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -476,7 +476,7 @@ function printDiff(
476476 msg = msg . slice ( 0 , - 1 ) ; // strip last new line
477477 logFinishedStep ( msg ) ;
478478 }
479- if ( rootDiff . enabled_indexes && rootDiff . enabled_indexes . length > 0 ) {
479+ if ( rootDiff . enabled_indexes . length > 0 ) {
480480 let msg = opts . dryRun
481481 ? `These indexes would be enabled:\n`
482482 : `These indexes are now enabled:\n` ;
@@ -486,7 +486,7 @@ function printDiff(
486486 msg = msg . slice ( 0 , - 1 ) ; // strip last new line
487487 logFinishedStep ( msg ) ;
488488 }
489- if ( rootDiff . disabled_indexes && rootDiff . disabled_indexes . length > 0 ) {
489+ if ( rootDiff . disabled_indexes . length > 0 ) {
490490 let msg = opts . dryRun
491491 ? `These indexes would be staged:\n`
492492 : `These indexes are now staged:\n` ;
Original file line number Diff line number Diff line change @@ -157,9 +157,9 @@ export async function waitForSchema(
157157 msg = `Backfilling indexes (${ indexesComplete } /${ indexesTotal } ready)...` ;
158158 // Set a more specific message if the backfill is taking a long time
159159 if ( Date . now ( ) - start > 10_000 ) {
160- const rootDiff = startPush . schemaChange . indexDiffs ?. [ "" ] ;
160+ const rootDiff = startPush . schemaChange . indexDiffs [ "" ] ;
161161 const indexName = (
162- rootDiff ? .added_indexes [ 0 ] || rootDiff ? .enabled_indexes ?. [ 0 ]
162+ rootDiff . added_indexes [ 0 ] || rootDiff . enabled_indexes [ 0 ]
163163 ) ?. name ;
164164 if ( indexName ) {
165165 const table = indexName . split ( "." ) [ 0 ] ;
Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ export type DeveloperIndexConfig = z.infer<typeof developerIndexConfig>;
7373export const indexDiff = looseObject ( {
7474 added_indexes : z . array ( developerIndexConfig ) ,
7575 removed_indexes : z . array ( developerIndexConfig ) ,
76- enabled_indexes : z . array ( developerIndexConfig ) . optional ( ) ,
77- disabled_indexes : z . array ( developerIndexConfig ) . optional ( ) ,
76+ enabled_indexes : z . array ( developerIndexConfig ) ,
77+ disabled_indexes : z . array ( developerIndexConfig ) ,
7878} ) ;
7979export type IndexDiff = z . infer < typeof indexDiff > ;
8080
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export type StartPushRequest = z.infer<typeof startPushRequest>;
2727export const schemaChange = looseObject ( {
2828 allocatedComponentIds : z . any ( ) ,
2929 schemaIds : z . any ( ) ,
30- indexDiffs : z . record ( componentDefinitionPath , indexDiff ) . optional ( ) ,
30+ indexDiffs : z . record ( componentDefinitionPath , indexDiff ) ,
3131} ) ;
3232export type SchemaChange = z . infer < typeof schemaChange > ;
3333
You can’t perform that action at this time.
0 commit comments