@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.
- package/dist/app/api-doc.yaml +5 -2
- package/dist/app/assets/{HomePage-DXKA9tWd.js → HomePage-zgjLbpTO.js} +1 -1
- package/dist/app/assets/{MainPage-BdYxYmkS.js → MainPage-BD2RiQ6H.js} +1 -1
- package/dist/app/assets/{ModelPage-mQttYUXZ.js → ModelPage-BqzWWLvj.js} +1 -1
- package/dist/app/assets/{PackagePage-8dgNIkwK.js → PackagePage-C-JViRAf.js} +1 -1
- package/dist/app/assets/{ProjectPage-D3lTBcOF.js → ProjectPage-CLlZgxV2.js} +1 -1
- package/dist/app/assets/{RouteError-B1FrgvdL.js → RouteError-Bf0xYlO6.js} +1 -1
- package/dist/app/assets/{WorkbookPage-uhPZOv8J.js → WorkbookPage-C7AyEw5d.js} +1 -1
- package/dist/app/assets/{index-2wN22fP5.js → index-5F3gtdSl.js} +1 -1
- package/dist/app/assets/{index-CfR2coZN.js → index-BUztoMie.js} +3 -3
- package/dist/app/assets/{index-DiPnMvhX.js → index-BWXd8Ctd.js} +1 -1
- package/dist/app/assets/{index.umd-DaPh4mA_.js → index.umd-PbB35uhR.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/server.js +14 -6
- package/package.json +1 -1
- package/src/controller/connection.controller.ts +2 -3
- package/src/service/connection.ts +1 -0
- package/src/service/db_utils.ts +14 -5
|
@@ -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
|
-
|
|
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
|
|
package/src/service/db_utils.ts
CHANGED
|
@@ -80,11 +80,20 @@ export async function getSchemasForConnection(
|
|
|
80
80
|
const bigquery = createBigQueryClient(connection);
|
|
81
81
|
const [datasets] = await bigquery.getDatasets();
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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}:`,
|