@514labs/moose-lib 0.6.250 → 0.6.252-ci-4-gb8a461bd

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/index.mjs CHANGED
@@ -613,6 +613,7 @@ var ClickHouseEngines = /* @__PURE__ */ ((ClickHouseEngines2) => {
613
613
  ClickHouseEngines2["Buffer"] = "Buffer";
614
614
  ClickHouseEngines2["Distributed"] = "Distributed";
615
615
  ClickHouseEngines2["IcebergS3"] = "IcebergS3";
616
+ ClickHouseEngines2["Kafka"] = "Kafka";
616
617
  ClickHouseEngines2["ReplicatedMergeTree"] = "ReplicatedMergeTree";
617
618
  ClickHouseEngines2["ReplicatedReplacingMergeTree"] = "ReplicatedReplacingMergeTree";
618
619
  ClickHouseEngines2["ReplicatedAggregatingMergeTree"] = "ReplicatedAggregatingMergeTree";
@@ -638,6 +639,7 @@ init_commons();
638
639
  function getSourceDir() {
639
640
  return process2.env.MOOSE_SOURCE_DIR || "app";
640
641
  }
642
+ var isClientOnlyMode = () => process2.env.MOOSE_CLIENT_ONLY === "true";
641
643
  var moose_internal = {
642
644
  tables: /* @__PURE__ */ new Map(),
643
645
  streams: /* @__PURE__ */ new Map(),
@@ -839,7 +841,7 @@ var OlapTable = class extends TypedBase {
839
841
  this.name = name;
840
842
  const tables = getMooseInternal().tables;
841
843
  const registryKey = this.config.version ? `${name}_${this.config.version}` : name;
842
- if (tables.has(registryKey)) {
844
+ if (!isClientOnlyMode() && tables.has(registryKey)) {
843
845
  throw new Error(
844
846
  `OlapTable with name ${name} and version ${config?.version ?? "unversioned"} already exists`
845
847
  );
@@ -2321,7 +2323,7 @@ var SqlResource = class {
2321
2323
  */
2322
2324
  constructor(name, setup, teardown, options) {
2323
2325
  const sqlResources = getMooseInternal().sqlResources;
2324
- if (sqlResources.has(name)) {
2326
+ if (!isClientOnlyMode() && sqlResources.has(name)) {
2325
2327
  throw new Error(`SqlResource with name ${name} already exists`);
2326
2328
  }
2327
2329
  sqlResources.set(name, this);