Block registry api

This commit is contained in:
2026-11-12 20:41:13 -03:00
parent e7fe663746
commit 76802ed430
39 changed files with 499 additions and 100 deletions
+2 -2
View File
@@ -81,9 +81,9 @@ function processing(json: Json, context: Context): Converted {
};
}
export function import_recipes(input: string, options: ImportOptions = {}): ImportReport {
export async function import_recipes(input: string, options: ImportOptions = {}): Promise<ImportReport> {
if (options.output === undefined) throw new Error("--output is needed for recipes");
const context = { remaps: options.remaps ?? DEFAULT_REMAPS, known: known_in(options.output) };
const context = { remaps: options.remaps ?? DEFAULT_REMAPS, known: await known_in(options.output) };
const report = empty_report();
if (context.known === undefined) {
report.warnings.push({