@514labs/moose-lib 0.6.295-ci-3-g6e0c461e → 0.6.295-ci-17-g70d560ac

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.
@@ -1175,7 +1175,9 @@ var moose_internal = {
1175
1175
  apis: /* @__PURE__ */ new Map(),
1176
1176
  sqlResources: /* @__PURE__ */ new Map(),
1177
1177
  workflows: /* @__PURE__ */ new Map(),
1178
- webApps: /* @__PURE__ */ new Map()
1178
+ webApps: /* @__PURE__ */ new Map(),
1179
+ materializedViews: /* @__PURE__ */ new Map(),
1180
+ customViews: /* @__PURE__ */ new Map()
1179
1181
  };
1180
1182
  var defaultRetentionPeriod = 60 * 60 * 24 * 7;
1181
1183
  function isS3QueueConfig(config) {
@@ -1422,6 +1424,8 @@ var toInfraMap = (registry) => {
1422
1424
  const sqlResources = {};
1423
1425
  const workflows = {};
1424
1426
  const webApps = {};
1427
+ const materializedViews = {};
1428
+ const customViews = {};
1425
1429
  registry.tables.forEach((table) => {
1426
1430
  const id = table.config.version ? `${table.name}_${table.config.version}` : table.name;
1427
1431
  let metadata = table.metadata;
@@ -1475,12 +1479,6 @@ var toInfraMap = (registry) => {
1475
1479
  granularity: i.granularity === void 0 ? 1 : i.granularity,
1476
1480
  arguments: i.arguments === void 0 ? [] : i.arguments
1477
1481
  })) || [],
1478
- projections: table.config.projections?.map((p) => ({
1479
- name: p.name,
1480
- select: p.select,
1481
- ..."orderBy" in p && p.orderBy !== void 0 ? { orderBy: p.orderBy } : {},
1482
- ..."groupBy" in p && p.groupBy !== void 0 ? { groupBy: p.groupBy } : {}
1483
- })) || [],
1484
1482
  ttl: table.config.ttl,
1485
1483
  database: table.config.database,
1486
1484
  cluster: table.config.cluster
@@ -1618,6 +1616,24 @@ var toInfraMap = (registry) => {
1618
1616
  metadata: webApp.config.metadata
1619
1617
  };
1620
1618
  });
1619
+ registry.materializedViews.forEach((mv) => {
1620
+ materializedViews[mv.name] = {
1621
+ name: mv.name,
1622
+ selectSql: mv.selectSql,
1623
+ sourceTables: mv.sourceTables,
1624
+ targetTable: mv.targetTable.name,
1625
+ targetDatabase: mv.targetTable.config.database,
1626
+ sourceFile: mv.sourceFile
1627
+ };
1628
+ });
1629
+ registry.customViews.forEach((view) => {
1630
+ customViews[view.name] = {
1631
+ name: view.name,
1632
+ selectSql: view.selectSql,
1633
+ sourceTables: view.sourceTables,
1634
+ sourceFile: view.sourceFile
1635
+ };
1636
+ });
1621
1637
  return {
1622
1638
  topics,
1623
1639
  tables,
@@ -1625,7 +1641,9 @@ var toInfraMap = (registry) => {
1625
1641
  apis,
1626
1642
  sqlResources,
1627
1643
  workflows,
1628
- webApps
1644
+ webApps,
1645
+ materializedViews,
1646
+ customViews
1629
1647
  };
1630
1648
  };
1631
1649
  var getMooseInternal = () => globalThis.moose_internal;
@@ -1649,6 +1667,8 @@ var loadIndex = () => {
1649
1667
  registry.sqlResources.clear();
1650
1668
  registry.workflows.clear();
1651
1669
  registry.webApps.clear();
1670
+ registry.materializedViews.clear();
1671
+ registry.customViews.clear();
1652
1672
  const appDir = `${import_process.default.cwd()}/${getSourceDir()}`;
1653
1673
  Object.keys(require.cache).forEach((key) => {
1654
1674
  if (key.startsWith(appDir)) {