Skip to content

Commit e5f466f

Browse files
Copilothotlong
andcommitted
Fix CI: Update type definitions to use DriverInterface from @objectstack/spec
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 0dfe1f2 commit e5f466f

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

packages/foundation/types/src/app.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@
77
*/
88

99
import { ObjectConfig } from "./object";
10-
import { Driver } from "./driver";
1110
import { MetadataRegistry } from "./registry";
1211
import { HookName, HookHandler, HookContext } from "./hook";
1312
import { ActionHandler, ActionContext } from "./action";
1413
import { LoaderPlugin } from "./loader";
14+
// Import DriverInterface from @objectstack/spec
15+
import type { DriverInterface } from "@objectstack/spec";
1516

1617
export interface IObjectQL {
1718
getObject(name: string): ObjectConfig | undefined;
1819
getConfigs(): Record<string, ObjectConfig>;
19-
datasource(name: string): Driver;
20+
datasource(name: string): DriverInterface;
2021
init(): Promise<void>;
2122
close?(): Promise<void>;
2223
removePackage(name: string): void;

packages/foundation/types/src/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
import { MetadataRegistry } from "./registry";
1010
import { ObjectConfig } from "./object";
1111
import { ObjectQLPlugin } from "./plugin";
12-
// Import Driver from local types package
13-
import type { Driver } from "./driver";
12+
// Import DriverInterface from @objectstack/spec
13+
import type { DriverInterface } from "@objectstack/spec";
1414

1515
export interface ObjectQLConfig {
1616
registry?: MetadataRegistry;
17-
datasources?: Record<string, Driver>;
17+
datasources?: Record<string, DriverInterface>;
1818
/**
1919
* Optional connection string for auto-configuration.
2020
* e.g. "sqlite://dev.db", "postgres://localhost/db", "mongodb://localhost/db"

0 commit comments

Comments
 (0)