zoekt: 30 files / 143 matches / 0.44ms neogrok: 20 files / 128 matches

github.com/isker/neogroksrc/lib/preferences.ts 21 matches | TypeScript | №1

1 import type { Cookies } from "@sveltejs/kit";2 import { getContext, setContext } from "svelte";3 import { writable, type Writable } from "svelte/store";4 5 export type SearchType = "live" | "manual";6 const searchTypeKey = "searchType";7 const defaultSearchType = "live";8 const searchTypeFromString = (x: string) =>9 x === "live" || x === "manual" ? x : null;

github.com/isker/neogroksrc/hooks.server.ts 1 match | TypeScript | №2

7 } from "$lib/server/metrics";8 import type { Handle, HandleServerError } from "@sveltejs/kit";9

github.com/isker/neogroksrc/lib/server/search-api.ts 14 matches | TypeScript | №3

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<typeof searchQuerySchema>>;18 19 export type SearchResponse =20 | {

github.com/isker/neogroksrc/routes/metrics/+server.ts 3 matches | TypeScript | №4

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 });

github.com/isker/neogroksrc/lib/server/zoekt-client.ts 2 matches | TypeScript | №5

9 export const makeZoektRequest = async (10 f: typeof fetch,11 path: string,
20 headers: {21 "content-type": "application/json",22 },

github.com/isker/neogroksrc/routes/api/list/+server.ts 2 matches | TypeScript | №6

3 listQuerySchema,4 type ListQuery,5 listRepositories,6 type ListRepositoriesResponse,7 } from "$lib/server/zoekt-list-repositories";

github.com/isker/neogroksrc/lib/server/configuration.ts 4 matches | TypeScript | №7

11 });12 type FileConfiguration = v.Infer<typeof fileConfigurationSchema>;13 const defaultConfigFilePath = "/etc/neogrok/config.json";
18 19 type Configuration = {20 readonly zoektUrl: URL;
53 e &&54 typeof e === "object" &&55 "code" in e &&

github.com/isker/neogroksrc/lib/server/content-parser.ts 3 matches | TypeScript | №8

1 export type ContentLine = {2 readonly text: string;
5 6 export type Range = {7 // inclusive
163 // one with different properties begin.164 type TokenBoundary = {165 index: number;

github.com/isker/neogroksrc/routes/repositories/+page.ts 4 matches | TypeScript | №9

1 import type {2 ListQuery,
6 7 export const load: import("./$types").PageLoad = async ({ url, fetch }) => {8 return {
14 url: URL,15 f: typeof fetch,16 ): Promise<ListRepositoriesResponse> => {
21 body: JSON.stringify(listQuery),22 headers: { "content-type": "application/json" },23 });

github.com/isker/neogroksrc/lib/server/devalue-bypass.ts 8 matches | TypeScript | №10

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: typeof fetch,17 ) => Promise<ResponseData>,

github.com/isker/neogroksrc/routes/api/search/+server.ts 2 matches | TypeScript | №11

3 searchQuerySchema,4 type SearchQuery,5 search,6 type SearchResponse,7 } from "$lib/server/search-api";

github.com/isker/neogroksrc/routes/(search-page)/+page.ts 5 matches | TypeScript | №12

1 import type {2 SearchQuery,
7 8 export type SearchOutcome =9 | { kind: "none" }
12 13 export const load: import("./$types").PageLoad = async ({ url, fetch }) => ({14 searchOutcome: await executeSearch(url, fetch),
18 url: URL,19 f: typeof fetch,20 ): Promise<SearchOutcome> => {
29 body: JSON.stringify({ query, ...rest } satisfies SearchQuery),30 headers: { "content-type": "application/json" },31 });

github.com/isker/neogroksrc/routes/repositories/table-sorting.ts 3 matches | TypeScript | №13

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

github.com/isker/neogroksrc/lib/server/zoekt-list-repositories.ts 11 matches | TypeScript | №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<typeof listQuerySchema>>;7 8 export type ListRepositoriesResponse =9 | {

github.com/isker/neogroksrc/routes/(search-page)/chunk-renderer.ts 3 matches | TypeScript | №15

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;

github.com/isker/neogroksrc/routes/repositories/route-list-query.ts 8 matches | TypeScript | №16

2 import { navigating, page } from "$app/stores";3 import type { SearchType } from "$lib/preferences";4 import type { ListQuery } from "$lib/server/zoekt-list-repositories";5 import { derived, get } from "svelte/store";
8 9 type RouteListQuery = ListQuery & {10 // This is only used in the frontend, there is no support for truncation in
39 repos,40 searchType,41 }: {

github.com/isker/neogroksrc/routes/(search-page)/route-search-query.ts 8 matches | TypeScript | №17

1 import { derived, get } from "svelte/store";2 import type { SearchType } from "$lib/preferences";3 import type { SearchQuery } from "$lib/server/search-api";4 import { page, navigating } from "$app/stores";
12 13 type RouteSearchQuery = Omit<SearchQuery, "query"> & {14 readonly query: string | undefined;
55 matches,56 searchType,57 }: {

github.com/isker/neogroksrc/routes/(opengrok-compat)/search/+page.server.ts 4 matches | TypeScript | №18

2 toZoekt,3 type OpenGrokSearchParams,4 renderRepoQuery,
9 10 export const load: import("./$types").PageServerLoad = async ({11 url,
25 hist: extract("hist"),26 type: extract("type"),27 sort: extract("sort"),

github.com/isker/neogroksrc/routes/(opengrok-compat)/search/conversion-warnings.ts 3 matches | TypeScript | №19

1 export type ZoektConversionWarning =2 | {
45 46 export type QueryLocation = {47 // these are string indices
93 case "UnsupportedLanguage":94 return `The given OpenGrok file type could not be converted to a neogrok language (\`lang:\`): ${warning.language}`;95 default: {

github.com/isker/neogroksrc/routes/(opengrok-compat)/search/opengrok-lucene.server.ts 19 matches | TypeScript | №20

2 import lucene from "lucene";3 import type {4 QueryLocation,
36 hist,37 type,38 sort,
153 154 if (type) {155 const mapped = languageNames.get(type);156 if (!mapped) {
158 code: "UnsupportedLanguage",159 language: type,160 });