@514labs/moose-lib 0.6.268-ci-2-g822d274c → 0.6.268-ci-1-g6460eddc

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.js CHANGED
@@ -789,7 +789,6 @@ function getSourceDir() {
789
789
  return import_process.default.env.MOOSE_SOURCE_DIR || "app";
790
790
  }
791
791
  var isClientOnlyMode = () => import_process.default.env.MOOSE_CLIENT_ONLY === "true";
792
- var isProductionMode = () => import_process.default.env.NODE_ENV === "production";
793
792
  var moose_internal = {
794
793
  tables: /* @__PURE__ */ new Map(),
795
794
  streams: /* @__PURE__ */ new Map(),
@@ -804,11 +803,7 @@ var getMooseInternal = () => globalThis.moose_internal;
804
803
  if (getMooseInternal() === void 0) {
805
804
  globalThis.moose_internal = moose_internal;
806
805
  }
807
- var isRegistryEmpty = () => {
808
- const registry = getMooseInternal();
809
- return registry.tables.size === 0 && registry.streams.size === 0 && registry.ingestApis.size === 0 && registry.apis.size === 0 && registry.sqlResources.size === 0 && registry.workflows.size === 0 && registry.webApps.size === 0;
810
- };
811
- var reloadIndex = () => {
806
+ var loadIndex = () => {
812
807
  const registry = getMooseInternal();
813
808
  registry.tables.clear();
814
809
  registry.streams.clear();
@@ -817,14 +812,12 @@ var reloadIndex = () => {
817
812
  registry.sqlResources.clear();
818
813
  registry.workflows.clear();
819
814
  registry.webApps.clear();
820
- if (!isProductionMode()) {
821
- const appDir = `${import_process.default.cwd()}/${getSourceDir()}`;
822
- Object.keys(require.cache).forEach((key) => {
823
- if (key.startsWith(appDir)) {
824
- delete require.cache[key];
825
- }
826
- });
827
- }
815
+ const appDir = `${import_process.default.cwd()}/${getSourceDir()}`;
816
+ Object.keys(require.cache).forEach((key) => {
817
+ if (key.startsWith(appDir)) {
818
+ delete require.cache[key];
819
+ }
820
+ });
828
821
  try {
829
822
  require(`${import_process.default.cwd()}/${getSourceDir()}/index.ts`);
830
823
  } catch (error) {
@@ -838,11 +831,6 @@ var reloadIndex = () => {
838
831
  throw new Error(errorMsg, { cause });
839
832
  }
840
833
  };
841
- var ensureIndexLoaded = () => {
842
- if (isRegistryEmpty()) {
843
- reloadIndex();
844
- }
845
- };
846
834
  var dlqSchema = {
847
835
  version: "3.1",
848
836
  components: {
@@ -963,7 +951,7 @@ var dlqColumns = [
963
951
  }
964
952
  ];
965
953
  var getWorkflows = async () => {
966
- ensureIndexLoaded();
954
+ loadIndex();
967
955
  const registry = getMooseInternal();
968
956
  return registry.workflows;
969
957
  };