diff --git a/packages/typefusion/src/helpers.ts b/packages/typefusion/src/helpers.ts index 81f0835..4ae86ba 100644 --- a/packages/typefusion/src/helpers.ts +++ b/packages/typefusion/src/helpers.ts @@ -3,7 +3,7 @@ import { SkottNode } from "skott/graph/node"; import { dbInsert } from "./store.js"; import { PgLiveEffect } from "./db/postgres/client.js"; import { MySqlLiveEffect } from "./db/mysql/client.js"; -import { TypefusionScriptExport } from "./types.js"; +import { TypefusionScript } from "./types.js"; /** * Traverses a dependency graph and returns an array of execution levels. @@ -65,7 +65,7 @@ export function runTypefusionScript(leaf: string) { const moduleDefault = yield* Effect.tryPromise({ try: async () => - import(path).then((module) => module.default as TypefusionScriptExport), + import(path).then((module) => (module as TypefusionScript).default), catch: (error) => new ModuleImportError({ cause: error, diff --git a/packages/typefusion/src/index.ts b/packages/typefusion/src/index.ts index 33582bc..909bec3 100644 --- a/packages/typefusion/src/index.ts +++ b/packages/typefusion/src/index.ts @@ -14,7 +14,7 @@ export { typefusionRef, typefusionRefTableName } from "./lib.js"; export { UnsupportedJSTypeDbConversionError } from "./db/common/service.js"; export { - TypefusionDbResult as TypefusionDbResult, + TypefusionDbResult, TypefusionResult, TypefusionResultDataOnly, TypefusionResultUnknown, @@ -29,6 +29,11 @@ export * from "./db/postgres/types.js"; export * from "./db/mysql/types.js"; +export { + TypefusionSupportedDatabases, + TypefusionScriptExport, +} from "./types.js"; + export const typefusion = (config: TypefusionConfig) => typefusionEffect(config).pipe(Effect.runPromise);