mirror of
https://github.com/supabase/supabase.git
synced 2026-07-02 11:44:23 +08:00
Scripts currently use CJS, which is causing a bit of a mess when trying to use shared utilities from the app. Converting everything to ESM so there are fewer conflicts when adding new scripts going forward.
29 lines
554 B
TypeScript
29 lines
554 B
TypeScript
import type { Json, Section } from '../../helpers.mdx.js'
|
|
|
|
export abstract class BaseLoader {
|
|
type: string
|
|
|
|
constructor(
|
|
public source: string,
|
|
public path: string
|
|
) {}
|
|
|
|
abstract load(): Promise<BaseSource[]>
|
|
}
|
|
|
|
export abstract class BaseSource {
|
|
type: string
|
|
checksum?: string
|
|
meta?: Json
|
|
sections?: Section[]
|
|
|
|
constructor(
|
|
public source: string,
|
|
public path: string
|
|
) {}
|
|
|
|
abstract process(): { checksum: string; meta?: Json; ragIgnore?: boolean; sections: Section[] }
|
|
|
|
abstract extractIndexedContent(): string
|
|
}
|