UNPKG

@lionrockjs/central

Version:

Node.js MVC framework inspire from PHP Kohana Framework

27 lines (26 loc) 793 B
import Noop from './Noop.mjs'; export default class Worker extends Noop { constructor() { super(); } resolveFetchList(x, store, pathToFile) { // no filesystem in CF Workers — trust the path and add to store store.set(pathToFile, x); return true; } fileExists(pathToFile) { // no filesystem access in CF Workers return false; } dirname(file = null) { return new URL('.', file || import.meta.url).pathname; } async import(pathToFile, cacheId = 0) { // CF Workers: dynamic import only works for bundled modules; no query-string cache busting const module = await import(pathToFile); return module.default || module; } process() { return super.process(); } }