@514labs/moose-lib 0.6.249 → 0.6.251

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.
@@ -508,6 +508,9 @@ function createMaterializedView(options) {
508
508
  AS ${options.select}`.trim();
509
509
  }
510
510
 
511
+ // src/dmv2/internal.ts
512
+ import process2 from "process";
513
+
511
514
  // src/index.ts
512
515
  init_commons();
513
516
 
@@ -550,6 +553,7 @@ var DEFAULT_CSV_CONFIG = {
550
553
 
551
554
  // src/dmv2/internal.ts
552
555
  init_commons();
556
+ var isClientOnlyMode = () => process2.env.MOOSE_CLIENT_ONLY === "true";
553
557
  var moose_internal = {
554
558
  tables: /* @__PURE__ */ new Map(),
555
559
  streams: /* @__PURE__ */ new Map(),
@@ -718,7 +722,7 @@ var OlapTable = class extends TypedBase {
718
722
  this.name = name;
719
723
  const tables = getMooseInternal().tables;
720
724
  const registryKey = this.config.version ? `${name}_${this.config.version}` : name;
721
- if (tables.has(registryKey)) {
725
+ if (!isClientOnlyMode() && tables.has(registryKey)) {
722
726
  throw new Error(
723
727
  `OlapTable with name ${name} and version ${config?.version ?? "unversioned"} already exists`
724
728
  );
@@ -2200,7 +2204,7 @@ var SqlResource = class {
2200
2204
  */
2201
2205
  constructor(name, setup, teardown, options) {
2202
2206
  const sqlResources = getMooseInternal().sqlResources;
2203
- if (sqlResources.has(name)) {
2207
+ if (!isClientOnlyMode() && sqlResources.has(name)) {
2204
2208
  throw new Error(`SqlResource with name ${name} already exists`);
2205
2209
  }
2206
2210
  sqlResources.set(name, this);