@malloy-publisher/server 0.0.131 → 0.0.132
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 +1 -1
- package/dist/server.js +24 -1
- package/package.json +1 -1
- package/src/server.ts +9 -1
- package/src/service/package.ts +24 -0
package/dist/app/api-doc.yaml
CHANGED
|
@@ -1085,7 +1085,7 @@ paths:
|
|
|
1085
1085
|
description: Name of the package
|
|
1086
1086
|
required: true
|
|
1087
1087
|
schema:
|
|
1088
|
-
$ref: "#/components/schemas/
|
|
1088
|
+
$ref: "#/components/schemas/VersionIdPattern"
|
|
1089
1089
|
- name: path
|
|
1090
1090
|
in: path
|
|
1091
1091
|
description: Path to the model within the package
|
package/dist/server.js
CHANGED
|
@@ -139345,6 +139345,23 @@ class Package {
|
|
|
139345
139345
|
duration: modelsTime - databasesTime,
|
|
139346
139346
|
unit: "ms"
|
|
139347
139347
|
});
|
|
139348
|
+
for (const [modelPath, model] of models.entries()) {
|
|
139349
|
+
const maybeModel = model;
|
|
139350
|
+
if (maybeModel.compilationError) {
|
|
139351
|
+
const err = maybeModel.compilationError;
|
|
139352
|
+
const message = err instanceof Error ? err.message : `Unknown compilation error in ${modelPath}`;
|
|
139353
|
+
logger2.error("Model compilation failed", {
|
|
139354
|
+
packageName,
|
|
139355
|
+
modelPath,
|
|
139356
|
+
error: message
|
|
139357
|
+
});
|
|
139358
|
+
this.packageLoadHistogram.record(performance.now() - startTime, {
|
|
139359
|
+
malloy_package_name: packageName,
|
|
139360
|
+
status: "compilation_error"
|
|
139361
|
+
});
|
|
139362
|
+
throw err;
|
|
139363
|
+
}
|
|
139364
|
+
}
|
|
139348
139365
|
const endTime = performance.now();
|
|
139349
139366
|
const executionTime = endTime - startTime;
|
|
139350
139367
|
this.packageLoadHistogram.record(executionTime, {
|
|
@@ -144690,6 +144707,9 @@ app.use((err, _req, res, _next) => {
|
|
|
144690
144707
|
res.status(status).json(json2);
|
|
144691
144708
|
});
|
|
144692
144709
|
var mainServer = http2.createServer(app);
|
|
144710
|
+
mainServer.timeout = 600000;
|
|
144711
|
+
mainServer.keepAliveTimeout = 600000;
|
|
144712
|
+
mainServer.headersTimeout = 600000;
|
|
144693
144713
|
mainServer.listen(PUBLISHER_PORT, PUBLISHER_HOST, () => {
|
|
144694
144714
|
const address = mainServer.address();
|
|
144695
144715
|
logger2.info(`Publisher server listening at http://${address.address}:${address.port}`);
|
|
@@ -144697,6 +144717,9 @@ mainServer.listen(PUBLISHER_PORT, PUBLISHER_HOST, () => {
|
|
|
144697
144717
|
logger2.info("Running in development mode - proxying to React dev server at http://localhost:5173");
|
|
144698
144718
|
}
|
|
144699
144719
|
});
|
|
144700
|
-
mcpApp.listen(MCP_PORT, PUBLISHER_HOST, () => {
|
|
144720
|
+
var mcpServer = mcpApp.listen(MCP_PORT, PUBLISHER_HOST, () => {
|
|
144701
144721
|
logger2.info(`MCP server listening at http://${PUBLISHER_HOST}:${MCP_PORT}`);
|
|
144702
144722
|
});
|
|
144723
|
+
mcpServer.timeout = 600000;
|
|
144724
|
+
mcpServer.keepAliveTimeout = 600000;
|
|
144725
|
+
mcpServer.headersTimeout = 600000;
|
package/package.json
CHANGED
package/src/server.ts
CHANGED
|
@@ -788,6 +788,10 @@ app.use(
|
|
|
788
788
|
|
|
789
789
|
const mainServer = http.createServer(app);
|
|
790
790
|
|
|
791
|
+
mainServer.timeout = 600000;
|
|
792
|
+
mainServer.keepAliveTimeout = 600000;
|
|
793
|
+
mainServer.headersTimeout = 600000;
|
|
794
|
+
|
|
791
795
|
mainServer.listen(PUBLISHER_PORT, PUBLISHER_HOST, () => {
|
|
792
796
|
const address = mainServer.address() as AddressInfo;
|
|
793
797
|
logger.info(
|
|
@@ -799,6 +803,10 @@ mainServer.listen(PUBLISHER_PORT, PUBLISHER_HOST, () => {
|
|
|
799
803
|
);
|
|
800
804
|
}
|
|
801
805
|
});
|
|
802
|
-
mcpApp.listen(MCP_PORT, PUBLISHER_HOST, () => {
|
|
806
|
+
const mcpServer = mcpApp.listen(MCP_PORT, PUBLISHER_HOST, () => {
|
|
803
807
|
logger.info(`MCP server listening at http://${PUBLISHER_HOST}:${MCP_PORT}`);
|
|
804
808
|
});
|
|
809
|
+
|
|
810
|
+
mcpServer.timeout = 600000;
|
|
811
|
+
mcpServer.keepAliveTimeout = 600000;
|
|
812
|
+
mcpServer.headersTimeout = 600000;
|
package/src/service/package.ts
CHANGED
|
@@ -122,6 +122,30 @@ export class Package {
|
|
|
122
122
|
duration: modelsTime - databasesTime,
|
|
123
123
|
unit: "ms",
|
|
124
124
|
});
|
|
125
|
+
for (const [modelPath, model] of models.entries()) {
|
|
126
|
+
const maybeModel = model as unknown as {
|
|
127
|
+
compilationError?: unknown;
|
|
128
|
+
};
|
|
129
|
+
if (maybeModel.compilationError) {
|
|
130
|
+
const err = maybeModel.compilationError;
|
|
131
|
+
const message =
|
|
132
|
+
err instanceof Error
|
|
133
|
+
? err.message
|
|
134
|
+
: `Unknown compilation error in ${modelPath}`;
|
|
135
|
+
|
|
136
|
+
logger.error("Model compilation failed", {
|
|
137
|
+
packageName,
|
|
138
|
+
modelPath,
|
|
139
|
+
error: message,
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
this.packageLoadHistogram.record(performance.now() - startTime, {
|
|
143
|
+
malloy_package_name: packageName,
|
|
144
|
+
status: "compilation_error",
|
|
145
|
+
});
|
|
146
|
+
throw err;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
125
149
|
const endTime = performance.now();
|
|
126
150
|
const executionTime = endTime - startTime;
|
|
127
151
|
this.packageLoadHistogram.record(executionTime, {
|