Skip to content

Commit

Permalink
fixing monorepo deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Apr 16, 2024
1 parent c8d830f commit 6fe5d92
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 17 deletions.
5 changes: 5 additions & 0 deletions gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./driver": {
"types": "./dist/driver.d.ts",
"import": "./dist/driver.js",
"require": "./dist/driver.cjs"
},
"./css": "./dist/index.css"
},
"scripts": {
Expand Down
9 changes: 9 additions & 0 deletions gui/src/driver.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export * from "./drivers/base-driver";
export { CollaborationDriver } from "./drivers/collaboration-driver";
export { SqliteLikeBaseDriver } from "./drivers/sqlite-base-driver";
export {
convertSqliteType,
escapeIdentity,
escapeSqlValue,
} from "./sqlite/sql-helper";
export { default as parseSafeJson } from "./lib/json-safe";
9 changes: 0 additions & 9 deletions gui/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
export { Studio } from "./studio";
export * from "./drivers/base-driver";
export { CollaborationDriver } from "./drivers/collaboration-driver";
export { SqliteLikeBaseDriver } from "./drivers/sqlite-base-driver";
export {
convertSqliteType,
escapeIdentity,
escapeSqlValue,
} from "./sqlite/sql-helper";
export { default as parseSafeJson } from "./lib/json-safe";
2 changes: 1 addition & 1 deletion gui/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from "tsup";

export default defineConfig((opts) => ({
entry: ["src/index.tsx"],
entry: ["src/index.tsx", "src/driver.ts"],
format: ["esm", "cjs"],
splitting: true,
sourcemap: true,
Expand Down
1 change: 1 addition & 0 deletions studio/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const nextConfig = {
experimental: {
turbo: {
resolveAlias: {
"@libsqlstudio/gui/driver": "../gui/src/driver.ts",
"@libsqlstudio/gui": "../gui/src/index.tsx",
},
},
Expand Down
2 changes: 1 addition & 1 deletion studio/src/drivers/collaboration-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ApiUserListResponse,
ApiUserRole,
} from "@studio/lib/api/api-database-response";
import { CollaborationDriver } from "@libsqlstudio/gui";
import { CollaborationDriver } from "@libsqlstudio/gui/driver";

export default class Collaborator implements CollaborationDriver {
protected id: string = "";
Expand Down
2 changes: 1 addition & 1 deletion studio/src/drivers/remote-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DatabaseTableSchema,
DatabaseTriggerSchema,
SelectFromTableOptions,
} from "@libsqlstudio/gui";
} from "@libsqlstudio/gui/driver";
import {
ApiOpsBatchResponse,
ApiOpsQueryResponse,
Expand Down
2 changes: 1 addition & 1 deletion studio/src/drivers/rqlite-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
DatabaseResultSet,
DatabaseRow,
convertSqliteType,
} from "@libsqlstudio/gui";
} from "@libsqlstudio/gui/driver";

interface RqliteResult {
columns?: string[];
Expand Down
2 changes: 1 addition & 1 deletion studio/src/drivers/turso-driver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
DatabaseResultSet,
DatabaseRow,
convertSqliteType,
} from "@libsqlstudio/gui";
} from "@libsqlstudio/gui/driver";

export function transformRawResult(raw: ResultSet): DatabaseResultSet {
const headerSet = new Set();
Expand Down
5 changes: 4 additions & 1 deletion studio/src/drivers/valtown-driver.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { InStatement, ResultSet } from "@libsql/client";
import { transformRawResult } from "./turso-driver";
import { DatabaseResultSet, SqliteLikeBaseDriver } from "@libsqlstudio/gui";
import {
DatabaseResultSet,
SqliteLikeBaseDriver,
} from "@libsqlstudio/gui/driver";

export default class ValtownDriver extends SqliteLikeBaseDriver {
protected token: string;
Expand Down
2 changes: 1 addition & 1 deletion studio/src/lib/api-response-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
DatabaseSchemaItem,
DatabaseTableSchema,
DatabaseTriggerSchema,
} from "@libsqlstudio/gui";
} from "@libsqlstudio/gui/driver";

export interface ApiOpsBatchResponse {
error?: string;
Expand Down
2 changes: 1 addition & 1 deletion studio/src/lib/api/api-request-types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
DatabaseTableOperation,
SelectFromTableOptions,
} from "@libsqlstudio/gui";
} from "@libsqlstudio/gui/driver";
import { InStatement } from "@libsql/client/web";

export interface RequestOperationBatch {
Expand Down

0 comments on commit 6fe5d92

Please sign in to comment.