Add initial way to get info about execution context
This commit is contained in:
11
express/execution-context-schema.ts
Normal file
11
express/execution-context-schema.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const executionContextSchema = z.object({
|
||||
diachron_root: z.string(),
|
||||
});
|
||||
|
||||
export type ExecutionContext = z.infer<typeof executionContextSchema>;
|
||||
|
||||
export function parseExecutionContext(env: Record<string, string | undefined>): ExecutionContext {
|
||||
return executionContextSchema.parse(env);
|
||||
}
|
||||
Reference in New Issue
Block a user