mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-22 17:36:56 +08:00
08a38f0a5e
* refactor: typing house-keeping * fix: fix parse date not accepting strict mode * refactor: use npm package * fix: address review
15 lines
575 B
TypeScript
15 lines
575 B
TypeScript
// No-op shim for directory-import in Cloudflare Workers
|
|
// directoryImport is only used in dev mode, Worker builds use pre-built routes
|
|
|
|
export type DirectoryImportOptions = {
|
|
targetDirectoryPath: string;
|
|
importPattern?: RegExp;
|
|
includeSubdirectories?: boolean;
|
|
};
|
|
|
|
export const directoryImport = <T = unknown>(_options: DirectoryImportOptions): Record<string, T> => {
|
|
// This should never be called in Worker builds
|
|
// Worker builds use pre-built routes from routes-worker.js
|
|
throw new Error('directoryImport is not available in Worker builds');
|
|
};
|