mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 00:26:01 +00:00
changed tb imports
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { Const, type Static, StringRecord, Type, transformObject } from "core/utils";
|
||||
import { Const, type Static, StringRecord, transformObject } from "core/utils";
|
||||
import { TaskMap, TriggerMap } from "flows";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
const { Type } = tbbox;
|
||||
|
||||
export const TASKS = {
|
||||
...TaskMap,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { EventManager } from "core/events";
|
||||
import { Type } from "core/utils";
|
||||
import type { Flow } from "../Flow";
|
||||
import { Trigger } from "./Trigger";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
const { Type } = tbbox;
|
||||
|
||||
export class EventTrigger extends Trigger<typeof EventTrigger.schema> {
|
||||
override type = "event";
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { StringEnum, Type } from "core/utils";
|
||||
import { StringEnum } from "core/utils";
|
||||
import type { Context, Hono } from "hono";
|
||||
import type { Flow } from "../Flow";
|
||||
import { Trigger } from "./Trigger";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
const { Type } = tbbox;
|
||||
|
||||
const httpMethods = ["GET", "POST", "PUT", "PATCH", "DELETE"] as const;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { type Static, StringEnum, Type, parse } from "core/utils";
|
||||
import { type Static, StringEnum, parse } from "core/utils";
|
||||
import type { Execution } from "../Execution";
|
||||
import type { Flow } from "../Flow";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
const { Type } = tbbox;
|
||||
|
||||
export class Trigger<Schema extends typeof Trigger.schema = typeof Trigger.schema> {
|
||||
// @todo: remove this
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { StaticDecode, TSchema } from "@sinclair/typebox";
|
||||
import type { NodeProps } from "@xyflow/react";
|
||||
import { BkndError, SimpleRenderer } from "core";
|
||||
import { type Static, type TObject, Type, Value, parse, ucFirst } from "core/utils";
|
||||
import type { ExecutionEvent, InputsMap } from "../flows/Execution";
|
||||
import { type Static, type TObject, Value, parse, ucFirst } from "core/utils";
|
||||
import type { InputsMap } from "../flows/Execution";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
const { Type } = tbbox;
|
||||
//type InstanceOf<T> = T extends new (...args: any) => infer R ? R : never;
|
||||
|
||||
export type TaskResult<Output = any> = {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { StringEnum, Type } from "core/utils";
|
||||
import type { InputsMap } from "../../flows/Execution";
|
||||
import { StringEnum } from "core/utils";
|
||||
import { Task, dynamic } from "../Task";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
const { Type } = tbbox;
|
||||
|
||||
const FetchMethods = ["GET", "POST", "PUT", "PATCH", "DELETE"];
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Type } from "core/utils";
|
||||
import { Task } from "../Task";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
const { Type } = tbbox;
|
||||
|
||||
export class LogTask extends Task<typeof LogTask.schema> {
|
||||
type = "log";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Type } from "core/utils";
|
||||
import { Task } from "../Task";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
const { Type } = tbbox;
|
||||
|
||||
export class RenderTask<Output extends Record<string, any>> extends Task<
|
||||
typeof RenderTask.schema,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Type } from "core/utils";
|
||||
import { Flow } from "../../flows/Flow";
|
||||
import { Task, dynamic } from "../Task";
|
||||
import * as tbbox from "@sinclair/typebox";
|
||||
const { Type } = tbbox;
|
||||
|
||||
export class SubFlowTask<Output extends Record<string, any>> extends Task<
|
||||
typeof SubFlowTask.schema,
|
||||
|
||||
Reference in New Issue
Block a user