@malloy-publisher/server 0.0.123 → 0.0.124

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.
@@ -40,9 +40,7 @@ export class ConnectionController {
40
40
  if (connection.type === "duckdb") {
41
41
  const packages = await project.listPackages();
42
42
  if (packages.length === 0) {
43
- throw new ConnectionError(
44
- "No packages found for DuckDB connection",
45
- );
43
+ return project.getMalloyConnection(connectionName);
46
44
  }
47
45
  // For now, use the first package's DuckDB connection
48
46
  const packageName = packages[0].name;
@@ -165,6 +163,7 @@ export class ConnectionController {
165
163
  return {
166
164
  resource: tablePath,
167
165
  columns: tableSource.columns,
166
+ source: tableSource.source,
168
167
  };
169
168
  }
170
169
 
@@ -301,6 +301,7 @@ async function attachPostgres(
301
301
  if (config.databaseName) parts.push(`dbname=${config.databaseName}`);
302
302
  if (config.userName) parts.push(`user=${config.userName}`);
303
303
  if (config.password) parts.push(`password=${config.password}`);
304
+ if (process.env.PGSSLMODE === "no-verify") parts.push(`sslmode=disable`);
304
305
  attachString = parts.join(" ");
305
306
  }
306
307
 
@@ -80,11 +80,20 @@ export async function getSchemasForConnection(
80
80
  const bigquery = createBigQueryClient(connection);
81
81
  const [datasets] = await bigquery.getDatasets();
82
82
 
83
- return datasets.map((dataset) => ({
84
- name: dataset.id,
85
- isHidden: false,
86
- isDefault: false,
87
- }));
83
+ const schemas = await Promise.all(
84
+ datasets.map(async (dataset) => {
85
+ const [metadata] = await dataset.getMetadata();
86
+ return {
87
+ name: dataset.id,
88
+ isHidden: false,
89
+ isDefault: false,
90
+ // Include description from dataset metadata if available
91
+ description: (metadata as { description?: string })
92
+ ?.description,
93
+ };
94
+ }),
95
+ );
96
+ return schemas;
88
97
  } catch (error) {
89
98
  console.error(
90
99
  `Error getting schemas for BigQuery connection ${connection.name}:`,