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

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.
@@ -1155,6 +1155,7 @@ init_commons();
1155
1155
  function getSourceDir() {
1156
1156
  return process2.env.MOOSE_SOURCE_DIR || "app";
1157
1157
  }
1158
+ var isProductionMode = () => process2.env.NODE_ENV === "production";
1158
1159
  var moose_internal = {
1159
1160
  tables: /* @__PURE__ */ new Map(),
1160
1161
  streams: /* @__PURE__ */ new Map(),
@@ -1634,12 +1635,14 @@ var reloadIndex = () => {
1634
1635
  registry.sqlResources.clear();
1635
1636
  registry.workflows.clear();
1636
1637
  registry.webApps.clear();
1637
- const appDir = `${process2.cwd()}/${getSourceDir()}`;
1638
- Object.keys(__require.cache).forEach((key) => {
1639
- if (key.startsWith(appDir)) {
1640
- delete __require.cache[key];
1641
- }
1642
- });
1638
+ if (!isProductionMode()) {
1639
+ const appDir = `${process2.cwd()}/${getSourceDir()}`;
1640
+ Object.keys(__require.cache).forEach((key) => {
1641
+ if (key.startsWith(appDir)) {
1642
+ delete __require.cache[key];
1643
+ }
1644
+ });
1645
+ }
1643
1646
  try {
1644
1647
  __require(`${process2.cwd()}/${getSourceDir()}/index.ts`);
1645
1648
  } catch (error) {