@malloy-publisher/server 0.0.197-dev → 0.0.198-dev

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/src/server.ts CHANGED
@@ -36,6 +36,7 @@ import { logger, loggerMiddleware } from "./logger";
36
36
  import { ManifestController } from "./controller/manifest.controller";
37
37
  import { MaterializationController } from "./controller/materialization.controller";
38
38
  import { initializeMcpServer } from "./mcp/server";
39
+ import { registerLegacyRoutes } from "./server-old";
39
40
  import { EnvironmentStore } from "./service/environment_store";
40
41
  import { ManifestService } from "./service/manifest_service";
41
42
  import { MaterializationService } from "./service/materialization_service";
@@ -1364,6 +1365,21 @@ app.post(
1364
1365
  },
1365
1366
  );
1366
1367
 
1368
+ // Register legacy `/projects/...` routes for backwards compatibility with
1369
+ // clients that haven't migrated to `/environments/...` yet. Must be added
1370
+ // before the SPA catch-all below.
1371
+ registerLegacyRoutes(app, {
1372
+ environmentStore,
1373
+ connectionController,
1374
+ modelController,
1375
+ packageController,
1376
+ databaseController,
1377
+ queryController,
1378
+ compileController,
1379
+ materializationController,
1380
+ manifestController,
1381
+ });
1382
+
1367
1383
  // Modify the catch-all route to only serve index.html in production
1368
1384
  if (!isDevelopment) {
1369
1385
  app.get("*", (_req, res) => res.sendFile(path.resolve(ROOT, "index.html")));