@514labs/moose-lib 0.6.267-ci-6-g7e4e6a41 → 0.6.267-ci-7-g09e4deda
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.map +1 -1
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -11
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +24 -11
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +24 -11
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -854,17 +854,23 @@ var loadIndex = async () => {
|
|
|
854
854
|
console.log(
|
|
855
855
|
`${workerInfo} loadIndex: registry cleared in ${Date.now() - clearStart}ms`
|
|
856
856
|
);
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
857
|
+
if (import_process.default.env.NODE_ENV !== "production") {
|
|
858
|
+
console.log(`${workerInfo} loadIndex: clearing require cache...`);
|
|
859
|
+
const cacheStart = Date.now();
|
|
860
|
+
const appDir = `${import_process.default.cwd()}/${getSourceDir()}`;
|
|
861
|
+
Object.keys(require.cache).forEach((key) => {
|
|
862
|
+
if (key.startsWith(appDir)) {
|
|
863
|
+
delete require.cache[key];
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
console.log(
|
|
867
|
+
`${workerInfo} loadIndex: require cache cleared in ${Date.now() - cacheStart}ms`
|
|
868
|
+
);
|
|
869
|
+
} else {
|
|
870
|
+
console.log(
|
|
871
|
+
`${workerInfo} loadIndex: skipping cache clear in production mode`
|
|
872
|
+
);
|
|
873
|
+
}
|
|
868
874
|
console.log(`${workerInfo} loadIndex: requiring index.ts...`);
|
|
869
875
|
const requireStart = Date.now();
|
|
870
876
|
require(`${import_process.default.cwd()}/${getSourceDir()}/index.ts`);
|