rahad-all-downloader 2.1.4 → 2.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/.cache/nix/binary-cache-v6.sqlite +0 -0
- package/.cache/replit/modules/nix.res +1 -0
- package/.cache/replit/nix/env.json +1 -1
- package/.cache/typescript/5.4/node_modules/.package-lock.json +0 -88
- package/.cache/typescript/5.4/package-lock.json +0 -90
- package/.cache/typescript/5.4/package.json +1 -1
- package/.replit +4 -4
- package/README.md +2 -2
- package/index.js +1 -1
- package/package.json +4 -19
- package/.cache/replit/__replit_disk_meta.json +0 -1
- package/.cache/typescript/5.0/node_modules/.package-lock.json +0 -12
- package/.cache/typescript/5.0/node_modules/types-registry/README.md +0 -2
- package/.cache/typescript/5.0/node_modules/types-registry/index.json +0 -1
- package/.cache/typescript/5.0/node_modules/types-registry/package.json +0 -20
- package/.cache/typescript/5.0/package-lock.json +0 -17
- package/.cache/typescript/5.0/package.json +0 -1
- package/.cache/typescript/5.3/node_modules/.package-lock.json +0 -99
- package/.cache/typescript/5.3/node_modules/@types/node/LICENSE +0 -21
- package/.cache/typescript/5.3/node_modules/@types/node/README.md +0 -15
- package/.cache/typescript/5.3/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/.cache/typescript/5.3/node_modules/@types/node/assert.d.ts +0 -996
- package/.cache/typescript/5.3/node_modules/@types/node/async_hooks.d.ts +0 -539
- package/.cache/typescript/5.3/node_modules/@types/node/buffer.d.ts +0 -2362
- package/.cache/typescript/5.3/node_modules/@types/node/child_process.d.ts +0 -1540
- package/.cache/typescript/5.3/node_modules/@types/node/cluster.d.ts +0 -432
- package/.cache/typescript/5.3/node_modules/@types/node/console.d.ts +0 -415
- package/.cache/typescript/5.3/node_modules/@types/node/constants.d.ts +0 -19
- package/.cache/typescript/5.3/node_modules/@types/node/crypto.d.ts +0 -4456
- package/.cache/typescript/5.3/node_modules/@types/node/dgram.d.ts +0 -586
- package/.cache/typescript/5.3/node_modules/@types/node/diagnostics_channel.d.ts +0 -191
- package/.cache/typescript/5.3/node_modules/@types/node/dns/promises.d.ts +0 -425
- package/.cache/typescript/5.3/node_modules/@types/node/dns.d.ts +0 -809
- package/.cache/typescript/5.3/node_modules/@types/node/dom-events.d.ts +0 -122
- package/.cache/typescript/5.3/node_modules/@types/node/domain.d.ts +0 -170
- package/.cache/typescript/5.3/node_modules/@types/node/events.d.ts +0 -879
- package/.cache/typescript/5.3/node_modules/@types/node/fs/promises.d.ts +0 -1239
- package/.cache/typescript/5.3/node_modules/@types/node/fs.d.ts +0 -4291
- package/.cache/typescript/5.3/node_modules/@types/node/globals.d.ts +0 -385
- package/.cache/typescript/5.3/node_modules/@types/node/globals.global.d.ts +0 -1
- package/.cache/typescript/5.3/node_modules/@types/node/http.d.ts +0 -1888
- package/.cache/typescript/5.3/node_modules/@types/node/http2.d.ts +0 -2382
- package/.cache/typescript/5.3/node_modules/@types/node/https.d.ts +0 -550
- package/.cache/typescript/5.3/node_modules/@types/node/index.d.ts +0 -88
- package/.cache/typescript/5.3/node_modules/@types/node/inspector.d.ts +0 -2747
- package/.cache/typescript/5.3/node_modules/@types/node/module.d.ts +0 -301
- package/.cache/typescript/5.3/node_modules/@types/node/net.d.ts +0 -949
- package/.cache/typescript/5.3/node_modules/@types/node/os.d.ts +0 -478
- package/.cache/typescript/5.3/node_modules/@types/node/package.json +0 -230
- package/.cache/typescript/5.3/node_modules/@types/node/path.d.ts +0 -191
- package/.cache/typescript/5.3/node_modules/@types/node/perf_hooks.d.ts +0 -639
- package/.cache/typescript/5.3/node_modules/@types/node/process.d.ts +0 -1539
- package/.cache/typescript/5.3/node_modules/@types/node/punycode.d.ts +0 -117
- package/.cache/typescript/5.3/node_modules/@types/node/querystring.d.ts +0 -141
- package/.cache/typescript/5.3/node_modules/@types/node/readline/promises.d.ts +0 -150
- package/.cache/typescript/5.3/node_modules/@types/node/readline.d.ts +0 -539
- package/.cache/typescript/5.3/node_modules/@types/node/repl.d.ts +0 -430
- package/.cache/typescript/5.3/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/.cache/typescript/5.3/node_modules/@types/node/stream/promises.d.ts +0 -83
- package/.cache/typescript/5.3/node_modules/@types/node/stream/web.d.ts +0 -350
- package/.cache/typescript/5.3/node_modules/@types/node/stream.d.ts +0 -1701
- package/.cache/typescript/5.3/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/.cache/typescript/5.3/node_modules/@types/node/test.d.ts +0 -1382
- package/.cache/typescript/5.3/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/.cache/typescript/5.3/node_modules/@types/node/timers.d.ts +0 -240
- package/.cache/typescript/5.3/node_modules/@types/node/tls.d.ts +0 -1210
- package/.cache/typescript/5.3/node_modules/@types/node/trace_events.d.ts +0 -182
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/events.d.ts +0 -879
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs.d.ts +0 -4291
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.d.ts +0 -385
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/module.d.ts +0 -301
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/net.d.ts +0 -949
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/os.d.ts +0 -478
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/process.d.ts +0 -1539
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/url.d.ts +0 -927
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/.cache/typescript/5.3/node_modules/@types/node/tty.d.ts +0 -208
- package/.cache/typescript/5.3/node_modules/@types/node/url.d.ts +0 -927
- package/.cache/typescript/5.3/node_modules/@types/node/util.d.ts +0 -2183
- package/.cache/typescript/5.3/node_modules/@types/node/v8.d.ts +0 -635
- package/.cache/typescript/5.3/node_modules/@types/node/vm.d.ts +0 -903
- package/.cache/typescript/5.3/node_modules/@types/node/wasi.d.ts +0 -158
- package/.cache/typescript/5.3/node_modules/@types/node/worker_threads.d.ts +0 -691
- package/.cache/typescript/5.3/node_modules/@types/node/zlib.d.ts +0 -517
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/LICENSE +0 -21
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/README.md +0 -15
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/externals.d.ts +0 -32
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/index.d.ts +0 -214
- package/.cache/typescript/5.3/node_modules/@types/node-fetch/package.json +0 -83
- package/.cache/typescript/5.3/node_modules/asynckit/LICENSE +0 -21
- package/.cache/typescript/5.3/node_modules/asynckit/README.md +0 -233
- package/.cache/typescript/5.3/node_modules/asynckit/bench.js +0 -76
- package/.cache/typescript/5.3/node_modules/asynckit/index.js +0 -6
- package/.cache/typescript/5.3/node_modules/asynckit/lib/abort.js +0 -29
- package/.cache/typescript/5.3/node_modules/asynckit/lib/async.js +0 -34
- package/.cache/typescript/5.3/node_modules/asynckit/lib/defer.js +0 -26
- package/.cache/typescript/5.3/node_modules/asynckit/lib/iterate.js +0 -75
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_asynckit.js +0 -91
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_parallel.js +0 -25
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial.js +0 -25
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
- package/.cache/typescript/5.3/node_modules/asynckit/lib/state.js +0 -37
- package/.cache/typescript/5.3/node_modules/asynckit/lib/streamify.js +0 -141
- package/.cache/typescript/5.3/node_modules/asynckit/lib/terminator.js +0 -29
- package/.cache/typescript/5.3/node_modules/asynckit/package.json +0 -63
- package/.cache/typescript/5.3/node_modules/asynckit/parallel.js +0 -43
- package/.cache/typescript/5.3/node_modules/asynckit/serial.js +0 -17
- package/.cache/typescript/5.3/node_modules/asynckit/serialOrdered.js +0 -75
- package/.cache/typescript/5.3/node_modules/asynckit/stream.js +0 -21
- package/.cache/typescript/5.3/node_modules/combined-stream/License +0 -19
- package/.cache/typescript/5.3/node_modules/combined-stream/Readme.md +0 -138
- package/.cache/typescript/5.3/node_modules/combined-stream/lib/combined_stream.js +0 -208
- package/.cache/typescript/5.3/node_modules/combined-stream/package.json +0 -25
- package/.cache/typescript/5.3/node_modules/combined-stream/yarn.lock +0 -17
- package/.cache/typescript/5.3/node_modules/delayed-stream/License +0 -19
- package/.cache/typescript/5.3/node_modules/delayed-stream/Makefile +0 -7
- package/.cache/typescript/5.3/node_modules/delayed-stream/Readme.md +0 -141
- package/.cache/typescript/5.3/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
- package/.cache/typescript/5.3/node_modules/delayed-stream/package.json +0 -27
- package/.cache/typescript/5.3/node_modules/form-data/License +0 -19
- package/.cache/typescript/5.3/node_modules/form-data/README.md.bak +0 -358
- package/.cache/typescript/5.3/node_modules/form-data/Readme.md +0 -358
- package/.cache/typescript/5.3/node_modules/form-data/index.d.ts +0 -62
- package/.cache/typescript/5.3/node_modules/form-data/lib/browser.js +0 -2
- package/.cache/typescript/5.3/node_modules/form-data/lib/form_data.js +0 -501
- package/.cache/typescript/5.3/node_modules/form-data/lib/populate.js +0 -10
- package/.cache/typescript/5.3/node_modules/form-data/package.json +0 -68
- package/.cache/typescript/5.3/node_modules/mime-db/HISTORY.md +0 -507
- package/.cache/typescript/5.3/node_modules/mime-db/LICENSE +0 -23
- package/.cache/typescript/5.3/node_modules/mime-db/README.md +0 -100
- package/.cache/typescript/5.3/node_modules/mime-db/db.json +0 -8519
- package/.cache/typescript/5.3/node_modules/mime-db/index.js +0 -12
- package/.cache/typescript/5.3/node_modules/mime-db/package.json +0 -60
- package/.cache/typescript/5.3/node_modules/mime-types/HISTORY.md +0 -397
- package/.cache/typescript/5.3/node_modules/mime-types/LICENSE +0 -23
- package/.cache/typescript/5.3/node_modules/mime-types/README.md +0 -113
- package/.cache/typescript/5.3/node_modules/mime-types/index.js +0 -188
- package/.cache/typescript/5.3/node_modules/mime-types/package.json +0 -44
- package/.cache/typescript/5.3/node_modules/types-registry/README.md +0 -2
- package/.cache/typescript/5.3/node_modules/types-registry/index.json +0 -1
- package/.cache/typescript/5.3/node_modules/types-registry/package.json +0 -20
- package/.cache/typescript/5.3/node_modules/undici-types/README.md +0 -6
- package/.cache/typescript/5.3/node_modules/undici-types/agent.d.ts +0 -31
- package/.cache/typescript/5.3/node_modules/undici-types/api.d.ts +0 -43
- package/.cache/typescript/5.3/node_modules/undici-types/balanced-pool.d.ts +0 -18
- package/.cache/typescript/5.3/node_modules/undici-types/cache.d.ts +0 -36
- package/.cache/typescript/5.3/node_modules/undici-types/client.d.ts +0 -97
- package/.cache/typescript/5.3/node_modules/undici-types/connector.d.ts +0 -34
- package/.cache/typescript/5.3/node_modules/undici-types/content-type.d.ts +0 -21
- package/.cache/typescript/5.3/node_modules/undici-types/cookies.d.ts +0 -28
- package/.cache/typescript/5.3/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
- package/.cache/typescript/5.3/node_modules/undici-types/dispatcher.d.ts +0 -241
- package/.cache/typescript/5.3/node_modules/undici-types/errors.d.ts +0 -128
- package/.cache/typescript/5.3/node_modules/undici-types/fetch.d.ts +0 -209
- package/.cache/typescript/5.3/node_modules/undici-types/file.d.ts +0 -39
- package/.cache/typescript/5.3/node_modules/undici-types/filereader.d.ts +0 -54
- package/.cache/typescript/5.3/node_modules/undici-types/formdata.d.ts +0 -108
- package/.cache/typescript/5.3/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/.cache/typescript/5.3/node_modules/undici-types/global-origin.d.ts +0 -7
- package/.cache/typescript/5.3/node_modules/undici-types/handlers.d.ts +0 -9
- package/.cache/typescript/5.3/node_modules/undici-types/header.d.ts +0 -4
- package/.cache/typescript/5.3/node_modules/undici-types/index.d.ts +0 -63
- package/.cache/typescript/5.3/node_modules/undici-types/interceptors.d.ts +0 -5
- package/.cache/typescript/5.3/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/.cache/typescript/5.3/node_modules/undici-types/mock-client.d.ts +0 -25
- package/.cache/typescript/5.3/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/.cache/typescript/5.3/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/.cache/typescript/5.3/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/.cache/typescript/5.3/node_modules/undici-types/package.json +0 -55
- package/.cache/typescript/5.3/node_modules/undici-types/patch.d.ts +0 -71
- package/.cache/typescript/5.3/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/.cache/typescript/5.3/node_modules/undici-types/pool.d.ts +0 -28
- package/.cache/typescript/5.3/node_modules/undici-types/proxy-agent.d.ts +0 -30
- package/.cache/typescript/5.3/node_modules/undici-types/readable.d.ts +0 -61
- package/.cache/typescript/5.3/node_modules/undici-types/webidl.d.ts +0 -220
- package/.cache/typescript/5.3/node_modules/undici-types/websocket.d.ts +0 -131
- package/.cache/typescript/5.3/package-lock.json +0 -107
- package/.cache/typescript/5.3/package.json +0 -1
- package/.cache/typescript/5.4/node_modules/@types/body-parser/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/body-parser/README.md +0 -15
- package/.cache/typescript/5.4/node_modules/@types/body-parser/index.d.ts +0 -95
- package/.cache/typescript/5.4/node_modules/@types/body-parser/package.json +0 -58
- package/.cache/typescript/5.4/node_modules/@types/connect/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/connect/README.md +0 -15
- package/.cache/typescript/5.4/node_modules/@types/connect/index.d.ts +0 -91
- package/.cache/typescript/5.4/node_modules/@types/connect/package.json +0 -32
- package/.cache/typescript/5.4/node_modules/@types/express/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/express/README.md +0 -15
- package/.cache/typescript/5.4/node_modules/@types/express/index.d.ts +0 -128
- package/.cache/typescript/5.4/node_modules/@types/express/package.json +0 -45
- package/.cache/typescript/5.4/node_modules/@types/express-serve-static-core/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/express-serve-static-core/README.md +0 -15
- package/.cache/typescript/5.4/node_modules/@types/express-serve-static-core/index.d.ts +0 -1295
- package/.cache/typescript/5.4/node_modules/@types/express-serve-static-core/package.json +0 -50
- package/.cache/typescript/5.4/node_modules/@types/http-errors/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/http-errors/README.md +0 -15
- package/.cache/typescript/5.4/node_modules/@types/http-errors/index.d.ts +0 -77
- package/.cache/typescript/5.4/node_modules/@types/http-errors/package.json +0 -30
- package/.cache/typescript/5.4/node_modules/@types/mime/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/mime/Mime.d.ts +0 -10
- package/.cache/typescript/5.4/node_modules/@types/mime/README.md +0 -15
- package/.cache/typescript/5.4/node_modules/@types/mime/index.d.ts +0 -31
- package/.cache/typescript/5.4/node_modules/@types/mime/lite.d.ts +0 -7
- package/.cache/typescript/5.4/node_modules/@types/mime/package.json +0 -30
- package/.cache/typescript/5.4/node_modules/@types/qs/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/qs/README.md +0 -15
- package/.cache/typescript/5.4/node_modules/@types/qs/index.d.ts +0 -79
- package/.cache/typescript/5.4/node_modules/@types/qs/package.json +0 -65
- package/.cache/typescript/5.4/node_modules/@types/range-parser/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/range-parser/README.md +0 -53
- package/.cache/typescript/5.4/node_modules/@types/range-parser/index.d.ts +0 -34
- package/.cache/typescript/5.4/node_modules/@types/range-parser/package.json +0 -25
- package/.cache/typescript/5.4/node_modules/@types/send/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/send/README.md +0 -15
- package/.cache/typescript/5.4/node_modules/@types/send/index.d.ts +0 -225
- package/.cache/typescript/5.4/node_modules/@types/send/package.json +0 -33
- package/.cache/typescript/5.4/node_modules/@types/serve-static/LICENSE +0 -21
- package/.cache/typescript/5.4/node_modules/@types/serve-static/README.md +0 -15
- package/.cache/typescript/5.4/node_modules/@types/serve-static/index.d.ts +0 -107
- package/.cache/typescript/5.4/node_modules/@types/serve-static/package.json +0 -39
- package/.upm/store.json +0 -1
@@ -1,539 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* The `node:readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
|
3
|
-
*
|
4
|
-
* To use the promise-based APIs:
|
5
|
-
*
|
6
|
-
* ```js
|
7
|
-
* import * as readline from 'node:readline/promises';
|
8
|
-
* ```
|
9
|
-
*
|
10
|
-
* To use the callback and sync APIs:
|
11
|
-
*
|
12
|
-
* ```js
|
13
|
-
* import * as readline from 'node:readline';
|
14
|
-
* ```
|
15
|
-
*
|
16
|
-
* The following simple example illustrates the basic use of the `node:readline`module.
|
17
|
-
*
|
18
|
-
* ```js
|
19
|
-
* import * as readline from 'node:readline/promises';
|
20
|
-
* import { stdin as input, stdout as output } from 'node:process';
|
21
|
-
*
|
22
|
-
* const rl = readline.createInterface({ input, output });
|
23
|
-
*
|
24
|
-
* const answer = await rl.question('What do you think of Node.js? ');
|
25
|
-
*
|
26
|
-
* console.log(`Thank you for your valuable feedback: ${answer}`);
|
27
|
-
*
|
28
|
-
* rl.close();
|
29
|
-
* ```
|
30
|
-
*
|
31
|
-
* Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
|
32
|
-
* received on the `input` stream.
|
33
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/readline.js)
|
34
|
-
*/
|
35
|
-
declare module "readline" {
|
36
|
-
import { Abortable, EventEmitter } from "node:events";
|
37
|
-
import * as promises from "node:readline/promises";
|
38
|
-
export { promises };
|
39
|
-
export interface Key {
|
40
|
-
sequence?: string | undefined;
|
41
|
-
name?: string | undefined;
|
42
|
-
ctrl?: boolean | undefined;
|
43
|
-
meta?: boolean | undefined;
|
44
|
-
shift?: boolean | undefined;
|
45
|
-
}
|
46
|
-
/**
|
47
|
-
* Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a
|
48
|
-
* single `input` `Readable` stream and a single `output` `Writable` stream.
|
49
|
-
* The `output` stream is used to print prompts for user input that arrives on,
|
50
|
-
* and is read from, the `input` stream.
|
51
|
-
* @since v0.1.104
|
52
|
-
*/
|
53
|
-
export class Interface extends EventEmitter {
|
54
|
-
readonly terminal: boolean;
|
55
|
-
/**
|
56
|
-
* The current input data being processed by node.
|
57
|
-
*
|
58
|
-
* This can be used when collecting input from a TTY stream to retrieve the
|
59
|
-
* current value that has been processed thus far, prior to the `line` event
|
60
|
-
* being emitted. Once the `line` event has been emitted, this property will
|
61
|
-
* be an empty string.
|
62
|
-
*
|
63
|
-
* Be aware that modifying the value during the instance runtime may have
|
64
|
-
* unintended consequences if `rl.cursor` is not also controlled.
|
65
|
-
*
|
66
|
-
* **If not using a TTY stream for input, use the `'line'` event.**
|
67
|
-
*
|
68
|
-
* One possible use case would be as follows:
|
69
|
-
*
|
70
|
-
* ```js
|
71
|
-
* const values = ['lorem ipsum', 'dolor sit amet'];
|
72
|
-
* const rl = readline.createInterface(process.stdin);
|
73
|
-
* const showResults = debounce(() => {
|
74
|
-
* console.log(
|
75
|
-
* '\n',
|
76
|
-
* values.filter((val) => val.startsWith(rl.line)).join(' '),
|
77
|
-
* );
|
78
|
-
* }, 300);
|
79
|
-
* process.stdin.on('keypress', (c, k) => {
|
80
|
-
* showResults();
|
81
|
-
* });
|
82
|
-
* ```
|
83
|
-
* @since v0.1.98
|
84
|
-
*/
|
85
|
-
readonly line: string;
|
86
|
-
/**
|
87
|
-
* The cursor position relative to `rl.line`.
|
88
|
-
*
|
89
|
-
* This will track where the current cursor lands in the input string, when
|
90
|
-
* reading input from a TTY stream. The position of cursor determines the
|
91
|
-
* portion of the input string that will be modified as input is processed,
|
92
|
-
* as well as the column where the terminal caret will be rendered.
|
93
|
-
* @since v0.1.98
|
94
|
-
*/
|
95
|
-
readonly cursor: number;
|
96
|
-
/**
|
97
|
-
* NOTE: According to the documentation:
|
98
|
-
*
|
99
|
-
* > Instances of the `readline.Interface` class are constructed using the
|
100
|
-
* > `readline.createInterface()` method.
|
101
|
-
*
|
102
|
-
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
|
103
|
-
*/
|
104
|
-
protected constructor(
|
105
|
-
input: NodeJS.ReadableStream,
|
106
|
-
output?: NodeJS.WritableStream,
|
107
|
-
completer?: Completer | AsyncCompleter,
|
108
|
-
terminal?: boolean,
|
109
|
-
);
|
110
|
-
/**
|
111
|
-
* NOTE: According to the documentation:
|
112
|
-
*
|
113
|
-
* > Instances of the `readline.Interface` class are constructed using the
|
114
|
-
* > `readline.createInterface()` method.
|
115
|
-
*
|
116
|
-
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
|
117
|
-
*/
|
118
|
-
protected constructor(options: ReadLineOptions);
|
119
|
-
/**
|
120
|
-
* The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
|
121
|
-
* @since v15.3.0, v14.17.0
|
122
|
-
* @return the current prompt string
|
123
|
-
*/
|
124
|
-
getPrompt(): string;
|
125
|
-
/**
|
126
|
-
* The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called.
|
127
|
-
* @since v0.1.98
|
128
|
-
*/
|
129
|
-
setPrompt(prompt: string): void;
|
130
|
-
/**
|
131
|
-
* The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
|
132
|
-
* location at which to provide input.
|
133
|
-
*
|
134
|
-
* When called, `rl.prompt()` will resume the `input` stream if it has been
|
135
|
-
* paused.
|
136
|
-
*
|
137
|
-
* If the `Interface` was created with `output` set to `null` or`undefined` the prompt is not written.
|
138
|
-
* @since v0.1.98
|
139
|
-
* @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
|
140
|
-
*/
|
141
|
-
prompt(preserveCursor?: boolean): void;
|
142
|
-
/**
|
143
|
-
* The `rl.question()` method displays the `query` by writing it to the `output`,
|
144
|
-
* waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
|
145
|
-
*
|
146
|
-
* When called, `rl.question()` will resume the `input` stream if it has been
|
147
|
-
* paused.
|
148
|
-
*
|
149
|
-
* If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
|
150
|
-
*
|
151
|
-
* The `callback` function passed to `rl.question()` does not follow the typical
|
152
|
-
* pattern of accepting an `Error` object or `null` as the first argument.
|
153
|
-
* The `callback` is called with the provided answer as the only argument.
|
154
|
-
*
|
155
|
-
* An error will be thrown if calling `rl.question()` after `rl.close()`.
|
156
|
-
*
|
157
|
-
* Example usage:
|
158
|
-
*
|
159
|
-
* ```js
|
160
|
-
* rl.question('What is your favorite food? ', (answer) => {
|
161
|
-
* console.log(`Oh, so your favorite food is ${answer}`);
|
162
|
-
* });
|
163
|
-
* ```
|
164
|
-
*
|
165
|
-
* Using an `AbortController` to cancel a question.
|
166
|
-
*
|
167
|
-
* ```js
|
168
|
-
* const ac = new AbortController();
|
169
|
-
* const signal = ac.signal;
|
170
|
-
*
|
171
|
-
* rl.question('What is your favorite food? ', { signal }, (answer) => {
|
172
|
-
* console.log(`Oh, so your favorite food is ${answer}`);
|
173
|
-
* });
|
174
|
-
*
|
175
|
-
* signal.addEventListener('abort', () => {
|
176
|
-
* console.log('The food question timed out');
|
177
|
-
* }, { once: true });
|
178
|
-
*
|
179
|
-
* setTimeout(() => ac.abort(), 10000);
|
180
|
-
* ```
|
181
|
-
* @since v0.3.3
|
182
|
-
* @param query A statement or query to write to `output`, prepended to the prompt.
|
183
|
-
* @param callback A callback function that is invoked with the user's input in response to the `query`.
|
184
|
-
*/
|
185
|
-
question(query: string, callback: (answer: string) => void): void;
|
186
|
-
question(query: string, options: Abortable, callback: (answer: string) => void): void;
|
187
|
-
/**
|
188
|
-
* The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
|
189
|
-
* later if necessary.
|
190
|
-
*
|
191
|
-
* Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `Interface` instance.
|
192
|
-
* @since v0.3.4
|
193
|
-
*/
|
194
|
-
pause(): this;
|
195
|
-
/**
|
196
|
-
* The `rl.resume()` method resumes the `input` stream if it has been paused.
|
197
|
-
* @since v0.3.4
|
198
|
-
*/
|
199
|
-
resume(): this;
|
200
|
-
/**
|
201
|
-
* The `rl.close()` method closes the `Interface` instance and
|
202
|
-
* relinquishes control over the `input` and `output` streams. When called,
|
203
|
-
* the `'close'` event will be emitted.
|
204
|
-
*
|
205
|
-
* Calling `rl.close()` does not immediately stop other events (including `'line'`)
|
206
|
-
* from being emitted by the `Interface` instance.
|
207
|
-
* @since v0.1.98
|
208
|
-
*/
|
209
|
-
close(): void;
|
210
|
-
/**
|
211
|
-
* The `rl.write()` method will write either `data` or a key sequence identified
|
212
|
-
* by `key` to the `output`. The `key` argument is supported only if `output` is
|
213
|
-
* a `TTY` text terminal. See `TTY keybindings` for a list of key
|
214
|
-
* combinations.
|
215
|
-
*
|
216
|
-
* If `key` is specified, `data` is ignored.
|
217
|
-
*
|
218
|
-
* When called, `rl.write()` will resume the `input` stream if it has been
|
219
|
-
* paused.
|
220
|
-
*
|
221
|
-
* If the `Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written.
|
222
|
-
*
|
223
|
-
* ```js
|
224
|
-
* rl.write('Delete this!');
|
225
|
-
* // Simulate Ctrl+U to delete the line written previously
|
226
|
-
* rl.write(null, { ctrl: true, name: 'u' });
|
227
|
-
* ```
|
228
|
-
*
|
229
|
-
* The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_.
|
230
|
-
* @since v0.1.98
|
231
|
-
*/
|
232
|
-
write(data: string | Buffer, key?: Key): void;
|
233
|
-
write(data: undefined | null | string | Buffer, key: Key): void;
|
234
|
-
/**
|
235
|
-
* Returns the real position of the cursor in relation to the input
|
236
|
-
* prompt + string. Long input (wrapping) strings, as well as multiple
|
237
|
-
* line prompts are included in the calculations.
|
238
|
-
* @since v13.5.0, v12.16.0
|
239
|
-
*/
|
240
|
-
getCursorPos(): CursorPos;
|
241
|
-
/**
|
242
|
-
* events.EventEmitter
|
243
|
-
* 1. close
|
244
|
-
* 2. line
|
245
|
-
* 3. pause
|
246
|
-
* 4. resume
|
247
|
-
* 5. SIGCONT
|
248
|
-
* 6. SIGINT
|
249
|
-
* 7. SIGTSTP
|
250
|
-
* 8. history
|
251
|
-
*/
|
252
|
-
addListener(event: string, listener: (...args: any[]) => void): this;
|
253
|
-
addListener(event: "close", listener: () => void): this;
|
254
|
-
addListener(event: "line", listener: (input: string) => void): this;
|
255
|
-
addListener(event: "pause", listener: () => void): this;
|
256
|
-
addListener(event: "resume", listener: () => void): this;
|
257
|
-
addListener(event: "SIGCONT", listener: () => void): this;
|
258
|
-
addListener(event: "SIGINT", listener: () => void): this;
|
259
|
-
addListener(event: "SIGTSTP", listener: () => void): this;
|
260
|
-
addListener(event: "history", listener: (history: string[]) => void): this;
|
261
|
-
emit(event: string | symbol, ...args: any[]): boolean;
|
262
|
-
emit(event: "close"): boolean;
|
263
|
-
emit(event: "line", input: string): boolean;
|
264
|
-
emit(event: "pause"): boolean;
|
265
|
-
emit(event: "resume"): boolean;
|
266
|
-
emit(event: "SIGCONT"): boolean;
|
267
|
-
emit(event: "SIGINT"): boolean;
|
268
|
-
emit(event: "SIGTSTP"): boolean;
|
269
|
-
emit(event: "history", history: string[]): boolean;
|
270
|
-
on(event: string, listener: (...args: any[]) => void): this;
|
271
|
-
on(event: "close", listener: () => void): this;
|
272
|
-
on(event: "line", listener: (input: string) => void): this;
|
273
|
-
on(event: "pause", listener: () => void): this;
|
274
|
-
on(event: "resume", listener: () => void): this;
|
275
|
-
on(event: "SIGCONT", listener: () => void): this;
|
276
|
-
on(event: "SIGINT", listener: () => void): this;
|
277
|
-
on(event: "SIGTSTP", listener: () => void): this;
|
278
|
-
on(event: "history", listener: (history: string[]) => void): this;
|
279
|
-
once(event: string, listener: (...args: any[]) => void): this;
|
280
|
-
once(event: "close", listener: () => void): this;
|
281
|
-
once(event: "line", listener: (input: string) => void): this;
|
282
|
-
once(event: "pause", listener: () => void): this;
|
283
|
-
once(event: "resume", listener: () => void): this;
|
284
|
-
once(event: "SIGCONT", listener: () => void): this;
|
285
|
-
once(event: "SIGINT", listener: () => void): this;
|
286
|
-
once(event: "SIGTSTP", listener: () => void): this;
|
287
|
-
once(event: "history", listener: (history: string[]) => void): this;
|
288
|
-
prependListener(event: string, listener: (...args: any[]) => void): this;
|
289
|
-
prependListener(event: "close", listener: () => void): this;
|
290
|
-
prependListener(event: "line", listener: (input: string) => void): this;
|
291
|
-
prependListener(event: "pause", listener: () => void): this;
|
292
|
-
prependListener(event: "resume", listener: () => void): this;
|
293
|
-
prependListener(event: "SIGCONT", listener: () => void): this;
|
294
|
-
prependListener(event: "SIGINT", listener: () => void): this;
|
295
|
-
prependListener(event: "SIGTSTP", listener: () => void): this;
|
296
|
-
prependListener(event: "history", listener: (history: string[]) => void): this;
|
297
|
-
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
298
|
-
prependOnceListener(event: "close", listener: () => void): this;
|
299
|
-
prependOnceListener(event: "line", listener: (input: string) => void): this;
|
300
|
-
prependOnceListener(event: "pause", listener: () => void): this;
|
301
|
-
prependOnceListener(event: "resume", listener: () => void): this;
|
302
|
-
prependOnceListener(event: "SIGCONT", listener: () => void): this;
|
303
|
-
prependOnceListener(event: "SIGINT", listener: () => void): this;
|
304
|
-
prependOnceListener(event: "SIGTSTP", listener: () => void): this;
|
305
|
-
prependOnceListener(event: "history", listener: (history: string[]) => void): this;
|
306
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
307
|
-
}
|
308
|
-
export type ReadLine = Interface; // type forwarded for backwards compatibility
|
309
|
-
export type Completer = (line: string) => CompleterResult;
|
310
|
-
export type AsyncCompleter = (
|
311
|
-
line: string,
|
312
|
-
callback: (err?: null | Error, result?: CompleterResult) => void,
|
313
|
-
) => void;
|
314
|
-
export type CompleterResult = [string[], string];
|
315
|
-
export interface ReadLineOptions {
|
316
|
-
input: NodeJS.ReadableStream;
|
317
|
-
output?: NodeJS.WritableStream | undefined;
|
318
|
-
completer?: Completer | AsyncCompleter | undefined;
|
319
|
-
terminal?: boolean | undefined;
|
320
|
-
/**
|
321
|
-
* Initial list of history lines. This option makes sense
|
322
|
-
* only if `terminal` is set to `true` by the user or by an internal `output`
|
323
|
-
* check, otherwise the history caching mechanism is not initialized at all.
|
324
|
-
* @default []
|
325
|
-
*/
|
326
|
-
history?: string[] | undefined;
|
327
|
-
historySize?: number | undefined;
|
328
|
-
prompt?: string | undefined;
|
329
|
-
crlfDelay?: number | undefined;
|
330
|
-
/**
|
331
|
-
* If `true`, when a new input line added
|
332
|
-
* to the history list duplicates an older one, this removes the older line
|
333
|
-
* from the list.
|
334
|
-
* @default false
|
335
|
-
*/
|
336
|
-
removeHistoryDuplicates?: boolean | undefined;
|
337
|
-
escapeCodeTimeout?: number | undefined;
|
338
|
-
tabSize?: number | undefined;
|
339
|
-
}
|
340
|
-
/**
|
341
|
-
* The `readline.createInterface()` method creates a new `readline.Interface`instance.
|
342
|
-
*
|
343
|
-
* ```js
|
344
|
-
* const readline = require('node:readline');
|
345
|
-
* const rl = readline.createInterface({
|
346
|
-
* input: process.stdin,
|
347
|
-
* output: process.stdout,
|
348
|
-
* });
|
349
|
-
* ```
|
350
|
-
*
|
351
|
-
* Once the `readline.Interface` instance is created, the most common case is to
|
352
|
-
* listen for the `'line'` event:
|
353
|
-
*
|
354
|
-
* ```js
|
355
|
-
* rl.on('line', (line) => {
|
356
|
-
* console.log(`Received: ${line}`);
|
357
|
-
* });
|
358
|
-
* ```
|
359
|
-
*
|
360
|
-
* If `terminal` is `true` for this instance then the `output` stream will get
|
361
|
-
* the best compatibility if it defines an `output.columns` property and emits
|
362
|
-
* a `'resize'` event on the `output` if or when the columns ever change
|
363
|
-
* (`process.stdout` does this automatically when it is a TTY).
|
364
|
-
*
|
365
|
-
* When creating a `readline.Interface` using `stdin` as input, the program
|
366
|
-
* will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without
|
367
|
-
* waiting for user input, call `process.stdin.unref()`.
|
368
|
-
* @since v0.1.98
|
369
|
-
*/
|
370
|
-
export function createInterface(
|
371
|
-
input: NodeJS.ReadableStream,
|
372
|
-
output?: NodeJS.WritableStream,
|
373
|
-
completer?: Completer | AsyncCompleter,
|
374
|
-
terminal?: boolean,
|
375
|
-
): Interface;
|
376
|
-
export function createInterface(options: ReadLineOptions): Interface;
|
377
|
-
/**
|
378
|
-
* The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
|
379
|
-
*
|
380
|
-
* Optionally, `interface` specifies a `readline.Interface` instance for which
|
381
|
-
* autocompletion is disabled when copy-pasted input is detected.
|
382
|
-
*
|
383
|
-
* If the `stream` is a `TTY`, then it must be in raw mode.
|
384
|
-
*
|
385
|
-
* This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop
|
386
|
-
* the `input` from emitting `'keypress'` events.
|
387
|
-
*
|
388
|
-
* ```js
|
389
|
-
* readline.emitKeypressEvents(process.stdin);
|
390
|
-
* if (process.stdin.isTTY)
|
391
|
-
* process.stdin.setRawMode(true);
|
392
|
-
* ```
|
393
|
-
*
|
394
|
-
* ## Example: Tiny CLI
|
395
|
-
*
|
396
|
-
* The following example illustrates the use of `readline.Interface` class to
|
397
|
-
* implement a small command-line interface:
|
398
|
-
*
|
399
|
-
* ```js
|
400
|
-
* const readline = require('node:readline');
|
401
|
-
* const rl = readline.createInterface({
|
402
|
-
* input: process.stdin,
|
403
|
-
* output: process.stdout,
|
404
|
-
* prompt: 'OHAI> ',
|
405
|
-
* });
|
406
|
-
*
|
407
|
-
* rl.prompt();
|
408
|
-
*
|
409
|
-
* rl.on('line', (line) => {
|
410
|
-
* switch (line.trim()) {
|
411
|
-
* case 'hello':
|
412
|
-
* console.log('world!');
|
413
|
-
* break;
|
414
|
-
* default:
|
415
|
-
* console.log(`Say what? I might have heard '${line.trim()}'`);
|
416
|
-
* break;
|
417
|
-
* }
|
418
|
-
* rl.prompt();
|
419
|
-
* }).on('close', () => {
|
420
|
-
* console.log('Have a great day!');
|
421
|
-
* process.exit(0);
|
422
|
-
* });
|
423
|
-
* ```
|
424
|
-
*
|
425
|
-
* ## Example: Read file stream line-by-Line
|
426
|
-
*
|
427
|
-
* A common use case for `readline` is to consume an input file one line at a
|
428
|
-
* time. The easiest way to do so is leveraging the `fs.ReadStream` API as
|
429
|
-
* well as a `for await...of` loop:
|
430
|
-
*
|
431
|
-
* ```js
|
432
|
-
* const fs = require('node:fs');
|
433
|
-
* const readline = require('node:readline');
|
434
|
-
*
|
435
|
-
* async function processLineByLine() {
|
436
|
-
* const fileStream = fs.createReadStream('input.txt');
|
437
|
-
*
|
438
|
-
* const rl = readline.createInterface({
|
439
|
-
* input: fileStream,
|
440
|
-
* crlfDelay: Infinity,
|
441
|
-
* });
|
442
|
-
* // Note: we use the crlfDelay option to recognize all instances of CR LF
|
443
|
-
* // ('\r\n') in input.txt as a single line break.
|
444
|
-
*
|
445
|
-
* for await (const line of rl) {
|
446
|
-
* // Each line in input.txt will be successively available here as `line`.
|
447
|
-
* console.log(`Line from file: ${line}`);
|
448
|
-
* }
|
449
|
-
* }
|
450
|
-
*
|
451
|
-
* processLineByLine();
|
452
|
-
* ```
|
453
|
-
*
|
454
|
-
* Alternatively, one could use the `'line'` event:
|
455
|
-
*
|
456
|
-
* ```js
|
457
|
-
* const fs = require('node:fs');
|
458
|
-
* const readline = require('node:readline');
|
459
|
-
*
|
460
|
-
* const rl = readline.createInterface({
|
461
|
-
* input: fs.createReadStream('sample.txt'),
|
462
|
-
* crlfDelay: Infinity,
|
463
|
-
* });
|
464
|
-
*
|
465
|
-
* rl.on('line', (line) => {
|
466
|
-
* console.log(`Line from file: ${line}`);
|
467
|
-
* });
|
468
|
-
* ```
|
469
|
-
*
|
470
|
-
* Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
|
471
|
-
*
|
472
|
-
* ```js
|
473
|
-
* const { once } = require('node:events');
|
474
|
-
* const { createReadStream } = require('node:fs');
|
475
|
-
* const { createInterface } = require('node:readline');
|
476
|
-
*
|
477
|
-
* (async function processLineByLine() {
|
478
|
-
* try {
|
479
|
-
* const rl = createInterface({
|
480
|
-
* input: createReadStream('big-file.txt'),
|
481
|
-
* crlfDelay: Infinity,
|
482
|
-
* });
|
483
|
-
*
|
484
|
-
* rl.on('line', (line) => {
|
485
|
-
* // Process the line.
|
486
|
-
* });
|
487
|
-
*
|
488
|
-
* await once(rl, 'close');
|
489
|
-
*
|
490
|
-
* console.log('File processed.');
|
491
|
-
* } catch (err) {
|
492
|
-
* console.error(err);
|
493
|
-
* }
|
494
|
-
* })();
|
495
|
-
* ```
|
496
|
-
* @since v0.7.7
|
497
|
-
*/
|
498
|
-
export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
499
|
-
export type Direction = -1 | 0 | 1;
|
500
|
-
export interface CursorPos {
|
501
|
-
rows: number;
|
502
|
-
cols: number;
|
503
|
-
}
|
504
|
-
/**
|
505
|
-
* The `readline.clearLine()` method clears current line of given `TTY` stream
|
506
|
-
* in a specified direction identified by `dir`.
|
507
|
-
* @since v0.7.7
|
508
|
-
* @param callback Invoked once the operation completes.
|
509
|
-
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
510
|
-
*/
|
511
|
-
export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
512
|
-
/**
|
513
|
-
* The `readline.clearScreenDown()` method clears the given `TTY` stream from
|
514
|
-
* the current position of the cursor down.
|
515
|
-
* @since v0.7.7
|
516
|
-
* @param callback Invoked once the operation completes.
|
517
|
-
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
518
|
-
*/
|
519
|
-
export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
520
|
-
/**
|
521
|
-
* The `readline.cursorTo()` method moves cursor to the specified position in a
|
522
|
-
* given `TTY` `stream`.
|
523
|
-
* @since v0.7.7
|
524
|
-
* @param callback Invoked once the operation completes.
|
525
|
-
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
526
|
-
*/
|
527
|
-
export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
528
|
-
/**
|
529
|
-
* The `readline.moveCursor()` method moves the cursor _relative_ to its current
|
530
|
-
* position in a given `TTY` `stream`.
|
531
|
-
* @since v0.7.7
|
532
|
-
* @param callback Invoked once the operation completes.
|
533
|
-
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
534
|
-
*/
|
535
|
-
export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
536
|
-
}
|
537
|
-
declare module "node:readline" {
|
538
|
-
export * from "readline";
|
539
|
-
}
|