├── .gitignore ├── Dockerfile ├── LICENSE ├── Procfile ├── README.md ├── app.json ├── commands.txt ├── config.example.json ├── config.json ├── lib ├── command.js ├── editor.js ├── renderer.js ├── terminal.js ├── utils.js └── wizard.js ├── node_modules ├── .bin │ └── mime ├── agent-base │ ├── .travis.yml │ ├── History.md │ ├── README.md │ ├── index.d.ts │ ├── index.js │ ├── package.json │ ├── patch-core.js │ └── test │ │ ├── ssl-cert-snakeoil.key │ │ ├── ssl-cert-snakeoil.pem │ │ └── test.js ├── asynckit │ ├── LICENSE │ ├── README.md │ ├── bench.js │ ├── index.js │ ├── lib │ │ ├── abort.js │ │ ├── async.js │ │ ├── defer.js │ │ ├── iterate.js │ │ ├── readable_asynckit.js │ │ ├── readable_parallel.js │ │ ├── readable_serial.js │ │ ├── readable_serial_ordered.js │ │ ├── state.js │ │ ├── streamify.js │ │ └── terminator.js │ ├── package.json │ ├── parallel.js │ ├── serial.js │ ├── serialOrdered.js │ └── stream.js ├── balanced-match │ ├── .npmignore │ ├── LICENSE.md │ ├── README.md │ ├── index.js │ └── package.json ├── botgram │ ├── .eslintrc.yml │ ├── CNAME │ ├── LICENSE │ ├── README.md │ ├── _config.yml │ ├── docs │ │ ├── callback.md │ │ ├── global.md │ │ ├── handlers.md │ │ ├── index.md │ │ ├── message.md │ │ ├── reply.md │ │ ├── splash.png │ │ └── tutorial.md │ ├── examples │ │ ├── README.md │ │ ├── actions.js │ │ ├── counter.js │ │ ├── delete_echo.js │ │ ├── echo.js │ │ ├── edit_echo.js │ │ ├── flush.js │ │ ├── forward.js │ │ ├── hasher.js │ │ ├── info.js │ │ ├── print.js │ │ └── stallman.js │ ├── index.js │ ├── lib │ │ ├── bot.js │ │ ├── callback.js │ │ ├── inline.js │ │ ├── message.js │ │ ├── misc.js │ │ ├── model.js │ │ ├── reply.js │ │ └── utils.js │ └── package.json ├── brace-expansion │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── combined-stream │ ├── License │ ├── Readme.md │ ├── lib │ │ └── combined_stream.js │ ├── package.json │ └── yarn.lock ├── concat-map │ ├── .travis.yml │ ├── LICENSE │ ├── README.markdown │ ├── example │ │ └── map.js │ ├── index.js │ ├── package.json │ └── test │ │ └── map.js ├── debug │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── dist │ │ └── debug.js │ ├── node.js │ ├── package.json │ └── src │ │ ├── browser.js │ │ ├── common.js │ │ ├── index.js │ │ └── node.js ├── delayed-stream │ ├── .npmignore │ ├── License │ ├── Makefile │ ├── Readme.md │ ├── lib │ │ └── delayed_stream.js │ └── package.json ├── es6-promise │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── auto.js │ ├── dist │ │ ├── es6-promise.auto.js │ │ ├── es6-promise.auto.map │ │ ├── es6-promise.auto.min.js │ │ ├── es6-promise.auto.min.map │ │ ├── es6-promise.js │ │ ├── es6-promise.map │ │ ├── es6-promise.min.js │ │ └── es6-promise.min.map │ ├── es6-promise.d.ts │ ├── lib │ │ ├── es6-promise.auto.js │ │ ├── es6-promise.js │ │ └── es6-promise │ │ │ ├── -internal.js │ │ │ ├── asap.js │ │ │ ├── enumerator.js │ │ │ ├── polyfill.js │ │ │ ├── promise.js │ │ │ ├── promise │ │ │ ├── all.js │ │ │ ├── race.js │ │ │ ├── reject.js │ │ │ └── resolve.js │ │ │ ├── then.js │ │ │ └── utils.js │ └── package.json ├── es6-promisify │ ├── README.md │ ├── dist │ │ ├── promise.js │ │ └── promisify.js │ └── package.json ├── escape-html │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── form-data │ ├── License │ ├── README.md │ ├── README.md.bak │ ├── index.d.ts │ ├── lib │ │ ├── browser.js │ │ ├── form_data.js │ │ └── populate.js │ └── package.json ├── https-proxy-agent │ ├── .editorconfig │ ├── .eslintrc.js │ ├── History.md │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── ip │ ├── .jscsrc │ ├── .jshintrc │ ├── .npmignore │ ├── .travis.yml │ ├── README.md │ ├── lib │ │ └── ip.js │ ├── package.json │ └── test │ │ └── api-test.js ├── mime-db │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── db.json │ ├── index.js │ └── package.json ├── mime-types │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── mime │ ├── .npmignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── cli.js │ ├── mime.js │ ├── package.json │ ├── src │ │ ├── build.js │ │ └── test.js │ └── types.json ├── minimatch │ ├── LICENSE │ ├── README.md │ ├── minimatch.js │ └── package.json ├── ms │ ├── index.js │ ├── license.md │ ├── package.json │ └── readme.md ├── nan │ ├── CHANGELOG.md │ ├── LICENSE.md │ ├── README.md │ ├── doc │ │ ├── asyncworker.md │ │ ├── buffers.md │ │ ├── callback.md │ │ ├── converters.md │ │ ├── errors.md │ │ ├── json.md │ │ ├── maybe_types.md │ │ ├── methods.md │ │ ├── new.md │ │ ├── node_misc.md │ │ ├── object_wrappers.md │ │ ├── persistent.md │ │ ├── scopes.md │ │ ├── script.md │ │ ├── string_bytes.md │ │ ├── v8_internals.md │ │ └── v8_misc.md │ ├── include_dirs.js │ ├── nan.h │ ├── nan_callbacks.h │ ├── nan_callbacks_12_inl.h │ ├── nan_callbacks_pre_12_inl.h │ ├── nan_converters.h │ ├── nan_converters_43_inl.h │ ├── nan_converters_pre_43_inl.h │ ├── nan_define_own_property_helper.h │ ├── nan_implementation_12_inl.h │ ├── nan_implementation_pre_12_inl.h │ ├── nan_json.h │ ├── nan_maybe_43_inl.h │ ├── nan_maybe_pre_43_inl.h │ ├── nan_new.h │ ├── nan_object_wrap.h │ ├── nan_persistent_12_inl.h │ ├── nan_persistent_pre_12_inl.h │ ├── nan_private.h │ ├── nan_string_bytes.h │ ├── nan_typedarray_contents.h │ ├── nan_weak.h │ ├── package.json │ └── tools │ │ ├── 1to2.js │ │ ├── README.md │ │ └── package.json ├── node-pty │ ├── LICENSE │ ├── README.md │ ├── binding.gyp │ ├── build │ │ ├── Makefile │ │ ├── Release │ │ │ └── pty.node │ │ ├── binding.Makefile │ │ ├── config.gypi │ │ └── pty.target.mk │ ├── deps │ │ ├── .editorconfig │ │ └── winpty │ │ │ ├── .drone.yml │ │ │ ├── .gitattributes │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── RELEASES.md │ │ │ ├── VERSION.txt │ │ │ ├── configure │ │ │ ├── misc │ │ │ ├── .npmignore │ │ │ ├── BufferResizeTests.cc │ │ │ ├── ChangeScreenBuffer.cc │ │ │ ├── ClearConsole.cc │ │ │ ├── ConinMode.cc │ │ │ ├── ConinMode.ps1 │ │ │ ├── ConoutMode.cc │ │ │ ├── DebugClient.py │ │ │ ├── DebugServer.py │ │ │ ├── DumpLines.py │ │ │ ├── EnableExtendedFlags.txt │ │ │ ├── Font-Report-June2016 │ │ │ │ ├── CP437-Consolas.txt │ │ │ │ ├── CP437-Lucida.txt │ │ │ │ ├── CP932.txt │ │ │ │ ├── CP936.txt │ │ │ │ ├── CP949.txt │ │ │ │ ├── CP950.txt │ │ │ │ ├── MinimumWindowWidths.txt │ │ │ │ ├── Results.txt │ │ │ │ └── Windows10SetFontBugginess.txt │ │ │ ├── FontSurvey.cc │ │ │ ├── FormatChar.h │ │ │ ├── FreezePerfTest.cc │ │ │ ├── GetCh.cc │ │ │ ├── GetConsolePos.cc │ │ │ ├── GetFont.cc │ │ │ ├── IdentifyConsoleWindow.ps1 │ │ │ ├── IsNewConsole.cc │ │ │ ├── MouseInputNotes.txt │ │ │ ├── MoveConsoleWindow.cc │ │ │ ├── Notes.txt │ │ │ ├── OSVersion.cc │ │ │ ├── ScreenBufferFreezeInactive.cc │ │ │ ├── ScreenBufferTest.cc │ │ │ ├── ScreenBufferTest2.cc │ │ │ ├── SelectAllTest.cc │ │ │ ├── SetBufferSize.cc │ │ │ ├── SetCursorPos.cc │ │ │ ├── SetFont.cc │ │ │ ├── SetWindowRect.cc │ │ │ ├── ShowArgv.cc │ │ │ ├── ShowConsoleInput.cc │ │ │ ├── Spew.py │ │ │ ├── TestUtil.cc │ │ │ ├── UnicodeDoubleWidthTest.cc │ │ │ ├── UnicodeWideTest1.cc │ │ │ ├── UnicodeWideTest2.cc │ │ │ ├── UnixEcho.cc │ │ │ ├── Utf16Echo.cc │ │ │ ├── VeryLargeRead.cc │ │ │ ├── VkEscapeTest.cc │ │ │ ├── Win10ResizeWhileFrozen.cc │ │ │ ├── Win10WrapTest1.cc │ │ │ ├── Win10WrapTest2.cc │ │ │ ├── Win32Echo1.cc │ │ │ ├── Win32Echo2.cc │ │ │ ├── Win32Test1.cc │ │ │ ├── Win32Test2.cc │ │ │ ├── Win32Test3.cc │ │ │ ├── Win32Write1.cc │ │ │ ├── WindowsBugCrashReader.cc │ │ │ ├── WriteConsole.cc │ │ │ ├── build32.sh │ │ │ ├── build64.sh │ │ │ ├── color-test.sh │ │ │ ├── font-notes.txt │ │ │ └── winbug-15048.cc │ │ │ ├── ship │ │ │ ├── build-pty4j-libpty.bat │ │ │ ├── common_ship.py │ │ │ ├── make_msvc_package.py │ │ │ └── ship.py │ │ │ ├── src │ │ │ ├── agent │ │ │ │ ├── Agent.cc │ │ │ │ ├── Agent.h │ │ │ │ ├── AgentCreateDesktop.cc │ │ │ │ ├── AgentCreateDesktop.h │ │ │ │ ├── ConsoleFont.cc │ │ │ │ ├── ConsoleFont.h │ │ │ │ ├── ConsoleInput.cc │ │ │ │ ├── ConsoleInput.h │ │ │ │ ├── ConsoleInputReencoding.cc │ │ │ │ ├── ConsoleInputReencoding.h │ │ │ │ ├── ConsoleLine.cc │ │ │ │ ├── ConsoleLine.h │ │ │ │ ├── Coord.h │ │ │ │ ├── DebugShowInput.cc │ │ │ │ ├── DebugShowInput.h │ │ │ │ ├── DefaultInputMap.cc │ │ │ │ ├── DefaultInputMap.h │ │ │ │ ├── DsrSender.h │ │ │ │ ├── EventLoop.cc │ │ │ │ ├── EventLoop.h │ │ │ │ ├── InputMap.cc │ │ │ │ ├── InputMap.h │ │ │ │ ├── LargeConsoleRead.cc │ │ │ │ ├── LargeConsoleRead.h │ │ │ │ ├── NamedPipe.cc │ │ │ │ ├── NamedPipe.h │ │ │ │ ├── Scraper.cc │ │ │ │ ├── Scraper.h │ │ │ │ ├── SimplePool.h │ │ │ │ ├── SmallRect.h │ │ │ │ ├── Terminal.cc │ │ │ │ ├── Terminal.h │ │ │ │ ├── UnicodeEncoding.h │ │ │ │ ├── UnicodeEncodingTest.cc │ │ │ │ ├── Win32Console.cc │ │ │ │ ├── Win32Console.h │ │ │ │ ├── Win32ConsoleBuffer.cc │ │ │ │ ├── Win32ConsoleBuffer.h │ │ │ │ ├── main.cc │ │ │ │ └── subdir.mk │ │ │ ├── configurations.gypi │ │ │ ├── debugserver │ │ │ │ ├── DebugServer.cc │ │ │ │ └── subdir.mk │ │ │ ├── include │ │ │ │ ├── winpty.h │ │ │ │ └── winpty_constants.h │ │ │ ├── libwinpty │ │ │ │ ├── AgentLocation.cc │ │ │ │ ├── AgentLocation.h │ │ │ │ ├── LibWinptyException.h │ │ │ │ ├── WinptyInternal.h │ │ │ │ ├── subdir.mk │ │ │ │ └── winpty.cc │ │ │ ├── shared │ │ │ │ ├── AgentMsg.h │ │ │ │ ├── BackgroundDesktop.cc │ │ │ │ ├── BackgroundDesktop.h │ │ │ │ ├── Buffer.cc │ │ │ │ ├── Buffer.h │ │ │ │ ├── DebugClient.cc │ │ │ │ ├── DebugClient.h │ │ │ │ ├── GenRandom.cc │ │ │ │ ├── GenRandom.h │ │ │ │ ├── GetCommitHash.bat │ │ │ │ ├── Mutex.h │ │ │ │ ├── OsModule.h │ │ │ │ ├── OwnedHandle.cc │ │ │ │ ├── OwnedHandle.h │ │ │ │ ├── PrecompiledHeader.h │ │ │ │ ├── StringBuilder.h │ │ │ │ ├── StringBuilderTest.cc │ │ │ │ ├── StringUtil.cc │ │ │ │ ├── StringUtil.h │ │ │ │ ├── TimeMeasurement.h │ │ │ │ ├── UnixCtrlChars.h │ │ │ │ ├── UpdateGenVersion.bat │ │ │ │ ├── WindowsSecurity.cc │ │ │ │ ├── WindowsSecurity.h │ │ │ │ ├── WindowsVersion.cc │ │ │ │ ├── WindowsVersion.h │ │ │ │ ├── WinptyAssert.cc │ │ │ │ ├── WinptyAssert.h │ │ │ │ ├── WinptyException.cc │ │ │ │ ├── WinptyException.h │ │ │ │ ├── WinptyVersion.cc │ │ │ │ ├── WinptyVersion.h │ │ │ │ └── winpty_snprintf.h │ │ │ ├── subdir.mk │ │ │ ├── tests │ │ │ │ ├── subdir.mk │ │ │ │ └── trivial_test.cc │ │ │ ├── unix-adapter │ │ │ │ ├── InputHandler.cc │ │ │ │ ├── InputHandler.h │ │ │ │ ├── OutputHandler.cc │ │ │ │ ├── OutputHandler.h │ │ │ │ ├── Util.cc │ │ │ │ ├── Util.h │ │ │ │ ├── WakeupFd.cc │ │ │ │ ├── WakeupFd.h │ │ │ │ ├── main.cc │ │ │ │ └── subdir.mk │ │ │ └── winpty.gyp │ │ │ └── vcbuild.bat │ ├── lib │ │ ├── conpty_console_list_agent.js │ │ ├── conpty_console_list_agent.js.map │ │ ├── eventEmitter2.js │ │ ├── eventEmitter2.js.map │ │ ├── eventEmitter2.test.js │ │ ├── eventEmitter2.test.js.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── interfaces.js │ │ ├── interfaces.js.map │ │ ├── terminal.js │ │ ├── terminal.js.map │ │ ├── terminal.test.js │ │ ├── terminal.test.js.map │ │ ├── testUtils.test.js │ │ ├── testUtils.test.js.map │ │ ├── types.js │ │ ├── types.js.map │ │ ├── unixTerminal.js │ │ ├── unixTerminal.js.map │ │ ├── unixTerminal.test.js │ │ ├── unixTerminal.test.js.map │ │ ├── utils.js │ │ ├── utils.js.map │ │ ├── windowsPtyAgent.js │ │ ├── windowsPtyAgent.js.map │ │ ├── windowsPtyAgent.test.js │ │ ├── windowsPtyAgent.test.js.map │ │ ├── windowsTerminal.js │ │ ├── windowsTerminal.js.map │ │ ├── windowsTerminal.test.js │ │ └── windowsTerminal.test.js.map │ ├── package.json │ ├── scripts │ │ ├── install.js │ │ ├── post-install.js │ │ └── publish.js │ ├── src │ │ ├── conpty_console_list_agent.ts │ │ ├── eventEmitter2.test.ts │ │ ├── eventEmitter2.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── native.d.ts │ │ ├── terminal.test.ts │ │ ├── terminal.ts │ │ ├── testUtils.test.ts │ │ ├── types.ts │ │ ├── unix │ │ │ └── pty.cc │ │ ├── unixTerminal.test.ts │ │ ├── unixTerminal.ts │ │ ├── utils.ts │ │ ├── win │ │ │ ├── conpty.cc │ │ │ ├── conpty_console_list.cc │ │ │ ├── path_util.cc │ │ │ ├── path_util.h │ │ │ └── winpty.cc │ │ ├── windowsPtyAgent.test.ts │ │ ├── windowsPtyAgent.ts │ │ ├── windowsTerminal.test.ts │ │ └── windowsTerminal.ts │ └── typings │ │ └── node-pty.d.ts ├── node-termios │ ├── LICENSE │ ├── README.md │ ├── binding.gyp │ ├── build │ │ ├── Makefile │ │ ├── Release │ │ │ ├── .deps │ │ │ │ └── Release │ │ │ │ │ ├── obj.target │ │ │ │ │ ├── termios.node.d │ │ │ │ │ └── termios │ │ │ │ │ │ └── src │ │ │ │ │ │ ├── CCBuffer.o.d │ │ │ │ │ │ ├── CTermios.o.d │ │ │ │ │ │ ├── node_termios.o.d │ │ │ │ │ │ └── termios_basic.o.d │ │ │ │ │ └── termios.node.d │ │ │ ├── obj.target │ │ │ │ ├── termios.node │ │ │ │ └── termios │ │ │ │ │ └── src │ │ │ │ │ ├── CCBuffer.o │ │ │ │ │ ├── CTermios.o │ │ │ │ │ ├── node_termios.o │ │ │ │ │ └── termios_basic.o │ │ │ └── termios.node │ │ ├── binding.Makefile │ │ ├── config.gypi │ │ └── termios.target.mk │ ├── install.js │ ├── lib │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── interfaces.d.ts │ │ └── interfaces.js │ ├── package.json │ ├── src │ │ ├── CCBuffer.cpp │ │ ├── CCBuffer.h │ │ ├── CTermios.cpp │ │ ├── CTermios.h │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── node_termios.cpp │ │ ├── node_termios.h │ │ ├── termios_basic.cpp │ │ └── termios_basic.h │ ├── tsconfig.json │ └── tslint.json ├── smart-buffer │ ├── .prettierrc.yaml │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── smartbuffer.js │ │ ├── smartbuffer.js.map │ │ ├── utils.js │ │ └── utils.js.map │ ├── docs │ │ ├── CHANGELOG.md │ │ ├── README_v3.md │ │ └── ROADMAP.md │ ├── package.json │ └── typings │ │ ├── smartbuffer.d.ts │ │ └── utils.d.ts ├── socks-proxy-agent │ ├── .travis.yml │ ├── History.md │ ├── README.md │ ├── index.js │ ├── node_modules │ │ └── agent-base │ │ │ ├── .travis.yml │ │ │ ├── History.md │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ ├── patch-core.js │ │ │ └── test │ │ │ ├── ssl-cert-snakeoil.key │ │ │ ├── ssl-cert-snakeoil.pem │ │ │ └── test.js │ ├── package.json │ ├── test │ │ ├── ssl-cert-snakeoil.key │ │ ├── ssl-cert-snakeoil.pem │ │ └── test.js │ └── yarn.lock ├── socks │ ├── .prettierrc.yaml │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── client │ │ │ ├── socksclient.js │ │ │ └── socksclient.js.map │ │ ├── common │ │ │ ├── constants.js │ │ │ ├── constants.js.map │ │ │ ├── helpers.js │ │ │ ├── helpers.js.map │ │ │ ├── receivebuffer.js │ │ │ ├── receivebuffer.js.map │ │ │ ├── util.js │ │ │ └── util.js.map │ │ ├── index.js │ │ └── index.js.map │ ├── docs │ │ ├── examples │ │ │ ├── index.md │ │ │ ├── javascript │ │ │ │ ├── associateExample.md │ │ │ │ ├── bindExample.md │ │ │ │ └── connectExample.md │ │ │ └── typescript │ │ │ │ ├── associateExample.md │ │ │ │ ├── bindExample.md │ │ │ │ └── connectExample.md │ │ ├── index.md │ │ └── migratingFromV1.md │ ├── package.json │ └── typings │ │ ├── client │ │ └── socksclient.d.ts │ │ ├── common │ │ ├── constants.d.ts │ │ ├── helpers.d.ts │ │ ├── receiveBuffer.d.ts │ │ └── util.d.ts │ │ └── index.d.ts └── terminal.js │ ├── .npmignore │ ├── .travis.yml │ ├── Gruntfile.js │ ├── LICENSE │ ├── README.md │ ├── dist │ ├── terminal.dbg.js │ ├── terminal.js │ └── terminal.min.js │ ├── gh-pages.sh │ ├── index.js │ ├── lib │ ├── handler │ │ ├── chr.js │ │ ├── csi.js │ │ ├── dcs.js │ │ ├── esc.js │ │ ├── mode.js │ │ ├── osc.js │ │ └── sgr.js │ ├── input │ │ ├── base.js │ │ ├── dom.js │ │ └── tty.js │ ├── output │ │ ├── ansi.js │ │ ├── base.js │ │ ├── dom.js │ │ ├── html.js │ │ ├── live_base.js │ │ ├── plain.js │ │ └── tty.js │ ├── source │ │ ├── base.js │ │ └── emitter.js │ ├── term_diff.js │ ├── term_state.js │ ├── terminal.js │ └── util.js │ ├── package.json │ └── test │ ├── ansi_output.js │ ├── common.js │ ├── dom_output.js │ ├── handler_sgi.js │ ├── html_output.js │ ├── index.html │ ├── plain_output.js │ ├── term_diff.js │ ├── term_state.js │ └── terminal.js ├── package.json └── server.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | #clones the repo 2 | RUN git clone https://github.com/denomparkour/shell-bot 3 | #changes dir to shell-bot 4 | CMD cd shell-bot 5 | #Installs python and build-essential 6 | CMD sudo apt install -y make python build-essential 7 | #Runs npm install 8 | CMD npm install 9 | #Starts the bot 10 | CMD node server 11 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | worker: npm start 2 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "parkour-shell", 3 | "repository": "https://github.com/denomparkour/shell-bot" 4 | } 5 | -------------------------------------------------------------------------------- /commands.txt: -------------------------------------------------------------------------------- 1 | run - Execute command 2 | enter - Send input lines to command 3 | type - Type keys into command 4 | control - Type Control+Letter 5 | meta - Send the next typed key with Alt 6 | keypad - Toggle keypad for special keys 7 | redraw - Force the command to repaint 8 | end - Send EOF to command 9 | cancel - Interrupt command 10 | kill - Send signal to process 11 | status - View status and current settings 12 | cd - Change directory 13 | env - Manipulate the environment 14 | shell - Change shell used to run commands 15 | resize - Change the terminal size 16 | setsilent - Enable / disable silent output 17 | setlinkpreviews - Enable / disable link expansion 18 | setinteractive - Enable / disable shell interactive flag 19 | help - Get help 20 | file - View and edit small text files 21 | upload - Upload and overwrite raw files 22 | r - Alias for /run or /enter 23 | -------------------------------------------------------------------------------- /config.example.json: -------------------------------------------------------------------------------- 1 | { 2 | "authToken": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11", 3 | "owner": 34509246 4 | } 5 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "authToken": "646885536:AAEKFxy_Xxd9_7yQ59zeaPkipgun-a-r8vw", 3 | "owner": 879820429 4 | } 5 | -------------------------------------------------------------------------------- /node_modules/.bin/mime: -------------------------------------------------------------------------------- 1 | ../mime/cli.js -------------------------------------------------------------------------------- /node_modules/agent-base/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "5" 8 | - "6" 9 | - "7" 10 | - "8" 11 | - "9" 12 | - "10" 13 | 14 | install: 15 | - PATH="`npm bin`:`npm bin -g`:$PATH" 16 | # Install dependencies and build 17 | - npm install 18 | 19 | script: 20 | # Output useful info for debugging 21 | - node --version 22 | - npm --version 23 | # Run tests 24 | - npm test 25 | -------------------------------------------------------------------------------- /node_modules/agent-base/index.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for agent-base 4.2.1 2 | // Project: https://github.com/TooTallNate/node-agent-base 3 | // Definitions by: Christopher Quadflieg 4 | 5 | /// 6 | import { EventEmitter } from 'events'; 7 | 8 | declare namespace Agent { 9 | export type AgentCallback = ( 10 | req?: any, 11 | opts?: { 12 | secureEndpoint: boolean; 13 | } 14 | ) => void; 15 | 16 | export interface AgentOptions { 17 | timeout?: number; 18 | host?: string; 19 | port?: number; 20 | [key: string]: any; 21 | } 22 | 23 | export interface Agent extends EventEmitter { 24 | _promisifiedCallback: boolean; 25 | timeout: number | null; 26 | options?: AgentOptions; 27 | callback: AgentCallback; 28 | addRequest: (req?: any, opts?: any) => void; 29 | freeSocket: (socket: any, opts: any) => void; 30 | } 31 | } 32 | 33 | /** 34 | * Base `http.Agent` implementation. 35 | * No pooling/keep-alive is implemented by default. 36 | */ 37 | declare function Agent(opts?: Agent.AgentOptions): Agent.Agent; 38 | declare function Agent( 39 | callback: Agent.AgentCallback, 40 | opts?: Agent.AgentOptions 41 | ): Agent.Agent; 42 | 43 | export = Agent; 44 | -------------------------------------------------------------------------------- /node_modules/agent-base/patch-core.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const url = require('url'); 3 | const https = require('https'); 4 | 5 | /** 6 | * This currently needs to be applied to all Node.js versions 7 | * in order to determine if the `req` is an HTTP or HTTPS request. 8 | * 9 | * There is currently no PR attempting to move this property upstream. 10 | */ 11 | const patchMarker = "__agent_base_https_request_patched__"; 12 | if (!https.request[patchMarker]) { 13 | https.request = (function(request) { 14 | return function(_options, cb) { 15 | let options; 16 | if (typeof _options === 'string') { 17 | options = url.parse(_options); 18 | } else { 19 | options = Object.assign({}, _options); 20 | } 21 | if (null == options.port) { 22 | options.port = 443; 23 | } 24 | options.secureEndpoint = true; 25 | return request.call(https, options, cb); 26 | }; 27 | })(https.request); 28 | https.request[patchMarker] = true; 29 | } 30 | 31 | /** 32 | * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the 33 | * patched `https.request()`. 34 | * 35 | * Ref: https://github.com/nodejs/node/commit/5118f31 36 | */ 37 | https.get = function (_url, _options, cb) { 38 | let options; 39 | if (typeof _url === 'string' && _options && typeof _options !== 'function') { 40 | options = Object.assign({}, url.parse(_url), _options); 41 | } else if (!_options && !cb) { 42 | options = _url; 43 | } else if (!cb) { 44 | options = _url; 45 | cb = _options; 46 | } 47 | 48 | const req = https.request(options, cb); 49 | req.end(); 50 | return req; 51 | }; 52 | -------------------------------------------------------------------------------- /node_modules/agent-base/test/ssl-cert-snakeoil.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr 3 | bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y 4 | b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB 5 | AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd 6 | Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x 7 | 1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ 8 | 5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW 9 | T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX 10 | uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N 11 | Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw 12 | h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J 13 | bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ 14 | ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /node_modules/agent-base/test/ssl-cert-snakeoil.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3 3 | NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0 4 | NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3 5 | NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB 6 | ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay 7 | OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn 8 | g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN 9 | AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4 10 | 1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J 11 | QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /node_modules/asynckit/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Alex Indigo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/asynckit/bench.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: "off" */ 2 | 3 | var asynckit = require('./') 4 | , async = require('async') 5 | , assert = require('assert') 6 | , expected = 0 7 | ; 8 | 9 | var Benchmark = require('benchmark'); 10 | var suite = new Benchmark.Suite; 11 | 12 | var source = []; 13 | for (var z = 1; z < 100; z++) 14 | { 15 | source.push(z); 16 | expected += z; 17 | } 18 | 19 | suite 20 | // add tests 21 | 22 | .add('async.map', function(deferred) 23 | { 24 | var total = 0; 25 | 26 | async.map(source, 27 | function(i, cb) 28 | { 29 | setImmediate(function() 30 | { 31 | total += i; 32 | cb(null, total); 33 | }); 34 | }, 35 | function(err, result) 36 | { 37 | assert.ifError(err); 38 | assert.equal(result[result.length - 1], expected); 39 | deferred.resolve(); 40 | }); 41 | }, {'defer': true}) 42 | 43 | 44 | .add('asynckit.parallel', function(deferred) 45 | { 46 | var total = 0; 47 | 48 | asynckit.parallel(source, 49 | function(i, cb) 50 | { 51 | setImmediate(function() 52 | { 53 | total += i; 54 | cb(null, total); 55 | }); 56 | }, 57 | function(err, result) 58 | { 59 | assert.ifError(err); 60 | assert.equal(result[result.length - 1], expected); 61 | deferred.resolve(); 62 | }); 63 | }, {'defer': true}) 64 | 65 | 66 | // add listeners 67 | .on('cycle', function(ev) 68 | { 69 | console.log(String(ev.target)); 70 | }) 71 | .on('complete', function() 72 | { 73 | console.log('Fastest is ' + this.filter('fastest').map('name')); 74 | }) 75 | // run async 76 | .run({ 'async': true }); 77 | -------------------------------------------------------------------------------- /node_modules/asynckit/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 2 | { 3 | parallel : require('./parallel.js'), 4 | serial : require('./serial.js'), 5 | serialOrdered : require('./serialOrdered.js') 6 | }; 7 | -------------------------------------------------------------------------------- /node_modules/asynckit/lib/abort.js: -------------------------------------------------------------------------------- 1 | // API 2 | module.exports = abort; 3 | 4 | /** 5 | * Aborts leftover active jobs 6 | * 7 | * @param {object} state - current state object 8 | */ 9 | function abort(state) 10 | { 11 | Object.keys(state.jobs).forEach(clean.bind(state)); 12 | 13 | // reset leftover jobs 14 | state.jobs = {}; 15 | } 16 | 17 | /** 18 | * Cleans up leftover job by invoking abort function for the provided job id 19 | * 20 | * @this state 21 | * @param {string|number} key - job id to abort 22 | */ 23 | function clean(key) 24 | { 25 | if (typeof this.jobs[key] == 'function') 26 | { 27 | this.jobs[key](); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/asynckit/lib/async.js: -------------------------------------------------------------------------------- 1 | var defer = require('./defer.js'); 2 | 3 | // API 4 | module.exports = async; 5 | 6 | /** 7 | * Runs provided callback asynchronously 8 | * even if callback itself is not 9 | * 10 | * @param {function} callback - callback to invoke 11 | * @returns {function} - augmented callback 12 | */ 13 | function async(callback) 14 | { 15 | var isAsync = false; 16 | 17 | // check if async happened 18 | defer(function() { isAsync = true; }); 19 | 20 | return function async_callback(err, result) 21 | { 22 | if (isAsync) 23 | { 24 | callback(err, result); 25 | } 26 | else 27 | { 28 | defer(function nextTick_callback() 29 | { 30 | callback(err, result); 31 | }); 32 | } 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/asynckit/lib/defer.js: -------------------------------------------------------------------------------- 1 | module.exports = defer; 2 | 3 | /** 4 | * Runs provided function on next iteration of the event loop 5 | * 6 | * @param {function} fn - function to run 7 | */ 8 | function defer(fn) 9 | { 10 | var nextTick = typeof setImmediate == 'function' 11 | ? setImmediate 12 | : ( 13 | typeof process == 'object' && typeof process.nextTick == 'function' 14 | ? process.nextTick 15 | : null 16 | ); 17 | 18 | if (nextTick) 19 | { 20 | nextTick(fn); 21 | } 22 | else 23 | { 24 | setTimeout(fn, 0); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/asynckit/lib/readable_parallel.js: -------------------------------------------------------------------------------- 1 | var parallel = require('../parallel.js'); 2 | 3 | // API 4 | module.exports = ReadableParallel; 5 | 6 | /** 7 | * Streaming wrapper to `asynckit.parallel` 8 | * 9 | * @param {array|object} list - array or object (named list) to iterate over 10 | * @param {function} iterator - iterator to run 11 | * @param {function} callback - invoked when all elements processed 12 | * @returns {stream.Readable#} 13 | */ 14 | function ReadableParallel(list, iterator, callback) 15 | { 16 | if (!(this instanceof ReadableParallel)) 17 | { 18 | return new ReadableParallel(list, iterator, callback); 19 | } 20 | 21 | // turn on object mode 22 | ReadableParallel.super_.call(this, {objectMode: true}); 23 | 24 | this._start(parallel, list, iterator, callback); 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/asynckit/lib/readable_serial.js: -------------------------------------------------------------------------------- 1 | var serial = require('../serial.js'); 2 | 3 | // API 4 | module.exports = ReadableSerial; 5 | 6 | /** 7 | * Streaming wrapper to `asynckit.serial` 8 | * 9 | * @param {array|object} list - array or object (named list) to iterate over 10 | * @param {function} iterator - iterator to run 11 | * @param {function} callback - invoked when all elements processed 12 | * @returns {stream.Readable#} 13 | */ 14 | function ReadableSerial(list, iterator, callback) 15 | { 16 | if (!(this instanceof ReadableSerial)) 17 | { 18 | return new ReadableSerial(list, iterator, callback); 19 | } 20 | 21 | // turn on object mode 22 | ReadableSerial.super_.call(this, {objectMode: true}); 23 | 24 | this._start(serial, list, iterator, callback); 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/asynckit/lib/readable_serial_ordered.js: -------------------------------------------------------------------------------- 1 | var serialOrdered = require('../serialOrdered.js'); 2 | 3 | // API 4 | module.exports = ReadableSerialOrdered; 5 | // expose sort helpers 6 | module.exports.ascending = serialOrdered.ascending; 7 | module.exports.descending = serialOrdered.descending; 8 | 9 | /** 10 | * Streaming wrapper to `asynckit.serialOrdered` 11 | * 12 | * @param {array|object} list - array or object (named list) to iterate over 13 | * @param {function} iterator - iterator to run 14 | * @param {function} sortMethod - custom sort function 15 | * @param {function} callback - invoked when all elements processed 16 | * @returns {stream.Readable#} 17 | */ 18 | function ReadableSerialOrdered(list, iterator, sortMethod, callback) 19 | { 20 | if (!(this instanceof ReadableSerialOrdered)) 21 | { 22 | return new ReadableSerialOrdered(list, iterator, sortMethod, callback); 23 | } 24 | 25 | // turn on object mode 26 | ReadableSerialOrdered.super_.call(this, {objectMode: true}); 27 | 28 | this._start(serialOrdered, list, iterator, sortMethod, callback); 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/asynckit/lib/state.js: -------------------------------------------------------------------------------- 1 | // API 2 | module.exports = state; 3 | 4 | /** 5 | * Creates initial state object 6 | * for iteration over list 7 | * 8 | * @param {array|object} list - list to iterate over 9 | * @param {function|null} sortMethod - function to use for keys sort, 10 | * or `null` to keep them as is 11 | * @returns {object} - initial state object 12 | */ 13 | function state(list, sortMethod) 14 | { 15 | var isNamedList = !Array.isArray(list) 16 | , initState = 17 | { 18 | index : 0, 19 | keyedList: isNamedList || sortMethod ? Object.keys(list) : null, 20 | jobs : {}, 21 | results : isNamedList ? {} : [], 22 | size : isNamedList ? Object.keys(list).length : list.length 23 | } 24 | ; 25 | 26 | if (sortMethod) 27 | { 28 | // sort array keys based on it's values 29 | // sort object's keys just on own merit 30 | initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) 31 | { 32 | return sortMethod(list[a], list[b]); 33 | }); 34 | } 35 | 36 | return initState; 37 | } 38 | -------------------------------------------------------------------------------- /node_modules/asynckit/lib/terminator.js: -------------------------------------------------------------------------------- 1 | var abort = require('./abort.js') 2 | , async = require('./async.js') 3 | ; 4 | 5 | // API 6 | module.exports = terminator; 7 | 8 | /** 9 | * Terminates jobs in the attached state context 10 | * 11 | * @this AsyncKitState# 12 | * @param {function} callback - final callback to invoke after termination 13 | */ 14 | function terminator(callback) 15 | { 16 | if (!Object.keys(this.jobs).length) 17 | { 18 | return; 19 | } 20 | 21 | // fast forward iteration index 22 | this.index = this.size; 23 | 24 | // abort jobs 25 | abort(this); 26 | 27 | // send back results we have so far 28 | async(callback)(null, this.results); 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/asynckit/parallel.js: -------------------------------------------------------------------------------- 1 | var iterate = require('./lib/iterate.js') 2 | , initState = require('./lib/state.js') 3 | , terminator = require('./lib/terminator.js') 4 | ; 5 | 6 | // Public API 7 | module.exports = parallel; 8 | 9 | /** 10 | * Runs iterator over provided array elements in parallel 11 | * 12 | * @param {array|object} list - array or object (named list) to iterate over 13 | * @param {function} iterator - iterator to run 14 | * @param {function} callback - invoked when all elements processed 15 | * @returns {function} - jobs terminator 16 | */ 17 | function parallel(list, iterator, callback) 18 | { 19 | var state = initState(list); 20 | 21 | while (state.index < (state['keyedList'] || list).length) 22 | { 23 | iterate(list, iterator, state, function(error, result) 24 | { 25 | if (error) 26 | { 27 | callback(error, result); 28 | return; 29 | } 30 | 31 | // looks like it's the last one 32 | if (Object.keys(state.jobs).length === 0) 33 | { 34 | callback(null, state.results); 35 | return; 36 | } 37 | }); 38 | 39 | state.index++; 40 | } 41 | 42 | return terminator.bind(state, callback); 43 | } 44 | -------------------------------------------------------------------------------- /node_modules/asynckit/serial.js: -------------------------------------------------------------------------------- 1 | var serialOrdered = require('./serialOrdered.js'); 2 | 3 | // Public API 4 | module.exports = serial; 5 | 6 | /** 7 | * Runs iterator over provided array elements in series 8 | * 9 | * @param {array|object} list - array or object (named list) to iterate over 10 | * @param {function} iterator - iterator to run 11 | * @param {function} callback - invoked when all elements processed 12 | * @returns {function} - jobs terminator 13 | */ 14 | function serial(list, iterator, callback) 15 | { 16 | return serialOrdered(list, iterator, null, callback); 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/asynckit/stream.js: -------------------------------------------------------------------------------- 1 | var inherits = require('util').inherits 2 | , Readable = require('stream').Readable 3 | , ReadableAsyncKit = require('./lib/readable_asynckit.js') 4 | , ReadableParallel = require('./lib/readable_parallel.js') 5 | , ReadableSerial = require('./lib/readable_serial.js') 6 | , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') 7 | ; 8 | 9 | // API 10 | module.exports = 11 | { 12 | parallel : ReadableParallel, 13 | serial : ReadableSerial, 14 | serialOrdered : ReadableSerialOrdered, 15 | }; 16 | 17 | inherits(ReadableAsyncKit, Readable); 18 | 19 | inherits(ReadableParallel, ReadableAsyncKit); 20 | inherits(ReadableSerial, ReadableAsyncKit); 21 | inherits(ReadableSerialOrdered, ReadableAsyncKit); 22 | -------------------------------------------------------------------------------- /node_modules/balanced-match/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .gitignore 3 | .travis.yml 4 | Makefile 5 | example.js 6 | -------------------------------------------------------------------------------- /node_modules/balanced-match/LICENSE.md: -------------------------------------------------------------------------------- 1 | (MIT) 2 | 3 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/balanced-match/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = balanced; 3 | function balanced(a, b, str) { 4 | if (a instanceof RegExp) a = maybeMatch(a, str); 5 | if (b instanceof RegExp) b = maybeMatch(b, str); 6 | 7 | var r = range(a, b, str); 8 | 9 | return r && { 10 | start: r[0], 11 | end: r[1], 12 | pre: str.slice(0, r[0]), 13 | body: str.slice(r[0] + a.length, r[1]), 14 | post: str.slice(r[1] + b.length) 15 | }; 16 | } 17 | 18 | function maybeMatch(reg, str) { 19 | var m = str.match(reg); 20 | return m ? m[0] : null; 21 | } 22 | 23 | balanced.range = range; 24 | function range(a, b, str) { 25 | var begs, beg, left, right, result; 26 | var ai = str.indexOf(a); 27 | var bi = str.indexOf(b, ai + 1); 28 | var i = ai; 29 | 30 | if (ai >= 0 && bi > 0) { 31 | begs = []; 32 | left = str.length; 33 | 34 | while (i >= 0 && !result) { 35 | if (i == ai) { 36 | begs.push(i); 37 | ai = str.indexOf(a, i + 1); 38 | } else if (begs.length == 1) { 39 | result = [ begs.pop(), bi ]; 40 | } else { 41 | beg = begs.pop(); 42 | if (beg < left) { 43 | left = beg; 44 | right = bi; 45 | } 46 | 47 | bi = str.indexOf(b, i + 1); 48 | } 49 | 50 | i = ai < bi && ai >= 0 ? ai : bi; 51 | } 52 | 53 | if (begs.length) { 54 | result = [ left, right ]; 55 | } 56 | } 57 | 58 | return result; 59 | } 60 | -------------------------------------------------------------------------------- /node_modules/botgram/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | env: 2 | node: true 3 | extends: 'eslint:recommended' 4 | rules: 5 | indent: 6 | - error 7 | - 2 8 | linebreak-style: 9 | - error 10 | - unix 11 | quotes: 12 | - error 13 | - double 14 | semi: 15 | - error 16 | - always 17 | -------------------------------------------------------------------------------- /node_modules/botgram/CNAME: -------------------------------------------------------------------------------- 1 | botgram.js.org -------------------------------------------------------------------------------- /node_modules/botgram/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016-2017, Xavier Mendez and the Botgram authors 2 | 3 | Permission to use, copy, modify, and distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /node_modules/botgram/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-tactile -------------------------------------------------------------------------------- /node_modules/botgram/docs/index.md: -------------------------------------------------------------------------------- 1 | # Botgram documentation 2 | 3 | 1. **[Tutorial](tutorial.md)**: overview of Botgram's API for beginners. 4 | 2. **[Message object](message.md)**: documents the format of the message object passed to handlers. 5 | 3. **[Message handling](handlers.md)**: documents the different options for registering handlers. 6 | 4. **[Reply queues](reply.md)**: documents the send interface of Botgram; the reply queues. 7 | 5. **[Inline queries](inline.md)**: documents support for inline bots. 8 | 6. **[Callback queries](callback.md)**: documents support for callback queries. 9 | 7. **[Global methods](global.md)**: documents bot creation, global options and methods. 10 | -------------------------------------------------------------------------------- /node_modules/botgram/docs/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/botgram/docs/splash.png -------------------------------------------------------------------------------- /node_modules/botgram/examples/README.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | This directory contains simple examples demonstrating Botgram's API. 4 | Some also serve as development tools. 5 | 6 | To run an example, pass the API token as an argument: 7 | 8 | ~~~ bash 9 | node print.js 10 | ~~~ 11 | 12 | There are also more complex (and practical) examples that are maintained 13 | in their own repositories: 14 | 15 | - [**Shell bot**](https://github.com/botgram/shell-bot): 16 | Runs terminal commands, sends the live output and allows the user to interact. 17 | 18 | - [**Explode game bot**](https://github.com/botgram/explode-game-bot): 19 | Simple bot offering a simple 'chain reaction' HTML5 game, based on [this pen](https://codepen.io/towc/pen/BfAhe). 20 | -------------------------------------------------------------------------------- /node_modules/botgram/examples/counter.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // Bot holding a single counter, allowing anyone to increment it and see its value. 3 | // Usage: ./counter.js 4 | 5 | var botgram = require(".."); 6 | var bot = botgram(process.argv[2]); 7 | var counter = 0; 8 | 9 | bot.command("start", "help", function (msg, reply, next) { 10 | reply.text("Use /up to increment the counter! \u261D"); 11 | }); 12 | 13 | bot.command("up", function (msg, reply, next) { 14 | counter++; 15 | reply.text(counter.toString().split("").map(numberToEmoji).join("")); 16 | }); 17 | 18 | function numberToEmoji(n) { return n + "\u20E3"; } 19 | -------------------------------------------------------------------------------- /node_modules/botgram/examples/delete_echo.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // This bot works like the echo example, only each echoed message has an 3 | // inline button that tells the bot to delete it when pressed. 4 | // Usage: ./delete_echo.js 5 | 6 | var botgram = require(".."); 7 | var bot = botgram(process.argv[2]); 8 | 9 | bot.message(function (msg, reply, next) { 10 | try { 11 | reply.inlineKeyboard([ 12 | [ { text: "🔪 Delete", callback_data: "delete_echo.deleteMe" } ] 13 | ]).message(msg); 14 | } catch (err) { 15 | reply.text("Couldn't resend that."); 16 | } 17 | }); 18 | 19 | bot.callback(function (query, next) { 20 | // Verify this query is, indeed, for us 21 | if (query.data !== "delete_echo.deleteMe") return next(); 22 | 23 | // Try to delete the message where the button was pressed 24 | try { 25 | // first, get the reply queue 26 | var reply = bot.reply(query.message.chat); 27 | // delete the message 28 | reply.deleteMessage(query.message).then(whenDeleted); 29 | } catch (err) { whenDeleted(err); } 30 | 31 | // Always answer the query when done 32 | function whenDeleted(err) { 33 | if (err) 34 | query.answer({ text: "Couldn't delete message", alert: true }); 35 | else 36 | query.answer({ text: "Deleted!" }); 37 | } 38 | }); 39 | -------------------------------------------------------------------------------- /node_modules/botgram/examples/echo.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // This bot echoes back whatever you send to it. 3 | // Usage: ./echo.js 4 | 5 | var botgram = require(".."); 6 | var bot = botgram(process.argv[2]); 7 | 8 | bot.message(function (msg, reply, next) { 9 | reply.text("You said:"); 10 | try { 11 | reply.message(msg); 12 | } catch (err) { 13 | reply.text("Couldn't resend that."); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /node_modules/botgram/examples/edit_echo.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // This bot echoes back whatever you send to it, similar to 3 | // the echo example, but also replays edits you make to your 4 | // messages. 5 | // Usage: ./edit_echo.js 6 | 7 | var botgram = require(".."); 8 | var bot = botgram(process.argv[2]); 9 | 10 | // Maps received messages to sent messages. `sent_messages[id]` 11 | // is a promise for our (last edit of) user's message with `id`. 12 | var sentMessages = {}; 13 | 14 | bot.message(function (msg, reply, next) { 15 | sentMessages[msg.id] = reply.message(msg).then(); 16 | }); 17 | 18 | // Receive edits to messages 19 | bot.edited.all(function (msg, reply, next) { 20 | // If we didn't echo this message, we can't edit it either 21 | if (!sentMessages[msg.id]) return; 22 | 23 | // If this is a text message, edit it 24 | if (msg.text) { 25 | sentMessages[msg.id] = sentMessages[msg.id].then(function (ownMsg) { 26 | return reply.editText(ownMsg, msg.text).then(); 27 | }); 28 | } 29 | 30 | // If the message has a caption, edit it 31 | if (msg.caption) { 32 | sentMessages[msg.id] = sentMessages[msg.id].then(function (ownMsg) { 33 | return reply.editCaption(ownMsg, msg.caption).then(); 34 | }); 35 | } 36 | }); 37 | -------------------------------------------------------------------------------- /node_modules/botgram/examples/flush.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // Bot that just discards all queued updates and exits. 3 | // Useful when developing, or just to test the auth token. 4 | // Usage: ./flush.sh 5 | 6 | var botgram = require(".."); 7 | var bot = botgram(process.argv[2], {timeout: 1}); 8 | 9 | bot.on("ready", function () { 10 | console.log("Authenticated, discarding updates..."); 11 | }); 12 | 13 | bot.on("synced", function () { 14 | bot.stop(); 15 | }); 16 | -------------------------------------------------------------------------------- /node_modules/botgram/examples/forward.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // This bot forwards every message it receives to a certain user. 3 | // Usage: ./forward.js 4 | 5 | var botgram = require(".."); 6 | var bot = botgram(process.argv[2]); 7 | var target = parseInt(process.argv[3]); 8 | if (isNaN(target)) process.exit(1); 9 | 10 | bot.message(function (msg, reply, next) { 11 | reply.to(target).forward(msg); 12 | }); 13 | -------------------------------------------------------------------------------- /node_modules/botgram/examples/print.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // Bot that prints all received messages and edits to the console. 3 | // Useful when developing, or just to test the auth token. 4 | // Usage: ./print.sh 5 | 6 | var botgram = require(".."); 7 | var bot = botgram(process.argv[2], {ignoreUnknown: false}); 8 | var util = require("util"); 9 | 10 | bot.ready(function () { 11 | console.log("I'm user %s (%s).", bot.get("id"), bot.get("firstname")); 12 | }); 13 | 14 | bot.synced(function () { 15 | console.log("\nTalk to me: %s", bot.link()); 16 | console.log("Waiting for messages..."); 17 | }); 18 | 19 | function handler(msg, reply, next) { 20 | var type = msg.type ? msg.type : "unknown message"; 21 | type = msg.edited ? ("Edited " + type) : capitalize(type); 22 | console.log("\n%s at %s %s (%s):", type, msg.chat.type, msg.chat.id, msg.chat.name); 23 | console.log(util.inspect(msg, {colors: true, depth: null})); 24 | } 25 | 26 | bot.all(handler); 27 | bot.edited.all(handler); 28 | 29 | function capitalize(s) { 30 | return s[0].toUpperCase() + s.slice(1); 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/botgram/examples/stallman.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // Remove privacy mode on this bot, then add it to groups to correct 3 | // fellows who say Linux without the accompanying "GNU/". 4 | // Usage: ./stallman.js 5 | 6 | var botgram = require(".."); 7 | var bot = botgram(process.argv[2]); 8 | 9 | var rant = "When you say Linux, you probably mean the GNU operating " + 10 | "system, running Linux as the kernel. You should therefore say " + 11 | "GNU/Linux or GNU+Linux."; 12 | 13 | bot.text(function (msg, reply, next) { 14 | var text = msg.text.toLowerCase(); 15 | if (text.indexOf("linux") != -1 && text.indexOf("gnu") == -1) 16 | reply.reply(msg).text(rant); 17 | }); 18 | -------------------------------------------------------------------------------- /node_modules/botgram/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/bot"); 2 | -------------------------------------------------------------------------------- /node_modules/botgram/lib/inline.js: -------------------------------------------------------------------------------- 1 | // Inline query facility. This handles incoming updates related 2 | // to inline bot queries, and query answering. 3 | 4 | //var utils = require("./utils"); 5 | 6 | var model = require("./model"); 7 | 8 | // Entry point for the inline facility. This initializes everything 9 | // and registers the processInlineQuery method so we can be called to 10 | // process queries as they arrive. 11 | function initInline() { 12 | // Export processInlineQuery and processChosenInlineResult so we can be called 13 | this.processInlineQuery = processInlineQuery; 14 | this.processChosenInlineResult = processChosenInlineResult; 15 | 16 | // User facing API 17 | this.query = function query(handler) { 18 | this.inlineQueryHandler = handler; 19 | }; 20 | this.chosenResult = function chosenResult(handler) { 21 | this.chosenInlineResultHandler = handler; 22 | }; 23 | } 24 | 25 | function processInlineQuery(query) { 26 | if (!this.inlineQueryHandler) return; 27 | query = new model.InlineQuery().parse(query, this.options); 28 | query.queued = !this.firstCycleDone; 29 | // TODO: set query.answer 30 | 31 | return this.inlineQueryHandler.call(this, query); 32 | } 33 | 34 | function processChosenInlineResult(choice) { 35 | if (!this.chosenInlineResultHandler) return; 36 | choice = new model.ChosenInlineResult().parse(choice, this.options); 37 | choice.queued = !this.firstCycleDone; 38 | 39 | return this.chosenInlineResultHandler.call(this, choice); 40 | } 41 | 42 | 43 | 44 | exports.initInline = initInline; 45 | -------------------------------------------------------------------------------- /node_modules/botgram/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "botgram@^2.2", 3 | "_id": "botgram@2.2.0", 4 | "_inBundle": false, 5 | "_integrity": "sha512-MUgWtCkTa9M5SgJfN6HA8As6MRy8UVaFMcG8WrqaQB4B2kqtqdIrDRWHm5n5t97xzDCKgbBmSSXnrRuy/7dD5w==", 6 | "_location": "/botgram", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "botgram@^2.2", 12 | "name": "botgram", 13 | "escapedName": "botgram", 14 | "rawSpec": "^2.2", 15 | "saveSpec": null, 16 | "fetchSpec": "^2.2" 17 | }, 18 | "_requiredBy": [ 19 | "/" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/botgram/-/botgram-2.2.0.tgz", 22 | "_shasum": "3775a52d4249b070af55920c8be26aa3bee127ff", 23 | "_spec": "botgram@^2.2", 24 | "_where": "/home/denomparkour/shell-bot", 25 | "author": { 26 | "name": "Xavier Mendez", 27 | "email": "me@jmendeth.com", 28 | "url": "https://jmendeth.com" 29 | }, 30 | "bugs": { 31 | "url": "https://github.com/botgram/botgram/issues" 32 | }, 33 | "bundleDependencies": false, 34 | "dependencies": { 35 | "escape-html": "1", 36 | "form-data": ">= 1.0.0-rc3", 37 | "minimatch": "3" 38 | }, 39 | "deprecated": false, 40 | "description": "Microframework to build Telegram bots.", 41 | "devDependencies": { 42 | "eslint": "^4.4.1" 43 | }, 44 | "homepage": "https://github.com/botgram/botgram", 45 | "keywords": [ 46 | "telegram", 47 | "bot" 48 | ], 49 | "license": "MIT", 50 | "main": "index.js", 51 | "name": "botgram", 52 | "repository": { 53 | "type": "git", 54 | "url": "git+https://github.com/botgram/botgram.git" 55 | }, 56 | "version": "2.2.0" 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/brace-expansion/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013 Julian Gruber 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/combined-stream/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Debuggable Limited 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/combined-stream/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | delayed-stream@~1.0.0: 6 | version "1.0.0" 7 | resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 8 | 9 | far@~0.0.7: 10 | version "0.0.7" 11 | resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7" 12 | dependencies: 13 | oop "0.0.3" 14 | 15 | oop@0.0.3: 16 | version "0.0.3" 17 | resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401" 18 | -------------------------------------------------------------------------------- /node_modules/concat-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /node_modules/concat-map/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/concat-map/README.markdown: -------------------------------------------------------------------------------- 1 | concat-map 2 | ========== 3 | 4 | Concatenative mapdashery. 5 | 6 | [![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) 7 | 8 | [![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) 9 | 10 | example 11 | ======= 12 | 13 | ``` js 14 | var concatMap = require('concat-map'); 15 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 16 | var ys = concatMap(xs, function (x) { 17 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 18 | }); 19 | console.dir(ys); 20 | ``` 21 | 22 | *** 23 | 24 | ``` 25 | [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] 26 | ``` 27 | 28 | methods 29 | ======= 30 | 31 | ``` js 32 | var concatMap = require('concat-map') 33 | ``` 34 | 35 | concatMap(xs, fn) 36 | ----------------- 37 | 38 | Return an array of concatenated elements by calling `fn(x, i)` for each element 39 | `x` and each index `i` in the array `xs`. 40 | 41 | When `fn(x, i)` returns an array, its result will be concatenated with the 42 | result array. If `fn(x, i)` returns anything else, that value will be pushed 43 | onto the end of the result array. 44 | 45 | install 46 | ======= 47 | 48 | With [npm](http://npmjs.org) do: 49 | 50 | ``` 51 | npm install concat-map 52 | ``` 53 | 54 | license 55 | ======= 56 | 57 | MIT 58 | 59 | notes 60 | ===== 61 | 62 | This module was written while sitting high above the ground in a tree. 63 | -------------------------------------------------------------------------------- /node_modules/concat-map/example/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 3 | var ys = concatMap(xs, function (x) { 4 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 5 | }); 6 | console.dir(ys); 7 | -------------------------------------------------------------------------------- /node_modules/concat-map/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (xs, fn) { 2 | var res = []; 3 | for (var i = 0; i < xs.length; i++) { 4 | var x = fn(xs[i], i); 5 | if (isArray(x)) res.push.apply(res, x); 6 | else res.push(x); 7 | } 8 | return res; 9 | }; 10 | 11 | var isArray = Array.isArray || function (xs) { 12 | return Object.prototype.toString.call(xs) === '[object Array]'; 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/concat-map/test/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var test = require('tape'); 3 | 4 | test('empty or not', function (t) { 5 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 6 | var ixes = []; 7 | var ys = concatMap(xs, function (x, ix) { 8 | ixes.push(ix); 9 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 10 | }); 11 | t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); 12 | t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); 13 | t.end(); 14 | }); 15 | 16 | test('always something', function (t) { 17 | var xs = [ 'a', 'b', 'c', 'd' ]; 18 | var ys = concatMap(xs, function (x) { 19 | return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; 20 | }); 21 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 22 | t.end(); 23 | }); 24 | 25 | test('scalars', function (t) { 26 | var xs = [ 'a', 'b', 'c', 'd' ]; 27 | var ys = concatMap(xs, function (x) { 28 | return x === 'b' ? [ 'B', 'B', 'B' ] : x; 29 | }); 30 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 31 | t.end(); 32 | }); 33 | 34 | test('undefs', function (t) { 35 | var xs = [ 'a', 'b', 'c', 'd' ]; 36 | var ys = concatMap(xs, function () {}); 37 | t.same(ys, [ undefined, undefined, undefined, undefined ]); 38 | t.end(); 39 | }); 40 | -------------------------------------------------------------------------------- /node_modules/debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /** 4 | * Detect Electron renderer / nwjs process, which is node, but we should 5 | * treat as a browser. 6 | */ 7 | if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { 8 | module.exports = require('./browser.js'); 9 | } else { 10 | module.exports = require('./node.js'); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /node_modules/delayed-stream/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /node_modules/delayed-stream/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Debuggable Limited 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/delayed-stream/Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | test: 4 | @./test/run.js 5 | 6 | .PHONY: test 7 | 8 | -------------------------------------------------------------------------------- /node_modules/es6-promise/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/es6-promise/auto.js: -------------------------------------------------------------------------------- 1 | // This file can be required in Browserify and Node.js for automatic polyfill 2 | // To use it: require('es6-promise/auto'); 3 | 'use strict'; 4 | module.exports = require('./').polyfill(); 5 | -------------------------------------------------------------------------------- /node_modules/es6-promise/lib/es6-promise.auto.js: -------------------------------------------------------------------------------- 1 | import Promise from './es6-promise'; 2 | Promise.polyfill(); 3 | export default Promise; 4 | -------------------------------------------------------------------------------- /node_modules/es6-promise/lib/es6-promise.js: -------------------------------------------------------------------------------- 1 | import Promise from './es6-promise/promise'; 2 | import polyfill from './es6-promise/polyfill'; 3 | 4 | // Strange compat.. 5 | Promise.polyfill = polyfill; 6 | Promise.Promise = Promise; 7 | export default Promise; 8 | -------------------------------------------------------------------------------- /node_modules/es6-promise/lib/es6-promise/polyfill.js: -------------------------------------------------------------------------------- 1 | /*global self*/ 2 | import Promise from './promise'; 3 | 4 | export default function polyfill() { 5 | let local; 6 | 7 | if (typeof global !== 'undefined') { 8 | local = global; 9 | } else if (typeof self !== 'undefined') { 10 | local = self; 11 | } else { 12 | try { 13 | local = Function('return this')(); 14 | } catch (e) { 15 | throw new Error('polyfill failed because global object is unavailable in this environment'); 16 | } 17 | } 18 | 19 | let P = local.Promise; 20 | 21 | if (P) { 22 | var promiseToString = null; 23 | try { 24 | promiseToString = Object.prototype.toString.call(P.resolve()); 25 | } catch(e) { 26 | // silently ignored 27 | } 28 | 29 | if (promiseToString === '[object Promise]' && !P.cast){ 30 | return; 31 | } 32 | } 33 | 34 | local.Promise = Promise; 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/es6-promise/lib/es6-promise/promise/reject.js: -------------------------------------------------------------------------------- 1 | import { 2 | noop, 3 | reject as _reject 4 | } from '../-internal'; 5 | 6 | /** 7 | `Promise.reject` returns a promise rejected with the passed `reason`. 8 | It is shorthand for the following: 9 | 10 | ```javascript 11 | let promise = new Promise(function(resolve, reject){ 12 | reject(new Error('WHOOPS')); 13 | }); 14 | 15 | promise.then(function(value){ 16 | // Code here doesn't run because the promise is rejected! 17 | }, function(reason){ 18 | // reason.message === 'WHOOPS' 19 | }); 20 | ``` 21 | 22 | Instead of writing the above, your code now simply becomes the following: 23 | 24 | ```javascript 25 | let promise = Promise.reject(new Error('WHOOPS')); 26 | 27 | promise.then(function(value){ 28 | // Code here doesn't run because the promise is rejected! 29 | }, function(reason){ 30 | // reason.message === 'WHOOPS' 31 | }); 32 | ``` 33 | 34 | @method reject 35 | @static 36 | @param {Any} reason value that the returned promise will be rejected with. 37 | Useful for tooling. 38 | @return {Promise} a promise rejected with the given `reason`. 39 | */ 40 | export default function reject(reason) { 41 | /*jshint validthis:true */ 42 | let Constructor = this; 43 | let promise = new Constructor(noop); 44 | _reject(promise, reason); 45 | return promise; 46 | } 47 | -------------------------------------------------------------------------------- /node_modules/es6-promise/lib/es6-promise/promise/resolve.js: -------------------------------------------------------------------------------- 1 | import { 2 | noop, 3 | resolve as _resolve 4 | } from '../-internal'; 5 | 6 | /** 7 | `Promise.resolve` returns a promise that will become resolved with the 8 | passed `value`. It is shorthand for the following: 9 | 10 | ```javascript 11 | let promise = new Promise(function(resolve, reject){ 12 | resolve(1); 13 | }); 14 | 15 | promise.then(function(value){ 16 | // value === 1 17 | }); 18 | ``` 19 | 20 | Instead of writing the above, your code now simply becomes the following: 21 | 22 | ```javascript 23 | let promise = Promise.resolve(1); 24 | 25 | promise.then(function(value){ 26 | // value === 1 27 | }); 28 | ``` 29 | 30 | @method resolve 31 | @static 32 | @param {Any} value value that the returned promise will be resolved with 33 | Useful for tooling. 34 | @return {Promise} a promise that will become fulfilled with the given 35 | `value` 36 | */ 37 | export default function resolve(object) { 38 | /*jshint validthis:true */ 39 | let Constructor = this; 40 | 41 | if (object && typeof object === 'object' && object.constructor === Constructor) { 42 | return object; 43 | } 44 | 45 | let promise = new Constructor(noop); 46 | _resolve(promise, object); 47 | return promise; 48 | } 49 | -------------------------------------------------------------------------------- /node_modules/es6-promise/lib/es6-promise/then.js: -------------------------------------------------------------------------------- 1 | import { 2 | invokeCallback, 3 | subscribe, 4 | FULFILLED, 5 | REJECTED, 6 | noop, 7 | makePromise, 8 | PROMISE_ID 9 | } from './-internal'; 10 | 11 | import { asap } from './asap'; 12 | 13 | export default function then(onFulfillment, onRejection) { 14 | const parent = this; 15 | 16 | const child = new this.constructor(noop); 17 | 18 | if (child[PROMISE_ID] === undefined) { 19 | makePromise(child); 20 | } 21 | 22 | const { _state } = parent; 23 | 24 | if (_state) { 25 | const callback = arguments[_state - 1]; 26 | asap(() => invokeCallback(_state, child, callback, parent._result)); 27 | } else { 28 | subscribe(parent, child, onFulfillment, onRejection); 29 | } 30 | 31 | return child; 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/es6-promise/lib/es6-promise/utils.js: -------------------------------------------------------------------------------- 1 | export function objectOrFunction(x) { 2 | let type = typeof x; 3 | return x !== null && (type === 'object' || type === 'function'); 4 | } 5 | 6 | export function isFunction(x) { 7 | return typeof x === 'function'; 8 | } 9 | 10 | export function isMaybeThenable(x) { 11 | return x !== null && typeof x === 'object'; 12 | } 13 | 14 | let _isArray; 15 | if (Array.isArray) { 16 | _isArray = Array.isArray; 17 | } else { 18 | _isArray = x => Object.prototype.toString.call(x) === '[object Array]'; 19 | } 20 | 21 | export const isArray = _isArray; 22 | -------------------------------------------------------------------------------- /node_modules/escape-html/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2013 TJ Holowaychuk 4 | Copyright (c) 2015 Andreas Lubbe 5 | Copyright (c) 2015 Tiancheng "Timothy" Gu 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /node_modules/escape-html/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # escape-html 3 | 4 | Escape string for use in HTML 5 | 6 | ## Example 7 | 8 | ```js 9 | var escape = require('escape-html'); 10 | var html = escape('foo & bar'); 11 | // -> foo & bar 12 | ``` 13 | 14 | ## Benchmark 15 | 16 | ``` 17 | $ npm run-script bench 18 | 19 | > escape-html@1.0.3 bench nodejs-escape-html 20 | > node benchmark/index.js 21 | 22 | 23 | http_parser@1.0 24 | node@0.10.33 25 | v8@3.14.5.9 26 | ares@1.9.0-DEV 27 | uv@0.10.29 28 | zlib@1.2.3 29 | modules@11 30 | openssl@1.0.1j 31 | 32 | 1 test completed. 33 | 2 tests completed. 34 | 3 tests completed. 35 | 36 | no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled) 37 | single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled) 38 | many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled) 39 | ``` 40 | 41 | ## License 42 | 43 | MIT -------------------------------------------------------------------------------- /node_modules/escape-html/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * escape-html 3 | * Copyright(c) 2012-2013 TJ Holowaychuk 4 | * Copyright(c) 2015 Andreas Lubbe 5 | * Copyright(c) 2015 Tiancheng "Timothy" Gu 6 | * MIT Licensed 7 | */ 8 | 9 | 'use strict'; 10 | 11 | /** 12 | * Module variables. 13 | * @private 14 | */ 15 | 16 | var matchHtmlRegExp = /["'&<>]/; 17 | 18 | /** 19 | * Module exports. 20 | * @public 21 | */ 22 | 23 | module.exports = escapeHtml; 24 | 25 | /** 26 | * Escape special characters in the given string of html. 27 | * 28 | * @param {string} string The string to escape for inserting into HTML 29 | * @return {string} 30 | * @public 31 | */ 32 | 33 | function escapeHtml(string) { 34 | var str = '' + string; 35 | var match = matchHtmlRegExp.exec(str); 36 | 37 | if (!match) { 38 | return str; 39 | } 40 | 41 | var escape; 42 | var html = ''; 43 | var index = 0; 44 | var lastIndex = 0; 45 | 46 | for (index = match.index; index < str.length; index++) { 47 | switch (str.charCodeAt(index)) { 48 | case 34: // " 49 | escape = '"'; 50 | break; 51 | case 38: // & 52 | escape = '&'; 53 | break; 54 | case 39: // ' 55 | escape = '''; 56 | break; 57 | case 60: // < 58 | escape = '<'; 59 | break; 60 | case 62: // > 61 | escape = '>'; 62 | break; 63 | default: 64 | continue; 65 | } 66 | 67 | if (lastIndex !== index) { 68 | html += str.substring(lastIndex, index); 69 | } 70 | 71 | lastIndex = index + 1; 72 | html += escape; 73 | } 74 | 75 | return lastIndex !== index 76 | ? html + str.substring(lastIndex, index) 77 | : html; 78 | } 79 | -------------------------------------------------------------------------------- /node_modules/escape-html/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "escape-html@1", 3 | "_id": "escape-html@1.0.3", 4 | "_inBundle": false, 5 | "_integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", 6 | "_location": "/escape-html", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "escape-html@1", 12 | "name": "escape-html", 13 | "escapedName": "escape-html", 14 | "rawSpec": "1", 15 | "saveSpec": null, 16 | "fetchSpec": "1" 17 | }, 18 | "_requiredBy": [ 19 | "/", 20 | "/botgram" 21 | ], 22 | "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 23 | "_shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988", 24 | "_spec": "escape-html@1", 25 | "_where": "/home/denomparkour/shell-bot", 26 | "bugs": { 27 | "url": "https://github.com/component/escape-html/issues" 28 | }, 29 | "bundleDependencies": false, 30 | "deprecated": false, 31 | "description": "Escape string for use in HTML", 32 | "devDependencies": { 33 | "beautify-benchmark": "0.2.4", 34 | "benchmark": "1.0.0" 35 | }, 36 | "files": [ 37 | "LICENSE", 38 | "Readme.md", 39 | "index.js" 40 | ], 41 | "homepage": "https://github.com/component/escape-html#readme", 42 | "keywords": [ 43 | "escape", 44 | "html", 45 | "utility" 46 | ], 47 | "license": "MIT", 48 | "name": "escape-html", 49 | "repository": { 50 | "type": "git", 51 | "url": "git+https://github.com/component/escape-html.git" 52 | }, 53 | "scripts": { 54 | "bench": "node benchmark/index.js" 55 | }, 56 | "version": "1.0.3" 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/form-data/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/form-data/lib/browser.js: -------------------------------------------------------------------------------- 1 | /* eslint-env browser */ 2 | module.exports = typeof self == 'object' ? self.FormData : window.FormData; 3 | -------------------------------------------------------------------------------- /node_modules/form-data/lib/populate.js: -------------------------------------------------------------------------------- 1 | // populates missing values 2 | module.exports = function(dst, src) { 3 | 4 | Object.keys(src).forEach(function(prop) 5 | { 6 | dst[prop] = dst[prop] || src[prop]; 7 | }); 8 | 9 | return dst; 10 | }; 11 | -------------------------------------------------------------------------------- /node_modules/https-proxy-agent/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | indent_size = 4 6 | tab_width = 4 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [{*.json,*.json.example,*.gyp,*.yml,*.yaml,*.workflow}] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [{*.py,*.asm}] 17 | indent_style = space 18 | 19 | [*.py] 20 | indent_size = 4 21 | 22 | [*.asm] 23 | indent_size = 8 24 | 25 | [*.md] 26 | trim_trailing_whitespace = false 27 | 28 | # Ideal settings - some plugins might support these. 29 | [*.js] 30 | quote_type = single 31 | 32 | [{*.c,*.cc,*.h,*.hh,*.cpp,*.hpp,*.m,*.mm,*.mpp,*.js,*.java,*.go,*.rs,*.php,*.ng,*.jsx,*.ts,*.d,*.cs,*.swift}] 33 | curly_bracket_next_line = false 34 | spaces_around_operators = true 35 | spaces_around_brackets = outside 36 | # close enough to 1TB 37 | indent_brace_style = K&R 38 | -------------------------------------------------------------------------------- /node_modules/https-proxy-agent/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'https-proxy-agent' { 2 | import * as https from 'https'; 3 | 4 | namespace HttpsProxyAgent { 5 | interface HttpsProxyAgentOptions { 6 | host: string; 7 | port: number | string; 8 | secureProxy?: boolean; 9 | headers?: { 10 | [key: string]: string; 11 | }; 12 | [key: string]: any; 13 | } 14 | } 15 | 16 | // HttpsProxyAgent doesnt *actually* extend https.Agent, but for my purposes I want it to pretend that it does 17 | class HttpsProxyAgent extends https.Agent { 18 | constructor(opts: HttpsProxyAgent.HttpsProxyAgentOptions | string); 19 | } 20 | 21 | export = HttpsProxyAgent; 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/ip/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /node_modules/ip/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "0.8" 5 | - "0.10" 6 | - "0.12" 7 | - "4" 8 | - "6" 9 | 10 | before_install: 11 | - travis_retry npm install -g npm@2.14.5 12 | - travis_retry npm install 13 | 14 | script: 15 | - npm test 16 | -------------------------------------------------------------------------------- /node_modules/ip/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "ip@1.1.5", 3 | "_id": "ip@1.1.5", 4 | "_inBundle": false, 5 | "_integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", 6 | "_location": "/ip", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "version", 10 | "registry": true, 11 | "raw": "ip@1.1.5", 12 | "name": "ip", 13 | "escapedName": "ip", 14 | "rawSpec": "1.1.5", 15 | "saveSpec": null, 16 | "fetchSpec": "1.1.5" 17 | }, 18 | "_requiredBy": [ 19 | "/socks" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", 22 | "_shasum": "bdded70114290828c0a039e72ef25f5aaec4354a", 23 | "_spec": "ip@1.1.5", 24 | "_where": "/home/denomparkour/shell-bot/node_modules/socks", 25 | "author": { 26 | "name": "Fedor Indutny", 27 | "email": "fedor@indutny.com" 28 | }, 29 | "bugs": { 30 | "url": "https://github.com/indutny/node-ip/issues" 31 | }, 32 | "bundleDependencies": false, 33 | "deprecated": false, 34 | "description": "[![](https://badge.fury.io/js/ip.svg)](https://www.npmjs.com/package/ip)", 35 | "devDependencies": { 36 | "jscs": "^2.1.1", 37 | "jshint": "^2.8.0", 38 | "mocha": "~1.3.2" 39 | }, 40 | "homepage": "https://github.com/indutny/node-ip", 41 | "license": "MIT", 42 | "main": "lib/ip", 43 | "name": "ip", 44 | "repository": { 45 | "type": "git", 46 | "url": "git+ssh://git@github.com/indutny/node-ip.git" 47 | }, 48 | "scripts": { 49 | "fix": "jscs lib/*.js test/*.js --fix", 50 | "test": "jscs lib/*.js test/*.js && jshint lib/*.js && mocha --reporter spec test/*-test.js" 51 | }, 52 | "version": "1.1.5" 53 | } 54 | -------------------------------------------------------------------------------- /node_modules/mime-db/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = require('./db.json') 12 | -------------------------------------------------------------------------------- /node_modules/mime-types/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/mime/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/mime/.npmignore -------------------------------------------------------------------------------- /node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/mime/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mime = require('./mime.js'); 4 | var file = process.argv[2]; 5 | var type = mime.lookup(file); 6 | 7 | process.stdout.write(type + '\n'); 8 | 9 | -------------------------------------------------------------------------------- /node_modules/mime/src/build.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const fs = require('fs'); 6 | const path = require('path'); 7 | const mimeScore = require('mime-score'); 8 | 9 | let db = require('mime-db'); 10 | let chalk = require('chalk'); 11 | 12 | const STANDARD_FACET_SCORE = 900; 13 | 14 | const byExtension = {}; 15 | 16 | // Clear out any conflict extensions in mime-db 17 | for (let type in db) { 18 | let entry = db[type]; 19 | entry.type = type; 20 | 21 | if (!entry.extensions) continue; 22 | 23 | entry.extensions.forEach(ext => { 24 | if (ext in byExtension) { 25 | const e0 = entry; 26 | const e1 = byExtension[ext]; 27 | e0.pri = mimeScore(e0.type, e0.source); 28 | e1.pri = mimeScore(e1.type, e1.source); 29 | 30 | let drop = e0.pri < e1.pri ? e0 : e1; 31 | let keep = e0.pri >= e1.pri ? e0 : e1; 32 | drop.extensions = drop.extensions.filter(e => e !== ext); 33 | 34 | console.log(`${ext}: Keeping ${chalk.green(keep.type)} (${keep.pri}), dropping ${chalk.red(drop.type)} (${drop.pri})`); 35 | } 36 | byExtension[ext] = entry; 37 | }); 38 | } 39 | 40 | function writeTypesFile(types, path) { 41 | fs.writeFileSync(path, JSON.stringify(types)); 42 | } 43 | 44 | // Segregate into standard and non-standard types based on facet per 45 | // https://tools.ietf.org/html/rfc6838#section-3.1 46 | const types = {}; 47 | 48 | Object.keys(db).sort().forEach(k => { 49 | const entry = db[k]; 50 | types[entry.type] = entry.extensions; 51 | }); 52 | 53 | writeTypesFile(types, path.join(__dirname, '..', 'types.json')); 54 | -------------------------------------------------------------------------------- /node_modules/minimatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/nan/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright (c) 2018 NAN contributors 5 | ----------------------------------- 6 | 7 | *NAN contributors listed at * 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 | -------------------------------------------------------------------------------- /node_modules/nan/doc/script.md: -------------------------------------------------------------------------------- 1 | ## Script 2 | 3 | NAN provides a `v8::Script` helpers as the API has changed over the supported versions of V8. 4 | 5 | - Nan::CompileScript() 6 | - Nan::RunScript() 7 | 8 | 9 | 10 | ### Nan::CompileScript() 11 | 12 | A wrapper around [`v8::ScriptCompiler::Compile()`](https://v8docs.nodesource.com/node-8.11/da/da5/classv8_1_1_script_compiler.html#a93f5072a0db55d881b969e9fc98e564b). 13 | 14 | Note that `Nan::BoundScript` is an alias for `v8::Script`. 15 | 16 | Signature: 17 | 18 | ```c++ 19 | Nan::MaybeLocal Nan::CompileScript( 20 | v8::Local s, 21 | const v8::ScriptOrigin& origin); 22 | Nan::MaybeLocal Nan::CompileScript(v8::Local s); 23 | ``` 24 | 25 | 26 | 27 | ### Nan::RunScript() 28 | 29 | Calls `script->Run()` or `script->BindToCurrentContext()->Run(Nan::GetCurrentContext())`. 30 | 31 | Note that `Nan::BoundScript` is an alias for `v8::Script` and `Nan::UnboundScript` is an alias for `v8::UnboundScript` where available and `v8::Script` on older versions of V8. 32 | 33 | Signature: 34 | 35 | ```c++ 36 | Nan::MaybeLocal Nan::RunScript(v8::Local script) 37 | Nan::MaybeLocal Nan::RunScript(v8::Local script) 38 | ``` 39 | -------------------------------------------------------------------------------- /node_modules/nan/include_dirs.js: -------------------------------------------------------------------------------- 1 | console.log(require('path').relative('.', __dirname)); 2 | -------------------------------------------------------------------------------- /node_modules/nan/nan_converters_pre_43_inl.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * NAN - Native Abstractions for Node.js 3 | * 4 | * Copyright (c) 2018 NAN contributors 5 | * 6 | * MIT License 7 | ********************************************************************/ 8 | 9 | #ifndef NAN_CONVERTERS_PRE_43_INL_H_ 10 | #define NAN_CONVERTERS_PRE_43_INL_H_ 11 | 12 | #define X(TYPE) \ 13 | imp::ToFactory::return_t \ 14 | imp::ToFactory::convert(v8::Local val) { \ 15 | return val->To ## TYPE(); \ 16 | } 17 | 18 | X(Boolean) 19 | X(Number) 20 | X(String) 21 | X(Object) 22 | X(Integer) 23 | X(Uint32) 24 | X(Int32) 25 | 26 | #undef X 27 | 28 | #define X(TYPE, NAME) \ 29 | imp::ToFactory::return_t \ 30 | imp::ToFactory::convert(v8::Local val) { \ 31 | return Just(val->NAME ## Value()); \ 32 | } 33 | 34 | X(bool, Boolean) 35 | X(double, Number) 36 | X(int64_t, Integer) 37 | X(uint32_t, Uint32) 38 | X(int32_t, Int32) 39 | 40 | #undef X 41 | 42 | #endif // NAN_CONVERTERS_PRE_43_INL_H_ 43 | -------------------------------------------------------------------------------- /node_modules/nan/nan_define_own_property_helper.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * NAN - Native Abstractions for Node.js 3 | * 4 | * Copyright (c) 2018 NAN contributors 5 | * 6 | * MIT License 7 | ********************************************************************/ 8 | 9 | #ifndef NAN_DEFINE_OWN_PROPERTY_HELPER_H_ 10 | #define NAN_DEFINE_OWN_PROPERTY_HELPER_H_ 11 | 12 | namespace imp { 13 | 14 | inline Maybe DefineOwnPropertyHelper( 15 | v8::PropertyAttribute current 16 | , v8::Handle obj 17 | , v8::Handle key 18 | , v8::Handle value 19 | , v8::PropertyAttribute attribs = v8::None) { 20 | return !(current & v8::DontDelete) || // configurable OR 21 | (!(current & v8::ReadOnly) && // writable AND 22 | !((attribs ^ current) & ~v8::ReadOnly)) // same excluding RO 23 | ? Just(obj->ForceSet(key, value, attribs)) 24 | : Nothing(); 25 | } 26 | 27 | } // end of namespace imp 28 | 29 | #endif // NAN_DEFINE_OWN_PROPERTY_HELPER_H_ 30 | -------------------------------------------------------------------------------- /node_modules/nan/tools/README.md: -------------------------------------------------------------------------------- 1 | 1to2 naively converts source code files from NAN 1 to NAN 2. There will be erroneous conversions, 2 | false positives and missed opportunities. The input files are rewritten in place. Make sure that 3 | you have backups. You will have to manually review the changes afterwards and do some touchups. 4 | 5 | ```sh 6 | $ tools/1to2.js 7 | 8 | Usage: 1to2 [options] 9 | 10 | Options: 11 | 12 | -h, --help output usage information 13 | -V, --version output the version number 14 | ``` 15 | -------------------------------------------------------------------------------- /node_modules/nan/tools/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "1to2", 3 | "version": "1.0.0", 4 | "description": "NAN 1 -> 2 Migration Script", 5 | "main": "1to2.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/nodejs/nan.git" 9 | }, 10 | "contributors": [ 11 | "Benjamin Byholm (https://github.com/kkoopa/)", 12 | "Mathias Küsel (https://github.com/mathiask88/)" 13 | ], 14 | "dependencies": { 15 | "glob": "~5.0.10", 16 | "commander": "~2.8.1" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/node-pty/build/Release/pty.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/node-pty/build/Release/pty.node -------------------------------------------------------------------------------- /node_modules/node-pty/build/binding.Makefile: -------------------------------------------------------------------------------- 1 | # This file is generated by gyp; do not edit. 2 | 3 | export builddir_name ?= ./build/. 4 | .PHONY: all 5 | all: 6 | $(MAKE) pty 7 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/.editorconfig: -------------------------------------------------------------------------------- 1 | # Have editor config ignore this directory 2 | root = true 3 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/.drone.yml: -------------------------------------------------------------------------------- 1 | # Build configure for https://www.tea-ci.org (fork of Drone CI with Msys2 support) 2 | build: 3 | image: teaci/msys$$arch 4 | pull: true 5 | shell: msys$$arch 6 | commands: 7 | - pacman -S --needed --noconfirm --noprogressbar mingw-w64-cross-gcc mingw-w64-cross-crt-git 8 | - ./configure 9 | - make 10 | - make tests 11 | - build/trivial_test.exe 12 | - mintty --log - --exec build/winpty.exe cmd /c ver | grep Windows 13 | 14 | matrix: 15 | arch: 16 | - 64 17 | - 32 18 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.bat text eol=crlf 3 | *.c text 4 | *.cc text 5 | *.gyp text 6 | *.gypi text 7 | *.h text 8 | *.ps1 text eol=crlf 9 | *.rst text 10 | *.sh text 11 | *.txt text 12 | .gitignore text 13 | .gitattributes text 14 | Makefile text 15 | configure text 16 | 17 | *.sh eol=lf 18 | configure eol=lf 19 | VERSION.txt eol=lf 20 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/.npmignore: -------------------------------------------------------------------------------- 1 | *.sln 2 | *.suo 3 | *.vcxproj 4 | *.vcxproj.filters 5 | *.pyc 6 | winpty.sdf 7 | winpty.opensdf 8 | /config.mk 9 | /build 10 | /build-gyp 11 | /build-libpty 12 | /ship/packages 13 | /src/Default 14 | /src/Release 15 | /src/gen 16 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2016 Ryan Prichard 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to 7 | deal in the Software without restriction, including without limitation the 8 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | sell copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/VERSION.txt: -------------------------------------------------------------------------------- 1 | 0.4.4-dev 2 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/.npmignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | UnixEcho -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/DebugClient.py: -------------------------------------------------------------------------------- 1 | #!python 2 | # Run with native CPython. Needs pywin32 extensions. 3 | 4 | # Copyright (c) 2011-2012 Ryan Prichard 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to 8 | # deal in the Software without restriction, including without limitation the 9 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 | # sell copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in 14 | # all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 22 | # IN THE SOFTWARE. 23 | 24 | import winerror 25 | import win32pipe 26 | import win32file 27 | import win32api 28 | import sys 29 | import pywintypes 30 | import time 31 | 32 | if len(sys.argv) != 2: 33 | print("Usage: %s message" % sys.argv[0]) 34 | sys.exit(1) 35 | 36 | message = "[%05.3f %s]: %s" % (time.time() % 100000, sys.argv[0], sys.argv[1]) 37 | 38 | win32pipe.CallNamedPipe( 39 | "\\\\.\\pipe\\DebugServer", 40 | message.encode(), 41 | 16, 42 | win32pipe.NMPWAIT_WAIT_FOREVER) 43 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/DumpLines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | 4 | for i in range(1, int(sys.argv[1]) + 1): 5 | print i, "X" * 78 6 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/MinimumWindowWidths.txt: -------------------------------------------------------------------------------- 1 | The narrowest allowed console window, in pixels, on a conventional (~96dpi) 2 | monitor: 3 | 4 | (mode con: cols=40 lines=40) && SetFont.exe -face "Lucida Console" -h 1 && (ping -n 4 127.0.0.1 > NUL) && cls && GetConsolePos.exe && SetFont.exe -face "Lucida Console" -h 12 5 | 6 | (mode con: cols=40 lines=40) && SetFont.exe -face "Lucida Console" -h 16 && (ping -n 4 127.0.0.1 > NUL) && cls && GetConsolePos.exe && SetFont.exe -face "Lucida Console" -h 12 7 | 8 | sz1:px sz1:col sz16:px sz16:col 9 | Vista: 124 104 137 10 10 | Windows 7: 132 112 147 11 11 | Windows 8: 140 120 147 11 12 | Windows 8.1: 140 120 147 11 13 | Windows 10 OLD: 136 116 147 11 14 | Windows 10 NEW: 136 103 136 10 15 | 16 | I used build 14342 to test Windows 10. 17 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Font-Report-June2016/Results.txt: -------------------------------------------------------------------------------- 1 | As before, avoid odd sizes in favor of even sizes. 2 | 3 | It's curious that the Japanese font is handled so poorly, especially with 4 | Windows 8 and later. 5 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/FormatChar.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | static inline void formatChar(char *str, char ch) 6 | { 7 | // Print some common control codes. 8 | switch (ch) { 9 | case '\r': strcpy(str, "CR "); break; 10 | case '\n': strcpy(str, "LF "); break; 11 | case ' ': strcpy(str, "SP "); break; 12 | case 27: strcpy(str, "^[ "); break; 13 | case 3: strcpy(str, "^C "); break; 14 | default: 15 | if (isgraph(ch)) 16 | sprintf(str, "%c ", ch); 17 | else 18 | sprintf(str, "%02x ", ch); 19 | break; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/GetCh.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() { 6 | printf("\nPress any keys -- Ctrl-D exits\n\n"); 7 | 8 | while (true) { 9 | const int ch = getch(); 10 | printf("0x%x", ch); 11 | if (isgraph(ch)) { 12 | printf(" '%c'", ch); 13 | } 14 | printf("\n"); 15 | if (ch == 0x4) { // Ctrl-D 16 | break; 17 | } 18 | } 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/GetConsolePos.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include "TestUtil.cc" 6 | 7 | int main() { 8 | const HANDLE conout = openConout(); 9 | 10 | CONSOLE_SCREEN_BUFFER_INFO info = {}; 11 | BOOL ret = GetConsoleScreenBufferInfo(conout, &info); 12 | ASSERT(ret && "GetConsoleScreenBufferInfo failed"); 13 | 14 | trace("cursor=%d,%d", info.dwCursorPosition.X, info.dwCursorPosition.Y); 15 | printf("cursor=%d,%d\n", info.dwCursorPosition.X, info.dwCursorPosition.Y); 16 | 17 | trace("srWindow={L=%d,T=%d,R=%d,B=%d}", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom); 18 | printf("srWindow={L=%d,T=%d,R=%d,B=%d}\n", info.srWindow.Left, info.srWindow.Top, info.srWindow.Right, info.srWindow.Bottom); 19 | 20 | trace("dwSize=%d,%d", info.dwSize.X, info.dwSize.Y); 21 | printf("dwSize=%d,%d\n", info.dwSize.X, info.dwSize.Y); 22 | 23 | const HWND hwnd = GetConsoleWindow(); 24 | if (hwnd != NULL) { 25 | RECT r = {}; 26 | if (GetWindowRect(hwnd, &r)) { 27 | const int w = r.right - r.left; 28 | const int h = r.bottom - r.top; 29 | trace("hwnd: pos=(%d,%d) size=(%d,%d)", r.left, r.top, w, h); 30 | printf("hwnd: pos=(%d,%d) size=(%d,%d)\n", r.left, r.top, w, h); 31 | } else { 32 | trace("GetWindowRect failed"); 33 | printf("GetWindowRect failed\n"); 34 | } 35 | } else { 36 | trace("GetConsoleWindow returned NULL"); 37 | printf("GetConsoleWindow returned NULL\n"); 38 | } 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/MoveConsoleWindow.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "TestUtil.cc" 4 | 5 | int main(int argc, char *argv[]) { 6 | if (argc != 3 && argc != 5) { 7 | printf("Usage: %s x y\n", argv[0]); 8 | printf("Usage: %s x y width height\n", argv[0]); 9 | return 1; 10 | } 11 | 12 | HWND hwnd = GetConsoleWindow(); 13 | 14 | const int x = atoi(argv[1]); 15 | const int y = atoi(argv[2]); 16 | 17 | int w = 0, h = 0; 18 | if (argc == 3) { 19 | RECT r = {}; 20 | BOOL ret = GetWindowRect(hwnd, &r); 21 | ASSERT(ret && "GetWindowRect failed on console window"); 22 | w = r.right - r.left; 23 | h = r.bottom - r.top; 24 | } else { 25 | w = atoi(argv[3]); 26 | h = atoi(argv[4]); 27 | } 28 | 29 | BOOL ret = MoveWindow(hwnd, x, y, w, h, TRUE); 30 | trace("MoveWindow: ret=%d", ret); 31 | printf("MoveWindow: ret=%d\n", ret); 32 | 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/OSVersion.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | int main() { 10 | setlocale(LC_ALL, ""); 11 | 12 | OSVERSIONINFOEXW info = {0}; 13 | info.dwOSVersionInfoSize = sizeof(info); 14 | assert(GetVersionExW((OSVERSIONINFOW*)&info)); 15 | 16 | printf("dwMajorVersion = %d\n", (int)info.dwMajorVersion); 17 | printf("dwMinorVersion = %d\n", (int)info.dwMinorVersion); 18 | printf("dwBuildNumber = %d\n", (int)info.dwBuildNumber); 19 | printf("dwPlatformId = %d\n", (int)info.dwPlatformId); 20 | printf("szCSDVersion = %ls\n", info.szCSDVersion); 21 | printf("wServicePackMajor = %d\n", info.wServicePackMajor); 22 | printf("wServicePackMinor = %d\n", info.wServicePackMinor); 23 | printf("wSuiteMask = 0x%x\n", (unsigned int)info.wSuiteMask); 24 | printf("wProductType = 0x%x\n", (unsigned int)info.wProductType); 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc: -------------------------------------------------------------------------------- 1 | #define _WIN32_WINNT 0x0501 2 | #include 3 | #include 4 | 5 | #include "../src/shared/DebugClient.cc" 6 | 7 | const int SC_CONSOLE_MARK = 0xFFF2; 8 | const int SC_CONSOLE_SELECT_ALL = 0xFFF5; 9 | 10 | CALLBACK DWORD pausingThread(LPVOID dummy) 11 | { 12 | HWND hwnd = GetConsoleWindow(); 13 | while (true) { 14 | SendMessage(hwnd, WM_SYSCOMMAND, SC_CONSOLE_SELECT_ALL, 0); 15 | Sleep(1000); 16 | SendMessage(hwnd, WM_CHAR, 27, 0x00010001); 17 | Sleep(1000); 18 | } 19 | } 20 | 21 | int main() 22 | { 23 | HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); 24 | CONSOLE_SCREEN_BUFFER_INFO info; 25 | 26 | GetConsoleScreenBufferInfo(out, &info); 27 | COORD initial = info.dwCursorPosition; 28 | 29 | CreateThread(NULL, 0, 30 | pausingThread, NULL, 31 | 0, NULL); 32 | 33 | for (int i = 0; i < 30; ++i) { 34 | Sleep(100); 35 | GetConsoleScreenBufferInfo(out, &info); 36 | if (memcmp(&info.dwCursorPosition, &initial, sizeof(COORD)) != 0) { 37 | trace("cursor moved to [%d,%d]", 38 | info.dwCursorPosition.X, 39 | info.dwCursorPosition.Y); 40 | } else { 41 | trace("cursor in expected position"); 42 | } 43 | } 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/SetBufferSize.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | 6 | #include "TestUtil.cc" 7 | 8 | int main(int argc, char *argv[]) { 9 | if (argc != 3) { 10 | printf("Usage: %s x y width height\n", argv[0]); 11 | return 1; 12 | } 13 | 14 | const HANDLE conout = CreateFileW(L"CONOUT$", 15 | GENERIC_READ | GENERIC_WRITE, 16 | FILE_SHARE_READ | FILE_SHARE_WRITE, 17 | NULL, OPEN_EXISTING, 0, NULL); 18 | ASSERT(conout != INVALID_HANDLE_VALUE); 19 | 20 | COORD size = { 21 | (short)atoi(argv[1]), 22 | (short)atoi(argv[2]), 23 | }; 24 | 25 | BOOL ret = SetConsoleScreenBufferSize(conout, size); 26 | const unsigned lastError = GetLastError(); 27 | const char *const retStr = ret ? "OK" : "failed"; 28 | trace("SetConsoleScreenBufferSize ret: %s (LastError=0x%x)", retStr, lastError); 29 | printf("SetConsoleScreenBufferSize ret: %s (LastError=0x%x)\n", retStr, lastError); 30 | 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/SetCursorPos.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "TestUtil.cc" 4 | 5 | int main(int argc, char *argv[]) { 6 | int col = atoi(argv[1]); 7 | int row = atoi(argv[2]); 8 | setCursorPos(col, row); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/SetWindowRect.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | 6 | #include "TestUtil.cc" 7 | 8 | int main(int argc, char *argv[]) { 9 | if (argc != 5) { 10 | printf("Usage: %s x y width height\n", argv[0]); 11 | return 1; 12 | } 13 | 14 | const HANDLE conout = CreateFileW(L"CONOUT$", 15 | GENERIC_READ | GENERIC_WRITE, 16 | FILE_SHARE_READ | FILE_SHARE_WRITE, 17 | NULL, OPEN_EXISTING, 0, NULL); 18 | ASSERT(conout != INVALID_HANDLE_VALUE); 19 | 20 | SMALL_RECT sr = { 21 | (short)atoi(argv[1]), 22 | (short)atoi(argv[2]), 23 | (short)(atoi(argv[1]) + atoi(argv[3]) - 1), 24 | (short)(atoi(argv[2]) + atoi(argv[4]) - 1), 25 | }; 26 | 27 | trace("Calling SetConsoleWindowInfo with {L=%d,T=%d,R=%d,B=%d}", 28 | sr.Left, sr.Top, sr.Right, sr.Bottom); 29 | BOOL ret = SetConsoleWindowInfo(conout, TRUE, &sr); 30 | const unsigned lastError = GetLastError(); 31 | const char *const retStr = ret ? "OK" : "failed"; 32 | trace("SetConsoleWindowInfo ret: %s (LastError=0x%x)", retStr, lastError); 33 | printf("SetConsoleWindowInfo ret: %s (LastError=0x%x)\n", retStr, lastError); 34 | 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/ShowArgv.cc: -------------------------------------------------------------------------------- 1 | // This test program is useful for studying commandline<->argv conversion. 2 | 3 | #include 4 | #include 5 | 6 | int main(int argc, char **argv) 7 | { 8 | printf("cmdline = [%s]\n", GetCommandLine()); 9 | for (int i = 0; i < argc; ++i) 10 | printf("[%s]\n", argv[i]); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/ShowConsoleInput.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | static int escCount = 0; 8 | 9 | HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE); 10 | while (true) { 11 | DWORD count; 12 | INPUT_RECORD ir; 13 | if (!ReadConsoleInput(hStdin, &ir, 1, &count)) { 14 | printf("ReadConsoleInput failed\n"); 15 | return 1; 16 | } 17 | 18 | if (true) { 19 | DWORD mode; 20 | GetConsoleMode(hStdin, &mode); 21 | SetConsoleMode(hStdin, mode & ~ENABLE_PROCESSED_INPUT); 22 | } 23 | 24 | if (ir.EventType == KEY_EVENT) { 25 | const KEY_EVENT_RECORD &ker = ir.Event.KeyEvent; 26 | printf("%s", ker.bKeyDown ? "dn" : "up"); 27 | printf(" ch="); 28 | if (isprint(ker.uChar.AsciiChar)) 29 | printf("'%c'", ker.uChar.AsciiChar); 30 | printf("%d", ker.uChar.AsciiChar); 31 | printf(" vk=%#x", ker.wVirtualKeyCode); 32 | printf(" scan=%#x", ker.wVirtualScanCode); 33 | printf(" state=%#x", (int)ker.dwControlKeyState); 34 | printf(" repeat=%d", ker.wRepeatCount); 35 | printf("\n"); 36 | if (ker.uChar.AsciiChar == 27 && ++escCount == 6) 37 | break; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Spew.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | i = 0; 3 | while True: 4 | i += 1 5 | print(i) 6 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Utf16Echo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | int main(int argc, char *argv[]) { 10 | system("cls"); 11 | 12 | if (argc == 1) { 13 | printf("Usage: %s hhhh\n", argv[0]); 14 | return 0; 15 | } 16 | 17 | std::wstring dataToWrite; 18 | for (int i = 1; i < argc; ++i) { 19 | wchar_t ch = strtol(argv[i], NULL, 16); 20 | dataToWrite.push_back(ch); 21 | } 22 | 23 | DWORD actual = 0; 24 | BOOL ret = WriteConsoleW( 25 | GetStdHandle(STD_OUTPUT_HANDLE), 26 | dataToWrite.data(), dataToWrite.size(), &actual, NULL); 27 | assert(ret && actual == dataToWrite.size()); 28 | 29 | // Read it back. 30 | std::vector readBuffer(dataToWrite.size() * 2); 31 | COORD bufSize = {static_cast(readBuffer.size()), 1}; 32 | COORD bufCoord = {0, 0}; 33 | SMALL_RECT topLeft = {0, 0, static_cast(readBuffer.size() - 1), 0}; 34 | ret = ReadConsoleOutputW( 35 | GetStdHandle(STD_OUTPUT_HANDLE), readBuffer.data(), 36 | bufSize, bufCoord, &topLeft); 37 | assert(ret); 38 | 39 | printf("\n"); 40 | for (int i = 0; i < readBuffer.size(); ++i) { 41 | printf("CHAR: %04x %04x\n", 42 | readBuffer[i].Char.UnicodeChar, 43 | readBuffer[i].Attributes); 44 | } 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/VkEscapeTest.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Sending VK_PAUSE to the console window almost works as a mechanism for 3 | * pausing it, but it doesn't because the console could turn off the 4 | * ENABLE_LINE_INPUT console mode flag. 5 | */ 6 | 7 | #define _WIN32_WINNT 0x0501 8 | #include 9 | #include 10 | #include 11 | 12 | CALLBACK DWORD pausingThread(LPVOID dummy) 13 | { 14 | if (1) { 15 | Sleep(1000); 16 | HWND hwnd = GetConsoleWindow(); 17 | SendMessage(hwnd, WM_KEYDOWN, VK_PAUSE, 1); 18 | Sleep(1000); 19 | SendMessage(hwnd, WM_KEYDOWN, VK_ESCAPE, 1); 20 | } 21 | 22 | if (0) { 23 | INPUT_RECORD ir; 24 | memset(&ir, 0, sizeof(ir)); 25 | ir.EventType = KEY_EVENT; 26 | ir.Event.KeyEvent.bKeyDown = TRUE; 27 | ir.Event.KeyEvent.wVirtualKeyCode = VK_PAUSE; 28 | ir.Event.KeyEvent.wRepeatCount = 1; 29 | } 30 | 31 | return 0; 32 | } 33 | 34 | int main() 35 | { 36 | HANDLE hin = GetStdHandle(STD_INPUT_HANDLE); 37 | HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE); 38 | COORD c = { 0, 0 }; 39 | 40 | DWORD mode; 41 | GetConsoleMode(hin, &mode); 42 | SetConsoleMode(hin, mode & 43 | ~(ENABLE_LINE_INPUT)); 44 | 45 | CreateThread(NULL, 0, 46 | pausingThread, NULL, 47 | 0, NULL); 48 | 49 | int i = 0; 50 | while (true) { 51 | Sleep(100); 52 | printf("%d\n", ++i); 53 | } 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Win10WrapTest1.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Demonstrates some wrapping behaviors of the new Windows 10 console. 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include "TestUtil.cc" 10 | 11 | int main(int argc, char *argv[]) { 12 | if (argc == 1) { 13 | startChildProcess(L"CHILD"); 14 | return 0; 15 | } 16 | 17 | setWindowPos(0, 0, 1, 1); 18 | setBufferSize(40, 20); 19 | setWindowPos(0, 0, 40, 20); 20 | 21 | system("cls"); 22 | 23 | repeatChar(39, 'A'); repeatChar(1, ' '); 24 | repeatChar(39, 'B'); repeatChar(1, ' '); 25 | printf("\n"); 26 | 27 | repeatChar(39, 'C'); repeatChar(1, ' '); 28 | repeatChar(39, 'D'); repeatChar(1, ' '); 29 | printf("\n"); 30 | 31 | repeatChar(40, 'E'); 32 | repeatChar(40, 'F'); 33 | printf("\n"); 34 | 35 | repeatChar(39, 'G'); repeatChar(1, ' '); 36 | repeatChar(39, 'H'); repeatChar(1, ' '); 37 | printf("\n"); 38 | 39 | Sleep(2000); 40 | 41 | setChar(39, 0, '*', 0x24); 42 | setChar(39, 1, '*', 0x24); 43 | 44 | setChar(39, 3, ' ', 0x24); 45 | setChar(39, 4, ' ', 0x24); 46 | 47 | setChar(38, 6, ' ', 0x24); 48 | setChar(38, 7, ' ', 0x24); 49 | 50 | Sleep(2000); 51 | setWindowPos(0, 0, 35, 20); 52 | setBufferSize(35, 20); 53 | trace("DONE"); 54 | 55 | printf("Sleeping forever...\n"); 56 | while(true) { Sleep(1000); } 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Win10WrapTest2.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "TestUtil.cc" 4 | 5 | int main(int argc, char *argv[]) { 6 | if (argc == 1) { 7 | startChildProcess(L"CHILD"); 8 | return 0; 9 | } 10 | 11 | const int WIDTH = 25; 12 | 13 | setWindowPos(0, 0, 1, 1); 14 | setBufferSize(WIDTH, 40); 15 | setWindowPos(0, 0, WIDTH, 20); 16 | 17 | system("cls"); 18 | 19 | for (int i = 0; i < 100; ++i) { 20 | printf("FOO(%d)\n", i); 21 | } 22 | 23 | repeatChar(5, '\n'); 24 | repeatChar(WIDTH * 5, '.'); 25 | repeatChar(10, '\n'); 26 | setWindowPos(0, 20, WIDTH, 20); 27 | writeBox(0, 5, 1, 10, '|'); 28 | 29 | Sleep(120000); 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Win32Echo1.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * A Win32 program that reads raw console input with ReadFile and echos 3 | * it to stdout. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | int main() 11 | { 12 | int count = 0; 13 | HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE); 14 | HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); 15 | SetConsoleMode(hStdIn, 0); 16 | 17 | while (true) { 18 | DWORD actual; 19 | char ch; 20 | ReadFile(hStdIn, &ch, 1, &actual, NULL); 21 | printf("%02x ", ch); 22 | if (++count == 50) 23 | break; 24 | } 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Win32Echo2.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * A Win32 program that reads raw console input with getch and echos 3 | * it to stdout. 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | int main() 10 | { 11 | int count = 0; 12 | while (true) { 13 | int ch = getch(); 14 | printf("%02x ", ch); 15 | if (++count == 50) 16 | break; 17 | } 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Win32Test1.cc: -------------------------------------------------------------------------------- 1 | #define _WIN32_WINNT 0x0501 2 | #include "../src/shared/DebugClient.cc" 3 | #include 4 | #include 5 | 6 | const int SC_CONSOLE_MARK = 0xFFF2; 7 | 8 | CALLBACK DWORD writerThread(void*) 9 | { 10 | while (true) { 11 | Sleep(1000); 12 | trace("writing"); 13 | printf("X\n"); 14 | trace("written"); 15 | } 16 | } 17 | 18 | int main() 19 | { 20 | CreateThread(NULL, 0, writerThread, NULL, 0, NULL); 21 | trace("marking console"); 22 | HWND hwnd = GetConsoleWindow(); 23 | PostMessage(hwnd, WM_SYSCOMMAND, SC_CONSOLE_MARK, 0); 24 | 25 | Sleep(2000); 26 | 27 | trace("reading output"); 28 | CHAR_INFO buf[1]; 29 | COORD bufSize = { 1, 1 }; 30 | COORD zeroCoord = { 0, 0 }; 31 | SMALL_RECT readRect = { 0, 0, 0, 0 }; 32 | ReadConsoleOutput(GetStdHandle(STD_OUTPUT_HANDLE), 33 | buf, 34 | bufSize, 35 | zeroCoord, 36 | &readRect); 37 | trace("done reading output"); 38 | 39 | Sleep(2000); 40 | 41 | PostMessage(hwnd, WM_CHAR, 27, 0x00010001); 42 | 43 | Sleep(1100); 44 | 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/Win32Write1.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * A Win32 program that scrolls and writes to the console using the ioctl-like 3 | * interface. 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | int main() 10 | { 11 | HANDLE conout = GetStdHandle(STD_OUTPUT_HANDLE); 12 | 13 | for (int i = 0; i < 80; ++i) { 14 | 15 | CONSOLE_SCREEN_BUFFER_INFO info; 16 | GetConsoleScreenBufferInfo(conout, &info); 17 | 18 | SMALL_RECT src = { 0, 1, info.dwSize.X - 1, info.dwSize.Y - 1 }; 19 | COORD destOrigin = { 0, 0 }; 20 | CHAR_INFO fillCharInfo = { 0 }; 21 | fillCharInfo.Char.AsciiChar = ' '; 22 | fillCharInfo.Attributes = 7; 23 | ScrollConsoleScreenBuffer(conout, 24 | &src, 25 | NULL, 26 | destOrigin, 27 | &fillCharInfo); 28 | 29 | CHAR_INFO buffer = { 0 }; 30 | buffer.Char.AsciiChar = 'X'; 31 | buffer.Attributes = 7; 32 | COORD bufferSize = { 1, 1 }; 33 | COORD bufferCoord = { 0, 0 }; 34 | SMALL_RECT writeRegion = { 0, 0, 0, 0 }; 35 | writeRegion.Left = writeRegion.Right = i; 36 | writeRegion.Top = writeRegion.Bottom = 5; 37 | WriteConsoleOutput(conout, 38 | &buffer, bufferSize, bufferCoord, 39 | &writeRegion); 40 | 41 | Sleep(250); 42 | } 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/WindowsBugCrashReader.cc: -------------------------------------------------------------------------------- 1 | // I noticed this on the ConEmu web site: 2 | // 3 | // https://social.msdn.microsoft.com/Forums/en-US/40c8e395-cca9-45c8-b9b8-2fbe6782ac2b/readconsoleoutput-cause-access-violation-writing-location-exception 4 | // https://conemu.github.io/en/MicrosoftBugs.html 5 | // 6 | // In Windows 7, 8, and 8.1, a ReadConsoleOutputW with an out-of-bounds read 7 | // region crashes the application. I have reproduced the problem on Windows 8 8 | // and 8.1, but not on Windows 7. 9 | // 10 | 11 | #include 12 | 13 | #include "TestUtil.cc" 14 | 15 | int main() { 16 | setWindowPos(0, 0, 1, 1); 17 | setBufferSize(80, 25); 18 | setWindowPos(0, 0, 80, 25); 19 | 20 | const HANDLE conout = openConout(); 21 | static CHAR_INFO lineBuf[80]; 22 | SMALL_RECT readRegion = { 0, 999, 79, 999 }; 23 | const BOOL ret = ReadConsoleOutputW(conout, lineBuf, {80, 1}, {0, 0}, &readRegion); 24 | ASSERT(!ret && "ReadConsoleOutputW should have failed"); 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/build32.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | name=$1 4 | name=${name%.} 5 | name=${name%.cc} 6 | name=${name%.exe} 7 | echo Compiling $name.cc to $name.exe 8 | i686-w64-mingw32-g++.exe -static -std=c++11 $name.cc -o $name.exe 9 | i686-w64-mingw32-strip $name.exe 10 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/misc/build64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | name=$1 4 | name=${name%.} 5 | name=${name%.cc} 6 | name=${name%.exe} 7 | echo Compiling $name.cc to $name.exe 8 | x86_64-w64-mingw32-g++.exe -static -std=c++11 $name.cc -o $name.exe 9 | x86_64-w64-mingw32-strip $name.exe 10 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal 4 | cd %~dp0.. 5 | set Path=C:\Python27;C:\Program Files\Git\cmd;%Path% 6 | 7 | call "%VS140COMNTOOLS%\VsDevCmd.bat" || goto :fail 8 | 9 | rmdir /s/q build-libpty 2>NUL 10 | mkdir build-libpty\win 11 | mkdir build-libpty\win\x86 12 | mkdir build-libpty\win\x86_64 13 | mkdir build-libpty\win\xp 14 | 15 | rmdir /s/q src\Release 2>NUL 16 | rmdir /s/q src\.vs 2>NUL 17 | del src\*.vcxproj src\*.vcxproj.filters src\*.sln src\*.sdf 2>NUL 18 | 19 | call vcbuild.bat --msvc-platform Win32 --gyp-msvs-version 2015 --toolset v140_xp || goto :fail 20 | copy src\Release\Win32\winpty.dll build-libpty\win\xp || goto :fail 21 | copy src\Release\Win32\winpty-agent.exe build-libpty\win\xp || goto :fail 22 | 23 | call vcbuild.bat --msvc-platform Win32 --gyp-msvs-version 2015 || goto :fail 24 | copy src\Release\Win32\winpty.dll build-libpty\win\x86 || goto :fail 25 | copy src\Release\Win32\winpty-agent.exe build-libpty\win\x86 || goto :fail 26 | 27 | call vcbuild.bat --msvc-platform x64 --gyp-msvs-version 2015 || goto :fail 28 | copy src\Release\x64\winpty.dll build-libpty\win\x86_64 || goto :fail 29 | copy src\Release\x64\winpty-agent.exe build-libpty\win\x86_64 || goto :fail 30 | 31 | echo success 32 | goto :EOF 33 | 34 | :fail 35 | echo error: build failed 36 | exit /b 1 37 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/agent/AgentCreateDesktop.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef AGENT_CREATE_DESKTOP_H 22 | #define AGENT_CREATE_DESKTOP_H 23 | 24 | #include 25 | 26 | void handleCreateDesktop(LPCWSTR controlPipeName); 27 | 28 | #endif // AGENT_CREATE_DESKTOP_H 29 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/agent/ConsoleFont.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef CONSOLEFONT_H 22 | #define CONSOLEFONT_H 23 | 24 | #include 25 | 26 | void setSmallFont(HANDLE conout, int columns, bool isNewW10); 27 | 28 | #endif // CONSOLEFONT_H 29 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/agent/ConsoleInputReencoding.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef AGENT_CONSOLE_INPUT_REENCODING_H 22 | #define AGENT_CONSOLE_INPUT_REENCODING_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | #include 29 | 30 | void reencodeEscapedKeyPress( 31 | std::vector &records, 32 | uint16_t virtualKey, 33 | uint32_t codePoint, 34 | uint16_t keyState); 35 | 36 | #endif // AGENT_CONSOLE_INPUT_REENCODING_H 37 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/agent/ConsoleLine.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef CONSOLE_LINE_H 22 | #define CONSOLE_LINE_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | class ConsoleLine 29 | { 30 | public: 31 | ConsoleLine(); 32 | void reset(); 33 | bool detectChangeAndSetLine(const CHAR_INFO *line, int newLength); 34 | void setLine(const CHAR_INFO *line, int newLength); 35 | void blank(WORD attributes); 36 | private: 37 | int m_prevLength; 38 | std::vector m_prevData; 39 | }; 40 | 41 | #endif // CONSOLE_LINE_H 42 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/agent/DebugShowInput.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef AGENT_DEBUG_SHOW_INPUT_H 22 | #define AGENT_DEBUG_SHOW_INPUT_H 23 | 24 | #include 25 | 26 | #include 27 | 28 | std::string controlKeyStatePrefix(DWORD controlKeyState); 29 | std::string mouseEventToString(const MOUSE_EVENT_RECORD &mer); 30 | void debugShowInput(bool enableMouse, bool escapeInput); 31 | 32 | #endif // AGENT_DEBUG_SHOW_INPUT_H 33 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/agent/DefaultInputMap.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef DEFAULT_INPUT_MAP_H 22 | #define DEFAULT_INPUT_MAP_H 23 | 24 | class InputMap; 25 | 26 | void addDefaultEntriesToInputMap(InputMap &inputMap); 27 | 28 | #endif // DEFAULT_INPUT_MAP_H 29 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/agent/DsrSender.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-2012 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef DSRSENDER_H 22 | #define DSRSENDER_H 23 | 24 | class DsrSender 25 | { 26 | public: 27 | virtual void sendDsr() = 0; 28 | }; 29 | 30 | #endif // DSRSENDER_H 31 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/libwinpty/AgentLocation.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-2016 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef LIBWINPTY_AGENT_LOCATION_H 22 | #define LIBWINPTY_AGENT_LOCATION_H 23 | 24 | #include 25 | 26 | std::wstring findAgentProgram(); 27 | 28 | #endif // LIBWINPTY_AGENT_LOCATION_H 29 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/shared/AgentMsg.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011-2012 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef WINPTY_SHARED_AGENT_MSG_H 22 | #define WINPTY_SHARED_AGENT_MSG_H 23 | 24 | struct AgentMsg 25 | { 26 | enum Type { 27 | StartProcess, 28 | SetSize, 29 | GetConsoleProcessList, 30 | }; 31 | }; 32 | 33 | enum class StartProcessResult { 34 | CreateProcessFailed, 35 | ProcessCreated, 36 | }; 37 | 38 | #endif // WINPTY_SHARED_AGENT_MSG_H 39 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | REM -- Echo the git commit hash. If git isn't available for some reason, 4 | REM -- output nothing instead. 5 | 6 | git rev-parse HEAD >NUL 2>NUL && ( 7 | git rev-parse HEAD 8 | ) || ( 9 | echo none 10 | ) 11 | 12 | REM -- Set ERRORLEVEL to 0 using this cryptic syntax. 13 | (call ) 14 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/shared/OwnedHandle.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #include "OwnedHandle.h" 22 | 23 | #include "DebugClient.h" 24 | #include "WinptyException.h" 25 | 26 | void OwnedHandle::dispose(bool nothrow) { 27 | if (m_h != nullptr && m_h != INVALID_HANDLE_VALUE) { 28 | if (!CloseHandle(m_h)) { 29 | trace("CloseHandle(%p) failed", m_h); 30 | if (!nothrow) { 31 | throwWindowsError(L"CloseHandle failed"); 32 | } 33 | } 34 | } 35 | m_h = nullptr; 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/shared/PrecompiledHeader.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef WINPTY_PRECOMPILED_HEADER_H 22 | #define WINPTY_PRECOMPILED_HEADER_H 23 | 24 | #include 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | #endif // WINPTY_PRECOMPILED_HEADER_H 44 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem -- Echo the git commit hash. If git isn't available for some reason, 4 | rem -- output nothing instead. 5 | 6 | mkdir ..\gen 2>nul 7 | 8 | set /p VERSION=<..\..\VERSION.txt 9 | set COMMIT=%1 10 | 11 | echo // AUTO-GENERATED BY %0 %*>..\gen\GenVersion.h 12 | echo const char GenVersion_Version[] = "%VERSION%";>>..\gen\GenVersion.h 13 | echo const char GenVersion_Commit[] = "%COMMIT%";>>..\gen\GenVersion.h 14 | 15 | rem -- The winpty.gyp file expects the script to output the include directory, 16 | rem -- relative to src. 17 | echo gen 18 | 19 | rem -- Set ERRORLEVEL to 0 using this cryptic syntax. 20 | (call ) 21 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/shared/WindowsVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef WINPTY_SHARED_WINDOWS_VERSION_H 22 | #define WINPTY_SHARED_WINDOWS_VERSION_H 23 | 24 | bool isAtLeastWindowsVista(); 25 | bool isAtLeastWindows7(); 26 | bool isAtLeastWindows8(); 27 | void dumpWindowsVersion(); 28 | 29 | #endif // WINPTY_SHARED_WINDOWS_VERSION_H 30 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/shared/WinptyVersion.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef WINPTY_VERSION_H 22 | #define WINPTY_VERSION_H 23 | 24 | void dumpVersionToStdout(); 25 | void dumpVersionToTrace(); 26 | 27 | #endif // WINPTY_VERSION_H 28 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/subdir.mk: -------------------------------------------------------------------------------- 1 | include src/agent/subdir.mk 2 | include src/debugserver/subdir.mk 3 | include src/libwinpty/subdir.mk 4 | include src/tests/subdir.mk 5 | include src/unix-adapter/subdir.mk 6 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/tests/subdir.mk: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015 Ryan Prichard 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy 4 | # of this software and associated documentation files (the "Software"), to 5 | # deal in the Software without restriction, including without limitation the 6 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | # sell copies of the Software, and to permit persons to whom the Software is 8 | # furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | # IN THE SOFTWARE. 20 | 21 | build/%.exe : src/tests/%.cc build/winpty.dll 22 | $(info Building $@) 23 | @$(MINGW_CXX) $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS) -o $@ $^ 24 | 25 | TEST_PROGRAMS = \ 26 | build/trivial_test.exe 27 | 28 | -include $(TEST_PROGRAMS:.exe=.d) 29 | -------------------------------------------------------------------------------- /node_modules/node-pty/deps/winpty/src/unix-adapter/Util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Ryan Prichard 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | 21 | #ifndef UNIX_ADAPTER_UTIL_H 22 | #define UNIX_ADAPTER_UTIL_H 23 | 24 | #include 25 | #include 26 | 27 | bool writeAll(int fd, const void *buffer, size_t size); 28 | bool writeStr(int fd, const char *str); 29 | void selectWrapper(const char *diagName, int nfds, fd_set *readfds); 30 | 31 | #endif // UNIX_ADAPTER_UTIL_H 32 | -------------------------------------------------------------------------------- /node_modules/node-pty/lib/conpty_console_list_agent.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * Copyright (c) 2019, Microsoft Corporation (MIT License). 4 | * 5 | * This module fetches the console process list for a particular PID. It must be 6 | * called from a different process (child_process.fork) as there can only be a 7 | * single console attached to a process. 8 | */ 9 | var getConsoleProcessList; 10 | try { 11 | getConsoleProcessList = require('../build/Release/conpty_console_list.node').getConsoleProcessList; 12 | } 13 | catch (err) { 14 | getConsoleProcessList = require('../build/Debug/conpty_console_list.node').getConsoleProcessList; 15 | } 16 | var shellPid = parseInt(process.argv[2], 10); 17 | var consoleProcessList = getConsoleProcessList(shellPid); 18 | process.send({ consoleProcessList: consoleProcessList }); 19 | process.exit(0); 20 | //# sourceMappingURL=conpty_console_list_agent.js.map -------------------------------------------------------------------------------- /node_modules/node-pty/lib/conpty_console_list_agent.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"conpty_console_list_agent.js","sourceRoot":"","sources":["../src/conpty_console_list_agent.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,IAAI,qBAA0B,CAAC;AAC/B,IAAI;IACF,qBAAqB,GAAG,OAAO,CAAC,2CAA2C,CAAC,CAAC,qBAAqB,CAAC;CACpG;AAAC,OAAO,GAAG,EAAE;IACZ,qBAAqB,GAAG,OAAO,CAAC,yCAAyC,CAAC,CAAC,qBAAqB,CAAC;CAClG;AAED,IAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC/C,IAAM,kBAAkB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AAC3D,OAAO,CAAC,IAAI,CAAC,EAAE,kBAAkB,oBAAA,EAAE,CAAC,CAAC;AACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC"} -------------------------------------------------------------------------------- /node_modules/node-pty/lib/eventEmitter2.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"eventEmitter2.js","sourceRoot":"","sources":["../src/eventEmitter2.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH;IAAA;QACU,eAAU,GAAmB,EAAE,CAAC;IAgC1C,CAAC;IA7BC,sBAAW,gCAAK;aAAhB;YAAA,iBAkBC;YAjBC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;gBAChB,IAAI,CAAC,MAAM,GAAG,UAAC,QAAuB;oBACpC,KAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC/B,IAAM,UAAU,GAAG;wBACjB,OAAO,EAAE;4BACP,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gCAC/C,IAAI,KAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;oCACnC,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oCAC7B,OAAO;iCACR;6BACF;wBACH,CAAC;qBACF,CAAC;oBACF,OAAO,UAAU,CAAC;gBACpB,CAAC,CAAC;aACH;YACD,OAAO,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;;;OAAA;IAEM,4BAAI,GAAX,UAAY,IAAO;QACjB,IAAM,KAAK,GAAmB,EAAE,CAAC;QACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SAChC;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;SAChC;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAjCD,IAiCC;AAjCY,sCAAa"} -------------------------------------------------------------------------------- /node_modules/node-pty/lib/eventEmitter2.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * Copyright (c) 2019, Microsoft Corporation (MIT License). 4 | */ 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | var assert = require("assert"); 7 | var eventEmitter2_1 = require("./eventEmitter2"); 8 | describe('EventEmitter2', function () { 9 | it('should fire listeners multiple times', function () { 10 | var order = []; 11 | var emitter = new eventEmitter2_1.EventEmitter2(); 12 | emitter.event(function (data) { return order.push(data + 'a'); }); 13 | emitter.event(function (data) { return order.push(data + 'b'); }); 14 | emitter.fire(1); 15 | emitter.fire(2); 16 | assert.deepEqual(order, ['1a', '1b', '2a', '2b']); 17 | }); 18 | it('should not fire listeners once disposed', function () { 19 | var order = []; 20 | var emitter = new eventEmitter2_1.EventEmitter2(); 21 | emitter.event(function (data) { return order.push(data + 'a'); }); 22 | var disposeB = emitter.event(function (data) { return order.push(data + 'b'); }); 23 | emitter.event(function (data) { return order.push(data + 'c'); }); 24 | emitter.fire(1); 25 | disposeB.dispose(); 26 | emitter.fire(2); 27 | assert.deepEqual(order, ['1a', '1b', '1c', '2a', '2c']); 28 | }); 29 | }); 30 | //# sourceMappingURL=eventEmitter2.test.js.map -------------------------------------------------------------------------------- /node_modules/node-pty/lib/eventEmitter2.test.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"eventEmitter2.test.js","sourceRoot":"","sources":["../src/eventEmitter2.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,+BAAiC;AACjC,iDAAgD;AAEhD,QAAQ,CAAC,eAAe,EAAE;IACxB,EAAE,CAAC,sCAAsC,EAAE;QACzC,IAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAM,OAAO,GAAG,IAAI,6BAAa,EAAU,CAAC;QAC5C,OAAO,CAAC,KAAK,CAAC,UAAA,IAAI,IAAI,OAAA,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,EAAtB,CAAsB,CAAC,CAAC;QAC9C,OAAO,CAAC,KAAK,CAAC,UAAA,IAAI,IAAI,OAAA,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,EAAtB,CAAsB,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE;QAC5C,IAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAM,OAAO,GAAG,IAAI,6BAAa,EAAU,CAAC;QAC5C,OAAO,CAAC,KAAK,CAAC,UAAA,IAAI,IAAI,OAAA,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,EAAtB,CAAsB,CAAC,CAAC;QAC9C,IAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,UAAA,IAAI,IAAI,OAAA,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,EAAtB,CAAsB,CAAC,CAAC;QAC/D,OAAO,CAAC,KAAK,CAAC,UAAA,IAAI,IAAI,OAAA,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,EAAtB,CAAsB,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAE,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} -------------------------------------------------------------------------------- /node_modules/node-pty/lib/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAKH,IAAI,YAAiB,CAAC;AACtB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,eAAe,CAAC;CAC7D;KAAM;IACL,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC;CACvD;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,KAAK,CAAC,IAAa,EAAE,IAAwB,EAAE,GAA8C;IAC3G,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;AAC3C,CAAC;AAFD,sBAEC;AAED,kBAAkB;AAClB,SAAgB,IAAI,CAAC,IAAa,EAAE,IAAwB,EAAE,GAA8C;IAC1G,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;AAC3C,CAAC;AAFD,oBAEC;AAED,kBAAkB;AAClB,SAAgB,cAAc,CAAC,IAAa,EAAE,IAAwB,EAAE,GAA8C;IACpH,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;AAC3C,CAAC;AAFD,wCAEC;AAED,SAAgB,IAAI,CAAC,OAAwB;IAC3C,OAAO,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC;AAFD,oBAEC;AAED;;;GAGG;AACU,QAAA,MAAM,GAAG,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC"} -------------------------------------------------------------------------------- /node_modules/node-pty/lib/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * Copyright (c) 2016, Daniel Imms (MIT License). 4 | * Copyright (c) 2018, Microsoft Corporation (MIT License). 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | //# sourceMappingURL=interfaces.js.map -------------------------------------------------------------------------------- /node_modules/node-pty/lib/interfaces.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG"} -------------------------------------------------------------------------------- /node_modules/node-pty/lib/terminal.test.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"terminal.test.js","sourceRoot":"","sources":["../src/terminal.test.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,+BAAiC;AACjC,qDAAoD;AACpD,+CAA8C;AAG9C,IAAM,mBAAmB,GAAG,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,iCAAe,CAAC,CAAC,CAAC,2BAAY,CAAC;AAC5F,IAAM,KAAK,GAAG,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC;AAEvE,IAAI,YAA4C,CAAC;AACjD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC7C;KAAM;IACL,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC1C;AAGD,QAAQ,CAAC,UAAU,EAAE;IACnB,QAAQ,CAAC,aAAa,EAAE;QACtB,EAAE,CAAC,6BAA6B,EAAE;YAChC,MAAM,CAAC,MAAM,CACX,cAAM,OAAA,IAAU,YAAa,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAAjD,CAAiD,EACvD,sCAAsC,CACvC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,wBAAwB,EAAE;QACjC,EAAE,CAAC,0CAA0C,EAAE;YAC7C,IAAM,GAAG,GAAG,IAAI,mBAAmB,CAAC,KAAK,EAAE,EAAE,EAAE,EAAC,iBAAiB,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAC,CAAC,CAAC;YAC7H,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;YAC1C,MAAM,CAAC,KAAK,CAAE,GAAW,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;YACpD,MAAM,CAAC,KAAK,CAAE,GAAW,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;QACH,oFAAoF;QACpF,+EAA+E;QAC/E,4CAA4C;QAC5C,wCAAwC;QACxC,cAAc;QACd,MAAM;QAEN,yBAAyB;QACzB,uIAAuI;QACvI,2BAA2B;QAC3B,0CAA0C;QAC1C,6CAA6C;QAC7C,+CAA+C;QAC/C,oBAAoB;QACpB,wBAAwB;QACxB,oBAAoB;QACpB,yBAAyB;QACzB,oBAAoB;QACpB,4BAA4B;QAC5B,sEAAsE;QACtE,iBAAiB;QACjB,MAAM;IACR,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAS,oBAAoB,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC"} -------------------------------------------------------------------------------- /node_modules/node-pty/lib/testUtils.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * Copyright (c) 2019, Microsoft Corporation (MIT License). 4 | */ 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | function pollUntil(cb, timeout, interval) { 7 | return new Promise(function (resolve, reject) { 8 | var intervalId = setInterval(function () { 9 | if (cb()) { 10 | clearInterval(intervalId); 11 | clearTimeout(timeoutId); 12 | resolve(); 13 | } 14 | }, interval); 15 | var timeoutId = setTimeout(function () { 16 | clearInterval(intervalId); 17 | if (cb()) { 18 | resolve(); 19 | } 20 | else { 21 | reject(); 22 | } 23 | }, timeout); 24 | }); 25 | } 26 | exports.pollUntil = pollUntil; 27 | //# sourceMappingURL=testUtils.test.js.map -------------------------------------------------------------------------------- /node_modules/node-pty/lib/testUtils.test.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"testUtils.test.js","sourceRoot":"","sources":["../src/testUtils.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,SAAgB,SAAS,CAAC,EAAiB,EAAE,OAAe,EAAE,QAAgB;IAC5E,OAAO,IAAI,OAAO,CAAO,UAAC,OAAO,EAAE,MAAM;QACvC,IAAM,UAAU,GAAG,WAAW,CAAC;YAC7B,IAAI,EAAE,EAAE,EAAE;gBACR,aAAa,CAAC,UAAU,CAAC,CAAC;gBAC1B,YAAY,CAAC,SAAS,CAAC,CAAC;gBACxB,OAAO,EAAE,CAAC;aACX;QACH,CAAC,EAAE,QAAQ,CAAC,CAAC;QACb,IAAM,SAAS,GAAG,UAAU,CAAC;YAC3B,aAAa,CAAC,UAAU,CAAC,CAAC;YAC1B,IAAI,EAAE,EAAE,EAAE;gBACR,OAAO,EAAE,CAAC;aACX;iBAAM;gBACL,MAAM,EAAE,CAAC;aACV;QACH,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAlBD,8BAkBC"} -------------------------------------------------------------------------------- /node_modules/node-pty/lib/types.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * Copyright (c) 2017, Daniel Imms (MIT License). 4 | * Copyright (c) 2018, Microsoft Corporation (MIT License). 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | //# sourceMappingURL=types.js.map -------------------------------------------------------------------------------- /node_modules/node-pty/lib/types.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;GAGG"} -------------------------------------------------------------------------------- /node_modules/node-pty/lib/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * Copyright (c) 2017, Daniel Imms (MIT License). 4 | * Copyright (c) 2018, Microsoft Corporation (MIT License). 5 | */ 6 | Object.defineProperty(exports, "__esModule", { value: true }); 7 | function assign(target) { 8 | var sources = []; 9 | for (var _i = 1; _i < arguments.length; _i++) { 10 | sources[_i - 1] = arguments[_i]; 11 | } 12 | sources.forEach(function (source) { return Object.keys(source).forEach(function (key) { return target[key] = source[key]; }); }); 13 | return target; 14 | } 15 | exports.assign = assign; 16 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /node_modules/node-pty/lib/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,SAAgB,MAAM,CAAC,MAAW;IAAE,iBAAiB;SAAjB,UAAiB,EAAjB,qBAAiB,EAAjB,IAAiB;QAAjB,gCAAiB;;IACnD,OAAO,CAAC,OAAO,CAAC,UAAA,MAAM,IAAI,OAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG,IAAI,OAAA,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,EAAzB,CAAyB,CAAC,EAA7D,CAA6D,CAAC,CAAC;IACzF,OAAO,MAAM,CAAC;AAChB,CAAC;AAHD,wBAGC"} -------------------------------------------------------------------------------- /node_modules/node-pty/scripts/install.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const os = require('os'); 4 | const path = require('path'); 5 | const spawn = require('child_process').spawn; 6 | 7 | const gypArgs = ['rebuild']; 8 | if (process.env.NODE_PTY_DEBUG) { 9 | gypArgs.push('--debug'); 10 | } 11 | const gypProcess = spawn(os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', gypArgs, { 12 | cwd: path.join(__dirname, '..'), 13 | stdio: 'inherit' 14 | }); 15 | 16 | gypProcess.on('exit', function (code) { 17 | process.exit(code); 18 | }); 19 | -------------------------------------------------------------------------------- /node_modules/node-pty/scripts/post-install.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | 4 | var RELEASE_DIR = path.join(__dirname, '..', 'build', 'Release'); 5 | var BUILD_FILES = [ 6 | path.join(RELEASE_DIR, 'conpty.node'), 7 | path.join(RELEASE_DIR, 'conpty.pdb'), 8 | path.join(RELEASE_DIR, 'conpty_console_list.node'), 9 | path.join(RELEASE_DIR, 'conpty_console_list.pdb'), 10 | path.join(RELEASE_DIR, 'pty.node'), 11 | path.join(RELEASE_DIR, 'pty.pdb'), 12 | path.join(RELEASE_DIR, 'winpty-agent.exe'), 13 | path.join(RELEASE_DIR, 'winpty-agent.pdb'), 14 | path.join(RELEASE_DIR, 'winpty.dll'), 15 | path.join(RELEASE_DIR, 'winpty.pdb') 16 | ]; 17 | 18 | cleanFolderRecursive = function(folder) { 19 | var files = []; 20 | if( fs.existsSync(folder) ) { 21 | files = fs.readdirSync(folder); 22 | files.forEach(function(file,index) { 23 | var curPath = path.join(folder, file); 24 | if(fs.lstatSync(curPath).isDirectory()) { // recurse 25 | cleanFolderRecursive(curPath); 26 | fs.rmdirSync(curPath); 27 | } else if (BUILD_FILES.indexOf(curPath) < 0){ // delete file 28 | fs.unlinkSync(curPath); 29 | } 30 | }); 31 | } 32 | }; 33 | 34 | try { 35 | cleanFolderRecursive(RELEASE_DIR); 36 | } catch(e) { 37 | console.log(e); 38 | //process.exit(1); 39 | } finally { 40 | process.exit(0); 41 | } 42 | -------------------------------------------------------------------------------- /node_modules/node-pty/src/conpty_console_list_agent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019, Microsoft Corporation (MIT License). 3 | * 4 | * This module fetches the console process list for a particular PID. It must be 5 | * called from a different process (child_process.fork) as there can only be a 6 | * single console attached to a process. 7 | */ 8 | 9 | let getConsoleProcessList: any; 10 | try { 11 | getConsoleProcessList = require('../build/Release/conpty_console_list.node').getConsoleProcessList; 12 | } catch (err) { 13 | getConsoleProcessList = require('../build/Debug/conpty_console_list.node').getConsoleProcessList; 14 | } 15 | 16 | const shellPid = parseInt(process.argv[2], 10); 17 | const consoleProcessList = getConsoleProcessList(shellPid); 18 | process.send({ consoleProcessList }); 19 | process.exit(0); 20 | -------------------------------------------------------------------------------- /node_modules/node-pty/src/eventEmitter2.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019, Microsoft Corporation (MIT License). 3 | */ 4 | 5 | import * as assert from 'assert'; 6 | import { EventEmitter2 } from './eventEmitter2'; 7 | 8 | describe('EventEmitter2', () => { 9 | it('should fire listeners multiple times', () => { 10 | const order: string[] = []; 11 | const emitter = new EventEmitter2(); 12 | emitter.event(data => order.push(data + 'a')); 13 | emitter.event(data => order.push(data + 'b')); 14 | emitter.fire(1); 15 | emitter.fire(2); 16 | assert.deepEqual(order, [ '1a', '1b', '2a', '2b' ]); 17 | }); 18 | 19 | it('should not fire listeners once disposed', () => { 20 | const order: string[] = []; 21 | const emitter = new EventEmitter2(); 22 | emitter.event(data => order.push(data + 'a')); 23 | const disposeB = emitter.event(data => order.push(data + 'b')); 24 | emitter.event(data => order.push(data + 'c')); 25 | emitter.fire(1); 26 | disposeB.dispose(); 27 | emitter.fire(2); 28 | assert.deepEqual(order, [ '1a', '1b', '1c', '2a', '2c' ]); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /node_modules/node-pty/src/eventEmitter2.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019, Microsoft Corporation (MIT License). 3 | */ 4 | 5 | import { IDisposable } from './types'; 6 | 7 | interface IListener { 8 | (e: T): void; 9 | } 10 | 11 | export interface IEvent { 12 | (listener: (e: T) => any): IDisposable; 13 | } 14 | 15 | export class EventEmitter2 { 16 | private _listeners: IListener[] = []; 17 | private _event?: IEvent; 18 | 19 | public get event(): IEvent { 20 | if (!this._event) { 21 | this._event = (listener: (e: T) => any) => { 22 | this._listeners.push(listener); 23 | const disposable = { 24 | dispose: () => { 25 | for (let i = 0; i < this._listeners.length; i++) { 26 | if (this._listeners[i] === listener) { 27 | this._listeners.splice(i, 1); 28 | return; 29 | } 30 | } 31 | } 32 | }; 33 | return disposable; 34 | }; 35 | } 36 | return this._event; 37 | } 38 | 39 | public fire(data: T): void { 40 | const queue: IListener[] = []; 41 | for (let i = 0; i < this._listeners.length; i++) { 42 | queue.push(this._listeners[i]); 43 | } 44 | for (let i = 0; i < queue.length; i++) { 45 | queue[i].call(undefined, data); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /node_modules/node-pty/src/testUtils.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019, Microsoft Corporation (MIT License). 3 | */ 4 | 5 | export function pollUntil(cb: () => boolean, timeout: number, interval: number): Promise { 6 | return new Promise((resolve, reject) => { 7 | const intervalId = setInterval(() => { 8 | if (cb()) { 9 | clearInterval(intervalId); 10 | clearTimeout(timeoutId); 11 | resolve(); 12 | } 13 | }, interval); 14 | const timeoutId = setTimeout(() => { 15 | clearInterval(intervalId); 16 | if (cb()) { 17 | resolve(); 18 | } else { 19 | reject(); 20 | } 21 | }, timeout); 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/node-pty/src/types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017, Daniel Imms (MIT License). 3 | * Copyright (c) 2018, Microsoft Corporation (MIT License). 4 | */ 5 | 6 | export type ArgvOrCommandLine = string[] | string; 7 | 8 | export interface IExitEvent { 9 | exitCode: number; 10 | signal: number | undefined; 11 | } 12 | 13 | export interface IDisposable { 14 | dispose(): void; 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/node-pty/src/utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017, Daniel Imms (MIT License). 3 | * Copyright (c) 2018, Microsoft Corporation (MIT License). 4 | */ 5 | 6 | export function assign(target: any, ...sources: any[]): any { 7 | sources.forEach(source => Object.keys(source).forEach(key => target[key] = source[key])); 8 | return target; 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/node-pty/src/win/conpty_console_list.cc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019, Microsoft Corporation (MIT License). 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | static NAN_METHOD(ApiConsoleProcessList) { 9 | if (info.Length() != 1 || 10 | !info[0]->IsNumber()) { 11 | Nan::ThrowError("Usage: getConsoleProcessList(shellPid)"); 12 | return; 13 | } 14 | 15 | const SHORT pid = info[0]->Uint32Value(Nan::GetCurrentContext()).FromJust(); 16 | 17 | if (!FreeConsole()) { 18 | Nan::ThrowError("FreeConsole failed"); 19 | } 20 | if (!AttachConsole(pid)) { 21 | Nan::ThrowError("AttachConsole failed"); 22 | } 23 | auto processList = std::vector(64); 24 | auto processCount = GetConsoleProcessList(&processList[0], processList.size()); 25 | if (processList.size() < processCount) { 26 | processList.resize(processCount); 27 | processCount = GetConsoleProcessList(&processList[0], processList.size()); 28 | } 29 | FreeConsole(); 30 | 31 | v8::Local result = Nan::New(); 32 | for (DWORD i = 0; i < processCount; i++) { 33 | Nan::Set(result, i, Nan::New(processList[i])); 34 | } 35 | info.GetReturnValue().Set(result); 36 | } 37 | 38 | extern "C" void init(v8::Local target) { 39 | Nan::HandleScope scope; 40 | Nan::SetMethod(target, "getConsoleProcessList", ApiConsoleProcessList); 41 | }; 42 | 43 | NODE_MODULE(pty, init); 44 | -------------------------------------------------------------------------------- /node_modules/node-pty/src/win/path_util.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2013-2015, Christopher Jeffrey, Peter Sunde (MIT License) 3 | * Copyright (c) 2016, Daniel Imms (MIT License). 4 | * Copyright (c) 2018, Microsoft Corporation (MIT License). 5 | */ 6 | 7 | #ifndef NODE_PTY_PATH_UTIL_H_ 8 | #define NODE_PTY_PATH_UTIL_H_ 9 | 10 | #include 11 | 12 | #define MAX_ENV 65536 13 | 14 | namespace path_util { 15 | 16 | const wchar_t* to_wstring(const Nan::Utf8String& str); 17 | bool file_exists(std::wstring filename); 18 | std::wstring get_shell_path(std::wstring filename); 19 | 20 | } // namespace path_util 21 | 22 | #endif // NODE_PTY_PATH_UTIL_H_ 23 | -------------------------------------------------------------------------------- /node_modules/node-termios/LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/node-termios/binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "target_name": "termios", 5 | "sources": 6 | [ 7 | "src/CTermios.cpp", 8 | "src/CCBuffer.cpp", 9 | "src/termios_basic.cpp", 10 | "src/node_termios.cpp" 11 | ], 12 | "include_dirs" : ['/dev/null || (rm -rf "Release/termios.node" && cp -af "Release/obj.target/termios.node" "Release/termios.node") 2 | -------------------------------------------------------------------------------- /node_modules/node-termios/build/Release/obj.target/termios.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/node-termios/build/Release/obj.target/termios.node -------------------------------------------------------------------------------- /node_modules/node-termios/build/Release/obj.target/termios/src/CCBuffer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/node-termios/build/Release/obj.target/termios/src/CCBuffer.o -------------------------------------------------------------------------------- /node_modules/node-termios/build/Release/obj.target/termios/src/CTermios.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/node-termios/build/Release/obj.target/termios/src/CTermios.o -------------------------------------------------------------------------------- /node_modules/node-termios/build/Release/obj.target/termios/src/node_termios.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/node-termios/build/Release/obj.target/termios/src/node_termios.o -------------------------------------------------------------------------------- /node_modules/node-termios/build/Release/obj.target/termios/src/termios_basic.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/node-termios/build/Release/obj.target/termios/src/termios_basic.o -------------------------------------------------------------------------------- /node_modules/node-termios/build/Release/termios.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/node-termios/build/Release/termios.node -------------------------------------------------------------------------------- /node_modules/node-termios/build/binding.Makefile: -------------------------------------------------------------------------------- 1 | # This file is generated by gyp; do not edit. 2 | 3 | export builddir_name ?= ./build/. 4 | .PHONY: all 5 | all: 6 | $(MAKE) termios 7 | -------------------------------------------------------------------------------- /node_modules/node-termios/install.js: -------------------------------------------------------------------------------- 1 | // do not build native module on windows 2 | if (process.platform !== 'win32') { 3 | require('child_process').spawnSync('node-gyp', ['rebuild'], {stdio: 'inherit'}); 4 | } 5 | -------------------------------------------------------------------------------- /node_modules/node-termios/lib/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as I from './interfaces'; 2 | import { ITermios } from './interfaces'; 3 | export declare const native: I.INative; 4 | export declare let Termios: ITermios; 5 | export { I as Interfaces }; 6 | export { ITermios }; 7 | -------------------------------------------------------------------------------- /node_modules/node-termios/lib/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | //# sourceMappingURL=interfaces.js.map -------------------------------------------------------------------------------- /node_modules/node-termios/src/CCBuffer.h: -------------------------------------------------------------------------------- 1 | /* CCBuffer.h 2 | * 3 | * Copyright (C) 2017 Joerg Breitbart 4 | * 5 | * This software may be modified and distributed under the terms 6 | * of the MIT license. See the LICENSE file for details. 7 | */ 8 | #ifndef CCBUFFER_H 9 | #define CCBUFFER_H 10 | 11 | #include "node_termios.h" 12 | #include "CTermios.h" 13 | 14 | class CCBuffer : public Nan::ObjectWrap { 15 | friend class CTermios; 16 | public: 17 | static Local init(); 18 | private: 19 | explicit CCBuffer(cc_t*, int); 20 | ~CCBuffer(); 21 | static Nan::Persistent& tmpl(); 22 | static Local ctorTemplate() { return Nan::New(tmpl()); } 23 | static bool IsInstance(Local v) { return ctorTemplate()->HasInstance(v); } 24 | 25 | static NAN_INDEX_GETTER(IndexGetter); 26 | static NAN_INDEX_SETTER(IndexSetter); 27 | static NAN_INDEX_ENUMERATOR(IndexEnumerator); 28 | static NAN_INDEX_DELETER(IndexDeleter); 29 | static NAN_INDEX_QUERY(IndexQuery); 30 | static NAN_GETTER(Length_Getter); 31 | 32 | // JS methods 33 | static NAN_METHOD(New); 34 | static NAN_METHOD(ToBuffer); 35 | 36 | cc_t *value_; 37 | unsigned int length_; 38 | }; 39 | 40 | #endif // CCBUFFER_H 41 | -------------------------------------------------------------------------------- /node_modules/node-termios/src/CTermios.h: -------------------------------------------------------------------------------- 1 | /* CTermios.h 2 | * 3 | * Copyright (C) 2017 Joerg Breitbart 4 | * 5 | * This software may be modified and distributed under the terms 6 | * of the MIT license. See the LICENSE file for details. 7 | */ 8 | #ifndef CTERMIOS_H 9 | #define CTERMIOS_H 10 | 11 | #include "node_termios.h" 12 | 13 | class CTermios : public Nan::ObjectWrap { 14 | public: 15 | static Local init(); 16 | static Local ctorTemplate() { return Nan::New(tmpl()); } 17 | static bool IsInstance(Local v) { return ctorTemplate()->HasInstance(v); } 18 | struct termios* data() { return &value_; } 19 | private: 20 | explicit CTermios(struct termios *value = 0); 21 | ~CTermios(); 22 | static Nan::Persistent& tmpl(); 23 | 24 | // JS methods 25 | static NAN_METHOD(New); 26 | static NAN_METHOD(ToBuffer); 27 | 28 | static NAN_GETTER(CC_Getter); 29 | static NAN_GETTER(LFlag_Getter); 30 | static NAN_GETTER(CFlag_Getter); 31 | static NAN_GETTER(OFlag_Getter); 32 | static NAN_GETTER(IFlag_Getter); 33 | static NAN_SETTER(LFlag_Setter); 34 | static NAN_SETTER(CFlag_Setter); 35 | static NAN_SETTER(OFlag_Setter); 36 | static NAN_SETTER(IFlag_Setter); 37 | 38 | // data 39 | struct termios value_; 40 | Nan::Persistent ccbuffer; 41 | }; 42 | 43 | #endif // CTERMIOS_H 44 | -------------------------------------------------------------------------------- /node_modules/node-termios/src/node_termios.h: -------------------------------------------------------------------------------- 1 | /* node_termios.h 2 | * 3 | * Copyright (C) 2017 Joerg Breitbart 4 | * 5 | * This software may be modified and distributed under the terms 6 | * of the MIT license. See the LICENSE file for details. 7 | */ 8 | #ifndef NODE_TERMIOS_H 9 | #define NODE_TERMIOS_H 10 | 11 | #include "nan.h" 12 | #include 13 | 14 | using namespace node; 15 | using namespace v8; 16 | 17 | 18 | // macro for symbol export 19 | #define TERMIOS_EXPORT(o, js_obj, sym) \ 20 | Nan::Set(all, Nan::New(#sym).ToLocalChecked(),Nan::New(sym)); \ 21 | Nan::Set(js_obj, Nan::New(#sym).ToLocalChecked(),Nan::New(sym)) 22 | 23 | // macro for module export 24 | #define MODULE_EXPORT(name, symbol) \ 25 | Nan::Set(target, Nan::New(name).ToLocalChecked(), symbol) 26 | 27 | #ifndef TEMP_FAILURE_RETRY 28 | #define TEMP_FAILURE_RETRY(exp) \ 29 | ({ \ 30 | int _rc; \ 31 | do { \ 32 | _rc = (exp); \ 33 | } while (_rc == -1 && errno == EINTR); \ 34 | _rc; \ 35 | }) 36 | #endif 37 | 38 | #endif // NODE_TERMIOS_H -------------------------------------------------------------------------------- /node_modules/node-termios/src/termios_basic.h: -------------------------------------------------------------------------------- 1 | /* termios_basic.h 2 | * 3 | * Copyright (C) 2017 Joerg Breitbart 4 | * 5 | * This software may be modified and distributed under the terms 6 | * of the MIT license. See the LICENSE file for details. 7 | */ 8 | #ifndef TERMIOS_BASIC_H 9 | #define TERMIOS_BASIC_H 10 | 11 | #include "node_termios.h" 12 | #include 13 | #include 14 | 15 | // helper function 16 | NAN_METHOD(Isatty); 17 | NAN_METHOD(Ttyname); 18 | NAN_METHOD(Ptsname); 19 | 20 | // termios functions 21 | NAN_METHOD(Tcgetattr); 22 | NAN_METHOD(Tcsetattr); 23 | NAN_METHOD(Tcsendbreak); 24 | NAN_METHOD(Tcdrain); 25 | NAN_METHOD(Tcflush); 26 | NAN_METHOD(Tcflow); 27 | NAN_METHOD(Cfgetispeed); 28 | NAN_METHOD(Cfgetospeed); 29 | NAN_METHOD(Cfsetispeed); 30 | NAN_METHOD(Cfsetospeed); 31 | 32 | /* missing from termios.h 33 | // optional: 34 | void cfmakeraw(struct termios *termios_p); // not on solaris 11? 35 | void cfmakesane(struct termios *t); // FreeBSD 36 | int cfsetspeed(struct termios *termios_p, speed_t speed); // not on solaris 11? 37 | 38 | pid_t tcgetsid(int fd); // needs #include under FreeBSD 39 | pid_t tcgetpgrp(int fd); // needs #include under FreeBSD 40 | int tcsetpgrp(int fd, pid_t pgrp); // needs #include under FreeBSD 41 | */ 42 | 43 | 44 | 45 | #endif // TERMIOS_BASIC_H 46 | -------------------------------------------------------------------------------- /node_modules/node-termios/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "rootDir": "src", 6 | "outDir": "lib", 7 | "sourceMap": true, 8 | "declaration": true 9 | }, 10 | "exclude": [ 11 | "node_modules", 12 | "scripts", 13 | "index.js", 14 | "demo.js", 15 | "lib", 16 | "test", 17 | "examples" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/node-termios/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "class-name": true, 4 | "comment-format": [ 5 | true, 6 | "check-space" 7 | ], 8 | "indent": [ 9 | true, 10 | "spaces" 11 | ], 12 | "eofline": true, 13 | "one-variable-per-declaration": [true, "ignore-for-loop"], 14 | "no-eval": true, 15 | "no-internal-module": true, 16 | "no-trailing-whitespace": true, 17 | "no-unsafe-finally": true, 18 | "no-var-keyword": true, 19 | "quotemark": [ 20 | true, 21 | "single" 22 | ], 23 | "semicolon": [ 24 | true, 25 | "always" 26 | ], 27 | "triple-equals": [ 28 | true, 29 | "allow-null-check" 30 | ], 31 | "typedef": [ 32 | true, 33 | "call-signature", 34 | "parameter", 35 | "property-declaration", 36 | "member-variable-declaration" 37 | ], 38 | "typedef-whitespace": [ 39 | true, 40 | { 41 | "call-signature": "nospace", 42 | "index-signature": "nospace", 43 | "parameter": "nospace", 44 | "property-declaration": "nospace", 45 | "variable-declaration": "nospace" 46 | } 47 | ], 48 | "variable-name": [ 49 | true, 50 | "ban-keywords" 51 | ], 52 | "whitespace": [ 53 | true, 54 | "check-branch", 55 | "check-decl", 56 | "check-operator", 57 | "check-separator", 58 | "check-type" 59 | ] 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /node_modules/smart-buffer/.prettierrc.yaml: -------------------------------------------------------------------------------- 1 | parser: typescript 2 | printWidth: 120 3 | tabWidth: 2 4 | singleQuote: true 5 | trailingComma: none -------------------------------------------------------------------------------- /node_modules/smart-buffer/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 6 4 | - 8 5 | - 10 6 | - 12 7 | - stable 8 | 9 | before_script: 10 | - npm install -g typescript 11 | - tsc -p ./ 12 | 13 | script: "npm run coveralls" -------------------------------------------------------------------------------- /node_modules/smart-buffer/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2017 Josh Glazebrook 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/smart-buffer/docs/ROADMAP.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denomparkour/shell-bot/665c4e5e6200f53c65b32914cce6a85fdd0f8207/node_modules/smart-buffer/docs/ROADMAP.md -------------------------------------------------------------------------------- /node_modules/socks-proxy-agent/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "6" 7 | - "7" 8 | - "8" 9 | - "9" 10 | 11 | install: 12 | - PATH="`npm bin`:`npm bin -g`:$PATH" 13 | # Install dependencies and build 14 | - npm install 15 | 16 | script: 17 | # Output useful info for debugging 18 | - node --version 19 | - npm --version 20 | # Run tests 21 | - npm test 22 | -------------------------------------------------------------------------------- /node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "5" 8 | - "6" 9 | - "7" 10 | - "8" 11 | - "9" 12 | 13 | install: 14 | - PATH="`npm bin`:`npm bin -g`:$PATH" 15 | # Install dependencies and build 16 | - npm install 17 | 18 | script: 19 | # Output useful info for debugging 20 | - node --version 21 | - npm --version 22 | # Run tests 23 | - npm test 24 | -------------------------------------------------------------------------------- /node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const url = require('url'); 3 | const https = require('https'); 4 | 5 | /** 6 | * This currently needs to be applied to all Node.js versions 7 | * in order to determine if the `req` is an HTTP or HTTPS request. 8 | * 9 | * There is currently no PR attempting to move this property upstream. 10 | */ 11 | https.request = (function(request) { 12 | return function(_options, cb) { 13 | let options; 14 | if (typeof _options === 'string') { 15 | options = url.parse(_options); 16 | } else { 17 | options = Object.assign({}, _options); 18 | } 19 | if (null == options.port) { 20 | options.port = 443; 21 | } 22 | options.secureEndpoint = true; 23 | return request.call(https, options, cb); 24 | }; 25 | })(https.request); 26 | 27 | /** 28 | * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the 29 | * patched `https.request()`. 30 | * 31 | * Ref: https://github.com/nodejs/node/commit/5118f31 32 | */ 33 | https.get = function(options, cb) { 34 | const req = https.request(options, cb); 35 | req.end(); 36 | return req; 37 | }; 38 | -------------------------------------------------------------------------------- /node_modules/socks-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr 3 | bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y 4 | b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB 5 | AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd 6 | Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x 7 | 1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ 8 | 5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW 9 | T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX 10 | uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N 11 | Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw 12 | h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J 13 | bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ 14 | ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /node_modules/socks-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3 3 | NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0 4 | NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3 5 | NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB 6 | ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay 7 | OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn 8 | g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN 9 | AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4 10 | 1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J 11 | QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr 3 | bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y 4 | b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB 5 | AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd 6 | Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x 7 | 1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ 8 | 5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW 9 | T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX 10 | uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N 11 | Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw 12 | h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J 13 | bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ 14 | ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg== 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3 3 | NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0 4 | NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3 5 | NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB 6 | ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay 7 | OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn 8 | g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN 9 | AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4 10 | 1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J 11 | QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /node_modules/socks/.prettierrc.yaml: -------------------------------------------------------------------------------- 1 | parser: typescript 2 | printWidth: 80 3 | tabWidth: 2 4 | singleQuote: true 5 | trailingComma: none 6 | -------------------------------------------------------------------------------- /node_modules/socks/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 6 4 | - 8 5 | - 10 6 | - 12 7 | - stable 8 | 9 | before_install: 10 | - yarn global add typescript prettier tslint coveralls 11 | 12 | script: "yarn run build && yarn run coveralls" -------------------------------------------------------------------------------- /node_modules/socks/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Josh Glazebrook 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/socks/build/common/receivebuffer.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | class ReceiveBuffer { 4 | constructor(size = 4096) { 5 | this._buffer = Buffer.allocUnsafe(size); 6 | this._offset = 0; 7 | this._originalSize = size; 8 | } 9 | get length() { 10 | return this._offset; 11 | } 12 | append(data) { 13 | if (!Buffer.isBuffer(data)) { 14 | throw new Error('Attempted to append a non-buffer instance to ReceiveBuffer.'); 15 | } 16 | if (this._offset + data.length >= this._buffer.length) { 17 | const tmp = this._buffer; 18 | this._buffer = Buffer.allocUnsafe(Math.max(this._buffer.length + this._originalSize, this._buffer.length + data.length)); 19 | tmp.copy(this._buffer); 20 | } 21 | data.copy(this._buffer, this._offset); 22 | return (this._offset += data.length); 23 | } 24 | peek(length) { 25 | if (length > this._offset) { 26 | throw new Error('Attempted to read beyond the bounds of the managed internal data.'); 27 | } 28 | return this._buffer.slice(0, length); 29 | } 30 | get(length) { 31 | if (length > this._offset) { 32 | throw new Error('Attempted to read beyond the bounds of the managed internal data.'); 33 | } 34 | const value = Buffer.allocUnsafe(length); 35 | this._buffer.slice(0, length).copy(value); 36 | this._buffer.copyWithin(0, length, length + this._offset - length); 37 | this._offset -= length; 38 | return value; 39 | } 40 | } 41 | exports.ReceiveBuffer = ReceiveBuffer; 42 | //# sourceMappingURL=receivebuffer.js.map -------------------------------------------------------------------------------- /node_modules/socks/build/common/receivebuffer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"receivebuffer.js","sourceRoot":"","sources":["../../src/common/receivebuffer.ts"],"names":[],"mappings":";;AAAA,MAAM,aAAa;IAKjB,YAAY,OAAe,IAAI;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC5B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC1B,MAAM,IAAI,KAAK,CACb,6DAA6D,CAC9D,CAAC;SACH;QAED,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACrD,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;YACzB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAC/B,IAAI,CAAC,GAAG,CACN,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,EACxC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAClC,CACF,CAAC;YACF,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACxB;QAED,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,CAAC,MAAc;QACjB,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE;YACzB,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;SACH;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,GAAG,CAAC,MAAc;QAChB,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE;YACzB,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;SACH;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;QACnE,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC;QAEvB,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAEQ,sCAAa"} -------------------------------------------------------------------------------- /node_modules/socks/build/common/util.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | /** 4 | * Error wrapper for SocksClient 5 | */ 6 | class SocksClientError extends Error { 7 | constructor(message, options) { 8 | super(message); 9 | this.options = options; 10 | } 11 | } 12 | exports.SocksClientError = SocksClientError; 13 | /** 14 | * Shuffles a given array. 15 | * @param array The array to shuffle. 16 | */ 17 | function shuffleArray(array) { 18 | for (let i = array.length - 1; i > 0; i--) { 19 | let j = Math.floor(Math.random() * (i + 1)); 20 | [array[i], array[j]] = [array[j], array[i]]; 21 | } 22 | } 23 | exports.shuffleArray = shuffleArray; 24 | //# sourceMappingURL=util.js.map -------------------------------------------------------------------------------- /node_modules/socks/build/common/util.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/common/util.ts"],"names":[],"mappings":";;AAEA;;GAEG;AACH,MAAM,gBAAiB,SAAQ,KAAK;IAClC,YACE,OAAe,EACR,OAAqD;QAE5D,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,YAAO,GAAP,OAAO,CAA8C;IAG9D,CAAC;CACF;AAuBwB,4CAAgB;AArBzC;;;GAGG;AACH,SAAS,YAAY,CAAC,KAAY;IAChC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACzC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7C;AACH,CAAC;AAY0C,oCAAY"} -------------------------------------------------------------------------------- /node_modules/socks/build/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | __export(require("./client/socksclient")); 7 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /node_modules/socks/build/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,0CAAqC"} -------------------------------------------------------------------------------- /node_modules/socks/docs/examples/index.md: -------------------------------------------------------------------------------- 1 | # socks examples 2 | 3 | ## TypeScript Examples 4 | 5 | [Connect command](typescript/connectExample.md) 6 | 7 | [Bind command](typescript/bindExample.md) 8 | 9 | [Associate command](typescript/associateExample.md) 10 | 11 | ## JavaScript Examples 12 | 13 | [Connect command](javascript/connectExample.md) 14 | 15 | [Bind command](javascript/bindExample.md) 16 | 17 | [Associate command](javascript/associateExample.md) -------------------------------------------------------------------------------- /node_modules/socks/docs/index.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | - [API Reference](https://github.com/JoshGlazebrook/socks#api-reference) 4 | 5 | - [Code Examples](./examples/index.md) -------------------------------------------------------------------------------- /node_modules/socks/typings/common/helpers.d.ts: -------------------------------------------------------------------------------- 1 | import { SocksClientOptions, SocksClientChainOptions } from '../client/socksclient'; 2 | /** 3 | * Validates the provided SocksClientOptions 4 | * @param options { SocksClientOptions } 5 | * @param acceptedCommands { string[] } A list of accepted SocksProxy commands. 6 | */ 7 | declare function validateSocksClientOptions(options: SocksClientOptions, acceptedCommands?: string[]): void; 8 | /** 9 | * Validates the SocksClientChainOptions 10 | * @param options { SocksClientChainOptions } 11 | */ 12 | declare function validateSocksClientChainOptions(options: SocksClientChainOptions): void; 13 | export { validateSocksClientOptions, validateSocksClientChainOptions }; 14 | -------------------------------------------------------------------------------- /node_modules/socks/typings/common/receiveBuffer.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare class ReceiveBuffer { 3 | private _buffer; 4 | private _offset; 5 | private _originalSize; 6 | constructor(size?: number); 7 | get length(): number; 8 | append(data: Buffer): number; 9 | peek(length: number): Buffer; 10 | get(length: number): Buffer; 11 | } 12 | export { ReceiveBuffer }; 13 | -------------------------------------------------------------------------------- /node_modules/socks/typings/common/util.d.ts: -------------------------------------------------------------------------------- 1 | import { SocksClientOptions, SocksClientChainOptions } from './constants'; 2 | /** 3 | * Error wrapper for SocksClient 4 | */ 5 | declare class SocksClientError extends Error { 6 | options: SocksClientOptions | SocksClientChainOptions; 7 | constructor(message: string, options: SocksClientOptions | SocksClientChainOptions); 8 | } 9 | /** 10 | * Shuffles a given array. 11 | * @param array The array to shuffle. 12 | */ 13 | declare function shuffleArray(array: any[]): void; 14 | declare type RequireOnlyOne = Pick> & { 15 | [K in Keys]?: Required> & Partial, undefined>>; 16 | }[Keys]; 17 | export { RequireOnlyOne, SocksClientError, shuffleArray }; 18 | -------------------------------------------------------------------------------- /node_modules/socks/typings/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './client/socksclient'; 2 | -------------------------------------------------------------------------------- /node_modules/terminal.js/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | doc 3 | npm-debug.log 4 | *.swp 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /node_modules/terminal.js/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.12" 5 | - "4" 6 | - "5" 7 | - "6" 8 | - "7" 9 | sudo: false 10 | notifications: 11 | irc: 12 | channels: 13 | - "chat.freenode.net#terminal.js" 14 | skip_join: true 15 | use_notice: true 16 | -------------------------------------------------------------------------------- /node_modules/terminal.js/LICENSE: -------------------------------------------------------------------------------- 1 | MIT/X Consortium License 2 | 3 | (c) 2015 Enno Boland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a 6 | copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation 8 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | and/or sell copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/terminal.js/README.md: -------------------------------------------------------------------------------- 1 | # terminal.js: terminal emulator library for browsers and node.js 2 | 3 | [![Build Status](https://travis-ci.org/Gottox/terminal.js.png)](https://travis-ci.org/Gottox/terminal.js) 4 | 5 | Terminal.js is a rendering engine for vt100-like terminals. 6 | It is written from scratch and supports most commonly used escape sequences. 7 | 8 | ## Example 9 | 10 | a simple demo using the [colors](https://www.npmjs.com/package/colors) module: 11 | 12 | ```javascript 13 | var colors = require('colors'), 14 | Terminal = require('./index'); 15 | 16 | var terminal = new Terminal({columns: 20, rows: 2}); 17 | 18 | terminal.write("Terminal.js in rainbows".rainbow); 19 | 20 | console.log(terminal.toString('ansi')); 21 | ``` 22 | 23 | There's also a webterminal using terminal.js: 24 | [node-webterm](https://github.com/Gottox/node-webterm) 25 | 26 | ## Documentation 27 | 28 | The documentation is generated using [JSDoc](http://usejsdoc.org/) and can be 29 | found [here](http://gottox.de/terminal.js) 30 | 31 | ## Source 32 | 33 | Source is developed at [Github](http://github.com/Gottox/terminal.js) 34 | -------------------------------------------------------------------------------- /node_modules/terminal.js/gh-pages.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -x 2 | # 3 | # gh-pages.sh 4 | # Copyright © 2014 Enno Boland 5 | # 6 | # Distributed under terms of the MIT license. 7 | # 8 | 9 | cd "`which $0 | xargs dirname`" || exit $? 10 | rev=`git rev-parse HEAD` 11 | 12 | grunt clean || exit $? 13 | git clone -b gh-pages . doc || exit $? 14 | grunt doc || exit $? 15 | echo terminal.js.org > $PWD/doc/CNAME 16 | git -C doc add $PWD/doc 17 | git -C doc commit -m "rebuild docs based on $rev" || exit $? 18 | git -C doc push $PWD gh-pages || exit $? 19 | grunt clean || exit $? 20 | -------------------------------------------------------------------------------- /node_modules/terminal.js/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./lib/terminal.js"); 2 | 3 | module.exports.TermState = require("./lib/term_state.js"); 4 | module.exports.TermDiff = require("./lib/term_diff.js"); 5 | module.exports.output = { 6 | PlainOutput: require("./lib/output/plain.js"), 7 | AnsiOutput: require("./lib/output/ansi.js"), 8 | TtyOutput: require("./lib/output/tty.js"), 9 | HtmlOutput: require("./lib/output/html.js"), 10 | DomOutput: require("./lib/output/dom.js") 11 | }; 12 | 13 | module.exports.source = { 14 | EmitterSource: require("./lib/source/emitter.js") 15 | }; 16 | 17 | module.exports.input = { 18 | DomInput: require('./lib/input/dom.js'), 19 | TtyInput: require('./lib/input/tty.js'), 20 | }; 21 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/handler/chr.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // function(cmd, chunk); 4 | /** 5 | * handlers for command characters 6 | * @enum {Function|string} 7 | * @readonly 8 | * @this refers to calling {@link Terminal} 9 | */ 10 | var chr = { 11 | /** 12 | * BELL 13 | */ 14 | "\x07": function(cmd, chunk) { // BELL 15 | this.emit("bell"); 16 | }, 17 | /** 18 | * BACKSPACE 19 | */ 20 | "\x08": function(cmd, chunk) { // BACKSPACE 21 | this.state.mvCursor(-1, 0); 22 | }, 23 | /** 24 | * TAB 25 | */ 26 | "\x09": function(cmd, chunk) { // TAB 27 | this.state.mvTab(1); 28 | }, 29 | /** 30 | * DELETE 31 | */ 32 | "\x7f": function(cmd, chunk) { // DELETE 33 | this.state.removeChar(1); 34 | }, 35 | /** 36 | * TABSET 37 | */ 38 | "\x88": function(cmd, chunk) { // TABSET 39 | this.state.setTab(); 40 | }, 41 | /** 42 | * SO 43 | */ 44 | "\x0e": function() { // SO 45 | this.state.mapCharset("G1"); 46 | }, 47 | /** 48 | * SI 49 | */ 50 | "\x0f": function() { // SI 51 | this.state.mapCharset("G0"); 52 | }, 53 | 54 | /** 55 | * ESCAPE 56 | */ 57 | "\x1b": function(cmd, chunk) { 58 | return chunk[1] !== undefined ? 59 | this.callHandler("esc", chunk[1], chunk) : 60 | 0; 61 | }, 62 | /** 63 | * CARRIAGE RETURN 64 | */ 65 | "\r": function(cmd, chunk) { 66 | this.state.setCursor(0, null); 67 | } 68 | }; 69 | module.exports = chr; 70 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/handler/dcs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // function(cmd, n, m, args, mod); 4 | 5 | /** 6 | * dcs command handlers 7 | * Currently we ignore all DCS codes 8 | * @enum {Function|string} 9 | * @readonly 10 | * @this refers to calling {@link Terminal} 11 | */ 12 | module.exports = { 13 | 14 | }; 15 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/input/base.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var stream = require("stream"); 4 | var util = require("util"); 5 | var myUtil = require("../util.js"); 6 | 7 | function BaseInput(target, buffer) { 8 | BaseInput.super_.apply(this, arguments); 9 | 10 | var opts = arguments[Math.max(1, arguments.length - 1)]; 11 | this.target = target; 12 | this.buffer = buffer; 13 | this._appKeypad = false; 14 | var self = this; 15 | this._opts = myUtil.extend({}, this._defOpts, opts); 16 | } 17 | util.inherits(BaseInput, stream.Readable); 18 | 19 | BaseInput.prototype.getKey = function(key) { 20 | var rv = this.buffer.getMode("appKeypad") ? "\x1bO" : "\x1b["; 21 | switch(key) { 22 | case "up": 23 | rv += "A"; 24 | break; 25 | case "down": 26 | rv += "B"; 27 | break; 28 | case "right": 29 | rv += "C"; 30 | break; 31 | case "left": 32 | rv += "D"; 33 | break; 34 | } 35 | return rv; 36 | }; 37 | 38 | BaseInput.prototype._read = function() { 39 | 40 | }; 41 | 42 | module.exports = BaseInput; 43 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/input/tty.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var myUtil = require("../util"); 4 | var inherits = require("util").inherits; 5 | 6 | function TtyInput(target, buffer, opts) { 7 | TtyInput.super_.apply(this, arguments); 8 | var self = this; 9 | if(this.target.stdout) 10 | this.target = this.target.stdout; 11 | this.target.on("readable", function() { 12 | self.doread(); 13 | }); 14 | } 15 | inherits(TtyInput, require("./base")); 16 | module.exports = TtyInput; 17 | 18 | var APP_KEYPAD_PATTERN = /\x1b\[([0-9;]*[ABCD])/g; 19 | TtyInput.prototype.doread = function() { 20 | var data = this.target.read().toString(); 21 | if(this.appKeypad) 22 | data = data.replace(APP_KEYPAD_PATTERN, "\x1bO$1"); 23 | 24 | this.push(data); 25 | }; 26 | 27 | TtyInput.canHandle = function(target) { 28 | if(target.stdin) 29 | target = target.stdin; 30 | return typeof target === "object" && "read" in target && "on" in target && target.isTTY; 31 | }; 32 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/output/base.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var myUtil = require("../util.js"); 4 | 5 | function BaseOutput(state) { 6 | var opts = arguments[Math.max(1, arguments.length - 1)]; 7 | this.state = state; 8 | this._opts = myUtil.extend({}, this._defOpts, opts); 9 | } 10 | module.exports = BaseOutput; 11 | 12 | BaseOutput.prototype.toString = function() { 13 | throw new Error("toString is not implemented!"); 14 | }; 15 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/output/plain.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var inherits = require("util").inherits; 4 | var myUtil = require("../util"); 5 | 6 | function PlainOutput(state, opts) { 7 | PlainOutput.super_.apply(this, arguments); 8 | } 9 | inherits(PlainOutput, require("./base.js")); 10 | module.exports = PlainOutput; 11 | 12 | PlainOutput.prototype.toString = function() { 13 | var lines = ""; 14 | var locateCursor = this._opts.locateCursor; 15 | 16 | if(locateCursor) 17 | lines += myUtil.repeat(" ", this.state.cursor.x+1) + "v\n"; 18 | 19 | for(var i = 0; i < this.state.rows; i++) { 20 | var line = this.state.getLine(i); 21 | if(locateCursor) { 22 | lines += i === this.state.cursor.y ? ">" : " "; 23 | } 24 | lines += line.str + "\n"; 25 | } 26 | if(locateCursor) 27 | lines += myUtil.repeat(" ", this.state.cursor.x+1) + "^\n"; 28 | 29 | return lines; 30 | }; 31 | 32 | PlainOutput.canHandle = function(target) { 33 | return target === "plain"; 34 | }; 35 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/output/tty.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var myUtil = require("../util"); 4 | var inherits = require("util").inherits; 5 | var AnsiOutput = require("./ansi.js"); 6 | 7 | function TtyOutput(state, writer, target, opts) { 8 | this.ansi = new AnsiOutput(state, opts); 9 | if(target.stdout) 10 | target = target.stdout; 11 | target.write("\x1b[3J\x1b[H\x1b[?25l"); 12 | TtyOutput.super_.call(this, state, writer, target, opts); 13 | this._opts.adhesiveCursor = true; 14 | } 15 | inherits(TtyOutput, require("./live_base.js")); 16 | module.exports = TtyOutput; 17 | 18 | TtyOutput.prototype.removeLine = function(number, view) { 19 | this.target.write("\x1b["+(number+1)+";1H\x1b[M"); 20 | return null; 21 | }; 22 | TtyOutput.prototype.changeLine = function(number, view, line, cursor) { 23 | this.target.write("\x1b["+(number+1)+";1H" + 24 | this.ansi._renderLine(line, cursor)); 25 | return null; 26 | }; 27 | TtyOutput.prototype.insertLine = function(number, view, line, cursor) { 28 | this.target.write("\x1b["+(number+1)+";1H\x1b[L"); 29 | this.changeLine.apply(this, arguments); 30 | return null; 31 | }; 32 | TtyOutput.prototype.changeLed = function(l1, l2, l3, l4) { 33 | 34 | }; 35 | TtyOutput.prototype.setCursor = function(x, y) { 36 | }; 37 | TtyOutput.prototype.resize = function(size) { 38 | // TODO 39 | }; 40 | TtyOutput.prototype.commit = function() { 41 | 42 | }; 43 | 44 | TtyOutput.canHandle = function(target) { 45 | if(target.stdout) 46 | target = target.stdout; 47 | return typeof target === "object" && "read" in target && "on" in target && target.isTTY; 48 | }; 49 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/source/base.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var myUtil = require("../util.js"); 4 | 5 | function BaseSource(writer, source) { 6 | var opts = arguments[Math.max(1, arguments.length - 1)]; 7 | this.writer = writer; 8 | this.source = source; 9 | this._opts = myUtil.extend({}, this._defOpts, opts); 10 | } 11 | module.exports = BaseSource; 12 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/source/emitter.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var myUtil = require("../util"); 4 | var inherits = require("util").inherits; 5 | function genCall(name) { 6 | return function() { 7 | if(typeof this.source[name] === "function") 8 | return this.source[name].apply(this.source, arguments); 9 | else { 10 | Array.prototype.unshift.call(arguments, name); 11 | return this.source.emit.apply(this.source, arguments); 12 | } 13 | }; 14 | } 15 | 16 | function EmitterSource(writer, source, opts) { 17 | EmitterSource.super_.apply(this, arguments); 18 | 19 | this._register(); 20 | } 21 | inherits(EmitterSource, require("./base")); 22 | module.exports = EmitterSource; 23 | 24 | EmitterSource.prototype._register = function() { 25 | var self = this; 26 | var writer = this.writer; 27 | 28 | this.source 29 | .on("data", function(data) { 30 | writer.write(data); 31 | }) 32 | .on("exit", function() { 33 | writer.end(); 34 | }); 35 | }; 36 | 37 | 38 | EmitterSource.prototype.write = genCall("write"); 39 | EmitterSource.prototype.end = genCall("end"); 40 | EmitterSource.prototype._resize = genCall("resize"); 41 | EmitterSource.prototype.kill = genCall("kill"); 42 | EmitterSource.prototype.resize = function(size) { 43 | return this._resize(size); 44 | }; 45 | 46 | EmitterSource.canHandle = function(source) { 47 | return source && typeof source.addListener === "function" && 48 | typeof source.on === "function"; 49 | }; 50 | -------------------------------------------------------------------------------- /node_modules/terminal.js/lib/util.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var A = Array.prototype; 4 | 5 | exports.extend = function(o){ 6 | for(var i = 1; i < arguments.length; i++) 7 | for(var key in arguments[i]) 8 | o[key] = arguments[i][key]; 9 | return o; 10 | }; 11 | 12 | exports.repeat = function(str, n) { 13 | var i, result = ""; 14 | for(i = 0; i < n; i++) { 15 | result += str; 16 | } 17 | return result; 18 | }; 19 | 20 | exports.objSplice = function(obj, length, start, end, replace) { 21 | var splice = A.splice, args = [ start, end ]; 22 | A.push.apply(args, replace); 23 | obj.length = length; 24 | splice.apply(obj, args); 25 | delete obj.length; 26 | }; 27 | 28 | exports.indexOf = A.indexOf ? 29 | function() { 30 | var args = A.slice.call(arguments); 31 | return A.indexOf.apply(args.shift(), args); 32 | } : 33 | function(obj, needle) { 34 | for (var i = 0; i < this.length; i++) 35 | if (this[i] === needle) return i; 36 | return -1; 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /node_modules/terminal.js/test/ansi_output.js: -------------------------------------------------------------------------------- 1 | var TermState = Terminal.TermState; 2 | var AnsiOutput = Terminal.output.AnsiOutput; 3 | function newTerminal(w, h) { 4 | var t = new TermState({rows:h, columns:w}), tw = new Terminal(t); 5 | t.setMode('crlf', true); 6 | return tw; 7 | } 8 | describe('AnsiOutput', function() { 9 | it("basic write test", function() { 10 | var t = newTerminal(); 11 | var r = new AnsiOutput(t.state); 12 | t.write("Hello"); 13 | 14 | //expect(r.toString()).to.be('\u001b[22;23;24;25;27mHello\u001b[0m'); 15 | expect(r.toString()).to.contain('\u001b[22;23;24;25;27mHello\u001b[22;23;24;25;7m '); 16 | t.state.setCursor(0,0); 17 | expect(r.toString()).to.contain('\u001b[22;23;24;25;7mH\u001b[22;23;24;25;27mello'); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /node_modules/terminal.js/test/common.js: -------------------------------------------------------------------------------- 1 | Terminal = require(process.env.COVERAGE ? '../index-cov.js' : '../index.js'); 2 | expect = require("expect.js"); 3 | -------------------------------------------------------------------------------- /node_modules/terminal.js/test/dom_output.js: -------------------------------------------------------------------------------- 1 | describe("DomOutput", function() { 2 | var TermState = Terminal.TermState; 3 | var DomOutput = Terminal.output.DomOutput; 4 | 5 | if(typeof document === 'undefined' && typeof process === 'object' && 6 | process.version.split(/[v.]/)[1] !== "0") 7 | require('jsdom-global')(); 8 | 9 | function newTerminal(w, h) { 10 | var t = new TermState({rows:h, columns:w}), tw = new Terminal(t); 11 | t.setMode("crlf", true); 12 | return tw; 13 | } 14 | 15 | it("should draw only one cursor in column one (#110)", function() { 16 | if(typeof document === 'undefined') 17 | return "This tests runs only on node v4 or newer." 18 | var t = newTerminal(); 19 | var container = document.createElement("pre"); 20 | 21 | t.dom(container); 22 | // Set cursor 23 | t.write("fff\r\nfff\x1b[H"); 24 | t.write("\x1b[2d"); 25 | 26 | // check if there are more than one cursors (lastIndex != firstIndex) 27 | var cursorIdentifier = "background: #00ff00; color: #ffffff;"; 28 | var firstIndex = container.innerHTML.indexOf(cursorIdentifier); 29 | var lastIndex = container.innerHTML.lastIndexOf(cursorIdentifier); 30 | expect(firstIndex).to.be(lastIndex); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/terminal.js/test/handler_sgi.js: -------------------------------------------------------------------------------- 1 | var TermState = Terminal.TermState; 2 | function newTerminal(w, h) { 3 | var t = new TermState({rows:h, columns:w}), tw = new Terminal(t); 4 | t.setMode('crlf', true); 5 | return tw; 6 | } 7 | describe('Terminal SGI', function() { 8 | it("resets attributes", function() { 9 | var t = newTerminal(); 10 | t.write("\x1b[1mbb\x1b[mn"); 11 | var line = t.state.getLine(0); 12 | expect(line.str).to.be('bbn'); 13 | expect(line.attr[0].bold).to.be(true); 14 | expect(line.attr[1]).to.be(undefined); 15 | expect(line.attr[2].bold).to.be(false); 16 | }); 17 | it("sets bold", function() { 18 | var t = newTerminal(); 19 | t.write("\x1b[1mb"); 20 | var line = t.state.getLine(0); 21 | expect(line.str).to.be('b'); 22 | expect(line.attr[0].bold).to.be(true); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /node_modules/terminal.js/test/html_output.js: -------------------------------------------------------------------------------- 1 | describe("HtmlOutput", function() { 2 | var TermState = Terminal.TermState; 3 | var HtmlOutput = Terminal.output.HtmlOutput; 4 | 5 | function newTerminal(w, h) { 6 | var t = new TermState({rows:h, columns:w}), tw = new Terminal(t); 7 | t.setMode("crlf", true); 8 | return tw; 9 | } 10 | 11 | it("basic write test", function() { 12 | var t = newTerminal(); 13 | var r = new HtmlOutput(t.state); 14 | t.write("\x1b[31mHello\x1b[m World"); 15 | 16 | expect(r.toString()).to.contain("Hello World"); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /node_modules/terminal.js/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | terminal.js tests 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /node_modules/terminal.js/test/plain_output.js: -------------------------------------------------------------------------------- 1 | var TermState = Terminal.TermState; 2 | var PlainOutput = Terminal.output.PlainOutput; 3 | function newTerminal(w, h) { 4 | var t = new Terminal({columns: w, rows: h}); 5 | t.state.setMode('crlf', true); 6 | return t; 7 | } 8 | describe('PlainOutput', function() { 9 | it("basic write test", function() { 10 | var t = newTerminal(80,4); 11 | var r = new PlainOutput(t.state); 12 | t.write("Hello\ntest"); 13 | expect(r.toString()).to.be('Hello\ntest\n\n\n'); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shell-bot", 3 | "private": true, 4 | "version": "0.0.1", 5 | "keywords": [ 6 | "telegram", 7 | "bot", 8 | "shell", 9 | "terminal", 10 | "botgram" 11 | ], 12 | "description": "Shellrunner Telegram bot", 13 | "homepage": "https://github.com/denomparkour/shell-bot", 14 | "dependencies": { 15 | "botgram": "^2.2", 16 | "escape-html": "1", 17 | "mime": "1", 18 | "node-pty": "^0.9.0", 19 | "node-termios": "0.0.13", 20 | "terminal.js": "1.0.9", 21 | "node": "12.13.0" 22 | }, 23 | "optionalDependencies": { 24 | "https-proxy-agent": "^2.2.1", 25 | "socks-proxy-agent": "^4.0.1" 26 | }, 27 | "bugs": { 28 | "url": "https://github.com/botgram/shell-bot/issues" 29 | }, 30 | "repository": { 31 | "type": "git", 32 | "url": "https://github.com/denomparkour/shell-bot.git" 33 | }, 34 | "license": "MIT", 35 | "author": "Alba Mendez (https://alba.sh)" 36 | } 37 | --------------------------------------------------------------------------------