mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 05:56:38 +00:00
Fix the source of the cli blueprint
This commit is contained in:
@@ -26,7 +26,8 @@ const applyBlueprintSchema = z
|
||||
message: `Invalid YAML: ${error instanceof Error ? error.message : "Unknown error"}`
|
||||
});
|
||||
}
|
||||
})
|
||||
}),
|
||||
source: z.enum(["API", "UI", "CLI"]).optional()
|
||||
})
|
||||
.strict();
|
||||
|
||||
@@ -84,7 +85,7 @@ export async function applyYAMLBlueprint(
|
||||
);
|
||||
}
|
||||
|
||||
const { blueprint: contents, name } = parsedBody.data;
|
||||
const { blueprint: contents, name, source = "UI" } = parsedBody.data;
|
||||
|
||||
logger.debug(`Received blueprint:`, contents);
|
||||
|
||||
@@ -107,7 +108,7 @@ export async function applyYAMLBlueprint(
|
||||
blueprint = await applyBlueprint({
|
||||
orgId,
|
||||
name,
|
||||
source: "UI",
|
||||
source,
|
||||
configData: parsedConfig
|
||||
});
|
||||
} catch (err) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Blueprint } from "@server/db";
|
||||
|
||||
export type BlueprintSource = "API" | "UI" | "NEWT";
|
||||
export type BlueprintSource = "API" | "UI" | "NEWT" | "CLI";
|
||||
|
||||
export type BlueprintData = Omit<Blueprint, "source"> & {
|
||||
source: BlueprintSource;
|
||||
|
||||
Reference in New Issue
Block a user