diff options
author | 2022-09-25 14:56:22 -0700 | |
---|---|---|
committer | 2022-09-25 14:56:22 -0700 | |
commit | 5ef36f1b6fa64d838f988d4b84110fae4c7015ac (patch) | |
tree | dc52d18ede3c567d97acf7798a8fba6104ba359b /src/bun.js/bindings/ModuleLoader.cpp | |
parent | 7cc772cd391de428a9f9010e40abf0f8d3ba625a (diff) | |
download | bun-5ef36f1b6fa64d838f988d4b84110fae4c7015ac.tar.gz bun-5ef36f1b6fa64d838f988d4b84110fae4c7015ac.tar.zst bun-5ef36f1b6fa64d838f988d4b84110fae4c7015ac.zip |
Implement `isatty` in `node:tty`
Diffstat (limited to 'src/bun.js/bindings/ModuleLoader.cpp')
-rw-r--r-- | src/bun.js/bindings/ModuleLoader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bun.js/bindings/ModuleLoader.cpp b/src/bun.js/bindings/ModuleLoader.cpp index 6f9a767e4..cb5ff0864 100644 --- a/src/bun.js/bindings/ModuleLoader.cpp +++ b/src/bun.js/bindings/ModuleLoader.cpp @@ -33,6 +33,7 @@ #include "../modules/StringDecoderModule.h" #include "../modules/ObjectModule.h" #include "../modules/NodeModuleModule.h" +#include "../modules/TTYModule.h" namespace Bun { using namespace Zig; @@ -395,6 +396,13 @@ static JSValue fetchSourceCode( return rejectOrResolve(JSSourceCode::create(vm, WTFMove(source))); } + case SyntheticModuleType::TTY: { + auto source = JSC::SourceCode( + JSC::SyntheticSourceProvider::create(generateTTYSourceCode, + JSC::SourceOrigin(), WTFMove(moduleKey))); + + return rejectOrResolve(JSSourceCode::create(vm, WTFMove(source))); + } case SyntheticModuleType::Process: { auto source = JSC::SourceCode( JSC::SyntheticSourceProvider::create(generateProcessSourceCode, |