Factories.json is a bit of a mystery. You can access the data via the following wiki-url:
- system/factories.json ![]()
I believe it is generated dynamically on server startup, byt iterating through every plugin, and looking for a factory.json file.
In the Live Server we construct this with the folloowing function and cache the result on server startup:
# Code
The `preLoadEditors` function (below) is part of client.max.js. Itis designed to pre-load plugins that declare an editor. It filters a catalog of entries to find those with an editor, then attempts to load each corresponding plugin, checking if the plugin correctly defines an `editor` function.
The asynchronous call to `wiki.origin.get` fetches a JSON file (`factories.json`). If the response is an array, it is treated as a catalog of plugins (or similar entities), and `preLoadEditors` is called with this array to initiate the pre-loading process.
preLoadEditors = function preLoadEditors(catalog) { return catalog.filter(function (entry) { return entry.editor; }).forEach(function (entry) { console.log("".concat(entry.name, " Plugin declares an editor, so pre-loading the plugin")); return wiki.getPlugin(entry.name.toLowerCase(), function (plugin) { if (!plugin.editor || typeof plugin.editor !== 'function') { return console.log("".concat(entry.name, " Plugin ERROR.\nCannot find `editor` function in plugin. Set `\"editor\": false` in factory.json or\nCorrect the plugin to include all three of `{emit, bind, editor}`")); } }); }); }; wiki.origin.get('system/factories.json', function (error, data) { if (Array.isArray(data)) { window.catalog = data; return preLoadEditors(data); } });