Update app and tooling

This commit is contained in:
Lawrence Chen 2026-01-29 17:36:26 -08:00
parent 3046531bdd
commit e620ec7349
4950 changed files with 2975120 additions and 10 deletions

24
node_modules/micro/lib/handler.js generated vendored Normal file
View file

@ -0,0 +1,24 @@
// Utilities
const logError = require('./error');
module.exports = async file => {
let mod;
try {
mod = await require(file); // Await to support exporting Promises
if (mod && typeof mod === 'object') {
mod = await mod.default; // Await to support es6 module's default export
}
} catch (err) {
logError(`Error when importing ${file}: ${err.stack}`, 'invalid-entry');
process.exit(1);
}
if (typeof mod !== 'function') {
logError(`The file "${file}" does not export a function.`, 'no-export');
process.exit(1);
}
return mod;
};