in core/index.js [245:275]
function importBuiltInExtensions() {
/** @type {Array.<string>} */
const backlog = [
path.join(__dirname, "tasks"),
path.join(__dirname, "processors")
];
/** @type {string} */
let currentItem;
while (currentItem = backlog.shift()) {
if (!fs.existsSync(currentItem)) {
continue;
}
const stat = fs.statSync(currentItem);
if (stat.isDirectory()) {
if (fs.existsSync(path.join(currentItem, "package.json"))
|| fs.existsSync(path.join(currentItem, "index.js"))) {
require(currentItem);
} else {
backlog.push(...fs.readdirSync(currentItem).map((entry) => path.join(currentItem, entry)));
}
} else if (stat.isFile() && path.extname(currentItem) === ".js") {
require(currentItem);
}
}
}