@514labs/moose-lib 0.6.292-ci-1-g35ea5fd7 → 0.6.293-ci-13-g92a04e8d

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.
@@ -1162,7 +1162,9 @@ var moose_internal = {
1162
1162
  apis: /* @__PURE__ */ new Map(),
1163
1163
  sqlResources: /* @__PURE__ */ new Map(),
1164
1164
  workflows: /* @__PURE__ */ new Map(),
1165
- webApps: /* @__PURE__ */ new Map()
1165
+ webApps: /* @__PURE__ */ new Map(),
1166
+ materializedViews: /* @__PURE__ */ new Map(),
1167
+ customViews: /* @__PURE__ */ new Map()
1166
1168
  };
1167
1169
  var defaultRetentionPeriod = 60 * 60 * 24 * 7;
1168
1170
  function isS3QueueConfig(config) {
@@ -1409,6 +1411,8 @@ var toInfraMap = (registry) => {
1409
1411
  const sqlResources = {};
1410
1412
  const workflows = {};
1411
1413
  const webApps = {};
1414
+ const materializedViews = {};
1415
+ const customViews = {};
1412
1416
  registry.tables.forEach((table) => {
1413
1417
  const id = table.config.version ? `${table.name}_${table.config.version}` : table.name;
1414
1418
  let metadata = table.metadata;
@@ -1462,12 +1466,6 @@ var toInfraMap = (registry) => {
1462
1466
  granularity: i.granularity === void 0 ? 1 : i.granularity,
1463
1467
  arguments: i.arguments === void 0 ? [] : i.arguments
1464
1468
  })) || [],
1465
- projections: table.config.projections?.map((p) => ({
1466
- name: p.name,
1467
- select: p.select,
1468
- ..."orderBy" in p && p.orderBy !== void 0 ? { orderBy: p.orderBy } : {},
1469
- ..."groupBy" in p && p.groupBy !== void 0 ? { groupBy: p.groupBy } : {}
1470
- })) || [],
1471
1469
  ttl: table.config.ttl,
1472
1470
  database: table.config.database,
1473
1471
  cluster: table.config.cluster
@@ -1605,6 +1603,24 @@ var toInfraMap = (registry) => {
1605
1603
  metadata: webApp.config.metadata
1606
1604
  };
1607
1605
  });
1606
+ registry.materializedViews.forEach((mv) => {
1607
+ materializedViews[mv.name] = {
1608
+ name: mv.name,
1609
+ selectSql: mv.selectSql,
1610
+ sourceTables: mv.sourceTables,
1611
+ targetTable: mv.targetTable.name,
1612
+ targetDatabase: mv.targetTable.config.database,
1613
+ sourceFile: mv.sourceFile
1614
+ };
1615
+ });
1616
+ registry.customViews.forEach((view) => {
1617
+ customViews[view.name] = {
1618
+ name: view.name,
1619
+ selectSql: view.selectSql,
1620
+ sourceTables: view.sourceTables,
1621
+ sourceFile: view.sourceFile
1622
+ };
1623
+ });
1608
1624
  return {
1609
1625
  topics,
1610
1626
  tables,
@@ -1612,7 +1628,9 @@ var toInfraMap = (registry) => {
1612
1628
  apis,
1613
1629
  sqlResources,
1614
1630
  workflows,
1615
- webApps
1631
+ webApps,
1632
+ materializedViews,
1633
+ customViews
1616
1634
  };
1617
1635
  };
1618
1636
  var getMooseInternal = () => globalThis.moose_internal;
@@ -1636,6 +1654,8 @@ var loadIndex = () => {
1636
1654
  registry.sqlResources.clear();
1637
1655
  registry.workflows.clear();
1638
1656
  registry.webApps.clear();
1657
+ registry.materializedViews.clear();
1658
+ registry.customViews.clear();
1639
1659
  const appDir = `${process2.cwd()}/${getSourceDir()}`;
1640
1660
  Object.keys(__require.cache).forEach((key) => {
1641
1661
  if (key.startsWith(appDir)) {
@@ -2757,7 +2777,9 @@ async function runScripts(config) {
2757
2777
  });
2758
2778
  const worker = await registerWorkflows(logger2, config);
2759
2779
  if (!worker) {
2760
- logger2.warn(`No workflows found`);
2780
+ logger2.warn(
2781
+ `No workflows found. To disable workflow infrastructure, set workflows=false in moose.config.toml`
2782
+ );
2761
2783
  process.exit(0);
2762
2784
  }
2763
2785
  let isShuttingDown = false;