@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.
- package/dist/browserCompatible.js +6 -2
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +6 -2
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/dmv2/index.js +6 -2
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +6 -2
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
package/dist/dmv2/index.mjs
CHANGED
|
@@ -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);
|