Reworked support for processing
This commit is contained in:
parent
c1166680a8
commit
6a3157762a
14 changed files with 318 additions and 473 deletions
62
types/muse.d.ts
vendored
Normal file
62
types/muse.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
// Generated by dts-bundle-generator v9.5.1
|
||||
|
||||
import z from 'zod';
|
||||
|
||||
export type MuseFileType = "md" | "yaml" | "json" | "toml";
|
||||
export interface MuseFileContent {
|
||||
type: MuseFileType;
|
||||
text: string;
|
||||
data: Record<string, unknown>;
|
||||
}
|
||||
declare const BindingSchema: z.ZodObject<{
|
||||
include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
||||
name: z.ZodDefault<z.ZodString>;
|
||||
author: z.ZodDefault<z.ZodString>;
|
||||
description: z.ZodDefault<z.ZodString>;
|
||||
version: z.ZodDefault<z.ZodString>;
|
||||
files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
||||
options: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
||||
processors: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
options: Record<string, any>;
|
||||
include: string[];
|
||||
name: string;
|
||||
author: string;
|
||||
description: string;
|
||||
version: string;
|
||||
files: string[];
|
||||
processors: string[];
|
||||
}, {
|
||||
options?: Record<string, any> | undefined;
|
||||
include?: string[] | undefined;
|
||||
name?: string | undefined;
|
||||
author?: string | undefined;
|
||||
description?: string | undefined;
|
||||
version?: string | undefined;
|
||||
files?: string[] | undefined;
|
||||
processors?: string[] | undefined;
|
||||
}>;
|
||||
export type ParsedBinding = z.infer<typeof BindingSchema>;
|
||||
export interface BindingMetadata {
|
||||
name: string;
|
||||
author: string;
|
||||
description: string;
|
||||
version: string;
|
||||
}
|
||||
export type MuseProcessorFn = (binding: Binding) => Promise<Binding>;
|
||||
export interface MuseProcessor {
|
||||
readonly filePath: string;
|
||||
readonly process: MuseProcessorFn;
|
||||
}
|
||||
export interface Binding {
|
||||
readonly _raw: ParsedBinding;
|
||||
readonly bindingPath: string;
|
||||
readonly includedFiles: string[];
|
||||
readonly entries: MuseFileContent[];
|
||||
readonly metadata: BindingMetadata;
|
||||
readonly options: Record<string, unknown>;
|
||||
readonly processors: MuseProcessor[];
|
||||
readonly imports: Binding[];
|
||||
}
|
||||
|
||||
export {};
|
Loading…
Add table
Add a link
Reference in a new issue