@514labs/moose-lib 0.6.250 → 0.6.252

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.
@@ -669,6 +669,9 @@ function createMaterializedView(options) {
669
669
  AS ${options.select}`.trim();
670
670
  }
671
671
 
672
+ // src/dmv2/internal.ts
673
+ var import_process = __toESM(require("process"));
674
+
672
675
  // src/index.ts
673
676
  init_commons();
674
677
 
@@ -708,6 +711,7 @@ var DEFAULT_CSV_CONFIG = {
708
711
 
709
712
  // src/dmv2/internal.ts
710
713
  init_commons();
714
+ var isClientOnlyMode = () => import_process.default.env.MOOSE_CLIENT_ONLY === "true";
711
715
  var moose_internal = {
712
716
  tables: /* @__PURE__ */ new Map(),
713
717
  streams: /* @__PURE__ */ new Map(),
@@ -876,7 +880,7 @@ var OlapTable = class extends TypedBase {
876
880
  this.name = name;
877
881
  const tables = getMooseInternal().tables;
878
882
  const registryKey = this.config.version ? `${name}_${this.config.version}` : name;
879
- if (tables.has(registryKey)) {
883
+ if (!isClientOnlyMode() && tables.has(registryKey)) {
880
884
  throw new Error(
881
885
  `OlapTable with name ${name} and version ${config?.version ?? "unversioned"} already exists`
882
886
  );
@@ -2358,7 +2362,7 @@ var SqlResource = class {
2358
2362
  */
2359
2363
  constructor(name, setup, teardown, options) {
2360
2364
  const sqlResources = getMooseInternal().sqlResources;
2361
- if (sqlResources.has(name)) {
2365
+ if (!isClientOnlyMode() && sqlResources.has(name)) {
2362
2366
  throw new Error(`SqlResource with name ${name} already exists`);
2363
2367
  }
2364
2368
  sqlResources.set(name, this);