MCPcopy Create free account
hub / github.com/dynastic/place / processModelExtensionsForModule

Method processModelExtensionsForModule

util/ModuleManager.js:246–259  ·  view source on GitHub ↗
(meta, callback)

Source from the content-addressed store, hash-verified

244 // --- Model Extensions ---
245
246 processModelExtensionsForModule(meta, callback) {
247 var mePath = path.join(this.modulePaths[meta.identifier], "model_extensions");
248 fs.stat(mePath, (err, stat) => {
249 if(err || !stat.isDirectory()) return callback();
250 fs.readdir(mePath, (err, files) => {
251 files.filter((fn) => path.extname(fn) == ".js").forEach((file) => {
252 const Override = require(path.join(mePath, file));
253 var overrides = Override(this.app, DEFAULT_MODEL_OVERRIDE_MANAGER);
254 DataModelManager.registerModuleOverrides(file, overrides);
255 });
256 callback();
257 });
258 });
259 }
260
261}
262

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected