@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.
@@ -603,6 +603,9 @@ function createMaterializedView(options) {
603
603
  AS ${options.select}`.trim();
604
604
  }
605
605
 
606
+ // src/dmv2/internal.ts
607
+ import process2 from "process";
608
+
606
609
  // src/index.ts
607
610
  init_commons();
608
611
 
@@ -645,6 +648,7 @@ var DEFAULT_CSV_CONFIG = {
645
648
 
646
649
  // src/dmv2/internal.ts
647
650
  init_commons();
651
+ var isClientOnlyMode = () => process2.env.MOOSE_CLIENT_ONLY === "true";
648
652
  var moose_internal = {
649
653
  tables: /* @__PURE__ */ new Map(),
650
654
  streams: /* @__PURE__ */ new Map(),
@@ -813,7 +817,7 @@ var OlapTable = class extends TypedBase {
813
817
  this.name = name;
814
818
  const tables = getMooseInternal().tables;
815
819
  const registryKey = this.config.version ? `${name}_${this.config.version}` : name;
816
- if (tables.has(registryKey)) {
820
+ if (!isClientOnlyMode() && tables.has(registryKey)) {
817
821
  throw new Error(
818
822
  `OlapTable with name ${name} and version ${config?.version ?? "unversioned"} already exists`
819
823
  );
@@ -2295,7 +2299,7 @@ var SqlResource = class {
2295
2299
  */
2296
2300
  constructor(name, setup, teardown, options) {
2297
2301
  const sqlResources = getMooseInternal().sqlResources;
2298
- if (sqlResources.has(name)) {
2302
+ if (!isClientOnlyMode() && sqlResources.has(name)) {
2299
2303
  throw new Error(`SqlResource with name ${name} already exists`);
2300
2304
  }
2301
2305
  sqlResources.set(name, this);