@rebasepro/studio 0.9.1-canary.f2f61da → 0.9.1-canary.faee831

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { PostgresPolicy } from "./RLSEditor";
2
+ import type { PostgresPolicy } from "./RLSEditor";
3
3
  export interface PolicyEditorProps {
4
4
  policy?: PostgresPolicy;
5
5
  schema: string;
@@ -1,12 +1,4 @@
1
1
  import React from "react";
2
- export interface SQLEditorColumnInfo {
3
- name: string;
4
- dataType: string;
5
- isPrimaryKey: boolean;
6
- }
7
- export interface TableInfo {
8
- schemaName: string;
9
- tableName: string;
10
- columns: SQLEditorColumnInfo[];
11
- }
2
+ import type { SQLEditorColumnInfo, TableInfo } from "./sql_editor_types";
3
+ export type { SQLEditorColumnInfo, TableInfo };
12
4
  export declare const SQLEditor: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { TableInfo } from "./SQLEditor";
2
+ import type { TableInfo } from "./sql_editor_types";
3
3
  export interface Snippet {
4
4
  id: string;
5
5
  name: string;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { TableInfo } from "./SQLEditor";
2
+ import type { TableInfo } from "./sql_editor_types";
3
3
  export declare const SchemaBrowser: ({ onTableClick, schemas, isSchemaLoading, schemaError, onRetrySchema }: {
4
4
  onTableClick?: (tableName: string) => void;
5
5
  schemas: Record<string, TableInfo[]>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Shapes describing the introspected schema the SQL editor works against.
3
+ * They live here rather than in SQLEditor.tsx because the sidebar, the schema
4
+ * browser and utils/sql_utils all need them, and importing them from the
5
+ * component would close a cycle back through it.
6
+ */
7
+ export interface SQLEditorColumnInfo {
8
+ name: string;
9
+ dataType: string;
10
+ isPrimaryKey: boolean;
11
+ }
12
+ export interface TableInfo {
13
+ schemaName: string;
14
+ tableName: string;
15
+ columns: SQLEditorColumnInfo[];
16
+ }
@@ -1,4 +1,4 @@
1
- import { TableInfo } from "../components/SQLEditor/SQLEditor";
1
+ import type { TableInfo } from "../components/SQLEditor/sql_editor_types";
2
2
  import { CollectionConfig } from "@rebasepro/types";
3
3
  /**
4
4
  * A table extracted from a SQL query's FROM/JOIN clauses.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebasepro/studio",
3
3
  "type": "module",
4
- "version": "0.9.1-canary.f2f61da",
4
+ "version": "0.9.1-canary.faee831",
5
5
  "main": "./dist/index.es.js",
6
6
  "module": "./dist/index.es.js",
7
7
  "types": "./dist/index.d.ts",
@@ -15,19 +15,19 @@
15
15
  "pgsql-ast-parser": "12.0.2",
16
16
  "prism-react-renderer": "^2.4.1",
17
17
  "react-dropzone": "^15.0.0",
18
- "@rebasepro/common": "0.9.1-canary.f2f61da",
19
- "@rebasepro/app": "0.9.1-canary.f2f61da",
20
- "@rebasepro/client": "0.9.1-canary.f2f61da",
21
- "@rebasepro/types": "0.9.1-canary.f2f61da",
22
- "@rebasepro/ui": "0.9.1-canary.f2f61da",
23
- "@rebasepro/utils": "0.9.1-canary.f2f61da"
18
+ "@rebasepro/client": "0.9.1-canary.faee831",
19
+ "@rebasepro/common": "0.9.1-canary.faee831",
20
+ "@rebasepro/app": "0.9.1-canary.faee831",
21
+ "@rebasepro/types": "0.9.1-canary.faee831",
22
+ "@rebasepro/ui": "0.9.1-canary.faee831",
23
+ "@rebasepro/utils": "0.9.1-canary.faee831"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": ">=19.0.0",
27
27
  "react-dom": ">=19.0.0",
28
28
  "react-router": "^7.0.0",
29
29
  "react-router-dom": "^7.0.0",
30
- "@rebasepro/admin": "0.9.1-canary.f2f61da"
30
+ "@rebasepro/admin": "0.9.1-canary.faee831"
31
31
  },
32
32
  "peerDependenciesMeta": {
33
33
  "@rebasepro/admin": {
@@ -56,6 +56,8 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@jest/globals": "^30.4.1",
59
+ "@testing-library/jest-dom": "^6.9.1",
60
+ "@testing-library/react": "^16.3.2",
59
61
  "@types/jest": "^30.0.0",
60
62
  "@types/node": "^25.9.3",
61
63
  "@types/react": "^19.2.17",
@@ -21,7 +21,7 @@ import {
21
21
  } from "@rebasepro/ui";
22
22
  import { useTranslation } from "@rebasepro/app";
23
23
  import { MonacoEditor } from "../SQLEditor/MonacoEditor";
24
- import { PostgresPolicy } from "./RLSEditor";
24
+ import type { PostgresPolicy } from "./RLSEditor";
25
25
 
26
26
  export interface PolicyEditorProps {
27
27
  policy?: PostgresPolicy;
@@ -49,17 +49,9 @@ import { parseFirst } from "pgsql-ast-parser";
49
49
  import { determineTableAndPK, resolveQueryCollections, ResolvedQueryCollection } from "../../utils/sql_utils";
50
50
  import { ExplainVisualizer } from "./ExplainVisualizer";
51
51
 
52
- export interface SQLEditorColumnInfo {
53
- name: string;
54
- dataType: string;
55
- isPrimaryKey: boolean;
56
- }
57
-
58
- export interface TableInfo {
59
- schemaName: string;
60
- tableName: string;
61
- columns: SQLEditorColumnInfo[];
62
- }
52
+ import type { SQLEditorColumnInfo, TableInfo } from "./sql_editor_types";
53
+
54
+ export type { SQLEditorColumnInfo, TableInfo };
63
55
 
64
56
  const QueryLoadingView = () => {
65
57
  const [elapsed, setElapsed] = useState(0);
@@ -3,7 +3,7 @@ import React, { useState } from "react";
3
3
  import { cls, defaultBorderMixin, IconButton, iconSize, Tab, Tabs, Trash2Icon, Typography } from "@rebasepro/ui";
4
4
  import { useTranslation } from "@rebasepro/app";
5
5
  import { SchemaBrowser } from "./SchemaBrowser";
6
- import { TableInfo } from "./SQLEditor";
6
+ import type { TableInfo } from "./sql_editor_types";
7
7
 
8
8
  export interface Snippet {
9
9
  id: string;
@@ -14,7 +14,7 @@ import {
14
14
  RefreshCwIcon,
15
15
  Typography
16
16
  } from "@rebasepro/ui";
17
- import { TableInfo } from "./SQLEditor";
17
+ import type { TableInfo } from "./sql_editor_types";
18
18
  import { ErrorView, useTranslation } from "@rebasepro/app";
19
19
 
20
20
  export const SchemaBrowser = ({
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Shapes describing the introspected schema the SQL editor works against.
3
+ * They live here rather than in SQLEditor.tsx because the sidebar, the schema
4
+ * browser and utils/sql_utils all need them, and importing them from the
5
+ * component would close a cycle back through it.
6
+ */
7
+
8
+ export interface SQLEditorColumnInfo {
9
+ name: string;
10
+ dataType: string;
11
+ isPrimaryKey: boolean;
12
+ }
13
+
14
+ export interface TableInfo {
15
+ schemaName: string;
16
+ tableName: string;
17
+ columns: SQLEditorColumnInfo[];
18
+ }
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { describe, it, expect } from "@jest/globals";
3
3
  import { determineTableAndPK, extractTablesFromQuery, resolveQueryCollections } from "./sql_utils";
4
- import { TableInfo } from "../components/SQLEditor/SQLEditor";
4
+ import type { TableInfo } from "../components/SQLEditor/sql_editor_types";
5
5
  import { CollectionConfig } from "@rebasepro/types";
6
6
 
7
7
  const mockSchemas: Record<string, TableInfo[]> = {
@@ -1,5 +1,5 @@
1
1
  import { parseFirst } from "pgsql-ast-parser";
2
- import { TableInfo } from "../components/SQLEditor/SQLEditor";
2
+ import type { TableInfo } from "../components/SQLEditor/sql_editor_types";
3
3
  import { CollectionConfig } from "@rebasepro/types";
4
4
 
5
5
  /**