@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.
@@ -1168,6 +1168,7 @@ init_commons();
1168
1168
  function getSourceDir() {
1169
1169
  return import_process.default.env.MOOSE_SOURCE_DIR || "app";
1170
1170
  }
1171
+ var isProductionMode = () => import_process.default.env.NODE_ENV === "production";
1171
1172
  var moose_internal = {
1172
1173
  tables: /* @__PURE__ */ new Map(),
1173
1174
  streams: /* @__PURE__ */ new Map(),
@@ -1647,12 +1648,14 @@ var reloadIndex = () => {
1647
1648
  registry.sqlResources.clear();
1648
1649
  registry.workflows.clear();
1649
1650
  registry.webApps.clear();
1650
- const appDir = `${import_process.default.cwd()}/${getSourceDir()}`;
1651
- Object.keys(require.cache).forEach((key) => {
1652
- if (key.startsWith(appDir)) {
1653
- delete require.cache[key];
1654
- }
1655
- });
1651
+ if (!isProductionMode()) {
1652
+ const appDir = `${import_process.default.cwd()}/${getSourceDir()}`;
1653
+ Object.keys(require.cache).forEach((key) => {
1654
+ if (key.startsWith(appDir)) {
1655
+ delete require.cache[key];
1656
+ }
1657
+ });
1658
+ }
1656
1659
  try {
1657
1660
  require(`${import_process.default.cwd()}/${getSourceDir()}/index.ts`);
1658
1661
  } catch (error) {