1 | "use strict";
|
2 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
3 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
4 | };
|
5 | Object.defineProperty(exports, "__esModule", { value: true });
|
6 | const log_1 = __importDefault(require("./log"));
|
7 | function clearNodeCache(rootPath) {
|
8 | Object.keys(require.cache).forEach((key) => {
|
9 | var _a;
|
10 | if ((_a = require.cache[key]) === null || _a === void 0 ? void 0 : _a.filename.startsWith(rootPath)) {
|
11 | log_1.default.debug("delete node-cache for", key);
|
12 | delete require.cache[key];
|
13 | }
|
14 | });
|
15 | }
|
16 | exports.default = clearNodeCache;
|