File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -6,34 +6,34 @@ import {buildDocUrl} from "../shared/docs-utils";
66const SEARCH_INDEX_PATH = path . join ( process . cwd ( ) , "public" , "search-index.json" ) ;
77
88type RawSearchIndexEntry = {
9- path : string ;
10- title : string ;
9+ content : string ;
1110 hierarchy : string [ ] ;
11+ path : string ;
1212 summary : string ;
13- content : string ;
13+ title : string ;
1414} ;
1515
1616type SearchIndexFile = {
17+ entries : RawSearchIndexEntry [ ] ;
1718 generatedAt : string ;
1819 total : number ;
19- entries : RawSearchIndexEntry [ ] ;
2020} ;
2121
2222export type SearchMatch = {
23- path : string ;
24- title : string ;
2523 hierarchy : string [ ] ;
26- summary : string ;
27- snippet : string | null ;
28- score : number ;
2924 matchedTokens : number ;
25+ path : string ;
26+ score : number ;
27+ snippet : string | null ;
28+ summary : string ;
29+ title : string ;
3030} ;
3131
3232type CachedEntry = RawSearchIndexEntry & {
33+ contentLower : string ;
34+ hierarchyLower : string [ ] ;
3335 pathLower : string ;
3436 titleLower : string ;
35- hierarchyLower : string [ ] ;
36- contentLower : string ;
3737} ;
3838
3939let searchIndexPromise : Promise < CachedEntry [ ] > | null = null ;
@@ -58,7 +58,7 @@ export async function ensureSearchIndex(): Promise<CachedEntry[]> {
5858 } ) ;
5959 }
6060
61- return searchIndexPromise ;
61+ return await searchIndexPromise ;
6262}
6363
6464function scoreEntry ( entry : CachedEntry , tokens : string [ ] ) {
Original file line number Diff line number Diff line change 11import { codecovNextJSWebpackPlugin } from '@codecov/nextjs-webpack-plugin' ;
22import { withSentryConfig } from '@sentry/nextjs' ;
33
4- import { redirects } from './redirects.js' ;
54import { REMOTE_IMAGE_PATTERNS } from './src/config/images' ;
5+ import { redirects } from './redirects.js' ;
66
77const outputFileTracingExcludes = process . env . NEXT_PUBLIC_DEVELOPER_DOCS
88 ? {
You can’t perform that action at this time.
0 commit comments