zoekt: 31
files / 152
matches / 0.5ms neogrok: 20 files / 135
matches 1 import type { Cookies } from "@sveltejs/kit";2 import { getContext, setContext } from "svelte";3 4 export type SearchType = "live" | "manual";5 const searchType Key = "searchType ";6 const defaultSearchType = "live";7 const searchType FromString = (x: string) =>8 x === "live" || x === "manual" ? x : null; Show 21 more matches github.com/isker/neogrok src/hooks.server.ts 1 match | TypeScript | №2 7 } from "$lib/server/metrics";8 import type { Handle, HandleServerError } from "@sveltejs/kit";9 1 import * as v from "@badrap/valita";2 import type { ReadonlyDeep } from "type -fest";3 import {4 type ContentLine,5 parseChunkMatch,16 });17 export type SearchQuery = ReadonlyDeep<v.Infer<type of searchQuerySchema>>;18 19 export type SearchResponse =20 | { Show 8 more matches 1 import { dev } from "$app/environment";2 import { error, type RequestHandler } from "@sveltejs/kit";3 import { registry } from "$lib/server/metrics";14 return new Response(await registry.metrics(), {15 headers: { "content-type ": registry.contentType },16 }); 9 export const makeZoektRequest = async (10 f: type of fetch,11 path: string,20 headers: {21 "content-type ": "application/json",22 }, 3 listQuerySchema,4 type ListQuery,5 listRepositories,6 type ListRepositoriesResponse,7 } from "$lib/server/zoekt-list-repositories"; 11 });12 type FileConfiguration = v.Infer<type of fileConfigurationSchema>;13 const defaultConfigFilePath = "/etc/neogrok/config.json";18 19 type Configuration = {20 readonly zoektUrl: URL;53 e &&54 type of e === "object" &&55 "code" in e && 1 export type ContentLine = {2 readonly text: string;5 6 export type Range = {7 // inclusive163 // one with different properties begin.164 type TokenBoundary = {165 index: number; 1 import type {2 ListQuery,6 7 export const load: import("./$type s").PageLoad = async ({ url, fetch }) => {8 return {14 url: URL,15 f: type of fetch,16 ): Promise<ListRepositoriesResponse> => {21 body: JSON.stringify(listQuery),22 headers: { "content-type ": "application/json" },23 }); 1 import type { RequestHandler } from "@sveltejs/kit";2 import type { Type } from "@badrap/valita";3 12 <RequestData, ResponseData>(13 schema: Type <RequestData>,14 callZoekt: (15 requestData: RequestData,16 f: type of fetch,17 ) => Promise<ResponseData>, Show 3 more matches 3 searchQuerySchema,4 type SearchQuery,5 search,6 type SearchResponse,7 } from "$lib/server/search-api"; 1 import type {2 SearchQuery,7 8 export type SearchOutcome =9 | { kind: "none" }12 13 export const load: import("./$type s").PageLoad = async ({ url, fetch }) => ({14 searchOutcome: await executeSearch(url, fetch),18 url: URL,19 f: type of fetch,20 ): Promise<SearchOutcome> => {29 body: JSON.stringify({ query, ...rest } satisfies SearchQuery),30 headers: { "content-type ": "application/json" },31 }); 1 import type { Repository } from "$lib/server/zoekt-list-repositories";2 3 export type SortColumn =4 | {12 13 export type SortBy = SortColumn & { direction: "ascending" | "descending" };14 1 import * as v from "@badrap/valita";2 import type { ReadonlyDeep } from "type -fest";3 import { makeZoektRequest } from "./zoekt-client";5 export const listQuerySchema = v.object({ query: v.string().optional() });6 export type ListQuery = ReadonlyDeep<v.Infer<type of listQuerySchema>>;7 8 export type ListRepositoriesResponse =9 | { Show 6 more matches 1 import type { ContentLine } from "$lib/server/content-parser";2 import type { Chunk, ResultFile } from "$lib/server/search-api";3 4 export type LineGroup = Array<{5 readonly lineNumber: number; 2 import { navigating, page } from "$app/state";3 import type { SearchType } from "$lib/preferences.svelte";4 import type { ListQuery } from "$lib/server/zoekt-list-repositories";5 7 8 export type RouteListQuery = ListQuery & {9 // This is only used in the frontend, there is no support for truncation in34 repos,35 searchType ,36 }: { Show 3 more matches 2 import { page, navigating } from "$app/state";3 import type { SearchType } from "$lib/preferences.svelte";4 import type { SearchQuery } from "$lib/server/search-api";5 11 12 export type RouteSearchQuery = Omit<SearchQuery, "query"> & {13 readonly query: string | undefined;50 matches,51 searchType ,52 }: { Show 3 more matches 2 toZoekt,3 type OpenGrokSearchParams,4 renderRepoQuery,9 10 export const load: import("./$type s").PageServerLoad = async ({11 url,25 hist: extract("hist"),26 type : extract("type "),27 sort: extract("sort"), 1 export type ZoektConversionWarning =2 | {45 46 export type QueryLocation = {47 // these are string indices93 case "UnsupportedLanguage":94 return `The given OpenGrok file type could not be converted to a neogrok language (\`lang:\`): ${warning.language}`;95 default: { 2 import lucene from "lucene";3 import type {4 QueryLocation,153 154 if (type ) {155 const mapped = languageNames.get(type );156 if (!mapped) {158 code: "UnsupportedLanguage",159 language: type ,160 }); Show 14 more matches