aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <freeziv.ytb@gmail.com>2021-03-07 18:29:17 +0100
committerMinteck <freeziv.ytb@gmail.com>2021-03-07 18:29:17 +0100
commit0f79e708bf07721b73ea41e5d341be08e8ea4dce (patch)
treef3c63cd6a9f4ef0b26f95eec6a031600232e80c8
downloadelectrode-0f79e708bf07721b73ea41e5d341be08e8ea4dce.tar.gz
electrode-0f79e708bf07721b73ea41e5d341be08e8ea4dce.tar.bz2
electrode-0f79e708bf07721b73ea41e5d341be08e8ea4dce.zip
Initial commit
-rw-r--r--.gitignore1
-rw-r--r--README.md31
-rw-r--r--cache/aHAD_3ff98dc7-05e0-4c1f-a2d9-ca9f8066d5f9.json1
-rw-r--r--cache/aHAD_40bb9a8a-f956-4cc2-b8e2-272363c1553e.json3
-rw-r--r--cache/aHAD_44b818ca-2ab9-49d9-99af-6126637cc9a8.json4
-rw-r--r--cache/aHAD_4e2911e9-8f1a-42f0-b7f7-7c03b711507c.json3
-rw-r--r--cache/aHAD_68d64100-d723-40cd-9027-067cba4811f8.json1
-rw-r--r--cache/aHAD_760f791d-6cbc-4e9a-885a-edbbb5c161bb.json3
-rw-r--r--cache/aHAD_d4a91228-b517-465c-9816-ef56c0699fdd.json3
-rw-r--r--cache/headers.php12
-rw-r--r--config/network.json4
-rw-r--r--config/product.json4
-rw-r--r--config/updates.json16
-rw-r--r--core/access.js52
-rw-r--r--core/cookies.js11
-rw-r--r--core/finder.js22
-rw-r--r--core/headClean.js15
-rw-r--r--core/request.js111
-rw-r--r--index.js66
-rw-r--r--node_modules/.bin/mimebin0 -> 36 bytes
-rw-r--r--node_modules/.bin/ncpbin0 -> 36 bytes
-rw-r--r--node_modules/.bin/uuidbin0 -> 50 bytes
-rw-r--r--node_modules/@tokenizer/token/README.md6
-rw-r--r--node_modules/@tokenizer/token/index.d.ts29
-rw-r--r--node_modules/@tokenizer/token/package.json61
-rw-r--r--node_modules/@types/debug/LICENSE21
-rw-r--r--node_modules/@types/debug/README.md16
-rw-r--r--node_modules/@types/debug/index.d.ts49
-rw-r--r--node_modules/@types/debug/package.json73
-rw-r--r--node_modules/@types/node/LICENSE21
-rw-r--r--node_modules/@types/node/README.md16
-rw-r--r--node_modules/@types/node/assert.d.ts129
-rw-r--r--node_modules/@types/node/async_hooks.d.ts233
-rw-r--r--node_modules/@types/node/base.d.ts19
-rw-r--r--node_modules/@types/node/buffer.d.ts26
-rw-r--r--node_modules/@types/node/child_process.d.ts513
-rw-r--r--node_modules/@types/node/cluster.d.ts266
-rw-r--r--node_modules/@types/node/console.d.ts137
-rw-r--r--node_modules/@types/node/constants.d.ts19
-rw-r--r--node_modules/@types/node/crypto.d.ts1176
-rw-r--r--node_modules/@types/node/dgram.d.ts145
-rw-r--r--node_modules/@types/node/dns.d.ts384
-rw-r--r--node_modules/@types/node/domain.d.ts28
-rw-r--r--node_modules/@types/node/events.d.ts83
-rw-r--r--node_modules/@types/node/fs.d.ts2262
-rw-r--r--node_modules/@types/node/fs/promises.d.ts561
-rw-r--r--node_modules/@types/node/globals.d.ts614
-rw-r--r--node_modules/@types/node/globals.global.d.ts1
-rw-r--r--node_modules/@types/node/http.d.ts427
-rw-r--r--node_modules/@types/node/http2.d.ts962
-rw-r--r--node_modules/@types/node/https.d.ts40
-rw-r--r--node_modules/@types/node/index.d.ts59
-rw-r--r--node_modules/@types/node/inspector.d.ts3048
-rw-r--r--node_modules/@types/node/module.d.ts57
-rw-r--r--node_modules/@types/node/net.d.ts289
-rw-r--r--node_modules/@types/node/os.d.ts243
-rw-r--r--node_modules/@types/node/package.json229
-rw-r--r--node_modules/@types/node/path.d.ts158
-rw-r--r--node_modules/@types/node/perf_hooks.d.ts275
-rw-r--r--node_modules/@types/node/process.d.ts412
-rw-r--r--node_modules/@types/node/punycode.d.ts86
-rw-r--r--node_modules/@types/node/querystring.d.ts32
-rw-r--r--node_modules/@types/node/readline.d.ts174
-rw-r--r--node_modules/@types/node/repl.d.ts399
-rw-r--r--node_modules/@types/node/stream.d.ts359
-rw-r--r--node_modules/@types/node/string_decoder.d.ts11
-rw-r--r--node_modules/@types/node/timers.d.ts20
-rw-r--r--node_modules/@types/node/tls.d.ts783
-rw-r--r--node_modules/@types/node/trace_events.d.ts65
-rw-r--r--node_modules/@types/node/ts3.4/assert.d.ts103
-rw-r--r--node_modules/@types/node/ts3.4/base.d.ts56
-rw-r--r--node_modules/@types/node/ts3.4/globals.global.d.ts1
-rw-r--r--node_modules/@types/node/ts3.4/index.d.ts8
-rw-r--r--node_modules/@types/node/ts3.6/base.d.ts22
-rw-r--r--node_modules/@types/node/ts3.6/index.d.ts7
-rw-r--r--node_modules/@types/node/tty.d.ts70
-rw-r--r--node_modules/@types/node/url.d.ts120
-rw-r--r--node_modules/@types/node/util.d.ts211
-rw-r--r--node_modules/@types/node/v8.d.ts191
-rw-r--r--node_modules/@types/node/vm.d.ts152
-rw-r--r--node_modules/@types/node/wasi.d.ts90
-rw-r--r--node_modules/@types/node/worker_threads.d.ts242
-rw-r--r--node_modules/@types/node/zlib.d.ts365
-rw-r--r--node_modules/@types/readable-stream/LICENSE21
-rw-r--r--node_modules/@types/readable-stream/README.md16
-rw-r--r--node_modules/@types/readable-stream/index.d.ts281
-rw-r--r--node_modules/@types/readable-stream/package.json60
-rw-r--r--node_modules/ansi-regex/index.d.ts37
-rw-r--r--node_modules/ansi-regex/index.js10
-rw-r--r--node_modules/ansi-regex/license9
-rw-r--r--node_modules/ansi-regex/package.json90
-rw-r--r--node_modules/ansi-regex/readme.md78
-rw-r--r--node_modules/ansi-styles/index.d.ts345
-rw-r--r--node_modules/ansi-styles/index.js163
-rw-r--r--node_modules/ansi-styles/license9
-rw-r--r--node_modules/ansi-styles/package.json91
-rw-r--r--node_modules/ansi-styles/readme.md152
-rw-r--r--node_modules/base64-js/LICENSE21
-rw-r--r--node_modules/base64-js/README.md32
-rw-r--r--node_modules/base64-js/base64js.min.js1
-rw-r--r--node_modules/base64-js/index.js152
-rw-r--r--node_modules/base64-js/package.json63
-rw-r--r--node_modules/bl/.travis.yml16
-rw-r--r--node_modules/bl/BufferList.js396
-rw-r--r--node_modules/bl/LICENSE.md13
-rw-r--r--node_modules/bl/README.md247
-rw-r--r--node_modules/bl/bl.js84
-rw-r--r--node_modules/bl/package.json68
-rw-r--r--node_modules/bl/test/convert.js21
-rw-r--r--node_modules/bl/test/indexOf.js492
-rw-r--r--node_modules/bl/test/isBufferList.js32
-rw-r--r--node_modules/bl/test/test.js851
-rw-r--r--node_modules/buffer/AUTHORS.md62
-rw-r--r--node_modules/buffer/LICENSE21
-rw-r--r--node_modules/buffer/README.md416
-rw-r--r--node_modules/buffer/index.d.ts186
-rw-r--r--node_modules/buffer/index.js1794
-rw-r--r--node_modules/buffer/package.json116
-rw-r--r--node_modules/chalk/index.d.ts415
-rw-r--r--node_modules/chalk/license9
-rw-r--r--node_modules/chalk/package.json105
-rw-r--r--node_modules/chalk/readme.md293
-rw-r--r--node_modules/chalk/source/index.js229
-rw-r--r--node_modules/chalk/source/templates.js134
-rw-r--r--node_modules/chalk/source/util.js39
-rw-r--r--node_modules/chownr/LICENSE15
-rw-r--r--node_modules/chownr/README.md3
-rw-r--r--node_modules/chownr/chownr.js167
-rw-r--r--node_modules/chownr/package.json65
-rw-r--r--node_modules/cli-cursor/index.d.ts45
-rw-r--r--node_modules/cli-cursor/index.js35
-rw-r--r--node_modules/cli-cursor/license9
-rw-r--r--node_modules/cli-cursor/package.json81
-rw-r--r--node_modules/cli-cursor/readme.md55
-rw-r--r--node_modules/cli-spinners/index.d.ts115
-rw-r--r--node_modules/cli-spinners/index.js17
-rw-r--r--node_modules/cli-spinners/license9
-rw-r--r--node_modules/cli-spinners/package.json83
-rw-r--r--node_modules/cli-spinners/readme.md53
-rw-r--r--node_modules/cli-spinners/spinners.json1295
-rw-r--r--node_modules/clone/.npmignore4
-rw-r--r--node_modules/clone/LICENSE18
-rw-r--r--node_modules/clone/README.md126
-rw-r--r--node_modules/clone/clone.iml10
-rw-r--r--node_modules/clone/clone.js166
-rw-r--r--node_modules/clone/package.json140
-rw-r--r--node_modules/color-convert/CHANGELOG.md54
-rw-r--r--node_modules/color-convert/LICENSE21
-rw-r--r--node_modules/color-convert/README.md68
-rw-r--r--node_modules/color-convert/conversions.js839
-rw-r--r--node_modules/color-convert/index.js81
-rw-r--r--node_modules/color-convert/package.json86
-rw-r--r--node_modules/color-convert/route.js97
-rw-r--r--node_modules/color-name/LICENSE8
-rw-r--r--node_modules/color-name/README.md11
-rw-r--r--node_modules/color-name/index.js152
-rw-r--r--node_modules/color-name/package.json59
-rw-r--r--node_modules/defaults/.npmignore1
-rw-r--r--node_modules/defaults/LICENSE21
-rw-r--r--node_modules/defaults/README.md43
-rw-r--r--node_modules/defaults/index.js13
-rw-r--r--node_modules/defaults/package.json60
-rw-r--r--node_modules/defaults/test.js34
-rw-r--r--node_modules/end-of-stream/LICENSE21
-rw-r--r--node_modules/end-of-stream/README.md54
-rw-r--r--node_modules/end-of-stream/index.js94
-rw-r--r--node_modules/end-of-stream/package.json69
-rw-r--r--node_modules/file-type/browser.d.ts50
-rw-r--r--node_modules/file-type/browser.js50
-rw-r--r--node_modules/file-type/core.d.ts379
-rw-r--r--node_modules/file-type/core.js1433
-rw-r--r--node_modules/file-type/index.d.ts27
-rw-r--r--node_modules/file-type/index.js32
-rw-r--r--node_modules/file-type/license9
-rw-r--r--node_modules/file-type/package.json245
-rw-r--r--node_modules/file-type/readme.md436
-rw-r--r--node_modules/file-type/supported.js271
-rw-r--r--node_modules/file-type/util.js40
-rw-r--r--node_modules/formidable/LICENSE22
-rw-r--r--node_modules/formidable/README.md735
-rw-r--r--node_modules/formidable/benchmark-2020-01-29_xeon-x3440.pngbin0 -> 25658 bytes
-rw-r--r--node_modules/formidable/lib/file.js81
-rw-r--r--node_modules/formidable/lib/incoming_form.js558
-rw-r--r--node_modules/formidable/lib/index.js3
-rw-r--r--node_modules/formidable/lib/json_parser.js30
-rw-r--r--node_modules/formidable/lib/multipart_parser.js332
-rw-r--r--node_modules/formidable/lib/octet_parser.js20
-rw-r--r--node_modules/formidable/lib/querystring_parser.js27
-rw-r--r--node_modules/formidable/package.json60
-rw-r--r--node_modules/fs-constants/LICENSE21
-rw-r--r--node_modules/fs-constants/README.md26
-rw-r--r--node_modules/fs-constants/browser.js1
-rw-r--r--node_modules/fs-constants/index.js1
-rw-r--r--node_modules/fs-constants/package.json50
-rw-r--r--node_modules/has-flag/index.d.ts39
-rw-r--r--node_modules/has-flag/index.js8
-rw-r--r--node_modules/has-flag/license9
-rw-r--r--node_modules/has-flag/package.json81
-rw-r--r--node_modules/has-flag/readme.md89
-rw-r--r--node_modules/ieee754/LICENSE11
-rw-r--r--node_modules/ieee754/README.md53
-rw-r--r--node_modules/ieee754/index.js84
-rw-r--r--node_modules/ieee754/package.json72
-rw-r--r--node_modules/inherits/LICENSE16
-rw-r--r--node_modules/inherits/README.md42
-rw-r--r--node_modules/inherits/inherits.js9
-rw-r--r--node_modules/inherits/inherits_browser.js27
-rw-r--r--node_modules/inherits/package.json66
-rw-r--r--node_modules/is-interactive/index.d.ts31
-rw-r--r--node_modules/is-interactive/index.js9
-rw-r--r--node_modules/is-interactive/license9
-rw-r--r--node_modules/is-interactive/package.json73
-rw-r--r--node_modules/is-interactive/readme.md51
-rw-r--r--node_modules/is-typedarray/LICENSE.md18
-rw-r--r--node_modules/is-typedarray/README.md16
-rw-r--r--node_modules/is-typedarray/index.js41
-rw-r--r--node_modules/is-typedarray/package.json59
-rw-r--r--node_modules/is-typedarray/test.js34
-rw-r--r--node_modules/log-symbols/browser.js8
-rw-r--r--node_modules/log-symbols/index.d.ts25
-rw-r--r--node_modules/log-symbols/index.js20
-rw-r--r--node_modules/log-symbols/license9
-rw-r--r--node_modules/log-symbols/package.json85
-rw-r--r--node_modules/log-symbols/readme.md51
-rw-r--r--node_modules/mime/CHANGELOG.md268
-rw-r--r--node_modules/mime/LICENSE21
-rw-r--r--node_modules/mime/Mime.js95
-rw-r--r--node_modules/mime/README.md187
-rw-r--r--node_modules/mime/cli.js10
-rw-r--r--node_modules/mime/index.js4
-rw-r--r--node_modules/mime/lite.js4
-rw-r--r--node_modules/mime/package.json84
-rw-r--r--node_modules/mime/types/other.js1
-rw-r--r--node_modules/mime/types/standard.js1
-rw-r--r--node_modules/mimic-fn/index.d.ts54
-rw-r--r--node_modules/mimic-fn/index.js13
-rw-r--r--node_modules/mimic-fn/license9
-rw-r--r--node_modules/mimic-fn/package.json77
-rw-r--r--node_modules/mimic-fn/readme.md69
-rw-r--r--node_modules/mkdirp-classic/LICENSE21
-rw-r--r--node_modules/mkdirp-classic/README.md18
-rw-r--r--node_modules/mkdirp-classic/index.js98
-rw-r--r--node_modules/mkdirp-classic/package.json49
-rw-r--r--node_modules/mute-stream/LICENSE15
-rw-r--r--node_modules/mute-stream/README.md68
-rw-r--r--node_modules/mute-stream/mute.js145
-rw-r--r--node_modules/mute-stream/package.json65
-rw-r--r--node_modules/ncp/.npmignore4
-rw-r--r--node_modules/ncp/.travis.yml6
-rw-r--r--node_modules/ncp/LICENSE.md21
-rw-r--r--node_modules/ncp/README.md63
-rw-r--r--node_modules/ncp/bin/ncp48
-rw-r--r--node_modules/ncp/lib/ncp.js261
-rw-r--r--node_modules/ncp/package.json65
-rw-r--r--node_modules/ncp/test/modified-files/out/a1
-rw-r--r--node_modules/ncp/test/modified-files/src/a1
-rw-r--r--node_modules/ncp/test/ncp.js197
-rw-r--r--node_modules/ncp/test/regular-fixtures/src/a1
-rw-r--r--node_modules/ncp/test/regular-fixtures/src/b1
-rw-r--r--node_modules/ncp/test/regular-fixtures/src/c0
-rw-r--r--node_modules/ncp/test/regular-fixtures/src/d0
-rw-r--r--node_modules/ncp/test/regular-fixtures/src/e0
-rw-r--r--node_modules/ncp/test/regular-fixtures/src/f0
-rw-r--r--node_modules/ncp/test/regular-fixtures/src/sub/a1
-rw-r--r--node_modules/ncp/test/regular-fixtures/src/sub/b0
-rw-r--r--node_modules/ncp/test/symlink-fixtures/src/dir/bar1
-rw-r--r--node_modules/ncp/test/symlink-fixtures/src/foo1
-rw-r--r--node_modules/once/LICENSE15
-rw-r--r--node_modules/once/README.md79
-rw-r--r--node_modules/once/once.js42
-rw-r--r--node_modules/once/package.json70
-rw-r--r--node_modules/onetime/index.d.ts64
-rw-r--r--node_modules/onetime/index.js44
-rw-r--r--node_modules/onetime/license9
-rw-r--r--node_modules/onetime/package.json78
-rw-r--r--node_modules/onetime/readme.md94
-rw-r--r--node_modules/ora/index.d.ts278
-rw-r--r--node_modules/ora/index.js407
-rw-r--r--node_modules/ora/license9
-rw-r--r--node_modules/ora/package.json91
-rw-r--r--node_modules/ora/readme.md263
-rw-r--r--node_modules/peek-readable/LICENSE21
-rw-r--r--node_modules/peek-readable/README.md104
-rw-r--r--node_modules/peek-readable/lib/EndOfFileStream.d.ts7
-rw-r--r--node_modules/peek-readable/lib/EndOfFileStream.js13
-rw-r--r--node_modules/peek-readable/lib/index.d.ts43
-rw-r--r--node_modules/peek-readable/lib/index.js137
-rw-r--r--node_modules/peek-readable/package.json106
-rw-r--r--node_modules/progress/CHANGELOG.md115
-rw-r--r--node_modules/progress/LICENSE22
-rw-r--r--node_modules/progress/Makefile8
-rw-r--r--node_modules/progress/Readme.md146
-rw-r--r--node_modules/progress/index.js1
-rw-r--r--node_modules/progress/lib/node-progress.js236
-rw-r--r--node_modules/progress/package.json73
-rw-r--r--node_modules/pump/.travis.yml5
-rw-r--r--node_modules/pump/LICENSE21
-rw-r--r--node_modules/pump/README.md65
-rw-r--r--node_modules/pump/index.js82
-rw-r--r--node_modules/pump/package.json62
-rw-r--r--node_modules/pump/test-browser.js66
-rw-r--r--node_modules/pump/test-node.js53
-rw-r--r--node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--node_modules/readable-stream/LICENSE47
-rw-r--r--node_modules/readable-stream/README.md106
-rw-r--r--node_modules/readable-stream/errors-browser.js127
-rw-r--r--node_modules/readable-stream/errors.js116
-rw-r--r--node_modules/readable-stream/experimentalWarning.js17
-rw-r--r--node_modules/readable-stream/lib/_stream_duplex.js139
-rw-r--r--node_modules/readable-stream/lib/_stream_passthrough.js39
-rw-r--r--node_modules/readable-stream/lib/_stream_readable.js1124
-rw-r--r--node_modules/readable-stream/lib/_stream_transform.js201
-rw-r--r--node_modules/readable-stream/lib/_stream_writable.js697
-rw-r--r--node_modules/readable-stream/lib/internal/streams/async_iterator.js207
-rw-r--r--node_modules/readable-stream/lib/internal/streams/buffer_list.js210
-rw-r--r--node_modules/readable-stream/lib/internal/streams/destroy.js105
-rw-r--r--node_modules/readable-stream/lib/internal/streams/end-of-stream.js104
-rw-r--r--node_modules/readable-stream/lib/internal/streams/from-browser.js3
-rw-r--r--node_modules/readable-stream/lib/internal/streams/from.js64
-rw-r--r--node_modules/readable-stream/lib/internal/streams/pipeline.js97
-rw-r--r--node_modules/readable-stream/lib/internal/streams/state.js27
-rw-r--r--node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--node_modules/readable-stream/package.json101
-rw-r--r--node_modules/readable-stream/readable-browser.js9
-rw-r--r--node_modules/readable-stream/readable.js16
-rw-r--r--node_modules/readable-web-to-node-stream/README.md70
-rw-r--r--node_modules/readable-web-to-node-stream/lib/index.d.ts39
-rw-r--r--node_modules/readable-web-to-node-stream/lib/index.js69
-rw-r--r--node_modules/readable-web-to-node-stream/lib/index.spec.js147
-rw-r--r--node_modules/readable-web-to-node-stream/package.json113
-rw-r--r--node_modules/restore-cursor/index.d.ts13
-rw-r--r--node_modules/restore-cursor/index.js9
-rw-r--r--node_modules/restore-cursor/license9
-rw-r--r--node_modules/restore-cursor/package.json87
-rw-r--r--node_modules/restore-cursor/readme.md26
-rw-r--r--node_modules/safe-buffer/LICENSE21
-rw-r--r--node_modules/safe-buffer/README.md584
-rw-r--r--node_modules/safe-buffer/index.d.ts187
-rw-r--r--node_modules/safe-buffer/index.js65
-rw-r--r--node_modules/safe-buffer/package.json79
-rw-r--r--node_modules/signal-exit/CHANGELOG.md35
-rw-r--r--node_modules/signal-exit/LICENSE.txt16
-rw-r--r--node_modules/signal-exit/README.md39
-rw-r--r--node_modules/signal-exit/index.js163
-rw-r--r--node_modules/signal-exit/package.json69
-rw-r--r--node_modules/signal-exit/signals.js53
-rw-r--r--node_modules/string_decoder/LICENSE48
-rw-r--r--node_modules/string_decoder/README.md47
-rw-r--r--node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--node_modules/string_decoder/package.json65
-rw-r--r--node_modules/strip-ansi/index.d.ts17
-rw-r--r--node_modules/strip-ansi/index.js4
-rw-r--r--node_modules/strip-ansi/license9
-rw-r--r--node_modules/strip-ansi/package.json89
-rw-r--r--node_modules/strip-ansi/readme.md46
-rw-r--r--node_modules/strtok3/LICENSE15
-rw-r--r--node_modules/strtok3/README.md301
-rw-r--r--node_modules/strtok3/lib/AbstractTokenizer.d.ts62
-rw-r--r--node_modules/strtok3/lib/AbstractTokenizer.js69
-rw-r--r--node_modules/strtok3/lib/BufferTokenizer.d.ts37
-rw-r--r--node_modules/strtok3/lib/BufferTokenizer.js114
-rw-r--r--node_modules/strtok3/lib/FileTokenizer.d.ts28
-rw-r--r--node_modules/strtok3/lib/FileTokenizer.js112
-rw-r--r--node_modules/strtok3/lib/FsPromise.d.ts18
-rw-r--r--node_modules/strtok3/lib/FsPromise.js79
-rw-r--r--node_modules/strtok3/lib/ReadStreamTokenizer.d.ts28
-rw-r--r--node_modules/strtok3/lib/ReadStreamTokenizer.js128
-rw-r--r--node_modules/strtok3/lib/core.d.ts23
-rw-r--r--node_modules/strtok3/lib/core.js29
-rw-r--r--node_modules/strtok3/lib/index.d.ts15
-rw-r--r--node_modules/strtok3/lib/index.js27
-rw-r--r--node_modules/strtok3/lib/types.d.ts103
-rw-r--r--node_modules/strtok3/lib/types.js2
-rw-r--r--node_modules/strtok3/package.json126
-rw-r--r--node_modules/supports-color/browser.js5
-rw-r--r--node_modules/supports-color/index.js135
-rw-r--r--node_modules/supports-color/license9
-rw-r--r--node_modules/supports-color/package.json88
-rw-r--r--node_modules/supports-color/readme.md76
-rw-r--r--node_modules/tar-fs/.travis.yml5
-rw-r--r--node_modules/tar-fs/LICENSE21
-rw-r--r--node_modules/tar-fs/README.md163
-rw-r--r--node_modules/tar-fs/index.js348
-rw-r--r--node_modules/tar-fs/package.json71
-rw-r--r--node_modules/tar-fs/test/fixtures/a/hello.txt1
-rw-r--r--node_modules/tar-fs/test/fixtures/b/a/test.txt1
-rw-r--r--node_modules/tar-fs/test/fixtures/d/file10
-rw-r--r--node_modules/tar-fs/test/fixtures/d/file20
-rw-r--r--node_modules/tar-fs/test/fixtures/d/sub-dir/file50
-rw-r--r--node_modules/tar-fs/test/fixtures/d/sub-files/file30
-rw-r--r--node_modules/tar-fs/test/fixtures/d/sub-files/file40
-rw-r--r--node_modules/tar-fs/test/fixtures/e/directory/.ignore0
-rw-r--r--node_modules/tar-fs/test/fixtures/e/file0
-rw-r--r--node_modules/tar-fs/test/fixtures/invalid.tarbin0 -> 2560 bytes
-rw-r--r--node_modules/tar-fs/test/index.js346
-rw-r--r--node_modules/tar-stream/LICENSE21
-rw-r--r--node_modules/tar-stream/README.md168
-rw-r--r--node_modules/tar-stream/extract.js257
-rw-r--r--node_modules/tar-stream/headers.js293
-rw-r--r--node_modules/tar-stream/index.js2
-rw-r--r--node_modules/tar-stream/pack.js255
-rw-r--r--node_modules/tar-stream/package.json89
-rw-r--r--node_modules/tar-stream/sandbox.js11
-rw-r--r--node_modules/token-types/LICENSE7
-rw-r--r--node_modules/token-types/README.md107
-rw-r--r--node_modules/token-types/lib/index.d.ts170
-rw-r--r--node_modules/token-types/lib/index.js549
-rw-r--r--node_modules/token-types/node_modules/ieee754/LICENSE11
-rw-r--r--node_modules/token-types/node_modules/ieee754/README.md51
-rw-r--r--node_modules/token-types/node_modules/ieee754/index.d.ts10
-rw-r--r--node_modules/token-types/node_modules/ieee754/index.js85
-rw-r--r--node_modules/token-types/node_modules/ieee754/package.json84
-rw-r--r--node_modules/token-types/package.json120
-rw-r--r--node_modules/typedarray-to-buffer/.airtap.yml15
-rw-r--r--node_modules/typedarray-to-buffer/.travis.yml11
-rw-r--r--node_modules/typedarray-to-buffer/LICENSE21
-rw-r--r--node_modules/typedarray-to-buffer/README.md85
-rw-r--r--node_modules/typedarray-to-buffer/index.js25
-rw-r--r--node_modules/typedarray-to-buffer/package.json75
-rw-r--r--node_modules/typedarray-to-buffer/test/basic.js50
-rw-r--r--node_modules/util-deprecate/History.md16
-rw-r--r--node_modules/util-deprecate/LICENSE24
-rw-r--r--node_modules/util-deprecate/README.md53
-rw-r--r--node_modules/util-deprecate/browser.js67
-rw-r--r--node_modules/util-deprecate/node.js6
-rw-r--r--node_modules/util-deprecate/package.json59
-rw-r--r--node_modules/uuid/CHANGELOG.md223
-rw-r--r--node_modules/uuid/CONTRIBUTING.md18
-rw-r--r--node_modules/uuid/LICENSE.md9
-rw-r--r--node_modules/uuid/README.md488
-rw-r--r--node_modules/uuid/dist/bin/uuid2
-rw-r--r--node_modules/uuid/dist/esm-browser/index.js9
-rw-r--r--node_modules/uuid/dist/esm-browser/md5.js215
-rw-r--r--node_modules/uuid/dist/esm-browser/nil.js1
-rw-r--r--node_modules/uuid/dist/esm-browser/parse.js35
-rw-r--r--node_modules/uuid/dist/esm-browser/regex.js1
-rw-r--r--node_modules/uuid/dist/esm-browser/rng.js14
-rw-r--r--node_modules/uuid/dist/esm-browser/sha1.js96
-rw-r--r--node_modules/uuid/dist/esm-browser/stringify.js30
-rw-r--r--node_modules/uuid/dist/esm-browser/v1.js95
-rw-r--r--node_modules/uuid/dist/esm-browser/v3.js4
-rw-r--r--node_modules/uuid/dist/esm-browser/v35.js64
-rw-r--r--node_modules/uuid/dist/esm-browser/v4.js24
-rw-r--r--node_modules/uuid/dist/esm-browser/v5.js4
-rw-r--r--node_modules/uuid/dist/esm-browser/validate.js7
-rw-r--r--node_modules/uuid/dist/esm-browser/version.js11
-rw-r--r--node_modules/uuid/dist/esm-node/index.js9
-rw-r--r--node_modules/uuid/dist/esm-node/md5.js13
-rw-r--r--node_modules/uuid/dist/esm-node/nil.js1
-rw-r--r--node_modules/uuid/dist/esm-node/parse.js35
-rw-r--r--node_modules/uuid/dist/esm-node/regex.js1
-rw-r--r--node_modules/uuid/dist/esm-node/rng.js12
-rw-r--r--node_modules/uuid/dist/esm-node/sha1.js13
-rw-r--r--node_modules/uuid/dist/esm-node/stringify.js29
-rw-r--r--node_modules/uuid/dist/esm-node/v1.js95
-rw-r--r--node_modules/uuid/dist/esm-node/v3.js4
-rw-r--r--node_modules/uuid/dist/esm-node/v35.js64
-rw-r--r--node_modules/uuid/dist/esm-node/v4.js24
-rw-r--r--node_modules/uuid/dist/esm-node/v5.js4
-rw-r--r--node_modules/uuid/dist/esm-node/validate.js7
-rw-r--r--node_modules/uuid/dist/esm-node/version.js11
-rw-r--r--node_modules/uuid/dist/index.js79
-rw-r--r--node_modules/uuid/dist/md5-browser.js223
-rw-r--r--node_modules/uuid/dist/md5.js23
-rw-r--r--node_modules/uuid/dist/nil.js8
-rw-r--r--node_modules/uuid/dist/parse.js45
-rw-r--r--node_modules/uuid/dist/regex.js8
-rw-r--r--node_modules/uuid/dist/rng-browser.js21
-rw-r--r--node_modules/uuid/dist/rng.js24
-rw-r--r--node_modules/uuid/dist/sha1-browser.js104
-rw-r--r--node_modules/uuid/dist/sha1.js23
-rw-r--r--node_modules/uuid/dist/stringify.js39
-rw-r--r--node_modules/uuid/dist/umd/uuid.min.js1
-rw-r--r--node_modules/uuid/dist/umd/uuidNIL.min.js1
-rw-r--r--node_modules/uuid/dist/umd/uuidParse.min.js1
-rw-r--r--node_modules/uuid/dist/umd/uuidStringify.min.js1
-rw-r--r--node_modules/uuid/dist/umd/uuidValidate.min.js1
-rw-r--r--node_modules/uuid/dist/umd/uuidVersion.min.js1
-rw-r--r--node_modules/uuid/dist/umd/uuidv1.min.js1
-rw-r--r--node_modules/uuid/dist/umd/uuidv3.min.js1
-rw-r--r--node_modules/uuid/dist/umd/uuidv4.min.js1
-rw-r--r--node_modules/uuid/dist/umd/uuidv5.min.js1
-rw-r--r--node_modules/uuid/dist/uuid-bin.js85
-rw-r--r--node_modules/uuid/dist/v1.js107
-rw-r--r--node_modules/uuid/dist/v3.js16
-rw-r--r--node_modules/uuid/dist/v35.js78
-rw-r--r--node_modules/uuid/dist/v4.js37
-rw-r--r--node_modules/uuid/dist/v5.js16
-rw-r--r--node_modules/uuid/dist/validate.js17
-rw-r--r--node_modules/uuid/dist/version.js21
-rw-r--r--node_modules/uuid/package.json167
-rw-r--r--node_modules/uuid/wrapper.mjs10
-rw-r--r--node_modules/wcwidth/.npmignore1
-rw-r--r--node_modules/wcwidth/LICENSE30
-rw-r--r--node_modules/wcwidth/Readme.md33
-rw-r--r--node_modules/wcwidth/combining.js50
-rw-r--r--node_modules/wcwidth/docs/index.md65
-rw-r--r--node_modules/wcwidth/index.js99
-rw-r--r--node_modules/wcwidth/package.json76
-rw-r--r--node_modules/wcwidth/test/index.js64
-rw-r--r--node_modules/wrappy/LICENSE15
-rw-r--r--node_modules/wrappy/README.md36
-rw-r--r--node_modules/wrappy/package.json61
-rw-r--r--node_modules/wrappy/wrappy.js33
-rw-r--r--package-lock.json401
-rw-r--r--package.json23
-rw-r--r--php/cache.js90
-rw-r--r--php/cleanup.js15
-rw-r--r--php/headers.php8
-rw-r--r--php/runtime.js31
-rw-r--r--runtime.js64
-rw-r--r--shared/bootstrap.js10
-rw-r--r--shared/updates.js153
-rw-r--r--shared/updates.sh80
516 files changed, 56044 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3b8bd73
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+public/* \ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ee07fd4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,31 @@
+# FNS Electrode, a NodeJS webserver for PHP applications
+
+Electrode is a NodeJS webserver with a PHP subsystem. Electrode can serve static files as fast as possible, and run on-demand PHP scripts.
+
+Electrode is meant to be fast, reliable and unattended (it will automatically update an installed software when needed). Electrode is made to be used with FNS Neutron, but can also (but not recommended to) be used with other software.
+
+## Getting started
+The first time you need to run Electrode, you'll need to compile some dependencies:
+```plaintext
+npm rebuild
+```
+
+When you compiled the dependencies, you can start Electrode using NPM:
+```plaintext
+npm start
+```
+
+... or using NodeJS
+```plaintext
+node index.js
+```
+
+Normal startup will start « sharded » processes that will use all your CPU cores. If you have some problems with that or want a less-consuming server, start normally and press a key when the « Press any key to start with sharding disabled » message appears.
+
+> **Important :** There's a `cache` folder, **NEVER DELETE ITS CONTENT** or it will break PHP scripts. Files in the `cache` folder are deleted when needed.
+
+## Requirements
+* PHP 7.0 or newer
+* The `xdebug` extension (used to get the response headers from PHP)
+* `make` and all development libraries
+* The NPM package manager \ No newline at end of file
diff --git a/cache/aHAD_3ff98dc7-05e0-4c1f-a2d9-ca9f8066d5f9.json b/cache/aHAD_3ff98dc7-05e0-4c1f-a2d9-ca9f8066d5f9.json
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/cache/aHAD_3ff98dc7-05e0-4c1f-a2d9-ca9f8066d5f9.json
@@ -0,0 +1 @@
+[] \ No newline at end of file
diff --git a/cache/aHAD_40bb9a8a-f956-4cc2-b8e2-272363c1553e.json b/cache/aHAD_40bb9a8a-f956-4cc2-b8e2-272363c1553e.json
new file mode 100644
index 0000000..93023a6
--- /dev/null
+++ b/cache/aHAD_40bb9a8a-f956-4cc2-b8e2-272363c1553e.json
@@ -0,0 +1,3 @@
+[
+ "Content-type: text\/html; charset=UTF-8"
+] \ No newline at end of file
diff --git a/cache/aHAD_44b818ca-2ab9-49d9-99af-6126637cc9a8.json b/cache/aHAD_44b818ca-2ab9-49d9-99af-6126637cc9a8.json
new file mode 100644
index 0000000..bef490b
--- /dev/null
+++ b/cache/aHAD_44b818ca-2ab9-49d9-99af-6126637cc9a8.json
@@ -0,0 +1,4 @@
+[
+ "Location: \/cms-special\/admin\/login\/?pr=\/cms-special\/admin\/home&pa=?",
+ "Content-type: text\/html; charset=UTF-8"
+] \ No newline at end of file
diff --git a/cache/aHAD_4e2911e9-8f1a-42f0-b7f7-7c03b711507c.json b/cache/aHAD_4e2911e9-8f1a-42f0-b7f7-7c03b711507c.json
new file mode 100644
index 0000000..93023a6
--- /dev/null
+++ b/cache/aHAD_4e2911e9-8f1a-42f0-b7f7-7c03b711507c.json
@@ -0,0 +1,3 @@
+[
+ "Content-type: text\/html; charset=UTF-8"
+] \ No newline at end of file
diff --git a/cache/aHAD_68d64100-d723-40cd-9027-067cba4811f8.json b/cache/aHAD_68d64100-d723-40cd-9027-067cba4811f8.json
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/cache/aHAD_68d64100-d723-40cd-9027-067cba4811f8.json
@@ -0,0 +1 @@
+[] \ No newline at end of file
diff --git a/cache/aHAD_760f791d-6cbc-4e9a-885a-edbbb5c161bb.json b/cache/aHAD_760f791d-6cbc-4e9a-885a-edbbb5c161bb.json
new file mode 100644
index 0000000..93023a6
--- /dev/null
+++ b/cache/aHAD_760f791d-6cbc-4e9a-885a-edbbb5c161bb.json
@@ -0,0 +1,3 @@
+[
+ "Content-type: text\/html; charset=UTF-8"
+] \ No newline at end of file
diff --git a/cache/aHAD_d4a91228-b517-465c-9816-ef56c0699fdd.json b/cache/aHAD_d4a91228-b517-465c-9816-ef56c0699fdd.json
new file mode 100644
index 0000000..37e3279
--- /dev/null
+++ b/cache/aHAD_d4a91228-b517-465c-9816-ef56c0699fdd.json
@@ -0,0 +1,3 @@
+[
+ "X-FNS-NeutronCache: no"
+] \ No newline at end of file
diff --git a/cache/headers.php b/cache/headers.php
new file mode 100644
index 0000000..af6b80f
--- /dev/null
+++ b/cache/headers.php
@@ -0,0 +1,12 @@
+<?php
+
+function __electrode_end_hooks() {
+ global $_PHPID;
+ $arr = xdebug_get_headers();
+ $arr[] = "Cache-Control: private, no-cache, no-store, must-revalidate";
+ $arr[] = "Expires: -1";
+ $arr[] = "Pragma: no-cache";
+ file_put_contents("./cache/HAD_$_PHPID.json", json_encode($arr, JSON_PRETTY_PRINT));
+}
+
+$__electrode = true;
diff --git a/config/network.json b/config/network.json
new file mode 100644
index 0000000..01107fe
--- /dev/null
+++ b/config/network.json
@@ -0,0 +1,4 @@
+{
+ "port": "8888",
+ "admin": "[no address given]"
+} \ No newline at end of file
diff --git a/config/product.json b/config/product.json
new file mode 100644
index 0000000..b6ae982
--- /dev/null
+++ b/config/product.json
@@ -0,0 +1,4 @@
+{
+ "name": "FNS Electrode",
+ "common": "Electrode"
+} \ No newline at end of file
diff --git a/config/updates.json b/config/updates.json
new file mode 100644
index 0000000..c0405ab
--- /dev/null
+++ b/config/updates.json
@@ -0,0 +1,16 @@
+{
+ "check": {
+ "host": "raw.githubusercontent.com",
+ "port": 443,
+ "ssl": true,
+ "path": "/Minteck-Projects/Neutron-Core/trunk/api/version",
+ "compareWith": "./public/api/version"
+ },
+ "update": {
+ "host": "github.com",
+ "port": 443,
+ "ssl": true,
+ "path": "/Minteck-Projects/Neutron-Core/archive/trunk.tar.gz"
+ },
+ "interval": 3600000
+}
diff --git a/core/access.js b/core/access.js
new file mode 100644
index 0000000..b788213
--- /dev/null
+++ b/core/access.js
@@ -0,0 +1,52 @@
+const fs = require('fs');
+const path = require('path');
+const chalk = require('chalk');
+
+module.exports = (filename) => {
+ if (fs.existsSync(path.dirname(filename) + "/.htaccess")) {
+ try {
+ access = fs.readFileSync(path.dirname(filename) + "/.htaccess").toString();
+ if (access.trim().includes("##net.minteckprojects.fns.electrode@DenyAccess##")) {
+ return false;
+ } else {
+ return true;
+ }
+ } catch (e) {
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.yellow("warn:") + " unable to read htaccess from " + path.dirname(filename) + ": " + e.message);
+ console.log(e.stack);
+ return true;
+ }
+ } else {
+ if (fs.existsSync(path.dirname(path.dirname(filename)) + "/.htaccess")) {
+ try {
+ access = fs.readFileSync(path.dirname(path.dirname(filename)) + "/.htaccess").toString();
+ if (access.trim().includes("##net.minteckprojects.fns.electrode@DenyAccess##")) {
+ return false;
+ } else {
+ return true;
+ }
+ } catch (e) {
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.yellow("warn:") + " unable to read htaccess from " + path.dirname(path.dirname(filename)) + ": " + e.message);
+ console.log(e.stack);
+ return true;
+ }
+ } else {
+ if (fs.existsSync(path.dirname(path.dirname(path.dirname(filename))) + "/.htaccess")) {
+ try {
+ access = fs.readFileSync(path.dirname(path.dirname(path.dirname(filename))) + "/.htaccess").toString();
+ if (access.trim().includes("##net.minteckprojects.fns.electrode@DenyAccess##")) {
+ return false;
+ } else {
+ return true;
+ }
+ } catch (e) {
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.yellow("warn:") + " unable to read htaccess from " + path.dirname(path.dirname(path.dirname(filename))) + ": " + e.message);
+ console.log(e.stack);
+ return true;
+ }
+ } else {
+ return true;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/core/cookies.js b/core/cookies.js
new file mode 100644
index 0000000..c51380e
--- /dev/null
+++ b/core/cookies.js
@@ -0,0 +1,11 @@
+module.exports = (request) => {
+ var list = {},
+ rc = request.headers.cookie;
+
+ rc && rc.split(';').forEach(function( cookie ) {
+ var parts = cookie.split('=');
+ list[parts.shift().trim()] = decodeURI(parts.join('='));
+ });
+
+ return list;
+} \ No newline at end of file
diff --git a/core/finder.js b/core/finder.js
new file mode 100644
index 0000000..ac5f254
--- /dev/null
+++ b/core/finder.js
@@ -0,0 +1,22 @@
+const fs = require('fs');
+const url = require('url');
+
+/**
+ * @param {string} url
+ */
+module.exports = (efs) => {
+ cfs = url.parse(efs, true).pathname;
+ if (fs.existsSync("./public/" + cfs) && !fs.lstatSync("./public/" + cfs).isDirectory()) {
+ return "./public/" + cfs;
+ } else if (fs.existsSync("./public/" + cfs + "/index.php")) {
+ return "./public/" + cfs + "/index.php";
+ } else if (fs.existsSync("./public/" + cfs + "/index.html")) {
+ return "./public/" + cfs + "/index.html";
+ } else if (fs.existsSync("./public/" + cfs)) {
+ return "./public/" + cfs;
+ } else if (cfs.endsWith(".htaccess")) {
+ return null;
+ } else {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/core/headClean.js b/core/headClean.js
new file mode 100644
index 0000000..31ce5a9
--- /dev/null
+++ b/core/headClean.js
@@ -0,0 +1,15 @@
+const fs = require('fs');
+
+module.exports = () => {
+ fs.readdir("./cache", (error, files) => {
+ if (error) {
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.yellow("warn:") + " unable to cleanup cache: " + error.message);
+ } else {
+ files.forEach((file) => {
+ if (file.startsWith("HAD_")) {
+ fs.unlink("./cache/" + file, () => {});
+ }
+ })
+ }
+ })
+} \ No newline at end of file
diff --git a/core/request.js b/core/request.js
new file mode 100644
index 0000000..caceceb
--- /dev/null
+++ b/core/request.js
@@ -0,0 +1,111 @@
+const chalk = require('chalk');
+const mime = require('mime');
+const FileType = require('file-type');
+
+module.exports = (req, res, post, files) => {
+ try {
+ res.setHeader("X-Electrode-WorkerID", cluster.worker.id)
+ res.setHeader('Cache-Control', 'private, no-cache, no-store, must-revalidate');
+ res.setHeader('Expires', '-1');
+ res.setHeader('Pragma', 'no-cache');
+ if (req.url.includes('../')) {
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.blue("warn:") + " working around exploit");
+ res.writeHead(301, { 'Location': '/index.php' });
+ res.end();
+ } else if (req.url.trim() == '/' || req.url.trim() == '//' || req.url.trim() == '') {
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.blue("warn:") + " working around redirection trap");
+ res.writeHead(301, { 'Location': '/index.php' });
+ res.end();
+ } else {
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.green("verb:") + " " + req.method + " " + req.url + " - HTTP/" + req.httpVersion + " - " + req.connection.remoteAddress);
+
+ filename = core.finder(req.url);
+ if (filename == null) {
+ res.writeHead(404, { 'Content-Type': 'text/html' });
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.yellow("warn:") + " not found: " + req.url);
+ res.write('<html><head><title>ENOTFOUND - File not found</title></head><body><h1>ENOTFOUND</h1><p>This file couldn\'t be found on the server</p><hr><address>' + config.product.name + ' version ' + version + '</address></body></html>');
+ res.end();
+ } else {
+ if (require('fs').lstatSync(filename).isDirectory()) {
+ res.writeHead(403, { 'Content-Type': 'text/html' });
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.yellow("warn:") + " is directory: " + req.url);
+ res.write('<html><head><title>EACCES - Permission denied</title></head><body><h1>EACCES</h1><p>Permission to access this file was denied by the server configuration</p><hr><address>' + config.product.name + ' version ' + version + '</address></body></html>');
+ res.end();
+ } else {
+ if (core.access(filename)) {
+ if (!filename.endsWith(".php")) {
+ res.setHeader("Cache-Control", "no-cache")
+ require('fs').readFile(filename, (error, file) => {
+ if (error) {
+ res.writeHead(500, { 'Content-Type': 'text/html' });
+ res.write('<html><head><title>' + error.code + ' - Internal error</title></head><body><h1>' + error.code + '</h1><p>An internal server error ocurred while trying to give back the file</p><hr><address>' + config.product.name + ' version ' + version + '</address></body></html>');
+ res.end();
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.red("error:") + " while loading file: " + error.message);
+ } else {
+ FileType.fromFile(filename).then((type) => {
+ res.writeHead(200, { 'Content-Type': type + "", 'Content-Size': file.toString().length });
+ res.end(file);
+ });
+ }
+ })
+ } else {
+ php.runtime(php.cache(req, res, filename, post, files)).then((phpc) => {
+ if (phpc.error == null) {
+ if (require('fs').existsSync("./cache/HAD_" + phpc.id + ".json")) {
+ try {
+ headers = JSON.parse(require('fs').readFileSync("./cache/HAD_" + phpc.id + ".json"));
+ hlist = {};
+ headers.forEach(h => {
+ p = h.split(":");
+ n = p[0];
+ p.shift();
+ v = p.join(":");
+ hlist[n.toLowerCase()] = v;
+ })
+ if (typeof hlist["content-type"] == "undefined") {
+ hlist["content-type"] = "text/html";
+ }
+ if (typeof hlist["location"] != "undefined") {
+ res.writeHead(301, hlist);
+ } else {
+ res.writeHead(200, hlist);
+ }
+ } catch (e) {
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.red("error:") + " while loading php headers: " + e.message);
+ console.log(e.stack);
+ res.writeHead(500, { 'Content-Type': 'text/html' });
+ res.write('<html><head><title>' + e.name + ' - post-PHP error</title></head><body><h1>' + e.name + '</h1><p>Unable to process PHP headers</p><hr><address>' + config.product.name + ' version ' + version + '</address></body></html>');
+ res.end();
+ }
+ }
+
+ res.write(phpc.content);
+ res.end();
+ core.headClean();
+ } else {
+ res.writeHead(500, { 'Content-Type': 'text/html' });
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.red("error:") + " while running php: " + phpc.error.message);
+ console.log(phpc.error.stack);
+ res.write('<html><head><title>' + phpc.error.name + ' - PHP error</title></head><body><h1>' + phpc.error.name + '</h1><p>The PHP integration didn\'t fulfill the request correctly:</p><pre>' + phpc.stderr + '</pre><pre>' + phpc.error.message.split("\n").join("<br>") + '</pre><hr><address>' + config.product.name + ' version ' + version + '</address></body></html>');
+ res.end();
+ core.headClean();
+ }
+ });
+ }
+ } else {
+ res.writeHead(403, { 'Content-Type': 'text/html' });
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.yellow("warn:") + " denied by .htaccess: " + req.url);
+ res.write('<html><head><title>EACCES - Permission denied</title></head><body><h1>EACCES</h1><p>Permission to access this file was denied by the server configuration</p><hr><address>' + config.product.name + ' version ' + version + '</address></body></html>');
+ res.end();
+ }
+ }
+ }
+ }
+ } catch (error) {
+ res.writeHead(500, { 'Content-Type': 'text/html' });
+ res.write('<html><head><title>' + error.name + ' - Internal error</title></head><body><h1>' + error.name + '</h1><p>An internal server error ocurred while trying to give back the file</p><hr><address>' + config.product.name + ' version ' + version + '</address></body></html>');
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.red("error:") + " " + error.name + ": " + error.message);
+ console.log(error.stack);
+ res.end();
+ }
+}
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..4c1cd64
--- /dev/null
+++ b/index.js
@@ -0,0 +1,66 @@
+const fs = require('fs');
+const chalk = require('chalk');
+const progress = require('progress');
+global.cluster = require('cluster');
+
+if (require('fs').existsSync("./cache/download.tar")) {
+ require('fs').unlinkSync("./cache/download.tar");
+}
+
+if (require('fs').existsSync("./download")) {
+ require('fs').rmdirSync("./download", {
+ recursive: true
+ });
+}
+
+global.__CLUSTER_CPUSCOUNT = require('os').cpus().length;
+global.__SYSTEMROOT = __dirname;
+global.__RUNNING = false;
+global.__SRUNNING = false;
+
+if (cluster.isMaster) {
+ if (fs.existsSync("./public/cms-special")) {
+ setTimeout(() => {
+ console.log(chalk.blue("info: ") + "updating...");
+ p = require('child_process').spawnSync("./shared/updates.sh", [], {
+ stdio: 'inherit'
+ });
+ console.log(chalk.blue("info: ") + "finished");
+ if (p.status != 0) {
+ console.log(chalk.yellow("warn: ") + "update failed with exit code " + p.status);
+ }
+ require('./shared/bootstrap.js');
+ global.__SRUNNING = true;
+ }, 1250)
+ } else {
+ setTimeout(() => {
+ console.log(chalk.blue("info: ") + "downloading Neutron...");
+ p = require('child_process').spawnSync("./shared/updates.sh", [], {
+ stdio: 'inherit'
+ });
+ console.log(chalk.blue("info: ") + "finished");
+ if (p.status != 0) {
+ console.log(chalk.red("error: ") + "failed to download core with exit code " + p.status);
+ }
+ fs.copyFileSync("./php/headers.php", "./cache/headers.php");
+ require('./shared/bootstrap.js');
+ global.__SRUNNING = true;
+ }, 1250)
+ }
+
+ setInterval(() => {
+ if (__RUNNING) {
+ console.log(chalk.blue("info: ") + "updating...");
+ p = require('child_process').spawnSync("./shared/updates.sh", [], {
+ stdio: 'inherit'
+ });
+ console.log(chalk.blue("info: ") + "finished");
+ if (p.status != 0) {
+ console.log(chalk.yellow("warn: ") + "update failed with exit code " + p.status);
+ }
+ }
+ }, require('./config/updates.json').interval);
+} else {
+ console.log(chalk.blue("info: ") + `worker #${cluster.worker.id} with pid ${process.pid} started`);
+ require('./runtime.js');
+}
diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime
new file mode 100644
index 0000000..9e9fc97
--- /dev/null
+++ b/node_modules/.bin/mime
Binary files differ
diff --git a/node_modules/.bin/ncp b/node_modules/.bin/ncp
new file mode 100644
index 0000000..55a64bb
--- /dev/null
+++ b/node_modules/.bin/ncp
Binary files differ
diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid
new file mode 100644
index 0000000..e140e3e
--- /dev/null
+++ b/node_modules/.bin/uuid
Binary files differ
diff --git a/node_modules/@tokenizer/token/README.md b/node_modules/@tokenizer/token/README.md
new file mode 100644
index 0000000..ceb9281
--- /dev/null
+++ b/node_modules/@tokenizer/token/README.md
@@ -0,0 +1,6 @@
+[![npm version](https://badge.fury.io/js/%40tokenizer%2Ftoken.svg)](https://www.npmjs.com/package/@tokenizer/token)
+[![npm downloads](http://img.shields.io/npm/dm/@tokenizer/token.svg)](https://npmcharts.com/compare/@tokenizer/token?interval=30)
+
+# @tokenizer/token
+
+TypeScript definition of an [strtok3](https://github.com/Borewit/strtok3) token.
diff --git a/node_modules/@tokenizer/token/index.d.ts b/node_modules/@tokenizer/token/index.d.ts
new file mode 100644
index 0000000..828916e
--- /dev/null
+++ b/node_modules/@tokenizer/token/index.d.ts
@@ -0,0 +1,29 @@
+/**
+ * Read-only token
+ * See https://github.com/Borewit/strtok3 for more information
+ */
+export interface IGetToken<T> {
+
+ /**
+ * Length of encoded token in bytes
+ */
+ len: number;
+
+ /**
+ * Decode value from buffer at offset
+ * @param buffer - Buffer to read the decoded value from
+ * @param offset - Decode offset
+ * @return Decoded value
+ */
+ get(buffer: Buffer, offset: number): T;
+}
+
+export interface IToken<T> extends IGetToken<T> {
+ /**
+ * Encode value to buffer
+ * @param buffer - Buffer to write the encoded value to
+ * @param offset - Buffer write offset
+ * @param value - Value to decode of type T
+ */
+ put(buffer: Buffer, offset: number, value: T): number
+}
diff --git a/node_modules/@tokenizer/token/package.json b/node_modules/@tokenizer/token/package.json
new file mode 100644
index 0000000..11bc707
--- /dev/null
+++ b/node_modules/@tokenizer/token/package.json
@@ -0,0 +1,61 @@
+{
+ "_from": "@tokenizer/token@^0.1.1",
+ "_id": "@tokenizer/token@0.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w==",
+ "_location": "/@tokenizer/token",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "@tokenizer/token@^0.1.1",
+ "name": "@tokenizer/token",
+ "escapedName": "@tokenizer%2ftoken",
+ "scope": "@tokenizer",
+ "rawSpec": "^0.1.1",
+ "saveSpec": null,
+ "fetchSpec": "^0.1.1"
+ },
+ "_requiredBy": [
+ "/strtok3",
+ "/token-types"
+ ],
+ "_resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz",
+ "_shasum": "f0d92c12f87079ddfd1b29f614758b9696bc29e3",
+ "_spec": "@tokenizer/token@^0.1.1",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/strtok3",
+ "author": {
+ "name": "Borewit",
+ "url": "https://github.com/Borewit"
+ },
+ "bugs": {
+ "url": "https://github.com/Borewit/tokenizer-token/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "TypeScript definition for strtok3 token",
+ "devDependencies": {
+ "@types/node": "^13.1.0"
+ },
+ "files": [
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/Borewit/tokenizer-token#readme",
+ "keywords": [
+ "token",
+ "interface",
+ "tokenizer",
+ "TypeScript"
+ ],
+ "license": "MIT",
+ "main": "",
+ "name": "@tokenizer/token",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Borewit/tokenizer-token.git"
+ },
+ "typeScriptVersion": "3.0",
+ "types": "index.d.ts",
+ "version": "0.1.1"
+}
diff --git a/node_modules/@types/debug/LICENSE b/node_modules/@types/debug/LICENSE
new file mode 100644
index 0000000..2107107
--- /dev/null
+++ b/node_modules/@types/debug/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ 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:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ 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
diff --git a/node_modules/@types/debug/README.md b/node_modules/@types/debug/README.md
new file mode 100644
index 0000000..69f0b62
--- /dev/null
+++ b/node_modules/@types/debug/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/debug`
+
+# Summary
+This package contains type definitions for debug (https://github.com/visionmedia/debug).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debug
+
+Additional Details
+ * Last updated: Thu, 08 Aug 2019 15:58:41 GMT
+ * Dependencies: none
+ * Global values: debug
+
+# Credits
+These definitions were written by Seon-Wook Park <https://github.com/swook>, Gal Talmor <https://github.com/galtalmor>, John McLaughlin <https://github.com/zamb3zi>, Brasten Sager <https://github.com/brasten>, Nicolas Penin <https://github.com/npenin>, and Kristian Brünn <https://github.com/kristianmitk>.
diff --git a/node_modules/@types/debug/index.d.ts b/node_modules/@types/debug/index.d.ts
new file mode 100644
index 0000000..60eac8d
--- /dev/null
+++ b/node_modules/@types/debug/index.d.ts
@@ -0,0 +1,49 @@
+// Type definitions for debug 4.1
+// Project: https://github.com/visionmedia/debug
+// Definitions by: Seon-Wook Park <https://github.com/swook>
+// Gal Talmor <https://github.com/galtalmor>
+// John McLaughlin <https://github.com/zamb3zi>
+// Brasten Sager <https://github.com/brasten>
+// Nicolas Penin <https://github.com/npenin>
+// Kristian Brünn <https://github.com/kristianmitk>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+declare var debug: debug.Debug & { debug: debug.Debug; default: debug.Debug };
+
+export = debug;
+export as namespace debug;
+
+declare namespace debug {
+ interface Debug {
+ (namespace: string): Debugger;
+ coerce: (val: any) => any;
+ disable: () => string;
+ enable: (namespaces: string) => void;
+ enabled: (namespaces: string) => boolean;
+ log: (...args: any[]) => any;
+
+ names: RegExp[];
+ skips: RegExp[];
+
+ formatters: Formatters;
+ }
+
+ type IDebug = Debug;
+
+ interface Formatters {
+ [formatter: string]: (v: any) => string;
+ }
+
+ type IDebugger = Debugger;
+
+ interface Debugger {
+ (formatter: any, ...args: any[]): void;
+
+ color: string;
+ enabled: boolean;
+ log: (...args: any[]) => any;
+ namespace: string;
+ destroy: () => boolean;
+ extend: (namespace: string, delimiter?: string) => Debugger;
+ }
+}
diff --git a/node_modules/@types/debug/package.json b/node_modules/@types/debug/package.json
new file mode 100644
index 0000000..ed349c4
--- /dev/null
+++ b/node_modules/@types/debug/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "@types/debug@^4.1.5",
+ "_id": "@types/debug@4.1.5",
+ "_inBundle": false,
+ "_integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==",
+ "_location": "/@types/debug",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "@types/debug@^4.1.5",
+ "name": "@types/debug",
+ "escapedName": "@types%2fdebug",
+ "scope": "@types",
+ "rawSpec": "^4.1.5",
+ "saveSpec": null,
+ "fetchSpec": "^4.1.5"
+ },
+ "_requiredBy": [
+ "/strtok3"
+ ],
+ "_resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz",
+ "_shasum": "b14efa8852b7768d898906613c23f688713e02cd",
+ "_spec": "@types/debug@^4.1.5",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/strtok3",
+ "bugs": {
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Seon-Wook Park",
+ "url": "https://github.com/swook"
+ },
+ {
+ "name": "Gal Talmor",
+ "url": "https://github.com/galtalmor"
+ },
+ {
+ "name": "John McLaughlin",
+ "url": "https://github.com/zamb3zi"
+ },
+ {
+ "name": "Brasten Sager",
+ "url": "https://github.com/brasten"
+ },
+ {
+ "name": "Nicolas Penin",
+ "url": "https://github.com/npenin"
+ },
+ {
+ "name": "Kristian Brünn",
+ "url": "https://github.com/kristianmitk"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "TypeScript definitions for debug",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
+ "license": "MIT",
+ "main": "",
+ "name": "@types/debug",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/debug"
+ },
+ "scripts": {},
+ "typeScriptVersion": "2.0",
+ "types": "index",
+ "typesPublisherContentHash": "c45deaee8b444b3ae0df891511582b5067c8c689a7d9b4cabe984bacad67e4ab",
+ "version": "4.1.5"
+}
diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/node/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ 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
diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md
new file mode 100644
index 0000000..1f64b08
--- /dev/null
+++ b/node_modules/@types/node/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/node`
+
+# Summary
+This package contains type definitions for Node.js (http://nodejs.org/).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
+
+### Additional Details
+ * Last updated: Fri, 19 Feb 2021 17:58:40 GMT
+ * Dependencies: none
+ * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
+
+# Credits
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts
new file mode 100644
index 0000000..720bbc6
--- /dev/null
+++ b/node_modules/@types/node/assert.d.ts
@@ -0,0 +1,129 @@
+declare module 'node:assert' {
+ import assert = require('assert');
+ export = assert;
+}
+
+declare module 'assert' {
+ /** An alias of `assert.ok()`. */
+ function assert(value: any, message?: string | Error): asserts value;
+ namespace assert {
+ class AssertionError extends Error {
+ actual: any;
+ expected: any;
+ operator: string;
+ generatedMessage: boolean;
+ code: 'ERR_ASSERTION';
+
+ constructor(options?: {
+ /** If provided, the error message is set to this value. */
+ message?: string;
+ /** The `actual` property on the error instance. */
+ actual?: any;
+ /** The `expected` property on the error instance. */
+ expected?: any;
+ /** The `operator` property on the error instance. */
+ operator?: string;
+ /** If provided, the generated stack trace omits frames before this function. */
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function;
+ });
+ }
+
+ class CallTracker {
+ calls(exact?: number): () => void;
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
+ report(): CallTrackerReportInformation[];
+ verify(): void;
+ }
+ interface CallTrackerReportInformation {
+ message: string;
+ /** The actual number of times the function was called. */
+ actual: number;
+ /** The number of times the function was expected to be called. */
+ expected: number;
+ /** The name of the function that is wrapped. */
+ operator: string;
+ /** A stack trace of the function. */
+ stack: object;
+ }
+
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
+
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: any,
+ expected: any,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function,
+ ): never;
+ function ok(value: any, message?: string | Error): asserts value;
+ /** @deprecated since v9.9.0 - use strictEqual() instead. */
+ function equal(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
+ function notEqual(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
+ function deepEqual(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
+ function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
+ function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
+ function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
+ function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
+ function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
+
+ function throws(block: () => any, message?: string | Error): void;
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
+ function doesNotThrow(block: () => any, message?: string | Error): void;
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
+
+ function ifError(value: any): asserts value is null | undefined;
+
+ function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
+ function rejects(
+ block: (() => Promise<any>) | Promise<any>,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise<void>;
+ function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
+ function doesNotReject(
+ block: (() => Promise<any>) | Promise<any>,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise<void>;
+
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+
+ const strict: Omit<
+ typeof assert,
+ | 'equal'
+ | 'notEqual'
+ | 'deepEqual'
+ | 'notDeepEqual'
+ | 'ok'
+ | 'strictEqual'
+ | 'deepStrictEqual'
+ | 'ifError'
+ | 'strict'
+ > & {
+ (value: any, message?: string | Error): asserts value;
+ equal: typeof strictEqual;
+ notEqual: typeof notStrictEqual;
+ deepEqual: typeof deepStrictEqual;
+ notDeepEqual: typeof notDeepStrictEqual;
+
+ // Mapped types and assertion functions are incompatible?
+ // TS2775: Assertions require every name in the call target
+ // to be declared with an explicit type annotation.
+ ok: typeof ok;
+ strictEqual: typeof strictEqual;
+ deepStrictEqual: typeof deepStrictEqual;
+ ifError: typeof ifError;
+ strict: typeof strict;
+ };
+ }
+
+ export = assert;
+}
diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts
new file mode 100644
index 0000000..10dccc6
--- /dev/null
+++ b/node_modules/@types/node/async_hooks.d.ts
@@ -0,0 +1,233 @@
+/**
+ * Async Hooks module: https://nodejs.org/api/async_hooks.html
+ */
+declare module 'node:async_hooks' {
+ export * from 'async_hooks';
+}
+
+/**
+ * Async Hooks module: https://nodejs.org/api/async_hooks.html
+ */
+declare module 'async_hooks' {
+ /**
+ * Returns the asyncId of the current execution context.
+ */
+ function executionAsyncId(): number;
+
+ /**
+ * The resource representing the current execution.
+ * Useful to store data within the resource.
+ *
+ * Resource objects returned by `executionAsyncResource()` are most often internal
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
+ * on the object is likely to crash your application and should be avoided.
+ *
+ * Using `executionAsyncResource()` in the top-level execution context will
+ * return an empty object as there is no handle or request object to use,
+ * but having an object representing the top-level can be helpful.
+ */
+ function executionAsyncResource(): object;
+
+ /**
+ * Returns the ID of the resource responsible for calling the callback that is currently being executed.
+ */
+ function triggerAsyncId(): number;
+
+ interface HookCallbacks {
+ /**
+ * Called when a class is constructed that has the possibility to emit an asynchronous event.
+ * @param asyncId a unique ID for the async resource
+ * @param type the type of the async resource
+ * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
+ * @param resource reference to the resource representing the async operation, needs to be released during destroy
+ */
+ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+
+ /**
+ * When an asynchronous operation is initiated or completes a callback is called to notify the user.
+ * The before callback is called just before said callback is executed.
+ * @param asyncId the unique identifier assigned to the resource about to execute the callback.
+ */
+ before?(asyncId: number): void;
+
+ /**
+ * Called immediately after the callback specified in before is completed.
+ * @param asyncId the unique identifier assigned to the resource which has executed the callback.
+ */
+ after?(asyncId: number): void;
+
+ /**
+ * Called when a promise has resolve() called. This may not be in the same execution id
+ * as the promise itself.
+ * @param asyncId the unique id for the promise that was resolve()d.
+ */
+ promiseResolve?(asyncId: number): void;
+
+ /**
+ * Called after the resource corresponding to asyncId is destroyed
+ * @param asyncId a unique ID for the async resource
+ */
+ destroy?(asyncId: number): void;
+ }
+
+ interface AsyncHook {
+ /**
+ * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+ */
+ enable(): this;
+
+ /**
+ * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+ */
+ disable(): this;
+ }
+
+ /**
+ * Registers functions to be called for different lifetime events of each async operation.
+ * @param options the callbacks to register
+ * @return an AsyncHooks instance used for disabling and enabling hooks
+ */
+ function createHook(options: HookCallbacks): AsyncHook;
+
+ interface AsyncResourceOptions {
+ /**
+ * The ID of the execution context that created this async event.
+ * Default: `executionAsyncId()`
+ */
+ triggerAsyncId?: number;
+
+ /**
+ * Disables automatic `emitDestroy` when the object is garbage collected.
+ * This usually does not need to be set (even if `emitDestroy` is called
+ * manually), unless the resource's `asyncId` is retrieved and the
+ * sensitive API's `emitDestroy` is called with it.
+ * Default: `false`
+ */
+ requireManualDestroy?: boolean;
+ }
+
+ /**
+ * The class AsyncResource was designed to be extended by the embedder's async resources.
+ * Using this users can easily trigger the lifetime events of their own resources.
+ */
+ class AsyncResource {
+ /**
+ * AsyncResource() is meant to be extended. Instantiating a
+ * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+ * async_hook.executionAsyncId() is used.
+ * @param type The type of async event.
+ * @param triggerAsyncId The ID of the execution context that created
+ * this async event (default: `executionAsyncId()`), or an
+ * AsyncResourceOptions object (since 9.3)
+ */
+ constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
+
+ /**
+ * Binds the given function to the current execution context.
+ * @param fn The function to bind to the current execution context.
+ * @param type An optional name to associate with the underlying `AsyncResource`.
+ */
+ static bind<Func extends (...args: any[]) => any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource };
+
+ /**
+ * Binds the given function to execute to this `AsyncResource`'s scope.
+ * @param fn The function to bind to the current `AsyncResource`.
+ */
+ bind<Func extends (...args: any[]) => any>(fn: Func): Func & { asyncResource: AsyncResource };
+
+ /**
+ * Call the provided function with the provided arguments in the
+ * execution context of the async resource. This will establish the
+ * context, trigger the AsyncHooks before callbacks, call the function,
+ * trigger the AsyncHooks after callbacks, and then restore the original
+ * execution context.
+ * @param fn The function to call in the execution context of this
+ * async resource.
+ * @param thisArg The receiver to be used for the function call.
+ * @param args Optional arguments to pass to the function.
+ */
+ runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
+
+ /**
+ * Call AsyncHooks destroy callbacks.
+ */
+ emitDestroy(): void;
+
+ /**
+ * @return the unique ID assigned to this AsyncResource instance.
+ */
+ asyncId(): number;
+
+ /**
+ * @return the trigger ID for this AsyncResource instance.
+ */
+ triggerAsyncId(): number;
+ }
+
+ /**
+ * When having multiple instances of `AsyncLocalStorage`, they are independent
+ * from each other. It is safe to instantiate this class multiple times.
+ */
+ class AsyncLocalStorage<T> {
+ /**
+ * This method disables the instance of `AsyncLocalStorage`. All subsequent calls
+ * to `asyncLocalStorage.getStore()` will return `undefined` until
+ * `asyncLocalStorage.run()` is called again.
+ *
+ * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+ * instance will be exited.
+ *
+ * Calling `asyncLocalStorage.disable()` is required before the
+ * `asyncLocalStorage` can be garbage collected. This does not apply to stores
+ * provided by the `asyncLocalStorage`, as those objects are garbage collected
+ * along with the corresponding async resources.
+ *
+ * This method is to be used when the `asyncLocalStorage` is not in use anymore
+ * in the current process.
+ */
+ disable(): void;
+
+ /**
+ * This method returns the current store. If this method is called outside of an
+ * asynchronous context initialized by calling `asyncLocalStorage.run`, it will
+ * return `undefined`.
+ */
+ getStore(): T | undefined;
+
+ /**
+ * This methods runs a function synchronously within a context and return its
+ * return value. The store is not accessible outside of the callback function or
+ * the asynchronous operations created within the callback.
+ *
+ * Optionally, arguments can be passed to the function. They will be passed to the
+ * callback function.
+ *
+ * I the callback function throws an error, it will be thrown by `run` too. The
+ * stacktrace will not be impacted by this call and the context will be exited.
+ */
+ // TODO: Apply generic vararg once available
+ run<R>(store: T, callback: (...args: any[]) => R, ...args: any[]): R;
+
+ /**
+ * This methods runs a function synchronously outside of a context and return its
+ * return value. The store is not accessible within the callback function or the
+ * asynchronous operations created within the callback.
+ *
+ * Optionally, arguments can be passed to the function. They will be passed to the
+ * callback function.
+ *
+ * If the callback function throws an error, it will be thrown by `exit` too. The
+ * stacktrace will not be impacted by this call and the context will be
+ * re-entered.
+ */
+ // TODO: Apply generic vararg once available
+ exit<R>(callback: (...args: any[]) => R, ...args: any[]): R;
+
+ /**
+ * Calling `asyncLocalStorage.enterWith(store)` will transition into the context
+ * for the remainder of the current synchronous execution and will persist
+ * through any following asynchronous calls.
+ */
+ enterWith(store: T): void;
+ }
+}
diff --git a/node_modules/@types/node/base.d.ts b/node_modules/@types/node/base.d.ts
new file mode 100644
index 0000000..fa67179
--- /dev/null
+++ b/node_modules/@types/node/base.d.ts
@@ -0,0 +1,19 @@
+// NOTE: These definitions support NodeJS and TypeScript 3.7.
+
+// NOTE: TypeScript version-specific augmentations can be found in the following paths:
+// - ~/base.d.ts - Shared definitions common to all TypeScript versions
+// - ~/index.d.ts - Definitions specific to TypeScript 2.1
+// - ~/ts3.7/base.d.ts - Definitions specific to TypeScript 3.7
+// - ~/ts3.7/index.d.ts - Definitions specific to TypeScript 3.7 with assert pulled in
+
+// Reference required types from the default lib:
+/// <reference lib="es2018" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.bigint" />
+
+// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
+/// <reference path="ts3.6/base.d.ts" />
+
+// TypeScript 3.7-specific augmentations:
+/// <reference path="assert.d.ts" />
diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts
new file mode 100644
index 0000000..da17c75
--- /dev/null
+++ b/node_modules/@types/node/buffer.d.ts
@@ -0,0 +1,26 @@
+declare module 'node:buffer' {
+ export * from 'buffer';
+}
+
+declare module 'buffer' {
+ export const INSPECT_MAX_BYTES: number;
+ export const kMaxLength: number;
+ export const kStringMaxLength: number;
+ export const constants: {
+ MAX_LENGTH: number;
+ MAX_STRING_LENGTH: number;
+ };
+ const BuffType: typeof Buffer;
+
+ export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
+
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
+
+ export const SlowBuffer: {
+ /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
+ new(size: number): Buffer;
+ prototype: Buffer;
+ };
+
+ export { BuffType as Buffer };
+}
diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts
new file mode 100644
index 0000000..f9e34f1
--- /dev/null
+++ b/node_modules/@types/node/child_process.d.ts
@@ -0,0 +1,513 @@
+declare module 'node:child_process' {
+ export * from 'child_process';
+}
+
+declare module 'child_process' {
+ import { BaseEncodingOptions } from 'node:fs';
+ import * as events from 'node:events';
+ import * as net from 'node:net';
+ import { Writable, Readable, Stream, Pipe } from 'node:stream';
+
+ type Serializable = string | object | number | boolean;
+ type SendHandle = net.Socket | net.Server;
+
+ interface ChildProcess extends events.EventEmitter {
+ stdin: Writable | null;
+ stdout: Readable | null;
+ stderr: Readable | null;
+ readonly channel?: Pipe | null;
+ readonly stdio: [
+ Writable | null, // stdin
+ Readable | null, // stdout
+ Readable | null, // stderr
+ Readable | Writable | null | undefined, // extra
+ Readable | Writable | null | undefined // extra
+ ];
+ readonly killed: boolean;
+ readonly pid: number;
+ readonly connected: boolean;
+ readonly exitCode: number | null;
+ readonly signalCode: NodeJS.Signals | null;
+ readonly spawnargs: string[];
+ readonly spawnfile: string;
+ kill(signal?: NodeJS.Signals | number): boolean;
+ send(message: Serializable, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
+ send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
+ disconnect(): void;
+ unref(): void;
+ ref(): void;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. disconnect
+ * 3. error
+ * 4. exit
+ * 5. message
+ */
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: "disconnect", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: "disconnect"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean;
+ emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: "disconnect", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: "disconnect", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: "disconnect", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: "disconnect", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
+ prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
+ }
+
+ // return this object when stdio option is undefined or not specified
+ interface ChildProcessWithoutNullStreams extends ChildProcess {
+ stdin: Writable;
+ stdout: Readable;
+ stderr: Readable;
+ readonly stdio: [
+ Writable, // stdin
+ Readable, // stdout
+ Readable, // stderr
+ Readable | Writable | null | undefined, // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+
+ // return this object when stdio option is a tuple of 3
+ interface ChildProcessByStdio<
+ I extends null | Writable,
+ O extends null | Readable,
+ E extends null | Readable,
+ > extends ChildProcess {
+ stdin: I;
+ stdout: O;
+ stderr: E;
+ readonly stdio: [
+ I,
+ O,
+ E,
+ Readable | Writable | null | undefined, // extra, no modification
+ Readable | Writable | null | undefined // extra, no modification
+ ];
+ }
+
+ interface MessageOptions {
+ keepOpen?: boolean;
+ }
+
+ type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
+
+ type SerializationType = 'json' | 'advanced';
+
+ interface MessagingOptions {
+ /**
+ * Specify the kind of serialization used for sending messages between processes.
+ * @default 'json'
+ */
+ serialization?: SerializationType;
+ }
+
+ interface ProcessEnvOptions {
+ uid?: number;
+ gid?: number;
+ cwd?: string;
+ env?: NodeJS.ProcessEnv;
+ }
+
+ interface CommonOptions extends ProcessEnvOptions {
+ /**
+ * @default true
+ */
+ windowsHide?: boolean;
+ /**
+ * @default 0
+ */
+ timeout?: number;
+ }
+
+ interface CommonSpawnOptions extends CommonOptions, MessagingOptions {
+ argv0?: string;
+ stdio?: StdioOptions;
+ shell?: boolean | string;
+ windowsVerbatimArguments?: boolean;
+ }
+
+ interface SpawnOptions extends CommonSpawnOptions {
+ detached?: boolean;
+ }
+
+ interface SpawnOptionsWithoutStdio extends SpawnOptions {
+ stdio?: 'pipe' | Array<null | undefined | 'pipe'>;
+ }
+
+ type StdioNull = 'inherit' | 'ignore' | Stream;
+ type StdioPipe = undefined | null | 'pipe';
+
+ interface SpawnOptionsWithStdioTuple<
+ Stdin extends StdioNull | StdioPipe,
+ Stdout extends StdioNull | StdioPipe,
+ Stderr extends StdioNull | StdioPipe,
+ > extends SpawnOptions {
+ stdio: [Stdin, Stdout, Stderr];
+ }
+
+ // overloads of spawn without 'args'
+ function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
+ ): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
+ ): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
+ ): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
+ ): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
+ ): ChildProcessByStdio<Writable, null, null>;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
+ ): ChildProcessByStdio<null, Readable, null>;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
+ ): ChildProcessByStdio<null, null, Readable>;
+ function spawn(
+ command: string,
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
+ ): ChildProcessByStdio<null, null, null>;
+
+ function spawn(command: string, options: SpawnOptions): ChildProcess;
+
+ // overloads of spawn with 'args'
+ function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+
+ function spawn(
+ command: string,
+ args: ReadonlyArray<string>,
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
+ ): ChildProcessByStdio<Writable, Readable, Readable>;
+ function spawn(
+ command: string,
+ args: ReadonlyArray<string>,
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
+ ): ChildProcessByStdio<Writable, Readable, null>;
+ function spawn(
+ command: string,
+ args: ReadonlyArray<string>,
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
+ ): ChildProcessByStdio<Writable, null, Readable>;
+ function spawn(
+ command: string,
+ args: ReadonlyArray<string>,
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
+ ): ChildProcessByStdio<null, Readable, Readable>;
+ function spawn(
+ command: string,
+ args: ReadonlyArray<string>,
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
+ ): ChildProcessByStdio<Writable, null, null>;
+ function spawn(
+ command: string,
+ args: ReadonlyArray<string>,
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
+ ): ChildProcessByStdio<null, Readable, null>;
+ function spawn(
+ command: string,
+ args: ReadonlyArray<string>,
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
+ ): ChildProcessByStdio<null, null, Readable>;
+ function spawn(
+ command: string,
+ args: ReadonlyArray<string>,
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
+ ): ChildProcessByStdio<null, null, null>;
+
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
+
+ interface ExecOptions extends CommonOptions {
+ shell?: string;
+ maxBuffer?: number;
+ killSignal?: NodeJS.Signals | number;
+ }
+
+ interface ExecOptionsWithStringEncoding extends ExecOptions {
+ encoding: BufferEncoding;
+ }
+
+ interface ExecOptionsWithBufferEncoding extends ExecOptions {
+ encoding: BufferEncoding | null; // specify `null`.
+ }
+
+ interface ExecException extends Error {
+ cmd?: string;
+ killed?: boolean;
+ code?: number;
+ signal?: NodeJS.Signals;
+ }
+
+ // no `options` definitely means stdout/stderr are `string`.
+ function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
+
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function exec(
+ command: string,
+ options: { encoding: BufferEncoding } & ExecOptions,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
+ ): ChildProcess;
+
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function exec(
+ command: string,
+ options: (BaseEncodingOptions & ExecOptions) | undefined | null,
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
+ ): ChildProcess;
+
+ interface PromiseWithChild<T> extends Promise<T> {
+ child: ChildProcess;
+ }
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace exec {
+ function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>;
+ function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
+ function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
+ function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
+ function __promisify__(command: string, options?: (BaseEncodingOptions & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ }
+
+ interface ExecFileOptions extends CommonOptions {
+ maxBuffer?: number;
+ killSignal?: NodeJS.Signals | number;
+ windowsVerbatimArguments?: boolean;
+ shell?: boolean | string;
+ }
+ interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+ encoding: 'buffer' | null;
+ }
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
+ encoding: BufferEncoding;
+ }
+
+ function execFile(file: string): ChildProcess;
+ function execFile(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+ function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
+
+ // no `options` definitely means stdout/stderr are `string`.
+ function execFile(file: string, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+ function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithBufferEncoding,
+ callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
+ ): ChildProcess;
+
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithStringEncoding,
+ callback: (error: ExecException | null, stdout: string, stderr: string) => void,
+ ): ChildProcess;
+
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
+ function execFile(
+ file: string,
+ options: ExecFileOptionsWithOtherEncoding,
+ callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding,
+ callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
+ ): ChildProcess;
+
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
+ function execFile(file: string, options: ExecFileOptions, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptions,
+ callback: (error: ExecException | null, stdout: string, stderr: string) => void
+ ): ChildProcess;
+
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
+ function execFile(
+ file: string,
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
+ ): ChildProcess;
+ function execFile(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
+ callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
+ ): ChildProcess;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace execFile {
+ function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
+ function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: ExecFileOptionsWithOtherEncoding,
+ ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
+ function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ function __promisify__(
+ file: string,
+ args: ReadonlyArray<string> | undefined | null,
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
+ ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
+ }
+
+ interface ForkOptions extends ProcessEnvOptions, MessagingOptions {
+ execPath?: string;
+ execArgv?: string[];
+ silent?: boolean;
+ stdio?: StdioOptions;
+ detached?: boolean;
+ windowsVerbatimArguments?: boolean;
+ }
+ function fork(modulePath: string, options?: ForkOptions): ChildProcess;
+ function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
+
+ interface SpawnSyncOptions extends CommonSpawnOptions {
+ input?: string | NodeJS.ArrayBufferView;
+ killSignal?: NodeJS.Signals | number;
+ maxBuffer?: number;
+ encoding?: BufferEncoding | 'buffer' | null;
+ }
+ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+ encoding?: 'buffer' | null;
+ }
+ interface SpawnSyncReturns<T> {
+ pid: number;
+ output: string[];
+ stdout: T;
+ stderr: T;
+ status: number | null;
+ signal: NodeJS.Signals | null;
+ error?: Error;
+ }
+ function spawnSync(command: string): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
+
+ interface ExecSyncOptions extends CommonOptions {
+ input?: string | Uint8Array;
+ stdio?: StdioOptions;
+ shell?: string;
+ killSignal?: NodeJS.Signals | number;
+ maxBuffer?: number;
+ encoding?: BufferEncoding | 'buffer' | null;
+ }
+ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+ encoding?: 'buffer' | null;
+ }
+ function execSync(command: string): Buffer;
+ function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
+ function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
+ function execSync(command: string, options?: ExecSyncOptions): Buffer;
+
+ interface ExecFileSyncOptions extends CommonOptions {
+ input?: string | NodeJS.ArrayBufferView;
+ stdio?: StdioOptions;
+ killSignal?: NodeJS.Signals | number;
+ maxBuffer?: number;
+ encoding?: BufferEncoding;
+ shell?: boolean | string;
+ }
+ interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding;
+ }
+ interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+ encoding: BufferEncoding; // specify `null`.
+ }
+ function execFileSync(command: string): Buffer;
+ function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
+ function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
+ function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
+ function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
+}
diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts
new file mode 100644
index 0000000..c09ccd6
--- /dev/null
+++ b/node_modules/@types/node/cluster.d.ts
@@ -0,0 +1,266 @@
+declare module 'node:cluster' {
+ export * from 'cluster';
+}
+
+declare module 'cluster' {
+ import * as child from 'node:child_process';
+ import EventEmitter = require('node:events');
+ import * as net from 'node:net';
+
+ // interfaces
+ interface ClusterSettings {
+ execArgv?: string[]; // default: process.execArgv
+ exec?: string;
+ args?: string[];
+ silent?: boolean;
+ stdio?: any[];
+ uid?: number;
+ gid?: number;
+ inspectPort?: number | (() => number);
+ }
+
+ interface Address {
+ address: string;
+ port: number;
+ addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6"
+ }
+
+ class Worker extends EventEmitter {
+ id: number;
+ process: child.ChildProcess;
+ send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean;
+ kill(signal?: string): void;
+ destroy(signal?: string): void;
+ disconnect(): void;
+ isConnected(): boolean;
+ isDead(): boolean;
+ exitedAfterDisconnect: boolean;
+
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. error
+ * 3. exit
+ * 4. listening
+ * 5. message
+ * 6. online
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "disconnect", listener: () => void): this;
+ addListener(event: "error", listener: (error: Error) => void): this;
+ addListener(event: "exit", listener: (code: number, signal: string) => void): this;
+ addListener(event: "listening", listener: (address: Address) => void): this;
+ addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: "online", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "disconnect"): boolean;
+ emit(event: "error", error: Error): boolean;
+ emit(event: "exit", code: number, signal: string): boolean;
+ emit(event: "listening", address: Address): boolean;
+ emit(event: "message", message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: "online"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "disconnect", listener: () => void): this;
+ on(event: "error", listener: (error: Error) => void): this;
+ on(event: "exit", listener: (code: number, signal: string) => void): this;
+ on(event: "listening", listener: (address: Address) => void): this;
+ on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: "online", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "disconnect", listener: () => void): this;
+ once(event: "error", listener: (error: Error) => void): this;
+ once(event: "exit", listener: (code: number, signal: string) => void): this;
+ once(event: "listening", listener: (address: Address) => void): this;
+ once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: "online", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "disconnect", listener: () => void): this;
+ prependListener(event: "error", listener: (error: Error) => void): this;
+ prependListener(event: "exit", listener: (code: number, signal: string) => void): this;
+ prependListener(event: "listening", listener: (address: Address) => void): this;
+ prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: "online", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "disconnect", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
+ prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this;
+ prependOnceListener(event: "listening", listener: (address: Address) => void): this;
+ prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: "online", listener: () => void): this;
+ }
+
+ interface Cluster extends EventEmitter {
+ Worker: Worker;
+ disconnect(callback?: () => void): void;
+ fork(env?: any): Worker;
+ isMaster: boolean;
+ isWorker: boolean;
+ schedulingPolicy: number;
+ settings: ClusterSettings;
+ setupMaster(settings?: ClusterSettings): void;
+ worker?: Worker;
+ workers?: NodeJS.Dict<Worker>;
+
+ readonly SCHED_NONE: number;
+ readonly SCHED_RR: number;
+
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. exit
+ * 3. fork
+ * 4. listening
+ * 5. message
+ * 6. online
+ * 7. setup
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "disconnect", listener: (worker: Worker) => void): this;
+ addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ addListener(event: "fork", listener: (worker: Worker) => void): this;
+ addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ addListener(event: "online", listener: (worker: Worker) => void): this;
+ addListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "disconnect", worker: Worker): boolean;
+ emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
+ emit(event: "fork", worker: Worker): boolean;
+ emit(event: "listening", worker: Worker, address: Address): boolean;
+ emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
+ emit(event: "online", worker: Worker): boolean;
+ emit(event: "setup", settings: ClusterSettings): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "disconnect", listener: (worker: Worker) => void): this;
+ on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ on(event: "fork", listener: (worker: Worker) => void): this;
+ on(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ on(event: "online", listener: (worker: Worker) => void): this;
+ on(event: "setup", listener: (settings: ClusterSettings) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "disconnect", listener: (worker: Worker) => void): this;
+ once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ once(event: "fork", listener: (worker: Worker) => void): this;
+ once(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ once(event: "online", listener: (worker: Worker) => void): this;
+ once(event: "setup", listener: (settings: ClusterSettings) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "disconnect", listener: (worker: Worker) => void): this;
+ prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependListener(event: "fork", listener: (worker: Worker) => void): this;
+ prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
+ prependListener(event: "online", listener: (worker: Worker) => void): this;
+ prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this;
+ prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
+ prependOnceListener(event: "fork", listener: (worker: Worker) => void): this;
+ prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
+ prependOnceListener(event: "online", listener: (worker: Worker) => void): this;
+ prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
+ }
+
+ const SCHED_NONE: number;
+ const SCHED_RR: number;
+
+ function disconnect(callback?: () => void): void;
+ function fork(env?: any): Worker;
+ const isMaster: boolean;
+ const isWorker: boolean;
+ let schedulingPolicy: number;
+ const settings: ClusterSettings;
+ function setupMaster(settings?: ClusterSettings): void;
+ const worker: Worker;
+ const workers: NodeJS.Dict<Worker>;
+
+ /**
+ * events.EventEmitter
+ * 1. disconnect
+ * 2. exit
+ * 3. fork
+ * 4. listening
+ * 5. message
+ * 6. online
+ * 7. setup
+ */
+ function addListener(event: string, listener: (...args: any[]) => void): Cluster;
+ function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function addListener(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
+ function addListener(event: "online", listener: (worker: Worker) => void): Cluster;
+ function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
+
+ function emit(event: string | symbol, ...args: any[]): boolean;
+ function emit(event: "disconnect", worker: Worker): boolean;
+ function emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
+ function emit(event: "fork", worker: Worker): boolean;
+ function emit(event: "listening", worker: Worker, address: Address): boolean;
+ function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
+ function emit(event: "online", worker: Worker): boolean;
+ function emit(event: "setup", settings: ClusterSettings): boolean;
+
+ function on(event: string, listener: (...args: any[]) => void): Cluster;
+ function on(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function on(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
+ function on(event: "online", listener: (worker: Worker) => void): Cluster;
+ function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
+
+ function once(event: string, listener: (...args: any[]) => void): Cluster;
+ function once(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function once(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
+ function once(event: "online", listener: (worker: Worker) => void): Cluster;
+ function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
+
+ function removeListener(event: string, listener: (...args: any[]) => void): Cluster;
+ function removeAllListeners(event?: string): Cluster;
+ function setMaxListeners(n: number): Cluster;
+ function getMaxListeners(): number;
+ function listeners(event: string): Function[];
+ function listenerCount(type: string): number;
+
+ function prependListener(event: string, listener: (...args: any[]) => void): Cluster;
+ function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
+ function prependListener(event: "online", listener: (worker: Worker) => void): Cluster;
+ function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
+
+ function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster;
+ function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
+ function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
+ function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster;
+ function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
+ // the handle is a net.Socket or net.Server object, or undefined.
+ function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
+ function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster;
+ function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
+
+ function eventNames(): string[];
+}
diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts
new file mode 100644
index 0000000..2851e99
--- /dev/null
+++ b/node_modules/@types/node/console.d.ts
@@ -0,0 +1,137 @@
+declare module 'node:console' {
+ export = console;
+}
+
+declare module 'console' {
+ import { InspectOptions } from 'node:util';
+
+ global {
+ // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
+ interface Console {
+ Console: NodeJS.ConsoleConstructor;
+ /**
+ * A simple assertion test that verifies whether `value` is truthy.
+ * If it is not, an `AssertionError` is thrown.
+ * If provided, the error `message` is formatted using `util.format()` and used as the error message.
+ */
+ assert(value: any, message?: string, ...optionalParams: any[]): void;
+ /**
+ * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY.
+ * When `stdout` is not a TTY, this method does nothing.
+ */
+ clear(): void;
+ /**
+ * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`.
+ */
+ count(label?: string): void;
+ /**
+ * Resets the internal counter specific to `label`.
+ */
+ countReset(label?: string): void;
+ /**
+ * The `console.debug()` function is an alias for {@link console.log()}.
+ */
+ debug(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`.
+ * This function bypasses any custom `inspect()` function defined on `obj`.
+ */
+ dir(obj: any, options?: InspectOptions): void;
+ /**
+ * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting
+ */
+ dirxml(...data: any[]): void;
+ /**
+ * Prints to `stderr` with newline.
+ */
+ error(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Increases indentation of subsequent lines by two spaces.
+ * If one or more `label`s are provided, those are printed first without the additional indentation.
+ */
+ group(...label: any[]): void;
+ /**
+ * The `console.groupCollapsed()` function is an alias for {@link console.group()}.
+ */
+ groupCollapsed(...label: any[]): void;
+ /**
+ * Decreases indentation of subsequent lines by two spaces.
+ */
+ groupEnd(): void;
+ /**
+ * The {@link console.info()} function is an alias for {@link console.log()}.
+ */
+ info(message?: any, ...optionalParams: any[]): void;
+ /**
+ * Prints to `stdout` with newline.
+ */
+ log(message?: any, ...optionalParams: any[]): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Prints to `stdout` the array `array` formatted as a table.
+ */
+ table(tabularData: any, properties?: ReadonlyArray<string>): void;
+ /**
+ * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
+ */
+ time(label?: string): void;
+ /**
+ * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
+ */
+ timeEnd(label?: string): void;
+ /**
+ * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
+ */
+ timeLog(label?: string, ...data: any[]): void;
+ /**
+ * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
+ */
+ trace(message?: any, ...optionalParams: any[]): void;
+ /**
+ * The {@link console.warn()} function is an alias for {@link console.error()}.
+ */
+ warn(message?: any, ...optionalParams: any[]): void;
+
+ // --- Inspector mode only ---
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Starts a JavaScript CPU profile with an optional label.
+ */
+ profile(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
+ */
+ profileEnd(label?: string): void;
+ /**
+ * This method does not display anything unless used in the inspector.
+ * Adds an event with the label `label` to the Timeline panel of the inspector.
+ */
+ timeStamp(label?: string): void;
+ }
+
+ var console: Console;
+
+ namespace NodeJS {
+ interface ConsoleConstructorOptions {
+ stdout: WritableStream;
+ stderr?: WritableStream;
+ ignoreErrors?: boolean;
+ colorMode?: boolean | 'auto';
+ inspectOptions?: InspectOptions;
+ }
+
+ interface ConsoleConstructor {
+ prototype: Console;
+ new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console;
+ new(options: ConsoleConstructorOptions): Console;
+ }
+
+ interface Global {
+ console: typeof console;
+ }
+ }
+ }
+
+ export = console;
+}
diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts
new file mode 100644
index 0000000..5d0b7a7
--- /dev/null
+++ b/node_modules/@types/node/constants.d.ts
@@ -0,0 +1,19 @@
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
+declare module 'node:constants' {
+ import exp = require('constants');
+ export = exp;
+}
+
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
+declare module 'constants' {
+ import { constants as osConstants, SignalConstants } from 'node:os';
+ import { constants as cryptoConstants } from 'node:crypto';
+ import { constants as fsConstants } from 'node:fs';
+
+ const exp: typeof osConstants.errno &
+ typeof osConstants.priority &
+ SignalConstants &
+ typeof cryptoConstants &
+ typeof fsConstants;
+ export = exp;
+}
diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts
new file mode 100644
index 0000000..46762ca
--- /dev/null
+++ b/node_modules/@types/node/crypto.d.ts
@@ -0,0 +1,1176 @@
+declare module 'node:crypto' {
+ export * from 'crypto';
+}
+
+declare module 'crypto' {
+ import * as stream from 'node:stream';
+
+ interface Certificate {
+ /**
+ * @param spkac
+ * @returns The challenge component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportChallenge(spkac: BinaryLike): Buffer;
+ /**
+ * @param spkac
+ * @param encoding The encoding of the spkac string.
+ * @returns The public key component of the `spkac` data structure,
+ * which includes a public key and a challenge.
+ */
+ exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
+ /**
+ * @param spkac
+ * @returns `true` if the given `spkac` data structure is valid,
+ * `false` otherwise.
+ */
+ verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+ }
+ const Certificate: Certificate & {
+ /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
+ new (): Certificate;
+ /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
+ (): Certificate;
+ };
+
+ namespace constants {
+ // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
+ const OPENSSL_VERSION_NUMBER: number;
+
+ /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
+ const SSL_OP_ALL: number;
+ /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+ /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+ const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+ /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
+ const SSL_OP_CISCO_ANYCONNECT: number;
+ /** Instructs OpenSSL to turn on cookie exchange. */
+ const SSL_OP_COOKIE_EXCHANGE: number;
+ /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
+ const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+ /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
+ const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+ /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
+ const SSL_OP_EPHEMERAL_RSA: number;
+ /** Allows initial connection to servers that do not support RI. */
+ const SSL_OP_LEGACY_SERVER_CONNECT: number;
+ const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
+ const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
+ /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
+ const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
+ const SSL_OP_NETSCAPE_CA_DN_BUG: number;
+ const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
+ const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
+ const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
+ /** Instructs OpenSSL to disable support for SSL/TLS compression. */
+ const SSL_OP_NO_COMPRESSION: number;
+ const SSL_OP_NO_QUERY_MTU: number;
+ /** Instructs OpenSSL to always start a new session when performing renegotiation. */
+ const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+ const SSL_OP_NO_SSLv2: number;
+ const SSL_OP_NO_SSLv3: number;
+ const SSL_OP_NO_TICKET: number;
+ const SSL_OP_NO_TLSv1: number;
+ const SSL_OP_NO_TLSv1_1: number;
+ const SSL_OP_NO_TLSv1_2: number;
+ const SSL_OP_PKCS1_CHECK_1: number;
+ const SSL_OP_PKCS1_CHECK_2: number;
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
+ const SSL_OP_SINGLE_DH_USE: number;
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
+ const SSL_OP_SINGLE_ECDH_USE: number;
+ const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
+ const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
+ const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
+ const SSL_OP_TLS_D5_BUG: number;
+ /** Instructs OpenSSL to disable version rollback attack detection. */
+ const SSL_OP_TLS_ROLLBACK_BUG: number;
+
+ const ENGINE_METHOD_RSA: number;
+ const ENGINE_METHOD_DSA: number;
+ const ENGINE_METHOD_DH: number;
+ const ENGINE_METHOD_RAND: number;
+ const ENGINE_METHOD_EC: number;
+ const ENGINE_METHOD_CIPHERS: number;
+ const ENGINE_METHOD_DIGESTS: number;
+ const ENGINE_METHOD_PKEY_METHS: number;
+ const ENGINE_METHOD_PKEY_ASN1_METHS: number;
+ const ENGINE_METHOD_ALL: number;
+ const ENGINE_METHOD_NONE: number;
+
+ const DH_CHECK_P_NOT_SAFE_PRIME: number;
+ const DH_CHECK_P_NOT_PRIME: number;
+ const DH_UNABLE_TO_CHECK_GENERATOR: number;
+ const DH_NOT_SUITABLE_GENERATOR: number;
+
+ const ALPN_ENABLED: number;
+
+ const RSA_PKCS1_PADDING: number;
+ const RSA_SSLV23_PADDING: number;
+ const RSA_NO_PADDING: number;
+ const RSA_PKCS1_OAEP_PADDING: number;
+ const RSA_X931_PADDING: number;
+ const RSA_PKCS1_PSS_PADDING: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
+ const RSA_PSS_SALTLEN_DIGEST: number;
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
+ const RSA_PSS_SALTLEN_MAX_SIGN: number;
+ /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
+ const RSA_PSS_SALTLEN_AUTO: number;
+
+ const POINT_CONVERSION_COMPRESSED: number;
+ const POINT_CONVERSION_UNCOMPRESSED: number;
+ const POINT_CONVERSION_HYBRID: number;
+
+ /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
+ const defaultCoreCipherList: string;
+ /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
+ const defaultCipherList: string;
+ }
+
+ interface HashOptions extends stream.TransformOptions {
+ /**
+ * For XOF hash functions such as `shake256`, the
+ * outputLength option can be used to specify the desired output length in bytes.
+ */
+ outputLength?: number;
+ }
+
+ /** @deprecated since v10.0.0 */
+ const fips: boolean;
+
+ function createHash(algorithm: string, options?: HashOptions): Hash;
+ function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
+
+ // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
+ type BinaryToTextEncoding = 'base64' | 'hex';
+ type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
+ type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
+
+ type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
+
+ type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
+
+ class Hash extends stream.Transform {
+ private constructor();
+ copy(): Hash;
+ update(data: BinaryLike): Hash;
+ update(data: string, input_encoding: Encoding): Hash;
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+ class Hmac extends stream.Transform {
+ private constructor();
+ update(data: BinaryLike): Hmac;
+ update(data: string, input_encoding: Encoding): Hmac;
+ digest(): Buffer;
+ digest(encoding: BinaryToTextEncoding): string;
+ }
+
+ type KeyObjectType = 'secret' | 'public' | 'private';
+
+ interface KeyExportOptions<T extends KeyFormat> {
+ type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
+ format: T;
+ cipher?: string;
+ passphrase?: string | Buffer;
+ }
+
+ class KeyObject {
+ private constructor();
+ asymmetricKeyType?: KeyType;
+ /**
+ * For asymmetric keys, this property represents the size of the embedded key in
+ * bytes. This property is `undefined` for symmetric keys.
+ */
+ asymmetricKeySize?: number;
+ export(options: KeyExportOptions<'pem'>): string | Buffer;
+ export(options?: KeyExportOptions<'der'>): Buffer;
+ symmetricKeySize?: number;
+ type: KeyObjectType;
+ }
+
+ type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
+ type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
+
+ type BinaryLike = string | NodeJS.ArrayBufferView;
+
+ type CipherKey = BinaryLike | KeyObject;
+
+ interface CipherCCMOptions extends stream.TransformOptions {
+ authTagLength: number;
+ }
+ interface CipherGCMOptions extends stream.TransformOptions {
+ authTagLength?: number;
+ }
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
+ function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
+
+ function createCipheriv(
+ algorithm: CipherCCMTypes,
+ key: CipherKey,
+ iv: BinaryLike | null,
+ options: CipherCCMOptions,
+ ): CipherCCM;
+ function createCipheriv(
+ algorithm: CipherGCMTypes,
+ key: CipherKey,
+ iv: BinaryLike | null,
+ options?: CipherGCMOptions,
+ ): CipherGCM;
+ function createCipheriv(
+ algorithm: string,
+ key: CipherKey,
+ iv: BinaryLike | null,
+ options?: stream.TransformOptions,
+ ): Cipher;
+
+ class Cipher extends stream.Transform {
+ private constructor();
+ update(data: BinaryLike): Buffer;
+ update(data: string, input_encoding: Encoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: BinaryToTextEncoding): string;
+ update(data: string, input_encoding: Encoding | undefined, output_encoding: BinaryToTextEncoding): string;
+ final(): Buffer;
+ final(output_encoding: BufferEncoding): string;
+ setAutoPadding(auto_padding?: boolean): this;
+ // getAuthTag(): Buffer;
+ // setAAD(buffer: NodeJS.ArrayBufferView): this;
+ }
+ interface CipherCCM extends Cipher {
+ setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
+ getAuthTag(): Buffer;
+ }
+ interface CipherGCM extends Cipher {
+ setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
+ getAuthTag(): Buffer;
+ }
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
+ function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
+
+ function createDecipheriv(
+ algorithm: CipherCCMTypes,
+ key: CipherKey,
+ iv: BinaryLike | null,
+ options: CipherCCMOptions,
+ ): DecipherCCM;
+ function createDecipheriv(
+ algorithm: CipherGCMTypes,
+ key: CipherKey,
+ iv: BinaryLike | null,
+ options?: CipherGCMOptions,
+ ): DecipherGCM;
+ function createDecipheriv(
+ algorithm: string,
+ key: CipherKey,
+ iv: BinaryLike | null,
+ options?: stream.TransformOptions,
+ ): Decipher;
+
+ class Decipher extends stream.Transform {
+ private constructor();
+ update(data: NodeJS.ArrayBufferView): Buffer;
+ update(data: string, input_encoding: BinaryToTextEncoding): Buffer;
+ update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string;
+ update(data: string, input_encoding: BinaryToTextEncoding | undefined, output_encoding: Encoding): string;
+ final(): Buffer;
+ final(output_encoding: BufferEncoding): string;
+ setAutoPadding(auto_padding?: boolean): this;
+ // setAuthTag(tag: NodeJS.ArrayBufferView): this;
+ // setAAD(buffer: NodeJS.ArrayBufferView): this;
+ }
+ interface DecipherCCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
+ }
+ interface DecipherGCM extends Decipher {
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+ setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
+ }
+
+ interface PrivateKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat;
+ type?: 'pkcs1' | 'pkcs8' | 'sec1';
+ passphrase?: string | Buffer;
+ }
+
+ interface PublicKeyInput {
+ key: string | Buffer;
+ format?: KeyFormat;
+ type?: 'pkcs1' | 'spki';
+ }
+
+ function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
+ function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject;
+ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
+
+ function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
+
+ type DSAEncoding = 'der' | 'ieee-p1363';
+
+ interface SigningOptions {
+ /**
+ * @See crypto.constants.RSA_PKCS1_PADDING
+ */
+ padding?: number;
+ saltLength?: number;
+ dsaEncoding?: DSAEncoding;
+ }
+
+ interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
+ interface SignKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+ interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
+ interface VerifyKeyObjectInput extends SigningOptions {
+ key: KeyObject;
+ }
+
+ type KeyLike = string | Buffer | KeyObject;
+
+ class Signer extends stream.Writable {
+ private constructor();
+
+ update(data: BinaryLike): Signer;
+ update(data: string, input_encoding: Encoding): Signer;
+ sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
+ sign(
+ private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
+ output_format: BinaryToTextEncoding,
+ ): string;
+ }
+
+ function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
+ class Verify extends stream.Writable {
+ private constructor();
+
+ update(data: BinaryLike): Verify;
+ update(data: string, input_encoding: Encoding): Verify;
+ verify(
+ object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
+ signature: NodeJS.ArrayBufferView,
+ ): boolean;
+ verify(
+ object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
+ signature: string,
+ signature_format?: BinaryToTextEncoding,
+ ): boolean;
+ // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
+ // The signature field accepts a TypedArray type, but it is only available starting ES2017
+ }
+ function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
+ function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding): DiffieHellman;
+ function createDiffieHellman(
+ prime: string,
+ prime_encoding: BinaryToTextEncoding,
+ generator: number | NodeJS.ArrayBufferView,
+ ): DiffieHellman;
+ function createDiffieHellman(
+ prime: string,
+ prime_encoding: BinaryToTextEncoding,
+ generator: string,
+ generator_encoding: BinaryToTextEncoding,
+ ): DiffieHellman;
+ class DiffieHellman {
+ private constructor();
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding): string;
+ computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
+ computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer;
+ computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string;
+ computeSecret(
+ other_public_key: string,
+ input_encoding: BinaryToTextEncoding,
+ output_encoding: BinaryToTextEncoding,
+ ): string;
+ getPrime(): Buffer;
+ getPrime(encoding: BinaryToTextEncoding): string;
+ getGenerator(): Buffer;
+ getGenerator(encoding: BinaryToTextEncoding): string;
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding): string;
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ setPublicKey(public_key: NodeJS.ArrayBufferView): void;
+ setPublicKey(public_key: string, encoding: BufferEncoding): void;
+ setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
+ setPrivateKey(private_key: string, encoding: BufferEncoding): void;
+ verifyError: number;
+ }
+ function getDiffieHellman(group_name: string): DiffieHellman;
+ function pbkdf2(
+ password: BinaryLike,
+ salt: BinaryLike,
+ iterations: number,
+ keylen: number,
+ digest: string,
+ callback: (err: Error | null, derivedKey: Buffer) => any,
+ ): void;
+ function pbkdf2Sync(
+ password: BinaryLike,
+ salt: BinaryLike,
+ iterations: number,
+ keylen: number,
+ digest: string,
+ ): Buffer;
+
+ function randomBytes(size: number): Buffer;
+ function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+ function pseudoRandomBytes(size: number): Buffer;
+ function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
+
+ function randomInt(max: number): number;
+ function randomInt(min: number, max: number): number;
+ function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
+ function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
+
+ function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
+ function randomFill<T extends NodeJS.ArrayBufferView>(
+ buffer: T,
+ callback: (err: Error | null, buf: T) => void,
+ ): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(
+ buffer: T,
+ offset: number,
+ callback: (err: Error | null, buf: T) => void,
+ ): void;
+ function randomFill<T extends NodeJS.ArrayBufferView>(
+ buffer: T,
+ offset: number,
+ size: number,
+ callback: (err: Error | null, buf: T) => void,
+ ): void;
+
+ interface ScryptOptions {
+ cost?: number;
+ blockSize?: number;
+ parallelization?: number;
+ N?: number;
+ r?: number;
+ p?: number;
+ maxmem?: number;
+ }
+ function scrypt(
+ password: BinaryLike,
+ salt: BinaryLike,
+ keylen: number,
+ callback: (err: Error | null, derivedKey: Buffer) => void,
+ ): void;
+ function scrypt(
+ password: BinaryLike,
+ salt: BinaryLike,
+ keylen: number,
+ options: ScryptOptions,
+ callback: (err: Error | null, derivedKey: Buffer) => void,
+ ): void;
+ function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
+
+ interface RsaPublicKey {
+ key: KeyLike;
+ padding?: number;
+ }
+ interface RsaPrivateKey {
+ key: KeyLike;
+ passphrase?: string;
+ /**
+ * @default 'sha1'
+ */
+ oaepHash?: string;
+ oaepLabel?: NodeJS.TypedArray;
+ padding?: number;
+ }
+ function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
+ function getCiphers(): string[];
+ function getCurves(): string[];
+ function getFips(): 1 | 0;
+ function getHashes(): string[];
+ class ECDH {
+ private constructor();
+ static convertKey(
+ key: BinaryLike,
+ curve: string,
+ inputEncoding?: BinaryToTextEncoding,
+ outputEncoding?: 'latin1' | 'hex' | 'base64',
+ format?: 'uncompressed' | 'compressed' | 'hybrid',
+ ): Buffer | string;
+ generateKeys(): Buffer;
+ generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
+ computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer;
+ computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string;
+ computeSecret(
+ other_public_key: string,
+ input_encoding: BinaryToTextEncoding,
+ output_encoding: BinaryToTextEncoding,
+ ): string;
+ getPrivateKey(): Buffer;
+ getPrivateKey(encoding: BinaryToTextEncoding): string;
+ getPublicKey(): Buffer;
+ getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+ setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
+ setPrivateKey(private_key: string, encoding: BinaryToTextEncoding): void;
+ }
+ function createECDH(curve_name: string): ECDH;
+ function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
+ /** @deprecated since v10.0.0 */
+ const DEFAULT_ENCODING: BufferEncoding;
+
+ type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
+ type KeyFormat = 'pem' | 'der';
+
+ interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
+ format: T;
+ cipher?: string;
+ passphrase?: string;
+ }
+
+ interface KeyPairKeyObjectResult {
+ publicKey: KeyObject;
+ privateKey: KeyObject;
+ }
+
+ interface ED25519KeyPairKeyObjectOptions {
+ /**
+ * No options.
+ */
+ }
+
+ interface ED448KeyPairKeyObjectOptions {
+ /**
+ * No options.
+ */
+ }
+
+ interface X25519KeyPairKeyObjectOptions {
+ /**
+ * No options.
+ */
+ }
+
+ interface X448KeyPairKeyObjectOptions {
+ /**
+ * No options.
+ */
+ }
+
+ interface ECKeyPairKeyObjectOptions {
+ /**
+ * Name of the curve to use.
+ */
+ namedCurve: string;
+ }
+
+ interface RSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+
+ /**
+ * @default 0x10001
+ */
+ publicExponent?: number;
+ }
+
+ interface DSAKeyPairKeyObjectOptions {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+ }
+
+ interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * @default 0x10001
+ */
+ publicExponent?: number;
+
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs1' | 'pkcs8';
+ };
+ }
+
+ interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Key size in bits
+ */
+ modulusLength: number;
+ /**
+ * Size of q in bits
+ */
+ divisorLength: number;
+
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+
+ interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ /**
+ * Name of the curve to use.
+ */
+ namedCurve: string;
+
+ publicKeyEncoding: {
+ type: 'pkcs1' | 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'sec1' | 'pkcs8';
+ };
+ }
+
+ interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+
+ interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+
+ interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+
+ interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
+ publicKeyEncoding: {
+ type: 'spki';
+ format: PubF;
+ };
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
+ type: 'pkcs8';
+ };
+ }
+
+ interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
+ publicKey: T1;
+ privateKey: T2;
+ }
+
+ function generateKeyPairSync(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+
+ function generateKeyPairSync(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+
+ function generateKeyPairSync(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+
+ function generateKeyPairSync(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+
+ function generateKeyPairSync(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+
+ function generateKeyPairSync(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+
+ function generateKeyPairSync(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'pem'>,
+ ): KeyPairSyncResult<string, string>;
+ function generateKeyPairSync(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'der'>,
+ ): KeyPairSyncResult<string, Buffer>;
+ function generateKeyPairSync(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'pem'>,
+ ): KeyPairSyncResult<Buffer, string>;
+ function generateKeyPairSync(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'der'>,
+ ): KeyPairSyncResult<Buffer, Buffer>;
+ function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
+
+ function generateKeyPair(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'rsa',
+ options: RSAKeyPairKeyObjectOptions,
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
+ ): void;
+
+ function generateKeyPair(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'dsa',
+ options: DSAKeyPairKeyObjectOptions,
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
+ ): void;
+
+ function generateKeyPair(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ec',
+ options: ECKeyPairKeyObjectOptions,
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
+ ): void;
+
+ function generateKeyPair(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ed25519',
+ options: ED25519KeyPairKeyObjectOptions | undefined,
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
+ ): void;
+
+ function generateKeyPair(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'ed448',
+ options: ED448KeyPairKeyObjectOptions | undefined,
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
+ ): void;
+
+ function generateKeyPair(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'x25519',
+ options: X25519KeyPairKeyObjectOptions | undefined,
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
+ ): void;
+
+ function generateKeyPair(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'pem'>,
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'der'>,
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'pem'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'der'>,
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
+ ): void;
+ function generateKeyPair(
+ type: 'x448',
+ options: X448KeyPairKeyObjectOptions | undefined,
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
+ ): void;
+
+ namespace generateKeyPair {
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'rsa',
+ options: RSAKeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+ function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'dsa',
+ options: DSAKeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+ function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'ec',
+ options: ECKeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+ function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'ed25519',
+ options: ED25519KeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'ed25519',
+ options?: ED25519KeyPairKeyObjectOptions,
+ ): Promise<KeyPairKeyObjectResult>;
+
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'ed448',
+ options: ED448KeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+ function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'x25519',
+ options: X25519KeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'x25519',
+ options?: X25519KeyPairKeyObjectOptions,
+ ): Promise<KeyPairKeyObjectResult>;
+
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'pem'>,
+ ): Promise<{ publicKey: string; privateKey: string }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'pem', 'der'>,
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'pem'>,
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
+ function __promisify__(
+ type: 'x448',
+ options: X448KeyPairOptions<'der', 'der'>,
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
+ function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
+ }
+
+ /**
+ * Calculates and returns the signature for `data` using the given private key and
+ * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
+ * dependent upon the key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
+ * passed to [`crypto.createPrivateKey()`][].
+ */
+ function sign(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
+ ): Buffer;
+
+ /**
+ * Calculates and returns the signature for `data` using the given private key and
+ * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
+ * dependent upon the key type (especially Ed25519 and Ed448).
+ *
+ * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
+ * passed to [`crypto.createPublicKey()`][].
+ */
+ function verify(
+ algorithm: string | null | undefined,
+ data: NodeJS.ArrayBufferView,
+ key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
+ signature: NodeJS.ArrayBufferView,
+ ): boolean;
+
+ /**
+ * Computes the Diffie-Hellman secret based on a privateKey and a publicKey.
+ * Both keys must have the same asymmetricKeyType, which must be one of
+ * 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).
+ */
+ function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
+}
diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts
new file mode 100644
index 0000000..d84a1ee
--- /dev/null
+++ b/node_modules/@types/node/dgram.d.ts
@@ -0,0 +1,145 @@
+declare module 'node:dgram' {
+ export * from 'dgram';
+}
+
+declare module 'dgram' {
+ import { AddressInfo } from 'node:net';
+ import * as dns from 'node:dns';
+ import EventEmitter = require('node:events');
+
+ interface RemoteInfo {
+ address: string;
+ family: 'IPv4' | 'IPv6';
+ port: number;
+ size: number;
+ }
+
+ interface BindOptions {
+ port?: number;
+ address?: string;
+ exclusive?: boolean;
+ fd?: number;
+ }
+
+ type SocketType = "udp4" | "udp6";
+
+ interface SocketOptions {
+ type: SocketType;
+ reuseAddr?: boolean;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean;
+ recvBufferSize?: number;
+ sendBufferSize?: number;
+ lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
+ }
+
+ function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+ function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
+
+ class Socket extends EventEmitter {
+ addMembership(multicastAddress: string, multicastInterface?: string): void;
+ address(): AddressInfo;
+ bind(port?: number, address?: string, callback?: () => void): void;
+ bind(port?: number, callback?: () => void): void;
+ bind(callback?: () => void): void;
+ bind(options: BindOptions, callback?: () => void): void;
+ close(callback?: () => void): void;
+ connect(port: number, address?: string, callback?: () => void): void;
+ connect(port: number, callback: () => void): void;
+ disconnect(): void;
+ dropMembership(multicastAddress: string, multicastInterface?: string): void;
+ getRecvBufferSize(): number;
+ getSendBufferSize(): number;
+ ref(): this;
+ remoteAddress(): AddressInfo;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
+ send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
+ setBroadcast(flag: boolean): void;
+ setMulticastInterface(multicastInterface: string): void;
+ setMulticastLoopback(flag: boolean): void;
+ setMulticastTTL(ttl: number): void;
+ setRecvBufferSize(size: number): void;
+ setSendBufferSize(size: number): void;
+ setTTL(ttl: number): void;
+ unref(): this;
+ /**
+ * Tells the kernel to join a source-specific multicast channel at the given
+ * `sourceAddress` and `groupAddress`, using the `multicastInterface` with the
+ * `IP_ADD_SOURCE_MEMBERSHIP` socket option.
+ * If the `multicastInterface` argument
+ * is not specified, the operating system will choose one interface and will add
+ * membership to it.
+ * To add membership to every available interface, call
+ * `socket.addSourceSpecificMembership()` multiple times, once per interface.
+ */
+ addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+
+ /**
+ * Instructs the kernel to leave a source-specific multicast channel at the given
+ * `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`
+ * socket option. This method is automatically called by the kernel when the
+ * socket is closed or the process terminates, so most apps will never have
+ * reason to call this.
+ *
+ * If `multicastInterface` is not specified, the operating system will attempt to
+ * drop membership on all valid interfaces.
+ */
+ dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. error
+ * 4. listening
+ * 5. message
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "connect", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "listening", listener: () => void): this;
+ addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "connect"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "listening"): boolean;
+ emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "connect", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "listening", listener: () => void): this;
+ on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "connect", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "listening", listener: () => void): this;
+ once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "connect", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "listening", listener: () => void): this;
+ prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "connect", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "listening", listener: () => void): this;
+ prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
+ }
+}
diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts
new file mode 100644
index 0000000..4152a34
--- /dev/null
+++ b/node_modules/@types/node/dns.d.ts
@@ -0,0 +1,384 @@
+declare module 'node:dns' {
+ export * from 'dns';
+}
+
+declare module 'dns' {
+ // Supported getaddrinfo flags.
+ const ADDRCONFIG: number;
+ const V4MAPPED: number;
+ /**
+ * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
+ * well as IPv4 mapped IPv6 addresses.
+ */
+ const ALL: number;
+
+ interface LookupOptions {
+ family?: number;
+ hints?: number;
+ all?: boolean;
+ verbatim?: boolean;
+ }
+
+ interface LookupOneOptions extends LookupOptions {
+ all?: false;
+ }
+
+ interface LookupAllOptions extends LookupOptions {
+ all: true;
+ }
+
+ interface LookupAddress {
+ address: string;
+ family: number;
+ }
+
+ function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+ function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
+ function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
+ function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace lookup {
+ function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
+ function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ }
+
+ function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
+
+ namespace lookupService {
+ function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
+ }
+
+ interface ResolveOptions {
+ ttl: boolean;
+ }
+
+ interface ResolveWithTtlOptions extends ResolveOptions {
+ ttl: true;
+ }
+
+ interface RecordWithTtl {
+ address: string;
+ ttl: number;
+ }
+
+ /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
+ type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
+
+ interface AnyARecord extends RecordWithTtl {
+ type: "A";
+ }
+
+ interface AnyAaaaRecord extends RecordWithTtl {
+ type: "AAAA";
+ }
+
+ interface MxRecord {
+ priority: number;
+ exchange: string;
+ }
+
+ interface AnyMxRecord extends MxRecord {
+ type: "MX";
+ }
+
+ interface NaptrRecord {
+ flags: string;
+ service: string;
+ regexp: string;
+ replacement: string;
+ order: number;
+ preference: number;
+ }
+
+ interface AnyNaptrRecord extends NaptrRecord {
+ type: "NAPTR";
+ }
+
+ interface SoaRecord {
+ nsname: string;
+ hostmaster: string;
+ serial: number;
+ refresh: number;
+ retry: number;
+ expire: number;
+ minttl: number;
+ }
+
+ interface AnySoaRecord extends SoaRecord {
+ type: "SOA";
+ }
+
+ interface SrvRecord {
+ priority: number;
+ weight: number;
+ port: number;
+ name: string;
+ }
+
+ interface AnySrvRecord extends SrvRecord {
+ type: "SRV";
+ }
+
+ interface AnyTxtRecord {
+ type: "TXT";
+ entries: string[];
+ }
+
+ interface AnyNsRecord {
+ type: "NS";
+ value: string;
+ }
+
+ interface AnyPtrRecord {
+ type: "PTR";
+ value: string;
+ }
+
+ interface AnyCnameRecord {
+ type: "CNAME";
+ value: string;
+ }
+
+ type AnyRecord = AnyARecord |
+ AnyAaaaRecord |
+ AnyCnameRecord |
+ AnyMxRecord |
+ AnyNaptrRecord |
+ AnyNsRecord |
+ AnyPtrRecord |
+ AnySoaRecord |
+ AnySrvRecord |
+ AnyTxtRecord;
+
+ function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
+ function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ function resolve(
+ hostname: string,
+ rrtype: string,
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
+ ): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace resolve {
+ function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
+ function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
+ function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
+ function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
+ function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
+ function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
+ function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
+ function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+ }
+
+ function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace resolve4 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+
+ function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
+ function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ namespace resolve6 {
+ function __promisify__(hostname: string): Promise<string[]>;
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+ }
+
+ function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ namespace resolveCname {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+
+ function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
+ namespace resolveMx {
+ function __promisify__(hostname: string): Promise<MxRecord[]>;
+ }
+
+ function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
+ namespace resolveNaptr {
+ function __promisify__(hostname: string): Promise<NaptrRecord[]>;
+ }
+
+ function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ namespace resolveNs {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+
+ function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
+ namespace resolvePtr {
+ function __promisify__(hostname: string): Promise<string[]>;
+ }
+
+ function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
+ namespace resolveSoa {
+ function __promisify__(hostname: string): Promise<SoaRecord>;
+ }
+
+ function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
+ namespace resolveSrv {
+ function __promisify__(hostname: string): Promise<SrvRecord[]>;
+ }
+
+ function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
+ namespace resolveTxt {
+ function __promisify__(hostname: string): Promise<string[][]>;
+ }
+
+ function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
+ namespace resolveAny {
+ function __promisify__(hostname: string): Promise<AnyRecord[]>;
+ }
+
+ function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
+ function setServers(servers: ReadonlyArray<string>): void;
+ function getServers(): string[];
+
+ // Error codes
+ const NODATA: string;
+ const FORMERR: string;
+ const SERVFAIL: string;
+ const NOTFOUND: string;
+ const NOTIMP: string;
+ const REFUSED: string;
+ const BADQUERY: string;
+ const BADNAME: string;
+ const BADFAMILY: string;
+ const BADRESP: string;
+ const CONNREFUSED: string;
+ const TIMEOUT: string;
+ const EOF: string;
+ const FILE: string;
+ const NOMEM: string;
+ const DESTRUCTION: string;
+ const BADSTR: string;
+ const BADFLAGS: string;
+ const NONAME: string;
+ const BADHINTS: string;
+ const NOTINITIALIZED: string;
+ const LOADIPHLPAPI: string;
+ const ADDRGETNETWORKPARAMS: string;
+ const CANCELLED: string;
+
+ interface ResolverOptions {
+ timeout?: number;
+ }
+
+ class Resolver {
+ constructor(options?: ResolverOptions);
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+
+ namespace promises {
+ function getServers(): string[];
+
+ function lookup(hostname: string, family: number): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
+ function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+ function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+ function lookup(hostname: string): Promise<LookupAddress>;
+
+ function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>;
+
+ function resolve(hostname: string): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
+ function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
+ function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
+ function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
+ function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
+ function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
+ function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
+ function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
+
+ function resolve4(hostname: string): Promise<string[]>;
+ function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+
+ function resolve6(hostname: string): Promise<string[]>;
+ function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+ function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+
+ function resolveAny(hostname: string): Promise<AnyRecord[]>;
+
+ function resolveCname(hostname: string): Promise<string[]>;
+
+ function resolveMx(hostname: string): Promise<MxRecord[]>;
+
+ function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
+
+ function resolveNs(hostname: string): Promise<string[]>;
+
+ function resolvePtr(hostname: string): Promise<string[]>;
+
+ function resolveSoa(hostname: string): Promise<SoaRecord>;
+
+ function resolveSrv(hostname: string): Promise<SrvRecord[]>;
+
+ function resolveTxt(hostname: string): Promise<string[][]>;
+
+ function reverse(ip: string): Promise<string[]>;
+
+ function setServers(servers: ReadonlyArray<string>): void;
+
+ class Resolver {
+ constructor(options?: ResolverOptions);
+ cancel(): void;
+ getServers: typeof getServers;
+ resolve: typeof resolve;
+ resolve4: typeof resolve4;
+ resolve6: typeof resolve6;
+ resolveAny: typeof resolveAny;
+ resolveCname: typeof resolveCname;
+ resolveMx: typeof resolveMx;
+ resolveNaptr: typeof resolveNaptr;
+ resolveNs: typeof resolveNs;
+ resolvePtr: typeof resolvePtr;
+ resolveSoa: typeof resolveSoa;
+ resolveSrv: typeof resolveSrv;
+ resolveTxt: typeof resolveTxt;
+ reverse: typeof reverse;
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
+ setServers: typeof setServers;
+ }
+ }
+}
diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts
new file mode 100644
index 0000000..4d5f153
--- /dev/null
+++ b/node_modules/@types/node/domain.d.ts
@@ -0,0 +1,28 @@
+declare module 'node:domain' {
+ export * from 'domain';
+}
+
+declare module 'domain' {
+ import EventEmitter = require('node:events');
+
+ global {
+ namespace NodeJS {
+ interface Domain extends EventEmitter {
+ run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
+ add(emitter: EventEmitter | Timer): void;
+ remove(emitter: EventEmitter | Timer): void;
+ bind<T extends Function>(cb: T): T;
+ intercept<T extends Function>(cb: T): T;
+ }
+ }
+ }
+
+ interface Domain extends NodeJS.Domain {}
+ class Domain extends EventEmitter {
+ members: Array<EventEmitter | NodeJS.Timer>;
+ enter(): void;
+ exit(): void;
+ }
+
+ function create(): Domain;
+}
diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts
new file mode 100644
index 0000000..d12c132
--- /dev/null
+++ b/node_modules/@types/node/events.d.ts
@@ -0,0 +1,83 @@
+declare module 'node:events' {
+ import EventEmitter = require('events');
+ export = EventEmitter;
+}
+
+declare module 'events' {
+ interface EventEmitterOptions {
+ /**
+ * Enables automatic capturing of promise rejection.
+ */
+ captureRejections?: boolean;
+ }
+
+ interface NodeEventTarget {
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ interface DOMEventTarget {
+ addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
+ }
+
+ interface EventEmitter extends NodeJS.EventEmitter {}
+ class EventEmitter {
+ constructor(options?: EventEmitterOptions);
+
+ static once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>;
+ static once(emitter: DOMEventTarget, event: string): Promise<any[]>;
+ static on(emitter: NodeJS.EventEmitter, event: string): AsyncIterableIterator<any>;
+
+ /** @deprecated since v4.0.0 */
+ static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number;
+
+ /**
+ * This symbol shall be used to install a listener for only monitoring `'error'`
+ * events. Listeners installed using this symbol are called before the regular
+ * `'error'` listeners are called.
+ *
+ * Installing a listener using this symbol does not change the behavior once an
+ * `'error'` event is emitted, therefore the process will still crash if no
+ * regular `'error'` listener is installed.
+ */
+ static readonly errorMonitor: unique symbol;
+ static readonly captureRejectionSymbol: unique symbol;
+
+ /**
+ * Sets or gets the default captureRejection value for all emitters.
+ */
+ // TODO: These should be described using static getter/setter pairs:
+ static captureRejections: boolean;
+ static defaultMaxListeners: number;
+ }
+
+ import internal = require('events');
+ namespace EventEmitter {
+ // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
+ export { internal as EventEmitter };
+ }
+
+ global {
+ namespace NodeJS {
+ interface EventEmitter {
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ removeAllListeners(event?: string | symbol): this;
+ setMaxListeners(n: number): this;
+ getMaxListeners(): number;
+ listeners(event: string | symbol): Function[];
+ rawListeners(event: string | symbol): Function[];
+ emit(event: string | symbol, ...args: any[]): boolean;
+ listenerCount(event: string | symbol): number;
+ // Added in Node 6...
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ eventNames(): Array<string | symbol>;
+ }
+ }
+ }
+
+ export = EventEmitter;
+}
diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts
new file mode 100644
index 0000000..d7258fa
--- /dev/null
+++ b/node_modules/@types/node/fs.d.ts
@@ -0,0 +1,2262 @@
+declare module 'node:fs' {
+ export * from 'fs';
+}
+
+declare module 'fs' {
+ import * as stream from 'node:stream';
+ import EventEmitter = require('node:events');
+ import { URL } from 'node:url';
+ import * as promises from 'node:fs/promises';
+
+ export { promises };
+ /**
+ * Valid types for path values in "fs".
+ */
+ export type PathLike = string | Buffer | URL;
+
+ export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
+
+ export type BufferEncodingOption = 'buffer' | { encoding: 'buffer' };
+
+ export interface BaseEncodingOptions {
+ encoding?: BufferEncoding | null;
+ }
+
+ export type OpenMode = number | string;
+
+ export type Mode = number | string;
+
+ export interface StatsBase<T> {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ isBlockDevice(): boolean;
+ isCharacterDevice(): boolean;
+ isSymbolicLink(): boolean;
+ isFIFO(): boolean;
+ isSocket(): boolean;
+
+ dev: T;
+ ino: T;
+ mode: T;
+ nlink: T;
+ uid: T;
+ gid: T;
+ rdev: T;
+ size: T;
+ blksize: T;
+ blocks: T;
+ atimeMs: T;
+ mtimeMs: T;
+ ctimeMs: T;
+ birthtimeMs: T;
+ atime: Date;
+ mtime: Date;
+ ctime: Date;
+ birthtime: Date;
+ }
+
+ export interface Stats extends StatsBase<number> {
+ }
+
+ export class Stats {
+ }
+
+ export class Dirent {
+ isFile(): boolean;
+ isDirectory(): boolean;
+ isBlockDevice(): boolean;
+ isCharacterDevice(): boolean;
+ isSymbolicLink(): boolean;
+ isFIFO(): boolean;
+ isSocket(): boolean;
+ name: string;
+ }
+
+ /**
+ * A class representing a directory stream.
+ */
+ export class Dir {
+ readonly path: string;
+
+ /**
+ * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
+ */
+ [Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
+
+ /**
+ * Asynchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ */
+ close(): Promise<void>;
+ close(cb: NoParamCallback): void;
+
+ /**
+ * Synchronously close the directory's underlying resource handle.
+ * Subsequent reads will result in errors.
+ */
+ closeSync(): void;
+
+ /**
+ * Asynchronously read the next directory entry via `readdir(3)` as an `Dirent`.
+ * After the read is completed, a value is returned that will be resolved with an `Dirent`, or `null` if there are no more directory entries to read.
+ * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.
+ */
+ read(): Promise<Dirent | null>;
+ read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
+
+ /**
+ * Synchronously read the next directory entry via `readdir(3)` as a `Dirent`.
+ * If there are no more directory entries to read, null will be returned.
+ * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.
+ */
+ readSync(): Dirent | null;
+ }
+
+ export interface FSWatcher extends EventEmitter {
+ close(): void;
+
+ /**
+ * events.EventEmitter
+ * 1. change
+ * 2. error
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ addListener(event: "error", listener: (error: Error) => void): this;
+ addListener(event: "close", listener: () => void): this;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ on(event: "error", listener: (error: Error) => void): this;
+ on(event: "close", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ once(event: "error", listener: (error: Error) => void): this;
+ once(event: "close", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependListener(event: "error", listener: (error: Error) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ }
+
+ export class ReadStream extends stream.Readable {
+ close(): void;
+ bytesRead: number;
+ path: string | Buffer;
+ pending: boolean;
+
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ addListener(event: "end", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "open", listener: (fd: number) => void): this;
+ addListener(event: "pause", listener: () => void): this;
+ addListener(event: "readable", listener: () => void): this;
+ addListener(event: "ready", listener: () => void): this;
+ addListener(event: "resume", listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "data", listener: (chunk: Buffer | string) => void): this;
+ on(event: "end", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "open", listener: (fd: number) => void): this;
+ on(event: "pause", listener: () => void): this;
+ on(event: "readable", listener: () => void): this;
+ on(event: "ready", listener: () => void): this;
+ on(event: "resume", listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "data", listener: (chunk: Buffer | string) => void): this;
+ once(event: "end", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "open", listener: (fd: number) => void): this;
+ once(event: "pause", listener: () => void): this;
+ once(event: "readable", listener: () => void): this;
+ once(event: "ready", listener: () => void): this;
+ once(event: "resume", listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: "end", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "open", listener: (fd: number) => void): this;
+ prependListener(event: "pause", listener: () => void): this;
+ prependListener(event: "readable", listener: () => void): this;
+ prependListener(event: "ready", listener: () => void): this;
+ prependListener(event: "resume", listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: "end", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "open", listener: (fd: number) => void): this;
+ prependOnceListener(event: "pause", listener: () => void): this;
+ prependOnceListener(event: "readable", listener: () => void): this;
+ prependOnceListener(event: "ready", listener: () => void): this;
+ prependOnceListener(event: "resume", listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ export class WriteStream extends stream.Writable {
+ close(): void;
+ bytesWritten: number;
+ path: string | Buffer;
+ pending: boolean;
+
+ /**
+ * events.EventEmitter
+ * 1. open
+ * 2. close
+ * 3. ready
+ */
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "drain", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "finish", listener: () => void): this;
+ addListener(event: "open", listener: (fd: number) => void): this;
+ addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ addListener(event: "ready", listener: () => void): this;
+ addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "drain", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "finish", listener: () => void): this;
+ on(event: "open", listener: (fd: number) => void): this;
+ on(event: "pipe", listener: (src: stream.Readable) => void): this;
+ on(event: "ready", listener: () => void): this;
+ on(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "drain", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "finish", listener: () => void): this;
+ once(event: "open", listener: (fd: number) => void): this;
+ once(event: "pipe", listener: (src: stream.Readable) => void): this;
+ once(event: "ready", listener: () => void): this;
+ once(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "drain", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "finish", listener: () => void): this;
+ prependListener(event: "open", listener: (fd: number) => void): this;
+ prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ prependListener(event: "ready", listener: () => void): this;
+ prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "drain", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "finish", listener: () => void): this;
+ prependOnceListener(event: "open", listener: (fd: number) => void): this;
+ prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: "ready", listener: () => void): this;
+ prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace rename {
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+
+ /**
+ * Synchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function renameSync(oldPath: PathLike, newPath: PathLike): void;
+
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void;
+
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function truncate(path: PathLike, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace truncate {
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(path: PathLike, len?: number | null): Promise<void>;
+ }
+
+ /**
+ * Synchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ export function truncateSync(path: PathLike, len?: number | null): void;
+
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void;
+
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ */
+ export function ftruncate(fd: number, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace ftruncate {
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ function __promisify__(fd: number, len?: number | null): Promise<void>;
+ }
+
+ /**
+ * Synchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param fd A file descriptor.
+ * @param len If not specified, defaults to `0`.
+ */
+ export function ftruncateSync(fd: number, len?: number | null): void;
+
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace chown {
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function chownSync(path: PathLike, uid: number, gid: number): void;
+
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace fchown {
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous fchown(2) - Change ownership of a file.
+ * @param fd A file descriptor.
+ */
+ export function fchownSync(fd: number, uid: number, gid: number): void;
+
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace lchown {
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function lchownSync(path: PathLike, uid: number, gid: number): void;
+
+ /**
+ * Changes the access and modification times of a file in the same way as `fs.utimes()`,
+ * with the difference that if the path refers to a symbolic link, then the link is not
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ export function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace lutimes {
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
+ * with the difference that if the path refers to a symbolic link, then the link is not
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+ }
+
+ /**
+ * Change the file system timestamps of the symbolic link referenced by `path`. Returns `undefined`,
+ * or throws an exception when parameters are incorrect or the operation fails.
+ * This is the synchronous version of `fs.lutimes()`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ export function lutimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
+
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace chmod {
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+
+ /**
+ * Synchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ export function chmodSync(path: PathLike, mode: Mode): void;
+
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace fchmod {
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(fd: number, mode: Mode): Promise<void>;
+ }
+
+ /**
+ * Synchronous fchmod(2) - Change permissions of a file.
+ * @param fd A file descriptor.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ export function fchmodSync(fd: number, mode: Mode): void;
+
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace lchmod {
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+ }
+
+ /**
+ * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ export function lchmodSync(path: PathLike, mode: Mode): void;
+
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function stat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function stat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
+ export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace stat {
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise<Stats>;
+ function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+
+ /**
+ * Synchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function statSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats;
+ export function statSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats;
+ export function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
+
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function fstat(fd: number, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function fstat(fd: number, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
+ export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace fstat {
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number, options?: StatOptions & { bigint?: false }): Promise<Stats>;
+ function __promisify__(fd: number, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
+ function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+
+ /**
+ * Synchronous fstat(2) - Get file status.
+ * @param fd A file descriptor.
+ */
+ export function fstatSync(fd: number, options?: StatOptions & { bigint?: false }): Stats;
+ export function fstatSync(fd: number, options: StatOptions & { bigint: true }): BigIntStats;
+ export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
+
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function lstat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+ export function lstat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
+ export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace lstat {
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise<Stats>;
+ function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
+ function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+ }
+
+ /**
+ * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function lstatSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats;
+ export function lstatSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats;
+ export function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
+
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace link {
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
+ }
+
+ /**
+ * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function linkSync(existingPath: PathLike, newPath: PathLike): void;
+
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
+
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace symlink {
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+
+ type Type = "dir" | "file" | "junction";
+ }
+
+ /**
+ * Synchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(
+ path: PathLike,
+ options: BaseEncodingOptions | BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, linkString: string) => void
+ ): void;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlink(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace readlink {
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
+ }
+
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string;
+
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer;
+
+ /**
+ * Synchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readlinkSync(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(
+ path: PathLike,
+ options: BaseEncodingOptions | BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
+ ): void;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpath(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace realpath {
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
+
+ function native(
+ path: PathLike,
+ options: BaseEncodingOptions | BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
+ ): void;
+ function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
+ function native(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
+ function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
+ }
+
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string;
+
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer;
+
+ /**
+ * Synchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function realpathSync(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer;
+
+ export namespace realpathSync {
+ function native(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string;
+ function native(path: PathLike, options: BufferEncodingOption): Buffer;
+ function native(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer;
+ }
+
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function unlink(path: PathLike, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace unlink {
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike): Promise<void>;
+ }
+
+ /**
+ * Synchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function unlinkSync(path: PathLike): void;
+
+ export interface RmDirOptions {
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number;
+ /**
+ * @deprecated since v14.14.0 In future versions of Node.js,
+ * `fs.rmdir(path, { recursive: true })` will throw on nonexistent
+ * paths, or when given a file as a target.
+ * Use `fs.rm(path, { recursive: true, force: true })` instead.
+ *
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, errors are not reported if `path` does not exist, and
+ * operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number;
+ }
+
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function rmdir(path: PathLike, callback: NoParamCallback): void;
+ export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace rmdir {
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
+ }
+
+ /**
+ * Synchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
+
+ export interface RmOptions {
+ /**
+ * When `true`, exceptions will be ignored if `path` does not exist.
+ * @default false
+ */
+ force?: boolean;
+ /**
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
+ * number of retries. This option is ignored if the `recursive` option is not
+ * `true`.
+ * @default 0
+ */
+ maxRetries?: number;
+ /**
+ * If `true`, perform a recursive directory removal. In
+ * recursive mode, errors are not reported if `path` does not exist, and
+ * operations are retried on failure.
+ * @default false
+ */
+ recursive?: boolean;
+ /**
+ * The amount of time in milliseconds to wait between retries.
+ * This option is ignored if the `recursive` option is not `true`.
+ * @default 100
+ */
+ retryDelay?: number;
+ }
+
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
+ */
+ export function rm(path: PathLike, callback: NoParamCallback): void;
+ export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace rm {
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
+ */
+ function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
+ }
+
+ /**
+ * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility).
+ */
+ export function rmSync(path: PathLike, options?: RmOptions): void;
+
+ export interface MakeDirectoryOptions {
+ /**
+ * Indicates whether parent folders should be created.
+ * If a folder was created, the path to the first created folder will be returned.
+ * @default false
+ */
+ recursive?: boolean;
+ /**
+ * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
+ * @default 0o777
+ */
+ mode?: Mode;
+ }
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true }, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(path: PathLike, options: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null | undefined, callback: NoParamCallback): void;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function mkdir(path: PathLike, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace mkdir {
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise<string | undefined>;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): Promise<void>;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+ }
+
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): string | undefined;
+
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): void;
+
+ /**
+ * Synchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(prefix: string, options: BaseEncodingOptions | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtemp(prefix: string, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ */
+ export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace mkdtemp {
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(prefix: string, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
+ }
+
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): string;
+
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer;
+
+ /**
+ * Synchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function mkdtempSync(prefix: string, options?: BaseEncodingOptions | string | null): string | Buffer;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[]) => void,
+ ): void;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdir(
+ path: PathLike,
+ options: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void,
+ ): void;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdir(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace readdir {
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise<string[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise<Buffer[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function __promisify__(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[] | Buffer[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
+ */
+ function __promisify__(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Promise<Dirent[]>;
+ }
+
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): string[];
+
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Buffer[];
+
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ export function readdirSync(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): string[] | Buffer[];
+
+ /**
+ * Synchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ export function readdirSync(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Dirent[];
+
+ /**
+ * Asynchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ export function close(fd: number, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace close {
+ /**
+ * Asynchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous close(2) - close a file descriptor.
+ * @param fd A file descriptor.
+ */
+ export function closeSync(fd: number): void;
+
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ export function open(path: PathLike, flags: OpenMode, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+
+ /**
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ export function open(path: PathLike, flags: OpenMode, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace open {
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise<number>;
+ }
+
+ /**
+ * Synchronous open(2) - open and possibly create a file, returning a file descriptor..
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+ */
+ export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
+
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace utimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+ }
+
+ /**
+ * Synchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ export function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
+
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace futimes {
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+ }
+
+ /**
+ * Synchronously change file timestamps of the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ export function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void;
+
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ export function fsync(fd: number, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace fsync {
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param fd A file descriptor.
+ */
+ export function fsyncSync(fd: number): void;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ position: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
+ ): void;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ length: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
+ ): void;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
+ ): void;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ */
+ export function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function write(
+ fd: number,
+ string: string,
+ position: number | undefined | null,
+ encoding: BufferEncoding | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void,
+ ): void;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ */
+ export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace write {
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer?: TBuffer,
+ offset?: number,
+ length?: number,
+ position?: number | null,
+ ): Promise<{ bytesWritten: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function __promisify__(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
+ }
+
+ /**
+ * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written.
+ * @param fd A file descriptor.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
+
+ /**
+ * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
+ * @param fd A file descriptor.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
+
+ /**
+ * Asynchronously reads data from the file referenced by the supplied file descriptor.
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: number | null,
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
+ ): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace read {
+ /**
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+ fd: number,
+ buffer: TBuffer,
+ offset: number,
+ length: number,
+ position: number | null
+ ): Promise<{ bytesRead: number, buffer: TBuffer }>;
+ }
+
+ export interface ReadSyncOptions {
+ /**
+ * @default 0
+ */
+ offset?: number;
+ /**
+ * @default `length of buffer`
+ */
+ length?: number;
+ /**
+ * @default null
+ */
+ position?: number | null;
+ }
+
+ /**
+ * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read.
+ * @param fd A file descriptor.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: number | null): number;
+
+ /**
+ * Similar to the above `fs.readSync` function, this version takes an optional `options` object.
+ * If no `options` object is specified, it will default with the above values.
+ */
+ export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFile(
+ path: PathLike | number,
+ options: BaseEncodingOptions & { flag?: string; } | string | undefined | null,
+ callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void,
+ ): void;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ */
+ export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace readFile {
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise<Buffer>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | string): Promise<string>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function __promisify__(path: PathLike | number, options?: BaseEncodingOptions & { flag?: string; } | string | null): Promise<string | Buffer>;
+ }
+
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer;
+
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | BufferEncoding): string;
+
+ /**
+ * Synchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ export function readFileSync(path: PathLike | number, options?: BaseEncodingOptions & { flag?: string; } | BufferEncoding | null): string | Buffer;
+
+ export type WriteFileOptions = BaseEncodingOptions & { mode?: Mode; flag?: string; } | string | null;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ export function writeFile(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function writeFile(path: PathLike | number, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace writeFile {
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function __promisify__(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise<void>;
+ }
+
+ /**
+ * Synchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ export function writeFileSync(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
+
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ export function appendFile(file: PathLike | number, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
+
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ export function appendFile(file: PathLike | number, data: string | Uint8Array, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace appendFile {
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function __promisify__(file: PathLike | number, data: string | Uint8Array, options?: WriteFileOptions): Promise<void>;
+ }
+
+ /**
+ * Synchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ export function appendFileSync(file: PathLike | number, data: string | Uint8Array, options?: WriteFileOptions): void;
+
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
+ */
+ export function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void;
+
+ /**
+ * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void;
+
+ /**
+ * Stop watching for changes on `filename`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void;
+
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(
+ filename: PathLike,
+ options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null,
+ listener?: (event: "rename" | "change", filename: string) => void,
+ ): FSWatcher;
+
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(
+ filename: PathLike,
+ options: { encoding: "buffer", persistent?: boolean, recursive?: boolean; } | "buffer",
+ listener?: (event: "rename" | "change", filename: Buffer) => void
+ ): FSWatcher;
+
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `persistent` is not supplied, the default of `true` is used.
+ * If `recursive` is not supplied, the default of `false` is used.
+ */
+ export function watch(
+ filename: PathLike,
+ options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | string | null,
+ listener?: (event: "rename" | "change", filename: string | Buffer) => void,
+ ): FSWatcher;
+
+ /**
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function watch(filename: PathLike, listener?: (event: "rename" | "change", filename: string) => any): FSWatcher;
+
+ /**
+ * Asynchronously tests whether or not the given path exists by checking with the file system.
+ * @deprecated since v1.0.0 Use `fs.stat()` or `fs.access()` instead
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function exists(path: PathLike, callback: (exists: boolean) => void): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace exists {
+ /**
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike): Promise<boolean>;
+ }
+
+ /**
+ * Synchronously tests whether or not the given path exists by checking with the file system.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function existsSync(path: PathLike): boolean;
+
+ export namespace constants {
+ // File Access Constants
+
+ /** Constant for fs.access(). File is visible to the calling process. */
+ const F_OK: number;
+
+ /** Constant for fs.access(). File can be read by the calling process. */
+ const R_OK: number;
+
+ /** Constant for fs.access(). File can be written by the calling process. */
+ const W_OK: number;
+
+ /** Constant for fs.access(). File can be executed by the calling process. */
+ const X_OK: number;
+
+ // File Copy Constants
+
+ /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
+ const COPYFILE_EXCL: number;
+
+ /**
+ * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
+ */
+ const COPYFILE_FICLONE: number;
+
+ /**
+ * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
+ * If the underlying platform does not support copy-on-write, then the operation will fail with an error.
+ */
+ const COPYFILE_FICLONE_FORCE: number;
+
+ // File Open Constants
+
+ /** Constant for fs.open(). Flag indicating to open a file for read-only access. */
+ const O_RDONLY: number;
+
+ /** Constant for fs.open(). Flag indicating to open a file for write-only access. */
+ const O_WRONLY: number;
+
+ /** Constant for fs.open(). Flag indicating to open a file for read-write access. */
+ const O_RDWR: number;
+
+ /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
+ const O_CREAT: number;
+
+ /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
+ const O_EXCL: number;
+
+ /**
+ * Constant for fs.open(). Flag indicating that if path identifies a terminal device,
+ * opening the path shall not cause that terminal to become the controlling terminal for the process
+ * (if the process does not already have one).
+ */
+ const O_NOCTTY: number;
+
+ /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
+ const O_TRUNC: number;
+
+ /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
+ const O_APPEND: number;
+
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
+ const O_DIRECTORY: number;
+
+ /**
+ * constant for fs.open().
+ * Flag indicating reading accesses to the file system will no longer result in
+ * an update to the atime information associated with the file.
+ * This flag is available on Linux operating systems only.
+ */
+ const O_NOATIME: number;
+
+ /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
+ const O_NOFOLLOW: number;
+
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
+ const O_SYNC: number;
+
+ /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
+ const O_DSYNC: number;
+
+ /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
+ const O_SYMLINK: number;
+
+ /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
+ const O_DIRECT: number;
+
+ /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
+ const O_NONBLOCK: number;
+
+ // File Type Constants
+
+ /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
+ const S_IFMT: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
+ const S_IFREG: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
+ const S_IFDIR: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
+ const S_IFCHR: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
+ const S_IFBLK: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
+ const S_IFIFO: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
+ const S_IFLNK: number;
+
+ /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
+ const S_IFSOCK: number;
+
+ // File Mode Constants
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
+ const S_IRWXU: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
+ const S_IRUSR: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
+ const S_IWUSR: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
+ const S_IXUSR: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
+ const S_IRWXG: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
+ const S_IRGRP: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
+ const S_IWGRP: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
+ const S_IXGRP: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
+ const S_IRWXO: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
+ const S_IROTH: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
+ const S_IWOTH: number;
+
+ /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
+ const S_IXOTH: number;
+
+ /**
+ * When set, a memory file mapping is used to access the file. This flag
+ * is available on Windows operating systems only. On other operating systems,
+ * this flag is ignored.
+ */
+ const UV_FS_O_FILEMAP: number;
+ }
+
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
+
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function access(path: PathLike, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace access {
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function __promisify__(path: PathLike, mode?: number): Promise<void>;
+ }
+
+ /**
+ * Synchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function accessSync(path: PathLike, mode?: number): void;
+
+ /**
+ * Returns a new `ReadStream` object.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function createReadStream(path: PathLike, options?: string | {
+ flags?: string;
+ encoding?: BufferEncoding;
+ fd?: number;
+ mode?: number;
+ autoClose?: boolean;
+ /**
+ * @default false
+ */
+ emitClose?: boolean;
+ start?: number;
+ end?: number;
+ highWaterMark?: number;
+ }): ReadStream;
+
+ /**
+ * Returns a new `WriteStream` object.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ export function createWriteStream(path: PathLike, options?: string | {
+ flags?: string;
+ encoding?: BufferEncoding;
+ fd?: number;
+ mode?: number;
+ autoClose?: boolean;
+ emitClose?: boolean;
+ start?: number;
+ highWaterMark?: number;
+ }): WriteStream;
+
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ export function fdatasync(fd: number, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace fdatasync {
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ function __promisify__(fd: number): Promise<void>;
+ }
+
+ /**
+ * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param fd A file descriptor.
+ */
+ export function fdatasyncSync(fd: number): void;
+
+ /**
+ * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
+ * No arguments other than a possible exception are given to the callback function.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ */
+ export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
+ /**
+ * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
+ * No arguments other than a possible exception are given to the callback function.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
+ */
+ export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: NoParamCallback): void;
+
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
+ export namespace copyFile {
+ /**
+ * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
+ * No arguments other than a possible exception are given to the callback function.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ * @param flags An optional integer that specifies the behavior of the copy operation.
+ * The only supported flag is fs.constants.COPYFILE_EXCL,
+ * which causes the copy operation to fail if dest already exists.
+ */
+ function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise<void>;
+ }
+
+ /**
+ * Synchronously copies src to dest. By default, dest is overwritten if it already exists.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ * @param flags An optional integer that specifies the behavior of the copy operation.
+ * The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
+ */
+ export function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void;
+
+ /**
+ * Write an array of ArrayBufferViews to the file specified by fd using writev().
+ * position is the offset from the beginning of the file where this data should be written.
+ * It is unsafe to use fs.writev() multiple times on the same file without waiting for the callback. For this scenario, use fs.createWriteStream().
+ * On Linux, positional writes don't work when the file is opened in append mode.
+ * The kernel ignores the position argument and always appends the data to the end of the file.
+ */
+ export function writev(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export function writev(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+
+ export interface WriteVResult {
+ bytesWritten: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+
+ export namespace writev {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+ }
+
+ /**
+ * See `writev`.
+ */
+ export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+
+ export function readv(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+ export function readv(
+ fd: number,
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
+ position: number,
+ cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
+ ): void;
+
+ export interface ReadVResult {
+ bytesRead: number;
+ buffers: NodeJS.ArrayBufferView[];
+ }
+
+ export namespace readv {
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+ }
+
+ /**
+ * See `readv`.
+ */
+ export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
+
+ export interface OpenDirOptions {
+ encoding?: BufferEncoding;
+ /**
+ * Number of directory entries that are buffered
+ * internally when reading from the directory. Higher values lead to better
+ * performance but higher memory usage.
+ * @default 32
+ */
+ bufferSize?: number;
+ }
+
+ export function opendirSync(path: string, options?: OpenDirOptions): Dir;
+
+ export function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+ export function opendir(path: string, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+
+ export namespace opendir {
+ function __promisify__(path: string, options?: OpenDirOptions): Promise<Dir>;
+ }
+
+ export interface BigIntStats extends StatsBase<bigint> {
+ }
+
+ export class BigIntStats {
+ atimeNs: bigint;
+ mtimeNs: bigint;
+ ctimeNs: bigint;
+ birthtimeNs: bigint;
+ }
+
+ export interface BigIntOptions {
+ bigint: true;
+ }
+
+ export interface StatOptions {
+ bigint?: boolean;
+ }
+}
diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts
new file mode 100644
index 0000000..8d12c89
--- /dev/null
+++ b/node_modules/@types/node/fs/promises.d.ts
@@ -0,0 +1,561 @@
+declare module 'fs/promises' {
+ export * from 'node:fs/promises';
+}
+
+declare module 'node:fs/promises' {
+ import {
+ Stats,
+ BigIntStats,
+ StatOptions,
+ WriteVResult,
+ ReadVResult,
+ PathLike,
+ RmDirOptions,
+ RmOptions,
+ MakeDirectoryOptions,
+ Dirent,
+ OpenDirOptions,
+ Dir,
+ BaseEncodingOptions,
+ BufferEncodingOption,
+ OpenMode,
+ Mode,
+ } from 'node:fs';
+
+ interface FileHandle {
+ /**
+ * Gets the file descriptor for this file handle.
+ */
+ readonly fd: number;
+
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for appending.
+ * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ appendFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
+
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ */
+ chown(uid: number, gid: number): Promise<void>;
+
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ chmod(mode: Mode): Promise<void>;
+
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ */
+ datasync(): Promise<void>;
+
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ */
+ sync(): Promise<void>;
+
+ /**
+ * Asynchronously reads data from the file.
+ * The `FileHandle` must have been opened for reading.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+ */
+ read<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(options?: { encoding?: null, flag?: OpenMode } | null): Promise<Buffer>;
+
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(options: { encoding: BufferEncoding, flag?: OpenMode } | BufferEncoding): Promise<string>;
+
+ /**
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for reading.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ readFile(options?: BaseEncodingOptions & { flag?: OpenMode } | BufferEncoding | null): Promise<string | Buffer>;
+
+ /**
+ * Asynchronous fstat(2) - Get file status.
+ */
+ stat(opts?: StatOptions & { bigint?: false }): Promise<Stats>;
+ stat(opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
+ stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
+
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param len If not specified, defaults to `0`.
+ */
+ truncate(len?: number): Promise<void>;
+
+ /**
+ * Asynchronously change file timestamps of the file.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+
+ /**
+ * Asynchronously writes `buffer` to the file.
+ * The `FileHandle` must have been opened for writing.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ write<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously writes `string` to the file.
+ * The `FileHandle` must have been opened for writing.
+ * It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise`
+ * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ write(data: string | Uint8Array, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically.
+ * The `FileHandle` must have been opened for writing.
+ * It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
+ * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ writeFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
+
+ /**
+ * See `fs.writev` promisified version.
+ */
+ writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
+
+ /**
+ * See `fs.readv` promisified version.
+ */
+ readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
+
+ /**
+ * Asynchronous close(2) - close a `FileHandle`.
+ */
+ close(): Promise<void>;
+ }
+
+ /**
+ * Asynchronously tests a user's permissions for the file specified by path.
+ * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function access(path: PathLike, mode?: number): Promise<void>;
+
+ /**
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists.
+ * Node.js makes no guarantees about the atomicity of the copy operation.
+ * If an error occurs after the destination file has been opened for writing, Node.js will attempt
+ * to remove the destination.
+ * @param src A path to the source file.
+ * @param dest A path to the destination file.
+ * @param flags An optional integer that specifies the behavior of the copy operation. The only
+ * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if
+ * `dest` already exists.
+ */
+ function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise<void>;
+
+ /**
+ * Asynchronous open(2) - open and possibly create a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not
+ * supplied, defaults to `0o666`.
+ */
+ function open(path: PathLike, flags: string | number, mode?: Mode): Promise<FileHandle>;
+
+ /**
+ * Asynchronously reads data from the file referenced by the supplied `FileHandle`.
+ * @param handle A `FileHandle`.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The offset in the buffer at which to start writing.
+ * @param length The number of bytes to read.
+ * @param position The offset from the beginning of the file from which data should be read. If
+ * `null`, data will be read from the current position.
+ */
+ function read<TBuffer extends Uint8Array>(
+ handle: FileHandle,
+ buffer: TBuffer,
+ offset?: number | null,
+ length?: number | null,
+ position?: number | null,
+ ): Promise<{ bytesRead: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`.
+ * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
+ * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
+ * @param handle A `FileHandle`.
+ * @param buffer The buffer that the data will be written to.
+ * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+ * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ */
+ function write<TBuffer extends Uint8Array>(
+ handle: FileHandle,
+ buffer: TBuffer,
+ offset?: number | null,
+ length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
+
+ /**
+ * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`.
+ * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
+ * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
+ * @param handle A `FileHandle`.
+ * @param string A string to write.
+ * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+ * @param encoding The expected string encoding.
+ */
+ function write(handle: FileHandle, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
+
+ /**
+ * Asynchronous rename(2) - Change the name or location of a file or directory.
+ * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ */
+ function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
+
+ /**
+ * Asynchronous truncate(2) - Truncate a file to a specified length.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param len If not specified, defaults to `0`.
+ */
+ function truncate(path: PathLike, len?: number): Promise<void>;
+
+ /**
+ * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+ * @param handle A `FileHandle`.
+ * @param len If not specified, defaults to `0`.
+ */
+ function ftruncate(handle: FileHandle, len?: number): Promise<void>;
+
+ /**
+ * Asynchronous rmdir(2) - delete a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
+
+ /**
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
+ */
+ function rm(path: PathLike, options?: RmOptions): Promise<void>;
+
+ /**
+ * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+ * @param handle A `FileHandle`.
+ */
+ function fdatasync(handle: FileHandle): Promise<void>;
+
+ /**
+ * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+ * @param handle A `FileHandle`.
+ */
+ function fsync(handle: FileHandle): Promise<void>;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise<string | undefined>;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): Promise<void>;
+
+ /**
+ * Asynchronous mkdir(2) - create a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+ */
+ function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise<Buffer[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[] | Buffer[]>;
+
+ /**
+ * Asynchronous readdir(3) - read a directory.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+ */
+ function readdir(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Promise<Dirent[]>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+
+ /**
+ * Asynchronous readlink(2) - read value of a symbolic link.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function readlink(path: PathLike, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
+
+ /**
+ * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+ * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+ * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+ * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+ * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+ */
+ function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+
+ /**
+ * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function lstat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise<Stats>;
+ function lstat(path: PathLike, opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
+ function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+
+ /**
+ * Asynchronous stat(2) - Get file status.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function stat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise<Stats>;
+ function stat(path: PathLike, opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
+ function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+
+ /**
+ * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+ * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
+
+ /**
+ * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function unlink(path: PathLike): Promise<void>;
+
+ /**
+ * Asynchronous fchmod(2) - Change permissions of a file.
+ * @param handle A `FileHandle`.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function fchmod(handle: FileHandle, mode: Mode): Promise<void>;
+
+ /**
+ * Asynchronous chmod(2) - Change permissions of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function chmod(path: PathLike, mode: Mode): Promise<void>;
+
+ /**
+ * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+ */
+ function lchmod(path: PathLike, mode: Mode): Promise<void>;
+
+ /**
+ * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
+
+ /**
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
+ * with the difference that if the path refers to a symbolic link, then the link is not
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+
+ /**
+ * Asynchronous fchown(2) - Change ownership of a file.
+ * @param handle A `FileHandle`.
+ */
+ function fchown(handle: FileHandle, uid: number, gid: number): Promise<void>;
+
+ /**
+ * Asynchronous chown(2) - Change ownership of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ */
+ function chown(path: PathLike, uid: number, gid: number): Promise<void>;
+
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied path.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+
+ /**
+ * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`.
+ * @param handle A `FileHandle`.
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+ */
+ function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
+
+ /**
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
+
+ /**
+ * Asynchronously creates a unique temporary directory.
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+ */
+ function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function writeFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
+
+ /**
+ * Asynchronously append data to a file, creating the file if it does not exist.
+ * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * URL support is _experimental_.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'a'` is used.
+ */
+ function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: OpenMode } | null): Promise<Buffer>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: OpenMode } | BufferEncoding): Promise<string>;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function readFile(path: PathLike | FileHandle, options?: BaseEncodingOptions & { flag?: OpenMode } | BufferEncoding | null): Promise<string | Buffer>;
+
+ function opendir(path: string, options?: OpenDirOptions): Promise<Dir>;
+}
diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts
new file mode 100644
index 0000000..25372b9
--- /dev/null
+++ b/node_modules/@types/node/globals.d.ts
@@ -0,0 +1,614 @@
+// Declare "static" methods in Error
+interface ErrorConstructor {
+ /** Create .stack property on a target object */
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
+
+ /**
+ * Optional override for formatting stack traces
+ *
+ * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces
+ */
+ prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
+
+ stackTraceLimit: number;
+}
+
+// Node.js ESNEXT support
+interface String {
+ /** Removes whitespace from the left end of a string. */
+ trimLeft(): string;
+ /** Removes whitespace from the right end of a string. */
+ trimRight(): string;
+
+ /** Returns a copy with leading whitespace removed. */
+ trimStart(): string;
+ /** Returns a copy with trailing whitespace removed. */
+ trimEnd(): string;
+}
+
+interface ImportMeta {
+ url: string;
+}
+
+/*-----------------------------------------------*
+ * *
+ * GLOBAL *
+ * *
+ ------------------------------------------------*/
+
+// For backwards compability
+interface NodeRequire extends NodeJS.Require {}
+interface RequireResolve extends NodeJS.RequireResolve {}
+interface NodeModule extends NodeJS.Module {}
+
+declare var process: NodeJS.Process;
+declare var console: Console;
+
+declare var __filename: string;
+declare var __dirname: string;
+
+declare function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
+declare namespace setTimeout {
+ function __promisify__(ms: number): Promise<void>;
+ function __promisify__<T>(ms: number, value: T): Promise<T>;
+}
+declare function clearTimeout(timeoutId: NodeJS.Timeout): void;
+declare function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
+declare function clearInterval(intervalId: NodeJS.Timeout): void;
+declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
+declare namespace setImmediate {
+ function __promisify__(): Promise<void>;
+ function __promisify__<T>(value: T): Promise<T>;
+}
+declare function clearImmediate(immediateId: NodeJS.Immediate): void;
+
+declare function queueMicrotask(callback: () => void): void;
+
+declare var require: NodeRequire;
+declare var module: NodeModule;
+
+// Same as module.exports
+declare var exports: any;
+
+// Buffer class
+type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
+
+type WithImplicitCoercion<T> = T | { valueOf(): T };
+
+/**
+ * Raw data is stored in instances of the Buffer class.
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ */
+declare class Buffer extends Uint8Array {
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+ */
+ constructor(str: string, encoding?: BufferEncoding);
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+ */
+ constructor(size: number);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ constructor(array: Uint8Array);
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}/{SharedArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+ */
+ constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+ */
+ constructor(array: ReadonlyArray<any>);
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
+ */
+ constructor(buffer: Buffer);
+ /**
+ * When passed a reference to the .buffer property of a TypedArray instance,
+ * the newly created Buffer will share the same allocated memory as the TypedArray.
+ * The optional {byteOffset} and {length} arguments specify a memory range
+ * within the {arrayBuffer} that will be shared by the Buffer.
+ *
+ * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
+ */
+ static from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param data data to create a new Buffer
+ */
+ static from(data: Uint8Array | ReadonlyArray<number>): Buffer;
+ static from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ */
+ static from(str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: 'string'): string }, encoding?: BufferEncoding): Buffer;
+ /**
+ * Creates a new Buffer using the passed {data}
+ * @param values to create a new Buffer
+ */
+ static of(...items: number[]): Buffer;
+ /**
+ * Returns true if {obj} is a Buffer
+ *
+ * @param obj object to test.
+ */
+ static isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns true if {encoding} is a valid encoding argument.
+ * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ *
+ * @param encoding string to test.
+ */
+ static isEncoding(encoding: string): encoding is BufferEncoding;
+ /**
+ * Gives the actual byte length of a string. encoding defaults to 'utf8'.
+ * This is not the same as String.prototype.length since that returns the number of characters in a string.
+ *
+ * @param string string to test.
+ * @param encoding encoding used to evaluate (defaults to 'utf8')
+ */
+ static byteLength(
+ string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
+ encoding?: BufferEncoding
+ ): number;
+ /**
+ * Returns a buffer which is the result of concatenating all the buffers in the list together.
+ *
+ * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
+ * If the list has exactly one item, then the first item of the list is returned.
+ * If the list has more than one item, then a new Buffer is created.
+ *
+ * @param list An array of Buffer objects to concatenate
+ * @param totalLength Total length of the buffers when concatenated.
+ * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
+ */
+ static concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
+ /**
+ * The same as buf1.compare(buf2).
+ */
+ static compare(buf1: Uint8Array, buf2: Uint8Array): number;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
+ * If parameter is omitted, buffer will be filled with zeros.
+ * @param encoding encoding used for call to buf.fill while initalizing
+ */
+ static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafeSlow(size: number): Buffer;
+ /**
+ * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
+ */
+ static poolSize: number;
+
+ write(string: string, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, encoding?: BufferEncoding): number;
+ write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
+ toString(encoding?: BufferEncoding, start?: number, end?: number): string;
+ toJSON(): { type: 'Buffer'; data: number[] };
+ equals(otherBuffer: Uint8Array): boolean;
+ compare(
+ otherBuffer: Uint8Array,
+ targetStart?: number,
+ targetEnd?: number,
+ sourceStart?: number,
+ sourceEnd?: number
+ ): number;
+ copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ /**
+ * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
+ *
+ * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory.
+ *
+ * @param begin Where the new `Buffer` will start. Default: `0`.
+ * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
+ */
+ slice(begin?: number, end?: number): Buffer;
+ /**
+ * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
+ *
+ * This method is compatible with `Uint8Array#subarray()`.
+ *
+ * @param begin Where the new `Buffer` will start. Default: `0`.
+ * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
+ */
+ subarray(begin?: number, end?: number): Buffer;
+ writeBigInt64BE(value: bigint, offset?: number): number;
+ writeBigInt64LE(value: bigint, offset?: number): number;
+ writeBigUInt64BE(value: bigint, offset?: number): number;
+ writeBigUInt64LE(value: bigint, offset?: number): number;
+ writeUIntLE(value: number, offset: number, byteLength: number): number;
+ writeUIntBE(value: number, offset: number, byteLength: number): number;
+ writeIntLE(value: number, offset: number, byteLength: number): number;
+ writeIntBE(value: number, offset: number, byteLength: number): number;
+ readBigUInt64BE(offset?: number): bigint;
+ readBigUInt64LE(offset?: number): bigint;
+ readBigInt64BE(offset?: number): bigint;
+ readBigInt64LE(offset?: number): bigint;
+ readUIntLE(offset: number, byteLength: number): number;
+ readUIntBE(offset: number, byteLength: number): number;
+ readIntLE(offset: number, byteLength: number): number;
+ readIntBE(offset: number, byteLength: number): number;
+ readUInt8(offset?: number): number;
+ readUInt16LE(offset?: number): number;
+ readUInt16BE(offset?: number): number;
+ readUInt32LE(offset?: number): number;
+ readUInt32BE(offset?: number): number;
+ readInt8(offset?: number): number;
+ readInt16LE(offset?: number): number;
+ readInt16BE(offset?: number): number;
+ readInt32LE(offset?: number): number;
+ readInt32BE(offset?: number): number;
+ readFloatLE(offset?: number): number;
+ readFloatBE(offset?: number): number;
+ readDoubleLE(offset?: number): number;
+ readDoubleBE(offset?: number): number;
+ reverse(): this;
+ swap16(): Buffer;
+ swap32(): Buffer;
+ swap64(): Buffer;
+ writeUInt8(value: number, offset?: number): number;
+ writeUInt16LE(value: number, offset?: number): number;
+ writeUInt16BE(value: number, offset?: number): number;
+ writeUInt32LE(value: number, offset?: number): number;
+ writeUInt32BE(value: number, offset?: number): number;
+ writeInt8(value: number, offset?: number): number;
+ writeInt16LE(value: number, offset?: number): number;
+ writeInt16BE(value: number, offset?: number): number;
+ writeInt32LE(value: number, offset?: number): number;
+ writeInt32BE(value: number, offset?: number): number;
+ writeFloatLE(value: number, offset?: number): number;
+ writeFloatBE(value: number, offset?: number): number;
+ writeDoubleLE(value: number, offset?: number): number;
+ writeDoubleBE(value: number, offset?: number): number;
+
+ fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
+
+ indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+ entries(): IterableIterator<[number, number]>;
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
+ keys(): IterableIterator<number>;
+ values(): IterableIterator<number>;
+}
+
+/*----------------------------------------------*
+* *
+* GLOBAL INTERFACES *
+* *
+*-----------------------------------------------*/
+declare namespace NodeJS {
+ interface InspectOptions {
+ /**
+ * If set to `true`, getters are going to be
+ * inspected as well. If set to `'get'` only getters without setter are going
+ * to be inspected. If set to `'set'` only getters having a corresponding
+ * setter are going to be inspected. This might cause side effects depending on
+ * the getter function.
+ * @default `false`
+ */
+ getters?: 'get' | 'set' | boolean;
+ showHidden?: boolean;
+ /**
+ * @default 2
+ */
+ depth?: number | null;
+ colors?: boolean;
+ customInspect?: boolean;
+ showProxy?: boolean;
+ maxArrayLength?: number | null;
+ /**
+ * Specifies the maximum number of characters to
+ * include when formatting. Set to `null` or `Infinity` to show all elements.
+ * Set to `0` or negative to show no characters.
+ * @default Infinity
+ */
+ maxStringLength?: number | null;
+ breakLength?: number;
+ /**
+ * Setting this to `false` causes each object key
+ * to be displayed on a new line. It will also add new lines to text that is
+ * longer than `breakLength`. If set to a number, the most `n` inner elements
+ * are united on a single line as long as all properties fit into
+ * `breakLength`. Short array elements are also grouped together. Note that no
+ * text will be reduced below 16 characters, no matter the `breakLength` size.
+ * For more information, see the example below.
+ * @default `true`
+ */
+ compact?: boolean | number;
+ sorted?: boolean | ((a: string, b: string) => number);
+ }
+
+ interface CallSite {
+ /**
+ * Value of "this"
+ */
+ getThis(): any;
+
+ /**
+ * Type of "this" as a string.
+ * This is the name of the function stored in the constructor field of
+ * "this", if available. Otherwise the object's [[Class]] internal
+ * property.
+ */
+ getTypeName(): string | null;
+
+ /**
+ * Current function
+ */
+ getFunction(): Function | undefined;
+
+ /**
+ * Name of the current function, typically its name property.
+ * If a name property is not available an attempt will be made to try
+ * to infer a name from the function's context.
+ */
+ getFunctionName(): string | null;
+
+ /**
+ * Name of the property [of "this" or one of its prototypes] that holds
+ * the current function
+ */
+ getMethodName(): string | null;
+
+ /**
+ * Name of the script [if this function was defined in a script]
+ */
+ getFileName(): string | null;
+
+ /**
+ * Current line number [if this function was defined in a script]
+ */
+ getLineNumber(): number | null;
+
+ /**
+ * Current column number [if this function was defined in a script]
+ */
+ getColumnNumber(): number | null;
+
+ /**
+ * A call site object representing the location where eval was called
+ * [if this function was created using a call to eval]
+ */
+ getEvalOrigin(): string | undefined;
+
+ /**
+ * Is this a toplevel invocation, that is, is "this" the global object?
+ */
+ isToplevel(): boolean;
+
+ /**
+ * Does this call take place in code defined by a call to eval?
+ */
+ isEval(): boolean;
+
+ /**
+ * Is this call in native V8 code?
+ */
+ isNative(): boolean;
+
+ /**
+ * Is this a constructor call?
+ */
+ isConstructor(): boolean;
+ }
+
+ interface ErrnoException extends Error {
+ errno?: number;
+ code?: string;
+ path?: string;
+ syscall?: string;
+ stack?: string;
+ }
+
+ interface ReadableStream extends EventEmitter {
+ readable: boolean;
+ read(size?: number): string | Buffer;
+ setEncoding(encoding: BufferEncoding): this;
+ pause(): this;
+ resume(): this;
+ isPaused(): boolean;
+ pipe<T extends WritableStream>(destination: T, options?: { end?: boolean; }): T;
+ unpipe(destination?: WritableStream): this;
+ unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
+ wrap(oldStream: ReadableStream): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
+ }
+
+ interface WritableStream extends EventEmitter {
+ writable: boolean;
+ write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
+ write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
+ end(cb?: () => void): void;
+ end(data: string | Uint8Array, cb?: () => void): void;
+ end(str: string, encoding?: BufferEncoding, cb?: () => void): void;
+ }
+
+ interface ReadWriteStream extends ReadableStream, WritableStream { }
+
+ interface Global {
+ Array: typeof Array;
+ ArrayBuffer: typeof ArrayBuffer;
+ Boolean: typeof Boolean;
+ Buffer: typeof Buffer;
+ DataView: typeof DataView;
+ Date: typeof Date;
+ Error: typeof Error;
+ EvalError: typeof EvalError;
+ Float32Array: typeof Float32Array;
+ Float64Array: typeof Float64Array;
+ Function: typeof Function;
+ Infinity: typeof Infinity;
+ Int16Array: typeof Int16Array;
+ Int32Array: typeof Int32Array;
+ Int8Array: typeof Int8Array;
+ Intl: typeof Intl;
+ JSON: typeof JSON;
+ Map: MapConstructor;
+ Math: typeof Math;
+ NaN: typeof NaN;
+ Number: typeof Number;
+ Object: typeof Object;
+ Promise: typeof Promise;
+ RangeError: typeof RangeError;
+ ReferenceError: typeof ReferenceError;
+ RegExp: typeof RegExp;
+ Set: SetConstructor;
+ String: typeof String;
+ Symbol: Function;
+ SyntaxError: typeof SyntaxError;
+ TypeError: typeof TypeError;
+ URIError: typeof URIError;
+ Uint16Array: typeof Uint16Array;
+ Uint32Array: typeof Uint32Array;
+ Uint8Array: typeof Uint8Array;
+ Uint8ClampedArray: typeof Uint8ClampedArray;
+ WeakMap: WeakMapConstructor;
+ WeakSet: WeakSetConstructor;
+ clearImmediate: (immediateId: Immediate) => void;
+ clearInterval: (intervalId: Timeout) => void;
+ clearTimeout: (timeoutId: Timeout) => void;
+ decodeURI: typeof decodeURI;
+ decodeURIComponent: typeof decodeURIComponent;
+ encodeURI: typeof encodeURI;
+ encodeURIComponent: typeof encodeURIComponent;
+ escape: (str: string) => string;
+ eval: typeof eval;
+ global: Global;
+ isFinite: typeof isFinite;
+ isNaN: typeof isNaN;
+ parseFloat: typeof parseFloat;
+ parseInt: typeof parseInt;
+ setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate;
+ setInterval: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
+ setTimeout: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
+ queueMicrotask: typeof queueMicrotask;
+ undefined: typeof undefined;
+ unescape: (str: string) => string;
+ gc: () => void;
+ v8debug?: any;
+ }
+
+ interface RefCounted {
+ ref(): this;
+ unref(): this;
+ }
+
+ // compatibility with older typings
+ interface Timer extends RefCounted {
+ hasRef(): boolean;
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ }
+
+ interface Immediate extends RefCounted {
+ hasRef(): boolean;
+ _onImmediate: Function; // to distinguish it from the Timeout class
+ }
+
+ interface Timeout extends Timer {
+ hasRef(): boolean;
+ refresh(): this;
+ [Symbol.toPrimitive](): number;
+ }
+
+ type TypedArray =
+ | Uint8Array
+ | Uint8ClampedArray
+ | Uint16Array
+ | Uint32Array
+ | Int8Array
+ | Int16Array
+ | Int32Array
+ | BigUint64Array
+ | BigInt64Array
+ | Float32Array
+ | Float64Array;
+ type ArrayBufferView = TypedArray | DataView;
+
+ interface Require {
+ (id: string): any;
+ resolve: RequireResolve;
+ cache: Dict<NodeModule>;
+ /**
+ * @deprecated
+ */
+ extensions: RequireExtensions;
+ main: Module | undefined;
+ }
+
+ interface RequireResolve {
+ (id: string, options?: { paths?: string[]; }): string;
+ paths(request: string): string[] | null;
+ }
+
+ interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
+ '.js': (m: Module, filename: string) => any;
+ '.json': (m: Module, filename: string) => any;
+ '.node': (m: Module, filename: string) => any;
+ }
+ interface Module {
+ exports: any;
+ require: Require;
+ id: string;
+ filename: string;
+ loaded: boolean;
+ /** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */
+ parent: Module | null | undefined;
+ children: Module[];
+ /**
+ * @since 11.14.0
+ *
+ * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
+ */
+ path: string;
+ paths: string[];
+ }
+
+ interface Dict<T> {
+ [key: string]: T | undefined;
+ }
+
+ interface ReadOnlyDict<T> {
+ readonly [key: string]: T | undefined;
+ }
+}
diff --git a/node_modules/@types/node/globals.global.d.ts b/node_modules/@types/node/globals.global.d.ts
new file mode 100644
index 0000000..d66acba
--- /dev/null
+++ b/node_modules/@types/node/globals.global.d.ts
@@ -0,0 +1 @@
+declare var global: NodeJS.Global & typeof globalThis;
diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts
new file mode 100644
index 0000000..7e24449
--- /dev/null
+++ b/node_modules/@types/node/http.d.ts
@@ -0,0 +1,427 @@
+declare module 'node:http' {
+ export * from 'http';
+}
+
+declare module 'http' {
+ import * as stream from 'node:stream';
+ import { URL } from 'node:url';
+ import { Socket, Server as NetServer } from 'node:net';
+
+ // incoming headers will never contain number
+ interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
+ 'accept'?: string;
+ 'accept-language'?: string;
+ 'accept-patch'?: string;
+ 'accept-ranges'?: string;
+ 'access-control-allow-credentials'?: string;
+ 'access-control-allow-headers'?: string;
+ 'access-control-allow-methods'?: string;
+ 'access-control-allow-origin'?: string;
+ 'access-control-expose-headers'?: string;
+ 'access-control-max-age'?: string;
+ 'access-control-request-headers'?: string;
+ 'access-control-request-method'?: string;
+ 'age'?: string;
+ 'allow'?: string;
+ 'alt-svc'?: string;
+ 'authorization'?: string;
+ 'cache-control'?: string;
+ 'connection'?: string;
+ 'content-disposition'?: string;
+ 'content-encoding'?: string;
+ 'content-language'?: string;
+ 'content-length'?: string;
+ 'content-location'?: string;
+ 'content-range'?: string;
+ 'content-type'?: string;
+ 'cookie'?: string;
+ 'date'?: string;
+ 'expect'?: string;
+ 'expires'?: string;
+ 'forwarded'?: string;
+ 'from'?: string;
+ 'host'?: string;
+ 'if-match'?: string;
+ 'if-modified-since'?: string;
+ 'if-none-match'?: string;
+ 'if-unmodified-since'?: string;
+ 'last-modified'?: string;
+ 'location'?: string;
+ 'origin'?: string;
+ 'pragma'?: string;
+ 'proxy-authenticate'?: string;
+ 'proxy-authorization'?: string;
+ 'public-key-pins'?: string;
+ 'range'?: string;
+ 'referer'?: string;
+ 'retry-after'?: string;
+ 'sec-websocket-accept'?: string;
+ 'sec-websocket-extensions'?: string;
+ 'sec-websocket-key'?: string;
+ 'sec-websocket-protocol'?: string;
+ 'sec-websocket-version'?: string;
+ 'set-cookie'?: string[];
+ 'strict-transport-security'?: string;
+ 'tk'?: string;
+ 'trailer'?: string;
+ 'transfer-encoding'?: string;
+ 'upgrade'?: string;
+ 'user-agent'?: string;
+ 'vary'?: string;
+ 'via'?: string;
+ 'warning'?: string;
+ 'www-authenticate'?: string;
+ }
+
+ // outgoing headers allows numbers (as they are converted internally to strings)
+ type OutgoingHttpHeader = number | string | string[];
+
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
+ }
+
+ interface ClientRequestArgs {
+ protocol?: string | null;
+ host?: string | null;
+ hostname?: string | null;
+ family?: number;
+ port?: number | string | null;
+ defaultPort?: number | string;
+ localAddress?: string;
+ socketPath?: string;
+ /**
+ * @default 8192
+ */
+ maxHeaderSize?: number;
+ method?: string;
+ path?: string | null;
+ headers?: OutgoingHttpHeaders;
+ auth?: string | null;
+ agent?: Agent | boolean;
+ _defaultAgent?: Agent;
+ timeout?: number;
+ setHost?: boolean;
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
+ createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket;
+ }
+
+ interface ServerOptions {
+ IncomingMessage?: typeof IncomingMessage;
+ ServerResponse?: typeof ServerResponse;
+ /**
+ * Optionally overrides the value of
+ * [`--max-http-header-size`][] for requests received by this server, i.e.
+ * the maximum length of request headers in bytes.
+ * @default 8192
+ */
+ maxHeaderSize?: number;
+ /**
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when true.
+ * Using the insecure parser should be avoided.
+ * See --insecure-http-parser for more information.
+ * @default false
+ */
+ insecureHTTPParser?: boolean;
+ }
+
+ type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
+
+ interface HttpBase {
+ setTimeout(msecs?: number, callback?: () => void): this;
+ setTimeout(callback: () => void): this;
+ /**
+ * Limits maximum incoming headers count. If set to 0, no limit will be applied.
+ * @default 2000
+ * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount}
+ */
+ maxHeadersCount: number | null;
+ timeout: number;
+ /**
+ * Limit the amount of time the parser will wait to receive the complete HTTP headers.
+ * @default 60000
+ * {@link https://nodejs.org/api/http.html#http_server_headerstimeout}
+ */
+ headersTimeout: number;
+ keepAliveTimeout: number;
+ /**
+ * Sets the timeout value in milliseconds for receiving the entire request from the client.
+ * @default 0
+ * {@link https://nodejs.org/api/http.html#http_server_requesttimeout}
+ */
+ requestTimeout: number;
+ }
+
+ interface Server extends HttpBase {}
+ class Server extends NetServer {
+ constructor(requestListener?: RequestListener);
+ constructor(options: ServerOptions, requestListener?: RequestListener);
+ }
+
+ // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js
+ class OutgoingMessage extends stream.Writable {
+ upgrading: boolean;
+ chunkedEncoding: boolean;
+ shouldKeepAlive: boolean;
+ useChunkedEncodingByDefault: boolean;
+ sendDate: boolean;
+ /**
+ * @deprecated Use `writableEnded` instead.
+ */
+ finished: boolean;
+ headersSent: boolean;
+ /**
+ * @deprecate Use `socket` instead.
+ */
+ connection: Socket | null;
+ socket: Socket | null;
+
+ constructor();
+
+ setTimeout(msecs: number, callback?: () => void): this;
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
+ getHeader(name: string): number | string | string[] | undefined;
+ getHeaders(): OutgoingHttpHeaders;
+ getHeaderNames(): string[];
+ hasHeader(name: string): boolean;
+ removeHeader(name: string): void;
+ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
+ flushHeaders(): void;
+ }
+
+ // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256
+ class ServerResponse extends OutgoingMessage {
+ statusCode: number;
+ statusMessage: string;
+
+ constructor(req: IncomingMessage);
+
+ assignSocket(socket: Socket): void;
+ detachSocket(socket: Socket): void;
+ // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53
+ // no args in writeContinue callback
+ writeContinue(callback?: () => void): void;
+ writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
+ writeProcessing(): void;
+ }
+
+ interface InformationEvent {
+ statusCode: number;
+ statusMessage: string;
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ headers: IncomingHttpHeaders;
+ rawHeaders: string[];
+ }
+
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
+ class ClientRequest extends OutgoingMessage {
+ aborted: boolean;
+ host: string;
+ protocol: string;
+
+ constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
+
+ method: string;
+ path: string;
+ /** @deprecated since v14.1.0 Use `request.destroy()` instead. */
+ abort(): void;
+ onSocket(socket: Socket): void;
+ setTimeout(timeout: number, callback?: () => void): this;
+ setNoDelay(noDelay?: boolean): void;
+ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+
+ addListener(event: 'abort', listener: () => void): this;
+ addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ addListener(event: 'continue', listener: () => void): this;
+ addListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ addListener(event: 'socket', listener: (socket: Socket) => void): this;
+ addListener(event: 'timeout', listener: () => void): this;
+ addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ addListener(event: 'close', listener: () => void): this;
+ addListener(event: 'drain', listener: () => void): this;
+ addListener(event: 'error', listener: (err: Error) => void): this;
+ addListener(event: 'finish', listener: () => void): this;
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ on(event: 'abort', listener: () => void): this;
+ on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'continue', listener: () => void): this;
+ on(event: 'information', listener: (info: InformationEvent) => void): this;
+ on(event: 'response', listener: (response: IncomingMessage) => void): this;
+ on(event: 'socket', listener: (socket: Socket) => void): this;
+ on(event: 'timeout', listener: () => void): this;
+ on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ on(event: 'close', listener: () => void): this;
+ on(event: 'drain', listener: () => void): this;
+ on(event: 'error', listener: (err: Error) => void): this;
+ on(event: 'finish', listener: () => void): this;
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: 'abort', listener: () => void): this;
+ once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'continue', listener: () => void): this;
+ once(event: 'information', listener: (info: InformationEvent) => void): this;
+ once(event: 'response', listener: (response: IncomingMessage) => void): this;
+ once(event: 'socket', listener: (socket: Socket) => void): this;
+ once(event: 'timeout', listener: () => void): this;
+ once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ once(event: 'close', listener: () => void): this;
+ once(event: 'drain', listener: () => void): this;
+ once(event: 'error', listener: (err: Error) => void): this;
+ once(event: 'finish', listener: () => void): this;
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: 'abort', listener: () => void): this;
+ prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependListener(event: 'continue', listener: () => void): this;
+ prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependListener(event: 'timeout', listener: () => void): this;
+ prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependListener(event: 'close', listener: () => void): this;
+ prependListener(event: 'drain', listener: () => void): this;
+ prependListener(event: 'error', listener: (err: Error) => void): this;
+ prependListener(event: 'finish', listener: () => void): this;
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: 'abort', listener: () => void): this;
+ prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependOnceListener(event: 'continue', listener: () => void): this;
+ prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
+ prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
+ prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
+ prependOnceListener(event: 'timeout', listener: () => void): this;
+ prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
+ prependOnceListener(event: 'close', listener: () => void): this;
+ prependOnceListener(event: 'drain', listener: () => void): this;
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
+ prependOnceListener(event: 'finish', listener: () => void): this;
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ class IncomingMessage extends stream.Readable {
+ constructor(socket: Socket);
+
+ aborted: boolean;
+ httpVersion: string;
+ httpVersionMajor: number;
+ httpVersionMinor: number;
+ complete: boolean;
+ /**
+ * @deprecated since v13.0.0 - Use `socket` instead.
+ */
+ connection: Socket;
+ socket: Socket;
+ headers: IncomingHttpHeaders;
+ rawHeaders: string[];
+ trailers: NodeJS.Dict<string>;
+ rawTrailers: string[];
+ setTimeout(msecs: number, callback?: () => void): this;
+ /**
+ * Only valid for request obtained from http.Server.
+ */
+ method?: string;
+ /**
+ * Only valid for request obtained from http.Server.
+ */
+ url?: string;
+ /**
+ * Only valid for response obtained from http.ClientRequest.
+ */
+ statusCode?: number;
+ /**
+ * Only valid for response obtained from http.ClientRequest.
+ */
+ statusMessage?: string;
+ destroy(error?: Error): void;
+ }
+
+ interface AgentOptions {
+ /**
+ * Keep sockets around in a pool to be used by other requests in the future. Default = false
+ */
+ keepAlive?: boolean;
+ /**
+ * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
+ * Only relevant if keepAlive is set to true.
+ */
+ keepAliveMsecs?: number;
+ /**
+ * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
+ */
+ maxSockets?: number;
+ /**
+ * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
+ */
+ maxTotalSockets?: number;
+ /**
+ * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
+ */
+ maxFreeSockets?: number;
+ /**
+ * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
+ */
+ timeout?: number;
+ /**
+ * Scheduling strategy to apply when picking the next free socket to use. Default: 'fifo'.
+ */
+ scheduling?: 'fifo' | 'lifo';
+ }
+
+ class Agent {
+ maxFreeSockets: number;
+ maxSockets: number;
+ maxTotalSockets: number;
+ readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
+ readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
+ readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
+
+ constructor(opts?: AgentOptions);
+
+ /**
+ * Destroy any sockets that are currently in use by the agent.
+ * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
+ * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
+ * sockets may hang open for quite a long time before the server terminates them.
+ */
+ destroy(): void;
+ }
+
+ const METHODS: string[];
+
+ const STATUS_CODES: {
+ [errorCode: number]: string | undefined;
+ [errorCode: string]: string | undefined;
+ };
+
+ function createServer(requestListener?: RequestListener): Server;
+ function createServer(options: ServerOptions, requestListener?: RequestListener): Server;
+
+ // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
+ // create interface RequestOptions would make the naming more clear to developers
+ interface RequestOptions extends ClientRequestArgs { }
+ function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+ let globalAgent: Agent;
+
+ /**
+ * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
+ * Defaults to 16KB. Configurable using the [`--max-http-header-size`][] CLI option.
+ */
+ const maxHeaderSize: number;
+}
diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts
new file mode 100644
index 0000000..25b144f
--- /dev/null
+++ b/node_modules/@types/node/http2.d.ts
@@ -0,0 +1,962 @@
+declare module 'node:http2' {
+ export * from 'http2';
+}
+
+declare module 'http2' {
+ import EventEmitter = require('node:events');
+ import * as fs from 'node:fs';
+ import * as net from 'node:net';
+ import * as stream from 'node:stream';
+ import * as tls from 'node:tls';
+ import * as url from 'node:url';
+
+ import {
+ IncomingHttpHeaders as Http1IncomingHttpHeaders,
+ OutgoingHttpHeaders,
+ IncomingMessage,
+ ServerResponse,
+ } from 'node:http';
+ export { OutgoingHttpHeaders } from 'node:http';
+
+ export interface IncomingHttpStatusHeader {
+ ":status"?: number;
+ }
+
+ export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
+ ":path"?: string;
+ ":method"?: string;
+ ":authority"?: string;
+ ":scheme"?: string;
+ }
+
+ // Http2Stream
+
+ export interface StreamPriorityOptions {
+ exclusive?: boolean;
+ parent?: number;
+ weight?: number;
+ silent?: boolean;
+ }
+
+ export interface StreamState {
+ localWindowSize?: number;
+ state?: number;
+ localClose?: number;
+ remoteClose?: number;
+ sumDependencyWeight?: number;
+ weight?: number;
+ }
+
+ export interface ServerStreamResponseOptions {
+ endStream?: boolean;
+ waitForTrailers?: boolean;
+ }
+
+ export interface StatOptions {
+ offset: number;
+ length: number;
+ }
+
+ export interface ServerStreamFileResponseOptions {
+ statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
+ waitForTrailers?: boolean;
+ offset?: number;
+ length?: number;
+ }
+
+ export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
+ onError?(err: NodeJS.ErrnoException): void;
+ }
+
+ export interface Http2Stream extends stream.Duplex {
+ readonly aborted: boolean;
+ readonly bufferSize: number;
+ readonly closed: boolean;
+ readonly destroyed: boolean;
+ /**
+ * Set the true if the END_STREAM flag was set in the request or response HEADERS frame received,
+ * indicating that no additional data should be received and the readable side of the Http2Stream will be closed.
+ */
+ readonly endAfterHeaders: boolean;
+ readonly id?: number;
+ readonly pending: boolean;
+ readonly rstCode: number;
+ readonly sentHeaders: OutgoingHttpHeaders;
+ readonly sentInfoHeaders?: OutgoingHttpHeaders[];
+ readonly sentTrailers?: OutgoingHttpHeaders;
+ readonly session: Http2Session;
+ readonly state: StreamState;
+
+ close(code?: number, callback?: () => void): void;
+ priority(options: StreamPriorityOptions): void;
+ setTimeout(msecs: number, callback?: () => void): void;
+ sendTrailers(headers: OutgoingHttpHeaders): void;
+
+ addListener(event: "aborted", listener: () => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ addListener(event: "drain", listener: () => void): this;
+ addListener(event: "end", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "finish", listener: () => void): this;
+ addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ addListener(event: "streamClosed", listener: (code: number) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+ addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: "wantTrailers", listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "aborted"): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "data", chunk: Buffer | string): boolean;
+ emit(event: "drain"): boolean;
+ emit(event: "end"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "finish"): boolean;
+ emit(event: "frameError", frameType: number, errorCode: number): boolean;
+ emit(event: "pipe", src: stream.Readable): boolean;
+ emit(event: "unpipe", src: stream.Readable): boolean;
+ emit(event: "streamClosed", code: number): boolean;
+ emit(event: "timeout"): boolean;
+ emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: "wantTrailers"): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "aborted", listener: () => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "data", listener: (chunk: Buffer | string) => void): this;
+ on(event: "drain", listener: () => void): this;
+ on(event: "end", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "finish", listener: () => void): this;
+ on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ on(event: "pipe", listener: (src: stream.Readable) => void): this;
+ on(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ on(event: "streamClosed", listener: (code: number) => void): this;
+ on(event: "timeout", listener: () => void): this;
+ on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: "wantTrailers", listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "aborted", listener: () => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "data", listener: (chunk: Buffer | string) => void): this;
+ once(event: "drain", listener: () => void): this;
+ once(event: "end", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "finish", listener: () => void): this;
+ once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ once(event: "pipe", listener: (src: stream.Readable) => void): this;
+ once(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ once(event: "streamClosed", listener: (code: number) => void): this;
+ once(event: "timeout", listener: () => void): this;
+ once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: "wantTrailers", listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "aborted", listener: () => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: "drain", listener: () => void): this;
+ prependListener(event: "end", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "finish", listener: () => void): this;
+ prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ prependListener(event: "streamClosed", listener: (code: number) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+ prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: "wantTrailers", listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "aborted", listener: () => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: "drain", listener: () => void): this;
+ prependOnceListener(event: "end", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "finish", listener: () => void): this;
+ prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
+ prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: "streamClosed", listener: (code: number) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: "wantTrailers", listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ export interface ClientHttp2Stream extends Http2Stream {
+ addListener(event: "continue", listener: () => {}): this;
+ addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "continue"): boolean;
+ emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "continue", listener: () => {}): this;
+ on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "continue", listener: () => {}): this;
+ once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "continue", listener: () => {}): this;
+ prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "continue", listener: () => {}): this;
+ prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ export interface ServerHttp2Stream extends Http2Stream {
+ readonly headersSent: boolean;
+ readonly pushAllowed: boolean;
+ additionalHeaders(headers: OutgoingHttpHeaders): void;
+ pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
+ respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
+ respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
+ respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
+ }
+
+ // Http2Session
+
+ export interface Settings {
+ headerTableSize?: number;
+ enablePush?: boolean;
+ initialWindowSize?: number;
+ maxFrameSize?: number;
+ maxConcurrentStreams?: number;
+ maxHeaderListSize?: number;
+ enableConnectProtocol?: boolean;
+ }
+
+ export interface ClientSessionRequestOptions {
+ endStream?: boolean;
+ exclusive?: boolean;
+ parent?: number;
+ weight?: number;
+ waitForTrailers?: boolean;
+ }
+
+ export interface SessionState {
+ effectiveLocalWindowSize?: number;
+ effectiveRecvDataLength?: number;
+ nextStreamID?: number;
+ localWindowSize?: number;
+ lastProcStreamID?: number;
+ remoteWindowSize?: number;
+ outboundQueueSize?: number;
+ deflateDynamicTableSize?: number;
+ inflateDynamicTableSize?: number;
+ }
+
+ export interface Http2Session extends EventEmitter {
+ readonly alpnProtocol?: string;
+ readonly closed: boolean;
+ readonly connecting: boolean;
+ readonly destroyed: boolean;
+ readonly encrypted?: boolean;
+ readonly localSettings: Settings;
+ readonly originSet?: string[];
+ readonly pendingSettingsAck: boolean;
+ readonly remoteSettings: Settings;
+ readonly socket: net.Socket | tls.TLSSocket;
+ readonly state: SessionState;
+ readonly type: number;
+
+ close(callback?: () => void): void;
+ destroy(error?: Error, code?: number): void;
+ goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void;
+ ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
+ ref(): void;
+ setLocalWindowSize(windowSize: number): void;
+ setTimeout(msecs: number, callback?: () => void): void;
+ settings(settings: Settings): void;
+ unref(): void;
+
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ addListener(event: "localSettings", listener: (settings: Settings) => void): this;
+ addListener(event: "ping", listener: () => void): this;
+ addListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "close"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean;
+ emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean;
+ emit(event: "localSettings", settings: Settings): boolean;
+ emit(event: "ping"): boolean;
+ emit(event: "remoteSettings", settings: Settings): boolean;
+ emit(event: "timeout"): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ on(event: "localSettings", listener: (settings: Settings) => void): this;
+ on(event: "ping", listener: () => void): this;
+ on(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ on(event: "timeout", listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ once(event: "localSettings", listener: (settings: Settings) => void): this;
+ once(event: "ping", listener: () => void): this;
+ once(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ once(event: "timeout", listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependListener(event: "localSettings", listener: (settings: Settings) => void): this;
+ prependListener(event: "ping", listener: () => void): this;
+ prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
+ prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
+ prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this;
+ prependOnceListener(event: "ping", listener: () => void): this;
+ prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ export interface ClientHttp2Session extends Http2Session {
+ request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
+
+ addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ addListener(event: "origin", listener: (origins: string[]) => void): this;
+ addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "altsvc", alt: string, origin: string, stream: number): boolean;
+ emit(event: "origin", origins: ReadonlyArray<string>): boolean;
+ emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ on(event: "origin", listener: (origins: string[]) => void): this;
+ on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ once(event: "origin", listener: (origins: string[]) => void): this;
+ once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ prependListener(event: "origin", listener: (origins: string[]) => void): this;
+ prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
+ prependOnceListener(event: "origin", listener: (origins: string[]) => void): this;
+ prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ export interface AlternativeServiceOptions {
+ origin: number | string | url.URL;
+ }
+
+ export interface ServerHttp2Session extends Http2Session {
+ readonly server: Http2Server | Http2SecureServer;
+
+ altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
+ origin(...args: Array<string | url.URL | { origin: string }>): void;
+
+ addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
+ emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
+ prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ // Http2Server
+
+ export interface SessionOptions {
+ maxDeflateDynamicTableSize?: number;
+ maxSessionMemory?: number;
+ maxHeaderListPairs?: number;
+ maxOutstandingPings?: number;
+ maxSendHeaderBlockLength?: number;
+ paddingStrategy?: number;
+ peerMaxConcurrentStreams?: number;
+ settings?: Settings;
+
+ selectPadding?(frameLen: number, maxFrameLen: number): number;
+ createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
+ }
+
+ export interface ClientSessionOptions extends SessionOptions {
+ maxReservedRemoteStreams?: number;
+ createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex;
+ protocol?: 'http:' | 'https:';
+ }
+
+ export interface ServerSessionOptions extends SessionOptions {
+ Http1IncomingMessage?: typeof IncomingMessage;
+ Http1ServerResponse?: typeof ServerResponse;
+ Http2ServerRequest?: typeof Http2ServerRequest;
+ Http2ServerResponse?: typeof Http2ServerResponse;
+ }
+
+ export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
+ export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
+
+ export interface ServerOptions extends ServerSessionOptions { }
+
+ export interface SecureServerOptions extends SecureServerSessionOptions {
+ allowHTTP1?: boolean;
+ origins?: string[];
+ }
+
+ export interface Http2Server extends net.Server {
+ addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: "sessionError", listener: (err: Error) => void): this;
+ addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: "session", session: ServerHttp2Session): boolean;
+ emit(event: "sessionError", err: Error): boolean;
+ emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: "timeout"): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ on(event: "sessionError", listener: (err: Error) => void): this;
+ on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: "timeout", listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ once(event: "sessionError", listener: (err: Error) => void): this;
+ once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: "timeout", listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: "sessionError", listener: (err: Error) => void): this;
+ prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
+ prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ setTimeout(msec?: number, callback?: () => void): this;
+ }
+
+ export interface Http2SecureServer extends tls.Server {
+ addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ addListener(event: "sessionError", listener: (err: Error) => void): this;
+ addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+ addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
+ emit(event: "session", session: ServerHttp2Session): boolean;
+ emit(event: "sessionError", err: Error): boolean;
+ emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
+ emit(event: "timeout"): boolean;
+ emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ on(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ on(event: "sessionError", listener: (err: Error) => void): this;
+ on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ on(event: "timeout", listener: () => void): this;
+ on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ once(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ once(event: "sessionError", listener: (err: Error) => void): this;
+ once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ once(event: "timeout", listener: () => void): this;
+ once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ prependListener(event: "sessionError", listener: (err: Error) => void): this;
+ prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+ prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
+ prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
+ prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
+ prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ setTimeout(msec?: number, callback?: () => void): this;
+ }
+
+ export class Http2ServerRequest extends stream.Readable {
+ constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
+
+ readonly aborted: boolean;
+ readonly authority: string;
+ readonly connection: net.Socket | tls.TLSSocket;
+ readonly complete: boolean;
+ readonly headers: IncomingHttpHeaders;
+ readonly httpVersion: string;
+ readonly httpVersionMinor: number;
+ readonly httpVersionMajor: number;
+ readonly method: string;
+ readonly rawHeaders: string[];
+ readonly rawTrailers: string[];
+ readonly scheme: string;
+ readonly socket: net.Socket | tls.TLSSocket;
+ readonly stream: ServerHttp2Stream;
+ readonly trailers: IncomingHttpHeaders;
+ readonly url: string;
+
+ setTimeout(msecs: number, callback?: () => void): void;
+ read(size?: number): Buffer | string | null;
+
+ addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ addListener(event: "end", listener: () => void): this;
+ addListener(event: "readable", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "aborted", hadError: boolean, code: number): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "data", chunk: Buffer | string): boolean;
+ emit(event: "end"): boolean;
+ emit(event: "readable"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "data", listener: (chunk: Buffer | string) => void): this;
+ on(event: "end", listener: () => void): this;
+ on(event: "readable", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "data", listener: (chunk: Buffer | string) => void): this;
+ once(event: "end", listener: () => void): this;
+ once(event: "readable", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ prependListener(event: "end", listener: () => void): this;
+ prependListener(event: "readable", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
+ prependOnceListener(event: "end", listener: () => void): this;
+ prependOnceListener(event: "readable", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ export class Http2ServerResponse extends stream.Stream {
+ constructor(stream: ServerHttp2Stream);
+
+ readonly connection: net.Socket | tls.TLSSocket;
+ readonly finished: boolean;
+ readonly headersSent: boolean;
+ readonly socket: net.Socket | tls.TLSSocket;
+ readonly stream: ServerHttp2Stream;
+ sendDate: boolean;
+ statusCode: number;
+ statusMessage: '';
+ addTrailers(trailers: OutgoingHttpHeaders): void;
+ end(callback?: () => void): void;
+ end(data: string | Uint8Array, callback?: () => void): void;
+ end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): void;
+ getHeader(name: string): string;
+ getHeaderNames(): string[];
+ getHeaders(): OutgoingHttpHeaders;
+ hasHeader(name: string): boolean;
+ removeHeader(name: string): void;
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
+ setTimeout(msecs: number, callback?: () => void): void;
+ write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
+ write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
+ writeContinue(): void;
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
+ writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
+ createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
+
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "drain", listener: () => void): this;
+ addListener(event: "error", listener: (error: Error) => void): this;
+ addListener(event: "finish", listener: () => void): this;
+ addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "close"): boolean;
+ emit(event: "drain"): boolean;
+ emit(event: "error", error: Error): boolean;
+ emit(event: "finish"): boolean;
+ emit(event: "pipe", src: stream.Readable): boolean;
+ emit(event: "unpipe", src: stream.Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "drain", listener: () => void): this;
+ on(event: "error", listener: (error: Error) => void): this;
+ on(event: "finish", listener: () => void): this;
+ on(event: "pipe", listener: (src: stream.Readable) => void): this;
+ on(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "drain", listener: () => void): this;
+ once(event: "error", listener: (error: Error) => void): this;
+ once(event: "finish", listener: () => void): this;
+ once(event: "pipe", listener: (src: stream.Readable) => void): this;
+ once(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "drain", listener: () => void): this;
+ prependListener(event: "error", listener: (error: Error) => void): this;
+ prependListener(event: "finish", listener: () => void): this;
+ prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "drain", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
+ prependOnceListener(event: "finish", listener: () => void): this;
+ prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ // Public API
+
+ export namespace constants {
+ const NGHTTP2_SESSION_SERVER: number;
+ const NGHTTP2_SESSION_CLIENT: number;
+ const NGHTTP2_STREAM_STATE_IDLE: number;
+ const NGHTTP2_STREAM_STATE_OPEN: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
+ const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
+ const NGHTTP2_STREAM_STATE_CLOSED: number;
+ const NGHTTP2_NO_ERROR: number;
+ const NGHTTP2_PROTOCOL_ERROR: number;
+ const NGHTTP2_INTERNAL_ERROR: number;
+ const NGHTTP2_FLOW_CONTROL_ERROR: number;
+ const NGHTTP2_SETTINGS_TIMEOUT: number;
+ const NGHTTP2_STREAM_CLOSED: number;
+ const NGHTTP2_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_REFUSED_STREAM: number;
+ const NGHTTP2_CANCEL: number;
+ const NGHTTP2_COMPRESSION_ERROR: number;
+ const NGHTTP2_CONNECT_ERROR: number;
+ const NGHTTP2_ENHANCE_YOUR_CALM: number;
+ const NGHTTP2_INADEQUATE_SECURITY: number;
+ const NGHTTP2_HTTP_1_1_REQUIRED: number;
+ const NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
+ const NGHTTP2_FLAG_NONE: number;
+ const NGHTTP2_FLAG_END_STREAM: number;
+ const NGHTTP2_FLAG_END_HEADERS: number;
+ const NGHTTP2_FLAG_ACK: number;
+ const NGHTTP2_FLAG_PADDED: number;
+ const NGHTTP2_FLAG_PRIORITY: number;
+ const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
+ const DEFAULT_SETTINGS_ENABLE_PUSH: number;
+ const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
+ const MAX_MAX_FRAME_SIZE: number;
+ const MIN_MAX_FRAME_SIZE: number;
+ const MAX_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_DEFAULT_WEIGHT: number;
+ const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
+ const NGHTTP2_SETTINGS_ENABLE_PUSH: number;
+ const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
+ const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
+ const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
+ const PADDING_STRATEGY_NONE: number;
+ const PADDING_STRATEGY_MAX: number;
+ const PADDING_STRATEGY_CALLBACK: number;
+ const HTTP2_HEADER_STATUS: string;
+ const HTTP2_HEADER_METHOD: string;
+ const HTTP2_HEADER_AUTHORITY: string;
+ const HTTP2_HEADER_SCHEME: string;
+ const HTTP2_HEADER_PATH: string;
+ const HTTP2_HEADER_ACCEPT_CHARSET: string;
+ const HTTP2_HEADER_ACCEPT_ENCODING: string;
+ const HTTP2_HEADER_ACCEPT_LANGUAGE: string;
+ const HTTP2_HEADER_ACCEPT_RANGES: string;
+ const HTTP2_HEADER_ACCEPT: string;
+ const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
+ const HTTP2_HEADER_AGE: string;
+ const HTTP2_HEADER_ALLOW: string;
+ const HTTP2_HEADER_AUTHORIZATION: string;
+ const HTTP2_HEADER_CACHE_CONTROL: string;
+ const HTTP2_HEADER_CONNECTION: string;
+ const HTTP2_HEADER_CONTENT_DISPOSITION: string;
+ const HTTP2_HEADER_CONTENT_ENCODING: string;
+ const HTTP2_HEADER_CONTENT_LANGUAGE: string;
+ const HTTP2_HEADER_CONTENT_LENGTH: string;
+ const HTTP2_HEADER_CONTENT_LOCATION: string;
+ const HTTP2_HEADER_CONTENT_MD5: string;
+ const HTTP2_HEADER_CONTENT_RANGE: string;
+ const HTTP2_HEADER_CONTENT_TYPE: string;
+ const HTTP2_HEADER_COOKIE: string;
+ const HTTP2_HEADER_DATE: string;
+ const HTTP2_HEADER_ETAG: string;
+ const HTTP2_HEADER_EXPECT: string;
+ const HTTP2_HEADER_EXPIRES: string;
+ const HTTP2_HEADER_FROM: string;
+ const HTTP2_HEADER_HOST: string;
+ const HTTP2_HEADER_IF_MATCH: string;
+ const HTTP2_HEADER_IF_MODIFIED_SINCE: string;
+ const HTTP2_HEADER_IF_NONE_MATCH: string;
+ const HTTP2_HEADER_IF_RANGE: string;
+ const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
+ const HTTP2_HEADER_LAST_MODIFIED: string;
+ const HTTP2_HEADER_LINK: string;
+ const HTTP2_HEADER_LOCATION: string;
+ const HTTP2_HEADER_MAX_FORWARDS: string;
+ const HTTP2_HEADER_PREFER: string;
+ const HTTP2_HEADER_PROXY_AUTHENTICATE: string;
+ const HTTP2_HEADER_PROXY_AUTHORIZATION: string;
+ const HTTP2_HEADER_RANGE: string;
+ const HTTP2_HEADER_REFERER: string;
+ const HTTP2_HEADER_REFRESH: string;
+ const HTTP2_HEADER_RETRY_AFTER: string;
+ const HTTP2_HEADER_SERVER: string;
+ const HTTP2_HEADER_SET_COOKIE: string;
+ const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
+ const HTTP2_HEADER_TRANSFER_ENCODING: string;
+ const HTTP2_HEADER_TE: string;
+ const HTTP2_HEADER_UPGRADE: string;
+ const HTTP2_HEADER_USER_AGENT: string;
+ const HTTP2_HEADER_VARY: string;
+ const HTTP2_HEADER_VIA: string;
+ const HTTP2_HEADER_WWW_AUTHENTICATE: string;
+ const HTTP2_HEADER_HTTP2_SETTINGS: string;
+ const HTTP2_HEADER_KEEP_ALIVE: string;
+ const HTTP2_HEADER_PROXY_CONNECTION: string;
+ const HTTP2_METHOD_ACL: string;
+ const HTTP2_METHOD_BASELINE_CONTROL: string;
+ const HTTP2_METHOD_BIND: string;
+ const HTTP2_METHOD_CHECKIN: string;
+ const HTTP2_METHOD_CHECKOUT: string;
+ const HTTP2_METHOD_CONNECT: string;
+ const HTTP2_METHOD_COPY: string;
+ const HTTP2_METHOD_DELETE: string;
+ const HTTP2_METHOD_GET: string;
+ const HTTP2_METHOD_HEAD: string;
+ const HTTP2_METHOD_LABEL: string;
+ const HTTP2_METHOD_LINK: string;
+ const HTTP2_METHOD_LOCK: string;
+ const HTTP2_METHOD_MERGE: string;
+ const HTTP2_METHOD_MKACTIVITY: string;
+ const HTTP2_METHOD_MKCALENDAR: string;
+ const HTTP2_METHOD_MKCOL: string;
+ const HTTP2_METHOD_MKREDIRECTREF: string;
+ const HTTP2_METHOD_MKWORKSPACE: string;
+ const HTTP2_METHOD_MOVE: string;
+ const HTTP2_METHOD_OPTIONS: string;
+ const HTTP2_METHOD_ORDERPATCH: string;
+ const HTTP2_METHOD_PATCH: string;
+ const HTTP2_METHOD_POST: string;
+ const HTTP2_METHOD_PRI: string;
+ const HTTP2_METHOD_PROPFIND: string;
+ const HTTP2_METHOD_PROPPATCH: string;
+ const HTTP2_METHOD_PUT: string;
+ const HTTP2_METHOD_REBIND: string;
+ const HTTP2_METHOD_REPORT: string;
+ const HTTP2_METHOD_SEARCH: string;
+ const HTTP2_METHOD_TRACE: string;
+ const HTTP2_METHOD_UNBIND: string;
+ const HTTP2_METHOD_UNCHECKOUT: string;
+ const HTTP2_METHOD_UNLINK: string;
+ const HTTP2_METHOD_UNLOCK: string;
+ const HTTP2_METHOD_UPDATE: string;
+ const HTTP2_METHOD_UPDATEREDIRECTREF: string;
+ const HTTP2_METHOD_VERSION_CONTROL: string;
+ const HTTP_STATUS_CONTINUE: number;
+ const HTTP_STATUS_SWITCHING_PROTOCOLS: number;
+ const HTTP_STATUS_PROCESSING: number;
+ const HTTP_STATUS_OK: number;
+ const HTTP_STATUS_CREATED: number;
+ const HTTP_STATUS_ACCEPTED: number;
+ const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number;
+ const HTTP_STATUS_NO_CONTENT: number;
+ const HTTP_STATUS_RESET_CONTENT: number;
+ const HTTP_STATUS_PARTIAL_CONTENT: number;
+ const HTTP_STATUS_MULTI_STATUS: number;
+ const HTTP_STATUS_ALREADY_REPORTED: number;
+ const HTTP_STATUS_IM_USED: number;
+ const HTTP_STATUS_MULTIPLE_CHOICES: number;
+ const HTTP_STATUS_MOVED_PERMANENTLY: number;
+ const HTTP_STATUS_FOUND: number;
+ const HTTP_STATUS_SEE_OTHER: number;
+ const HTTP_STATUS_NOT_MODIFIED: number;
+ const HTTP_STATUS_USE_PROXY: number;
+ const HTTP_STATUS_TEMPORARY_REDIRECT: number;
+ const HTTP_STATUS_PERMANENT_REDIRECT: number;
+ const HTTP_STATUS_BAD_REQUEST: number;
+ const HTTP_STATUS_UNAUTHORIZED: number;
+ const HTTP_STATUS_PAYMENT_REQUIRED: number;
+ const HTTP_STATUS_FORBIDDEN: number;
+ const HTTP_STATUS_NOT_FOUND: number;
+ const HTTP_STATUS_METHOD_NOT_ALLOWED: number;
+ const HTTP_STATUS_NOT_ACCEPTABLE: number;
+ const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number;
+ const HTTP_STATUS_REQUEST_TIMEOUT: number;
+ const HTTP_STATUS_CONFLICT: number;
+ const HTTP_STATUS_GONE: number;
+ const HTTP_STATUS_LENGTH_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_FAILED: number;
+ const HTTP_STATUS_PAYLOAD_TOO_LARGE: number;
+ const HTTP_STATUS_URI_TOO_LONG: number;
+ const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number;
+ const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number;
+ const HTTP_STATUS_EXPECTATION_FAILED: number;
+ const HTTP_STATUS_TEAPOT: number;
+ const HTTP_STATUS_MISDIRECTED_REQUEST: number;
+ const HTTP_STATUS_UNPROCESSABLE_ENTITY: number;
+ const HTTP_STATUS_LOCKED: number;
+ const HTTP_STATUS_FAILED_DEPENDENCY: number;
+ const HTTP_STATUS_UNORDERED_COLLECTION: number;
+ const HTTP_STATUS_UPGRADE_REQUIRED: number;
+ const HTTP_STATUS_PRECONDITION_REQUIRED: number;
+ const HTTP_STATUS_TOO_MANY_REQUESTS: number;
+ const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number;
+ const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number;
+ const HTTP_STATUS_INTERNAL_SERVER_ERROR: number;
+ const HTTP_STATUS_NOT_IMPLEMENTED: number;
+ const HTTP_STATUS_BAD_GATEWAY: number;
+ const HTTP_STATUS_SERVICE_UNAVAILABLE: number;
+ const HTTP_STATUS_GATEWAY_TIMEOUT: number;
+ const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number;
+ const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number;
+ const HTTP_STATUS_INSUFFICIENT_STORAGE: number;
+ const HTTP_STATUS_LOOP_DETECTED: number;
+ const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number;
+ const HTTP_STATUS_NOT_EXTENDED: number;
+ const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number;
+ }
+
+ export function getDefaultSettings(): Settings;
+ export function getPackedSettings(settings: Settings): Buffer;
+ export function getUnpackedSettings(buf: Uint8Array): Settings;
+
+ export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+ export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
+
+ export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+ export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
+
+ export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
+ export function connect(
+ authority: string | url.URL,
+ options?: ClientSessionOptions | SecureClientSessionOptions,
+ listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
+ ): ClientHttp2Session;
+}
diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts
new file mode 100644
index 0000000..87f352d
--- /dev/null
+++ b/node_modules/@types/node/https.d.ts
@@ -0,0 +1,40 @@
+declare module 'node:https' {
+ export * from 'https';
+}
+
+declare module 'https' {
+ import * as tls from 'node:tls';
+ import * as http from 'node:http';
+ import { URL } from 'node:url';
+
+ type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
+
+ type RequestOptions = http.RequestOptions & tls.SecureContextOptions & {
+ rejectUnauthorized?: boolean; // Defaults to true
+ servername?: string; // SNI TLS Extension
+ };
+
+ interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
+ rejectUnauthorized?: boolean;
+ maxCachedSessions?: number;
+ }
+
+ class Agent extends http.Agent {
+ constructor(options?: AgentOptions);
+ options: AgentOptions;
+ }
+
+ interface Server extends http.HttpBase {}
+ class Server extends tls.Server {
+ constructor(requestListener?: http.RequestListener);
+ constructor(options: ServerOptions, requestListener?: http.RequestListener);
+ }
+
+ function createServer(requestListener?: http.RequestListener): Server;
+ function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server;
+ function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
+ let globalAgent: Agent;
+}
diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts
new file mode 100644
index 0000000..1a1e3e7
--- /dev/null
+++ b/node_modules/@types/node/index.d.ts
@@ -0,0 +1,59 @@
+// Type definitions for non-npm package Node.js 14.14
+// Project: http://nodejs.org/
+// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
+// DefinitelyTyped <https://github.com/DefinitelyTyped>
+// Alberto Schiabel <https://github.com/jkomyno>
+// Alvis HT Tang <https://github.com/alvis>
+// Andrew Makarov <https://github.com/r3nya>
+// Benjamin Toueg <https://github.com/btoueg>
+// Bruno Scheufler <https://github.com/brunoscheufler>
+// Chigozirim C. <https://github.com/smac89>
+// David Junger <https://github.com/touffy>
+// Deividas Bakanas <https://github.com/DeividasBakanas>
+// Eugene Y. Q. Shen <https://github.com/eyqs>
+// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
+// Hoàng Văn Khải <https://github.com/KSXGitHub>
+// Huw <https://github.com/hoo29>
+// Kelvin Jin <https://github.com/kjin>
+// Klaus Meinhardt <https://github.com/ajafff>
+// Lishude <https://github.com/islishude>
+// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
+// Mohsen Azimi <https://github.com/mohsen1>
+// Nicolas Even <https://github.com/n-e>
+// Nikita Galkin <https://github.com/galkin>
+// Parambir Singh <https://github.com/parambirs>
+// Sebastian Silbermann <https://github.com/eps1lon>
+// Simon Schick <https://github.com/SimonSchick>
+// Thomas den Hollander <https://github.com/ThomasdenH>
+// Wilco Bakker <https://github.com/WilcoBakker>
+// wwwy3y3 <https://github.com/wwwy3y3>
+// Samuel Ainsworth <https://github.com/samuela>
+// Kyle Uehlein <https://github.com/kuehlein>
+// Thanik Bhongbhibhat <https://github.com/bhongy>
+// Marcin Kopacz <https://github.com/chyzwar>
+// Trivikram Kamat <https://github.com/trivikr>
+// Minh Son Nguyen <https://github.com/nguymin4>
+// Junxiao Shi <https://github.com/yoursunny>
+// Ilia Baryshnikov <https://github.com/qwelias>
+// ExE Boss <https://github.com/ExE-Boss>
+// Surasak Chaisurin <https://github.com/Ryan-Willpower>
+// Piotr Błażejewicz <https://github.com/peterblazejewicz>
+// Anna Henningsen <https://github.com/addaleax>
+// Jason Kwok <https://github.com/JasonHK>
+// Victor Perin <https://github.com/victorperin>
+// Yongsheng Zhang <https://github.com/ZYSzys>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+// NOTE: These definitions support NodeJS and TypeScript 3.7.
+// Typically type modifications should be made in base.d.ts instead of here
+
+/// <reference path="base.d.ts" />
+
+// NOTE: TypeScript version-specific augmentations can be found in the following paths:
+// - ~/base.d.ts - Shared definitions common to all TypeScript versions
+// - ~/index.d.ts - Definitions specific to TypeScript 2.8
+// - ~/ts3.5/index.d.ts - Definitions specific to TypeScript 3.5
+
+// NOTE: Augmentations for TypeScript 3.5 and later should use individual files for overrides
+// within the respective ~/ts3.5 (or later) folder. However, this is disallowed for versions
+// prior to TypeScript 3.5, so the older definitions will be found here.
diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts
new file mode 100644
index 0000000..ee0e2e7
--- /dev/null
+++ b/node_modules/@types/node/inspector.d.ts
@@ -0,0 +1,3048 @@
+// tslint:disable-next-line:dt-header
+// Type definitions for inspector
+
+// These definitions are auto-generated.
+// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330
+// for more information.
+
+// tslint:disable:max-line-length
+
+/**
+ * The inspector module provides an API for interacting with the V8 inspector.
+ */
+declare module 'node:inspector' {
+ export * from 'inspector';
+}
+
+/**
+ * The inspector module provides an API for interacting with the V8 inspector.
+ */
+declare module 'inspector' {
+ import EventEmitter = require('node:events');
+
+ interface InspectorNotification<T> {
+ method: string;
+ params: T;
+ }
+
+ namespace Schema {
+ /**
+ * Description of the protocol domain.
+ */
+ interface Domain {
+ /**
+ * Domain name.
+ */
+ name: string;
+ /**
+ * Domain version.
+ */
+ version: string;
+ }
+
+ interface GetDomainsReturnType {
+ /**
+ * List of supported domains.
+ */
+ domains: Domain[];
+ }
+ }
+
+ namespace Runtime {
+ /**
+ * Unique script identifier.
+ */
+ type ScriptId = string;
+
+ /**
+ * Unique object identifier.
+ */
+ type RemoteObjectId = string;
+
+ /**
+ * Primitive value which cannot be JSON-stringified.
+ */
+ type UnserializableValue = string;
+
+ /**
+ * Mirror object referencing original JavaScript object.
+ */
+ interface RemoteObject {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string;
+ /**
+ * Object class (constructor) name. Specified for <code>object</code> type values only.
+ */
+ className?: string;
+ /**
+ * Remote object value in case of primitive values or JSON values (if it was requested).
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
+ */
+ unserializableValue?: UnserializableValue;
+ /**
+ * String representation of the object.
+ */
+ description?: string;
+ /**
+ * Unique object identifier (for non-primitive values).
+ */
+ objectId?: RemoteObjectId;
+ /**
+ * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
+ * @experimental
+ */
+ preview?: ObjectPreview;
+ /**
+ * @experimental
+ */
+ customPreview?: CustomPreview;
+ }
+
+ /**
+ * @experimental
+ */
+ interface CustomPreview {
+ header: string;
+ hasBody: boolean;
+ formatterObjectId: RemoteObjectId;
+ bindRemoteObjectFunctionId: RemoteObjectId;
+ configObjectId?: RemoteObjectId;
+ }
+
+ /**
+ * Object containing abbreviated remote object value.
+ * @experimental
+ */
+ interface ObjectPreview {
+ /**
+ * Object type.
+ */
+ type: string;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string;
+ /**
+ * String representation of the object.
+ */
+ description?: string;
+ /**
+ * True iff some of the properties or entries of the original object did not fit.
+ */
+ overflow: boolean;
+ /**
+ * List of the properties.
+ */
+ properties: PropertyPreview[];
+ /**
+ * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
+ */
+ entries?: EntryPreview[];
+ }
+
+ /**
+ * @experimental
+ */
+ interface PropertyPreview {
+ /**
+ * Property name.
+ */
+ name: string;
+ /**
+ * Object type. Accessor means that the property itself is an accessor property.
+ */
+ type: string;
+ /**
+ * User-friendly property value string.
+ */
+ value?: string;
+ /**
+ * Nested value preview.
+ */
+ valuePreview?: ObjectPreview;
+ /**
+ * Object subtype hint. Specified for <code>object</code> type values only.
+ */
+ subtype?: string;
+ }
+
+ /**
+ * @experimental
+ */
+ interface EntryPreview {
+ /**
+ * Preview of the key. Specified for map-like collection entries.
+ */
+ key?: ObjectPreview;
+ /**
+ * Preview of the value.
+ */
+ value: ObjectPreview;
+ }
+
+ /**
+ * Object property descriptor.
+ */
+ interface PropertyDescriptor {
+ /**
+ * Property name or symbol description.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject;
+ /**
+ * True if the value associated with the property may be changed (data descriptors only).
+ */
+ writable?: boolean;
+ /**
+ * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
+ */
+ get?: RemoteObject;
+ /**
+ * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
+ */
+ set?: RemoteObject;
+ /**
+ * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
+ */
+ configurable: boolean;
+ /**
+ * True if this property shows up during enumeration of the properties on the corresponding object.
+ */
+ enumerable: boolean;
+ /**
+ * True if the result was thrown during the evaluation.
+ */
+ wasThrown?: boolean;
+ /**
+ * True if the property is owned for the object.
+ */
+ isOwn?: boolean;
+ /**
+ * Property symbol object, if the property is of the <code>symbol</code> type.
+ */
+ symbol?: RemoteObject;
+ }
+
+ /**
+ * Object internal property descriptor. This property isn't normally visible in JavaScript code.
+ */
+ interface InternalPropertyDescriptor {
+ /**
+ * Conventional property name.
+ */
+ name: string;
+ /**
+ * The value associated with the property.
+ */
+ value?: RemoteObject;
+ }
+
+ /**
+ * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
+ */
+ interface CallArgument {
+ /**
+ * Primitive value or serializable javascript object.
+ */
+ value?: any;
+ /**
+ * Primitive value which can not be JSON-stringified.
+ */
+ unserializableValue?: UnserializableValue;
+ /**
+ * Remote object handle.
+ */
+ objectId?: RemoteObjectId;
+ }
+
+ /**
+ * Id of an execution context.
+ */
+ type ExecutionContextId = number;
+
+ /**
+ * Description of an isolated world.
+ */
+ interface ExecutionContextDescription {
+ /**
+ * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
+ */
+ id: ExecutionContextId;
+ /**
+ * Execution context origin.
+ */
+ origin: string;
+ /**
+ * Human readable name describing given context.
+ */
+ name: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ auxData?: {};
+ }
+
+ /**
+ * Detailed information about exception (or error) that was thrown during script compilation or execution.
+ */
+ interface ExceptionDetails {
+ /**
+ * Exception id.
+ */
+ exceptionId: number;
+ /**
+ * Exception text, which should be used together with exception object when available.
+ */
+ text: string;
+ /**
+ * Line number of the exception location (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number of the exception location (0-based).
+ */
+ columnNumber: number;
+ /**
+ * Script ID of the exception location.
+ */
+ scriptId?: ScriptId;
+ /**
+ * URL of the exception location, to be used when the script was not reported.
+ */
+ url?: string;
+ /**
+ * JavaScript stack trace if available.
+ */
+ stackTrace?: StackTrace;
+ /**
+ * Exception object if available.
+ */
+ exception?: RemoteObject;
+ /**
+ * Identifier of the context where exception happened.
+ */
+ executionContextId?: ExecutionContextId;
+ }
+
+ /**
+ * Number of milliseconds since epoch.
+ */
+ type Timestamp = number;
+
+ /**
+ * Stack entry for runtime errors and assertions.
+ */
+ interface CallFrame {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * JavaScript script id.
+ */
+ scriptId: ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * JavaScript script line number (0-based).
+ */
+ lineNumber: number;
+ /**
+ * JavaScript script column number (0-based).
+ */
+ columnNumber: number;
+ }
+
+ /**
+ * Call frames for assertions or error messages.
+ */
+ interface StackTrace {
+ /**
+ * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
+ */
+ description?: string;
+ /**
+ * JavaScript function name.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ */
+ parent?: StackTrace;
+ /**
+ * Asynchronous JavaScript stack trace that preceded this stack, if available.
+ * @experimental
+ */
+ parentId?: StackTraceId;
+ }
+
+ /**
+ * Unique identifier of current debugger.
+ * @experimental
+ */
+ type UniqueDebuggerId = string;
+
+ /**
+ * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.
+ * @experimental
+ */
+ interface StackTraceId {
+ id: string;
+ debuggerId?: UniqueDebuggerId;
+ }
+
+ interface EvaluateParameterType {
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean;
+ /**
+ * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ contextId?: ExecutionContextId;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean;
+ }
+
+ interface AwaitPromiseParameterType {
+ /**
+ * Identifier of the promise.
+ */
+ promiseObjectId: RemoteObjectId;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean;
+ }
+
+ interface CallFunctionOnParameterType {
+ /**
+ * Declaration of the function to call.
+ */
+ functionDeclaration: string;
+ /**
+ * Identifier of the object to call function on. Either objectId or executionContextId should be specified.
+ */
+ objectId?: RemoteObjectId;
+ /**
+ * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
+ */
+ arguments?: CallArgument[];
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean;
+ /**
+ * Whether execution should be treated as initiated by user in the UI.
+ */
+ userGesture?: boolean;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean;
+ /**
+ * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
+ */
+ executionContextId?: ExecutionContextId;
+ /**
+ * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
+ */
+ objectGroup?: string;
+ }
+
+ interface GetPropertiesParameterType {
+ /**
+ * Identifier of the object to return properties for.
+ */
+ objectId: RemoteObjectId;
+ /**
+ * If true, returns properties belonging only to the element itself, not to its prototype chain.
+ */
+ ownProperties?: boolean;
+ /**
+ * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
+ * @experimental
+ */
+ accessorPropertiesOnly?: boolean;
+ /**
+ * Whether preview should be generated for the results.
+ * @experimental
+ */
+ generatePreview?: boolean;
+ }
+
+ interface ReleaseObjectParameterType {
+ /**
+ * Identifier of the object to release.
+ */
+ objectId: RemoteObjectId;
+ }
+
+ interface ReleaseObjectGroupParameterType {
+ /**
+ * Symbolic object group name.
+ */
+ objectGroup: string;
+ }
+
+ interface SetCustomObjectFormatterEnabledParameterType {
+ enabled: boolean;
+ }
+
+ interface CompileScriptParameterType {
+ /**
+ * Expression to compile.
+ */
+ expression: string;
+ /**
+ * Source url to be set for the script.
+ */
+ sourceURL: string;
+ /**
+ * Specifies whether the compiled script should be persisted.
+ */
+ persistScript: boolean;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId;
+ }
+
+ interface RunScriptParameterType {
+ /**
+ * Id of the script to run.
+ */
+ scriptId: ScriptId;
+ /**
+ * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+ */
+ executionContextId?: ExecutionContextId;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean;
+ /**
+ * Determines whether Command Line API should be available during the evaluation.
+ */
+ includeCommandLineAPI?: boolean;
+ /**
+ * Whether the result is expected to be a JSON object which should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ */
+ generatePreview?: boolean;
+ /**
+ * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+ */
+ awaitPromise?: boolean;
+ }
+
+ interface QueryObjectsParameterType {
+ /**
+ * Identifier of the prototype to return objects for.
+ */
+ prototypeObjectId: RemoteObjectId;
+ }
+
+ interface GlobalLexicalScopeNamesParameterType {
+ /**
+ * Specifies in which execution context to lookup global scope variables.
+ */
+ executionContextId?: ExecutionContextId;
+ }
+
+ interface EvaluateReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface AwaitPromiseReturnType {
+ /**
+ * Promise result. Will contain rejected value if promise was rejected.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details if stack strace is available.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface CallFunctionOnReturnType {
+ /**
+ * Call result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface GetPropertiesReturnType {
+ /**
+ * Object properties.
+ */
+ result: PropertyDescriptor[];
+ /**
+ * Internal object properties (only of the element itself).
+ */
+ internalProperties?: InternalPropertyDescriptor[];
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface CompileScriptReturnType {
+ /**
+ * Id of the script.
+ */
+ scriptId?: ScriptId;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface RunScriptReturnType {
+ /**
+ * Run result.
+ */
+ result: RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: ExceptionDetails;
+ }
+
+ interface QueryObjectsReturnType {
+ /**
+ * Array with objects.
+ */
+ objects: RemoteObject;
+ }
+
+ interface GlobalLexicalScopeNamesReturnType {
+ names: string[];
+ }
+
+ interface ExecutionContextCreatedEventDataType {
+ /**
+ * A newly created execution context.
+ */
+ context: ExecutionContextDescription;
+ }
+
+ interface ExecutionContextDestroyedEventDataType {
+ /**
+ * Id of the destroyed context
+ */
+ executionContextId: ExecutionContextId;
+ }
+
+ interface ExceptionThrownEventDataType {
+ /**
+ * Timestamp of the exception.
+ */
+ timestamp: Timestamp;
+ exceptionDetails: ExceptionDetails;
+ }
+
+ interface ExceptionRevokedEventDataType {
+ /**
+ * Reason describing why exception was revoked.
+ */
+ reason: string;
+ /**
+ * The id of revoked exception, as reported in <code>exceptionThrown</code>.
+ */
+ exceptionId: number;
+ }
+
+ interface ConsoleAPICalledEventDataType {
+ /**
+ * Type of the call.
+ */
+ type: string;
+ /**
+ * Call arguments.
+ */
+ args: RemoteObject[];
+ /**
+ * Identifier of the context where the call was made.
+ */
+ executionContextId: ExecutionContextId;
+ /**
+ * Call timestamp.
+ */
+ timestamp: Timestamp;
+ /**
+ * Stack trace captured when the call was made.
+ */
+ stackTrace?: StackTrace;
+ /**
+ * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
+ * @experimental
+ */
+ context?: string;
+ }
+
+ interface InspectRequestedEventDataType {
+ object: RemoteObject;
+ hints: {};
+ }
+ }
+
+ namespace Debugger {
+ /**
+ * Breakpoint identifier.
+ */
+ type BreakpointId = string;
+
+ /**
+ * Call frame identifier.
+ */
+ type CallFrameId = string;
+
+ /**
+ * Location in the source code.
+ */
+ interface Location {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number;
+ }
+
+ /**
+ * Location in the source code.
+ * @experimental
+ */
+ interface ScriptPosition {
+ lineNumber: number;
+ columnNumber: number;
+ }
+
+ /**
+ * JavaScript call frame. Array of call frames form the call stack.
+ */
+ interface CallFrame {
+ /**
+ * Call frame identifier. This identifier is only valid while the virtual machine is paused.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Name of the JavaScript function called on this call frame.
+ */
+ functionName: string;
+ /**
+ * Location in the source code.
+ */
+ functionLocation?: Location;
+ /**
+ * Location in the source code.
+ */
+ location: Location;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Scope chain for this call frame.
+ */
+ scopeChain: Scope[];
+ /**
+ * <code>this</code> object for this call frame.
+ */
+ this: Runtime.RemoteObject;
+ /**
+ * The value being returned, if the function is at return point.
+ */
+ returnValue?: Runtime.RemoteObject;
+ }
+
+ /**
+ * Scope description.
+ */
+ interface Scope {
+ /**
+ * Scope type.
+ */
+ type: string;
+ /**
+ * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
+ */
+ object: Runtime.RemoteObject;
+ name?: string;
+ /**
+ * Location in the source code where scope starts
+ */
+ startLocation?: Location;
+ /**
+ * Location in the source code where scope ends
+ */
+ endLocation?: Location;
+ }
+
+ /**
+ * Search match for resource.
+ */
+ interface SearchMatch {
+ /**
+ * Line number in resource content.
+ */
+ lineNumber: number;
+ /**
+ * Line with match content.
+ */
+ lineContent: string;
+ }
+
+ interface BreakLocation {
+ /**
+ * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * Line number in the script (0-based).
+ */
+ lineNumber: number;
+ /**
+ * Column number in the script (0-based).
+ */
+ columnNumber?: number;
+ type?: string;
+ }
+
+ interface SetBreakpointsActiveParameterType {
+ /**
+ * New value for breakpoints active state.
+ */
+ active: boolean;
+ }
+
+ interface SetSkipAllPausesParameterType {
+ /**
+ * New value for skip pauses state.
+ */
+ skip: boolean;
+ }
+
+ interface SetBreakpointByUrlParameterType {
+ /**
+ * Line number to set breakpoint at.
+ */
+ lineNumber: number;
+ /**
+ * URL of the resources to set breakpoint on.
+ */
+ url?: string;
+ /**
+ * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
+ */
+ urlRegex?: string;
+ /**
+ * Script hash of the resources to set breakpoint on.
+ */
+ scriptHash?: string;
+ /**
+ * Offset in the line to set breakpoint at.
+ */
+ columnNumber?: number;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string;
+ }
+
+ interface SetBreakpointParameterType {
+ /**
+ * Location to set breakpoint in.
+ */
+ location: Location;
+ /**
+ * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+ */
+ condition?: string;
+ }
+
+ interface RemoveBreakpointParameterType {
+ breakpointId: BreakpointId;
+ }
+
+ interface GetPossibleBreakpointsParameterType {
+ /**
+ * Start of range to search possible breakpoint locations in.
+ */
+ start: Location;
+ /**
+ * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
+ */
+ end?: Location;
+ /**
+ * Only consider locations which are in the same (non-nested) function as start.
+ */
+ restrictToFunction?: boolean;
+ }
+
+ interface ContinueToLocationParameterType {
+ /**
+ * Location to continue to.
+ */
+ location: Location;
+ targetCallFrames?: string;
+ }
+
+ interface PauseOnAsyncCallParameterType {
+ /**
+ * Debugger will pause when async call with given stack trace is started.
+ */
+ parentStackTraceId: Runtime.StackTraceId;
+ }
+
+ interface StepIntoParameterType {
+ /**
+ * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
+ * @experimental
+ */
+ breakOnAsyncCall?: boolean;
+ }
+
+ interface GetStackTraceParameterType {
+ stackTraceId: Runtime.StackTraceId;
+ }
+
+ interface SearchInContentParameterType {
+ /**
+ * Id of the script to search in.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * String to search for.
+ */
+ query: string;
+ /**
+ * If true, search is case sensitive.
+ */
+ caseSensitive?: boolean;
+ /**
+ * If true, treats string parameter as regex.
+ */
+ isRegex?: boolean;
+ }
+
+ interface SetScriptSourceParameterType {
+ /**
+ * Id of the script to edit.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * New content of the script.
+ */
+ scriptSource: string;
+ /**
+ * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
+ */
+ dryRun?: boolean;
+ }
+
+ interface RestartFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ }
+
+ interface GetScriptSourceParameterType {
+ /**
+ * Id of the script to get source for.
+ */
+ scriptId: Runtime.ScriptId;
+ }
+
+ interface SetPauseOnExceptionsParameterType {
+ /**
+ * Pause on exceptions mode.
+ */
+ state: string;
+ }
+
+ interface EvaluateOnCallFrameParameterType {
+ /**
+ * Call frame identifier to evaluate on.
+ */
+ callFrameId: CallFrameId;
+ /**
+ * Expression to evaluate.
+ */
+ expression: string;
+ /**
+ * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
+ */
+ objectGroup?: string;
+ /**
+ * Specifies whether command line API should be available to the evaluated expression, defaults to false.
+ */
+ includeCommandLineAPI?: boolean;
+ /**
+ * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+ */
+ silent?: boolean;
+ /**
+ * Whether the result is expected to be a JSON object that should be sent by value.
+ */
+ returnByValue?: boolean;
+ /**
+ * Whether preview should be generated for the result.
+ * @experimental
+ */
+ generatePreview?: boolean;
+ /**
+ * Whether to throw an exception if side effect cannot be ruled out during evaluation.
+ */
+ throwOnSideEffect?: boolean;
+ }
+
+ interface SetVariableValueParameterType {
+ /**
+ * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
+ */
+ scopeNumber: number;
+ /**
+ * Variable name.
+ */
+ variableName: string;
+ /**
+ * New variable value.
+ */
+ newValue: Runtime.CallArgument;
+ /**
+ * Id of callframe that holds variable.
+ */
+ callFrameId: CallFrameId;
+ }
+
+ interface SetReturnValueParameterType {
+ /**
+ * New return value.
+ */
+ newValue: Runtime.CallArgument;
+ }
+
+ interface SetAsyncCallStackDepthParameterType {
+ /**
+ * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
+ */
+ maxDepth: number;
+ }
+
+ interface SetBlackboxPatternsParameterType {
+ /**
+ * Array of regexps that will be used to check script url for blackbox state.
+ */
+ patterns: string[];
+ }
+
+ interface SetBlackboxedRangesParameterType {
+ /**
+ * Id of the script.
+ */
+ scriptId: Runtime.ScriptId;
+ positions: ScriptPosition[];
+ }
+
+ interface EnableReturnType {
+ /**
+ * Unique identifier of the debugger.
+ * @experimental
+ */
+ debuggerId: Runtime.UniqueDebuggerId;
+ }
+
+ interface SetBreakpointByUrlReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * List of the locations this breakpoint resolved into upon addition.
+ */
+ locations: Location[];
+ }
+
+ interface SetBreakpointReturnType {
+ /**
+ * Id of the created breakpoint for further reference.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Location this breakpoint resolved into.
+ */
+ actualLocation: Location;
+ }
+
+ interface GetPossibleBreakpointsReturnType {
+ /**
+ * List of the possible breakpoint locations.
+ */
+ locations: BreakLocation[];
+ }
+
+ interface GetStackTraceReturnType {
+ stackTrace: Runtime.StackTrace;
+ }
+
+ interface SearchInContentReturnType {
+ /**
+ * List of search matches.
+ */
+ result: SearchMatch[];
+ }
+
+ interface SetScriptSourceReturnType {
+ /**
+ * New stack trace in case editing has happened while VM was stopped.
+ */
+ callFrames?: CallFrame[];
+ /**
+ * Whether current call stack was modified after applying the changes.
+ */
+ stackChanged?: boolean;
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId;
+ /**
+ * Exception details if any.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails;
+ }
+
+ interface RestartFrameReturnType {
+ /**
+ * New stack trace.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId;
+ }
+
+ interface GetScriptSourceReturnType {
+ /**
+ * Script source.
+ */
+ scriptSource: string;
+ }
+
+ interface EvaluateOnCallFrameReturnType {
+ /**
+ * Object wrapper for the evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ /**
+ * Exception details.
+ */
+ exceptionDetails?: Runtime.ExceptionDetails;
+ }
+
+ interface ScriptParsedEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {};
+ /**
+ * True, if this script is generated as a result of the live edit operation.
+ * @experimental
+ */
+ isLiveEdit?: boolean;
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean;
+ /**
+ * This script length.
+ */
+ length?: number;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace;
+ }
+
+ interface ScriptFailedToParseEventDataType {
+ /**
+ * Identifier of the script parsed.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * URL or name of the script parsed (if any).
+ */
+ url: string;
+ /**
+ * Line offset of the script within the resource with given URL (for script tags).
+ */
+ startLine: number;
+ /**
+ * Column offset of the script within the resource with given URL.
+ */
+ startColumn: number;
+ /**
+ * Last line of the script.
+ */
+ endLine: number;
+ /**
+ * Length of the last line of the script.
+ */
+ endColumn: number;
+ /**
+ * Specifies script creation context.
+ */
+ executionContextId: Runtime.ExecutionContextId;
+ /**
+ * Content hash of the script.
+ */
+ hash: string;
+ /**
+ * Embedder-specific auxiliary data.
+ */
+ executionContextAuxData?: {};
+ /**
+ * URL of source map associated with script (if any).
+ */
+ sourceMapURL?: string;
+ /**
+ * True, if this script has sourceURL.
+ */
+ hasSourceURL?: boolean;
+ /**
+ * True, if this script is ES6 module.
+ */
+ isModule?: boolean;
+ /**
+ * This script length.
+ */
+ length?: number;
+ /**
+ * JavaScript top stack frame of where the script parsed event was triggered if available.
+ * @experimental
+ */
+ stackTrace?: Runtime.StackTrace;
+ }
+
+ interface BreakpointResolvedEventDataType {
+ /**
+ * Breakpoint unique identifier.
+ */
+ breakpointId: BreakpointId;
+ /**
+ * Actual breakpoint location.
+ */
+ location: Location;
+ }
+
+ interface PausedEventDataType {
+ /**
+ * Call stack the virtual machine stopped on.
+ */
+ callFrames: CallFrame[];
+ /**
+ * Pause reason.
+ */
+ reason: string;
+ /**
+ * Object containing break-specific auxiliary properties.
+ */
+ data?: {};
+ /**
+ * Hit breakpoints IDs
+ */
+ hitBreakpoints?: string[];
+ /**
+ * Async stack trace, if any.
+ */
+ asyncStackTrace?: Runtime.StackTrace;
+ /**
+ * Async stack trace, if any.
+ * @experimental
+ */
+ asyncStackTraceId?: Runtime.StackTraceId;
+ /**
+ * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag.
+ * @experimental
+ */
+ asyncCallStackTraceId?: Runtime.StackTraceId;
+ }
+ }
+
+ namespace Console {
+ /**
+ * Console message.
+ */
+ interface ConsoleMessage {
+ /**
+ * Message source.
+ */
+ source: string;
+ /**
+ * Message severity.
+ */
+ level: string;
+ /**
+ * Message text.
+ */
+ text: string;
+ /**
+ * URL of the message origin.
+ */
+ url?: string;
+ /**
+ * Line number in the resource that generated this message (1-based).
+ */
+ line?: number;
+ /**
+ * Column number in the resource that generated this message (1-based).
+ */
+ column?: number;
+ }
+
+ interface MessageAddedEventDataType {
+ /**
+ * Console message that has been added.
+ */
+ message: ConsoleMessage;
+ }
+ }
+
+ namespace Profiler {
+ /**
+ * Profile node. Holds callsite information, execution statistics and child nodes.
+ */
+ interface ProfileNode {
+ /**
+ * Unique id of the node.
+ */
+ id: number;
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Number of samples where this node was on top of the call stack.
+ */
+ hitCount?: number;
+ /**
+ * Child node ids.
+ */
+ children?: number[];
+ /**
+ * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
+ */
+ deoptReason?: string;
+ /**
+ * An array of source position ticks.
+ */
+ positionTicks?: PositionTickInfo[];
+ }
+
+ /**
+ * Profile.
+ */
+ interface Profile {
+ /**
+ * The list of profile nodes. First item is the root node.
+ */
+ nodes: ProfileNode[];
+ /**
+ * Profiling start timestamp in microseconds.
+ */
+ startTime: number;
+ /**
+ * Profiling end timestamp in microseconds.
+ */
+ endTime: number;
+ /**
+ * Ids of samples top nodes.
+ */
+ samples?: number[];
+ /**
+ * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
+ */
+ timeDeltas?: number[];
+ }
+
+ /**
+ * Specifies a number of samples attributed to a certain source position.
+ */
+ interface PositionTickInfo {
+ /**
+ * Source line number (1-based).
+ */
+ line: number;
+ /**
+ * Number of samples attributed to the source line.
+ */
+ ticks: number;
+ }
+
+ /**
+ * Coverage data for a source range.
+ */
+ interface CoverageRange {
+ /**
+ * JavaScript script source offset for the range start.
+ */
+ startOffset: number;
+ /**
+ * JavaScript script source offset for the range end.
+ */
+ endOffset: number;
+ /**
+ * Collected execution count of the source range.
+ */
+ count: number;
+ }
+
+ /**
+ * Coverage data for a JavaScript function.
+ */
+ interface FunctionCoverage {
+ /**
+ * JavaScript function name.
+ */
+ functionName: string;
+ /**
+ * Source ranges inside the function with coverage data.
+ */
+ ranges: CoverageRange[];
+ /**
+ * Whether coverage data for this function has block granularity.
+ */
+ isBlockCoverage: boolean;
+ }
+
+ /**
+ * Coverage data for a JavaScript script.
+ */
+ interface ScriptCoverage {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Functions contained in the script that has coverage data.
+ */
+ functions: FunctionCoverage[];
+ }
+
+ /**
+ * Describes a type collected during runtime.
+ * @experimental
+ */
+ interface TypeObject {
+ /**
+ * Name of a type collected with type profiling.
+ */
+ name: string;
+ }
+
+ /**
+ * Source offset and types for a parameter or return value.
+ * @experimental
+ */
+ interface TypeProfileEntry {
+ /**
+ * Source offset of the parameter or end of function for return values.
+ */
+ offset: number;
+ /**
+ * The types for this parameter or return value.
+ */
+ types: TypeObject[];
+ }
+
+ /**
+ * Type profile data collected during runtime for a JavaScript script.
+ * @experimental
+ */
+ interface ScriptTypeProfile {
+ /**
+ * JavaScript script id.
+ */
+ scriptId: Runtime.ScriptId;
+ /**
+ * JavaScript script name or url.
+ */
+ url: string;
+ /**
+ * Type profile entries for parameters and return values of the functions in the script.
+ */
+ entries: TypeProfileEntry[];
+ }
+
+ interface SetSamplingIntervalParameterType {
+ /**
+ * New sampling interval in microseconds.
+ */
+ interval: number;
+ }
+
+ interface StartPreciseCoverageParameterType {
+ /**
+ * Collect accurate call counts beyond simple 'covered' or 'not covered'.
+ */
+ callCount?: boolean;
+ /**
+ * Collect block-based coverage.
+ */
+ detailed?: boolean;
+ }
+
+ interface StopReturnType {
+ /**
+ * Recorded profile.
+ */
+ profile: Profile;
+ }
+
+ interface TakePreciseCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+
+ interface GetBestEffortCoverageReturnType {
+ /**
+ * Coverage data for the current isolate.
+ */
+ result: ScriptCoverage[];
+ }
+
+ interface TakeTypeProfileReturnType {
+ /**
+ * Type profile for all scripts since startTypeProfile() was turned on.
+ */
+ result: ScriptTypeProfile[];
+ }
+
+ interface ConsoleProfileStartedEventDataType {
+ id: string;
+ /**
+ * Location of console.profile().
+ */
+ location: Debugger.Location;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string;
+ }
+
+ interface ConsoleProfileFinishedEventDataType {
+ id: string;
+ /**
+ * Location of console.profileEnd().
+ */
+ location: Debugger.Location;
+ profile: Profile;
+ /**
+ * Profile title passed as an argument to console.profile().
+ */
+ title?: string;
+ }
+ }
+
+ namespace HeapProfiler {
+ /**
+ * Heap snapshot object id.
+ */
+ type HeapSnapshotObjectId = string;
+
+ /**
+ * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
+ */
+ interface SamplingHeapProfileNode {
+ /**
+ * Function location.
+ */
+ callFrame: Runtime.CallFrame;
+ /**
+ * Allocations size in bytes for the node excluding children.
+ */
+ selfSize: number;
+ /**
+ * Child nodes.
+ */
+ children: SamplingHeapProfileNode[];
+ }
+
+ /**
+ * Profile.
+ */
+ interface SamplingHeapProfile {
+ head: SamplingHeapProfileNode;
+ }
+
+ interface StartTrackingHeapObjectsParameterType {
+ trackAllocations?: boolean;
+ }
+
+ interface StopTrackingHeapObjectsParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
+ */
+ reportProgress?: boolean;
+ }
+
+ interface TakeHeapSnapshotParameterType {
+ /**
+ * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
+ */
+ reportProgress?: boolean;
+ }
+
+ interface GetObjectByHeapObjectIdParameterType {
+ objectId: HeapSnapshotObjectId;
+ /**
+ * Symbolic group name that can be used to release multiple objects.
+ */
+ objectGroup?: string;
+ }
+
+ interface AddInspectedHeapObjectParameterType {
+ /**
+ * Heap snapshot object id to be accessible by means of $x command line API.
+ */
+ heapObjectId: HeapSnapshotObjectId;
+ }
+
+ interface GetHeapObjectIdParameterType {
+ /**
+ * Identifier of the object to get heap object id for.
+ */
+ objectId: Runtime.RemoteObjectId;
+ }
+
+ interface StartSamplingParameterType {
+ /**
+ * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
+ */
+ samplingInterval?: number;
+ }
+
+ interface GetObjectByHeapObjectIdReturnType {
+ /**
+ * Evaluation result.
+ */
+ result: Runtime.RemoteObject;
+ }
+
+ interface GetHeapObjectIdReturnType {
+ /**
+ * Id of the heap snapshot object corresponding to the passed remote object id.
+ */
+ heapSnapshotObjectId: HeapSnapshotObjectId;
+ }
+
+ interface StopSamplingReturnType {
+ /**
+ * Recorded sampling heap profile.
+ */
+ profile: SamplingHeapProfile;
+ }
+
+ interface GetSamplingProfileReturnType {
+ /**
+ * Return the sampling profile being collected.
+ */
+ profile: SamplingHeapProfile;
+ }
+
+ interface AddHeapSnapshotChunkEventDataType {
+ chunk: string;
+ }
+
+ interface ReportHeapSnapshotProgressEventDataType {
+ done: number;
+ total: number;
+ finished?: boolean;
+ }
+
+ interface LastSeenObjectIdEventDataType {
+ lastSeenObjectId: number;
+ timestamp: number;
+ }
+
+ interface HeapStatsUpdateEventDataType {
+ /**
+ * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
+ */
+ statsUpdate: number[];
+ }
+ }
+
+ namespace NodeTracing {
+ interface TraceConfig {
+ /**
+ * Controls how the trace buffer stores data.
+ */
+ recordMode?: string;
+ /**
+ * Included category filters.
+ */
+ includedCategories: string[];
+ }
+
+ interface StartParameterType {
+ traceConfig: TraceConfig;
+ }
+
+ interface GetCategoriesReturnType {
+ /**
+ * A list of supported tracing categories.
+ */
+ categories: string[];
+ }
+
+ interface DataCollectedEventDataType {
+ value: Array<{}>;
+ }
+ }
+
+ namespace NodeWorker {
+ type WorkerID = string;
+
+ /**
+ * Unique identifier of attached debugging session.
+ */
+ type SessionID = string;
+
+ interface WorkerInfo {
+ workerId: WorkerID;
+ type: string;
+ title: string;
+ url: string;
+ }
+
+ interface SendMessageToWorkerParameterType {
+ message: string;
+ /**
+ * Identifier of the session.
+ */
+ sessionId: SessionID;
+ }
+
+ interface EnableParameterType {
+ /**
+ * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
+ * message to run them.
+ */
+ waitForDebuggerOnStart: boolean;
+ }
+
+ interface DetachParameterType {
+ sessionId: SessionID;
+ }
+
+ interface AttachedToWorkerEventDataType {
+ /**
+ * Identifier assigned to the session used to send/receive messages.
+ */
+ sessionId: SessionID;
+ workerInfo: WorkerInfo;
+ waitingForDebugger: boolean;
+ }
+
+ interface DetachedFromWorkerEventDataType {
+ /**
+ * Detached session identifier.
+ */
+ sessionId: SessionID;
+ }
+
+ interface ReceivedMessageFromWorkerEventDataType {
+ /**
+ * Identifier of a session which sends a message.
+ */
+ sessionId: SessionID;
+ message: string;
+ }
+ }
+
+ namespace NodeRuntime {
+ interface NotifyWhenWaitingForDisconnectParameterType {
+ enabled: boolean;
+ }
+ }
+
+ /**
+ * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications.
+ */
+ class Session extends EventEmitter {
+ /**
+ * Create a new instance of the inspector.Session class.
+ * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
+ */
+ constructor();
+
+ /**
+ * Connects a session to the inspector back-end.
+ * An exception will be thrown if there is already a connected session established either
+ * through the API or by a front-end connected to the Inspector WebSocket port.
+ */
+ connect(): void;
+
+ /**
+ * Immediately close the session. All pending message callbacks will be called with an error.
+ * session.connect() will need to be called to be able to send messages again.
+ * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
+ */
+ disconnect(): void;
+
+ /**
+ * Posts a message to the inspector back-end. callback will be notified when a response is received.
+ * callback is a function that accepts two optional arguments - error and message-specific result.
+ */
+ post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
+ post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
+
+ /**
+ * Returns supported domains.
+ */
+ post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
+
+ /**
+ * Evaluates expression on global object.
+ */
+ post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+ post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+
+ /**
+ * Add handler to promise with given promise object id.
+ */
+ post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+ post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+
+ /**
+ * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
+ */
+ post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+ post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+
+ /**
+ * Returns properties of a given object. Object group of the result is inherited from the target object.
+ */
+ post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+ post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+
+ /**
+ * Releases remote object with given id.
+ */
+ post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Releases all remote objects that belong to a given group.
+ */
+ post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Tells inspected instance to run if it was waiting for debugger to attach.
+ */
+ post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
+ */
+ post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Disables reporting of execution contexts creation.
+ */
+ post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Discards collected exceptions and console API calls.
+ */
+ post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
+
+ /**
+ * @experimental
+ */
+ post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Compiles expression.
+ */
+ post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+ post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+
+ /**
+ * Runs script with given id in a given context.
+ */
+ post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+ post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+
+ post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+ post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+
+ /**
+ * Returns all let, const and class variables from global scope.
+ */
+ post(
+ method: "Runtime.globalLexicalScopeNames",
+ params?: Runtime.GlobalLexicalScopeNamesParameterType,
+ callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
+ ): void;
+ post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
+
+ /**
+ * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
+ */
+ post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
+
+ /**
+ * Disables debugger for given page.
+ */
+ post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Activates / deactivates all breakpoints on the page.
+ */
+ post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
+ */
+ post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
+ */
+ post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+ post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+
+ /**
+ * Sets JavaScript breakpoint at a given location.
+ */
+ post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+ post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+
+ /**
+ * Removes JavaScript breakpoint.
+ */
+ post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
+ */
+ post(
+ method: "Debugger.getPossibleBreakpoints",
+ params?: Debugger.GetPossibleBreakpointsParameterType,
+ callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
+ ): void;
+ post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
+
+ /**
+ * Continues execution until specific location is reached.
+ */
+ post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
+
+ /**
+ * @experimental
+ */
+ post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Steps over the statement.
+ */
+ post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Steps into the function call.
+ */
+ post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Steps out of the function call.
+ */
+ post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Stops on the next JavaScript statement.
+ */
+ post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
+
+ /**
+ * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
+ * @experimental
+ */
+ post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Resumes JavaScript execution.
+ */
+ post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Returns stack trace with given <code>stackTraceId</code>.
+ * @experimental
+ */
+ post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+ post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+
+ /**
+ * Searches for given string in script content.
+ */
+ post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+ post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+
+ /**
+ * Edits JavaScript source live.
+ */
+ post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+ post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+
+ /**
+ * Restarts particular call frame from the beginning.
+ */
+ post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+ post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+
+ /**
+ * Returns source for the script with given id.
+ */
+ post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+ post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+
+ /**
+ * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
+ */
+ post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Evaluates expression on a given call frame.
+ */
+ post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+ post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+
+ /**
+ * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
+ */
+ post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Changes return value in top frame. Available only at return break position.
+ * @experimental
+ */
+ post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enables or disables async call stacks tracking.
+ */
+ post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
+ * @experimental
+ */
+ post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
+ * @experimental
+ */
+ post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
+ */
+ post(method: "Console.enable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Disables console domain, prevents further console messages from being reported to the client.
+ */
+ post(method: "Console.disable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Does nothing.
+ */
+ post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
+
+ post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
+
+ post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
+ */
+ post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
+
+ post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
+
+ post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
+
+ /**
+ * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
+ */
+ post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
+ */
+ post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
+ */
+ post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
+
+ /**
+ * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
+ */
+ post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
+
+ /**
+ * Enable type profile.
+ * @experimental
+ */
+ post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Disable type profile. Disabling releases type profile data collected so far.
+ * @experimental
+ */
+ post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Collect type profile.
+ * @experimental
+ */
+ post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
+
+ post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
+
+ post(
+ method: "HeapProfiler.getObjectByHeapObjectId",
+ params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
+ callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
+ ): void;
+ post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
+
+ /**
+ * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
+ */
+ post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+ post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+
+ post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
+
+ post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
+
+ post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
+
+ /**
+ * Gets supported tracing categories.
+ */
+ post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
+
+ /**
+ * Start trace events collection.
+ */
+ post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Stop trace events collection. Remaining collected events will be sent as a sequence of
+ * dataCollected events followed by tracingComplete event.
+ */
+ post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Sends protocol message over session with given id.
+ */
+ post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Instructs the inspector to attach to running workers. Will also attach to new workers
+ * as they start
+ */
+ post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Detaches from all running workers and disables attaching to new workers as they are started.
+ */
+ post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Detached from the worker with given sessionId.
+ */
+ post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void;
+
+ /**
+ * Enable the `NodeRuntime.waitingForDisconnect`.
+ */
+ post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
+ post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void;
+
+ // Events
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ addListener(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean;
+ emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
+ emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
+ emit(event: "Runtime.executionContextsCleared"): boolean;
+ emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
+ emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
+ emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
+ emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
+ emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
+ emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
+ emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
+ emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
+ emit(event: "Debugger.resumed"): boolean;
+ emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
+ emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
+ emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
+ emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
+ emit(event: "HeapProfiler.resetProfiles"): boolean;
+ emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
+ emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
+ emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
+ emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
+ emit(event: "NodeTracing.tracingComplete"): boolean;
+ emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
+ emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
+ emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
+ emit(event: "NodeRuntime.waitingForDisconnect"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ on(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ on(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ on(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ once(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ once(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ once(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependListener(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+
+ /**
+ * Emitted when any notification from the V8 Inspector is received.
+ */
+ prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
+
+ /**
+ * Issued when new execution context is created.
+ */
+ prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+
+ /**
+ * Issued when execution context is destroyed.
+ */
+ prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+
+ /**
+ * Issued when all executionContexts were cleared in browser
+ */
+ prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+
+ /**
+ * Issued when exception was thrown and unhandled.
+ */
+ prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+
+ /**
+ * Issued when unhandled exception was revoked.
+ */
+ prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+
+ /**
+ * Issued when console API was called.
+ */
+ prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+
+ /**
+ * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+ */
+ prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+ */
+ prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+
+ /**
+ * Fired when virtual machine fails to parse the script.
+ */
+ prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+
+ /**
+ * Fired when breakpoint is resolved to an actual script and location.
+ */
+ prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+ */
+ prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+
+ /**
+ * Fired when the virtual machine resumed execution.
+ */
+ prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
+
+ /**
+ * Issued when new console message is added.
+ */
+ prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+
+ /**
+ * Sent when new profile recording is started using console.profile() call.
+ */
+ prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+
+ prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+ prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+ prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+ prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+ */
+ prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+
+ /**
+ * If heap objects tracking has been started then backend may send update for one or more fragments
+ */
+ prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+
+ /**
+ * Contains an bucket of collected trace events.
+ */
+ prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+
+ /**
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+ * delivered via dataCollected events.
+ */
+ prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+
+ /**
+ * Issued when attached to a worker.
+ */
+ prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+
+ /**
+ * Issued when detached from the worker.
+ */
+ prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+
+ /**
+ * Notifies about a new protocol message received from the session
+ * (session ID is provided in attachedToWorker notification).
+ */
+ prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+
+ /**
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
+ * enabled.
+ * It is fired when the Node process finished all code execution and is
+ * waiting for all frontends to disconnect.
+ */
+ prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+ }
+
+ // Top Level API
+
+ /**
+ * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started.
+ * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client.
+ * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
+ * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
+ * @param wait Block until a client has connected. Optional, defaults to false.
+ */
+ function open(port?: number, host?: string, wait?: boolean): void;
+
+ /**
+ * Deactivate the inspector. Blocks until there are no active connections.
+ */
+ function close(): void;
+
+ /**
+ * Return the URL of the active inspector, or `undefined` if there is none.
+ */
+ function url(): string | undefined;
+
+ /**
+ * Blocks until a client (existing or connected later) has sent
+ * `Runtime.runIfWaitingForDebugger` command.
+ * An exception will be thrown if there is no active inspector.
+ */
+ function waitForDebugger(): void;
+}
diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts
new file mode 100644
index 0000000..0778bcd
--- /dev/null
+++ b/node_modules/@types/node/module.d.ts
@@ -0,0 +1,57 @@
+declare module 'node:module' {
+ import Module = require('module');
+ export = Module;
+}
+
+declare module 'module' {
+ import { URL } from 'node:url';
+ namespace Module {
+ /**
+ * Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
+ * It does not add or remove exported names from the ES Modules.
+ */
+ function syncBuiltinESMExports(): void;
+
+ function findSourceMap(path: string, error?: Error): SourceMap;
+ interface SourceMapPayload {
+ file: string;
+ version: number;
+ sources: string[];
+ sourcesContent: string[];
+ names: string[];
+ mappings: string;
+ sourceRoot: string;
+ }
+
+ interface SourceMapping {
+ generatedLine: number;
+ generatedColumn: number;
+ originalSource: string;
+ originalLine: number;
+ originalColumn: number;
+ }
+
+ class SourceMap {
+ readonly payload: SourceMapPayload;
+ constructor(payload: SourceMapPayload);
+ findEntry(line: number, column: number): SourceMapping;
+ }
+ }
+ interface Module extends NodeModule {}
+ class Module {
+ static runMain(): void;
+ static wrap(code: string): string;
+
+ /**
+ * @deprecated Deprecated since: v12.2.0. Please use createRequire() instead.
+ */
+ static createRequireFromPath(path: string): NodeRequire;
+ static createRequire(path: string | URL): NodeRequire;
+ static builtinModules: string[];
+
+ static Module: typeof Module;
+
+ constructor(id: string, parent?: Module);
+ }
+ export = Module;
+}
diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts
new file mode 100644
index 0000000..b764dd2
--- /dev/null
+++ b/node_modules/@types/node/net.d.ts
@@ -0,0 +1,289 @@
+declare module 'node:net' {
+ export * from 'net';
+}
+
+declare module 'net' {
+ import * as stream from 'node:stream';
+ import EventEmitter = require('node:events');
+ import * as dns from 'node:dns';
+
+ type LookupFunction = (
+ hostname: string,
+ options: dns.LookupOneOptions,
+ callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
+ ) => void;
+
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+
+ interface SocketConstructorOpts {
+ fd?: number;
+ allowHalfOpen?: boolean;
+ readable?: boolean;
+ writable?: boolean;
+ }
+
+ interface OnReadOpts {
+ buffer: Uint8Array | (() => Uint8Array);
+ /**
+ * This function is called for every chunk of incoming data.
+ * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
+ * Return false from this function to implicitly pause() the socket.
+ */
+ callback(bytesWritten: number, buf: Uint8Array): boolean;
+ }
+
+ interface ConnectOpts {
+ /**
+ * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
+ * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
+ * still be emitted as normal and methods like pause() and resume() will also behave as expected.
+ */
+ onread?: OnReadOpts;
+ }
+
+ interface TcpSocketConnectOpts extends ConnectOpts {
+ port: number;
+ host?: string;
+ localAddress?: string;
+ localPort?: number;
+ hints?: number;
+ family?: number;
+ lookup?: LookupFunction;
+ }
+
+ interface IpcSocketConnectOpts extends ConnectOpts {
+ path: string;
+ }
+
+ type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
+
+ class Socket extends stream.Duplex {
+ constructor(options?: SocketConstructorOpts);
+
+ // Extended base methods
+ write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
+ write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
+
+ connect(options: SocketConnectOpts, connectionListener?: () => void): this;
+ connect(port: number, host: string, connectionListener?: () => void): this;
+ connect(port: number, connectionListener?: () => void): this;
+ connect(path: string, connectionListener?: () => void): this;
+
+ setEncoding(encoding?: BufferEncoding): this;
+ pause(): this;
+ resume(): this;
+ setTimeout(timeout: number, callback?: () => void): this;
+ setNoDelay(noDelay?: boolean): this;
+ setKeepAlive(enable?: boolean, initialDelay?: number): this;
+ address(): AddressInfo | {};
+ unref(): this;
+ ref(): this;
+
+ /** @deprecated since v14.6.0 - Use `writableLength` instead. */
+ readonly bufferSize: number;
+ readonly bytesRead: number;
+ readonly bytesWritten: number;
+ readonly connecting: boolean;
+ readonly destroyed: boolean;
+ readonly localAddress: string;
+ readonly localPort: number;
+ readonly remoteAddress?: string;
+ readonly remoteFamily?: string;
+ readonly remotePort?: number;
+
+ // Extended base methods
+ end(cb?: () => void): void;
+ end(buffer: Uint8Array | string, cb?: () => void): void;
+ end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void): void;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connect
+ * 3. data
+ * 4. drain
+ * 5. end
+ * 6. error
+ * 7. lookup
+ * 8. timeout
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: (had_error: boolean) => void): this;
+ addListener(event: "connect", listener: () => void): this;
+ addListener(event: "data", listener: (data: Buffer) => void): this;
+ addListener(event: "drain", listener: () => void): this;
+ addListener(event: "end", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ addListener(event: "timeout", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close", had_error: boolean): boolean;
+ emit(event: "connect"): boolean;
+ emit(event: "data", data: Buffer): boolean;
+ emit(event: "drain"): boolean;
+ emit(event: "end"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
+ emit(event: "timeout"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: (had_error: boolean) => void): this;
+ on(event: "connect", listener: () => void): this;
+ on(event: "data", listener: (data: Buffer) => void): this;
+ on(event: "drain", listener: () => void): this;
+ on(event: "end", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ on(event: "timeout", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: (had_error: boolean) => void): this;
+ once(event: "connect", listener: () => void): this;
+ once(event: "data", listener: (data: Buffer) => void): this;
+ once(event: "drain", listener: () => void): this;
+ once(event: "end", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ once(event: "timeout", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: (had_error: boolean) => void): this;
+ prependListener(event: "connect", listener: () => void): this;
+ prependListener(event: "data", listener: (data: Buffer) => void): this;
+ prependListener(event: "drain", listener: () => void): this;
+ prependListener(event: "end", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependListener(event: "timeout", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: (had_error: boolean) => void): this;
+ prependOnceListener(event: "connect", listener: () => void): this;
+ prependOnceListener(event: "data", listener: (data: Buffer) => void): this;
+ prependOnceListener(event: "drain", listener: () => void): this;
+ prependOnceListener(event: "end", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
+ prependOnceListener(event: "timeout", listener: () => void): this;
+ }
+
+ interface ListenOptions {
+ port?: number;
+ host?: string;
+ backlog?: number;
+ path?: string;
+ exclusive?: boolean;
+ readableAll?: boolean;
+ writableAll?: boolean;
+ /**
+ * @default false
+ */
+ ipv6Only?: boolean;
+ }
+
+ interface ServerOpts {
+ /**
+ * Indicates whether half-opened TCP connections are allowed. __Default:__ `false`.
+ */
+ allowHalfOpen?: boolean;
+
+ /**
+ * Indicates whether the socket should be paused on incoming connections. __Default:__ `false`.
+ */
+ pauseOnConnect?: boolean;
+ }
+
+ // https://github.com/nodejs/node/blob/master/lib/net.js
+ class Server extends EventEmitter {
+ constructor(connectionListener?: (socket: Socket) => void);
+ constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
+
+ listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, hostname?: string, listeningListener?: () => void): this;
+ listen(port?: number, backlog?: number, listeningListener?: () => void): this;
+ listen(port?: number, listeningListener?: () => void): this;
+ listen(path: string, backlog?: number, listeningListener?: () => void): this;
+ listen(path: string, listeningListener?: () => void): this;
+ listen(options: ListenOptions, listeningListener?: () => void): this;
+ listen(handle: any, backlog?: number, listeningListener?: () => void): this;
+ listen(handle: any, listeningListener?: () => void): this;
+ close(callback?: (err?: Error) => void): this;
+ address(): AddressInfo | string | null;
+ getConnections(cb: (error: Error | null, count: number) => void): void;
+ ref(): this;
+ unref(): this;
+ maxConnections: number;
+ connections: number;
+ listening: boolean;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. connection
+ * 3. error
+ * 4. listening
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "connection", listener: (socket: Socket) => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "listening", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "connection", socket: Socket): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "listening"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "connection", listener: (socket: Socket) => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "listening", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "connection", listener: (socket: Socket) => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "listening", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "connection", listener: (socket: Socket) => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "listening", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "listening", listener: () => void): this;
+ }
+
+ interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number;
+ }
+
+ interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
+ timeout?: number;
+ }
+
+ type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
+
+ function createServer(connectionListener?: (socket: Socket) => void): Server;
+ function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
+ function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function connect(port: number, host?: string, connectionListener?: () => void): Socket;
+ function connect(path: string, connectionListener?: () => void): Socket;
+ function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
+ function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
+ function createConnection(path: string, connectionListener?: () => void): Socket;
+ function isIP(input: string): number;
+ function isIPv4(input: string): boolean;
+ function isIPv6(input: string): boolean;
+}
diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts
new file mode 100644
index 0000000..f152ade
--- /dev/null
+++ b/node_modules/@types/node/os.d.ts
@@ -0,0 +1,243 @@
+declare module 'node:os' {
+ export * from 'os';
+}
+
+declare module 'os' {
+ interface CpuInfo {
+ model: string;
+ speed: number;
+ times: {
+ user: number;
+ nice: number;
+ sys: number;
+ idle: number;
+ irq: number;
+ };
+ }
+
+ interface NetworkInterfaceBase {
+ address: string;
+ netmask: string;
+ mac: string;
+ internal: boolean;
+ cidr: string | null;
+ }
+
+ interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
+ family: "IPv4";
+ }
+
+ interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
+ family: "IPv6";
+ scopeid: number;
+ }
+
+ interface UserInfo<T> {
+ username: T;
+ uid: number;
+ gid: number;
+ shell: T;
+ homedir: T;
+ }
+
+ type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
+
+ function hostname(): string;
+ function loadavg(): number[];
+ function uptime(): number;
+ function freemem(): number;
+ function totalmem(): number;
+ function cpus(): CpuInfo[];
+ function type(): string;
+ function release(): string;
+ function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
+ function homedir(): string;
+ function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
+ function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
+
+ type SignalConstants = {
+ [key in NodeJS.Signals]: number;
+ };
+
+ namespace constants {
+ const UV_UDP_REUSEADDR: number;
+ namespace signals {}
+ const signals: SignalConstants;
+ namespace errno {
+ const E2BIG: number;
+ const EACCES: number;
+ const EADDRINUSE: number;
+ const EADDRNOTAVAIL: number;
+ const EAFNOSUPPORT: number;
+ const EAGAIN: number;
+ const EALREADY: number;
+ const EBADF: number;
+ const EBADMSG: number;
+ const EBUSY: number;
+ const ECANCELED: number;
+ const ECHILD: number;
+ const ECONNABORTED: number;
+ const ECONNREFUSED: number;
+ const ECONNRESET: number;
+ const EDEADLK: number;
+ const EDESTADDRREQ: number;
+ const EDOM: number;
+ const EDQUOT: number;
+ const EEXIST: number;
+ const EFAULT: number;
+ const EFBIG: number;
+ const EHOSTUNREACH: number;
+ const EIDRM: number;
+ const EILSEQ: number;
+ const EINPROGRESS: number;
+ const EINTR: number;
+ const EINVAL: number;
+ const EIO: number;
+ const EISCONN: number;
+ const EISDIR: number;
+ const ELOOP: number;
+ const EMFILE: number;
+ const EMLINK: number;
+ const EMSGSIZE: number;
+ const EMULTIHOP: number;
+ const ENAMETOOLONG: number;
+ const ENETDOWN: number;
+ const ENETRESET: number;
+ const ENETUNREACH: number;
+ const ENFILE: number;
+ const ENOBUFS: number;
+ const ENODATA: number;
+ const ENODEV: number;
+ const ENOENT: number;
+ const ENOEXEC: number;
+ const ENOLCK: number;
+ const ENOLINK: number;
+ const ENOMEM: number;
+ const ENOMSG: number;
+ const ENOPROTOOPT: number;
+ const ENOSPC: number;
+ const ENOSR: number;
+ const ENOSTR: number;
+ const ENOSYS: number;
+ const ENOTCONN: number;
+ const ENOTDIR: number;
+ const ENOTEMPTY: number;
+ const ENOTSOCK: number;
+ const ENOTSUP: number;
+ const ENOTTY: number;
+ const ENXIO: number;
+ const EOPNOTSUPP: number;
+ const EOVERFLOW: number;
+ const EPERM: number;
+ const EPIPE: number;
+ const EPROTO: number;
+ const EPROTONOSUPPORT: number;
+ const EPROTOTYPE: number;
+ const ERANGE: number;
+ const EROFS: number;
+ const ESPIPE: number;
+ const ESRCH: number;
+ const ESTALE: number;
+ const ETIME: number;
+ const ETIMEDOUT: number;
+ const ETXTBSY: number;
+ const EWOULDBLOCK: number;
+ const EXDEV: number;
+ const WSAEINTR: number;
+ const WSAEBADF: number;
+ const WSAEACCES: number;
+ const WSAEFAULT: number;
+ const WSAEINVAL: number;
+ const WSAEMFILE: number;
+ const WSAEWOULDBLOCK: number;
+ const WSAEINPROGRESS: number;
+ const WSAEALREADY: number;
+ const WSAENOTSOCK: number;
+ const WSAEDESTADDRREQ: number;
+ const WSAEMSGSIZE: number;
+ const WSAEPROTOTYPE: number;
+ const WSAENOPROTOOPT: number;
+ const WSAEPROTONOSUPPORT: number;
+ const WSAESOCKTNOSUPPORT: number;
+ const WSAEOPNOTSUPP: number;
+ const WSAEPFNOSUPPORT: number;
+ const WSAEAFNOSUPPORT: number;
+ const WSAEADDRINUSE: number;
+ const WSAEADDRNOTAVAIL: number;
+ const WSAENETDOWN: number;
+ const WSAENETUNREACH: number;
+ const WSAENETRESET: number;
+ const WSAECONNABORTED: number;
+ const WSAECONNRESET: number;
+ const WSAENOBUFS: number;
+ const WSAEISCONN: number;
+ const WSAENOTCONN: number;
+ const WSAESHUTDOWN: number;
+ const WSAETOOMANYREFS: number;
+ const WSAETIMEDOUT: number;
+ const WSAECONNREFUSED: number;
+ const WSAELOOP: number;
+ const WSAENAMETOOLONG: number;
+ const WSAEHOSTDOWN: number;
+ const WSAEHOSTUNREACH: number;
+ const WSAENOTEMPTY: number;
+ const WSAEPROCLIM: number;
+ const WSAEUSERS: number;
+ const WSAEDQUOT: number;
+ const WSAESTALE: number;
+ const WSAEREMOTE: number;
+ const WSASYSNOTREADY: number;
+ const WSAVERNOTSUPPORTED: number;
+ const WSANOTINITIALISED: number;
+ const WSAEDISCON: number;
+ const WSAENOMORE: number;
+ const WSAECANCELLED: number;
+ const WSAEINVALIDPROCTABLE: number;
+ const WSAEINVALIDPROVIDER: number;
+ const WSAEPROVIDERFAILEDINIT: number;
+ const WSASYSCALLFAILURE: number;
+ const WSASERVICE_NOT_FOUND: number;
+ const WSATYPE_NOT_FOUND: number;
+ const WSA_E_NO_MORE: number;
+ const WSA_E_CANCELLED: number;
+ const WSAEREFUSED: number;
+ }
+ namespace priority {
+ const PRIORITY_LOW: number;
+ const PRIORITY_BELOW_NORMAL: number;
+ const PRIORITY_NORMAL: number;
+ const PRIORITY_ABOVE_NORMAL: number;
+ const PRIORITY_HIGH: number;
+ const PRIORITY_HIGHEST: number;
+ }
+ }
+
+ function arch(): string;
+ /**
+ * Returns a string identifying the kernel version.
+ * On POSIX systems, the operating system release is determined by calling
+ * [uname(3)][]. On Windows, `pRtlGetVersion` is used, and if it is not available,
+ * `GetVersionExW()` will be used. See
+ * https://en.wikipedia.org/wiki/Uname#Examples for more information.
+ */
+ function version(): string;
+ function platform(): NodeJS.Platform;
+ function tmpdir(): string;
+ const EOL: string;
+ function endianness(): "BE" | "LE";
+ /**
+ * Gets the priority of a process.
+ * Defaults to current process.
+ */
+ function getPriority(pid?: number): number;
+ /**
+ * Sets the priority of the current process.
+ * @param priority Must be in range of -20 to 19
+ */
+ function setPriority(priority: number): void;
+ /**
+ * Sets the priority of the process specified process.
+ * @param priority Must be in range of -20 to 19
+ */
+ function setPriority(pid: number, priority: number): void;
+}
diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json
new file mode 100644
index 0000000..b0d413e
--- /dev/null
+++ b/node_modules/@types/node/package.json
@@ -0,0 +1,229 @@
+{
+ "_from": "@types/node@*",
+ "_id": "@types/node@14.14.31",
+ "_inBundle": false,
+ "_integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==",
+ "_location": "/@types/node",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "@types/node@*",
+ "name": "@types/node",
+ "escapedName": "@types%2fnode",
+ "scope": "@types",
+ "rawSpec": "*",
+ "saveSpec": null,
+ "fetchSpec": "*"
+ },
+ "_requiredBy": [
+ "/@types/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz",
+ "_shasum": "72286bd33d137aa0d152d47ec7c1762563d34055",
+ "_spec": "@types/node@*",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/@types/readable-stream",
+ "bugs": {
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Microsoft TypeScript",
+ "url": "https://github.com/Microsoft"
+ },
+ {
+ "name": "DefinitelyTyped",
+ "url": "https://github.com/DefinitelyTyped"
+ },
+ {
+ "name": "Alberto Schiabel",
+ "url": "https://github.com/jkomyno"
+ },
+ {
+ "name": "Alvis HT Tang",
+ "url": "https://github.com/alvis"
+ },
+ {
+ "name": "Andrew Makarov",
+ "url": "https://github.com/r3nya"
+ },
+ {
+ "name": "Benjamin Toueg",
+ "url": "https://github.com/btoueg"
+ },
+ {
+ "name": "Bruno Scheufler",
+ "url": "https://github.com/brunoscheufler"
+ },
+ {
+ "name": "Chigozirim C.",
+ "url": "https://github.com/smac89"
+ },
+ {
+ "name": "David Junger",
+ "url": "https://github.com/touffy"
+ },
+ {
+ "name": "Deividas Bakanas",
+ "url": "https://github.com/DeividasBakanas"
+ },
+ {
+ "name": "Eugene Y. Q. Shen",
+ "url": "https://github.com/eyqs"
+ },
+ {
+ "name": "Hannes Magnusson",
+ "url": "https://github.com/Hannes-Magnusson-CK"
+ },
+ {
+ "name": "Hoàng Văn Khải",
+ "url": "https://github.com/KSXGitHub"
+ },
+ {
+ "name": "Huw",
+ "url": "https://github.com/hoo29"
+ },
+ {
+ "name": "Kelvin Jin",
+ "url": "https://github.com/kjin"
+ },
+ {
+ "name": "Klaus Meinhardt",
+ "url": "https://github.com/ajafff"
+ },
+ {
+ "name": "Lishude",
+ "url": "https://github.com/islishude"
+ },
+ {
+ "name": "Mariusz Wiktorczyk",
+ "url": "https://github.com/mwiktorczyk"
+ },
+ {
+ "name": "Mohsen Azimi",
+ "url": "https://github.com/mohsen1"
+ },
+ {
+ "name": "Nicolas Even",
+ "url": "https://github.com/n-e"
+ },
+ {
+ "name": "Nikita Galkin",
+ "url": "https://github.com/galkin"
+ },
+ {
+ "name": "Parambir Singh",
+ "url": "https://github.com/parambirs"
+ },
+ {
+ "name": "Sebastian Silbermann",
+ "url": "https://github.com/eps1lon"
+ },
+ {
+ "name": "Simon Schick",
+ "url": "https://github.com/SimonSchick"
+ },
+ {
+ "name": "Thomas den Hollander",
+ "url": "https://github.com/ThomasdenH"
+ },
+ {
+ "name": "Wilco Bakker",
+ "url": "https://github.com/WilcoBakker"
+ },
+ {
+ "name": "wwwy3y3",
+ "url": "https://github.com/wwwy3y3"
+ },
+ {
+ "name": "Samuel Ainsworth",
+ "url": "https://github.com/samuela"
+ },
+ {
+ "name": "Kyle Uehlein",
+ "url": "https://github.com/kuehlein"
+ },
+ {
+ "name": "Thanik Bhongbhibhat",
+ "url": "https://github.com/bhongy"
+ },
+ {
+ "name": "Marcin Kopacz",
+ "url": "https://github.com/chyzwar"
+ },
+ {
+ "name": "Trivikram Kamat",
+ "url": "https://github.com/trivikr"
+ },
+ {
+ "name": "Minh Son Nguyen",
+ "url": "https://github.com/nguymin4"
+ },
+ {
+ "name": "Junxiao Shi",
+ "url": "https://github.com/yoursunny"
+ },
+ {
+ "name": "Ilia Baryshnikov",
+ "url": "https://github.com/qwelias"
+ },
+ {
+ "name": "ExE Boss",
+ "url": "https://github.com/ExE-Boss"
+ },
+ {
+ "name": "Surasak Chaisurin",
+ "url": "https://github.com/Ryan-Willpower"
+ },
+ {
+ "name": "Piotr Błażejewicz",
+ "url": "https://github.com/peterblazejewicz"
+ },
+ {
+ "name": "Anna Henningsen",
+ "url": "https://github.com/addaleax"
+ },
+ {
+ "name": "Jason Kwok",
+ "url": "https://github.com/JasonHK"
+ },
+ {
+ "name": "Victor Perin",
+ "url": "https://github.com/victorperin"
+ },
+ {
+ "name": "Yongsheng Zhang",
+ "url": "https://github.com/ZYSzys"
+ }
+ ],
+ "dependencies": {},
+ "deprecated": false,
+ "description": "TypeScript definitions for Node.js",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
+ "license": "MIT",
+ "main": "",
+ "name": "@types/node",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/node"
+ },
+ "scripts": {},
+ "typeScriptVersion": "3.4",
+ "types": "index.d.ts",
+ "typesPublisherContentHash": "e35e9f1e1be2150998638a2f9485b5e421a39bcfa3f02c37f4c39c69eeffef7b",
+ "typesVersions": {
+ "<=3.4": {
+ "*": [
+ "ts3.4/*"
+ ]
+ },
+ "<=3.6": {
+ "*": [
+ "ts3.6/*"
+ ]
+ }
+ },
+ "version": "14.14.31"
+}
diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts
new file mode 100644
index 0000000..39adcaf
--- /dev/null
+++ b/node_modules/@types/node/path.d.ts
@@ -0,0 +1,158 @@
+declare module 'node:path' {
+ import path = require('path');
+ export = path;
+}
+
+declare module 'path' {
+ namespace path {
+ /**
+ * A parsed path object generated by path.parse() or consumed by path.format().
+ */
+ interface ParsedPath {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name: string;
+ }
+
+ interface FormatInputPathObject {
+ /**
+ * The root of the path such as '/' or 'c:\'
+ */
+ root?: string;
+ /**
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+ */
+ dir?: string;
+ /**
+ * The file name including extension (if any) such as 'index.html'
+ */
+ base?: string;
+ /**
+ * The file extension (if any) such as '.html'
+ */
+ ext?: string;
+ /**
+ * The file name without extension (if any) such as 'index'
+ */
+ name?: string;
+ }
+
+ interface PlatformPath {
+ /**
+ * Normalize a string path, reducing '..' and '.' parts.
+ * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
+ *
+ * @param p string path to normalize.
+ */
+ normalize(p: string): string;
+ /**
+ * Join all arguments together and normalize the resulting path.
+ * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
+ *
+ * @param paths paths to join.
+ */
+ join(...paths: string[]): string;
+ /**
+ * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
+ *
+ * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
+ *
+ * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
+ * until an absolute path is found. If after using all {from} paths still no absolute path is found,
+ * the current working directory is used as well. The resulting path is normalized,
+ * and trailing slashes are removed unless the path gets resolved to the root directory.
+ *
+ * @param pathSegments string paths to join. Non-string arguments are ignored.
+ */
+ resolve(...pathSegments: string[]): string;
+ /**
+ * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
+ *
+ * @param path path to test.
+ */
+ isAbsolute(p: string): boolean;
+ /**
+ * Solve the relative path from {from} to {to}.
+ * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
+ */
+ relative(from: string, to: string): string;
+ /**
+ * Return the directory name of a path. Similar to the Unix dirname command.
+ *
+ * @param p the path to evaluate.
+ */
+ dirname(p: string): string;
+ /**
+ * Return the last portion of a path. Similar to the Unix basename command.
+ * Often used to extract the file name from a fully qualified path.
+ *
+ * @param p the path to evaluate.
+ * @param ext optionally, an extension to remove from the result.
+ */
+ basename(p: string, ext?: string): string;
+ /**
+ * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
+ * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
+ *
+ * @param p the path to evaluate.
+ */
+ extname(p: string): string;
+ /**
+ * The platform-specific file separator. '\\' or '/'.
+ */
+ readonly sep: string;
+ /**
+ * The platform-specific file delimiter. ';' or ':'.
+ */
+ readonly delimiter: string;
+ /**
+ * Returns an object from a path string - the opposite of format().
+ *
+ * @param pathString path to evaluate.
+ */
+ parse(p: string): ParsedPath;
+ /**
+ * Returns a path string from an object - the opposite of parse().
+ *
+ * @param pathString path to evaluate.
+ */
+ format(pP: FormatInputPathObject): string;
+ /**
+ * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
+ * If path is not a string, path will be returned without modifications.
+ * This method is meaningful only on Windows system.
+ * On POSIX systems, the method is non-operational and always returns path without modifications.
+ */
+ toNamespacedPath(path: string): string;
+ /**
+ * Posix specific pathing.
+ * Same as parent object on posix.
+ */
+ readonly posix: PlatformPath;
+ /**
+ * Windows specific pathing.
+ * Same as parent object on windows
+ */
+ readonly win32: PlatformPath;
+ }
+ }
+ const path: path.PlatformPath;
+ export = path;
+}
diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts
new file mode 100644
index 0000000..6c858ef
--- /dev/null
+++ b/node_modules/@types/node/perf_hooks.d.ts
@@ -0,0 +1,275 @@
+declare module 'node:perf_hooks' {
+ export * from 'perf_hooks';
+}
+
+declare module 'perf_hooks' {
+ import { AsyncResource } from 'node:async_hooks';
+
+ type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
+
+ interface PerformanceEntry {
+ /**
+ * The total number of milliseconds elapsed for this entry.
+ * This value will not be meaningful for all Performance Entry types.
+ */
+ readonly duration: number;
+
+ /**
+ * The name of the performance entry.
+ */
+ readonly name: string;
+
+ /**
+ * The high resolution millisecond timestamp marking the starting time of the Performance Entry.
+ */
+ readonly startTime: number;
+
+ /**
+ * The type of the performance entry.
+ * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'.
+ */
+ readonly entryType: EntryType;
+
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
+ * the type of garbage collection operation that occurred.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly kind?: number;
+
+ /**
+ * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
+ * property contains additional information about garbage collection operation.
+ * See perf_hooks.constants for valid values.
+ */
+ readonly flags?: number;
+ }
+
+ interface PerformanceNodeTiming extends PerformanceEntry {
+ /**
+ * The high resolution millisecond timestamp at which the Node.js process completed bootstrap.
+ */
+ readonly bootstrapComplete: number;
+
+ /**
+ * The high resolution millisecond timestamp at which the Node.js process completed bootstrapping.
+ * If bootstrapping has not yet finished, the property has the value of -1.
+ */
+ readonly environment: number;
+
+ /**
+ * The high resolution millisecond timestamp at which the Node.js environment was initialized.
+ */
+ readonly idleTime: number;
+
+ /**
+ * The high resolution millisecond timestamp of the amount of time the event loop has been idle
+ * within the event loop's event provider (e.g. `epoll_wait`). This does not take CPU usage
+ * into consideration. If the event loop has not yet started (e.g., in the first tick of the main script),
+ * the property has the value of 0.
+ */
+ readonly loopExit: number;
+
+ /**
+ * The high resolution millisecond timestamp at which the Node.js event loop started.
+ * If the event loop has not yet started (e.g., in the first tick of the main script), the property has the value of -1.
+ */
+ readonly loopStart: number;
+
+ /**
+ * The high resolution millisecond timestamp at which the V8 platform was initialized.
+ */
+ readonly v8Start: number;
+ }
+
+ interface EventLoopUtilization {
+ idle: number;
+ active: number;
+ utilization: number;
+ }
+
+ interface Performance {
+ /**
+ * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
+ * If name is provided, removes only the named mark.
+ * @param name
+ */
+ clearMarks(name?: string): void;
+
+ /**
+ * Creates a new PerformanceMark entry in the Performance Timeline.
+ * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
+ * and whose performanceEntry.duration is always 0.
+ * Performance marks are used to mark specific significant moments in the Performance Timeline.
+ * @param name
+ */
+ mark(name?: string): void;
+
+ /**
+ * Creates a new PerformanceMeasure entry in the Performance Timeline.
+ * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
+ * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
+ *
+ * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
+ * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
+ * then startMark is set to timeOrigin by default.
+ *
+ * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
+ * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
+ * @param name
+ * @param startMark
+ * @param endMark
+ */
+ measure(name: string, startMark: string, endMark: string): void;
+
+ /**
+ * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
+ */
+ readonly nodeTiming: PerformanceNodeTiming;
+
+ /**
+ * @return the current high resolution millisecond timestamp
+ */
+ now(): number;
+
+ /**
+ * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
+ */
+ readonly timeOrigin: number;
+
+ /**
+ * Wraps a function within a new function that measures the running time of the wrapped function.
+ * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
+ * @param fn
+ */
+ timerify<T extends (...optionalParams: any[]) => any>(fn: T): T;
+
+ /**
+ * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
+ * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
+ * No other CPU idle time is taken into consideration.
+ *
+ * @param util1 The result of a previous call to eventLoopUtilization()
+ * @param util2 The result of a previous call to eventLoopUtilization() prior to util1
+ */
+ eventLoopUtilization(util1?: EventLoopUtilization, util2?: EventLoopUtilization): EventLoopUtilization;
+ }
+
+ interface PerformanceObserverEntryList {
+ /**
+ * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime.
+ */
+ getEntries(): PerformanceEntry[];
+
+ /**
+ * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
+ * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type.
+ */
+ getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
+
+ /**
+ * @return Returns a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
+ * whose performanceEntry.entryType is equal to type.
+ */
+ getEntriesByType(type: EntryType): PerformanceEntry[];
+ }
+
+ type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
+
+ class PerformanceObserver extends AsyncResource {
+ constructor(callback: PerformanceObserverCallback);
+
+ /**
+ * Disconnects the PerformanceObserver instance from all notifications.
+ */
+ disconnect(): void;
+
+ /**
+ * Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes.
+ * When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance.
+ * Property buffered defaults to false.
+ * @param options
+ */
+ observe(options: { entryTypes: ReadonlyArray<EntryType>; buffered?: boolean }): void;
+ }
+
+ namespace constants {
+ const NODE_PERFORMANCE_GC_MAJOR: number;
+ const NODE_PERFORMANCE_GC_MINOR: number;
+ const NODE_PERFORMANCE_GC_INCREMENTAL: number;
+ const NODE_PERFORMANCE_GC_WEAKCB: number;
+
+ const NODE_PERFORMANCE_GC_FLAGS_NO: number;
+ const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
+ const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
+ }
+
+ const performance: Performance;
+
+ interface EventLoopMonitorOptions {
+ /**
+ * The sampling rate in milliseconds.
+ * Must be greater than zero.
+ * @default 10
+ */
+ resolution?: number;
+ }
+
+ interface EventLoopDelayMonitor {
+ /**
+ * Enables the event loop delay sample timer. Returns `true` if the timer was started, `false` if it was already started.
+ */
+ enable(): boolean;
+ /**
+ * Disables the event loop delay sample timer. Returns `true` if the timer was stopped, `false` if it was already stopped.
+ */
+ disable(): boolean;
+
+ /**
+ * Resets the collected histogram data.
+ */
+ reset(): void;
+
+ /**
+ * Returns the value at the given percentile.
+ * @param percentile A percentile value between 1 and 100.
+ */
+ percentile(percentile: number): number;
+
+ /**
+ * A `Map` object detailing the accumulated percentile distribution.
+ */
+ readonly percentiles: Map<number, number>;
+
+ /**
+ * The number of times the event loop delay exceeded the maximum 1 hour eventloop delay threshold.
+ */
+ readonly exceeds: number;
+
+ /**
+ * The minimum recorded event loop delay.
+ */
+ readonly min: number;
+
+ /**
+ * The maximum recorded event loop delay.
+ */
+ readonly max: number;
+
+ /**
+ * The mean of the recorded event loop delays.
+ */
+ readonly mean: number;
+
+ /**
+ * The standard deviation of the recorded event loop delays.
+ */
+ readonly stddev: number;
+ }
+
+ function monitorEventLoopDelay(options?: EventLoopMonitorOptions): EventLoopDelayMonitor;
+}
diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts
new file mode 100644
index 0000000..8538135
--- /dev/null
+++ b/node_modules/@types/node/process.d.ts
@@ -0,0 +1,412 @@
+declare module 'node:process' {
+ export = process;
+}
+
+declare module 'process' {
+ import * as tty from 'node:tty';
+
+ global {
+ var process: NodeJS.Process;
+
+ namespace NodeJS {
+ // this namespace merge is here because these are specifically used
+ // as the type for process.stdin, process.stdout, and process.stderr.
+ // they can't live in tty.d.ts because we need to disambiguate the imported name.
+ interface ReadStream extends tty.ReadStream {}
+ interface WriteStream extends tty.WriteStream {}
+
+ interface MemoryUsage {
+ rss: number;
+ heapTotal: number;
+ heapUsed: number;
+ external: number;
+ arrayBuffers: number;
+ }
+
+ interface CpuUsage {
+ user: number;
+ system: number;
+ }
+
+ interface ProcessRelease {
+ name: string;
+ sourceUrl?: string;
+ headersUrl?: string;
+ libUrl?: string;
+ lts?: string;
+ }
+
+ interface ProcessVersions extends Dict<string> {
+ http_parser: string;
+ node: string;
+ v8: string;
+ ares: string;
+ uv: string;
+ zlib: string;
+ modules: string;
+ openssl: string;
+ }
+
+ type Platform = 'aix'
+ | 'android'
+ | 'darwin'
+ | 'freebsd'
+ | 'linux'
+ | 'openbsd'
+ | 'sunos'
+ | 'win32'
+ | 'cygwin'
+ | 'netbsd';
+
+ type Signals =
+ "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" |
+ "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" |
+ "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" |
+ "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO";
+
+ type MultipleResolveType = 'resolve' | 'reject';
+
+ type BeforeExitListener = (code: number) => void;
+ type DisconnectListener = () => void;
+ type ExitListener = (code: number) => void;
+ type RejectionHandledListener = (promise: Promise<any>) => void;
+ type UncaughtExceptionListener = (error: Error) => void;
+ type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise<any>) => void;
+ type WarningListener = (warning: Error) => void;
+ type MessageListener = (message: any, sendHandle: any) => void;
+ type SignalsListener = (signal: Signals) => void;
+ type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
+ type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
+ type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<any>, value: any) => void;
+
+ interface Socket extends ReadWriteStream {
+ isTTY?: true;
+ }
+
+ // Alias for compatibility
+ interface ProcessEnv extends Dict<string> {}
+
+ interface HRTime {
+ (time?: [number, number]): [number, number];
+ bigint(): bigint;
+ }
+
+ interface ProcessReport {
+ /**
+ * Directory where the report is written.
+ * working directory of the Node.js process.
+ * @default '' indicating that reports are written to the current
+ */
+ directory: string;
+
+ /**
+ * Filename where the report is written.
+ * The default value is the empty string.
+ * @default '' the output filename will be comprised of a timestamp,
+ * PID, and sequence number.
+ */
+ filename: string;
+
+ /**
+ * Returns a JSON-formatted diagnostic report for the running process.
+ * The report's JavaScript stack trace is taken from err, if present.
+ */
+ getReport(err?: Error): string;
+
+ /**
+ * If true, a diagnostic report is generated on fatal errors,
+ * such as out of memory errors or failed C++ assertions.
+ * @default false
+ */
+ reportOnFatalError: boolean;
+
+ /**
+ * If true, a diagnostic report is generated when the process
+ * receives the signal specified by process.report.signal.
+ * @defaul false
+ */
+ reportOnSignal: boolean;
+
+ /**
+ * If true, a diagnostic report is generated on uncaught exception.
+ * @default false
+ */
+ reportOnUncaughtException: boolean;
+
+ /**
+ * The signal used to trigger the creation of a diagnostic report.
+ * @default 'SIGUSR2'
+ */
+ signal: Signals;
+
+ /**
+ * Writes a diagnostic report to a file. If filename is not provided, the default filename
+ * includes the date, time, PID, and a sequence number.
+ * The report's JavaScript stack trace is taken from err, if present.
+ *
+ * @param fileName Name of the file where the report is written.
+ * This should be a relative path, that will be appended to the directory specified in
+ * `process.report.directory`, or the current working directory of the Node.js process,
+ * if unspecified.
+ * @param error A custom error used for reporting the JavaScript stack.
+ * @return Filename of the generated report.
+ */
+ writeReport(fileName?: string): string;
+ writeReport(error?: Error): string;
+ writeReport(fileName?: string, err?: Error): string;
+ }
+
+ interface ResourceUsage {
+ fsRead: number;
+ fsWrite: number;
+ involuntaryContextSwitches: number;
+ ipcReceived: number;
+ ipcSent: number;
+ majorPageFault: number;
+ maxRSS: number;
+ minorPageFault: number;
+ sharedMemorySize: number;
+ signalsCount: number;
+ swappedOut: number;
+ systemCPUTime: number;
+ unsharedDataSize: number;
+ unsharedStackSize: number;
+ userCPUTime: number;
+ voluntaryContextSwitches: number;
+ }
+
+ interface Process extends EventEmitter {
+ /**
+ * Can also be a tty.WriteStream, not typed due to limitations.
+ */
+ stdout: WriteStream & {
+ fd: 1;
+ };
+ /**
+ * Can also be a tty.WriteStream, not typed due to limitations.
+ */
+ stderr: WriteStream & {
+ fd: 2;
+ };
+ stdin: ReadStream & {
+ fd: 0;
+ };
+ openStdin(): Socket;
+ argv: string[];
+ argv0: string;
+ execArgv: string[];
+ execPath: string;
+ abort(): never;
+ chdir(directory: string): void;
+ cwd(): string;
+ debugPort: number;
+ emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
+ env: ProcessEnv;
+ exit(code?: number): never;
+ exitCode?: number;
+ getgid(): number;
+ setgid(id: number | string): void;
+ getuid(): number;
+ setuid(id: number | string): void;
+ geteuid(): number;
+ seteuid(id: number | string): void;
+ getegid(): number;
+ setegid(id: number | string): void;
+ getgroups(): number[];
+ setgroups(groups: ReadonlyArray<string | number>): void;
+ setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
+ hasUncaughtExceptionCaptureCallback(): boolean;
+ version: string;
+ versions: ProcessVersions;
+ config: {
+ target_defaults: {
+ cflags: any[];
+ default_configuration: string;
+ defines: string[];
+ include_dirs: string[];
+ libraries: string[];
+ };
+ variables: {
+ clang: number;
+ host_arch: string;
+ node_install_npm: boolean;
+ node_install_waf: boolean;
+ node_prefix: string;
+ node_shared_openssl: boolean;
+ node_shared_v8: boolean;
+ node_shared_zlib: boolean;
+ node_use_dtrace: boolean;
+ node_use_etw: boolean;
+ node_use_openssl: boolean;
+ target_arch: string;
+ v8_no_strict_aliasing: number;
+ v8_use_snapshot: boolean;
+ visibility: string;
+ };
+ };
+ kill(pid: number, signal?: string | number): true;
+ pid: number;
+ ppid: number;
+ title: string;
+ arch: string;
+ platform: Platform;
+ /** @deprecated since v14.0.0 - use `require.main` instead. */
+ mainModule?: Module;
+ memoryUsage(): MemoryUsage;
+ cpuUsage(previousValue?: CpuUsage): CpuUsage;
+ nextTick(callback: Function, ...args: any[]): void;
+ release: ProcessRelease;
+ features: {
+ inspector: boolean;
+ debug: boolean;
+ uv: boolean;
+ ipv6: boolean;
+ tls_alpn: boolean;
+ tls_sni: boolean;
+ tls_ocsp: boolean;
+ tls: boolean;
+ };
+ /**
+ * @deprecated since v14.0.0 - Calling process.umask() with no argument causes
+ * the process-wide umask to be written twice. This introduces a race condition between threads,
+ * and is a potential security vulnerability. There is no safe, cross-platform alternative API.
+ */
+ umask(): number;
+ /**
+ * Can only be set if not in worker thread.
+ */
+ umask(mask: string | number): number;
+ uptime(): number;
+ hrtime: HRTime;
+ domain: Domain;
+
+ // Worker
+ send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean}, callback?: (error: Error | null) => void): boolean;
+ disconnect(): void;
+ connected: boolean;
+
+ /**
+ * The `process.allowedNodeEnvironmentFlags` property is a special,
+ * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][]
+ * environment variable.
+ */
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
+
+ /**
+ * Only available with `--experimental-report`
+ */
+ report?: ProcessReport;
+
+ resourceUsage(): ResourceUsage;
+
+ traceDeprecation: boolean;
+
+ /* EventEmitter */
+ addListener(event: "beforeExit", listener: BeforeExitListener): this;
+ addListener(event: "disconnect", listener: DisconnectListener): this;
+ addListener(event: "exit", listener: ExitListener): this;
+ addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
+ addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ addListener(event: "warning", listener: WarningListener): this;
+ addListener(event: "message", listener: MessageListener): this;
+ addListener(event: Signals, listener: SignalsListener): this;
+ addListener(event: "newListener", listener: NewListenerListener): this;
+ addListener(event: "removeListener", listener: RemoveListenerListener): this;
+ addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ emit(event: "beforeExit", code: number): boolean;
+ emit(event: "disconnect"): boolean;
+ emit(event: "exit", code: number): boolean;
+ emit(event: "rejectionHandled", promise: Promise<any>): boolean;
+ emit(event: "uncaughtException", error: Error): boolean;
+ emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
+ emit(event: "unhandledRejection", reason: any, promise: Promise<any>): boolean;
+ emit(event: "warning", warning: Error): boolean;
+ emit(event: "message", message: any, sendHandle: any): this;
+ emit(event: Signals, signal: Signals): boolean;
+ emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this;
+ emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this;
+ emit(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ on(event: "beforeExit", listener: BeforeExitListener): this;
+ on(event: "disconnect", listener: DisconnectListener): this;
+ on(event: "exit", listener: ExitListener): this;
+ on(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
+ on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ on(event: "warning", listener: WarningListener): this;
+ on(event: "message", listener: MessageListener): this;
+ on(event: Signals, listener: SignalsListener): this;
+ on(event: "newListener", listener: NewListenerListener): this;
+ on(event: "removeListener", listener: RemoveListenerListener): this;
+ on(event: "multipleResolves", listener: MultipleResolveListener): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "beforeExit", listener: BeforeExitListener): this;
+ once(event: "disconnect", listener: DisconnectListener): this;
+ once(event: "exit", listener: ExitListener): this;
+ once(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
+ once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ once(event: "warning", listener: WarningListener): this;
+ once(event: "message", listener: MessageListener): this;
+ once(event: Signals, listener: SignalsListener): this;
+ once(event: "newListener", listener: NewListenerListener): this;
+ once(event: "removeListener", listener: RemoveListenerListener): this;
+ once(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ prependListener(event: "beforeExit", listener: BeforeExitListener): this;
+ prependListener(event: "disconnect", listener: DisconnectListener): this;
+ prependListener(event: "exit", listener: ExitListener): this;
+ prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
+ prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ prependListener(event: "warning", listener: WarningListener): this;
+ prependListener(event: "message", listener: MessageListener): this;
+ prependListener(event: Signals, listener: SignalsListener): this;
+ prependListener(event: "newListener", listener: NewListenerListener): this;
+ prependListener(event: "removeListener", listener: RemoveListenerListener): this;
+ prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
+ prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
+ prependOnceListener(event: "exit", listener: ExitListener): this;
+ prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
+ prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
+ prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
+ prependOnceListener(event: "warning", listener: WarningListener): this;
+ prependOnceListener(event: "message", listener: MessageListener): this;
+ prependOnceListener(event: Signals, listener: SignalsListener): this;
+ prependOnceListener(event: "newListener", listener: NewListenerListener): this;
+ prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this;
+ prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
+
+ listeners(event: "beforeExit"): BeforeExitListener[];
+ listeners(event: "disconnect"): DisconnectListener[];
+ listeners(event: "exit"): ExitListener[];
+ listeners(event: "rejectionHandled"): RejectionHandledListener[];
+ listeners(event: "uncaughtException"): UncaughtExceptionListener[];
+ listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
+ listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
+ listeners(event: "warning"): WarningListener[];
+ listeners(event: "message"): MessageListener[];
+ listeners(event: Signals): SignalsListener[];
+ listeners(event: "newListener"): NewListenerListener[];
+ listeners(event: "removeListener"): RemoveListenerListener[];
+ listeners(event: "multipleResolves"): MultipleResolveListener[];
+ }
+
+ interface Global {
+ process: Process;
+ }
+ }
+ }
+
+ export = process;
+}
diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts
new file mode 100644
index 0000000..593e9cb
--- /dev/null
+++ b/node_modules/@types/node/punycode.d.ts
@@ -0,0 +1,86 @@
+/**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+declare module 'node:punycode' {
+ export * from 'punycode';
+}
+
+/**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+declare module 'punycode' {
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ function decode(string: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ function encode(string: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ function toUnicode(domain: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ function toASCII(domain: string): string;
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const ucs2: ucs2;
+ interface ucs2 {
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ decode(string: string): number[];
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ encode(codePoints: ReadonlyArray<number>): string;
+ }
+ /**
+ * @deprecated since v7.0.0
+ * The version of the punycode module bundled in Node.js is being deprecated.
+ * In a future major version of Node.js this module will be removed.
+ * Users currently depending on the punycode module should switch to using
+ * the userland-provided Punycode.js module instead.
+ */
+ const version: string;
+}
diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts
new file mode 100644
index 0000000..e37234c
--- /dev/null
+++ b/node_modules/@types/node/querystring.d.ts
@@ -0,0 +1,32 @@
+declare module 'node:querystring' {
+ export * from 'querystring';
+}
+
+declare module 'querystring' {
+ interface StringifyOptions {
+ encodeURIComponent?: (str: string) => string;
+ }
+
+ interface ParseOptions {
+ maxKeys?: number;
+ decodeURIComponent?: (str: string) => string;
+ }
+
+ interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> { }
+
+ interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {
+ }
+
+ function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
+ function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
+ /**
+ * The querystring.encode() function is an alias for querystring.stringify().
+ */
+ const encode: typeof stringify;
+ /**
+ * The querystring.decode() function is an alias for querystring.parse().
+ */
+ const decode: typeof parse;
+ function escape(str: string): string;
+ function unescape(str: string): string;
+}
diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts
new file mode 100644
index 0000000..2449d89
--- /dev/null
+++ b/node_modules/@types/node/readline.d.ts
@@ -0,0 +1,174 @@
+declare module 'node:readline' {
+ export * from 'readline';
+}
+
+declare module 'readline' {
+ import EventEmitter = require('node:events');
+
+ interface Key {
+ sequence?: string;
+ name?: string;
+ ctrl?: boolean;
+ meta?: boolean;
+ shift?: boolean;
+ }
+
+ class Interface extends EventEmitter {
+ readonly terminal: boolean;
+
+ // Need direct access to line/cursor data, for use in external processes
+ // see: https://github.com/nodejs/node/issues/30347
+ /** The current input data */
+ readonly line: string;
+ /** The current cursor position in the input line */
+ readonly cursor: number;
+
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
+ */
+ protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of the `readline.Interface` class are constructed using the
+ * > `readline.createInterface()` method.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
+ */
+ protected constructor(options: ReadLineOptions);
+
+ setPrompt(prompt: string): void;
+ prompt(preserveCursor?: boolean): void;
+ question(query: string, callback: (answer: string) => void): void;
+ pause(): this;
+ resume(): this;
+ close(): void;
+ write(data: string | Buffer, key?: Key): void;
+
+ /**
+ * Returns the real position of the cursor in relation to the input
+ * prompt + string. Long input (wrapping) strings, as well as multiple
+ * line prompts are included in the calculations.
+ */
+ getCursorPos(): CursorPos;
+
+ /**
+ * events.EventEmitter
+ * 1. close
+ * 2. line
+ * 3. pause
+ * 4. resume
+ * 5. SIGCONT
+ * 6. SIGINT
+ * 7. SIGTSTP
+ */
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "line", listener: (input: string) => void): this;
+ addListener(event: "pause", listener: () => void): this;
+ addListener(event: "resume", listener: () => void): this;
+ addListener(event: "SIGCONT", listener: () => void): this;
+ addListener(event: "SIGINT", listener: () => void): this;
+ addListener(event: "SIGTSTP", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "line", input: string): boolean;
+ emit(event: "pause"): boolean;
+ emit(event: "resume"): boolean;
+ emit(event: "SIGCONT"): boolean;
+ emit(event: "SIGINT"): boolean;
+ emit(event: "SIGTSTP"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "line", listener: (input: string) => void): this;
+ on(event: "pause", listener: () => void): this;
+ on(event: "resume", listener: () => void): this;
+ on(event: "SIGCONT", listener: () => void): this;
+ on(event: "SIGINT", listener: () => void): this;
+ on(event: "SIGTSTP", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "line", listener: (input: string) => void): this;
+ once(event: "pause", listener: () => void): this;
+ once(event: "resume", listener: () => void): this;
+ once(event: "SIGCONT", listener: () => void): this;
+ once(event: "SIGINT", listener: () => void): this;
+ once(event: "SIGTSTP", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "line", listener: (input: string) => void): this;
+ prependListener(event: "pause", listener: () => void): this;
+ prependListener(event: "resume", listener: () => void): this;
+ prependListener(event: "SIGCONT", listener: () => void): this;
+ prependListener(event: "SIGINT", listener: () => void): this;
+ prependListener(event: "SIGTSTP", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "line", listener: (input: string) => void): this;
+ prependOnceListener(event: "pause", listener: () => void): this;
+ prependOnceListener(event: "resume", listener: () => void): this;
+ prependOnceListener(event: "SIGCONT", listener: () => void): this;
+ prependOnceListener(event: "SIGINT", listener: () => void): this;
+ prependOnceListener(event: "SIGTSTP", listener: () => void): this;
+ [Symbol.asyncIterator](): AsyncIterableIterator<string>;
+ }
+
+ type ReadLine = Interface; // type forwarded for backwards compatibility
+
+ type Completer = (line: string) => CompleterResult;
+ type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any;
+
+ type CompleterResult = [string[], string];
+
+ interface ReadLineOptions {
+ input: NodeJS.ReadableStream;
+ output?: NodeJS.WritableStream;
+ completer?: Completer | AsyncCompleter;
+ terminal?: boolean;
+ historySize?: number;
+ prompt?: string;
+ crlfDelay?: number;
+ removeHistoryDuplicates?: boolean;
+ escapeCodeTimeout?: number;
+ tabSize?: number;
+ }
+
+ function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
+ function createInterface(options: ReadLineOptions): Interface;
+ function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
+
+ type Direction = -1 | 0 | 1;
+
+ interface CursorPos {
+ rows: number;
+ cols: number;
+ }
+
+ /**
+ * Clears the current line of this WriteStream in a direction identified by `dir`.
+ */
+ function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
+ /**
+ * Clears this `WriteStream` from the current cursor down.
+ */
+ function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
+ /**
+ * Moves this WriteStream's cursor to the specified position.
+ */
+ function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
+ /**
+ * Moves this WriteStream's cursor relative to its current position.
+ */
+ function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
+}
diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts
new file mode 100644
index 0000000..8fae7f9
--- /dev/null
+++ b/node_modules/@types/node/repl.d.ts
@@ -0,0 +1,399 @@
+declare module 'node:repl' {
+ export * from 'repl';
+}
+
+declare module 'repl' {
+ import { Interface, Completer, AsyncCompleter } from 'node:readline';
+ import { Context } from 'node:vm';
+ import { InspectOptions } from 'node:util';
+
+ interface ReplOptions {
+ /**
+ * The input prompt to display.
+ * Default: `"> "`
+ */
+ prompt?: string;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ * Default: `process.stdin`
+ */
+ input?: NodeJS.ReadableStream;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ * Default: `process.stdout`
+ */
+ output?: NodeJS.WritableStream;
+ /**
+ * If `true`, specifies that the output should be treated as a TTY terminal, and have
+ * ANSI/VT100 escape codes written to it.
+ * Default: checking the value of the `isTTY` property on the output stream upon
+ * instantiation.
+ */
+ terminal?: boolean;
+ /**
+ * The function to be used when evaluating each given line of input.
+ * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
+ * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
+ * additional lines.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions
+ */
+ eval?: REPLEval;
+ /**
+ * Defines if the repl prints output previews or not.
+ * @default `true` Always `false` in case `terminal` is falsy.
+ */
+ preview?: boolean;
+ /**
+ * If `true`, specifies that the default `writer` function should include ANSI color
+ * styling to REPL output. If a custom `writer` function is provided then this has no
+ * effect.
+ * Default: the REPL instance's `terminal` value.
+ */
+ useColors?: boolean;
+ /**
+ * If `true`, specifies that the default evaluation function will use the JavaScript
+ * `global` as the context as opposed to creating a new separate context for the REPL
+ * instance. The node CLI REPL sets this value to `true`.
+ * Default: `false`.
+ */
+ useGlobal?: boolean;
+ /**
+ * If `true`, specifies that the default writer will not output the return value of a
+ * command if it evaluates to `undefined`.
+ * Default: `false`.
+ */
+ ignoreUndefined?: boolean;
+ /**
+ * The function to invoke to format the output of each command before writing to `output`.
+ * Default: a wrapper for `util.inspect`.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output
+ */
+ writer?: REPLWriter;
+ /**
+ * An optional function used for custom Tab auto completion.
+ *
+ * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function
+ */
+ completer?: Completer | AsyncCompleter;
+ /**
+ * A flag that specifies whether the default evaluator executes all JavaScript commands in
+ * strict mode or default (sloppy) mode.
+ * Accepted values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
+ /**
+ * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
+ * pressed. This cannot be used together with a custom `eval` function.
+ * Default: `false`.
+ */
+ breakEvalOnSigint?: boolean;
+ }
+
+ type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
+ type REPLWriter = (this: REPLServer, obj: any) => string;
+
+ /**
+ * This is the default "writer" value, if none is passed in the REPL options,
+ * and it can be overridden by custom print functions.
+ */
+ const writer: REPLWriter & { options: InspectOptions };
+
+ type REPLCommandAction = (this: REPLServer, text: string) => void;
+
+ interface REPLCommand {
+ /**
+ * Help text to be displayed when `.help` is entered.
+ */
+ help?: string;
+ /**
+ * The function to execute, optionally accepting a single string argument.
+ */
+ action: REPLCommandAction;
+ }
+
+ /**
+ * Provides a customizable Read-Eval-Print-Loop (REPL).
+ *
+ * Instances of `repl.REPLServer` will accept individual lines of user input, evaluate those
+ * according to a user-defined evaluation function, then output the result. Input and output
+ * may be from `stdin` and `stdout`, respectively, or may be connected to any Node.js `stream`.
+ *
+ * Instances of `repl.REPLServer` support automatic completion of inputs, simplistic Emacs-style
+ * line editing, multi-line inputs, ANSI-styled output, saving and restoring current REPL session
+ * state, error recovery, and customizable evaluation functions.
+ *
+ * Instances of `repl.REPLServer` are created using the `repl.start()` method and _should not_
+ * be created directly using the JavaScript `new` keyword.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_repl
+ */
+ class REPLServer extends Interface {
+ /**
+ * The `vm.Context` provided to the `eval` function to be used for JavaScript
+ * evaluation.
+ */
+ readonly context: Context;
+ /**
+ * @deprecated since v14.3.0 - Use `input` instead.
+ */
+ readonly inputStream: NodeJS.ReadableStream;
+ /**
+ * @deprecated since v14.3.0 - Use `output` instead.
+ */
+ readonly outputStream: NodeJS.WritableStream;
+ /**
+ * The `Readable` stream from which REPL input will be read.
+ */
+ readonly input: NodeJS.ReadableStream;
+ /**
+ * The `Writable` stream to which REPL output will be written.
+ */
+ readonly output: NodeJS.WritableStream;
+ /**
+ * The commands registered via `replServer.defineCommand()`.
+ */
+ readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
+ /**
+ * A value indicating whether the REPL is currently in "editor mode".
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys
+ */
+ readonly editorMode: boolean;
+ /**
+ * A value indicating whether the `_` variable has been assigned.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreAssigned: boolean;
+ /**
+ * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly last: any;
+ /**
+ * A value indicating whether the `_error` variable has been assigned.
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly underscoreErrAssigned: boolean;
+ /**
+ * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
+ *
+ * @since v9.8.0
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+ */
+ readonly lastError: any;
+ /**
+ * Specified in the REPL options, this is the function to be used when evaluating each
+ * given line of input. If not specified in the REPL options, this is an async wrapper
+ * for the JavaScript `eval()` function.
+ */
+ readonly eval: REPLEval;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default
+ * `writer` function should include ANSI color styling to REPL output.
+ */
+ readonly useColors: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `eval`
+ * function will use the JavaScript `global` as the context as opposed to creating a new
+ * separate context for the REPL instance.
+ */
+ readonly useGlobal: boolean;
+ /**
+ * Specified in the REPL options, this is a value indicating whether the default `writer`
+ * function should output the result of a command if it evaluates to `undefined`.
+ */
+ readonly ignoreUndefined: boolean;
+ /**
+ * Specified in the REPL options, this is the function to invoke to format the output of
+ * each command before writing to `outputStream`. If not specified in the REPL options,
+ * this will be a wrapper for `util.inspect`.
+ */
+ readonly writer: REPLWriter;
+ /**
+ * Specified in the REPL options, this is the function to use for custom Tab auto-completion.
+ */
+ readonly completer: Completer | AsyncCompleter;
+ /**
+ * Specified in the REPL options, this is a flag that specifies whether the default `eval`
+ * function should execute all JavaScript commands in strict mode or default (sloppy) mode.
+ * Possible values are:
+ * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+ * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+ * prefacing every repl statement with `'use strict'`.
+ */
+ readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
+
+ /**
+ * NOTE: According to the documentation:
+ *
+ * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
+ * > _should not_ be created directly using the JavaScript `new` keyword.
+ *
+ * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver
+ */
+ private constructor();
+
+ /**
+ * Used to add new `.`-prefixed commands to the REPL instance. Such commands are invoked
+ * by typing a `.` followed by the `keyword`.
+ *
+ * @param keyword The command keyword (_without_ a leading `.` character).
+ * @param cmd The function to invoke when the command is processed.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_replserver_definecommand_keyword_cmd
+ */
+ defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
+ /**
+ * Readies the REPL instance for input from the user, printing the configured `prompt` to a
+ * new line in the `output` and resuming the `input` to accept new input.
+ *
+ * When multi-line input is being entered, an ellipsis is printed rather than the 'prompt'.
+ *
+ * This method is primarily intended to be called from within the action function for
+ * commands registered using the `replServer.defineCommand()` method.
+ *
+ * @param preserveCursor When `true`, the cursor placement will not be reset to `0`.
+ */
+ displayPrompt(preserveCursor?: boolean): void;
+ /**
+ * Clears any command that has been buffered but not yet executed.
+ *
+ * This method is primarily intended to be called from within the action function for
+ * commands registered using the `replServer.defineCommand()` method.
+ *
+ * @since v9.0.0
+ */
+ clearBufferedCommand(): void;
+
+ /**
+ * Initializes a history log file for the REPL instance. When executing the
+ * Node.js binary and using the command line REPL, a history file is initialized
+ * by default. However, this is not the case when creating a REPL
+ * programmatically. Use this method to initialize a history log file when working
+ * with REPL instances programmatically.
+ * @param path The path to the history file
+ */
+ setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void;
+
+ /**
+ * events.EventEmitter
+ * 1. close - inherited from `readline.Interface`
+ * 2. line - inherited from `readline.Interface`
+ * 3. pause - inherited from `readline.Interface`
+ * 4. resume - inherited from `readline.Interface`
+ * 5. SIGCONT - inherited from `readline.Interface`
+ * 6. SIGINT - inherited from `readline.Interface`
+ * 7. SIGTSTP - inherited from `readline.Interface`
+ * 8. exit
+ * 9. reset
+ */
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "line", listener: (input: string) => void): this;
+ addListener(event: "pause", listener: () => void): this;
+ addListener(event: "resume", listener: () => void): this;
+ addListener(event: "SIGCONT", listener: () => void): this;
+ addListener(event: "SIGINT", listener: () => void): this;
+ addListener(event: "SIGTSTP", listener: () => void): this;
+ addListener(event: "exit", listener: () => void): this;
+ addListener(event: "reset", listener: (context: Context) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "close"): boolean;
+ emit(event: "line", input: string): boolean;
+ emit(event: "pause"): boolean;
+ emit(event: "resume"): boolean;
+ emit(event: "SIGCONT"): boolean;
+ emit(event: "SIGINT"): boolean;
+ emit(event: "SIGTSTP"): boolean;
+ emit(event: "exit"): boolean;
+ emit(event: "reset", context: Context): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "close", listener: () => void): this;
+ on(event: "line", listener: (input: string) => void): this;
+ on(event: "pause", listener: () => void): this;
+ on(event: "resume", listener: () => void): this;
+ on(event: "SIGCONT", listener: () => void): this;
+ on(event: "SIGINT", listener: () => void): this;
+ on(event: "SIGTSTP", listener: () => void): this;
+ on(event: "exit", listener: () => void): this;
+ on(event: "reset", listener: (context: Context) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "close", listener: () => void): this;
+ once(event: "line", listener: (input: string) => void): this;
+ once(event: "pause", listener: () => void): this;
+ once(event: "resume", listener: () => void): this;
+ once(event: "SIGCONT", listener: () => void): this;
+ once(event: "SIGINT", listener: () => void): this;
+ once(event: "SIGTSTP", listener: () => void): this;
+ once(event: "exit", listener: () => void): this;
+ once(event: "reset", listener: (context: Context) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "line", listener: (input: string) => void): this;
+ prependListener(event: "pause", listener: () => void): this;
+ prependListener(event: "resume", listener: () => void): this;
+ prependListener(event: "SIGCONT", listener: () => void): this;
+ prependListener(event: "SIGINT", listener: () => void): this;
+ prependListener(event: "SIGTSTP", listener: () => void): this;
+ prependListener(event: "exit", listener: () => void): this;
+ prependListener(event: "reset", listener: (context: Context) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "line", listener: (input: string) => void): this;
+ prependOnceListener(event: "pause", listener: () => void): this;
+ prependOnceListener(event: "resume", listener: () => void): this;
+ prependOnceListener(event: "SIGCONT", listener: () => void): this;
+ prependOnceListener(event: "SIGINT", listener: () => void): this;
+ prependOnceListener(event: "SIGTSTP", listener: () => void): this;
+ prependOnceListener(event: "exit", listener: () => void): this;
+ prependOnceListener(event: "reset", listener: (context: Context) => void): this;
+ }
+
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
+ */
+ const REPL_MODE_SLOPPY: unique symbol;
+
+ /**
+ * A flag passed in the REPL options. Evaluates expressions in strict mode.
+ * This is equivalent to prefacing every repl statement with `'use strict'`.
+ */
+ const REPL_MODE_STRICT: unique symbol;
+
+ /**
+ * Creates and starts a `repl.REPLServer` instance.
+ *
+ * @param options The options for the `REPLServer`. If `options` is a string, then it specifies
+ * the input prompt.
+ */
+ function start(options?: string | ReplOptions): REPLServer;
+
+ /**
+ * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
+ *
+ * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors
+ */
+ class Recoverable extends SyntaxError {
+ err: Error;
+
+ constructor(err: Error);
+ }
+}
diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts
new file mode 100644
index 0000000..a3bc920
--- /dev/null
+++ b/node_modules/@types/node/stream.d.ts
@@ -0,0 +1,359 @@
+declare module 'node:stream' {
+ import Stream = require('stream');
+ export = Stream;
+}
+
+declare module 'stream' {
+ import EventEmitter = require('node:events');
+
+ class internal extends EventEmitter {
+ pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
+ }
+
+ namespace internal {
+ class Stream extends internal {
+ constructor(opts?: ReadableOptions);
+ }
+
+ interface ReadableOptions {
+ highWaterMark?: number;
+ encoding?: BufferEncoding;
+ objectMode?: boolean;
+ read?(this: Readable, size: number): void;
+ destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void;
+ autoDestroy?: boolean;
+ }
+
+ class Readable extends Stream implements NodeJS.ReadableStream {
+ /**
+ * A utility method for creating Readable Streams out of iterators.
+ */
+ static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
+
+ readable: boolean;
+ readonly readableEncoding: BufferEncoding | null;
+ readonly readableEnded: boolean;
+ readonly readableFlowing: boolean | null;
+ readonly readableHighWaterMark: number;
+ readonly readableLength: number;
+ readonly readableObjectMode: boolean;
+ destroyed: boolean;
+ constructor(opts?: ReadableOptions);
+ _read(size: number): void;
+ read(size?: number): any;
+ setEncoding(encoding: BufferEncoding): this;
+ pause(): this;
+ resume(): this;
+ isPaused(): boolean;
+ unpipe(destination?: NodeJS.WritableStream): this;
+ unshift(chunk: any, encoding?: BufferEncoding): void;
+ wrap(oldStream: NodeJS.ReadableStream): this;
+ push(chunk: any, encoding?: BufferEncoding): boolean;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ destroy(error?: Error): void;
+
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. data
+ * 3. end
+ * 4. error
+ * 5. pause
+ * 6. readable
+ * 7. resume
+ */
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "data", listener: (chunk: any) => void): this;
+ addListener(event: "end", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "pause", listener: () => void): this;
+ addListener(event: "readable", listener: () => void): this;
+ addListener(event: "resume", listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "close"): boolean;
+ emit(event: "data", chunk: any): boolean;
+ emit(event: "end"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "pause"): boolean;
+ emit(event: "readable"): boolean;
+ emit(event: "resume"): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "data", listener: (chunk: any) => void): this;
+ on(event: "end", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "pause", listener: () => void): this;
+ on(event: "readable", listener: () => void): this;
+ on(event: "resume", listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "data", listener: (chunk: any) => void): this;
+ once(event: "end", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "pause", listener: () => void): this;
+ once(event: "readable", listener: () => void): this;
+ once(event: "resume", listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "data", listener: (chunk: any) => void): this;
+ prependListener(event: "end", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "pause", listener: () => void): this;
+ prependListener(event: "readable", listener: () => void): this;
+ prependListener(event: "resume", listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "data", listener: (chunk: any) => void): this;
+ prependOnceListener(event: "end", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "pause", listener: () => void): this;
+ prependOnceListener(event: "readable", listener: () => void): this;
+ prependOnceListener(event: "resume", listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: () => void): this;
+ removeListener(event: "data", listener: (chunk: any) => void): this;
+ removeListener(event: "end", listener: () => void): this;
+ removeListener(event: "error", listener: (err: Error) => void): this;
+ removeListener(event: "pause", listener: () => void): this;
+ removeListener(event: "readable", listener: () => void): this;
+ removeListener(event: "resume", listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ [Symbol.asyncIterator](): AsyncIterableIterator<any>;
+ }
+
+ interface WritableOptions {
+ highWaterMark?: number;
+ decodeStrings?: boolean;
+ defaultEncoding?: BufferEncoding;
+ objectMode?: boolean;
+ emitClose?: boolean;
+ write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(this: Writable, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
+ destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;
+ final?(this: Writable, callback: (error?: Error | null) => void): void;
+ autoDestroy?: boolean;
+ }
+
+ class Writable extends Stream implements NodeJS.WritableStream {
+ readonly writable: boolean;
+ readonly writableEnded: boolean;
+ readonly writableFinished: boolean;
+ readonly writableHighWaterMark: number;
+ readonly writableLength: number;
+ readonly writableObjectMode: boolean;
+ readonly writableCorked: number;
+ destroyed: boolean;
+ constructor(opts?: WritableOptions);
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ end(cb?: () => void): void;
+ end(chunk: any, cb?: () => void): void;
+ end(chunk: any, encoding: BufferEncoding, cb?: () => void): void;
+ cork(): void;
+ uncork(): void;
+ destroy(error?: Error): void;
+
+ /**
+ * Event emitter
+ * The defined events on documents including:
+ * 1. close
+ * 2. drain
+ * 3. error
+ * 4. finish
+ * 5. pipe
+ * 6. unpipe
+ */
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "drain", listener: () => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "finish", listener: () => void): this;
+ addListener(event: "pipe", listener: (src: Readable) => void): this;
+ addListener(event: "unpipe", listener: (src: Readable) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "close"): boolean;
+ emit(event: "drain"): boolean;
+ emit(event: "error", err: Error): boolean;
+ emit(event: "finish"): boolean;
+ emit(event: "pipe", src: Readable): boolean;
+ emit(event: "unpipe", src: Readable): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "drain", listener: () => void): this;
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "finish", listener: () => void): this;
+ on(event: "pipe", listener: (src: Readable) => void): this;
+ on(event: "unpipe", listener: (src: Readable) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "drain", listener: () => void): this;
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "finish", listener: () => void): this;
+ once(event: "pipe", listener: (src: Readable) => void): this;
+ once(event: "unpipe", listener: (src: Readable) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "drain", listener: () => void): this;
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "finish", listener: () => void): this;
+ prependListener(event: "pipe", listener: (src: Readable) => void): this;
+ prependListener(event: "unpipe", listener: (src: Readable) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "drain", listener: () => void): this;
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "finish", listener: () => void): this;
+ prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
+ prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: () => void): this;
+ removeListener(event: "drain", listener: () => void): this;
+ removeListener(event: "error", listener: (err: Error) => void): this;
+ removeListener(event: "finish", listener: () => void): this;
+ removeListener(event: "pipe", listener: (src: Readable) => void): this;
+ removeListener(event: "unpipe", listener: (src: Readable) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ interface DuplexOptions extends ReadableOptions, WritableOptions {
+ allowHalfOpen?: boolean;
+ readableObjectMode?: boolean;
+ writableObjectMode?: boolean;
+ readableHighWaterMark?: number;
+ writableHighWaterMark?: number;
+ writableCorked?: number;
+ read?(this: Duplex, size: number): void;
+ write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
+ final?(this: Duplex, callback: (error?: Error | null) => void): void;
+ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
+ }
+
+ // Note: Duplex extends both Readable and Writable.
+ class Duplex extends Readable implements Writable {
+ readonly writable: boolean;
+ readonly writableEnded: boolean;
+ readonly writableFinished: boolean;
+ readonly writableHighWaterMark: number;
+ readonly writableLength: number;
+ readonly writableObjectMode: boolean;
+ readonly writableCorked: number;
+ constructor(opts?: DuplexOptions);
+ _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ _writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
+ _final(callback: (error?: Error | null) => void): void;
+ write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
+ setDefaultEncoding(encoding: BufferEncoding): this;
+ end(cb?: () => void): void;
+ end(chunk: any, cb?: () => void): void;
+ end(chunk: any, encoding?: BufferEncoding, cb?: () => void): void;
+ cork(): void;
+ uncork(): void;
+ }
+
+ type TransformCallback = (error?: Error | null, data?: any) => void;
+
+ interface TransformOptions extends DuplexOptions {
+ read?(this: Transform, size: number): void;
+ write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(this: Transform, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
+ final?(this: Transform, callback: (error?: Error | null) => void): void;
+ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
+ transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ flush?(this: Transform, callback: TransformCallback): void;
+ }
+
+ class Transform extends Duplex {
+ constructor(opts?: TransformOptions);
+ _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+ _flush(callback: TransformCallback): void;
+ }
+
+ class PassThrough extends Transform { }
+
+ interface FinishedOptions {
+ error?: boolean;
+ readable?: boolean;
+ writable?: boolean;
+ }
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
+ namespace finished {
+ function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
+ }
+
+ function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
+ function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
+ function pipeline<T extends NodeJS.WritableStream>(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream,
+ stream3: NodeJS.ReadWriteStream,
+ stream4: T,
+ callback?: (err: NodeJS.ErrnoException | null) => void,
+ ): T;
+ function pipeline<T extends NodeJS.WritableStream>(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream,
+ stream3: NodeJS.ReadWriteStream,
+ stream4: NodeJS.ReadWriteStream,
+ stream5: T,
+ callback?: (err: NodeJS.ErrnoException | null) => void,
+ ): T;
+ function pipeline(
+ streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
+ callback?: (err: NodeJS.ErrnoException | null) => void,
+ ): NodeJS.WritableStream;
+ function pipeline(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>,
+ ): NodeJS.WritableStream;
+ namespace pipeline {
+ function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise<void>;
+ function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise<void>;
+ function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise<void>;
+ function __promisify__(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream,
+ stream3: NodeJS.ReadWriteStream,
+ stream4: NodeJS.ReadWriteStream,
+ stream5: NodeJS.WritableStream,
+ ): Promise<void>;
+ function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
+ function __promisify__(
+ stream1: NodeJS.ReadableStream,
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream>,
+ ): Promise<void>;
+ }
+
+ interface Pipe {
+ close(): void;
+ hasRef(): boolean;
+ ref(): void;
+ unref(): void;
+ }
+ }
+
+ export = internal;
+}
diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts
new file mode 100644
index 0000000..6b688d3
--- /dev/null
+++ b/node_modules/@types/node/string_decoder.d.ts
@@ -0,0 +1,11 @@
+declare module 'node:string_decoder' {
+ export * from 'string_decoder';
+}
+
+declare module 'string_decoder' {
+ class StringDecoder {
+ constructor(encoding?: BufferEncoding);
+ write(buffer: Buffer): string;
+ end(buffer?: Buffer): string;
+ }
+}
diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts
new file mode 100644
index 0000000..965f109
--- /dev/null
+++ b/node_modules/@types/node/timers.d.ts
@@ -0,0 +1,20 @@
+declare module 'node:timers' {
+ export * from 'timers';
+}
+
+declare module 'timers' {
+ function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
+ namespace setTimeout {
+ function __promisify__(ms: number): Promise<void>;
+ function __promisify__<T>(ms: number, value: T): Promise<T>;
+ }
+ function clearTimeout(timeoutId: NodeJS.Timeout): void;
+ function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
+ function clearInterval(intervalId: NodeJS.Timeout): void;
+ function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
+ namespace setImmediate {
+ function __promisify__(): Promise<void>;
+ function __promisify__<T>(value: T): Promise<T>;
+ }
+ function clearImmediate(immediateId: NodeJS.Immediate): void;
+}
diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts
new file mode 100644
index 0000000..e65a196
--- /dev/null
+++ b/node_modules/@types/node/tls.d.ts
@@ -0,0 +1,783 @@
+declare module 'node:tls' {
+ export * from 'tls';
+}
+
+declare module 'tls' {
+ import * as net from 'node:net';
+
+ const CLIENT_RENEG_LIMIT: number;
+ const CLIENT_RENEG_WINDOW: number;
+
+ interface Certificate {
+ /**
+ * Country code.
+ */
+ C: string;
+ /**
+ * Street.
+ */
+ ST: string;
+ /**
+ * Locality.
+ */
+ L: string;
+ /**
+ * Organization.
+ */
+ O: string;
+ /**
+ * Organizational unit.
+ */
+ OU: string;
+ /**
+ * Common name.
+ */
+ CN: string;
+ }
+
+ interface PeerCertificate {
+ subject: Certificate;
+ issuer: Certificate;
+ subjectaltname: string;
+ infoAccess: NodeJS.Dict<string[]>;
+ modulus: string;
+ exponent: string;
+ valid_from: string;
+ valid_to: string;
+ fingerprint: string;
+ fingerprint256: string;
+ ext_key_usage: string[];
+ serialNumber: string;
+ raw: Buffer;
+ }
+
+ interface DetailedPeerCertificate extends PeerCertificate {
+ issuerCertificate: DetailedPeerCertificate;
+ }
+
+ interface CipherNameAndProtocol {
+ /**
+ * The cipher name.
+ */
+ name: string;
+ /**
+ * SSL/TLS protocol version.
+ */
+ version: string;
+
+ /**
+ * IETF name for the cipher suite.
+ */
+ standardName: string;
+ }
+
+ interface EphemeralKeyInfo {
+ /**
+ * The supported types are 'DH' and 'ECDH'.
+ */
+ type: string;
+ /**
+ * The name property is available only when type is 'ECDH'.
+ */
+ name?: string;
+ /**
+ * The size of parameter of an ephemeral key exchange.
+ */
+ size: number;
+ }
+
+ interface KeyObject {
+ /**
+ * Private keys in PEM format.
+ */
+ pem: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string;
+ }
+
+ interface PxfObject {
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain.
+ */
+ buf: string | Buffer;
+ /**
+ * Optional passphrase.
+ */
+ passphrase?: string;
+ }
+
+ interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
+ /**
+ * If true the TLS socket will be instantiated in server-mode.
+ * Defaults to false.
+ */
+ isServer?: boolean;
+ /**
+ * An optional net.Server instance.
+ */
+ server?: net.Server;
+
+ /**
+ * An optional Buffer instance containing a TLS session.
+ */
+ session?: Buffer;
+ /**
+ * If true, specifies that the OCSP status request extension will be
+ * added to the client hello and an 'OCSPResponse' event will be
+ * emitted on the socket before establishing a secure communication
+ */
+ requestOCSP?: boolean;
+ }
+
+ class TLSSocket extends net.Socket {
+ /**
+ * Construct a new tls.TLSSocket object from an existing TCP socket.
+ */
+ constructor(socket: net.Socket, options?: TLSSocketOptions);
+
+ /**
+ * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false.
+ */
+ authorized: boolean;
+ /**
+ * The reason why the peer's certificate has not been verified.
+ * This property becomes available only when tlsSocket.authorized === false.
+ */
+ authorizationError: Error;
+ /**
+ * Static boolean value, always true.
+ * May be used to distinguish TLS sockets from regular ones.
+ */
+ encrypted: boolean;
+
+ /**
+ * String containing the selected ALPN protocol.
+ * When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false.
+ */
+ alpnProtocol?: string;
+
+ /**
+ * Returns an object representing the local certificate. The returned
+ * object has some properties corresponding to the fields of the
+ * certificate.
+ *
+ * See tls.TLSSocket.getPeerCertificate() for an example of the
+ * certificate structure.
+ *
+ * If there is no local certificate, an empty object will be returned.
+ * If the socket has been destroyed, null will be returned.
+ */
+ getCertificate(): PeerCertificate | object | null;
+ /**
+ * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection.
+ * @returns Returns an object representing the cipher name
+ * and the SSL/TLS protocol version of the current connection.
+ */
+ getCipher(): CipherNameAndProtocol;
+ /**
+ * Returns an object representing the type, name, and size of parameter
+ * of an ephemeral key exchange in Perfect Forward Secrecy on a client
+ * connection. It returns an empty object when the key exchange is not
+ * ephemeral. As this is only supported on a client socket; null is
+ * returned if called on a server socket. The supported types are 'DH'
+ * and 'ECDH'. The name property is available only when type is 'ECDH'.
+ *
+ * For example: { type: 'ECDH', name: 'prime256v1', size: 256 }.
+ */
+ getEphemeralKeyInfo(): EphemeralKeyInfo | object | null;
+ /**
+ * Returns the latest Finished message that has
+ * been sent to the socket as part of a SSL/TLS handshake, or undefined
+ * if no Finished message has been sent yet.
+ *
+ * As the Finished messages are message digests of the complete
+ * handshake (with a total of 192 bits for TLS 1.0 and more for SSL
+ * 3.0), they can be used for external authentication procedures when
+ * the authentication provided by SSL/TLS is not desired or is not
+ * enough.
+ *
+ * Corresponds to the SSL_get_finished routine in OpenSSL and may be
+ * used to implement the tls-unique channel binding from RFC 5929.
+ */
+ getFinished(): Buffer | undefined;
+ /**
+ * Returns an object representing the peer's certificate.
+ * The returned object has some properties corresponding to the field of the certificate.
+ * If detailed argument is true the full chain with issuer property will be returned,
+ * if false only the top certificate without issuer property.
+ * If the peer does not provide a certificate, it returns null or an empty object.
+ * @param detailed - If true; the full chain with issuer property will be returned.
+ * @returns An object representing the peer's certificate.
+ */
+ getPeerCertificate(detailed: true): DetailedPeerCertificate;
+ getPeerCertificate(detailed?: false): PeerCertificate;
+ getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
+ /**
+ * Returns the latest Finished message that is expected or has actually
+ * been received from the socket as part of a SSL/TLS handshake, or
+ * undefined if there is no Finished message so far.
+ *
+ * As the Finished messages are message digests of the complete
+ * handshake (with a total of 192 bits for TLS 1.0 and more for SSL
+ * 3.0), they can be used for external authentication procedures when
+ * the authentication provided by SSL/TLS is not desired or is not
+ * enough.
+ *
+ * Corresponds to the SSL_get_peer_finished routine in OpenSSL and may
+ * be used to implement the tls-unique channel binding from RFC 5929.
+ */
+ getPeerFinished(): Buffer | undefined;
+ /**
+ * Returns a string containing the negotiated SSL/TLS protocol version of the current connection.
+ * The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process.
+ * The value `null` will be returned for server sockets or disconnected client sockets.
+ * See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information.
+ * @returns negotiated SSL/TLS protocol version of the current connection
+ */
+ getProtocol(): string | null;
+ /**
+ * Could be used to speed up handshake establishment when reconnecting to the server.
+ * @returns ASN.1 encoded TLS session or undefined if none was negotiated.
+ */
+ getSession(): Buffer | undefined;
+ /**
+ * Returns a list of signature algorithms shared between the server and
+ * the client in the order of decreasing preference.
+ */
+ getSharedSigalgs(): string[];
+ /**
+ * NOTE: Works only with client TLS sockets.
+ * Useful only for debugging, for session reuse provide session option to tls.connect().
+ * @returns TLS session ticket or undefined if none was negotiated.
+ */
+ getTLSTicket(): Buffer | undefined;
+ /**
+ * Returns true if the session was reused, false otherwise.
+ */
+ isSessionReused(): boolean;
+ /**
+ * Initiate TLS renegotiation process.
+ *
+ * NOTE: Can be used to request peer's certificate after the secure connection has been established.
+ * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout.
+ * @param options - The options may contain the following fields: rejectUnauthorized,
+ * requestCert (See tls.createServer() for details).
+ * @param callback - callback(err) will be executed with null as err, once the renegotiation
+ * is successfully completed.
+ * @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated.
+ */
+ renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean;
+ /**
+ * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
+ * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
+ * the TLS layer until the entire fragment is received and its integrity is verified;
+ * large fragments can span multiple roundtrips, and their processing can be delayed due to packet
+ * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead,
+ * which may decrease overall server throughput.
+ * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512).
+ * @returns Returns true on success, false otherwise.
+ */
+ setMaxSendFragment(size: number): boolean;
+
+ /**
+ * Disables TLS renegotiation for this TLSSocket instance. Once called,
+ * attempts to renegotiate will trigger an 'error' event on the
+ * TLSSocket.
+ */
+ disableRenegotiation(): void;
+
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ *
+ * Note: The format of the output is identical to the output of `openssl s_client
+ * -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's
+ * `SSL_trace()` function, the format is undocumented, can change without notice,
+ * and should not be relied on.
+ */
+ enableTrace(): void;
+
+ /**
+ * @param length number of bytes to retrieve from keying material
+ * @param label an application specific label, typically this will be a value from the
+ * [IANA Exporter Label Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels).
+ * @param context optionally provide a context.
+ */
+ exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer;
+
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ addListener(event: "secureConnect", listener: () => void): this;
+ addListener(event: "session", listener: (session: Buffer) => void): this;
+ addListener(event: "keylog", listener: (line: Buffer) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "OCSPResponse", response: Buffer): boolean;
+ emit(event: "secureConnect"): boolean;
+ emit(event: "session", session: Buffer): boolean;
+ emit(event: "keylog", line: Buffer): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ on(event: "secureConnect", listener: () => void): this;
+ on(event: "session", listener: (session: Buffer) => void): this;
+ on(event: "keylog", listener: (line: Buffer) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ once(event: "secureConnect", listener: () => void): this;
+ once(event: "session", listener: (session: Buffer) => void): this;
+ once(event: "keylog", listener: (line: Buffer) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ prependListener(event: "secureConnect", listener: () => void): this;
+ prependListener(event: "session", listener: (session: Buffer) => void): this;
+ prependListener(event: "keylog", listener: (line: Buffer) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
+ prependOnceListener(event: "secureConnect", listener: () => void): this;
+ prependOnceListener(event: "session", listener: (session: Buffer) => void): this;
+ prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this;
+ }
+
+ interface CommonConnectionOptions {
+ /**
+ * An optional TLS context object from tls.createSecureContext()
+ */
+ secureContext?: SecureContext;
+
+ /**
+ * When enabled, TLS packet trace information is written to `stderr`. This can be
+ * used to debug TLS connection problems.
+ * @default false
+ */
+ enableTrace?: boolean;
+ /**
+ * If true the server will request a certificate from clients that
+ * connect and attempt to verify that certificate. Defaults to
+ * false.
+ */
+ requestCert?: boolean;
+ /**
+ * An array of strings or a Buffer naming possible ALPN protocols.
+ * (Protocols should be ordered by their priority.)
+ */
+ ALPNProtocols?: string[] | Uint8Array[] | Uint8Array;
+ /**
+ * SNICallback(servername, cb) <Function> A function that will be
+ * called if the client supports SNI TLS extension. Two arguments
+ * will be passed when called: servername and cb. SNICallback should
+ * invoke cb(null, ctx), where ctx is a SecureContext instance.
+ * (tls.createSecureContext(...) can be used to get a proper
+ * SecureContext.) If SNICallback wasn't provided the default callback
+ * with high-level API will be used (see below).
+ */
+ SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void;
+ /**
+ * If true the server will reject any connection which is not
+ * authorized with the list of supplied CAs. This option only has an
+ * effect if requestCert is true.
+ * @default true
+ */
+ rejectUnauthorized?: boolean;
+ }
+
+ interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts {
+ /**
+ * Abort the connection if the SSL/TLS handshake does not finish in the
+ * specified number of milliseconds. A 'tlsClientError' is emitted on
+ * the tls.Server object whenever a handshake times out. Default:
+ * 120000 (120 seconds).
+ */
+ handshakeTimeout?: number;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ */
+ ticketKeys?: Buffer;
+
+ /**
+ *
+ * @param socket
+ * @param identity identity parameter sent from the client.
+ * @return pre-shared key that must either be
+ * a buffer or `null` to stop the negotiation process. Returned PSK must be
+ * compatible with the selected cipher's digest.
+ *
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with the identity provided by the client.
+ * If the return value is `null` the negotiation process will stop and an
+ * "unknown_psk_identity" alert message will be sent to the other party.
+ * If the server wishes to hide the fact that the PSK identity was not known,
+ * the callback must provide some random data as `psk` to make the connection
+ * fail with "decrypt_error" before negotiation is finished.
+ * PSK ciphers are disabled by default, and using TLS-PSK thus
+ * requires explicitly specifying a cipher suite with the `ciphers` option.
+ * More information can be found in the RFC 4279.
+ */
+
+ pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null;
+ /**
+ * hint to send to a client to help
+ * with selecting the identity during TLS-PSK negotiation. Will be ignored
+ * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be
+ * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code.
+ */
+ pskIdentityHint?: string;
+ }
+
+ interface PSKCallbackNegotation {
+ psk: DataView | NodeJS.TypedArray;
+ identity: string;
+ }
+
+ interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
+ host?: string;
+ port?: number;
+ path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
+ socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket
+ checkServerIdentity?: typeof checkServerIdentity;
+ servername?: string; // SNI TLS Extension
+ session?: Buffer;
+ minDHSize?: number;
+ lookup?: net.LookupFunction;
+ timeout?: number;
+ /**
+ * When negotiating TLS-PSK (pre-shared keys), this function is called
+ * with optional identity `hint` provided by the server or `null`
+ * in case of TLS 1.3 where `hint` was removed.
+ * It will be necessary to provide a custom `tls.checkServerIdentity()`
+ * for the connection as the default one will try to check hostname/IP
+ * of the server against the certificate but that's not applicable for PSK
+ * because there won't be a certificate present.
+ * More information can be found in the RFC 4279.
+ *
+ * @param hint message sent from the server to help client
+ * decide which identity to use during negotiation.
+ * Always `null` if TLS 1.3 is used.
+ * @returns Return `null` to stop the negotiation process. `psk` must be
+ * compatible with the selected cipher's digest.
+ * `identity` must use UTF-8 encoding.
+ */
+ pskCallback?(hint: string | null): PSKCallbackNegotation | null;
+ }
+
+ class Server extends net.Server {
+ constructor(secureConnectionListener?: (socket: TLSSocket) => void);
+ constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void);
+
+ /**
+ * The server.addContext() method adds a secure context that will be
+ * used if the client request's SNI name matches the supplied hostname
+ * (or wildcard).
+ */
+ addContext(hostName: string, credentials: SecureContextOptions): void;
+ /**
+ * Returns the session ticket keys.
+ */
+ getTicketKeys(): Buffer;
+ /**
+ *
+ * The server.setSecureContext() method replaces the
+ * secure context of an existing server. Existing connections to the
+ * server are not interrupted.
+ */
+ setSecureContext(details: SecureContextOptions): void;
+ /**
+ * The server.setSecureContext() method replaces the secure context of
+ * an existing server. Existing connections to the server are not
+ * interrupted.
+ */
+ setTicketKeys(keys: Buffer): void;
+
+ /**
+ * events.EventEmitter
+ * 1. tlsClientError
+ * 2. newSession
+ * 3. OCSPRequest
+ * 4. resumeSession
+ * 5. secureConnection
+ * 6. keylog
+ */
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+ addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean;
+ emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
+ emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
+ emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
+ emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;
+ emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+ on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+ once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+ prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
+ prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
+ prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
+ prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
+ }
+
+ interface SecurePair {
+ encrypted: TLSSocket;
+ cleartext: TLSSocket;
+ }
+
+ type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
+
+ interface SecureContextOptions {
+ /**
+ * Optionally override the trusted CA certificates. Default is to trust
+ * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
+ * replaced when CAs are explicitly specified using this option.
+ */
+ ca?: string | Buffer | Array<string | Buffer>;
+ /**
+ * Cert chains in PEM format. One cert chain should be provided per
+ * private key. Each cert chain should consist of the PEM formatted
+ * certificate for a provided private key, followed by the PEM
+ * formatted intermediate certificates (if any), in order, and not
+ * including the root CA (the root CA must be pre-known to the peer,
+ * see ca). When providing multiple cert chains, they do not have to
+ * be in the same order as their private keys in key. If the
+ * intermediate certificates are not provided, the peer will not be
+ * able to validate the certificate, and the handshake will fail.
+ */
+ cert?: string | Buffer | Array<string | Buffer>;
+ /**
+ * Colon-separated list of supported signature algorithms. The list
+ * can contain digest algorithms (SHA256, MD5 etc.), public key
+ * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g
+ * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).
+ */
+ sigalgs?: string;
+ /**
+ * Cipher suite specification, replacing the default. For more
+ * information, see modifying the default cipher suite. Permitted
+ * ciphers can be obtained via tls.getCiphers(). Cipher names must be
+ * uppercased in order for OpenSSL to accept them.
+ */
+ ciphers?: string;
+ /**
+ * Name of an OpenSSL engine which can provide the client certificate.
+ */
+ clientCertEngine?: string;
+ /**
+ * PEM formatted CRLs (Certificate Revocation Lists).
+ */
+ crl?: string | Buffer | Array<string | Buffer>;
+ /**
+ * Diffie Hellman parameters, required for Perfect Forward Secrecy. Use
+ * openssl dhparam to create the parameters. The key length must be
+ * greater than or equal to 1024 bits or else an error will be thrown.
+ * Although 1024 bits is permissible, use 2048 bits or larger for
+ * stronger security. If omitted or invalid, the parameters are
+ * silently discarded and DHE ciphers will not be available.
+ */
+ dhparam?: string | Buffer;
+ /**
+ * A string describing a named curve or a colon separated list of curve
+ * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
+ * agreement. Set to auto to select the curve automatically. Use
+ * crypto.getCurves() to obtain a list of available curve names. On
+ * recent releases, openssl ecparam -list_curves will also display the
+ * name and description of each available elliptic curve. Default:
+ * tls.DEFAULT_ECDH_CURVE.
+ */
+ ecdhCurve?: string;
+ /**
+ * Attempt to use the server's cipher suite preferences instead of the
+ * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be
+ * set in secureOptions
+ */
+ honorCipherOrder?: boolean;
+ /**
+ * Private keys in PEM format. PEM allows the option of private keys
+ * being encrypted. Encrypted keys will be decrypted with
+ * options.passphrase. Multiple keys using different algorithms can be
+ * provided either as an array of unencrypted key strings or buffers,
+ * or an array of objects in the form {pem: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted keys will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ key?: string | Buffer | Array<Buffer | KeyObject>;
+ /**
+ * Name of an OpenSSL engine to get private key from. Should be used
+ * together with privateKeyIdentifier.
+ */
+ privateKeyEngine?: string;
+ /**
+ * Identifier of a private key managed by an OpenSSL engine. Should be
+ * used together with privateKeyEngine. Should not be set together with
+ * key, because both options define a private key in different ways.
+ */
+ privateKeyIdentifier?: string;
+ /**
+ * Optionally set the maximum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other.
+ * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using
+ * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to
+ * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.
+ */
+ maxVersion?: SecureVersion;
+ /**
+ * Optionally set the minimum TLS version to allow. One
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
+ * `secureProtocol` option, use one or the other. It is not recommended to use
+ * less than TLSv1.2, but it may be required for interoperability.
+ * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using
+ * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to
+ * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
+ */
+ minVersion?: SecureVersion;
+ /**
+ * Shared passphrase used for a single private key and/or a PFX.
+ */
+ passphrase?: string;
+ /**
+ * PFX or PKCS12 encoded private key and certificate chain. pfx is an
+ * alternative to providing key and cert individually. PFX is usually
+ * encrypted, if it is, passphrase will be used to decrypt it. Multiple
+ * PFX can be provided either as an array of unencrypted PFX buffers,
+ * or an array of objects in the form {buf: <string|buffer>[,
+ * passphrase: <string>]}. The object form can only occur in an array.
+ * object.passphrase is optional. Encrypted PFX will be decrypted with
+ * object.passphrase if provided, or options.passphrase if it is not.
+ */
+ pfx?: string | Buffer | Array<string | Buffer | PxfObject>;
+ /**
+ * Optionally affect the OpenSSL protocol behavior, which is not
+ * usually necessary. This should be used carefully if at all! Value is
+ * a numeric bitmask of the SSL_OP_* options from OpenSSL Options
+ */
+ secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options
+ /**
+ * Legacy mechanism to select the TLS protocol version to use, it does
+ * not support independent control of the minimum and maximum version,
+ * and does not support limiting the protocol to TLSv1.3. Use
+ * minVersion and maxVersion instead. The possible values are listed as
+ * SSL_METHODS, use the function names as strings. For example, use
+ * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow
+ * any TLS protocol version up to TLSv1.3. It is not recommended to use
+ * TLS versions less than 1.2, but it may be required for
+ * interoperability. Default: none, see minVersion.
+ */
+ secureProtocol?: string;
+ /**
+ * Opaque identifier used by servers to ensure session state is not
+ * shared between applications. Unused by clients.
+ */
+ sessionIdContext?: string;
+ /**
+ * 48-bytes of cryptographically strong pseudo-random data.
+ * See Session Resumption for more information.
+ */
+ ticketKeys?: Buffer;
+ /**
+ * The number of seconds after which a TLS session created by the
+ * server will no longer be resumable. See Session Resumption for more
+ * information. Default: 300.
+ */
+ sessionTimeout?: number;
+ }
+
+ interface SecureContext {
+ context: any;
+ }
+
+ /*
+ * Verifies the certificate `cert` is issued to host `host`.
+ * @host The hostname to verify the certificate against
+ * @cert PeerCertificate representing the peer's certificate
+ *
+ * Returns Error object, populating it with the reason, host and cert on failure. On success, returns undefined.
+ */
+ function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined;
+ function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server;
+ function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
+ /**
+ * @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
+ */
+ function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
+ function createSecureContext(options?: SecureContextOptions): SecureContext;
+ function getCiphers(): string[];
+
+ /**
+ * The default curve name to use for ECDH key agreement in a tls server.
+ * The default value is 'auto'. See tls.createSecureContext() for further
+ * information.
+ */
+ let DEFAULT_ECDH_CURVE: string;
+ /**
+ * The default value of the maxVersion option of
+ * tls.createSecureContext(). It can be assigned any of the supported TLS
+ * protocol versions, 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default:
+ * 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets
+ * the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to
+ * 'TLSv1.3'. If multiple of the options are provided, the highest maximum
+ * is used.
+ */
+ let DEFAULT_MAX_VERSION: SecureVersion;
+ /**
+ * The default value of the minVersion option of tls.createSecureContext().
+ * It can be assigned any of the supported TLS protocol versions,
+ * 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: 'TLSv1.2', unless
+ * changed using CLI options. Using --tls-min-v1.0 sets the default to
+ * 'TLSv1'. Using --tls-min-v1.1 sets the default to 'TLSv1.1'. Using
+ * --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options
+ * are provided, the lowest minimum is used.
+ */
+ let DEFAULT_MIN_VERSION: SecureVersion;
+
+ /**
+ * An immutable array of strings representing the root certificates (in PEM
+ * format) used for verifying peer certificates. This is the default value
+ * of the ca option to tls.createSecureContext().
+ */
+ const rootCertificates: ReadonlyArray<string>;
+}
diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts
new file mode 100644
index 0000000..812b2b5
--- /dev/null
+++ b/node_modules/@types/node/trace_events.d.ts
@@ -0,0 +1,65 @@
+declare module 'node:trace_events' {
+ export * from 'trace_events';
+}
+
+declare module 'trace_events' {
+ /**
+ * The `Tracing` object is used to enable or disable tracing for sets of
+ * categories. Instances are created using the
+ * `trace_events.createTracing()` method.
+ *
+ * When created, the `Tracing` object is disabled. Calling the
+ * `tracing.enable()` method adds the categories to the set of enabled trace
+ * event categories. Calling `tracing.disable()` will remove the categories
+ * from the set of enabled trace event categories.
+ */
+ interface Tracing {
+ /**
+ * A comma-separated list of the trace event categories covered by this
+ * `Tracing` object.
+ */
+ readonly categories: string;
+
+ /**
+ * Disables this `Tracing` object.
+ *
+ * Only trace event categories _not_ covered by other enabled `Tracing`
+ * objects and _not_ specified by the `--trace-event-categories` flag
+ * will be disabled.
+ */
+ disable(): void;
+
+ /**
+ * Enables this `Tracing` object for the set of categories covered by
+ * the `Tracing` object.
+ */
+ enable(): void;
+
+ /**
+ * `true` only if the `Tracing` object has been enabled.
+ */
+ readonly enabled: boolean;
+ }
+
+ interface CreateTracingOptions {
+ /**
+ * An array of trace category names. Values included in the array are
+ * coerced to a string when possible. An error will be thrown if the
+ * value cannot be coerced.
+ */
+ categories: string[];
+ }
+
+ /**
+ * Creates and returns a Tracing object for the given set of categories.
+ */
+ function createTracing(options: CreateTracingOptions): Tracing;
+
+ /**
+ * Returns a comma-separated list of all currently-enabled trace event
+ * categories. The current set of enabled trace event categories is
+ * determined by the union of all currently-enabled `Tracing` objects and
+ * any categories enabled using the `--trace-event-categories` flag.
+ */
+ function getEnabledCategories(): string | undefined;
+}
diff --git a/node_modules/@types/node/ts3.4/assert.d.ts b/node_modules/@types/node/ts3.4/assert.d.ts
new file mode 100644
index 0000000..6f3a33e
--- /dev/null
+++ b/node_modules/@types/node/ts3.4/assert.d.ts
@@ -0,0 +1,103 @@
+declare module 'node:assert' {
+ import assert = require('assert');
+ export = assert;
+}
+
+declare module 'assert' {
+ /** An alias of `assert.ok()`. */
+ function assert(value: any, message?: string | Error): void;
+ namespace assert {
+ class AssertionError extends Error {
+ actual: any;
+ expected: any;
+ operator: string;
+ generatedMessage: boolean;
+ code: 'ERR_ASSERTION';
+
+ constructor(options?: {
+ /** If provided, the error message is set to this value. */
+ message?: string;
+ /** The `actual` property on the error instance. */
+ actual?: any;
+ /** The `expected` property on the error instance. */
+ expected?: any;
+ /** The `operator` property on the error instance. */
+ operator?: string;
+ /** If provided, the generated stack trace omits frames before this function. */
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function;
+ });
+ }
+
+ class CallTracker {
+ calls(exact?: number): () => void;
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
+ report(): CallTrackerReportInformation[];
+ verify(): void;
+ }
+ interface CallTrackerReportInformation {
+ message: string;
+ /** The actual number of times the function was called. */
+ actual: number;
+ /** The number of times the function was expected to be called. */
+ expected: number;
+ /** The name of the function that is wrapped. */
+ operator: string;
+ /** A stack trace of the function. */
+ stack: object;
+ }
+
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
+
+ function fail(message?: string | Error): never;
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
+ function fail(
+ actual: any,
+ expected: any,
+ message?: string | Error,
+ operator?: string,
+ // tslint:disable-next-line:ban-types
+ stackStartFn?: Function,
+ ): never;
+ function ok(value: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use strictEqual() instead. */
+ function equal(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
+ function notEqual(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
+ function deepEqual(actual: any, expected: any, message?: string | Error): void;
+ /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
+ function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
+ function strictEqual(actual: any, expected: any, message?: string | Error): void;
+ function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
+ function deepStrictEqual(actual: any, expected: any, message?: string | Error): void;
+ function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
+
+ function throws(block: () => any, message?: string | Error): void;
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
+ function doesNotThrow(block: () => any, message?: string | Error): void;
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
+
+ function ifError(value: any): void;
+
+ function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
+ function rejects(
+ block: (() => Promise<any>) | Promise<any>,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise<void>;
+ function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
+ function doesNotReject(
+ block: (() => Promise<any>) | Promise<any>,
+ error: AssertPredicate,
+ message?: string | Error,
+ ): Promise<void>;
+
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+
+ const strict: typeof assert;
+ }
+
+ export = assert;
+}
diff --git a/node_modules/@types/node/ts3.4/base.d.ts b/node_modules/@types/node/ts3.4/base.d.ts
new file mode 100644
index 0000000..2ea04f5
--- /dev/null
+++ b/node_modules/@types/node/ts3.4/base.d.ts
@@ -0,0 +1,56 @@
+// NOTE: These definitions support NodeJS and TypeScript 3.2 - 3.4.
+
+// NOTE: TypeScript version-specific augmentations can be found in the following paths:
+// - ~/base.d.ts - Shared definitions common to all TypeScript versions
+// - ~/index.d.ts - Definitions specific to TypeScript 2.1
+// - ~/ts3.2/base.d.ts - Definitions specific to TypeScript 3.2
+// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 with global and assert pulled in
+
+// Reference required types from the default lib:
+/// <reference lib="es2018" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.bigint" />
+
+// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
+
+/// <reference path="../globals.d.ts" />
+/// <reference path="../async_hooks.d.ts" />
+/// <reference path="../buffer.d.ts" />
+/// <reference path="../child_process.d.ts" />
+/// <reference path="../cluster.d.ts" />
+/// <reference path="../console.d.ts" />
+/// <reference path="../constants.d.ts" />
+/// <reference path="../crypto.d.ts" />
+/// <reference path="../dgram.d.ts" />
+/// <reference path="../dns.d.ts" />
+/// <reference path="../domain.d.ts" />
+/// <reference path="../events.d.ts" />
+/// <reference path="../fs.d.ts" />
+/// <reference path="../fs/promises.d.ts" />
+/// <reference path="../http.d.ts" />
+/// <reference path="../http2.d.ts" />
+/// <reference path="../https.d.ts" />
+/// <reference path="../inspector.d.ts" />
+/// <reference path="../module.d.ts" />
+/// <reference path="../net.d.ts" />
+/// <reference path="../os.d.ts" />
+/// <reference path="../path.d.ts" />
+/// <reference path="../perf_hooks.d.ts" />
+/// <reference path="../process.d.ts" />
+/// <reference path="../punycode.d.ts" />
+/// <reference path="../querystring.d.ts" />
+/// <reference path="../readline.d.ts" />
+/// <reference path="../repl.d.ts" />
+/// <reference path="../stream.d.ts" />
+/// <reference path="../string_decoder.d.ts" />
+/// <reference path="../timers.d.ts" />
+/// <reference path="../tls.d.ts" />
+/// <reference path="../trace_events.d.ts" />
+/// <reference path="../tty.d.ts" />
+/// <reference path="../url.d.ts" />
+/// <reference path="../util.d.ts" />
+/// <reference path="../v8.d.ts" />
+/// <reference path="../vm.d.ts" />
+/// <reference path="../worker_threads.d.ts" />
+/// <reference path="../zlib.d.ts" />
diff --git a/node_modules/@types/node/ts3.4/globals.global.d.ts b/node_modules/@types/node/ts3.4/globals.global.d.ts
new file mode 100644
index 0000000..8e85466
--- /dev/null
+++ b/node_modules/@types/node/ts3.4/globals.global.d.ts
@@ -0,0 +1 @@
+declare var global: NodeJS.Global;
diff --git a/node_modules/@types/node/ts3.4/index.d.ts b/node_modules/@types/node/ts3.4/index.d.ts
new file mode 100644
index 0000000..506b32a
--- /dev/null
+++ b/node_modules/@types/node/ts3.4/index.d.ts
@@ -0,0 +1,8 @@
+// NOTE: These definitions support NodeJS and TypeScript 3.2 - 3.4.
+// This is required to enable globalThis support for global in ts3.5 without causing errors
+// This is required to enable typing assert in ts3.7 without causing errors
+// Typically type modifiations should be made in base.d.ts instead of here
+
+/// <reference path="base.d.ts" />
+/// <reference path="assert.d.ts" />
+/// <reference path="globals.global.d.ts" />
diff --git a/node_modules/@types/node/ts3.6/base.d.ts b/node_modules/@types/node/ts3.6/base.d.ts
new file mode 100644
index 0000000..05afa40
--- /dev/null
+++ b/node_modules/@types/node/ts3.6/base.d.ts
@@ -0,0 +1,22 @@
+// NOTE: These definitions support NodeJS and TypeScript 3.5.
+
+// NOTE: TypeScript version-specific augmentations can be found in the following paths:
+// - ~/base.d.ts - Shared definitions common to all TypeScript versions
+// - ~/index.d.ts - Definitions specific to TypeScript 2.1
+// - ~/ts3.5/base.d.ts - Definitions specific to TypeScript 3.5
+// - ~/ts3.5/index.d.ts - Definitions specific to TypeScript 3.5 with assert pulled in
+
+// Reference required types from the default lib:
+/// <reference lib="es2018" />
+/// <reference lib="esnext.asynciterable" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.bigint" />
+
+// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
+/// <reference path="../ts3.4/base.d.ts" />
+
+// TypeScript 3.5-specific augmentations:
+/// <reference path="../globals.global.d.ts" />
+
+// TypeScript 3.5-specific augmentations:
+/// <reference path="../wasi.d.ts" />
diff --git a/node_modules/@types/node/ts3.6/index.d.ts b/node_modules/@types/node/ts3.6/index.d.ts
new file mode 100644
index 0000000..7e6b98c
--- /dev/null
+++ b/node_modules/@types/node/ts3.6/index.d.ts
@@ -0,0 +1,7 @@
+// NOTE: These definitions support NodeJS and TypeScript 3.5 - 3.6.
+// This is required to enable typing assert in ts3.7 without causing errors
+// Typically type modifications should be made in base.d.ts instead of here
+
+/// <reference path="base.d.ts" />
+
+/// <reference path="../ts3.4/assert.d.ts" />
diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts
new file mode 100644
index 0000000..64b51b4
--- /dev/null
+++ b/node_modules/@types/node/tty.d.ts
@@ -0,0 +1,70 @@
+declare module 'node:tty' {
+ export * from 'tty';
+}
+
+declare module 'tty' {
+ import * as net from 'node:net';
+
+ function isatty(fd: number): boolean;
+ class ReadStream extends net.Socket {
+ constructor(fd: number, options?: net.SocketConstructorOpts);
+ isRaw: boolean;
+ setRawMode(mode: boolean): this;
+ isTTY: boolean;
+ }
+ /**
+ * -1 - to the left from cursor
+ * 0 - the entire line
+ * 1 - to the right from cursor
+ */
+ type Direction = -1 | 0 | 1;
+ class WriteStream extends net.Socket {
+ constructor(fd: number);
+ addListener(event: string, listener: (...args: any[]) => void): this;
+ addListener(event: "resize", listener: () => void): this;
+
+ emit(event: string | symbol, ...args: any[]): boolean;
+ emit(event: "resize"): boolean;
+
+ on(event: string, listener: (...args: any[]) => void): this;
+ on(event: "resize", listener: () => void): this;
+
+ once(event: string, listener: (...args: any[]) => void): this;
+ once(event: "resize", listener: () => void): this;
+
+ prependListener(event: string, listener: (...args: any[]) => void): this;
+ prependListener(event: "resize", listener: () => void): this;
+
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+ prependOnceListener(event: "resize", listener: () => void): this;
+
+ /**
+ * Clears the current line of this WriteStream in a direction identified by `dir`.
+ */
+ clearLine(dir: Direction, callback?: () => void): boolean;
+ /**
+ * Clears this `WriteStream` from the current cursor down.
+ */
+ clearScreenDown(callback?: () => void): boolean;
+ /**
+ * Moves this WriteStream's cursor to the specified position.
+ */
+ cursorTo(x: number, y?: number, callback?: () => void): boolean;
+ cursorTo(x: number, callback: () => void): boolean;
+ /**
+ * Moves this WriteStream's cursor relative to its current position.
+ */
+ moveCursor(dx: number, dy: number, callback?: () => void): boolean;
+ /**
+ * @default `process.env`
+ */
+ getColorDepth(env?: {}): number;
+ hasColors(depth?: number): boolean;
+ hasColors(env?: {}): boolean;
+ hasColors(depth: number, env?: {}): boolean;
+ getWindowSize(): [number, number];
+ columns: number;
+ rows: number;
+ isTTY: boolean;
+ }
+}
diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts
new file mode 100644
index 0000000..7186b94
--- /dev/null
+++ b/node_modules/@types/node/url.d.ts
@@ -0,0 +1,120 @@
+declare module 'node:url' {
+ export * from 'url';
+}
+
+declare module 'url' {
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
+
+ // Input to `url.format`
+ interface UrlObject {
+ auth?: string | null;
+ hash?: string | null;
+ host?: string | null;
+ hostname?: string | null;
+ href?: string | null;
+ pathname?: string | null;
+ protocol?: string | null;
+ search?: string | null;
+ slashes?: boolean | null;
+ port?: string | number | null;
+ query?: string | null | ParsedUrlQueryInput;
+ }
+
+ // Output of `url.parse`
+ interface Url {
+ auth: string | null;
+ hash: string | null;
+ host: string | null;
+ hostname: string | null;
+ href: string;
+ path: string | null;
+ pathname: string | null;
+ protocol: string | null;
+ search: string | null;
+ slashes: boolean | null;
+ port: string | null;
+ query: string | null | ParsedUrlQuery;
+ }
+
+ interface UrlWithParsedQuery extends Url {
+ query: ParsedUrlQuery;
+ }
+
+ interface UrlWithStringQuery extends Url {
+ query: string | null;
+ }
+
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
+ function parse(urlStr: string): UrlWithStringQuery;
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
+ function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
+ function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
+ function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
+
+ function format(URL: URL, options?: URLFormatOptions): string;
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
+ function format(urlObject: UrlObject | string): string;
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
+ function resolve(from: string, to: string): string;
+
+ function domainToASCII(domain: string): string;
+ function domainToUnicode(domain: string): string;
+
+ /**
+ * This function ensures the correct decodings of percent-encoded characters as
+ * well as ensuring a cross-platform valid absolute path string.
+ * @param url The file URL string or URL object to convert to a path.
+ */
+ function fileURLToPath(url: string | URL): string;
+
+ /**
+ * This function ensures that path is resolved absolutely, and that the URL
+ * control characters are correctly encoded when converting into a File URL.
+ * @param url The path to convert to a File URL.
+ */
+ function pathToFileURL(url: string): URL;
+
+ interface URLFormatOptions {
+ auth?: boolean;
+ fragment?: boolean;
+ search?: boolean;
+ unicode?: boolean;
+ }
+
+ class URL {
+ constructor(input: string, base?: string | URL);
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ readonly searchParams: URLSearchParams;
+ username: string;
+ toString(): string;
+ toJSON(): string;
+ }
+
+ class URLSearchParams implements Iterable<[string, string]> {
+ constructor(init?: URLSearchParams | string | NodeJS.Dict<string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ entries(): IterableIterator<[string, string]>;
+ forEach(callback: (value: string, name: string, searchParams: this) => void): void;
+ get(name: string): string | null;
+ getAll(name: string): string[];
+ has(name: string): boolean;
+ keys(): IterableIterator<string>;
+ set(name: string, value: string): void;
+ sort(): void;
+ toString(): string;
+ values(): IterableIterator<string>;
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ }
+}
diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts
new file mode 100644
index 0000000..8605bf9
--- /dev/null
+++ b/node_modules/@types/node/util.d.ts
@@ -0,0 +1,211 @@
+declare module 'node:util' {
+ export * from 'util';
+}
+
+declare module 'util' {
+ interface InspectOptions extends NodeJS.InspectOptions { }
+ type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
+ type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
+ interface InspectOptionsStylized extends InspectOptions {
+ stylize(text: string, styleType: Style): string;
+ }
+ function format(format?: any, ...param: any[]): string;
+ function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
+ /** @deprecated since v0.11.3 - use a third party module instead. */
+ function log(string: string): void;
+ function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
+ function inspect(object: any, options: InspectOptions): string;
+ namespace inspect {
+ let colors: NodeJS.Dict<[number, number]>;
+ let styles: {
+ [K in Style]: string
+ };
+ let defaultOptions: InspectOptions;
+ /**
+ * Allows changing inspect settings from the repl.
+ */
+ let replDefaults: InspectOptions;
+ const custom: unique symbol;
+ }
+ /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
+ function isArray(object: any): object is any[];
+ /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */
+ function isRegExp(object: any): object is RegExp;
+ /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */
+ function isDate(object: any): object is Date;
+ /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
+ function isError(object: any): object is Error;
+ function inherits(constructor: any, superConstructor: any): void;
+ function debuglog(key: string): (msg: string, ...param: any[]) => void;
+ /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
+ function isBoolean(object: any): object is boolean;
+ /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
+ function isBuffer(object: any): object is Buffer;
+ /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */
+ function isFunction(object: any): boolean;
+ /** @deprecated since v4.0.0 - use `value === null` instead. */
+ function isNull(object: any): object is null;
+ /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */
+ function isNullOrUndefined(object: any): object is null | undefined;
+ /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */
+ function isNumber(object: any): object is number;
+ /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */
+ function isObject(object: any): boolean;
+ /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */
+ function isPrimitive(object: any): boolean;
+ /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */
+ function isString(object: any): object is string;
+ /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */
+ function isSymbol(object: any): object is symbol;
+ /** @deprecated since v4.0.0 - use `value === undefined` instead. */
+ function isUndefined(object: any): object is undefined;
+ function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
+ function isDeepStrictEqual(val1: any, val2: any): boolean;
+
+ function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
+ function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, T3, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1, T2, T3, T4>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+ function callbackify<T1, T2, T3, T4, T5, T6>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
+ function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
+
+ interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
+ __promisify__: TCustom;
+ }
+
+ interface CustomPromisifySymbol<TCustom extends Function> extends Function {
+ [promisify.custom]: TCustom;
+ }
+
+ type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
+
+ function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
+ function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
+ function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
+ function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
+ function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
+ function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
+ function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
+ function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
+ (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
+ function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
+ function promisify<T1, T2, T3, T4, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
+ function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
+ (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
+ function promisify<T1, T2, T3, T4, T5, TResult>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
+ function promisify<T1, T2, T3, T4, T5>(
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
+ function promisify(fn: Function): Function;
+ namespace promisify {
+ const custom: unique symbol;
+ }
+
+ namespace types {
+ function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
+ function isArgumentsObject(object: any): object is IArguments;
+ function isArrayBuffer(object: any): object is ArrayBuffer;
+ function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
+ function isAsyncFunction(object: any): boolean;
+ function isBigInt64Array(value: any): value is BigInt64Array;
+ function isBigUint64Array(value: any): value is BigUint64Array;
+ function isBooleanObject(object: any): object is Boolean;
+ function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
+ function isDataView(object: any): object is DataView;
+ function isDate(object: any): object is Date;
+ function isExternal(object: any): boolean;
+ function isFloat32Array(object: any): object is Float32Array;
+ function isFloat64Array(object: any): object is Float64Array;
+ function isGeneratorFunction(object: any): object is GeneratorFunction;
+ function isGeneratorObject(object: any): object is Generator;
+ function isInt8Array(object: any): object is Int8Array;
+ function isInt16Array(object: any): object is Int16Array;
+ function isInt32Array(object: any): object is Int32Array;
+ function isMap<T>(
+ object: T | {},
+ ): object is T extends ReadonlyMap<any, any>
+ ? unknown extends T
+ ? never
+ : ReadonlyMap<any, any>
+ : Map<any, any>;
+ function isMapIterator(object: any): boolean;
+ function isModuleNamespaceObject(value: any): boolean;
+ function isNativeError(object: any): object is Error;
+ function isNumberObject(object: any): object is Number;
+ function isPromise(object: any): object is Promise<any>;
+ function isProxy(object: any): boolean;
+ function isRegExp(object: any): object is RegExp;
+ function isSet<T>(
+ object: T | {},
+ ): object is T extends ReadonlySet<any>
+ ? unknown extends T
+ ? never
+ : ReadonlySet<any>
+ : Set<any>;
+ function isSetIterator(object: any): boolean;
+ function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
+ function isStringObject(object: any): object is String;
+ function isSymbolObject(object: any): object is Symbol;
+ function isTypedArray(object: any): object is NodeJS.TypedArray;
+ function isUint8Array(object: any): object is Uint8Array;
+ function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
+ function isUint16Array(object: any): object is Uint16Array;
+ function isUint32Array(object: any): object is Uint32Array;
+ function isWeakMap(object: any): object is WeakMap<any, any>;
+ function isWeakSet(object: any): object is WeakSet<any>;
+ }
+
+ class TextDecoder {
+ readonly encoding: string;
+ readonly fatal: boolean;
+ readonly ignoreBOM: boolean;
+ constructor(
+ encoding?: string,
+ options?: { fatal?: boolean; ignoreBOM?: boolean }
+ );
+ decode(
+ input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
+ options?: { stream?: boolean }
+ ): string;
+ }
+
+ interface EncodeIntoResult {
+ /**
+ * The read Unicode code units of input.
+ */
+
+ read: number;
+ /**
+ * The written UTF-8 bytes of output.
+ */
+ written: number;
+ }
+
+ class TextEncoder {
+ readonly encoding: string;
+ encode(input?: string): Uint8Array;
+ encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
+ }
+}
diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts
new file mode 100644
index 0000000..c213196
--- /dev/null
+++ b/node_modules/@types/node/v8.d.ts
@@ -0,0 +1,191 @@
+declare module 'node:v8' {
+ export * from 'v8';
+}
+
+declare module 'v8' {
+ import { Readable } from 'node:stream';
+
+ interface HeapSpaceInfo {
+ space_name: string;
+ space_size: number;
+ space_used_size: number;
+ space_available_size: number;
+ physical_space_size: number;
+ }
+
+ // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
+ type DoesZapCodeSpaceFlag = 0 | 1;
+
+ interface HeapInfo {
+ total_heap_size: number;
+ total_heap_size_executable: number;
+ total_physical_size: number;
+ total_available_size: number;
+ used_heap_size: number;
+ heap_size_limit: number;
+ malloced_memory: number;
+ peak_malloced_memory: number;
+ does_zap_garbage: DoesZapCodeSpaceFlag;
+ number_of_native_contexts: number;
+ number_of_detached_contexts: number;
+ }
+
+ interface HeapCodeStatistics {
+ code_and_metadata_size: number;
+ bytecode_and_metadata_size: number;
+ external_script_source_size: number;
+ }
+
+ /**
+ * Returns an integer representing a "version tag" derived from the V8 version, command line flags and detected CPU features.
+ * This is useful for determining whether a vm.Script cachedData buffer is compatible with this instance of V8.
+ */
+ function cachedDataVersionTag(): number;
+
+ function getHeapStatistics(): HeapInfo;
+ function getHeapSpaceStatistics(): HeapSpaceInfo[];
+ function setFlagsFromString(flags: string): void;
+ /**
+ * Generates a snapshot of the current V8 heap and returns a Readable
+ * Stream that may be used to read the JSON serialized representation.
+ * This conversation was marked as resolved by joyeecheung
+ * This JSON stream format is intended to be used with tools such as
+ * Chrome DevTools. The JSON schema is undocumented and specific to the
+ * V8 engine, and may change from one version of V8 to the next.
+ */
+ function getHeapSnapshot(): Readable;
+
+ /**
+ *
+ * @param fileName The file path where the V8 heap snapshot is to be
+ * saved. If not specified, a file name with the pattern
+ * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
+ * generated, where `{pid}` will be the PID of the Node.js process,
+ * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from
+ * the main Node.js thread or the id of a worker thread.
+ */
+ function writeHeapSnapshot(fileName?: string): string;
+
+ function getHeapCodeStatistics(): HeapCodeStatistics;
+
+ class Serializer {
+ /**
+ * Writes out a header, which includes the serialization format version.
+ */
+ writeHeader(): void;
+
+ /**
+ * Serializes a JavaScript value and adds the serialized representation to the internal buffer.
+ * This throws an error if value cannot be serialized.
+ */
+ writeValue(val: any): boolean;
+
+ /**
+ * Returns the stored internal buffer.
+ * This serializer should not be used once the buffer is released.
+ * Calling this method results in undefined behavior if a previous write has failed.
+ */
+ releaseBuffer(): Buffer;
+
+ /**
+ * Marks an ArrayBuffer as having its contents transferred out of band.\
+ * Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+
+ /**
+ * Write a raw 32-bit unsigned integer.
+ */
+ writeUint32(value: number): void;
+
+ /**
+ * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
+ */
+ writeUint64(hi: number, lo: number): void;
+
+ /**
+ * Write a JS number value.
+ */
+ writeDouble(value: number): void;
+
+ /**
+ * Write raw bytes into the serializer’s internal buffer.
+ * The deserializer will require a way to compute the length of the buffer.
+ */
+ writeRawBytes(buffer: NodeJS.TypedArray): void;
+ }
+
+ /**
+ * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
+ * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
+ */
+ class DefaultSerializer extends Serializer {
+ }
+
+ class Deserializer {
+ constructor(data: NodeJS.TypedArray);
+ /**
+ * Reads and validates a header (including the format version).
+ * May, for example, reject an invalid or unsupported wire format.
+ * In that case, an Error is thrown.
+ */
+ readHeader(): boolean;
+
+ /**
+ * Deserializes a JavaScript value from the buffer and returns it.
+ */
+ readValue(): any;
+
+ /**
+ * Marks an ArrayBuffer as having its contents transferred out of band.
+ * Pass the corresponding `ArrayBuffer` in the serializing context to serializer.transferArrayBuffer()
+ * (or return the id from serializer._getSharedArrayBufferId() in the case of SharedArrayBuffers).
+ */
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
+
+ /**
+ * Reads the underlying wire format version.
+ * Likely mostly to be useful to legacy code reading old wire format versions.
+ * May not be called before .readHeader().
+ */
+ getWireFormatVersion(): number;
+
+ /**
+ * Read a raw 32-bit unsigned integer and return it.
+ */
+ readUint32(): number;
+
+ /**
+ * Read a raw 64-bit unsigned integer and return it as an array [hi, lo] with two 32-bit unsigned integer entries.
+ */
+ readUint64(): [number, number];
+
+ /**
+ * Read a JS number value.
+ */
+ readDouble(): number;
+
+ /**
+ * Read raw bytes from the deserializer’s internal buffer.
+ * The length parameter must correspond to the length of the buffer that was passed to serializer.writeRawBytes().
+ */
+ readRawBytes(length: number): Buffer;
+ }
+
+ /**
+ * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
+ * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
+ */
+ class DefaultDeserializer extends Deserializer {
+ }
+
+ /**
+ * Uses a `DefaultSerializer` to serialize value into a buffer.
+ */
+ function serialize(value: any): Buffer;
+
+ /**
+ * Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
+ */
+ function deserialize(data: NodeJS.TypedArray): any;
+}
diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts
new file mode 100644
index 0000000..419de41
--- /dev/null
+++ b/node_modules/@types/node/vm.d.ts
@@ -0,0 +1,152 @@
+declare module 'node:vm' {
+ export * from 'vm';
+}
+
+declare module 'vm' {
+ interface Context extends NodeJS.Dict<any> { }
+ interface BaseOptions {
+ /**
+ * Specifies the filename used in stack traces produced by this script.
+ * Default: `''`.
+ */
+ filename?: string;
+ /**
+ * Specifies the line number offset that is displayed in stack traces produced by this script.
+ * Default: `0`.
+ */
+ lineOffset?: number;
+ /**
+ * Specifies the column number offset that is displayed in stack traces produced by this script.
+ * Default: `0`
+ */
+ columnOffset?: number;
+ }
+ interface ScriptOptions extends BaseOptions {
+ displayErrors?: boolean;
+ timeout?: number;
+ cachedData?: Buffer;
+ /** @deprecated in favor of `script.createCachedData()` */
+ produceCachedData?: boolean;
+ }
+ interface RunningScriptOptions extends BaseOptions {
+ /**
+ * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
+ * Default: `true`.
+ */
+ displayErrors?: boolean;
+ /**
+ * Specifies the number of milliseconds to execute code before terminating execution.
+ * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
+ */
+ timeout?: number;
+ /**
+ * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
+ * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
+ * If execution is terminated, an `Error` will be thrown.
+ * Default: `false`.
+ */
+ breakOnSigint?: boolean;
+ /**
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
+ */
+ microtaskMode?: 'afterEvaluate';
+ }
+ interface CompileFunctionOptions extends BaseOptions {
+ /**
+ * Provides an optional data with V8's code cache data for the supplied source.
+ */
+ cachedData?: Buffer;
+ /**
+ * Specifies whether to produce new cache data.
+ * Default: `false`,
+ */
+ produceCachedData?: boolean;
+ /**
+ * The sandbox/context in which the said function should be compiled in.
+ */
+ parsingContext?: Context;
+
+ /**
+ * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
+ */
+ contextExtensions?: Object[];
+ }
+
+ interface CreateContextOptions {
+ /**
+ * Human-readable name of the newly created context.
+ * @default 'VM Context i' Where i is an ascending numerical index of the created context.
+ */
+ name?: string;
+ /**
+ * Corresponds to the newly created context for display purposes.
+ * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
+ * like the value of the `url.origin` property of a URL object.
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
+ * @default ''
+ */
+ origin?: string;
+ codeGeneration?: {
+ /**
+ * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
+ * will throw an EvalError.
+ * @default true
+ */
+ strings?: boolean;
+ /**
+ * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
+ * @default true
+ */
+ wasm?: boolean;
+ };
+ }
+
+ type MeasureMemoryMode = 'summary' | 'detailed';
+
+ interface MeasureMemoryOptions {
+ /**
+ * @default 'summary'
+ */
+ mode?: MeasureMemoryMode;
+ context?: Context;
+ }
+
+ interface MemoryMeasurement {
+ total: {
+ jsMemoryEstimate: number;
+ jsMemoryRange: [number, number];
+ };
+ }
+
+ class Script {
+ constructor(code: string, options?: ScriptOptions);
+ runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
+ runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
+ runInThisContext(options?: RunningScriptOptions): any;
+ createCachedData(): Buffer;
+ cachedDataRejected?: boolean;
+ }
+ function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
+ function isContext(sandbox: Context): boolean;
+ function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
+ function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
+ function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
+ function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
+
+ /**
+ * Measure the memory known to V8 and used by the current execution context or a specified context.
+ *
+ * The format of the object that the returned Promise may resolve with is
+ * specific to the V8 engine and may change from one version of V8 to the next.
+ *
+ * The returned result is different from the statistics returned by
+ * `v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measures
+ * the memory reachable by V8 from a specific context, while
+ * `v8.getHeapSpaceStatistics()` measures the memory used by an instance
+ * of V8 engine, which can switch among multiple contexts that reference
+ * objects in the heap of one engine.
+ *
+ * @experimental
+ */
+ function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
+}
diff --git a/node_modules/@types/node/wasi.d.ts b/node_modules/@types/node/wasi.d.ts
new file mode 100644
index 0000000..43b3854
--- /dev/null
+++ b/node_modules/@types/node/wasi.d.ts
@@ -0,0 +1,90 @@
+declare module 'node:wasi' {
+ export * from 'wasi';
+}
+
+declare module 'wasi' {
+ interface WASIOptions {
+ /**
+ * An array of strings that the WebAssembly application will
+ * see as command line arguments. The first argument is the virtual path to the
+ * WASI command itself.
+ */
+ args?: string[];
+
+ /**
+ * An object similar to `process.env` that the WebAssembly
+ * application will see as its environment.
+ */
+ env?: object;
+
+ /**
+ * This object represents the WebAssembly application's
+ * sandbox directory structure. The string keys of `preopens` are treated as
+ * directories within the sandbox. The corresponding values in `preopens` are
+ * the real paths to those directories on the host machine.
+ */
+ preopens?: NodeJS.Dict<string>;
+
+ /**
+ * By default, WASI applications terminate the Node.js
+ * process via the `__wasi_proc_exit()` function. Setting this option to `true`
+ * causes `wasi.start()` to return the exit code rather than terminate the
+ * process.
+ * @default false
+ */
+ returnOnExit?: boolean;
+
+ /**
+ * The file descriptor used as standard input in the WebAssembly application.
+ * @default 0
+ */
+ stdin?: number;
+
+ /**
+ * The file descriptor used as standard output in the WebAssembly application.
+ * @default 1
+ */
+ stdout?: number;
+
+ /**
+ * The file descriptor used as standard error in the WebAssembly application.
+ * @default 2
+ */
+ stderr?: number;
+ }
+
+ class WASI {
+ constructor(options?: WASIOptions);
+ /**
+ *
+ * Attempt to begin execution of `instance` by invoking its `_start()` export.
+ * If `instance` does not contain a `_start()` export, then `start()` attempts to
+ * invoke the `__wasi_unstable_reactor_start()` export. If neither of those exports
+ * is present on `instance`, then `start()` does nothing.
+ *
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
+ * `memory`. If `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `start()` is called more than once, an exception is thrown.
+ */
+ start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+
+ /**
+ * Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present.
+ * If `instance` contains a `_start()` export, then an exception is thrown.
+ *
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
+ * `memory`. If `instance` does not have a `memory` export an exception is thrown.
+ *
+ * If `initialize()` is called more than once, an exception is thrown.
+ */
+ initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
+
+ /**
+ * Is an object that implements the WASI system call API. This object
+ * should be passed as the `wasi_snapshot_preview1` import during the instantiation of a
+ * [`WebAssembly.Instance`][].
+ */
+ readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
+ }
+}
diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts
new file mode 100644
index 0000000..101f6cc
--- /dev/null
+++ b/node_modules/@types/node/worker_threads.d.ts
@@ -0,0 +1,242 @@
+declare module 'node:worker_threads' {
+ export * from 'worker_threads';
+}
+
+declare module 'worker_threads' {
+ import { Context } from 'node:vm';
+ import EventEmitter = require('node:events');
+ import { Readable, Writable } from 'node:stream';
+ import { URL } from 'node:url';
+ import { FileHandle } from 'node:fs/promises';
+
+ const isMainThread: boolean;
+ const parentPort: null | MessagePort;
+ const resourceLimits: ResourceLimits;
+ const SHARE_ENV: unique symbol;
+ const threadId: number;
+ const workerData: any;
+
+ class MessageChannel {
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
+ }
+
+ type TransferListItem = ArrayBuffer | MessagePort | FileHandle;
+
+ class MessagePort extends EventEmitter {
+ close(): void;
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ ref(): void;
+ unref(): void;
+ start(): void;
+
+ addListener(event: "close", listener: () => void): this;
+ addListener(event: "message", listener: (value: any) => void): this;
+ addListener(event: "messageerror", listener: (error: Error) => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "close"): boolean;
+ emit(event: "message", value: any): boolean;
+ emit(event: "messageerror", error: Error): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "close", listener: () => void): this;
+ on(event: "message", listener: (value: any) => void): this;
+ on(event: "messageerror", listener: (error: Error) => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "close", listener: () => void): this;
+ once(event: "message", listener: (value: any) => void): this;
+ once(event: "messageerror", listener: (error: Error) => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "close", listener: () => void): this;
+ prependListener(event: "message", listener: (value: any) => void): this;
+ prependListener(event: "messageerror", listener: (error: Error) => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "close", listener: () => void): this;
+ prependOnceListener(event: "message", listener: (value: any) => void): this;
+ prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: () => void): this;
+ removeListener(event: "message", listener: (value: any) => void): this;
+ removeListener(event: "messageerror", listener: (error: Error) => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ off(event: "close", listener: () => void): this;
+ off(event: "message", listener: (value: any) => void): this;
+ off(event: "messageerror", listener: (error: Error) => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ interface WorkerOptions {
+ /**
+ * List of arguments which would be stringified and appended to
+ * `process.argv` in the worker. This is mostly similar to the `workerData`
+ * but the values will be available on the global `process.argv` as if they
+ * were passed as CLI options to the script.
+ */
+ argv?: any[];
+ env?: NodeJS.Dict<string> | typeof SHARE_ENV;
+ eval?: boolean;
+ workerData?: any;
+ stdin?: boolean;
+ stdout?: boolean;
+ stderr?: boolean;
+ execArgv?: string[];
+ resourceLimits?: ResourceLimits;
+ /**
+ * Additional data to send in the first worker message.
+ */
+ transferList?: TransferListItem[];
+ trackUnmanagedFds?: boolean;
+ }
+
+ interface ResourceLimits {
+ /**
+ * The maximum size of a heap space for recently created objects.
+ */
+ maxYoungGenerationSizeMb?: number;
+ /**
+ * The maximum size of the main heap in MB.
+ */
+ maxOldGenerationSizeMb?: number;
+ /**
+ * The size of a pre-allocated memory range used for generated code.
+ */
+ codeRangeSizeMb?: number;
+ /**
+ * The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
+ * @default 4
+ */
+ stackSizeMb?: number;
+ }
+
+ class Worker extends EventEmitter {
+ readonly stdin: Writable | null;
+ readonly stdout: Readable;
+ readonly stderr: Readable;
+ readonly threadId: number;
+ readonly resourceLimits?: ResourceLimits;
+
+ /**
+ * @param filename The path to the Worker’s main script or module.
+ * Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../,
+ * or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.
+ */
+ constructor(filename: string | URL, options?: WorkerOptions);
+
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
+ ref(): void;
+ unref(): void;
+ /**
+ * Stop all JavaScript execution in the worker thread as soon as possible.
+ * Returns a Promise for the exit code that is fulfilled when the `exit` event is emitted.
+ */
+ terminate(): Promise<number>;
+
+ /**
+ * Returns a readable stream for a V8 snapshot of the current state of the Worker.
+ * See [`v8.getHeapSnapshot()`][] for more details.
+ *
+ * If the Worker thread is no longer running, which may occur before the
+ * [`'exit'` event][] is emitted, the returned `Promise` will be rejected
+ * immediately with an [`ERR_WORKER_NOT_RUNNING`][] error
+ */
+ getHeapSnapshot(): Promise<Readable>;
+
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "exit", listener: (exitCode: number) => void): this;
+ addListener(event: "message", listener: (value: any) => void): this;
+ addListener(event: "messageerror", listener: (error: Error) => void): this;
+ addListener(event: "online", listener: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ emit(event: "error", err: Error): boolean;
+ emit(event: "exit", exitCode: number): boolean;
+ emit(event: "message", value: any): boolean;
+ emit(event: "messageerror", error: Error): boolean;
+ emit(event: "online"): boolean;
+ emit(event: string | symbol, ...args: any[]): boolean;
+
+ on(event: "error", listener: (err: Error) => void): this;
+ on(event: "exit", listener: (exitCode: number) => void): this;
+ on(event: "message", listener: (value: any) => void): this;
+ on(event: "messageerror", listener: (error: Error) => void): this;
+ on(event: "online", listener: () => void): this;
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ once(event: "error", listener: (err: Error) => void): this;
+ once(event: "exit", listener: (exitCode: number) => void): this;
+ once(event: "message", listener: (value: any) => void): this;
+ once(event: "messageerror", listener: (error: Error) => void): this;
+ once(event: "online", listener: () => void): this;
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependListener(event: "error", listener: (err: Error) => void): this;
+ prependListener(event: "exit", listener: (exitCode: number) => void): this;
+ prependListener(event: "message", listener: (value: any) => void): this;
+ prependListener(event: "messageerror", listener: (error: Error) => void): this;
+ prependListener(event: "online", listener: () => void): this;
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
+ prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
+ prependOnceListener(event: "message", listener: (value: any) => void): this;
+ prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
+ prependOnceListener(event: "online", listener: () => void): this;
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "error", listener: (err: Error) => void): this;
+ removeListener(event: "exit", listener: (exitCode: number) => void): this;
+ removeListener(event: "message", listener: (value: any) => void): this;
+ removeListener(event: "messageerror", listener: (error: Error) => void): this;
+ removeListener(event: "online", listener: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ off(event: "error", listener: (err: Error) => void): this;
+ off(event: "exit", listener: (exitCode: number) => void): this;
+ off(event: "message", listener: (value: any) => void): this;
+ off(event: "messageerror", listener: (error: Error) => void): this;
+ off(event: "online", listener: () => void): this;
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
+ }
+
+ /**
+ * Mark an object as not transferable.
+ * If `object` occurs in the transfer list of a `port.postMessage()` call, it will be ignored.
+ *
+ * In particular, this makes sense for objects that can be cloned, rather than transferred,
+ * and which are used by other objects on the sending side. For example, Node.js marks
+ * the `ArrayBuffer`s it uses for its Buffer pool with this.
+ *
+ * This operation cannot be undone.
+ */
+ function markAsUntransferable(object: object): void;
+
+ /**
+ * Transfer a `MessagePort` to a different `vm` Context. The original `port`
+ * object will be rendered unusable, and the returned `MessagePort` instance will
+ * take its place.
+ *
+ * The returned `MessagePort` will be an object in the target context, and will
+ * inherit from its global `Object` class. Objects passed to the
+ * `port.onmessage()` listener will also be created in the target context
+ * and inherit from its global `Object` class.
+ *
+ * However, the created `MessagePort` will no longer inherit from
+ * `EventEmitter`, and only `port.onmessage()` can be used to receive
+ * events using it.
+ */
+ function moveMessagePortToContext(port: MessagePort, context: Context): MessagePort;
+
+ /**
+ * Receive a single message from a given `MessagePort`. If no message is available,
+ * `undefined` is returned, otherwise an object with a single `message` property
+ * that contains the message payload, corresponding to the oldest message in the
+ * `MessagePort`’s queue.
+ */
+ function receiveMessageOnPort(port: MessagePort): { message: any } | undefined;
+}
diff --git a/node_modules/@types/node/zlib.d.ts b/node_modules/@types/node/zlib.d.ts
new file mode 100644
index 0000000..f3fbc44
--- /dev/null
+++ b/node_modules/@types/node/zlib.d.ts
@@ -0,0 +1,365 @@
+declare module 'node:zlib' {
+ export * from 'zlib';
+}
+
+declare module 'zlib' {
+ import * as stream from 'node:stream';
+
+ interface ZlibOptions {
+ /**
+ * @default constants.Z_NO_FLUSH
+ */
+ flush?: number;
+ /**
+ * @default constants.Z_FINISH
+ */
+ finishFlush?: number;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number;
+ windowBits?: number;
+ level?: number; // compression only
+ memLevel?: number; // compression only
+ strategy?: number; // compression only
+ dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
+ info?: boolean;
+ maxOutputLength?: number;
+ }
+
+ interface BrotliOptions {
+ /**
+ * @default constants.BROTLI_OPERATION_PROCESS
+ */
+ flush?: number;
+ /**
+ * @default constants.BROTLI_OPERATION_FINISH
+ */
+ finishFlush?: number;
+ /**
+ * @default 16*1024
+ */
+ chunkSize?: number;
+ params?: {
+ /**
+ * Each key is a `constants.BROTLI_*` constant.
+ */
+ [key: number]: boolean | number;
+ };
+ maxOutputLength?: number;
+ }
+
+ interface Zlib {
+ /** @deprecated Use bytesWritten instead. */
+ readonly bytesRead: number;
+ readonly bytesWritten: number;
+ shell?: boolean | string;
+ close(callback?: () => void): void;
+ flush(kind?: number, callback?: () => void): void;
+ flush(callback?: () => void): void;
+ }
+
+ interface ZlibParams {
+ params(level: number, strategy: number, callback: () => void): void;
+ }
+
+ interface ZlibReset {
+ reset(): void;
+ }
+
+ interface BrotliCompress extends stream.Transform, Zlib { }
+ interface BrotliDecompress extends stream.Transform, Zlib { }
+ interface Gzip extends stream.Transform, Zlib { }
+ interface Gunzip extends stream.Transform, Zlib { }
+ interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
+ interface Inflate extends stream.Transform, Zlib, ZlibReset { }
+ interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
+ interface InflateRaw extends stream.Transform, Zlib, ZlibReset { }
+ interface Unzip extends stream.Transform, Zlib { }
+
+ function createBrotliCompress(options?: BrotliOptions): BrotliCompress;
+ function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress;
+ function createGzip(options?: ZlibOptions): Gzip;
+ function createGunzip(options?: ZlibOptions): Gunzip;
+ function createDeflate(options?: ZlibOptions): Deflate;
+ function createInflate(options?: ZlibOptions): Inflate;
+ function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
+ function createInflateRaw(options?: ZlibOptions): InflateRaw;
+ function createUnzip(options?: ZlibOptions): Unzip;
+
+ type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
+
+ type CompressCallback = (error: Error | null, result: Buffer) => void;
+
+ function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliCompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliCompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+
+ function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+
+ function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
+ function brotliDecompress(buf: InputType, callback: CompressCallback): void;
+ namespace brotliDecompress {
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
+ }
+
+ function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
+
+ function deflate(buf: InputType, callback: CompressCallback): void;
+ function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function deflateRaw(buf: InputType, callback: CompressCallback): void;
+ function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace deflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function gzip(buf: InputType, callback: CompressCallback): void;
+ function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function gunzip(buf: InputType, callback: CompressCallback): void;
+ function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace gunzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function inflate(buf: InputType, callback: CompressCallback): void;
+ function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflate {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function inflateRaw(buf: InputType, callback: CompressCallback): void;
+ function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace inflateRaw {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ function unzip(buf: InputType, callback: CompressCallback): void;
+ function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
+ namespace unzip {
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
+ }
+
+ function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
+
+ namespace constants {
+ const BROTLI_DECODE: number;
+ const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
+ const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number;
+ const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number;
+ const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number;
+ const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number;
+ const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number;
+ const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number;
+ const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number;
+ const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number;
+ const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number;
+ const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number;
+ const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number;
+ const BROTLI_DECODER_ERROR_UNREACHABLE: number;
+ const BROTLI_DECODER_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_NO_ERROR: number;
+ const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number;
+ const BROTLI_DECODER_PARAM_LARGE_WINDOW: number;
+ const BROTLI_DECODER_RESULT_ERROR: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number;
+ const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number;
+ const BROTLI_DECODER_RESULT_SUCCESS: number;
+ const BROTLI_DECODER_SUCCESS: number;
+
+ const BROTLI_DEFAULT_MODE: number;
+ const BROTLI_DEFAULT_QUALITY: number;
+ const BROTLI_DEFAULT_WINDOW: number;
+ const BROTLI_ENCODE: number;
+ const BROTLI_LARGE_MAX_WINDOW_BITS: number;
+ const BROTLI_MAX_INPUT_BLOCK_BITS: number;
+ const BROTLI_MAX_QUALITY: number;
+ const BROTLI_MAX_WINDOW_BITS: number;
+ const BROTLI_MIN_INPUT_BLOCK_BITS: number;
+ const BROTLI_MIN_QUALITY: number;
+ const BROTLI_MIN_WINDOW_BITS: number;
+
+ const BROTLI_MODE_FONT: number;
+ const BROTLI_MODE_GENERIC: number;
+ const BROTLI_MODE_TEXT: number;
+
+ const BROTLI_OPERATION_EMIT_METADATA: number;
+ const BROTLI_OPERATION_FINISH: number;
+ const BROTLI_OPERATION_FLUSH: number;
+ const BROTLI_OPERATION_PROCESS: number;
+
+ const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number;
+ const BROTLI_PARAM_LARGE_WINDOW: number;
+ const BROTLI_PARAM_LGBLOCK: number;
+ const BROTLI_PARAM_LGWIN: number;
+ const BROTLI_PARAM_MODE: number;
+ const BROTLI_PARAM_NDIRECT: number;
+ const BROTLI_PARAM_NPOSTFIX: number;
+ const BROTLI_PARAM_QUALITY: number;
+ const BROTLI_PARAM_SIZE_HINT: number;
+
+ const DEFLATE: number;
+ const DEFLATERAW: number;
+ const GUNZIP: number;
+ const GZIP: number;
+ const INFLATE: number;
+ const INFLATERAW: number;
+ const UNZIP: number;
+
+ // Allowed flush values.
+ const Z_NO_FLUSH: number;
+ const Z_PARTIAL_FLUSH: number;
+ const Z_SYNC_FLUSH: number;
+ const Z_FULL_FLUSH: number;
+ const Z_FINISH: number;
+ const Z_BLOCK: number;
+ const Z_TREES: number;
+
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ const Z_OK: number;
+ const Z_STREAM_END: number;
+ const Z_NEED_DICT: number;
+ const Z_ERRNO: number;
+ const Z_STREAM_ERROR: number;
+ const Z_DATA_ERROR: number;
+ const Z_MEM_ERROR: number;
+ const Z_BUF_ERROR: number;
+ const Z_VERSION_ERROR: number;
+
+ // Compression levels.
+ const Z_NO_COMPRESSION: number;
+ const Z_BEST_SPEED: number;
+ const Z_BEST_COMPRESSION: number;
+ const Z_DEFAULT_COMPRESSION: number;
+
+ // Compression strategy.
+ const Z_FILTERED: number;
+ const Z_HUFFMAN_ONLY: number;
+ const Z_RLE: number;
+ const Z_FIXED: number;
+ const Z_DEFAULT_STRATEGY: number;
+
+ const Z_DEFAULT_WINDOWBITS: number;
+ const Z_MIN_WINDOWBITS: number;
+ const Z_MAX_WINDOWBITS: number;
+
+ const Z_MIN_CHUNK: number;
+ const Z_MAX_CHUNK: number;
+ const Z_DEFAULT_CHUNK: number;
+
+ const Z_MIN_MEMLEVEL: number;
+ const Z_MAX_MEMLEVEL: number;
+ const Z_DEFAULT_MEMLEVEL: number;
+
+ const Z_MIN_LEVEL: number;
+ const Z_MAX_LEVEL: number;
+ const Z_DEFAULT_LEVEL: number;
+
+ const ZLIB_VERNUM: number;
+ }
+
+ // Allowed flush values.
+ /** @deprecated Use `constants.Z_NO_FLUSH` */
+ const Z_NO_FLUSH: number;
+ /** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
+ const Z_PARTIAL_FLUSH: number;
+ /** @deprecated Use `constants.Z_SYNC_FLUSH` */
+ const Z_SYNC_FLUSH: number;
+ /** @deprecated Use `constants.Z_FULL_FLUSH` */
+ const Z_FULL_FLUSH: number;
+ /** @deprecated Use `constants.Z_FINISH` */
+ const Z_FINISH: number;
+ /** @deprecated Use `constants.Z_BLOCK` */
+ const Z_BLOCK: number;
+ /** @deprecated Use `constants.Z_TREES` */
+ const Z_TREES: number;
+
+ // Return codes for the compression/decompression functions.
+ // Negative values are errors, positive values are used for special but normal events.
+ /** @deprecated Use `constants.Z_OK` */
+ const Z_OK: number;
+ /** @deprecated Use `constants.Z_STREAM_END` */
+ const Z_STREAM_END: number;
+ /** @deprecated Use `constants.Z_NEED_DICT` */
+ const Z_NEED_DICT: number;
+ /** @deprecated Use `constants.Z_ERRNO` */
+ const Z_ERRNO: number;
+ /** @deprecated Use `constants.Z_STREAM_ERROR` */
+ const Z_STREAM_ERROR: number;
+ /** @deprecated Use `constants.Z_DATA_ERROR` */
+ const Z_DATA_ERROR: number;
+ /** @deprecated Use `constants.Z_MEM_ERROR` */
+ const Z_MEM_ERROR: number;
+ /** @deprecated Use `constants.Z_BUF_ERROR` */
+ const Z_BUF_ERROR: number;
+ /** @deprecated Use `constants.Z_VERSION_ERROR` */
+ const Z_VERSION_ERROR: number;
+
+ // Compression levels.
+ /** @deprecated Use `constants.Z_NO_COMPRESSION` */
+ const Z_NO_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_BEST_SPEED` */
+ const Z_BEST_SPEED: number;
+ /** @deprecated Use `constants.Z_BEST_COMPRESSION` */
+ const Z_BEST_COMPRESSION: number;
+ /** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
+ const Z_DEFAULT_COMPRESSION: number;
+
+ // Compression strategy.
+ /** @deprecated Use `constants.Z_FILTERED` */
+ const Z_FILTERED: number;
+ /** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
+ const Z_HUFFMAN_ONLY: number;
+ /** @deprecated Use `constants.Z_RLE` */
+ const Z_RLE: number;
+ /** @deprecated Use `constants.Z_FIXED` */
+ const Z_FIXED: number;
+ /** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
+ const Z_DEFAULT_STRATEGY: number;
+
+ /** @deprecated */
+ const Z_BINARY: number;
+ /** @deprecated */
+ const Z_TEXT: number;
+ /** @deprecated */
+ const Z_ASCII: number;
+ /** @deprecated */
+ const Z_UNKNOWN: number;
+ /** @deprecated */
+ const Z_DEFLATED: number;
+}
diff --git a/node_modules/@types/readable-stream/LICENSE b/node_modules/@types/readable-stream/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/readable-stream/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ 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:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ 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
diff --git a/node_modules/@types/readable-stream/README.md b/node_modules/@types/readable-stream/README.md
new file mode 100644
index 0000000..02004b9
--- /dev/null
+++ b/node_modules/@types/readable-stream/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/readable-stream`
+
+# Summary
+This package contains type definitions for readable-stream (https://github.com/nodejs/readable-stream).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/readable-stream.
+
+### Additional Details
+ * Last updated: Fri, 10 Jul 2020 15:37:57 GMT
+ * Dependencies: [@types/safe-buffer](https://npmjs.com/package/@types/safe-buffer), [@types/node](https://npmjs.com/package/@types/node)
+ * Global values: `_Readable`
+
+# Credits
+These definitions were written by [TeamworkGuy2](https://github.com/TeamworkGuy2), and [markdreyer](https://github.com/markdreyer).
diff --git a/node_modules/@types/readable-stream/index.d.ts b/node_modules/@types/readable-stream/index.d.ts
new file mode 100644
index 0000000..ca7ed51
--- /dev/null
+++ b/node_modules/@types/readable-stream/index.d.ts
@@ -0,0 +1,281 @@
+// Type definitions for readable-stream 2.3
+// Project: https://github.com/nodejs/readable-stream
+// Definitions by: TeamworkGuy2 <https://github.com/TeamworkGuy2>
+// markdreyer <https://github.com/markdreyer>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
+
+/// <reference types="node" />
+
+import * as stream from "stream";
+import * as SafeBuffer from "safe-buffer";
+
+declare class StringDecoder {
+ constructor(encoding?: BufferEncoding | string);
+ write(buffer: Buffer): string;
+ end(buffer?: Buffer): string;
+}
+
+declare class _Readable extends stream.Readable {
+ // static ReadableState: _Readable.ReadableState;
+ _readableState: _Readable.ReadableState;
+ destroyed: boolean;
+
+ constructor(options?: _Readable.ReadableOptions);
+
+ destroy(err?: Error, callback?: (error: Error | null) => void): this;
+ _undestroy(): void;
+}
+
+declare namespace _Readable {
+ // ==== BufferList ====
+ interface Entry<D> {
+ data: D;
+ next: Entry<D> | null;
+ }
+
+ interface BufferList<D extends SafeBuffer.Buffer = SafeBuffer.Buffer> {
+ head: Entry<D>;
+ tail: Entry<D>;
+ length: number;
+
+ push(v: D): void;
+ unshift(v: D): void;
+ shift(): D;
+ clear(): void;
+ join(s: any): string;
+ concat(n: number): D;
+ }
+
+ // ==== destroy ====
+ interface Destroy {
+ destroy(this: Readable | Writable, error: Error | null, callback?: (error: Error | null) => void): Readable | Writable;
+ undestroy(this: Readable | Writable): void;
+ }
+
+ // ==== _stream_duplex ====
+ type DuplexOptions = ReadableOptions & WritableOptions & {
+ allowHalfOpen?: boolean;
+ readable?: boolean;
+ writable?: boolean;
+ read?(this: Duplex, size: number): void;
+ write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
+ final?(this: Duplex, callback: (error?: Error | null) => void): void;
+ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
+ };
+
+ class Duplex extends Writable implements /*extends*/_Readable, stream.Duplex {
+ /**
+ * This is a dummy function required to retain type compatibility to node.
+ * @deprecated DO NOT USE
+ */
+ static from(source: any): any;
+ allowHalfOpen: boolean;
+ destroyed: boolean;
+ // Readable
+ readable: boolean;
+ readonly readableEncoding: BufferEncoding | null;
+ readonly readableEnded: boolean;
+ readonly readableFlowing: boolean | null;
+ readonly readableHighWaterMark: number;
+ readonly readableLength: number;
+ readonly readableObjectMode: boolean;
+ readonly writableObjectMode: boolean;
+ _readableState: ReadableState;
+
+ _read(size?: number): void;
+ read(size?: number): any;
+ setEncoding(enc: BufferEncoding): this;
+ resume(): this;
+ pause(): this;
+ isPaused(): boolean;
+ unpipe(dest?: NodeJS.WritableStream): this;
+ unshift(chunk: any): boolean;
+ wrap(oldStream: NodeJS.ReadableStream): this;
+ push(chunk: any, encoding?: BufferEncoding): boolean;
+ _destroy(err: Error | null, callback: (error: Error | null) => void): void;
+ destroy(err?: Error, callback?: (error: Error | null) => void): this;
+ pipe<S extends NodeJS.WritableStream>(dest: S, pipeOpts?: { end?: boolean }): S;
+ addListener(ev: string | symbol, fn: (...args: any[]) => void): this;
+ on(ev: string | symbol, fn: (...args: any[]) => void): this;
+
+ _undestroy(): void;
+ [Symbol.asyncIterator](): AsyncIterableIterator<any>;
+ // end-Readable
+
+ constructor(options?: DuplexOptions);
+ }
+
+ // ==== _stream_passthrough ====
+ class PassThrough extends Transform implements stream.PassThrough {
+ constructor(options?: TransformOptions);
+
+ _transform<T>(chunk: T, encoding: BufferEncoding | string | null | undefined, callback: (error?: Error, data?: T) => void): void;
+ }
+
+ // ==== _stream_readable ====
+ interface ReadableStateOptions {
+ defaultEncoding?: BufferEncoding;
+ encoding?: BufferEncoding;
+ highWaterMark?: number;
+ objectMode?: boolean;
+ readableObjectMode?: boolean;
+ readableHighWaterMark?: number;
+ }
+
+ interface ReadableState {
+ objectMode: boolean;
+ highWaterMark: number;
+ buffer: BufferList<any>;
+ length: number;
+ pipes: any; // NodeJS.WritableStream | any[]; // TODO
+ pipesCount: number;
+ flowing: any;
+ ended: boolean;
+ endEmitted: boolean;
+ reading: boolean;
+ sync: boolean;
+ needReadable: boolean;
+ emittedReadable: boolean;
+ readableListening: boolean;
+ resumeScheduled: boolean;
+ destroyed: boolean;
+ awaitDrain: number;
+ defaultEncoding: BufferEncoding;
+ readingMore: boolean;
+ decoder: StringDecoder | null;
+ encoding: BufferEncoding | null;
+
+ // new (options: ReadableStateOptions, stream: _Readable): ReadableState;
+ }
+
+ type ReadableOptions = ReadableStateOptions & {
+ read?(this: _Readable, size: number): void;
+ destroy?(this: _Readable, error: Error | null, callback: (error: Error | null) => void): void;
+ };
+
+ class Readable extends _Readable {
+ constructor(options?: ReadableOptions);
+ }
+
+ // ==== _stream_transform ====
+ type TransformOptions = DuplexOptions & {
+ read?(this: Transform, size: number): void;
+ write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+ writev?(this: Transform, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
+ final?(this: Transform, callback: (error?: Error | null) => void): void;
+ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
+ transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error, data?: any) => void): void;
+ flush?(this: Transform, callback: (er: any, data: any) => void): void;
+ };
+
+ class Transform extends Duplex implements stream.Transform {
+ _transformState: {
+ afterTransform: (this: Transform, er: any, data: any) => void | boolean;
+ needTransform: boolean;
+ transforming: boolean;
+ writecb: ((err: any) => any) | null;
+ writechunk: any; // TODO
+ writeencoding: BufferEncoding | null;
+ };
+
+ constructor(options?: TransformOptions);
+
+ _transform(chunk: any, encoding: BufferEncoding, callback: (error?: Error, data?: any) => void): void;
+ _flush(callback: (error?: Error, data?: any) => void): void;
+ }
+
+ // ==== _stream_writable ====
+ interface CorkedRequest {
+ next: any;
+ entry: any;
+ finish(): void;
+ }
+
+ interface BufferRequest {
+ chunk: any; // TODO
+ encoding: BufferEncoding;
+ isBuf: boolean;
+ callback: (error?: Error | null) => void;
+ next: BufferRequest | null;
+ }
+
+ interface WritableStateOptions {
+ decodeStrings?: boolean;
+ defaultEncoding?: BufferEncoding;
+ highWaterMark?: number;
+ objectMode?: boolean;
+ writableObjectMode?: boolean;
+ writableHighWaterMark?: number;
+ }
+
+ interface WritableState {
+ buffer: BufferRequest[];
+ objectMode: boolean;
+ highWaterMark: number;
+ finalCalled: boolean;
+ needDrain: boolean;
+ ending: boolean;
+ ended: boolean;
+ finished: boolean;
+ destroyed: boolean;
+ decodeStrings: boolean;
+ defaultEncoding: BufferEncoding;
+ length: number;
+ writing: boolean;
+ corked: number;
+ sync: boolean;
+ bufferProcessing: boolean;
+ writelen: number;
+ pendingcb: number;
+ prefinished: boolean;
+ errorEmitted: boolean;
+ bufferedRequestCount: number;
+ writecb: ((err?: Error | null) => void) | null;
+ onwrite: (er?: Error | null) => any;
+ bufferedRequest: BufferRequest | null;
+ lastBufferedRequest: BufferRequest | null;
+ corkedRequestsFree: CorkedRequest;
+
+ // new (options: WritableStateOptions, stream: Writable): WritableState;
+
+ getBuffer(): BufferRequest[];
+ }
+
+ type WritableOptions = WritableStateOptions & {
+ write?(this: Writable, chunk: any, encoding: BufferEncoding | string, callback: (error?: Error | null) => void): void;
+ writev?(this: Writable, chunk: ArrayLike<{ chunk: any; encoding: BufferEncoding | string }>, callback: (error?: Error | null) => void): void;
+ destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;
+ final?(this: Writable, callback: (error?: Error | null) => void): void;
+ };
+
+ class Writable extends stream.Writable {
+ // static WritableState: WritableState;
+ // private static realHasInstance: (obj: any) => boolean;
+ destroyed: boolean;
+ _writableState: WritableState;
+
+ constructor(options?: WritableOptions);
+
+ destroy(error?: Error, callback?: (error?: Error | null) => void): this;
+ _undestroy(): void;
+ }
+
+ class Stream extends _Readable {
+ constructor(options?: ReadableOptions);
+ }
+
+ // if (process.env.READABLE_STREAM === 'disable' && Stream)
+ let NodeBaseExport: stream.Readable & {
+ Readable: stream.Readable;
+ Writable: stream.Writable;
+ Duplex: stream.Duplex;
+ Transform: stream.Transform;
+ PassThrough: stream.PassThrough;
+ Stream: stream;
+ };
+}
+
+export = _Readable;
+export as namespace _Readable;
diff --git a/node_modules/@types/readable-stream/package.json b/node_modules/@types/readable-stream/package.json
new file mode 100644
index 0000000..1276663
--- /dev/null
+++ b/node_modules/@types/readable-stream/package.json
@@ -0,0 +1,60 @@
+{
+ "_from": "@types/readable-stream@^2.3.9",
+ "_id": "@types/readable-stream@2.3.9",
+ "_inBundle": false,
+ "_integrity": "sha512-sqsgQqFT7HmQz/V5jH1O0fvQQnXAJO46Gg9LRO/JPfjmVmGUlcx831TZZO3Y3HtWhIkzf3kTsNT0Z0kzIhIvZw==",
+ "_location": "/@types/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "@types/readable-stream@^2.3.9",
+ "name": "@types/readable-stream",
+ "escapedName": "@types%2freadable-stream",
+ "scope": "@types",
+ "rawSpec": "^2.3.9",
+ "saveSpec": null,
+ "fetchSpec": "^2.3.9"
+ },
+ "_requiredBy": [
+ "/readable-web-to-node-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.9.tgz",
+ "_shasum": "40a8349e6ace3afd2dd1b6d8e9b02945de4566a9",
+ "_spec": "@types/readable-stream@^2.3.9",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/readable-web-to-node-stream",
+ "bugs": {
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "TeamworkGuy2",
+ "url": "https://github.com/TeamworkGuy2"
+ },
+ {
+ "name": "markdreyer",
+ "url": "https://github.com/markdreyer"
+ }
+ ],
+ "dependencies": {
+ "@types/node": "*",
+ "safe-buffer": "*"
+ },
+ "deprecated": false,
+ "description": "TypeScript definitions for readable-stream",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
+ "license": "MIT",
+ "main": "",
+ "name": "@types/readable-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/readable-stream"
+ },
+ "scripts": {},
+ "typeScriptVersion": "3.0",
+ "types": "index.d.ts",
+ "typesPublisherContentHash": "3c0690ae963781f75257eed70404d109d812effe85b3877a9c1f57d50c9e0cd8",
+ "version": "2.3.9"
+}
diff --git a/node_modules/ansi-regex/index.d.ts b/node_modules/ansi-regex/index.d.ts
new file mode 100644
index 0000000..2dbf6af
--- /dev/null
+++ b/node_modules/ansi-regex/index.d.ts
@@ -0,0 +1,37 @@
+declare namespace ansiRegex {
+ interface Options {
+ /**
+ Match only the first ANSI escape.
+
+ @default false
+ */
+ onlyFirst: boolean;
+ }
+}
+
+/**
+Regular expression for matching ANSI escape codes.
+
+@example
+```
+import ansiRegex = require('ansi-regex');
+
+ansiRegex().test('\u001B[4mcake\u001B[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
+//=> ['\u001B[4m']
+
+'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
+//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
+```
+*/
+declare function ansiRegex(options?: ansiRegex.Options): RegExp;
+
+export = ansiRegex;
diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js
new file mode 100644
index 0000000..35054aa
--- /dev/null
+++ b/node_modules/ansi-regex/index.js
@@ -0,0 +1,10 @@
+'use strict';
+
+module.exports = ({onlyFirst = false} = {}) => {
+ const pattern = [
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
+ ].join('|');
+
+ return new RegExp(pattern, onlyFirst ? undefined : 'g');
+};
diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/ansi-regex/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json
new file mode 100644
index 0000000..925aadf
--- /dev/null
+++ b/node_modules/ansi-regex/package.json
@@ -0,0 +1,90 @@
+{
+ "_args": [
+ [
+ "ansi-regex@5.0.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "ansi-regex@5.0.0",
+ "_id": "ansi-regex@5.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+ "_location": "/ansi-regex",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ansi-regex@5.0.0",
+ "name": "ansi-regex",
+ "escapedName": "ansi-regex",
+ "rawSpec": "5.0.0",
+ "saveSpec": null,
+ "fetchSpec": "5.0.0"
+ },
+ "_requiredBy": [
+ "/strip-ansi"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "_spec": "5.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/ansi-regex/issues"
+ },
+ "description": "Regular expression for matching ANSI escape codes",
+ "devDependencies": {
+ "ava": "^2.4.0",
+ "tsd": "^0.9.0",
+ "xo": "^0.25.3"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/chalk/ansi-regex#readme",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "text",
+ "regex",
+ "regexp",
+ "re",
+ "match",
+ "test",
+ "find",
+ "pattern"
+ ],
+ "license": "MIT",
+ "name": "ansi-regex",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/ansi-regex.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd",
+ "view-supported": "node fixtures/view-codes.js"
+ },
+ "version": "5.0.0"
+}
diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md
new file mode 100644
index 0000000..3c2b77c
--- /dev/null
+++ b/node_modules/ansi-regex/readme.md
@@ -0,0 +1,78 @@
+# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
+
+> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
+
+
+## Install
+
+```
+$ npm install ansi-regex
+```
+
+
+## Usage
+
+```js
+const ansiRegex = require('ansi-regex');
+
+ansiRegex().test('\u001B[4mcake\u001B[0m');
+//=> true
+
+ansiRegex().test('cake');
+//=> false
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex());
+//=> ['\u001B[4m', '\u001B[0m']
+
+'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
+//=> ['\u001B[4m']
+
+'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
+//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
+```
+
+
+## API
+
+### ansiRegex(options?)
+
+Returns a regex for matching ANSI escape codes.
+
+#### options
+
+Type: `object`
+
+##### onlyFirst
+
+Type: `boolean`<br>
+Default: `false` *(Matches any ANSI escape codes in a string)*
+
+Match only the first ANSI escape.
+
+
+## FAQ
+
+### Why do you test for codes not in the ECMA 48 standard?
+
+Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
+
+On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/ansi-styles/index.d.ts b/node_modules/ansi-styles/index.d.ts
new file mode 100644
index 0000000..44a907e
--- /dev/null
+++ b/node_modules/ansi-styles/index.d.ts
@@ -0,0 +1,345 @@
+declare type CSSColor =
+ | 'aliceblue'
+ | 'antiquewhite'
+ | 'aqua'
+ | 'aquamarine'
+ | 'azure'
+ | 'beige'
+ | 'bisque'
+ | 'black'
+ | 'blanchedalmond'
+ | 'blue'
+ | 'blueviolet'
+ | 'brown'
+ | 'burlywood'
+ | 'cadetblue'
+ | 'chartreuse'
+ | 'chocolate'
+ | 'coral'
+ | 'cornflowerblue'
+ | 'cornsilk'
+ | 'crimson'
+ | 'cyan'
+ | 'darkblue'
+ | 'darkcyan'
+ | 'darkgoldenrod'
+ | 'darkgray'
+ | 'darkgreen'
+ | 'darkgrey'
+ | 'darkkhaki'
+ | 'darkmagenta'
+ | 'darkolivegreen'
+ | 'darkorange'
+ | 'darkorchid'
+ | 'darkred'
+ | 'darksalmon'
+ | 'darkseagreen'
+ | 'darkslateblue'
+ | 'darkslategray'
+ | 'darkslategrey'
+ | 'darkturquoise'
+ | 'darkviolet'
+ | 'deeppink'
+ | 'deepskyblue'
+ | 'dimgray'
+ | 'dimgrey'
+ | 'dodgerblue'
+ | 'firebrick'
+ | 'floralwhite'
+ | 'forestgreen'
+ | 'fuchsia'
+ | 'gainsboro'
+ | 'ghostwhite'
+ | 'gold'
+ | 'goldenrod'
+ | 'gray'
+ | 'green'
+ | 'greenyellow'
+ | 'grey'
+ | 'honeydew'
+ | 'hotpink'
+ | 'indianred'
+ | 'indigo'
+ | 'ivory'
+ | 'khaki'
+ | 'lavender'
+ | 'lavenderblush'
+ | 'lawngreen'
+ | 'lemonchiffon'
+ | 'lightblue'
+ | 'lightcoral'
+ | 'lightcyan'
+ | 'lightgoldenrodyellow'
+ | 'lightgray'
+ | 'lightgreen'
+ | 'lightgrey'
+ | 'lightpink'
+ | 'lightsalmon'
+ | 'lightseagreen'
+ | 'lightskyblue'
+ | 'lightslategray'
+ | 'lightslategrey'
+ | 'lightsteelblue'
+ | 'lightyellow'
+ | 'lime'
+ | 'limegreen'
+ | 'linen'
+ | 'magenta'
+ | 'maroon'
+ | 'mediumaquamarine'
+ | 'mediumblue'
+ | 'mediumorchid'
+ | 'mediumpurple'
+ | 'mediumseagreen'
+ | 'mediumslateblue'
+ | 'mediumspringgreen'
+ | 'mediumturquoise'
+ | 'mediumvioletred'
+ | 'midnightblue'
+ | 'mintcream'
+ | 'mistyrose'
+ | 'moccasin'
+ | 'navajowhite'
+ | 'navy'
+ | 'oldlace'
+ | 'olive'
+ | 'olivedrab'
+ | 'orange'
+ | 'orangered'
+ | 'orchid'
+ | 'palegoldenrod'
+ | 'palegreen'
+ | 'paleturquoise'
+ | 'palevioletred'
+ | 'papayawhip'
+ | 'peachpuff'
+ | 'peru'
+ | 'pink'
+ | 'plum'
+ | 'powderblue'
+ | 'purple'
+ | 'rebeccapurple'
+ | 'red'
+ | 'rosybrown'
+ | 'royalblue'
+ | 'saddlebrown'
+ | 'salmon'
+ | 'sandybrown'
+ | 'seagreen'
+ | 'seashell'
+ | 'sienna'
+ | 'silver'
+ | 'skyblue'
+ | 'slateblue'
+ | 'slategray'
+ | 'slategrey'
+ | 'snow'
+ | 'springgreen'
+ | 'steelblue'
+ | 'tan'
+ | 'teal'
+ | 'thistle'
+ | 'tomato'
+ | 'turquoise'
+ | 'violet'
+ | 'wheat'
+ | 'white'
+ | 'whitesmoke'
+ | 'yellow'
+ | 'yellowgreen';
+
+declare namespace ansiStyles {
+ interface ColorConvert {
+ /**
+ The RGB color space.
+
+ @param red - (`0`-`255`)
+ @param green - (`0`-`255`)
+ @param blue - (`0`-`255`)
+ */
+ rgb(red: number, green: number, blue: number): string;
+
+ /**
+ The RGB HEX color space.
+
+ @param hex - A hexadecimal string containing RGB data.
+ */
+ hex(hex: string): string;
+
+ /**
+ @param keyword - A CSS color name.
+ */
+ keyword(keyword: CSSColor): string;
+
+ /**
+ The HSL color space.
+
+ @param hue - (`0`-`360`)
+ @param saturation - (`0`-`100`)
+ @param lightness - (`0`-`100`)
+ */
+ hsl(hue: number, saturation: number, lightness: number): string;
+
+ /**
+ The HSV color space.
+
+ @param hue - (`0`-`360`)
+ @param saturation - (`0`-`100`)
+ @param value - (`0`-`100`)
+ */
+ hsv(hue: number, saturation: number, value: number): string;
+
+ /**
+ The HSV color space.
+
+ @param hue - (`0`-`360`)
+ @param whiteness - (`0`-`100`)
+ @param blackness - (`0`-`100`)
+ */
+ hwb(hue: number, whiteness: number, blackness: number): string;
+
+ /**
+ Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color.
+ */
+ ansi(ansi: number): string;
+
+ /**
+ Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
+ */
+ ansi256(ansi: number): string;
+ }
+
+ interface CSPair {
+ /**
+ The ANSI terminal control sequence for starting this style.
+ */
+ readonly open: string;
+
+ /**
+ The ANSI terminal control sequence for ending this style.
+ */
+ readonly close: string;
+ }
+
+ interface ColorBase {
+ readonly ansi: ColorConvert;
+ readonly ansi256: ColorConvert;
+ readonly ansi16m: ColorConvert;
+
+ /**
+ The ANSI terminal control sequence for ending this color.
+ */
+ readonly close: string;
+ }
+
+ interface Modifier {
+ /**
+ Resets the current color chain.
+ */
+ readonly reset: CSPair;
+
+ /**
+ Make text bold.
+ */
+ readonly bold: CSPair;
+
+ /**
+ Emitting only a small amount of light.
+ */
+ readonly dim: CSPair;
+
+ /**
+ Make text italic. (Not widely supported)
+ */
+ readonly italic: CSPair;
+
+ /**
+ Make text underline. (Not widely supported)
+ */
+ readonly underline: CSPair;
+
+ /**
+ Inverse background and foreground colors.
+ */
+ readonly inverse: CSPair;
+
+ /**
+ Prints the text, but makes it invisible.
+ */
+ readonly hidden: CSPair;
+
+ /**
+ Puts a horizontal line through the center of the text. (Not widely supported)
+ */
+ readonly strikethrough: CSPair;
+ }
+
+ interface ForegroundColor {
+ readonly black: CSPair;
+ readonly red: CSPair;
+ readonly green: CSPair;
+ readonly yellow: CSPair;
+ readonly blue: CSPair;
+ readonly cyan: CSPair;
+ readonly magenta: CSPair;
+ readonly white: CSPair;
+
+ /**
+ Alias for `blackBright`.
+ */
+ readonly gray: CSPair;
+
+ /**
+ Alias for `blackBright`.
+ */
+ readonly grey: CSPair;
+
+ readonly blackBright: CSPair;
+ readonly redBright: CSPair;
+ readonly greenBright: CSPair;
+ readonly yellowBright: CSPair;
+ readonly blueBright: CSPair;
+ readonly cyanBright: CSPair;
+ readonly magentaBright: CSPair;
+ readonly whiteBright: CSPair;
+ }
+
+ interface BackgroundColor {
+ readonly bgBlack: CSPair;
+ readonly bgRed: CSPair;
+ readonly bgGreen: CSPair;
+ readonly bgYellow: CSPair;
+ readonly bgBlue: CSPair;
+ readonly bgCyan: CSPair;
+ readonly bgMagenta: CSPair;
+ readonly bgWhite: CSPair;
+
+ /**
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGray: CSPair;
+
+ /**
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGrey: CSPair;
+
+ readonly bgBlackBright: CSPair;
+ readonly bgRedBright: CSPair;
+ readonly bgGreenBright: CSPair;
+ readonly bgYellowBright: CSPair;
+ readonly bgBlueBright: CSPair;
+ readonly bgCyanBright: CSPair;
+ readonly bgMagentaBright: CSPair;
+ readonly bgWhiteBright: CSPair;
+ }
+}
+
+declare const ansiStyles: {
+ readonly modifier: ansiStyles.Modifier;
+ readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase;
+ readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase;
+ readonly codes: ReadonlyMap<number, number>;
+} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier;
+
+export = ansiStyles;
diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js
new file mode 100644
index 0000000..5d82581
--- /dev/null
+++ b/node_modules/ansi-styles/index.js
@@ -0,0 +1,163 @@
+'use strict';
+
+const wrapAnsi16 = (fn, offset) => (...args) => {
+ const code = fn(...args);
+ return `\u001B[${code + offset}m`;
+};
+
+const wrapAnsi256 = (fn, offset) => (...args) => {
+ const code = fn(...args);
+ return `\u001B[${38 + offset};5;${code}m`;
+};
+
+const wrapAnsi16m = (fn, offset) => (...args) => {
+ const rgb = fn(...args);
+ return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
+};
+
+const ansi2ansi = n => n;
+const rgb2rgb = (r, g, b) => [r, g, b];
+
+const setLazyProperty = (object, property, get) => {
+ Object.defineProperty(object, property, {
+ get: () => {
+ const value = get();
+
+ Object.defineProperty(object, property, {
+ value,
+ enumerable: true,
+ configurable: true
+ });
+
+ return value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+};
+
+/** @type {typeof import('color-convert')} */
+let colorConvert;
+const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
+ if (colorConvert === undefined) {
+ colorConvert = require('color-convert');
+ }
+
+ const offset = isBackground ? 10 : 0;
+ const styles = {};
+
+ for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
+ const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;
+ if (sourceSpace === targetSpace) {
+ styles[name] = wrap(identity, offset);
+ } else if (typeof suite === 'object') {
+ styles[name] = wrap(suite[targetSpace], offset);
+ }
+ }
+
+ return styles;
+};
+
+function assembleStyles() {
+ const codes = new Map();
+ const styles = {
+ modifier: {
+ reset: [0, 0],
+ // 21 isn't widely supported and 22 does the same thing
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29]
+ },
+ color: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+
+ // Bright color
+ blackBright: [90, 39],
+ redBright: [91, 39],
+ greenBright: [92, 39],
+ yellowBright: [93, 39],
+ blueBright: [94, 39],
+ magentaBright: [95, 39],
+ cyanBright: [96, 39],
+ whiteBright: [97, 39]
+ },
+ bgColor: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+
+ // Bright color
+ bgBlackBright: [100, 49],
+ bgRedBright: [101, 49],
+ bgGreenBright: [102, 49],
+ bgYellowBright: [103, 49],
+ bgBlueBright: [104, 49],
+ bgMagentaBright: [105, 49],
+ bgCyanBright: [106, 49],
+ bgWhiteBright: [107, 49]
+ }
+ };
+
+ // Alias bright black as gray (and grey)
+ styles.color.gray = styles.color.blackBright;
+ styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
+ styles.color.grey = styles.color.blackBright;
+ styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
+
+ for (const [groupName, group] of Object.entries(styles)) {
+ for (const [styleName, style] of Object.entries(group)) {
+ styles[styleName] = {
+ open: `\u001B[${style[0]}m`,
+ close: `\u001B[${style[1]}m`
+ };
+
+ group[styleName] = styles[styleName];
+
+ codes.set(style[0], style[1]);
+ }
+
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false
+ });
+ }
+
+ Object.defineProperty(styles, 'codes', {
+ value: codes,
+ enumerable: false
+ });
+
+ styles.color.close = '\u001B[39m';
+ styles.bgColor.close = '\u001B[49m';
+
+ setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));
+ setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));
+ setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));
+ setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));
+ setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));
+ setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));
+
+ return styles;
+}
+
+// Make the export immutable
+Object.defineProperty(module, 'exports', {
+ enumerable: true,
+ get: assembleStyles
+});
diff --git a/node_modules/ansi-styles/license b/node_modules/ansi-styles/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/ansi-styles/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json
new file mode 100644
index 0000000..72edd92
--- /dev/null
+++ b/node_modules/ansi-styles/package.json
@@ -0,0 +1,91 @@
+{
+ "_args": [
+ [
+ "ansi-styles@4.3.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "ansi-styles@4.3.0",
+ "_id": "ansi-styles@4.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "_location": "/ansi-styles",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ansi-styles@4.3.0",
+ "name": "ansi-styles",
+ "escapedName": "ansi-styles",
+ "rawSpec": "4.3.0",
+ "saveSpec": null,
+ "fetchSpec": "4.3.0"
+ },
+ "_requiredBy": [
+ "/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "_spec": "4.3.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/ansi-styles/issues"
+ },
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "description": "ANSI escape codes for styling strings in the terminal",
+ "devDependencies": {
+ "@types/color-convert": "^1.9.0",
+ "ava": "^2.3.0",
+ "svg-term-cli": "^2.1.1",
+ "tsd": "^0.11.0",
+ "xo": "^0.25.3"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "funding": "https://github.com/chalk/ansi-styles?sponsor=1",
+ "homepage": "https://github.com/chalk/ansi-styles#readme",
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "name": "ansi-styles",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/ansi-styles.git"
+ },
+ "scripts": {
+ "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor",
+ "test": "xo && ava && tsd"
+ },
+ "version": "4.3.0"
+}
diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md
new file mode 100644
index 0000000..24883de
--- /dev/null
+++ b/node_modules/ansi-styles/readme.md
@@ -0,0 +1,152 @@
+# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
+
+> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
+
+You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
+
+<img src="screenshot.svg" width="900">
+
+## Install
+
+```
+$ npm install ansi-styles
+```
+
+## Usage
+
+```js
+const style = require('ansi-styles');
+
+console.log(`${style.green.open}Hello world!${style.green.close}`);
+
+
+// Color conversion between 16/256/truecolor
+// NOTE: If conversion goes to 16 colors or 256 colors, the original color
+// may be degraded to fit that color palette. This means terminals
+// that do not support 16 million colors will best-match the
+// original color.
+console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
+console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
+console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close);
+```
+
+## API
+
+Each style has an `open` and `close` property.
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(Not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(Not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `blackBright` (alias: `gray`, `grey`)
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+## Advanced usage
+
+By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
+
+- `style.modifier`
+- `style.color`
+- `style.bgColor`
+
+###### Example
+
+```js
+console.log(style.color.green.open);
+```
+
+Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
+
+###### Example
+
+```js
+console.log(style.codes.get(36));
+//=> 39
+```
+
+## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
+
+`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
+
+The following color spaces from `color-convert` are supported:
+
+- `rgb`
+- `hex`
+- `keyword`
+- `hsl`
+- `hsv`
+- `hwb`
+- `ansi`
+- `ansi256`
+
+To use these, call the associated conversion function with the intended output, for example:
+
+```js
+style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
+style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
+
+style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+
+style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
+style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
+```
+
+## Related
+
+- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+## For enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/node_modules/base64-js/LICENSE b/node_modules/base64-js/LICENSE
new file mode 100644
index 0000000..6d52b8a
--- /dev/null
+++ b/node_modules/base64-js/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Jameson Little
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/base64-js/README.md b/node_modules/base64-js/README.md
new file mode 100644
index 0000000..0395c33
--- /dev/null
+++ b/node_modules/base64-js/README.md
@@ -0,0 +1,32 @@
+base64-js
+=========
+
+`base64-js` does basic base64 encoding/decoding in pure JS.
+
+[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js)
+
+Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
+
+Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
+
+## install
+
+With [npm](https://npmjs.org) do:
+
+`npm install base64-js` and `var base64js = require('base64-js')`
+
+For use in web browsers do:
+
+`<script src="base64js.min.js"></script>`
+
+## methods
+
+`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument.
+
+* `byteLength` - Takes a base64 string and returns length of byte array
+* `toByteArray` - Takes a base64 string and returns a byte array
+* `fromByteArray` - Takes a byte array and returns a base64 string
+
+## license
+
+MIT
diff --git a/node_modules/base64-js/base64js.min.js b/node_modules/base64-js/base64js.min.js
new file mode 100644
index 0000000..b0279c0
--- /dev/null
+++ b/node_modules/base64-js/base64js.min.js
@@ -0,0 +1 @@
+(function(r){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=r()}else if(typeof define==="function"&&define.amd){define([],r)}else{var e;if(typeof window!=="undefined"){e=window}else if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{e=this}e.base64js=r()}})(function(){var r,e,n;return function(){function d(a,f,i){function u(n,r){if(!f[n]){if(!a[n]){var e="function"==typeof require&&require;if(!r&&e)return e(n,!0);if(v)return v(n,!0);var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t}var o=f[n]={exports:{}};a[n][0].call(o.exports,function(r){var e=a[n][1][r];return u(e||r)},o,o.exports,d,a,f,i)}return f[n].exports}for(var v="function"==typeof require&&require,r=0;r<i.length;r++)u(i[r]);return u}return d}()({"/":[function(r,e,n){"use strict";n.byteLength=f;n.toByteArray=i;n.fromByteArray=p;var u=[];var v=[];var d=typeof Uint8Array!=="undefined"?Uint8Array:Array;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var o=0,a=t.length;o<a;++o){u[o]=t[o];v[t.charCodeAt(o)]=o}v["-".charCodeAt(0)]=62;v["_".charCodeAt(0)]=63;function c(r){var e=r.length;if(e%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var n=r.indexOf("=");if(n===-1)n=e;var t=n===e?0:4-n%4;return[n,t]}function f(r){var e=c(r);var n=e[0];var t=e[1];return(n+t)*3/4-t}function h(r,e,n){return(e+n)*3/4-n}function i(r){var e;var n=c(r);var t=n[0];var o=n[1];var a=new d(h(r,t,o));var f=0;var i=o>0?t-4:t;var u;for(u=0;u<i;u+=4){e=v[r.charCodeAt(u)]<<18|v[r.charCodeAt(u+1)]<<12|v[r.charCodeAt(u+2)]<<6|v[r.charCodeAt(u+3)];a[f++]=e>>16&255;a[f++]=e>>8&255;a[f++]=e&255}if(o===2){e=v[r.charCodeAt(u)]<<2|v[r.charCodeAt(u+1)]>>4;a[f++]=e&255}if(o===1){e=v[r.charCodeAt(u)]<<10|v[r.charCodeAt(u+1)]<<4|v[r.charCodeAt(u+2)]>>2;a[f++]=e>>8&255;a[f++]=e&255}return a}function s(r){return u[r>>18&63]+u[r>>12&63]+u[r>>6&63]+u[r&63]}function l(r,e,n){var t;var o=[];for(var a=e;a<n;a+=3){t=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(r[a+2]&255);o.push(s(t))}return o.join("")}function p(r){var e;var n=r.length;var t=n%3;var o=[];var a=16383;for(var f=0,i=n-t;f<i;f+=a){o.push(l(r,f,f+a>i?i:f+a))}if(t===1){e=r[n-1];o.push(u[e>>2]+u[e<<4&63]+"==")}else if(t===2){e=(r[n-2]<<8)+r[n-1];o.push(u[e>>10]+u[e>>4&63]+u[e<<2&63]+"=")}return o.join("")}},{}]},{},[])("/")});
diff --git a/node_modules/base64-js/index.js b/node_modules/base64-js/index.js
new file mode 100644
index 0000000..f087f5b
--- /dev/null
+++ b/node_modules/base64-js/index.js
@@ -0,0 +1,152 @@
+'use strict'
+
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i]
+ revLookup[code.charCodeAt(i)] = i
+}
+
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
+
+function getLens (b64) {
+ var len = b64.length
+
+ if (len % 4 > 0) {
+ throw new Error('Invalid string. Length must be a multiple of 4')
+ }
+
+ // Trim off extra bytes after placeholder bytes are found
+ // See: https://github.com/beatgammit/base64-js/issues/42
+ var validLen = b64.indexOf('=')
+ if (validLen === -1) validLen = len
+
+ var placeHoldersLen = validLen === len
+ ? 0
+ : 4 - (validLen % 4)
+
+ return [validLen, placeHoldersLen]
+}
+
+// base64 is 4/3 + up to two characters of the original data
+function byteLength (b64) {
+ var lens = getLens(b64)
+ var validLen = lens[0]
+ var placeHoldersLen = lens[1]
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function _byteLength (b64, validLen, placeHoldersLen) {
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function toByteArray (b64) {
+ var tmp
+ var lens = getLens(b64)
+ var validLen = lens[0]
+ var placeHoldersLen = lens[1]
+
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
+
+ var curByte = 0
+
+ // if there are placeholders, only get up to the last complete 4 chars
+ var len = placeHoldersLen > 0
+ ? validLen - 4
+ : validLen
+
+ var i
+ for (i = 0; i < len; i += 4) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 18) |
+ (revLookup[b64.charCodeAt(i + 1)] << 12) |
+ (revLookup[b64.charCodeAt(i + 2)] << 6) |
+ revLookup[b64.charCodeAt(i + 3)]
+ arr[curByte++] = (tmp >> 16) & 0xFF
+ arr[curByte++] = (tmp >> 8) & 0xFF
+ arr[curByte++] = tmp & 0xFF
+ }
+
+ if (placeHoldersLen === 2) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 2) |
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
+ arr[curByte++] = tmp & 0xFF
+ }
+
+ if (placeHoldersLen === 1) {
+ tmp =
+ (revLookup[b64.charCodeAt(i)] << 10) |
+ (revLookup[b64.charCodeAt(i + 1)] << 4) |
+ (revLookup[b64.charCodeAt(i + 2)] >> 2)
+ arr[curByte++] = (tmp >> 8) & 0xFF
+ arr[curByte++] = tmp & 0xFF
+ }
+
+ return arr
+}
+
+function tripletToBase64 (num) {
+ return lookup[num >> 18 & 0x3F] +
+ lookup[num >> 12 & 0x3F] +
+ lookup[num >> 6 & 0x3F] +
+ lookup[num & 0x3F]
+}
+
+function encodeChunk (uint8, start, end) {
+ var tmp
+ var output = []
+ for (var i = start; i < end; i += 3) {
+ tmp =
+ ((uint8[i] << 16) & 0xFF0000) +
+ ((uint8[i + 1] << 8) & 0xFF00) +
+ (uint8[i + 2] & 0xFF)
+ output.push(tripletToBase64(tmp))
+ }
+ return output.join('')
+}
+
+function fromByteArray (uint8) {
+ var tmp
+ var len = uint8.length
+ var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
+ var parts = []
+ var maxChunkLength = 16383 // must be multiple of 3
+
+ // go through the array every three bytes, we'll deal with trailing stuff later
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+ parts.push(encodeChunk(
+ uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
+ ))
+ }
+
+ // pad the end with zeros, but make sure to not forget the extra bytes
+ if (extraBytes === 1) {
+ tmp = uint8[len - 1]
+ parts.push(
+ lookup[tmp >> 2] +
+ lookup[(tmp << 4) & 0x3F] +
+ '=='
+ )
+ } else if (extraBytes === 2) {
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1]
+ parts.push(
+ lookup[tmp >> 10] +
+ lookup[(tmp >> 4) & 0x3F] +
+ lookup[(tmp << 2) & 0x3F] +
+ '='
+ )
+ }
+
+ return parts.join('')
+}
diff --git a/node_modules/base64-js/package.json b/node_modules/base64-js/package.json
new file mode 100644
index 0000000..b48c680
--- /dev/null
+++ b/node_modules/base64-js/package.json
@@ -0,0 +1,63 @@
+{
+ "_args": [
+ [
+ "base64-js@1.3.1",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "base64-js@1.3.1",
+ "_id": "base64-js@1.3.1",
+ "_inBundle": false,
+ "_integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==",
+ "_location": "/base64-js",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "base64-js@1.3.1",
+ "name": "base64-js",
+ "escapedName": "base64-js",
+ "rawSpec": "1.3.1",
+ "saveSpec": null,
+ "fetchSpec": "1.3.1"
+ },
+ "_requiredBy": [
+ "/buffer"
+ ],
+ "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
+ "_spec": "1.3.1",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "T. Jameson Little",
+ "email": "t.jameson.little@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/beatgammit/base64-js/issues"
+ },
+ "description": "Base64 encoding/decoding in pure JS",
+ "devDependencies": {
+ "benchmark": "^2.1.4",
+ "browserify": "^16.3.0",
+ "standard": "*",
+ "tape": "4.x",
+ "uglify-js": "^3.6.0"
+ },
+ "homepage": "https://github.com/beatgammit/base64-js",
+ "keywords": [
+ "base64"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "base64-js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/beatgammit/base64-js.git"
+ },
+ "scripts": {
+ "build": "browserify -s base64js -r ./ | uglifyjs -m > base64js.min.js",
+ "lint": "standard",
+ "test": "npm run lint && npm run unit",
+ "unit": "tape test/*.js"
+ },
+ "version": "1.3.1"
+}
diff --git a/node_modules/bl/.travis.yml b/node_modules/bl/.travis.yml
new file mode 100644
index 0000000..e0df89c
--- /dev/null
+++ b/node_modules/bl/.travis.yml
@@ -0,0 +1,16 @@
+sudo: false
+language: node_js
+node_js:
+ - '6'
+ - '8'
+ - '10'
+ - '12'
+ - '14'
+ - lts/*
+branches:
+ only:
+ - master
+notifications:
+ email:
+ - rod@vagg.org
+ - matteo.collina@gmail.com
diff --git a/node_modules/bl/BufferList.js b/node_modules/bl/BufferList.js
new file mode 100644
index 0000000..802020f
--- /dev/null
+++ b/node_modules/bl/BufferList.js
@@ -0,0 +1,396 @@
+'use strict'
+
+const { Buffer } = require('buffer')
+const symbol = Symbol.for('BufferList')
+
+function BufferList (buf) {
+ if (!(this instanceof BufferList)) {
+ return new BufferList(buf)
+ }
+
+ BufferList._init.call(this, buf)
+}
+
+BufferList._init = function _init (buf) {
+ Object.defineProperty(this, symbol, { value: true })
+
+ this._bufs = []
+ this.length = 0
+
+ if (buf) {
+ this.append(buf)
+ }
+}
+
+BufferList.prototype._new = function _new (buf) {
+ return new BufferList(buf)
+}
+
+BufferList.prototype._offset = function _offset (offset) {
+ if (offset === 0) {
+ return [0, 0]
+ }
+
+ let tot = 0
+
+ for (let i = 0; i < this._bufs.length; i++) {
+ const _t = tot + this._bufs[i].length
+ if (offset < _t || i === this._bufs.length - 1) {
+ return [i, offset - tot]
+ }
+ tot = _t
+ }
+}
+
+BufferList.prototype._reverseOffset = function (blOffset) {
+ const bufferId = blOffset[0]
+ let offset = blOffset[1]
+
+ for (let i = 0; i < bufferId; i++) {
+ offset += this._bufs[i].length
+ }
+
+ return offset
+}
+
+BufferList.prototype.get = function get (index) {
+ if (index > this.length || index < 0) {
+ return undefined
+ }
+
+ const offset = this._offset(index)
+
+ return this._bufs[offset[0]][offset[1]]
+}
+
+BufferList.prototype.slice = function slice (start, end) {
+ if (typeof start === 'number' && start < 0) {
+ start += this.length
+ }
+
+ if (typeof end === 'number' && end < 0) {
+ end += this.length
+ }
+
+ return this.copy(null, 0, start, end)
+}
+
+BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
+ if (typeof srcStart !== 'number' || srcStart < 0) {
+ srcStart = 0
+ }
+
+ if (typeof srcEnd !== 'number' || srcEnd > this.length) {
+ srcEnd = this.length
+ }
+
+ if (srcStart >= this.length) {
+ return dst || Buffer.alloc(0)
+ }
+
+ if (srcEnd <= 0) {
+ return dst || Buffer.alloc(0)
+ }
+
+ const copy = !!dst
+ const off = this._offset(srcStart)
+ const len = srcEnd - srcStart
+ let bytes = len
+ let bufoff = (copy && dstStart) || 0
+ let start = off[1]
+
+ // copy/slice everything
+ if (srcStart === 0 && srcEnd === this.length) {
+ if (!copy) {
+ // slice, but full concat if multiple buffers
+ return this._bufs.length === 1
+ ? this._bufs[0]
+ : Buffer.concat(this._bufs, this.length)
+ }
+
+ // copy, need to copy individual buffers
+ for (let i = 0; i < this._bufs.length; i++) {
+ this._bufs[i].copy(dst, bufoff)
+ bufoff += this._bufs[i].length
+ }
+
+ return dst
+ }
+
+ // easy, cheap case where it's a subset of one of the buffers
+ if (bytes <= this._bufs[off[0]].length - start) {
+ return copy
+ ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)
+ : this._bufs[off[0]].slice(start, start + bytes)
+ }
+
+ if (!copy) {
+ // a slice, we need something to copy in to
+ dst = Buffer.allocUnsafe(len)
+ }
+
+ for (let i = off[0]; i < this._bufs.length; i++) {
+ const l = this._bufs[i].length - start
+
+ if (bytes > l) {
+ this._bufs[i].copy(dst, bufoff, start)
+ bufoff += l
+ } else {
+ this._bufs[i].copy(dst, bufoff, start, start + bytes)
+ bufoff += l
+ break
+ }
+
+ bytes -= l
+
+ if (start) {
+ start = 0
+ }
+ }
+
+ // safeguard so that we don't return uninitialized memory
+ if (dst.length > bufoff) return dst.slice(0, bufoff)
+
+ return dst
+}
+
+BufferList.prototype.shallowSlice = function shallowSlice (start, end) {
+ start = start || 0
+ end = typeof end !== 'number' ? this.length : end
+
+ if (start < 0) {
+ start += this.length
+ }
+
+ if (end < 0) {
+ end += this.length
+ }
+
+ if (start === end) {
+ return this._new()
+ }
+
+ const startOffset = this._offset(start)
+ const endOffset = this._offset(end)
+ const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)
+
+ if (endOffset[1] === 0) {
+ buffers.pop()
+ } else {
+ buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1])
+ }
+
+ if (startOffset[1] !== 0) {
+ buffers[0] = buffers[0].slice(startOffset[1])
+ }
+
+ return this._new(buffers)
+}
+
+BufferList.prototype.toString = function toString (encoding, start, end) {
+ return this.slice(start, end).toString(encoding)
+}
+
+BufferList.prototype.consume = function consume (bytes) {
+ // first, normalize the argument, in accordance with how Buffer does it
+ bytes = Math.trunc(bytes)
+ // do nothing if not a positive number
+ if (Number.isNaN(bytes) || bytes <= 0) return this
+
+ while (this._bufs.length) {
+ if (bytes >= this._bufs[0].length) {
+ bytes -= this._bufs[0].length
+ this.length -= this._bufs[0].length
+ this._bufs.shift()
+ } else {
+ this._bufs[0] = this._bufs[0].slice(bytes)
+ this.length -= bytes
+ break
+ }
+ }
+
+ return this
+}
+
+BufferList.prototype.duplicate = function duplicate () {
+ const copy = this._new()
+
+ for (let i = 0; i < this._bufs.length; i++) {
+ copy.append(this._bufs[i])
+ }
+
+ return copy
+}
+
+BufferList.prototype.append = function append (buf) {
+ if (buf == null) {
+ return this
+ }
+
+ if (buf.buffer) {
+ // append a view of the underlying ArrayBuffer
+ this._appendBuffer(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength))
+ } else if (Array.isArray(buf)) {
+ for (let i = 0; i < buf.length; i++) {
+ this.append(buf[i])
+ }
+ } else if (this._isBufferList(buf)) {
+ // unwrap argument into individual BufferLists
+ for (let i = 0; i < buf._bufs.length; i++) {
+ this.append(buf._bufs[i])
+ }
+ } else {
+ // coerce number arguments to strings, since Buffer(number) does
+ // uninitialized memory allocation
+ if (typeof buf === 'number') {
+ buf = buf.toString()
+ }
+
+ this._appendBuffer(Buffer.from(buf))
+ }
+
+ return this
+}
+
+BufferList.prototype._appendBuffer = function appendBuffer (buf) {
+ this._bufs.push(buf)
+ this.length += buf.length
+}
+
+BufferList.prototype.indexOf = function (search, offset, encoding) {
+ if (encoding === undefined && typeof offset === 'string') {
+ encoding = offset
+ offset = undefined
+ }
+
+ if (typeof search === 'function' || Array.isArray(search)) {
+ throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.')
+ } else if (typeof search === 'number') {
+ search = Buffer.from([search])
+ } else if (typeof search === 'string') {
+ search = Buffer.from(search, encoding)
+ } else if (this._isBufferList(search)) {
+ search = search.slice()
+ } else if (Array.isArray(search.buffer)) {
+ search = Buffer.from(search.buffer, search.byteOffset, search.byteLength)
+ } else if (!Buffer.isBuffer(search)) {
+ search = Buffer.from(search)
+ }
+
+ offset = Number(offset || 0)
+
+ if (isNaN(offset)) {
+ offset = 0
+ }
+
+ if (offset < 0) {
+ offset = this.length + offset
+ }
+
+ if (offset < 0) {
+ offset = 0
+ }
+
+ if (search.length === 0) {
+ return offset > this.length ? this.length : offset
+ }
+
+ const blOffset = this._offset(offset)
+ let blIndex = blOffset[0] // index of which internal buffer we're working on
+ let buffOffset = blOffset[1] // offset of the internal buffer we're working on
+
+ // scan over each buffer
+ for (; blIndex < this._bufs.length; blIndex++) {
+ const buff = this._bufs[blIndex]
+
+ while (buffOffset < buff.length) {
+ const availableWindow = buff.length - buffOffset
+
+ if (availableWindow >= search.length) {
+ const nativeSearchResult = buff.indexOf(search, buffOffset)
+
+ if (nativeSearchResult !== -1) {
+ return this._reverseOffset([blIndex, nativeSearchResult])
+ }
+
+ buffOffset = buff.length - search.length + 1 // end of native search window
+ } else {
+ const revOffset = this._reverseOffset([blIndex, buffOffset])
+
+ if (this._match(revOffset, search)) {
+ return revOffset
+ }
+
+ buffOffset++
+ }
+ }
+
+ buffOffset = 0
+ }
+
+ return -1
+}
+
+BufferList.prototype._match = function (offset, search) {
+ if (this.length - offset < search.length) {
+ return false
+ }
+
+ for (let searchOffset = 0; searchOffset < search.length; searchOffset++) {
+ if (this.get(offset + searchOffset) !== search[searchOffset]) {
+ return false
+ }
+ }
+ return true
+}
+
+;(function () {
+ const methods = {
+ readDoubleBE: 8,
+ readDoubleLE: 8,
+ readFloatBE: 4,
+ readFloatLE: 4,
+ readInt32BE: 4,
+ readInt32LE: 4,
+ readUInt32BE: 4,
+ readUInt32LE: 4,
+ readInt16BE: 2,
+ readInt16LE: 2,
+ readUInt16BE: 2,
+ readUInt16LE: 2,
+ readInt8: 1,
+ readUInt8: 1,
+ readIntBE: null,
+ readIntLE: null,
+ readUIntBE: null,
+ readUIntLE: null
+ }
+
+ for (const m in methods) {
+ (function (m) {
+ if (methods[m] === null) {
+ BufferList.prototype[m] = function (offset, byteLength) {
+ return this.slice(offset, offset + byteLength)[m](0, byteLength)
+ }
+ } else {
+ BufferList.prototype[m] = function (offset) {
+ return this.slice(offset, offset + methods[m])[m](0)
+ }
+ }
+ }(m))
+ }
+}())
+
+// Used internally by the class and also as an indicator of this object being
+// a `BufferList`. It's not possible to use `instanceof BufferList` in a browser
+// environment because there could be multiple different copies of the
+// BufferList class and some `BufferList`s might be `BufferList`s.
+BufferList.prototype._isBufferList = function _isBufferList (b) {
+ return b instanceof BufferList || BufferList.isBufferList(b)
+}
+
+BufferList.isBufferList = function isBufferList (b) {
+ return b != null && b[symbol]
+}
+
+module.exports = BufferList
diff --git a/node_modules/bl/LICENSE.md b/node_modules/bl/LICENSE.md
new file mode 100644
index 0000000..ecbe516
--- /dev/null
+++ b/node_modules/bl/LICENSE.md
@@ -0,0 +1,13 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2013-2019 bl contributors
+----------------------------------
+
+*bl contributors listed at <https://github.com/rvagg/bl#contributors>*
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/bl/README.md b/node_modules/bl/README.md
new file mode 100644
index 0000000..9680b1d
--- /dev/null
+++ b/node_modules/bl/README.md
@@ -0,0 +1,247 @@
+# bl *(BufferList)*
+
+[![Build Status](https://api.travis-ci.com/rvagg/bl.svg?branch=master)](https://travis-ci.com/rvagg/bl/)
+
+**A Node.js Buffer list collector, reader and streamer thingy.**
+
+[![NPM](https://nodei.co/npm/bl.svg)](https://nodei.co/npm/bl/)
+
+**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them!
+
+The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently.
+
+```js
+const { BufferList } = require('bl')
+
+const bl = new BufferList()
+bl.append(Buffer.from('abcd'))
+bl.append(Buffer.from('efg'))
+bl.append('hi') // bl will also accept & convert Strings
+bl.append(Buffer.from('j'))
+bl.append(Buffer.from([ 0x3, 0x4 ]))
+
+console.log(bl.length) // 12
+
+console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij'
+console.log(bl.slice(3, 10).toString('ascii')) // 'defghij'
+console.log(bl.slice(3, 6).toString('ascii')) // 'def'
+console.log(bl.slice(3, 8).toString('ascii')) // 'defgh'
+console.log(bl.slice(5, 10).toString('ascii')) // 'fghij'
+
+console.log(bl.indexOf('def')) // 3
+console.log(bl.indexOf('asdf')) // -1
+
+// or just use toString!
+console.log(bl.toString()) // 'abcdefghij\u0003\u0004'
+console.log(bl.toString('ascii', 3, 8)) // 'defgh'
+console.log(bl.toString('ascii', 5, 10)) // 'fghij'
+
+// other standard Buffer readables
+console.log(bl.readUInt16BE(10)) // 0x0304
+console.log(bl.readUInt16LE(10)) // 0x0403
+```
+
+Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**:
+
+```js
+const { BufferListStream } = require('bl')
+const fs = require('fs')
+
+fs.createReadStream('README.md')
+ .pipe(BufferListStream((err, data) => { // note 'new' isn't strictly required
+ // `data` is a complete Buffer object containing the full data
+ console.log(data.toString())
+ }))
+```
+
+Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream.
+
+Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!):
+
+```js
+const hyperquest = require('hyperquest')
+const { BufferListStream } = require('bl')
+
+const url = 'https://raw.github.com/rvagg/bl/master/README.md'
+
+hyperquest(url).pipe(BufferListStream((err, data) => {
+ console.log(data.toString())
+}))
+```
+
+Or, use it as a readable stream to recompose a list of Buffers to an output source:
+
+```js
+const { BufferListStream } = require('bl')
+const fs = require('fs')
+
+var bl = new BufferListStream()
+bl.append(Buffer.from('abcd'))
+bl.append(Buffer.from('efg'))
+bl.append(Buffer.from('hi'))
+bl.append(Buffer.from('j'))
+
+bl.pipe(fs.createWriteStream('gibberish.txt'))
+```
+
+## API
+
+ * <a href="#ctor"><code><b>new BufferList([ buf ])</b></code></a>
+ * <a href="#isBufferList"><code><b>BufferList.isBufferList(obj)</b></code></a>
+ * <a href="#length"><code>bl.<b>length</b></code></a>
+ * <a href="#append"><code>bl.<b>append(buffer)</b></code></a>
+ * <a href="#get"><code>bl.<b>get(index)</b></code></a>
+ * <a href="#indexOf"><code>bl.<b>indexOf(value[, byteOffset][, encoding])</b></code></a>
+ * <a href="#slice"><code>bl.<b>slice([ start[, end ] ])</b></code></a>
+ * <a href="#shallowSlice"><code>bl.<b>shallowSlice([ start[, end ] ])</b></code></a>
+ * <a href="#copy"><code>bl.<b>copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])</b></code></a>
+ * <a href="#duplicate"><code>bl.<b>duplicate()</b></code></a>
+ * <a href="#consume"><code>bl.<b>consume(bytes)</b></code></a>
+ * <a href="#toString"><code>bl.<b>toString([encoding, [ start, [ end ]]])</b></code></a>
+ * <a href="#readXX"><code>bl.<b>readDoubleBE()</b></code>, <code>bl.<b>readDoubleLE()</b></code>, <code>bl.<b>readFloatBE()</b></code>, <code>bl.<b>readFloatLE()</b></code>, <code>bl.<b>readInt32BE()</b></code>, <code>bl.<b>readInt32LE()</b></code>, <code>bl.<b>readUInt32BE()</b></code>, <code>bl.<b>readUInt32LE()</b></code>, <code>bl.<b>readInt16BE()</b></code>, <code>bl.<b>readInt16LE()</b></code>, <code>bl.<b>readUInt16BE()</b></code>, <code>bl.<b>readUInt16LE()</b></code>, <code>bl.<b>readInt8()</b></code>, <code>bl.<b>readUInt8()</b></code></a>
+ * <a href="#ctorStream"><code><b>new BufferListStream([ callback ])</b></code></a>
+
+--------------------------------------------------------
+<a name="ctor"></a>
+### new BufferList([ Buffer | Buffer array | BufferList | BufferList array | String ])
+No arguments are _required_ for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` objects.
+
+`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with:
+
+```js
+const { BufferList } = require('bl')
+const bl = BufferList()
+
+// equivalent to:
+
+const { BufferList } = require('bl')
+const bl = new BufferList()
+```
+
+--------------------------------------------------------
+<a name="isBufferList"></a>
+### BufferList.isBufferList(obj)
+Determines if the passed object is a `BufferList`. It will return `true` if the passed object is an instance of `BufferList` **or** `BufferListStream` and `false` otherwise.
+
+N.B. this won't return `true` for `BufferList` or `BufferListStream` instances created by versions of this library before this static method was added.
+
+--------------------------------------------------------
+<a name="length"></a>
+### bl.length
+Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list.
+
+--------------------------------------------------------
+<a name="append"></a>
+### bl.append(Buffer | Buffer array | BufferList | BufferList array | String)
+`append(buffer)` adds an additional buffer or BufferList to the internal list. `this` is returned so it can be chained.
+
+--------------------------------------------------------
+<a name="get"></a>
+### bl.get(index)
+`get()` will return the byte at the specified index.
+
+--------------------------------------------------------
+<a name="indexOf"></a>
+### bl.indexOf(value[, byteOffset][, encoding])
+`get()` will return the byte at the specified index.
+`indexOf()` method returns the first index at which a given element can be found in the BufferList, or -1 if it is not present.
+
+--------------------------------------------------------
+<a name="slice"></a>
+### bl.slice([ start, [ end ] ])
+`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
+
+If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer.
+
+--------------------------------------------------------
+<a name="shallowSlice"></a>
+### bl.shallowSlice([ start, [ end ] ])
+`shallowSlice()` returns a new `BufferList` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
+
+No copies will be performed. All buffers in the result share memory with the original list.
+
+--------------------------------------------------------
+<a name="copy"></a>
+### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])
+`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively.
+
+--------------------------------------------------------
+<a name="duplicate"></a>
+### bl.duplicate()
+`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example:
+
+```js
+var bl = new BufferListStream()
+
+bl.append('hello')
+bl.append(' world')
+bl.append('\n')
+
+bl.duplicate().pipe(process.stdout, { end: false })
+
+console.log(bl.toString())
+```
+
+--------------------------------------------------------
+<a name="consume"></a>
+### bl.consume(bytes)
+`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers&mdash;initial offsets will be calculated accordingly in order to give you a consistent view of the data.
+
+--------------------------------------------------------
+<a name="toString"></a>
+### bl.toString([encoding, [ start, [ end ]]])
+`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information.
+
+--------------------------------------------------------
+<a name="readXX"></a>
+### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()
+
+All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently.
+
+See the <b><code>[Buffer](http://nodejs.org/docs/latest/api/buffer.html)</code></b> documentation for how these work.
+
+--------------------------------------------------------
+<a name="ctorStream"></a>
+### new BufferListStream([ callback | Buffer | Buffer array | BufferList | BufferList array | String ])
+**BufferListStream** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **BufferListStream** instance.
+
+The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream.
+
+Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object.
+
+`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with:
+
+```js
+const { BufferListStream } = require('bl')
+const bl = BufferListStream()
+
+// equivalent to:
+
+const { BufferListStream } = require('bl')
+const bl = new BufferListStream()
+```
+
+N.B. For backwards compatibility reasons, `BufferListStream` is the **default** export when you `require('bl')`:
+
+```js
+const { BufferListStream } = require('bl')
+// equivalent to:
+const BufferListStream = require('bl')
+```
+
+--------------------------------------------------------
+
+## Contributors
+
+**bl** is brought to you by the following hackers:
+
+ * [Rod Vagg](https://github.com/rvagg)
+ * [Matteo Collina](https://github.com/mcollina)
+ * [Jarett Cruger](https://github.com/jcrugzz)
+
+<a name="license"></a>
+## License &amp; copyright
+
+Copyright (c) 2013-2019 bl contributors (listed above).
+
+bl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
diff --git a/node_modules/bl/bl.js b/node_modules/bl/bl.js
new file mode 100644
index 0000000..40228f8
--- /dev/null
+++ b/node_modules/bl/bl.js
@@ -0,0 +1,84 @@
+'use strict'
+
+const DuplexStream = require('readable-stream').Duplex
+const inherits = require('inherits')
+const BufferList = require('./BufferList')
+
+function BufferListStream (callback) {
+ if (!(this instanceof BufferListStream)) {
+ return new BufferListStream(callback)
+ }
+
+ if (typeof callback === 'function') {
+ this._callback = callback
+
+ const piper = function piper (err) {
+ if (this._callback) {
+ this._callback(err)
+ this._callback = null
+ }
+ }.bind(this)
+
+ this.on('pipe', function onPipe (src) {
+ src.on('error', piper)
+ })
+ this.on('unpipe', function onUnpipe (src) {
+ src.removeListener('error', piper)
+ })
+
+ callback = null
+ }
+
+ BufferList._init.call(this, callback)
+ DuplexStream.call(this)
+}
+
+inherits(BufferListStream, DuplexStream)
+Object.assign(BufferListStream.prototype, BufferList.prototype)
+
+BufferListStream.prototype._new = function _new (callback) {
+ return new BufferListStream(callback)
+}
+
+BufferListStream.prototype._write = function _write (buf, encoding, callback) {
+ this._appendBuffer(buf)
+
+ if (typeof callback === 'function') {
+ callback()
+ }
+}
+
+BufferListStream.prototype._read = function _read (size) {
+ if (!this.length) {
+ return this.push(null)
+ }
+
+ size = Math.min(size, this.length)
+ this.push(this.slice(0, size))
+ this.consume(size)
+}
+
+BufferListStream.prototype.end = function end (chunk) {
+ DuplexStream.prototype.end.call(this, chunk)
+
+ if (this._callback) {
+ this._callback(null, this.slice())
+ this._callback = null
+ }
+}
+
+BufferListStream.prototype._destroy = function _destroy (err, cb) {
+ this._bufs.length = 0
+ this.length = 0
+ cb(err)
+}
+
+BufferListStream.prototype._isBufferList = function _isBufferList (b) {
+ return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b)
+}
+
+BufferListStream.isBufferList = BufferList.isBufferList
+
+module.exports = BufferListStream
+module.exports.BufferListStream = BufferListStream
+module.exports.BufferList = BufferList
diff --git a/node_modules/bl/package.json b/node_modules/bl/package.json
new file mode 100644
index 0000000..3063ab8
--- /dev/null
+++ b/node_modules/bl/package.json
@@ -0,0 +1,68 @@
+{
+ "_args": [
+ [
+ "bl@4.0.3",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "bl@4.0.3",
+ "_id": "bl@4.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==",
+ "_location": "/bl",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "bl@4.0.3",
+ "name": "bl",
+ "escapedName": "bl",
+ "rawSpec": "4.0.3",
+ "saveSpec": null,
+ "fetchSpec": "4.0.3"
+ },
+ "_requiredBy": [
+ "/tar-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz",
+ "_spec": "4.0.3",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "authors": [
+ "Rod Vagg <rod@vagg.org> (https://github.com/rvagg)",
+ "Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
+ "Jarett Cruger <jcrugzz@gmail.com> (https://github.com/jcrugzz)"
+ ],
+ "bugs": {
+ "url": "https://github.com/rvagg/bl/issues"
+ },
+ "dependencies": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ },
+ "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
+ "devDependencies": {
+ "faucet": "~0.0.1",
+ "standard": "^14.3.0",
+ "tape": "^4.11.0"
+ },
+ "homepage": "https://github.com/rvagg/bl",
+ "keywords": [
+ "buffer",
+ "buffers",
+ "stream",
+ "awesomesauce"
+ ],
+ "license": "MIT",
+ "main": "bl.js",
+ "name": "bl",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/rvagg/bl.git"
+ },
+ "scripts": {
+ "lint": "standard *.js test/*.js",
+ "test": "npm run lint && node test/test.js | faucet"
+ },
+ "version": "4.0.3"
+}
diff --git a/node_modules/bl/test/convert.js b/node_modules/bl/test/convert.js
new file mode 100644
index 0000000..9f3e235
--- /dev/null
+++ b/node_modules/bl/test/convert.js
@@ -0,0 +1,21 @@
+'use strict'
+
+const tape = require('tape')
+const { BufferList, BufferListStream } = require('../')
+const { Buffer } = require('buffer')
+
+tape('convert from BufferList to BufferListStream', (t) => {
+ const data = Buffer.from(`TEST-${Date.now()}`)
+ const bl = new BufferList(data)
+ const bls = new BufferListStream(bl)
+ t.ok(bl.slice().equals(bls.slice()))
+ t.end()
+})
+
+tape('convert from BufferListStream to BufferList', (t) => {
+ const data = Buffer.from(`TEST-${Date.now()}`)
+ const bls = new BufferListStream(data)
+ const bl = new BufferList(bls)
+ t.ok(bl.slice().equals(bls.slice()))
+ t.end()
+})
diff --git a/node_modules/bl/test/indexOf.js b/node_modules/bl/test/indexOf.js
new file mode 100644
index 0000000..62dcb01
--- /dev/null
+++ b/node_modules/bl/test/indexOf.js
@@ -0,0 +1,492 @@
+'use strict'
+
+const tape = require('tape')
+const BufferList = require('../')
+const { Buffer } = require('buffer')
+
+tape('indexOf single byte needle', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg', '12345'])
+
+ t.equal(bl.indexOf('e'), 4)
+ t.equal(bl.indexOf('e', 5), 11)
+ t.equal(bl.indexOf('e', 12), -1)
+ t.equal(bl.indexOf('5'), 18)
+
+ t.end()
+})
+
+tape('indexOf multiple byte needle', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg'])
+
+ t.equal(bl.indexOf('ef'), 4)
+ t.equal(bl.indexOf('ef', 5), 11)
+
+ t.end()
+})
+
+tape('indexOf multiple byte needles across buffer boundaries', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg'])
+
+ t.equal(bl.indexOf('fgabc'), 5)
+
+ t.end()
+})
+
+tape('indexOf takes a Uint8Array search', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg'])
+ const search = new Uint8Array([102, 103, 97, 98, 99]) // fgabc
+
+ t.equal(bl.indexOf(search), 5)
+
+ t.end()
+})
+
+tape('indexOf takes a buffer list search', (t) => {
+ const bl = new BufferList(['abcdefg', 'abcdefg'])
+ const search = new BufferList('fgabc')
+
+ t.equal(bl.indexOf(search), 5)
+
+ t.end()
+})
+
+tape('indexOf a zero byte needle', (t) => {
+ const b = new BufferList('abcdef')
+ const bufEmpty = Buffer.from('')
+
+ t.equal(b.indexOf(''), 0)
+ t.equal(b.indexOf('', 1), 1)
+ t.equal(b.indexOf('', b.length + 1), b.length)
+ t.equal(b.indexOf('', Infinity), b.length)
+ t.equal(b.indexOf(bufEmpty), 0)
+ t.equal(b.indexOf(bufEmpty, 1), 1)
+ t.equal(b.indexOf(bufEmpty, b.length + 1), b.length)
+ t.equal(b.indexOf(bufEmpty, Infinity), b.length)
+
+ t.end()
+})
+
+tape('indexOf buffers smaller and larger than the needle', (t) => {
+ const bl = new BufferList(['abcdefg', 'a', 'bcdefg', 'a', 'bcfgab'])
+
+ t.equal(bl.indexOf('fgabc'), 5)
+ t.equal(bl.indexOf('fgabc', 6), 12)
+ t.equal(bl.indexOf('fgabc', 13), -1)
+
+ t.end()
+})
+
+// only present in node 6+
+;(process.version.substr(1).split('.')[0] >= 6) && tape('indexOf latin1 and binary encoding', (t) => {
+ const b = new BufferList('abcdef')
+
+ // test latin1 encoding
+ t.equal(
+ new BufferList(Buffer.from(b.toString('latin1'), 'latin1'))
+ .indexOf('d', 0, 'latin1'),
+ 3
+ )
+ t.equal(
+ new BufferList(Buffer.from(b.toString('latin1'), 'latin1'))
+ .indexOf(Buffer.from('d', 'latin1'), 0, 'latin1'),
+ 3
+ )
+ t.equal(
+ new BufferList(Buffer.from('aa\u00e8aa', 'latin1'))
+ .indexOf('\u00e8', 'latin1'),
+ 2
+ )
+ t.equal(
+ new BufferList(Buffer.from('\u00e8', 'latin1'))
+ .indexOf('\u00e8', 'latin1'),
+ 0
+ )
+ t.equal(
+ new BufferList(Buffer.from('\u00e8', 'latin1'))
+ .indexOf(Buffer.from('\u00e8', 'latin1'), 'latin1'),
+ 0
+ )
+
+ // test binary encoding
+ t.equal(
+ new BufferList(Buffer.from(b.toString('binary'), 'binary'))
+ .indexOf('d', 0, 'binary'),
+ 3
+ )
+ t.equal(
+ new BufferList(Buffer.from(b.toString('binary'), 'binary'))
+ .indexOf(Buffer.from('d', 'binary'), 0, 'binary'),
+ 3
+ )
+ t.equal(
+ new BufferList(Buffer.from('aa\u00e8aa', 'binary'))
+ .indexOf('\u00e8', 'binary'),
+ 2
+ )
+ t.equal(
+ new BufferList(Buffer.from('\u00e8', 'binary'))
+ .indexOf('\u00e8', 'binary'),
+ 0
+ )
+ t.equal(
+ new BufferList(Buffer.from('\u00e8', 'binary'))
+ .indexOf(Buffer.from('\u00e8', 'binary'), 'binary'),
+ 0
+ )
+
+ t.end()
+})
+
+tape('indexOf the entire nodejs10 buffer test suite', (t) => {
+ const b = new BufferList('abcdef')
+ const bufA = Buffer.from('a')
+ const bufBc = Buffer.from('bc')
+ const bufF = Buffer.from('f')
+ const bufZ = Buffer.from('z')
+
+ const stringComparison = 'abcdef'
+
+ t.equal(b.indexOf('a'), 0)
+ t.equal(b.indexOf('a', 1), -1)
+ t.equal(b.indexOf('a', -1), -1)
+ t.equal(b.indexOf('a', -4), -1)
+ t.equal(b.indexOf('a', -b.length), 0)
+ t.equal(b.indexOf('a', NaN), 0)
+ t.equal(b.indexOf('a', -Infinity), 0)
+ t.equal(b.indexOf('a', Infinity), -1)
+ t.equal(b.indexOf('bc'), 1)
+ t.equal(b.indexOf('bc', 2), -1)
+ t.equal(b.indexOf('bc', -1), -1)
+ t.equal(b.indexOf('bc', -3), -1)
+ t.equal(b.indexOf('bc', -5), 1)
+ t.equal(b.indexOf('bc', NaN), 1)
+ t.equal(b.indexOf('bc', -Infinity), 1)
+ t.equal(b.indexOf('bc', Infinity), -1)
+ t.equal(b.indexOf('f'), b.length - 1)
+ t.equal(b.indexOf('z'), -1)
+
+ // empty search tests
+ t.equal(b.indexOf(bufA), 0)
+ t.equal(b.indexOf(bufA, 1), -1)
+ t.equal(b.indexOf(bufA, -1), -1)
+ t.equal(b.indexOf(bufA, -4), -1)
+ t.equal(b.indexOf(bufA, -b.length), 0)
+ t.equal(b.indexOf(bufA, NaN), 0)
+ t.equal(b.indexOf(bufA, -Infinity), 0)
+ t.equal(b.indexOf(bufA, Infinity), -1)
+ t.equal(b.indexOf(bufBc), 1)
+ t.equal(b.indexOf(bufBc, 2), -1)
+ t.equal(b.indexOf(bufBc, -1), -1)
+ t.equal(b.indexOf(bufBc, -3), -1)
+ t.equal(b.indexOf(bufBc, -5), 1)
+ t.equal(b.indexOf(bufBc, NaN), 1)
+ t.equal(b.indexOf(bufBc, -Infinity), 1)
+ t.equal(b.indexOf(bufBc, Infinity), -1)
+ t.equal(b.indexOf(bufF), b.length - 1)
+ t.equal(b.indexOf(bufZ), -1)
+ t.equal(b.indexOf(0x61), 0)
+ t.equal(b.indexOf(0x61, 1), -1)
+ t.equal(b.indexOf(0x61, -1), -1)
+ t.equal(b.indexOf(0x61, -4), -1)
+ t.equal(b.indexOf(0x61, -b.length), 0)
+ t.equal(b.indexOf(0x61, NaN), 0)
+ t.equal(b.indexOf(0x61, -Infinity), 0)
+ t.equal(b.indexOf(0x61, Infinity), -1)
+ t.equal(b.indexOf(0x0), -1)
+
+ // test offsets
+ t.equal(b.indexOf('d', 2), 3)
+ t.equal(b.indexOf('f', 5), 5)
+ t.equal(b.indexOf('f', -1), 5)
+ t.equal(b.indexOf('f', 6), -1)
+
+ t.equal(b.indexOf(Buffer.from('d'), 2), 3)
+ t.equal(b.indexOf(Buffer.from('f'), 5), 5)
+ t.equal(b.indexOf(Buffer.from('f'), -1), 5)
+ t.equal(b.indexOf(Buffer.from('f'), 6), -1)
+
+ t.equal(Buffer.from('ff').indexOf(Buffer.from('f'), 1, 'ucs2'), -1)
+
+ // test invalid and uppercase encoding
+ t.equal(b.indexOf('b', 'utf8'), 1)
+ t.equal(b.indexOf('b', 'UTF8'), 1)
+ t.equal(b.indexOf('62', 'HEX'), 1)
+ t.throws(() => b.indexOf('bad', 'enc'), TypeError)
+
+ // test hex encoding
+ t.equal(
+ Buffer.from(b.toString('hex'), 'hex')
+ .indexOf('64', 0, 'hex'),
+ 3
+ )
+ t.equal(
+ Buffer.from(b.toString('hex'), 'hex')
+ .indexOf(Buffer.from('64', 'hex'), 0, 'hex'),
+ 3
+ )
+
+ // test base64 encoding
+ t.equal(
+ Buffer.from(b.toString('base64'), 'base64')
+ .indexOf('ZA==', 0, 'base64'),
+ 3
+ )
+ t.equal(
+ Buffer.from(b.toString('base64'), 'base64')
+ .indexOf(Buffer.from('ZA==', 'base64'), 0, 'base64'),
+ 3
+ )
+
+ // test ascii encoding
+ t.equal(
+ Buffer.from(b.toString('ascii'), 'ascii')
+ .indexOf('d', 0, 'ascii'),
+ 3
+ )
+ t.equal(
+ Buffer.from(b.toString('ascii'), 'ascii')
+ .indexOf(Buffer.from('d', 'ascii'), 0, 'ascii'),
+ 3
+ )
+
+ // test optional offset with passed encoding
+ t.equal(Buffer.from('aaaa0').indexOf('30', 'hex'), 4)
+ t.equal(Buffer.from('aaaa00a').indexOf('3030', 'hex'), 4)
+
+ {
+ // test usc2 encoding
+ const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2')
+
+ t.equal(8, twoByteString.indexOf('\u0395', 4, 'ucs2'))
+ t.equal(6, twoByteString.indexOf('\u03a3', -4, 'ucs2'))
+ t.equal(4, twoByteString.indexOf('\u03a3', -6, 'ucs2'))
+ t.equal(4, twoByteString.indexOf(
+ Buffer.from('\u03a3', 'ucs2'), -6, 'ucs2'))
+ t.equal(-1, twoByteString.indexOf('\u03a3', -2, 'ucs2'))
+ }
+
+ const mixedByteStringUcs2 =
+ Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395', 'ucs2')
+
+ t.equal(6, mixedByteStringUcs2.indexOf('bc', 0, 'ucs2'))
+ t.equal(10, mixedByteStringUcs2.indexOf('\u03a3', 0, 'ucs2'))
+ t.equal(-1, mixedByteStringUcs2.indexOf('\u0396', 0, 'ucs2'))
+
+ t.equal(
+ 6, mixedByteStringUcs2.indexOf(Buffer.from('bc', 'ucs2'), 0, 'ucs2'))
+ t.equal(
+ 10, mixedByteStringUcs2.indexOf(Buffer.from('\u03a3', 'ucs2'), 0, 'ucs2'))
+ t.equal(
+ -1, mixedByteStringUcs2.indexOf(Buffer.from('\u0396', 'ucs2'), 0, 'ucs2'))
+
+ {
+ const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2')
+
+ // Test single char pattern
+ t.equal(0, twoByteString.indexOf('\u039a', 0, 'ucs2'))
+ let index = twoByteString.indexOf('\u0391', 0, 'ucs2')
+ t.equal(2, index, `Alpha - at index ${index}`)
+ index = twoByteString.indexOf('\u03a3', 0, 'ucs2')
+ t.equal(4, index, `First Sigma - at index ${index}`)
+ index = twoByteString.indexOf('\u03a3', 6, 'ucs2')
+ t.equal(6, index, `Second Sigma - at index ${index}`)
+ index = twoByteString.indexOf('\u0395', 0, 'ucs2')
+ t.equal(8, index, `Epsilon - at index ${index}`)
+ index = twoByteString.indexOf('\u0392', 0, 'ucs2')
+ t.equal(-1, index, `Not beta - at index ${index}`)
+
+ // Test multi-char pattern
+ index = twoByteString.indexOf('\u039a\u0391', 0, 'ucs2')
+ t.equal(0, index, `Lambda Alpha - at index ${index}`)
+ index = twoByteString.indexOf('\u0391\u03a3', 0, 'ucs2')
+ t.equal(2, index, `Alpha Sigma - at index ${index}`)
+ index = twoByteString.indexOf('\u03a3\u03a3', 0, 'ucs2')
+ t.equal(4, index, `Sigma Sigma - at index ${index}`)
+ index = twoByteString.indexOf('\u03a3\u0395', 0, 'ucs2')
+ t.equal(6, index, `Sigma Epsilon - at index ${index}`)
+ }
+
+ const mixedByteStringUtf8 = Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395')
+
+ t.equal(5, mixedByteStringUtf8.indexOf('bc'))
+ t.equal(5, mixedByteStringUtf8.indexOf('bc', 5))
+ t.equal(5, mixedByteStringUtf8.indexOf('bc', -8))
+ t.equal(7, mixedByteStringUtf8.indexOf('\u03a3'))
+ t.equal(-1, mixedByteStringUtf8.indexOf('\u0396'))
+
+ // Test complex string indexOf algorithms. Only trigger for long strings.
+ // Long string that isn't a simple repeat of a shorter string.
+ let longString = 'A'
+ for (let i = 66; i < 76; i++) { // from 'B' to 'K'
+ longString = longString + String.fromCharCode(i) + longString
+ }
+
+ const longBufferString = Buffer.from(longString)
+
+ // pattern of 15 chars, repeated every 16 chars in long
+ let pattern = 'ABACABADABACABA'
+ for (let i = 0; i < longBufferString.length - pattern.length; i += 7) {
+ const index = longBufferString.indexOf(pattern, i)
+ t.equal((i + 15) & ~0xf, index,
+ `Long ABACABA...-string at index ${i}`)
+ }
+
+ let index = longBufferString.indexOf('AJABACA')
+ t.equal(510, index, `Long AJABACA, First J - at index ${index}`)
+ index = longBufferString.indexOf('AJABACA', 511)
+ t.equal(1534, index, `Long AJABACA, Second J - at index ${index}`)
+
+ pattern = 'JABACABADABACABA'
+ index = longBufferString.indexOf(pattern)
+ t.equal(511, index, `Long JABACABA..., First J - at index ${index}`)
+ index = longBufferString.indexOf(pattern, 512)
+ t.equal(
+ 1535, index, `Long JABACABA..., Second J - at index ${index}`)
+
+ // Search for a non-ASCII string in a pure ASCII string.
+ const asciiString = Buffer.from(
+ 'somethingnotatallsinisterwhichalsoworks')
+ t.equal(-1, asciiString.indexOf('\x2061'))
+ t.equal(3, asciiString.indexOf('eth', 0))
+
+ // Search in string containing many non-ASCII chars.
+ const allCodePoints = []
+ for (let i = 0; i < 65536; i++) {
+ allCodePoints[i] = i
+ }
+
+ const allCharsString = String.fromCharCode.apply(String, allCodePoints)
+ const allCharsBufferUtf8 = Buffer.from(allCharsString)
+ const allCharsBufferUcs2 = Buffer.from(allCharsString, 'ucs2')
+
+ // Search for string long enough to trigger complex search with ASCII pattern
+ // and UC16 subject.
+ t.equal(-1, allCharsBufferUtf8.indexOf('notfound'))
+ t.equal(-1, allCharsBufferUcs2.indexOf('notfound'))
+
+ // Needle is longer than haystack, but only because it's encoded as UTF-16
+ t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'ucs2'), -1)
+
+ t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'utf8'), 0)
+ t.equal(Buffer.from('aaaa').indexOf('你好', 'ucs2'), -1)
+
+ // Haystack has odd length, but the needle is UCS2.
+ t.equal(Buffer.from('aaaaa').indexOf('b', 'ucs2'), -1)
+
+ {
+ // Find substrings in Utf8.
+ const lengths = [1, 3, 15] // Single char, simple and complex.
+ const indices = [0x5, 0x60, 0x400, 0x680, 0x7ee, 0xFF02, 0x16610, 0x2f77b]
+ for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
+ for (let i = 0; i < indices.length; i++) {
+ const index = indices[i]
+ let length = lengths[lengthIndex]
+
+ if (index + length > 0x7F) {
+ length = 2 * length
+ }
+
+ if (index + length > 0x7FF) {
+ length = 3 * length
+ }
+
+ if (index + length > 0xFFFF) {
+ length = 4 * length
+ }
+
+ const patternBufferUtf8 = allCharsBufferUtf8.slice(index, index + length)
+ t.equal(index, allCharsBufferUtf8.indexOf(patternBufferUtf8))
+
+ const patternStringUtf8 = patternBufferUtf8.toString()
+ t.equal(index, allCharsBufferUtf8.indexOf(patternStringUtf8))
+ }
+ }
+ }
+
+ {
+ // Find substrings in Usc2.
+ const lengths = [2, 4, 16] // Single char, simple and complex.
+ const indices = [0x5, 0x65, 0x105, 0x205, 0x285, 0x2005, 0x2085, 0xfff0]
+
+ for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
+ for (let i = 0; i < indices.length; i++) {
+ const index = indices[i] * 2
+ const length = lengths[lengthIndex]
+
+ const patternBufferUcs2 =
+ allCharsBufferUcs2.slice(index, index + length)
+ t.equal(
+ index, allCharsBufferUcs2.indexOf(patternBufferUcs2, 0, 'ucs2'))
+
+ const patternStringUcs2 = patternBufferUcs2.toString('ucs2')
+ t.equal(
+ index, allCharsBufferUcs2.indexOf(patternStringUcs2, 0, 'ucs2'))
+ }
+ }
+ }
+
+ [
+ () => {},
+ {},
+ []
+ ].forEach((val) => {
+ t.throws(() => b.indexOf(val), TypeError, `"${JSON.stringify(val)}" should throw`)
+ })
+
+ // Test weird offset arguments.
+ // The following offsets coerce to NaN or 0, searching the whole Buffer
+ t.equal(b.indexOf('b', undefined), 1)
+ t.equal(b.indexOf('b', {}), 1)
+ t.equal(b.indexOf('b', 0), 1)
+ t.equal(b.indexOf('b', null), 1)
+ t.equal(b.indexOf('b', []), 1)
+
+ // The following offset coerces to 2, in other words +[2] === 2
+ t.equal(b.indexOf('b', [2]), -1)
+
+ // Behavior should match String.indexOf()
+ t.equal(
+ b.indexOf('b', undefined),
+ stringComparison.indexOf('b', undefined))
+ t.equal(
+ b.indexOf('b', {}),
+ stringComparison.indexOf('b', {}))
+ t.equal(
+ b.indexOf('b', 0),
+ stringComparison.indexOf('b', 0))
+ t.equal(
+ b.indexOf('b', null),
+ stringComparison.indexOf('b', null))
+ t.equal(
+ b.indexOf('b', []),
+ stringComparison.indexOf('b', []))
+ t.equal(
+ b.indexOf('b', [2]),
+ stringComparison.indexOf('b', [2]))
+
+ // test truncation of Number arguments to uint8
+ {
+ const buf = Buffer.from('this is a test')
+
+ t.equal(buf.indexOf(0x6973), 3)
+ t.equal(buf.indexOf(0x697320), 4)
+ t.equal(buf.indexOf(0x69732069), 2)
+ t.equal(buf.indexOf(0x697374657374), 0)
+ t.equal(buf.indexOf(0x69737374), 0)
+ t.equal(buf.indexOf(0x69737465), 11)
+ t.equal(buf.indexOf(0x69737465), 11)
+ t.equal(buf.indexOf(-140), 0)
+ t.equal(buf.indexOf(-152), 1)
+ t.equal(buf.indexOf(0xff), -1)
+ t.equal(buf.indexOf(0xffff), -1)
+ }
+
+ // Test that Uint8Array arguments are okay.
+ {
+ const needle = new Uint8Array([0x66, 0x6f, 0x6f])
+ const haystack = new BufferList(Buffer.from('a foo b foo'))
+ t.equal(haystack.indexOf(needle), 2)
+ }
+
+ t.end()
+})
diff --git a/node_modules/bl/test/isBufferList.js b/node_modules/bl/test/isBufferList.js
new file mode 100644
index 0000000..9d895d5
--- /dev/null
+++ b/node_modules/bl/test/isBufferList.js
@@ -0,0 +1,32 @@
+'use strict'
+
+const tape = require('tape')
+const { BufferList, BufferListStream } = require('../')
+const { Buffer } = require('buffer')
+
+tape('isBufferList positives', (t) => {
+ t.ok(BufferList.isBufferList(new BufferList()))
+ t.ok(BufferList.isBufferList(new BufferListStream()))
+
+ t.end()
+})
+
+tape('isBufferList negatives', (t) => {
+ const types = [
+ null,
+ undefined,
+ NaN,
+ true,
+ false,
+ {},
+ [],
+ Buffer.alloc(0),
+ [Buffer.alloc(0)]
+ ]
+
+ for (const obj of types) {
+ t.notOk(BufferList.isBufferList(obj))
+ }
+
+ t.end()
+})
diff --git a/node_modules/bl/test/test.js b/node_modules/bl/test/test.js
new file mode 100644
index 0000000..e03bb85
--- /dev/null
+++ b/node_modules/bl/test/test.js
@@ -0,0 +1,851 @@
+'use strict'
+
+const tape = require('tape')
+const crypto = require('crypto')
+const fs = require('fs')
+const path = require('path')
+const BufferList = require('../')
+const { Buffer } = require('buffer')
+
+const encodings =
+ ('hex utf8 utf-8 ascii binary base64' +
+ (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ')
+
+require('./indexOf')
+require('./isBufferList')
+require('./convert')
+
+tape('single bytes from single buffer', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('abcd'))
+
+ t.equal(bl.length, 4)
+ t.equal(bl.get(-1), undefined)
+ t.equal(bl.get(0), 97)
+ t.equal(bl.get(1), 98)
+ t.equal(bl.get(2), 99)
+ t.equal(bl.get(3), 100)
+ t.equal(bl.get(4), undefined)
+
+ t.end()
+})
+
+tape('single bytes from multiple buffers', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.get(0), 97)
+ t.equal(bl.get(1), 98)
+ t.equal(bl.get(2), 99)
+ t.equal(bl.get(3), 100)
+ t.equal(bl.get(4), 101)
+ t.equal(bl.get(5), 102)
+ t.equal(bl.get(6), 103)
+ t.equal(bl.get(7), 104)
+ t.equal(bl.get(8), 105)
+ t.equal(bl.get(9), 106)
+
+ t.end()
+})
+
+tape('multi bytes from single buffer', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('abcd'))
+
+ t.equal(bl.length, 4)
+
+ t.equal(bl.slice(0, 4).toString('ascii'), 'abcd')
+ t.equal(bl.slice(0, 3).toString('ascii'), 'abc')
+ t.equal(bl.slice(1, 4).toString('ascii'), 'bcd')
+ t.equal(bl.slice(-4, -1).toString('ascii'), 'abc')
+
+ t.end()
+})
+
+tape('multi bytes from single buffer (negative indexes)', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('buffer'))
+
+ t.equal(bl.length, 6)
+
+ t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe')
+ t.equal(bl.slice(-6, -2).toString('ascii'), 'buff')
+ t.equal(bl.slice(-5, -2).toString('ascii'), 'uff')
+
+ t.end()
+})
+
+tape('multiple bytes from multiple buffers', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+ t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
+ t.equal(bl.slice(3, 6).toString('ascii'), 'def')
+ t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
+ t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+ t.equal(bl.slice(-7, -4).toString('ascii'), 'def')
+
+ t.end()
+})
+
+tape('multiple bytes from multiple buffer lists', function (t) {
+ const bl = new BufferList()
+
+ bl.append(new BufferList([Buffer.from('abcd'), Buffer.from('efg')]))
+ bl.append(new BufferList([Buffer.from('hi'), Buffer.from('j')]))
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+
+ t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
+ t.equal(bl.slice(3, 6).toString('ascii'), 'def')
+ t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
+ t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+
+ t.end()
+})
+
+// same data as previous test, just using nested constructors
+tape('multiple bytes from crazy nested buffer lists', function (t) {
+ const bl = new BufferList()
+
+ bl.append(new BufferList([
+ new BufferList([
+ new BufferList(Buffer.from('abc')),
+ Buffer.from('d'),
+ new BufferList(Buffer.from('efg'))
+ ]),
+ new BufferList([Buffer.from('hi')]),
+ new BufferList(Buffer.from('j'))
+ ]))
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+
+ t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
+ t.equal(bl.slice(3, 6).toString('ascii'), 'def')
+ t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
+ t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+
+ t.end()
+})
+
+tape('append accepts arrays of Buffers', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('abc'))
+ bl.append([Buffer.from('def')])
+ bl.append([Buffer.from('ghi'), Buffer.from('jkl')])
+ bl.append([Buffer.from('mnop'), Buffer.from('qrstu'), Buffer.from('vwxyz')])
+ t.equal(bl.length, 26)
+ t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+ t.end()
+})
+
+tape('append accepts arrays of Uint8Arrays', function (t) {
+ const bl = new BufferList()
+
+ bl.append(new Uint8Array([97, 98, 99]))
+ bl.append([Uint8Array.from([100, 101, 102])])
+ bl.append([new Uint8Array([103, 104, 105]), new Uint8Array([106, 107, 108])])
+ bl.append([new Uint8Array([109, 110, 111, 112]), new Uint8Array([113, 114, 115, 116, 117]), new Uint8Array([118, 119, 120, 121, 122])])
+ t.equal(bl.length, 26)
+ t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+ t.end()
+})
+
+tape('append accepts arrays of BufferLists', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('abc'))
+ bl.append([new BufferList('def')])
+ bl.append(new BufferList([Buffer.from('ghi'), new BufferList('jkl')]))
+ bl.append([Buffer.from('mnop'), new BufferList([Buffer.from('qrstu'), Buffer.from('vwxyz')])])
+ t.equal(bl.length, 26)
+ t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+ t.end()
+})
+
+tape('append chainable', function (t) {
+ const bl = new BufferList()
+
+ t.ok(bl.append(Buffer.from('abcd')) === bl)
+ t.ok(bl.append([Buffer.from('abcd')]) === bl)
+ t.ok(bl.append(new BufferList(Buffer.from('abcd'))) === bl)
+ t.ok(bl.append([new BufferList(Buffer.from('abcd'))]) === bl)
+
+ t.end()
+})
+
+tape('append chainable (test results)', function (t) {
+ const bl = new BufferList('abc')
+ .append([new BufferList('def')])
+ .append(new BufferList([Buffer.from('ghi'), new BufferList('jkl')]))
+ .append([Buffer.from('mnop'), new BufferList([Buffer.from('qrstu'), Buffer.from('vwxyz')])])
+
+ t.equal(bl.length, 26)
+ t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+ t.end()
+})
+
+tape('consuming from multiple buffers', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+
+ t.equal(bl.length, 10)
+
+ t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+
+ bl.consume(3)
+ t.equal(bl.length, 7)
+ t.equal(bl.slice(0, 7).toString('ascii'), 'defghij')
+
+ bl.consume(2)
+ t.equal(bl.length, 5)
+ t.equal(bl.slice(0, 5).toString('ascii'), 'fghij')
+
+ bl.consume(1)
+ t.equal(bl.length, 4)
+ t.equal(bl.slice(0, 4).toString('ascii'), 'ghij')
+
+ bl.consume(1)
+ t.equal(bl.length, 3)
+ t.equal(bl.slice(0, 3).toString('ascii'), 'hij')
+
+ bl.consume(2)
+ t.equal(bl.length, 1)
+ t.equal(bl.slice(0, 1).toString('ascii'), 'j')
+
+ t.end()
+})
+
+tape('complete consumption', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('a'))
+ bl.append(Buffer.from('b'))
+
+ bl.consume(2)
+
+ t.equal(bl.length, 0)
+ t.equal(bl._bufs.length, 0)
+
+ t.end()
+})
+
+tape('test readUInt8 / readInt8', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferList()
+
+ buf2[1] = 0x3
+ buf2[2] = 0x4
+ buf3[0] = 0x23
+ buf3[1] = 0x42
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readUInt8(2), 0x3)
+ t.equal(bl.readInt8(2), 0x3)
+ t.equal(bl.readUInt8(3), 0x4)
+ t.equal(bl.readInt8(3), 0x4)
+ t.equal(bl.readUInt8(4), 0x23)
+ t.equal(bl.readInt8(4), 0x23)
+ t.equal(bl.readUInt8(5), 0x42)
+ t.equal(bl.readInt8(5), 0x42)
+
+ t.end()
+})
+
+tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferList()
+
+ buf2[1] = 0x3
+ buf2[2] = 0x4
+ buf3[0] = 0x23
+ buf3[1] = 0x42
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readUInt16BE(2), 0x0304)
+ t.equal(bl.readUInt16LE(2), 0x0403)
+ t.equal(bl.readInt16BE(2), 0x0304)
+ t.equal(bl.readInt16LE(2), 0x0403)
+ t.equal(bl.readUInt16BE(3), 0x0423)
+ t.equal(bl.readUInt16LE(3), 0x2304)
+ t.equal(bl.readInt16BE(3), 0x0423)
+ t.equal(bl.readInt16LE(3), 0x2304)
+ t.equal(bl.readUInt16BE(4), 0x2342)
+ t.equal(bl.readUInt16LE(4), 0x4223)
+ t.equal(bl.readInt16BE(4), 0x2342)
+ t.equal(bl.readInt16LE(4), 0x4223)
+
+ t.end()
+})
+
+tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferList()
+
+ buf2[1] = 0x3
+ buf2[2] = 0x4
+ buf3[0] = 0x23
+ buf3[1] = 0x42
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readUInt32BE(2), 0x03042342)
+ t.equal(bl.readUInt32LE(2), 0x42230403)
+ t.equal(bl.readInt32BE(2), 0x03042342)
+ t.equal(bl.readInt32LE(2), 0x42230403)
+
+ t.end()
+})
+
+tape('test readUIntLE / readUIntBE / readIntLE / readIntBE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferList()
+
+ buf2[0] = 0x2
+ buf2[1] = 0x3
+ buf2[2] = 0x4
+ buf3[0] = 0x23
+ buf3[1] = 0x42
+ buf3[2] = 0x61
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readUIntBE(1, 1), 0x02)
+ t.equal(bl.readUIntBE(1, 2), 0x0203)
+ t.equal(bl.readUIntBE(1, 3), 0x020304)
+ t.equal(bl.readUIntBE(1, 4), 0x02030423)
+ t.equal(bl.readUIntBE(1, 5), 0x0203042342)
+ t.equal(bl.readUIntBE(1, 6), 0x020304234261)
+ t.equal(bl.readUIntLE(1, 1), 0x02)
+ t.equal(bl.readUIntLE(1, 2), 0x0302)
+ t.equal(bl.readUIntLE(1, 3), 0x040302)
+ t.equal(bl.readUIntLE(1, 4), 0x23040302)
+ t.equal(bl.readUIntLE(1, 5), 0x4223040302)
+ t.equal(bl.readUIntLE(1, 6), 0x614223040302)
+ t.equal(bl.readIntBE(1, 1), 0x02)
+ t.equal(bl.readIntBE(1, 2), 0x0203)
+ t.equal(bl.readIntBE(1, 3), 0x020304)
+ t.equal(bl.readIntBE(1, 4), 0x02030423)
+ t.equal(bl.readIntBE(1, 5), 0x0203042342)
+ t.equal(bl.readIntBE(1, 6), 0x020304234261)
+ t.equal(bl.readIntLE(1, 1), 0x02)
+ t.equal(bl.readIntLE(1, 2), 0x0302)
+ t.equal(bl.readIntLE(1, 3), 0x040302)
+ t.equal(bl.readIntLE(1, 4), 0x23040302)
+ t.equal(bl.readIntLE(1, 5), 0x4223040302)
+ t.equal(bl.readIntLE(1, 6), 0x614223040302)
+
+ t.end()
+})
+
+tape('test readFloatLE / readFloatBE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(3)
+ const bl = new BufferList()
+
+ buf2[1] = 0x00
+ buf2[2] = 0x00
+ buf3[0] = 0x80
+ buf3[1] = 0x3f
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readFloatLE(2), 0x01)
+
+ t.end()
+})
+
+tape('test readDoubleLE / readDoubleBE', function (t) {
+ const buf1 = Buffer.alloc(1)
+ const buf2 = Buffer.alloc(3)
+ const buf3 = Buffer.alloc(10)
+ const bl = new BufferList()
+
+ buf2[1] = 0x55
+ buf2[2] = 0x55
+ buf3[0] = 0x55
+ buf3[1] = 0x55
+ buf3[2] = 0x55
+ buf3[3] = 0x55
+ buf3[4] = 0xd5
+ buf3[5] = 0x3f
+
+ bl.append(buf1)
+ bl.append(buf2)
+ bl.append(buf3)
+
+ t.equal(bl.readDoubleLE(2), 0.3333333333333333)
+
+ t.end()
+})
+
+tape('test toString', function (t) {
+ const bl = new BufferList()
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+
+ t.equal(bl.toString('ascii', 0, 10), 'abcdefghij')
+ t.equal(bl.toString('ascii', 3, 10), 'defghij')
+ t.equal(bl.toString('ascii', 3, 6), 'def')
+ t.equal(bl.toString('ascii', 3, 8), 'defgh')
+ t.equal(bl.toString('ascii', 5, 10), 'fghij')
+
+ t.end()
+})
+
+tape('test toString encoding', function (t) {
+ const bl = new BufferList()
+ const b = Buffer.from('abcdefghij\xff\x00')
+
+ bl.append(Buffer.from('abcd'))
+ bl.append(Buffer.from('efg'))
+ bl.append(Buffer.from('hi'))
+ bl.append(Buffer.from('j'))
+ bl.append(Buffer.from('\xff\x00'))
+
+ encodings.forEach(function (enc) {
+ t.equal(bl.toString(enc), b.toString(enc), enc)
+ })
+
+ t.end()
+})
+
+tape('uninitialized memory', function (t) {
+ const secret = crypto.randomBytes(256)
+ for (let i = 0; i < 1e6; i++) {
+ const clone = Buffer.from(secret)
+ const bl = new BufferList()
+ bl.append(Buffer.from('a'))
+ bl.consume(-1024)
+ const buf = bl.slice(1)
+ if (buf.indexOf(clone) !== -1) {
+ t.fail(`Match (at ${i})`)
+ break
+ }
+ }
+ t.end()
+})
+
+!process.browser && tape('test stream', function (t) {
+ const random = crypto.randomBytes(65534)
+
+ const bl = new BufferList((err, buf) => {
+ t.ok(Buffer.isBuffer(buf))
+ t.ok(err === null)
+ t.ok(random.equals(bl.slice()))
+ t.ok(random.equals(buf.slice()))
+
+ bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat'))
+ .on('close', function () {
+ const rndhash = crypto.createHash('md5').update(random).digest('hex')
+ const md5sum = crypto.createHash('md5')
+ const s = fs.createReadStream('/tmp/bl_test_rnd_out.dat')
+
+ s.on('data', md5sum.update.bind(md5sum))
+ s.on('end', function () {
+ t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!')
+ t.end()
+ })
+ })
+ })
+
+ fs.writeFileSync('/tmp/bl_test_rnd.dat', random)
+ fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl)
+})
+
+tape('instantiation with Buffer', function (t) {
+ const buf = crypto.randomBytes(1024)
+ const buf2 = crypto.randomBytes(1024)
+ let b = BufferList(buf)
+
+ t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer')
+ b = BufferList([buf, buf2])
+ t.equal(b.slice().toString('hex'), Buffer.concat([buf, buf2]).toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('test String appendage', function (t) {
+ const bl = new BufferList()
+ const b = Buffer.from('abcdefghij\xff\x00')
+
+ bl.append('abcd')
+ bl.append('efg')
+ bl.append('hi')
+ bl.append('j')
+ bl.append('\xff\x00')
+
+ encodings.forEach(function (enc) {
+ t.equal(bl.toString(enc), b.toString(enc))
+ })
+
+ t.end()
+})
+
+tape('test Number appendage', function (t) {
+ const bl = new BufferList()
+ const b = Buffer.from('1234567890')
+
+ bl.append(1234)
+ bl.append(567)
+ bl.append(89)
+ bl.append(0)
+
+ encodings.forEach(function (enc) {
+ t.equal(bl.toString(enc), b.toString(enc))
+ })
+
+ t.end()
+})
+
+tape('write nothing, should get empty buffer', function (t) {
+ t.plan(3)
+ BufferList(function (err, data) {
+ t.notOk(err, 'no error')
+ t.ok(Buffer.isBuffer(data), 'got a buffer')
+ t.equal(0, data.length, 'got a zero-length buffer')
+ t.end()
+ }).end()
+})
+
+tape('unicode string', function (t) {
+ t.plan(2)
+
+ const inp1 = '\u2600'
+ const inp2 = '\u2603'
+ const exp = inp1 + ' and ' + inp2
+ const bl = BufferList()
+
+ bl.write(inp1)
+ bl.write(' and ')
+ bl.write(inp2)
+ t.equal(exp, bl.toString())
+ t.equal(Buffer.from(exp).toString('hex'), bl.toString('hex'))
+})
+
+tape('should emit finish', function (t) {
+ const source = BufferList()
+ const dest = BufferList()
+
+ source.write('hello')
+ source.pipe(dest)
+
+ dest.on('finish', function () {
+ t.equal(dest.toString('utf8'), 'hello')
+ t.end()
+ })
+})
+
+tape('basic copy', function (t) {
+ const buf = crypto.randomBytes(1024)
+ const buf2 = Buffer.alloc(1024)
+ const b = BufferList(buf)
+
+ b.copy(buf2)
+ t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy after many appends', function (t) {
+ const buf = crypto.randomBytes(512)
+ const buf2 = Buffer.alloc(1024)
+ const b = BufferList(buf)
+
+ b.append(buf)
+ b.copy(buf2)
+ t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy at a precise position', function (t) {
+ const buf = crypto.randomBytes(1004)
+ const buf2 = Buffer.alloc(1024)
+ const b = BufferList(buf)
+
+ b.copy(buf2, 20)
+ t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy starting from a precise location', function (t) {
+ const buf = crypto.randomBytes(10)
+ const buf2 = Buffer.alloc(5)
+ const b = BufferList(buf)
+
+ b.copy(buf2, 0, 5)
+ t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy in an interval', function (t) {
+ const rnd = crypto.randomBytes(10)
+ const b = BufferList(rnd) // put the random bytes there
+ const actual = Buffer.alloc(3)
+ const expected = Buffer.alloc(3)
+
+ rnd.copy(expected, 0, 5, 8)
+ b.copy(actual, 0, 5, 8)
+
+ t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('copy an interval between two buffers', function (t) {
+ const buf = crypto.randomBytes(10)
+ const buf2 = Buffer.alloc(10)
+ const b = BufferList(buf)
+
+ b.append(buf)
+ b.copy(buf2, 0, 5, 15)
+
+ t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer')
+
+ t.end()
+})
+
+tape('shallow slice across buffer boundaries', function (t) {
+ const bl = new BufferList(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh')
+
+ t.end()
+})
+
+tape('shallow slice within single buffer', function (t) {
+ t.plan(2)
+
+ const bl = new BufferList(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice(5, 10).toString(), 'Secon')
+ t.equal(bl.shallowSlice(7, 10).toString(), 'con')
+
+ t.end()
+})
+
+tape('shallow slice single buffer', function (t) {
+ t.plan(3)
+
+ const bl = new BufferList(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice(0, 5).toString(), 'First')
+ t.equal(bl.shallowSlice(5, 11).toString(), 'Second')
+ t.equal(bl.shallowSlice(11, 16).toString(), 'Third')
+})
+
+tape('shallow slice with negative or omitted indices', function (t) {
+ t.plan(4)
+
+ const bl = new BufferList(['First', 'Second', 'Third'])
+
+ t.equal(bl.shallowSlice().toString(), 'FirstSecondThird')
+ t.equal(bl.shallowSlice(5).toString(), 'SecondThird')
+ t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh')
+ t.equal(bl.shallowSlice(-8).toString(), 'ondThird')
+})
+
+tape('shallow slice does not make a copy', function (t) {
+ t.plan(1)
+
+ const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
+ const bl = (new BufferList(buffers)).shallowSlice(5, -3)
+
+ buffers[1].fill('h')
+ buffers[2].fill('h')
+
+ t.equal(bl.toString(), 'hhhhhhhh')
+})
+
+tape('shallow slice with 0 length', function (t) {
+ t.plan(1)
+
+ const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
+ const bl = (new BufferList(buffers)).shallowSlice(0, 0)
+
+ t.equal(bl.length, 0)
+})
+
+tape('shallow slice with 0 length from middle', function (t) {
+ t.plan(1)
+
+ const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
+ const bl = (new BufferList(buffers)).shallowSlice(10, 10)
+
+ t.equal(bl.length, 0)
+})
+
+tape('duplicate', function (t) {
+ t.plan(2)
+
+ const bl = new BufferList('abcdefghij\xff\x00')
+ const dup = bl.duplicate()
+
+ t.equal(bl.prototype, dup.prototype)
+ t.equal(bl.toString('hex'), dup.toString('hex'))
+})
+
+tape('destroy no pipe', function (t) {
+ t.plan(2)
+
+ const bl = new BufferList('alsdkfja;lsdkfja;lsdk')
+
+ bl.destroy()
+
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+})
+
+tape('destroy with error', function (t) {
+ t.plan(3)
+
+ const bl = new BufferList('alsdkfja;lsdkfja;lsdk')
+ const err = new Error('kaboom')
+
+ bl.destroy(err)
+ bl.on('error', function (_err) {
+ t.equal(_err, err)
+ })
+
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+})
+
+!process.browser && tape('destroy with pipe before read end', function (t) {
+ t.plan(2)
+
+ const bl = new BufferList()
+ fs.createReadStream(path.join(__dirname, '/test.js'))
+ .pipe(bl)
+
+ bl.destroy()
+
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+})
+
+!process.browser && tape('destroy with pipe before read end with race', function (t) {
+ t.plan(2)
+
+ const bl = new BufferList()
+
+ fs.createReadStream(path.join(__dirname, '/test.js'))
+ .pipe(bl)
+
+ setTimeout(function () {
+ bl.destroy()
+ setTimeout(function () {
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+ }, 500)
+ }, 500)
+})
+
+!process.browser && tape('destroy with pipe after read end', function (t) {
+ t.plan(2)
+
+ const bl = new BufferList()
+
+ fs.createReadStream(path.join(__dirname, '/test.js'))
+ .on('end', onEnd)
+ .pipe(bl)
+
+ function onEnd () {
+ bl.destroy()
+
+ t.equal(bl._bufs.length, 0)
+ t.equal(bl.length, 0)
+ }
+})
+
+!process.browser && tape('destroy with pipe while writing to a destination', function (t) {
+ t.plan(4)
+
+ const bl = new BufferList()
+ const ds = new BufferList()
+
+ fs.createReadStream(path.join(__dirname, '/test.js'))
+ .on('end', onEnd)
+ .pipe(bl)
+
+ function onEnd () {
+ bl.pipe(ds)
+
+ setTimeout(function () {
+ bl.destroy()
+
+ t.equals(bl._bufs.length, 0)
+ t.equals(bl.length, 0)
+
+ ds.destroy()
+
+ t.equals(bl._bufs.length, 0)
+ t.equals(bl.length, 0)
+ }, 100)
+ }
+})
+
+!process.browser && tape('handle error', function (t) {
+ t.plan(2)
+
+ fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) {
+ t.ok(err instanceof Error, 'has error')
+ t.notOk(data, 'no data')
+ }))
+})
diff --git a/node_modules/buffer/AUTHORS.md b/node_modules/buffer/AUTHORS.md
new file mode 100644
index 0000000..396b45f
--- /dev/null
+++ b/node_modules/buffer/AUTHORS.md
@@ -0,0 +1,62 @@
+# Authors
+
+#### Ordered by first contribution.
+
+- Romain Beauxis (toots@rastageeks.org)
+- Tobias Koppers (tobias.koppers@googlemail.com)
+- Janus (ysangkok@gmail.com)
+- Rainer Dreyer (rdrey1@gmail.com)
+- Tõnis Tiigi (tonistiigi@gmail.com)
+- James Halliday (mail@substack.net)
+- Michael Williamson (mike@zwobble.org)
+- elliottcable (github@elliottcable.name)
+- rafael (rvalle@livelens.net)
+- Andrew Kelley (superjoe30@gmail.com)
+- Andreas Madsen (amwebdk@gmail.com)
+- Mike Brevoort (mike.brevoort@pearson.com)
+- Brian White (mscdex@mscdex.net)
+- Feross Aboukhadijeh (feross@feross.org)
+- Ruben Verborgh (ruben@verborgh.org)
+- eliang (eliang.cs@gmail.com)
+- Jesse Tane (jesse.tane@gmail.com)
+- Alfonso Boza (alfonso@cloud.com)
+- Mathias Buus (mathiasbuus@gmail.com)
+- Devon Govett (devongovett@gmail.com)
+- Daniel Cousens (github@dcousens.com)
+- Joseph Dykstra (josephdykstra@gmail.com)
+- Parsha Pourkhomami (parshap+git@gmail.com)
+- Damjan Košir (damjan.kosir@gmail.com)
+- daverayment (dave.rayment@gmail.com)
+- kawanet (u-suke@kawa.net)
+- Linus Unnebäck (linus@folkdatorn.se)
+- Nolan Lawson (nolan.lawson@gmail.com)
+- Calvin Metcalf (calvin.metcalf@gmail.com)
+- Koki Takahashi (hakatasiloving@gmail.com)
+- Guy Bedford (guybedford@gmail.com)
+- Jan Schär (jscissr@gmail.com)
+- RaulTsc (tomescu.raul@gmail.com)
+- Matthieu Monsch (monsch@alum.mit.edu)
+- Dan Ehrenberg (littledan@chromium.org)
+- Kirill Fomichev (fanatid@ya.ru)
+- Yusuke Kawasaki (u-suke@kawa.net)
+- DC (dcposch@dcpos.ch)
+- John-David Dalton (john.david.dalton@gmail.com)
+- adventure-yunfei (adventure030@gmail.com)
+- Emil Bay (github@tixz.dk)
+- Sam Sudar (sudar.sam@gmail.com)
+- Volker Mische (volker.mische@gmail.com)
+- David Walton (support@geekstocks.com)
+- Сковорода Никита Андреевич (chalkerx@gmail.com)
+- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com)
+- ukstv (sergey.ukustov@machinomy.com)
+- Renée Kooi (renee@kooi.me)
+- ranbochen (ranbochen@qq.com)
+- Vladimir Borovik (bobahbdb@gmail.com)
+- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com)
+- kumavis (aaron@kumavis.me)
+- Sergey Ukustov (sergey.ukustov@machinomy.com)
+- Fei Liu (liu.feiwood@gmail.com)
+- Blaine Bublitz (blaine.bublitz@gmail.com)
+- Niklas Mischkulnig (mischnic@users.noreply.github.com)
+
+#### Generated by bin/update-authors.sh.
diff --git a/node_modules/buffer/LICENSE b/node_modules/buffer/LICENSE
new file mode 100644
index 0000000..d6bf75d
--- /dev/null
+++ b/node_modules/buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh, and other contributors.
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/buffer/README.md b/node_modules/buffer/README.md
new file mode 100644
index 0000000..2aab37d
--- /dev/null
+++ b/node_modules/buffer/README.md
@@ -0,0 +1,416 @@
+# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/buffer
+[npm-image]: https://img.shields.io/npm/v/buffer.svg
+[npm-url]: https://npmjs.org/package/buffer
+[downloads-image]: https://img.shields.io/npm/dm/buffer.svg
+[downloads-url]: https://npmjs.org/package/buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### The buffer module from [node.js](https://nodejs.org/), for the browser.
+
+[![saucelabs][saucelabs-image]][saucelabs-url]
+
+[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg
+[saucelabs-url]: https://saucelabs.com/u/buffer
+
+With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module.
+
+The goal is to provide an API that is 100% identical to
+[node's Buffer API](https://nodejs.org/api/buffer.html). Read the
+[official docs](https://nodejs.org/api/buffer.html) for the full list of properties,
+instance methods, and class methods that are supported.
+
+## features
+
+- Manipulate binary data like a boss, in all browsers!
+- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`)
+- Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments)
+- Excellent browser support (Chrome, Firefox, Edge, Safari 9+, IE 11, iOS 9+, Android, etc.)
+- Preserves Node API exactly, with one minor difference (see below)
+- Square-bracket `buf[4]` notation works!
+- Does not modify any browser prototypes or put anything on `window`
+- Comprehensive test suite (including all buffer tests from node.js core)
+
+## `buffer` for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of `buffer` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-buffer?utm_source=npm-buffer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+## install
+
+To use this module directly (without browserify), install it:
+
+```bash
+npm install buffer
+```
+
+This module was previously called **native-buffer-browserify**, but please use **buffer**
+from now on.
+
+If you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer).
+
+## usage
+
+The module's API is identical to node's `Buffer` API. Read the
+[official docs](https://nodejs.org/api/buffer.html) for the full list of properties,
+instance methods, and class methods that are supported.
+
+As mentioned above, `require('buffer')` or use the `Buffer` global with
+[browserify](http://browserify.org) and this module will automatically be included
+in your bundle. Almost any npm module will work in the browser, even if it assumes that
+the node `Buffer` API will be available.
+
+To depend on this module explicitly (without browserify), require it like this:
+
+```js
+var Buffer = require('buffer/').Buffer // note: the trailing slash is important!
+```
+
+To require this module explicitly, use `require('buffer/')` which tells the node.js module
+lookup algorithm (also used by browserify) to use the **npm module** named `buffer`
+instead of the **node.js core** module named `buffer`!
+
+
+## how does it work?
+
+The Buffer constructor returns instances of `Uint8Array` that have their prototype
+changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`,
+so the returned instances will have all the node `Buffer` methods and the
+`Uint8Array` methods. Square bracket notation works as expected -- it returns a
+single octet.
+
+The `Uint8Array` prototype remains unmodified.
+
+
+## tracking the latest node api
+
+This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer
+API is considered **stable** in the
+[node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index),
+so it is unlikely that there will ever be breaking changes.
+Nonetheless, when/if the Buffer API changes in node, this module's API will change
+accordingly.
+
+## related packages
+
+- [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer
+- [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer
+- [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package
+
+## conversion packages
+
+### convert typed array to buffer
+
+Use [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast.
+
+### convert buffer to typed array
+
+`Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`.
+
+### convert blob to buffer
+
+Use [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`.
+
+### convert buffer to blob
+
+To convert a `Buffer` to a `Blob`, use the `Blob` constructor:
+
+```js
+var blob = new Blob([ buffer ])
+```
+
+Optionally, specify a mimetype:
+
+```js
+var blob = new Blob([ buffer ], { type: 'text/html' })
+```
+
+### convert arraybuffer to buffer
+
+To convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast.
+
+```js
+var buffer = Buffer.from(arrayBuffer)
+```
+
+### convert buffer to arraybuffer
+
+To convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects):
+
+```js
+var arrayBuffer = buffer.buffer.slice(
+ buffer.byteOffset, buffer.byteOffset + buffer.byteLength
+)
+```
+
+Alternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module.
+
+## performance
+
+See perf tests in `/perf`.
+
+`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a
+sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will
+always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module,
+which is included to compare against.
+
+NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README.
+
+### Chrome 38
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ |
+| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | |
+| | | | |
+| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | |
+| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | |
+| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | |
+| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | |
+| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | |
+| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ |
+| | | | |
+| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ |
+| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | |
+| | | | |
+| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ |
+| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | |
+| | | | |
+| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ |
+| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | |
+| | | | |
+| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | |
+| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | |
+| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ |
+
+
+### Firefox 33
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | |
+| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ |
+| | | | |
+| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | |
+| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | |
+| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | |
+| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | |
+| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | |
+| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | |
+| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | |
+| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ |
+| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | |
+| | | | |
+| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | |
+| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | |
+| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ |
+
+### Safari 8
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ |
+| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | |
+| | | | |
+| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | |
+| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | |
+| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | |
+| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ |
+| | | | |
+| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | |
+| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | |
+| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ |
+| | | | |
+| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | |
+| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ |
+| | | | |
+| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | |
+| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ |
+| | | | |
+| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | |
+| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ |
+| | | | |
+| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | |
+| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | |
+| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ |
+
+
+### Node 0.11.14
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | |
+| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ |
+| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | |
+| | | | |
+| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | |
+| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ |
+| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | |
+| | | | |
+| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | |
+| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ |
+| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | |
+| | | | |
+| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | |
+| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ |
+| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | |
+| | | | |
+| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | |
+| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | |
+| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | |
+| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ |
+| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | |
+| | | | |
+| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ |
+| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | |
+| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | |
+| | | | |
+| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ |
+| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | |
+| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | |
+| | | | |
+| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | |
+| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | |
+| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ |
+| | | | |
+| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | |
+| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ |
+| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | |
+| | | | |
+| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | |
+| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ |
+| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | |
+
+### iojs 1.8.1
+
+| Method | Operations | Accuracy | Sampled | Fastest |
+|:-------|:-----------|:---------|:--------|:-------:|
+| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | |
+| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | |
+| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ |
+| | | | |
+| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | |
+| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | |
+| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | |
+| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | |
+| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ |
+| | | | |
+| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | |
+| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ |
+| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | |
+| | | | |
+| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | |
+| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | |
+| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ |
+| | | | |
+| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | |
+| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ |
+| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | |
+| | | | |
+| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ |
+| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | |
+| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | |
+| | | | |
+| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ |
+| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | |
+| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | |
+| | | | |
+| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | |
+| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | |
+| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ |
+| | | | |
+| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | |
+| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | |
+| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ |
+| | | | |
+| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | |
+| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ |
+| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | |
+| | | | |
+
+## Testing the project
+
+First, install the project:
+
+ npm install
+
+Then, to run tests in Node.js, run:
+
+ npm run test-node
+
+To test locally in a browser, you can run:
+
+ npm run test-browser-es5-local # For ES5 browsers that don't support ES6
+ npm run test-browser-es6-local # For ES6 compliant browsers
+
+This will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap).
+
+To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run:
+
+ npm test
+
+This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files.
+
+## JavaScript Standard Style
+
+This module uses [JavaScript Standard Style](https://github.com/feross/standard).
+
+[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+To test that the code conforms to the style, `npm install` and run:
+
+ ./node_modules/.bin/standard
+
+## credit
+
+This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify).
+
+## Security Policies and Procedures
+
+The `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues.
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis.
diff --git a/node_modules/buffer/index.d.ts b/node_modules/buffer/index.d.ts
new file mode 100644
index 0000000..0227c9c
--- /dev/null
+++ b/node_modules/buffer/index.d.ts
@@ -0,0 +1,186 @@
+export class Buffer extends Uint8Array {
+ length: number
+ write(string: string, offset?: number, length?: number, encoding?: string): number;
+ toString(encoding?: string, start?: number, end?: number): string;
+ toJSON(): { type: 'Buffer', data: any[] };
+ equals(otherBuffer: Buffer): boolean;
+ compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
+ copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ slice(start?: number, end?: number): Buffer;
+ writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUInt8(offset: number, noAssert?: boolean): number;
+ readUInt16LE(offset: number, noAssert?: boolean): number;
+ readUInt16BE(offset: number, noAssert?: boolean): number;
+ readUInt32LE(offset: number, noAssert?: boolean): number;
+ readUInt32BE(offset: number, noAssert?: boolean): number;
+ readInt8(offset: number, noAssert?: boolean): number;
+ readInt16LE(offset: number, noAssert?: boolean): number;
+ readInt16BE(offset: number, noAssert?: boolean): number;
+ readInt32LE(offset: number, noAssert?: boolean): number;
+ readInt32BE(offset: number, noAssert?: boolean): number;
+ readFloatLE(offset: number, noAssert?: boolean): number;
+ readFloatBE(offset: number, noAssert?: boolean): number;
+ readDoubleLE(offset: number, noAssert?: boolean): number;
+ readDoubleBE(offset: number, noAssert?: boolean): number;
+ reverse(): this;
+ swap16(): Buffer;
+ swap32(): Buffer;
+ swap64(): Buffer;
+ writeUInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
+ fill(value: any, offset?: number, end?: number): this;
+ indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
+
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ */
+ constructor (str: string, encoding?: string);
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ */
+ constructor (size: number);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: Uint8Array);
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ */
+ constructor (arrayBuffer: ArrayBuffer);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: any[]);
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ */
+ constructor (buffer: Buffer);
+ prototype: Buffer;
+ /**
+ * Allocates a new Buffer using an {array} of octets.
+ *
+ * @param array
+ */
+ static from(array: any[]): Buffer;
+ /**
+ * When passed a reference to the .buffer property of a TypedArray instance,
+ * the newly created Buffer will share the same allocated memory as the TypedArray.
+ * The optional {byteOffset} and {length} arguments specify a memory range
+ * within the {arrayBuffer} that will be shared by the Buffer.
+ *
+ * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
+ * @param byteOffset
+ * @param length
+ */
+ static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new Buffer instance.
+ *
+ * @param buffer
+ */
+ static from(buffer: Buffer | Uint8Array): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ *
+ * @param str
+ */
+ static from(str: string, encoding?: string): Buffer;
+ /**
+ * Returns true if {obj} is a Buffer
+ *
+ * @param obj object to test.
+ */
+ static isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns true if {encoding} is a valid encoding argument.
+ * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ *
+ * @param encoding string to test.
+ */
+ static isEncoding(encoding: string): boolean;
+ /**
+ * Gives the actual byte length of a string. encoding defaults to 'utf8'.
+ * This is not the same as String.prototype.length since that returns the number of characters in a string.
+ *
+ * @param string string to test.
+ * @param encoding encoding used to evaluate (defaults to 'utf8')
+ */
+ static byteLength(string: string, encoding?: string): number;
+ /**
+ * Returns a buffer which is the result of concatenating all the buffers in the list together.
+ *
+ * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
+ * If the list has exactly one item, then the first item of the list is returned.
+ * If the list has more than one item, then a new Buffer is created.
+ *
+ * @param list An array of Buffer objects to concatenate
+ * @param totalLength Total length of the buffers when concatenated.
+ * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
+ */
+ static concat(list: Buffer[], totalLength?: number): Buffer;
+ /**
+ * The same as buf1.compare(buf2).
+ */
+ static compare(buf1: Buffer, buf2: Buffer): number;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
+ * If parameter is omitted, buffer will be filled with zeros.
+ * @param encoding encoding used for call to buf.fill while initalizing
+ */
+ static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafeSlow(size: number): Buffer;
+}
diff --git a/node_modules/buffer/index.js b/node_modules/buffer/index.js
new file mode 100644
index 0000000..e87bfaa
--- /dev/null
+++ b/node_modules/buffer/index.js
@@ -0,0 +1,1794 @@
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh <https://feross.org>
+ * @license MIT
+ */
+/* eslint-disable no-proto */
+
+'use strict'
+
+var base64 = require('base64-js')
+var ieee754 = require('ieee754')
+var customInspectSymbol =
+ (typeof Symbol === 'function' && typeof Symbol.for === 'function')
+ ? Symbol.for('nodejs.util.inspect.custom')
+ : null
+
+exports.Buffer = Buffer
+exports.SlowBuffer = SlowBuffer
+exports.INSPECT_MAX_BYTES = 50
+
+var K_MAX_LENGTH = 0x7fffffff
+exports.kMaxLength = K_MAX_LENGTH
+
+/**
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
+ * === true Use Uint8Array implementation (fastest)
+ * === false Print warning and recommend using `buffer` v4.x which has an Object
+ * implementation (most compatible, even IE6)
+ *
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+ * Opera 11.6+, iOS 4.2+.
+ *
+ * We report that the browser does not support typed arrays if the are not subclassable
+ * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
+ * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
+ * for __proto__ and has a buggy typed array implementation.
+ */
+Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
+
+if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&
+ typeof console.error === 'function') {
+ console.error(
+ 'This browser lacks typed array (Uint8Array) support which is required by ' +
+ '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'
+ )
+}
+
+function typedArraySupport () {
+ // Can typed array instances can be augmented?
+ try {
+ var arr = new Uint8Array(1)
+ var proto = { foo: function () { return 42 } }
+ Object.setPrototypeOf(proto, Uint8Array.prototype)
+ Object.setPrototypeOf(arr, proto)
+ return arr.foo() === 42
+ } catch (e) {
+ return false
+ }
+}
+
+Object.defineProperty(Buffer.prototype, 'parent', {
+ enumerable: true,
+ get: function () {
+ if (!Buffer.isBuffer(this)) return undefined
+ return this.buffer
+ }
+})
+
+Object.defineProperty(Buffer.prototype, 'offset', {
+ enumerable: true,
+ get: function () {
+ if (!Buffer.isBuffer(this)) return undefined
+ return this.byteOffset
+ }
+})
+
+function createBuffer (length) {
+ if (length > K_MAX_LENGTH) {
+ throw new RangeError('The value "' + length + '" is invalid for option "size"')
+ }
+ // Return an augmented `Uint8Array` instance
+ var buf = new Uint8Array(length)
+ Object.setPrototypeOf(buf, Buffer.prototype)
+ return buf
+}
+
+/**
+ * The Buffer constructor returns instances of `Uint8Array` that have their
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+ * returns a single octet.
+ *
+ * The `Uint8Array` prototype remains unmodified.
+ */
+
+function Buffer (arg, encodingOrOffset, length) {
+ // Common case.
+ if (typeof arg === 'number') {
+ if (typeof encodingOrOffset === 'string') {
+ throw new TypeError(
+ 'The "string" argument must be of type string. Received type number'
+ )
+ }
+ return allocUnsafe(arg)
+ }
+ return from(arg, encodingOrOffset, length)
+}
+
+Buffer.poolSize = 8192 // not used by this implementation
+
+function from (value, encodingOrOffset, length) {
+ if (typeof value === 'string') {
+ return fromString(value, encodingOrOffset)
+ }
+
+ if (ArrayBuffer.isView(value)) {
+ return fromArrayLike(value)
+ }
+
+ if (value == null) {
+ throw new TypeError(
+ 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
+ 'or Array-like Object. Received type ' + (typeof value)
+ )
+ }
+
+ if (isInstance(value, ArrayBuffer) ||
+ (value && isInstance(value.buffer, ArrayBuffer))) {
+ return fromArrayBuffer(value, encodingOrOffset, length)
+ }
+
+ if (typeof SharedArrayBuffer !== 'undefined' &&
+ (isInstance(value, SharedArrayBuffer) ||
+ (value && isInstance(value.buffer, SharedArrayBuffer)))) {
+ return fromArrayBuffer(value, encodingOrOffset, length)
+ }
+
+ if (typeof value === 'number') {
+ throw new TypeError(
+ 'The "value" argument must not be of type number. Received type number'
+ )
+ }
+
+ var valueOf = value.valueOf && value.valueOf()
+ if (valueOf != null && valueOf !== value) {
+ return Buffer.from(valueOf, encodingOrOffset, length)
+ }
+
+ var b = fromObject(value)
+ if (b) return b
+
+ if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
+ typeof value[Symbol.toPrimitive] === 'function') {
+ return Buffer.from(
+ value[Symbol.toPrimitive]('string'), encodingOrOffset, length
+ )
+ }
+
+ throw new TypeError(
+ 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
+ 'or Array-like Object. Received type ' + (typeof value)
+ )
+}
+
+/**
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+ * if value is a number.
+ * Buffer.from(str[, encoding])
+ * Buffer.from(array)
+ * Buffer.from(buffer)
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
+ **/
+Buffer.from = function (value, encodingOrOffset, length) {
+ return from(value, encodingOrOffset, length)
+}
+
+// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
+// https://github.com/feross/buffer/pull/148
+Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)
+Object.setPrototypeOf(Buffer, Uint8Array)
+
+function assertSize (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('"size" argument must be of type number')
+ } else if (size < 0) {
+ throw new RangeError('The value "' + size + '" is invalid for option "size"')
+ }
+}
+
+function alloc (size, fill, encoding) {
+ assertSize(size)
+ if (size <= 0) {
+ return createBuffer(size)
+ }
+ if (fill !== undefined) {
+ // Only pay attention to encoding if it's a string. This
+ // prevents accidentally sending in a number that would
+ // be interpretted as a start offset.
+ return typeof encoding === 'string'
+ ? createBuffer(size).fill(fill, encoding)
+ : createBuffer(size).fill(fill)
+ }
+ return createBuffer(size)
+}
+
+/**
+ * Creates a new filled Buffer instance.
+ * alloc(size[, fill[, encoding]])
+ **/
+Buffer.alloc = function (size, fill, encoding) {
+ return alloc(size, fill, encoding)
+}
+
+function allocUnsafe (size) {
+ assertSize(size)
+ return createBuffer(size < 0 ? 0 : checked(size) | 0)
+}
+
+/**
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+ * */
+Buffer.allocUnsafe = function (size) {
+ return allocUnsafe(size)
+}
+/**
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+ */
+Buffer.allocUnsafeSlow = function (size) {
+ return allocUnsafe(size)
+}
+
+function fromString (string, encoding) {
+ if (typeof encoding !== 'string' || encoding === '') {
+ encoding = 'utf8'
+ }
+
+ if (!Buffer.isEncoding(encoding)) {
+ throw new TypeError('Unknown encoding: ' + encoding)
+ }
+
+ var length = byteLength(string, encoding) | 0
+ var buf = createBuffer(length)
+
+ var actual = buf.write(string, encoding)
+
+ if (actual !== length) {
+ // Writing a hex string, for example, that contains invalid characters will
+ // cause everything after the first invalid character to be ignored. (e.g.
+ // 'abxxcd' will be treated as 'ab')
+ buf = buf.slice(0, actual)
+ }
+
+ return buf
+}
+
+function fromArrayLike (array) {
+ var length = array.length < 0 ? 0 : checked(array.length) | 0
+ var buf = createBuffer(length)
+ for (var i = 0; i < length; i += 1) {
+ buf[i] = array[i] & 255
+ }
+ return buf
+}
+
+function fromArrayBuffer (array, byteOffset, length) {
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
+ throw new RangeError('"offset" is outside of buffer bounds')
+ }
+
+ if (array.byteLength < byteOffset + (length || 0)) {
+ throw new RangeError('"length" is outside of buffer bounds')
+ }
+
+ var buf
+ if (byteOffset === undefined && length === undefined) {
+ buf = new Uint8Array(array)
+ } else if (length === undefined) {
+ buf = new Uint8Array(array, byteOffset)
+ } else {
+ buf = new Uint8Array(array, byteOffset, length)
+ }
+
+ // Return an augmented `Uint8Array` instance
+ Object.setPrototypeOf(buf, Buffer.prototype)
+
+ return buf
+}
+
+function fromObject (obj) {
+ if (Buffer.isBuffer(obj)) {
+ var len = checked(obj.length) | 0
+ var buf = createBuffer(len)
+
+ if (buf.length === 0) {
+ return buf
+ }
+
+ obj.copy(buf, 0, 0, len)
+ return buf
+ }
+
+ if (obj.length !== undefined) {
+ if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
+ return createBuffer(0)
+ }
+ return fromArrayLike(obj)
+ }
+
+ if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
+ return fromArrayLike(obj.data)
+ }
+}
+
+function checked (length) {
+ // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
+ // length is NaN (which is otherwise coerced to zero.)
+ if (length >= K_MAX_LENGTH) {
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
+ 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
+ }
+ return length | 0
+}
+
+function SlowBuffer (length) {
+ if (+length != length) { // eslint-disable-line eqeqeq
+ length = 0
+ }
+ return Buffer.alloc(+length)
+}
+
+Buffer.isBuffer = function isBuffer (b) {
+ return b != null && b._isBuffer === true &&
+ b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false
+}
+
+Buffer.compare = function compare (a, b) {
+ if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)
+ if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+ throw new TypeError(
+ 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
+ )
+ }
+
+ if (a === b) return 0
+
+ var x = a.length
+ var y = b.length
+
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
+ if (a[i] !== b[i]) {
+ x = a[i]
+ y = b[i]
+ break
+ }
+ }
+
+ if (x < y) return -1
+ if (y < x) return 1
+ return 0
+}
+
+Buffer.isEncoding = function isEncoding (encoding) {
+ switch (String(encoding).toLowerCase()) {
+ case 'hex':
+ case 'utf8':
+ case 'utf-8':
+ case 'ascii':
+ case 'latin1':
+ case 'binary':
+ case 'base64':
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return true
+ default:
+ return false
+ }
+}
+
+Buffer.concat = function concat (list, length) {
+ if (!Array.isArray(list)) {
+ throw new TypeError('"list" argument must be an Array of Buffers')
+ }
+
+ if (list.length === 0) {
+ return Buffer.alloc(0)
+ }
+
+ var i
+ if (length === undefined) {
+ length = 0
+ for (i = 0; i < list.length; ++i) {
+ length += list[i].length
+ }
+ }
+
+ var buffer = Buffer.allocUnsafe(length)
+ var pos = 0
+ for (i = 0; i < list.length; ++i) {
+ var buf = list[i]
+ if (isInstance(buf, Uint8Array)) {
+ buf = Buffer.from(buf)
+ }
+ if (!Buffer.isBuffer(buf)) {
+ throw new TypeError('"list" argument must be an Array of Buffers')
+ }
+ buf.copy(buffer, pos)
+ pos += buf.length
+ }
+ return buffer
+}
+
+function byteLength (string, encoding) {
+ if (Buffer.isBuffer(string)) {
+ return string.length
+ }
+ if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
+ return string.byteLength
+ }
+ if (typeof string !== 'string') {
+ throw new TypeError(
+ 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
+ 'Received type ' + typeof string
+ )
+ }
+
+ var len = string.length
+ var mustMatch = (arguments.length > 2 && arguments[2] === true)
+ if (!mustMatch && len === 0) return 0
+
+ // Use a for loop to avoid recursion
+ var loweredCase = false
+ for (;;) {
+ switch (encoding) {
+ case 'ascii':
+ case 'latin1':
+ case 'binary':
+ return len
+ case 'utf8':
+ case 'utf-8':
+ return utf8ToBytes(string).length
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return len * 2
+ case 'hex':
+ return len >>> 1
+ case 'base64':
+ return base64ToBytes(string).length
+ default:
+ if (loweredCase) {
+ return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8
+ }
+ encoding = ('' + encoding).toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+Buffer.byteLength = byteLength
+
+function slowToString (encoding, start, end) {
+ var loweredCase = false
+
+ // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
+ // property of a typed array.
+
+ // This behaves neither like String nor Uint8Array in that we set start/end
+ // to their upper/lower bounds if the value passed is out of range.
+ // undefined is handled specially as per ECMA-262 6th Edition,
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
+ if (start === undefined || start < 0) {
+ start = 0
+ }
+ // Return early if start > this.length. Done here to prevent potential uint32
+ // coercion fail below.
+ if (start > this.length) {
+ return ''
+ }
+
+ if (end === undefined || end > this.length) {
+ end = this.length
+ }
+
+ if (end <= 0) {
+ return ''
+ }
+
+ // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
+ end >>>= 0
+ start >>>= 0
+
+ if (end <= start) {
+ return ''
+ }
+
+ if (!encoding) encoding = 'utf8'
+
+ while (true) {
+ switch (encoding) {
+ case 'hex':
+ return hexSlice(this, start, end)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Slice(this, start, end)
+
+ case 'ascii':
+ return asciiSlice(this, start, end)
+
+ case 'latin1':
+ case 'binary':
+ return latin1Slice(this, start, end)
+
+ case 'base64':
+ return base64Slice(this, start, end)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return utf16leSlice(this, start, end)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = (encoding + '').toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
+// to detect a Buffer instance. It's not possible to use `instanceof Buffer`
+// reliably in a browserify context because there could be multiple different
+// copies of the 'buffer' package in use. This method works even for Buffer
+// instances that were created from another copy of the `buffer` package.
+// See: https://github.com/feross/buffer/issues/154
+Buffer.prototype._isBuffer = true
+
+function swap (b, n, m) {
+ var i = b[n]
+ b[n] = b[m]
+ b[m] = i
+}
+
+Buffer.prototype.swap16 = function swap16 () {
+ var len = this.length
+ if (len % 2 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 16-bits')
+ }
+ for (var i = 0; i < len; i += 2) {
+ swap(this, i, i + 1)
+ }
+ return this
+}
+
+Buffer.prototype.swap32 = function swap32 () {
+ var len = this.length
+ if (len % 4 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 32-bits')
+ }
+ for (var i = 0; i < len; i += 4) {
+ swap(this, i, i + 3)
+ swap(this, i + 1, i + 2)
+ }
+ return this
+}
+
+Buffer.prototype.swap64 = function swap64 () {
+ var len = this.length
+ if (len % 8 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 64-bits')
+ }
+ for (var i = 0; i < len; i += 8) {
+ swap(this, i, i + 7)
+ swap(this, i + 1, i + 6)
+ swap(this, i + 2, i + 5)
+ swap(this, i + 3, i + 4)
+ }
+ return this
+}
+
+Buffer.prototype.toString = function toString () {
+ var length = this.length
+ if (length === 0) return ''
+ if (arguments.length === 0) return utf8Slice(this, 0, length)
+ return slowToString.apply(this, arguments)
+}
+
+Buffer.prototype.toLocaleString = Buffer.prototype.toString
+
+Buffer.prototype.equals = function equals (b) {
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
+ if (this === b) return true
+ return Buffer.compare(this, b) === 0
+}
+
+Buffer.prototype.inspect = function inspect () {
+ var str = ''
+ var max = exports.INSPECT_MAX_BYTES
+ str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()
+ if (this.length > max) str += ' ... '
+ return '<Buffer ' + str + '>'
+}
+if (customInspectSymbol) {
+ Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect
+}
+
+Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
+ if (isInstance(target, Uint8Array)) {
+ target = Buffer.from(target, target.offset, target.byteLength)
+ }
+ if (!Buffer.isBuffer(target)) {
+ throw new TypeError(
+ 'The "target" argument must be one of type Buffer or Uint8Array. ' +
+ 'Received type ' + (typeof target)
+ )
+ }
+
+ if (start === undefined) {
+ start = 0
+ }
+ if (end === undefined) {
+ end = target ? target.length : 0
+ }
+ if (thisStart === undefined) {
+ thisStart = 0
+ }
+ if (thisEnd === undefined) {
+ thisEnd = this.length
+ }
+
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
+ throw new RangeError('out of range index')
+ }
+
+ if (thisStart >= thisEnd && start >= end) {
+ return 0
+ }
+ if (thisStart >= thisEnd) {
+ return -1
+ }
+ if (start >= end) {
+ return 1
+ }
+
+ start >>>= 0
+ end >>>= 0
+ thisStart >>>= 0
+ thisEnd >>>= 0
+
+ if (this === target) return 0
+
+ var x = thisEnd - thisStart
+ var y = end - start
+ var len = Math.min(x, y)
+
+ var thisCopy = this.slice(thisStart, thisEnd)
+ var targetCopy = target.slice(start, end)
+
+ for (var i = 0; i < len; ++i) {
+ if (thisCopy[i] !== targetCopy[i]) {
+ x = thisCopy[i]
+ y = targetCopy[i]
+ break
+ }
+ }
+
+ if (x < y) return -1
+ if (y < x) return 1
+ return 0
+}
+
+// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+//
+// Arguments:
+// - buffer - a Buffer to search
+// - val - a string, Buffer, or number
+// - byteOffset - an index into `buffer`; will be clamped to an int32
+// - encoding - an optional encoding, relevant is val is a string
+// - dir - true for indexOf, false for lastIndexOf
+function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
+ // Empty buffer means no match
+ if (buffer.length === 0) return -1
+
+ // Normalize byteOffset
+ if (typeof byteOffset === 'string') {
+ encoding = byteOffset
+ byteOffset = 0
+ } else if (byteOffset > 0x7fffffff) {
+ byteOffset = 0x7fffffff
+ } else if (byteOffset < -0x80000000) {
+ byteOffset = -0x80000000
+ }
+ byteOffset = +byteOffset // Coerce to Number.
+ if (numberIsNaN(byteOffset)) {
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+ byteOffset = dir ? 0 : (buffer.length - 1)
+ }
+
+ // Normalize byteOffset: negative offsets start from the end of the buffer
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset
+ if (byteOffset >= buffer.length) {
+ if (dir) return -1
+ else byteOffset = buffer.length - 1
+ } else if (byteOffset < 0) {
+ if (dir) byteOffset = 0
+ else return -1
+ }
+
+ // Normalize val
+ if (typeof val === 'string') {
+ val = Buffer.from(val, encoding)
+ }
+
+ // Finally, search either indexOf (if dir is true) or lastIndexOf
+ if (Buffer.isBuffer(val)) {
+ // Special case: looking for empty string/buffer always fails
+ if (val.length === 0) {
+ return -1
+ }
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
+ } else if (typeof val === 'number') {
+ val = val & 0xFF // Search for a byte value [0-255]
+ if (typeof Uint8Array.prototype.indexOf === 'function') {
+ if (dir) {
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
+ } else {
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
+ }
+ }
+ return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)
+ }
+
+ throw new TypeError('val must be string, number or Buffer')
+}
+
+function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
+ var indexSize = 1
+ var arrLength = arr.length
+ var valLength = val.length
+
+ if (encoding !== undefined) {
+ encoding = String(encoding).toLowerCase()
+ if (encoding === 'ucs2' || encoding === 'ucs-2' ||
+ encoding === 'utf16le' || encoding === 'utf-16le') {
+ if (arr.length < 2 || val.length < 2) {
+ return -1
+ }
+ indexSize = 2
+ arrLength /= 2
+ valLength /= 2
+ byteOffset /= 2
+ }
+ }
+
+ function read (buf, i) {
+ if (indexSize === 1) {
+ return buf[i]
+ } else {
+ return buf.readUInt16BE(i * indexSize)
+ }
+ }
+
+ var i
+ if (dir) {
+ var foundIndex = -1
+ for (i = byteOffset; i < arrLength; i++) {
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+ if (foundIndex === -1) foundIndex = i
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
+ } else {
+ if (foundIndex !== -1) i -= i - foundIndex
+ foundIndex = -1
+ }
+ }
+ } else {
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
+ for (i = byteOffset; i >= 0; i--) {
+ var found = true
+ for (var j = 0; j < valLength; j++) {
+ if (read(arr, i + j) !== read(val, j)) {
+ found = false
+ break
+ }
+ }
+ if (found) return i
+ }
+ }
+
+ return -1
+}
+
+Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
+ return this.indexOf(val, byteOffset, encoding) !== -1
+}
+
+Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
+}
+
+Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
+}
+
+function hexWrite (buf, string, offset, length) {
+ offset = Number(offset) || 0
+ var remaining = buf.length - offset
+ if (!length) {
+ length = remaining
+ } else {
+ length = Number(length)
+ if (length > remaining) {
+ length = remaining
+ }
+ }
+
+ var strLen = string.length
+
+ if (length > strLen / 2) {
+ length = strLen / 2
+ }
+ for (var i = 0; i < length; ++i) {
+ var parsed = parseInt(string.substr(i * 2, 2), 16)
+ if (numberIsNaN(parsed)) return i
+ buf[offset + i] = parsed
+ }
+ return i
+}
+
+function utf8Write (buf, string, offset, length) {
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+function asciiWrite (buf, string, offset, length) {
+ return blitBuffer(asciiToBytes(string), buf, offset, length)
+}
+
+function latin1Write (buf, string, offset, length) {
+ return asciiWrite(buf, string, offset, length)
+}
+
+function base64Write (buf, string, offset, length) {
+ return blitBuffer(base64ToBytes(string), buf, offset, length)
+}
+
+function ucs2Write (buf, string, offset, length) {
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+Buffer.prototype.write = function write (string, offset, length, encoding) {
+ // Buffer#write(string)
+ if (offset === undefined) {
+ encoding = 'utf8'
+ length = this.length
+ offset = 0
+ // Buffer#write(string, encoding)
+ } else if (length === undefined && typeof offset === 'string') {
+ encoding = offset
+ length = this.length
+ offset = 0
+ // Buffer#write(string, offset[, length][, encoding])
+ } else if (isFinite(offset)) {
+ offset = offset >>> 0
+ if (isFinite(length)) {
+ length = length >>> 0
+ if (encoding === undefined) encoding = 'utf8'
+ } else {
+ encoding = length
+ length = undefined
+ }
+ } else {
+ throw new Error(
+ 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
+ )
+ }
+
+ var remaining = this.length - offset
+ if (length === undefined || length > remaining) length = remaining
+
+ if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
+ throw new RangeError('Attempt to write outside buffer bounds')
+ }
+
+ if (!encoding) encoding = 'utf8'
+
+ var loweredCase = false
+ for (;;) {
+ switch (encoding) {
+ case 'hex':
+ return hexWrite(this, string, offset, length)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Write(this, string, offset, length)
+
+ case 'ascii':
+ return asciiWrite(this, string, offset, length)
+
+ case 'latin1':
+ case 'binary':
+ return latin1Write(this, string, offset, length)
+
+ case 'base64':
+ // Warning: maxLength not taken into account in base64Write
+ return base64Write(this, string, offset, length)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return ucs2Write(this, string, offset, length)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = ('' + encoding).toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+Buffer.prototype.toJSON = function toJSON () {
+ return {
+ type: 'Buffer',
+ data: Array.prototype.slice.call(this._arr || this, 0)
+ }
+}
+
+function base64Slice (buf, start, end) {
+ if (start === 0 && end === buf.length) {
+ return base64.fromByteArray(buf)
+ } else {
+ return base64.fromByteArray(buf.slice(start, end))
+ }
+}
+
+function utf8Slice (buf, start, end) {
+ end = Math.min(buf.length, end)
+ var res = []
+
+ var i = start
+ while (i < end) {
+ var firstByte = buf[i]
+ var codePoint = null
+ var bytesPerSequence = (firstByte > 0xEF) ? 4
+ : (firstByte > 0xDF) ? 3
+ : (firstByte > 0xBF) ? 2
+ : 1
+
+ if (i + bytesPerSequence <= end) {
+ var secondByte, thirdByte, fourthByte, tempCodePoint
+
+ switch (bytesPerSequence) {
+ case 1:
+ if (firstByte < 0x80) {
+ codePoint = firstByte
+ }
+ break
+ case 2:
+ secondByte = buf[i + 1]
+ if ((secondByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
+ if (tempCodePoint > 0x7F) {
+ codePoint = tempCodePoint
+ }
+ }
+ break
+ case 3:
+ secondByte = buf[i + 1]
+ thirdByte = buf[i + 2]
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
+ codePoint = tempCodePoint
+ }
+ }
+ break
+ case 4:
+ secondByte = buf[i + 1]
+ thirdByte = buf[i + 2]
+ fourthByte = buf[i + 3]
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
+ tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
+ codePoint = tempCodePoint
+ }
+ }
+ }
+ }
+
+ if (codePoint === null) {
+ // we did not generate a valid codePoint so insert a
+ // replacement char (U+FFFD) and advance only 1 byte
+ codePoint = 0xFFFD
+ bytesPerSequence = 1
+ } else if (codePoint > 0xFFFF) {
+ // encode to utf16 (surrogate pair dance)
+ codePoint -= 0x10000
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800)
+ codePoint = 0xDC00 | codePoint & 0x3FF
+ }
+
+ res.push(codePoint)
+ i += bytesPerSequence
+ }
+
+ return decodeCodePointsArray(res)
+}
+
+// Based on http://stackoverflow.com/a/22747272/680742, the browser with
+// the lowest limit is Chrome, with 0x10000 args.
+// We go 1 magnitude less, for safety
+var MAX_ARGUMENTS_LENGTH = 0x1000
+
+function decodeCodePointsArray (codePoints) {
+ var len = codePoints.length
+ if (len <= MAX_ARGUMENTS_LENGTH) {
+ return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
+ }
+
+ // Decode in chunks to avoid "call stack size exceeded".
+ var res = ''
+ var i = 0
+ while (i < len) {
+ res += String.fromCharCode.apply(
+ String,
+ codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
+ )
+ }
+ return res
+}
+
+function asciiSlice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i] & 0x7F)
+ }
+ return ret
+}
+
+function latin1Slice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; ++i) {
+ ret += String.fromCharCode(buf[i])
+ }
+ return ret
+}
+
+function hexSlice (buf, start, end) {
+ var len = buf.length
+
+ if (!start || start < 0) start = 0
+ if (!end || end < 0 || end > len) end = len
+
+ var out = ''
+ for (var i = start; i < end; ++i) {
+ out += hexSliceLookupTable[buf[i]]
+ }
+ return out
+}
+
+function utf16leSlice (buf, start, end) {
+ var bytes = buf.slice(start, end)
+ var res = ''
+ for (var i = 0; i < bytes.length; i += 2) {
+ res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))
+ }
+ return res
+}
+
+Buffer.prototype.slice = function slice (start, end) {
+ var len = this.length
+ start = ~~start
+ end = end === undefined ? len : ~~end
+
+ if (start < 0) {
+ start += len
+ if (start < 0) start = 0
+ } else if (start > len) {
+ start = len
+ }
+
+ if (end < 0) {
+ end += len
+ if (end < 0) end = 0
+ } else if (end > len) {
+ end = len
+ }
+
+ if (end < start) end = start
+
+ var newBuf = this.subarray(start, end)
+ // Return an augmented `Uint8Array` instance
+ Object.setPrototypeOf(newBuf, Buffer.prototype)
+
+ return newBuf
+}
+
+/*
+ * Need to make sure that buffer isn't trying to write out of bounds.
+ */
+function checkOffset (offset, ext, length) {
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
+}
+
+Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) {
+ checkOffset(offset, byteLength, this.length)
+ }
+
+ var val = this[offset + --byteLength]
+ var mul = 1
+ while (byteLength > 0 && (mul *= 0x100)) {
+ val += this[offset + --byteLength] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ return this[offset]
+}
+
+Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return this[offset] | (this[offset + 1] << 8)
+}
+
+Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return (this[offset] << 8) | this[offset + 1]
+}
+
+Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return ((this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16)) +
+ (this[offset + 3] * 0x1000000)
+}
+
+Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] * 0x1000000) +
+ ((this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ this[offset + 3])
+}
+
+Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+}
+
+Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var i = byteLength
+ var mul = 1
+ var val = this[offset + --i]
+ while (i > 0 && (mul *= 0x100)) {
+ val += this[offset + --i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+}
+
+Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ if (!(this[offset] & 0x80)) return (this[offset])
+ return ((0xff - this[offset] + 1) * -1)
+}
+
+Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset] | (this[offset + 1] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset + 1] | (this[offset] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16) |
+ (this[offset + 3] << 24)
+}
+
+Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] << 24) |
+ (this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ (this[offset + 3])
+}
+
+Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, true, 23, 4)
+}
+
+Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, false, 23, 4)
+}
+
+Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, true, 52, 8)
+}
+
+Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
+ offset = offset >>> 0
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, false, 52, 8)
+}
+
+function checkInt (buf, value, offset, ext, max, min) {
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
+}
+
+Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) {
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
+ }
+
+ var mul = 1
+ var i = 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ byteLength = byteLength >>> 0
+ if (!noAssert) {
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
+ }
+
+ var i = byteLength - 1
+ var mul = 1
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
+ this[offset] = (value & 0xff)
+ return offset + 1
+}
+
+Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ return offset + 2
+}
+
+Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ this[offset] = (value >>> 8)
+ this[offset + 1] = (value & 0xff)
+ return offset + 2
+}
+
+Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ this[offset + 3] = (value >>> 24)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 1] = (value >>> 8)
+ this[offset] = (value & 0xff)
+ return offset + 4
+}
+
+Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = (value & 0xff)
+ return offset + 4
+}
+
+Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) {
+ var limit = Math.pow(2, (8 * byteLength) - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = 0
+ var mul = 1
+ var sub = 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
+ sub = 1
+ }
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) {
+ var limit = Math.pow(2, (8 * byteLength) - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = byteLength - 1
+ var mul = 1
+ var sub = 0
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
+ sub = 1
+ }
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
+ if (value < 0) value = 0xff + value + 1
+ this[offset] = (value & 0xff)
+ return offset + 1
+}
+
+Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ return offset + 2
+}
+
+Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ this[offset] = (value >>> 8)
+ this[offset + 1] = (value & 0xff)
+ return offset + 2
+}
+
+Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ this[offset] = (value & 0xff)
+ this[offset + 1] = (value >>> 8)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 3] = (value >>> 24)
+ return offset + 4
+}
+
+Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ if (value < 0) value = 0xffffffff + value + 1
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = (value & 0xff)
+ return offset + 4
+}
+
+function checkIEEE754 (buf, value, offset, ext, max, min) {
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
+ if (offset < 0) throw new RangeError('Index out of range')
+}
+
+function writeFloat (buf, value, offset, littleEndian, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 23, 4)
+ return offset + 4
+}
+
+Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, false, noAssert)
+}
+
+function writeDouble (buf, value, offset, littleEndian, noAssert) {
+ value = +value
+ offset = offset >>> 0
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 52, 8)
+ return offset + 8
+}
+
+Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, false, noAssert)
+}
+
+// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+Buffer.prototype.copy = function copy (target, targetStart, start, end) {
+ if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')
+ if (!start) start = 0
+ if (!end && end !== 0) end = this.length
+ if (targetStart >= target.length) targetStart = target.length
+ if (!targetStart) targetStart = 0
+ if (end > 0 && end < start) end = start
+
+ // Copy 0 bytes; we're done
+ if (end === start) return 0
+ if (target.length === 0 || this.length === 0) return 0
+
+ // Fatal error conditions
+ if (targetStart < 0) {
+ throw new RangeError('targetStart out of bounds')
+ }
+ if (start < 0 || start >= this.length) throw new RangeError('Index out of range')
+ if (end < 0) throw new RangeError('sourceEnd out of bounds')
+
+ // Are we oob?
+ if (end > this.length) end = this.length
+ if (target.length - targetStart < end - start) {
+ end = target.length - targetStart + start
+ }
+
+ var len = end - start
+
+ if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
+ // Use built-in when available, missing from IE11
+ this.copyWithin(targetStart, start, end)
+ } else if (this === target && start < targetStart && targetStart < end) {
+ // descending copy from end
+ for (var i = len - 1; i >= 0; --i) {
+ target[i + targetStart] = this[i + start]
+ }
+ } else {
+ Uint8Array.prototype.set.call(
+ target,
+ this.subarray(start, end),
+ targetStart
+ )
+ }
+
+ return len
+}
+
+// Usage:
+// buffer.fill(number[, offset[, end]])
+// buffer.fill(buffer[, offset[, end]])
+// buffer.fill(string[, offset[, end]][, encoding])
+Buffer.prototype.fill = function fill (val, start, end, encoding) {
+ // Handle string cases:
+ if (typeof val === 'string') {
+ if (typeof start === 'string') {
+ encoding = start
+ start = 0
+ end = this.length
+ } else if (typeof end === 'string') {
+ encoding = end
+ end = this.length
+ }
+ if (encoding !== undefined && typeof encoding !== 'string') {
+ throw new TypeError('encoding must be a string')
+ }
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
+ throw new TypeError('Unknown encoding: ' + encoding)
+ }
+ if (val.length === 1) {
+ var code = val.charCodeAt(0)
+ if ((encoding === 'utf8' && code < 128) ||
+ encoding === 'latin1') {
+ // Fast path: If `val` fits into a single byte, use that numeric value.
+ val = code
+ }
+ }
+ } else if (typeof val === 'number') {
+ val = val & 255
+ } else if (typeof val === 'boolean') {
+ val = Number(val)
+ }
+
+ // Invalid ranges are not set to a default, so can range check early.
+ if (start < 0 || this.length < start || this.length < end) {
+ throw new RangeError('Out of range index')
+ }
+
+ if (end <= start) {
+ return this
+ }
+
+ start = start >>> 0
+ end = end === undefined ? this.length : end >>> 0
+
+ if (!val) val = 0
+
+ var i
+ if (typeof val === 'number') {
+ for (i = start; i < end; ++i) {
+ this[i] = val
+ }
+ } else {
+ var bytes = Buffer.isBuffer(val)
+ ? val
+ : Buffer.from(val, encoding)
+ var len = bytes.length
+ if (len === 0) {
+ throw new TypeError('The value "' + val +
+ '" is invalid for argument "value"')
+ }
+ for (i = 0; i < end - start; ++i) {
+ this[i + start] = bytes[i % len]
+ }
+ }
+
+ return this
+}
+
+// HELPER FUNCTIONS
+// ================
+
+var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
+
+function base64clean (str) {
+ // Node takes equal signs as end of the Base64 encoding
+ str = str.split('=')[0]
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
+ str = str.trim().replace(INVALID_BASE64_RE, '')
+ // Node converts strings with length < 2 to ''
+ if (str.length < 2) return ''
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+ while (str.length % 4 !== 0) {
+ str = str + '='
+ }
+ return str
+}
+
+function utf8ToBytes (string, units) {
+ units = units || Infinity
+ var codePoint
+ var length = string.length
+ var leadSurrogate = null
+ var bytes = []
+
+ for (var i = 0; i < length; ++i) {
+ codePoint = string.charCodeAt(i)
+
+ // is surrogate component
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
+ // last char was a lead
+ if (!leadSurrogate) {
+ // no lead yet
+ if (codePoint > 0xDBFF) {
+ // unexpected trail
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ } else if (i + 1 === length) {
+ // unpaired lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ }
+
+ // valid lead
+ leadSurrogate = codePoint
+
+ continue
+ }
+
+ // 2 leads in a row
+ if (codePoint < 0xDC00) {
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ leadSurrogate = codePoint
+ continue
+ }
+
+ // valid surrogate pair
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
+ } else if (leadSurrogate) {
+ // valid bmp char, but last char was a lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ }
+
+ leadSurrogate = null
+
+ // encode utf8
+ if (codePoint < 0x80) {
+ if ((units -= 1) < 0) break
+ bytes.push(codePoint)
+ } else if (codePoint < 0x800) {
+ if ((units -= 2) < 0) break
+ bytes.push(
+ codePoint >> 0x6 | 0xC0,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x10000) {
+ if ((units -= 3) < 0) break
+ bytes.push(
+ codePoint >> 0xC | 0xE0,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x110000) {
+ if ((units -= 4) < 0) break
+ bytes.push(
+ codePoint >> 0x12 | 0xF0,
+ codePoint >> 0xC & 0x3F | 0x80,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else {
+ throw new Error('Invalid code point')
+ }
+ }
+
+ return bytes
+}
+
+function asciiToBytes (str) {
+ var byteArray = []
+ for (var i = 0; i < str.length; ++i) {
+ // Node's code seems to be doing this and not & 0x7F..
+ byteArray.push(str.charCodeAt(i) & 0xFF)
+ }
+ return byteArray
+}
+
+function utf16leToBytes (str, units) {
+ var c, hi, lo
+ var byteArray = []
+ for (var i = 0; i < str.length; ++i) {
+ if ((units -= 2) < 0) break
+
+ c = str.charCodeAt(i)
+ hi = c >> 8
+ lo = c % 256
+ byteArray.push(lo)
+ byteArray.push(hi)
+ }
+
+ return byteArray
+}
+
+function base64ToBytes (str) {
+ return base64.toByteArray(base64clean(str))
+}
+
+function blitBuffer (src, dst, offset, length) {
+ for (var i = 0; i < length; ++i) {
+ if ((i + offset >= dst.length) || (i >= src.length)) break
+ dst[i + offset] = src[i]
+ }
+ return i
+}
+
+// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
+// the `instanceof` check but they should be treated as of that type.
+// See: https://github.com/feross/buffer/issues/166
+function isInstance (obj, type) {
+ return obj instanceof type ||
+ (obj != null && obj.constructor != null && obj.constructor.name != null &&
+ obj.constructor.name === type.name)
+}
+function numberIsNaN (obj) {
+ // For IE11 support
+ return obj !== obj // eslint-disable-line no-self-compare
+}
+
+// Create lookup table for `toString('hex')`
+// See: https://github.com/feross/buffer/issues/219
+var hexSliceLookupTable = (function () {
+ var alphabet = '0123456789abcdef'
+ var table = new Array(256)
+ for (var i = 0; i < 16; ++i) {
+ var i16 = i * 16
+ for (var j = 0; j < 16; ++j) {
+ table[i16 + j] = alphabet[i] + alphabet[j]
+ }
+ }
+ return table
+})()
diff --git a/node_modules/buffer/package.json b/node_modules/buffer/package.json
new file mode 100644
index 0000000..01019dc
--- /dev/null
+++ b/node_modules/buffer/package.json
@@ -0,0 +1,116 @@
+{
+ "_args": [
+ [
+ "buffer@5.6.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "buffer@5.6.0",
+ "_id": "buffer@5.6.0",
+ "_inBundle": false,
+ "_integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
+ "_location": "/buffer",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "buffer@5.6.0",
+ "name": "buffer",
+ "escapedName": "buffer",
+ "rawSpec": "5.6.0",
+ "saveSpec": null,
+ "fetchSpec": "5.6.0"
+ },
+ "_requiredBy": [
+ "/bl"
+ ],
+ "_resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
+ "_spec": "5.6.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "http://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/buffer/issues"
+ },
+ "contributors": [
+ {
+ "name": "Romain Beauxis",
+ "email": "toots@rastageeks.org"
+ },
+ {
+ "name": "James Halliday",
+ "email": "mail@substack.net"
+ }
+ ],
+ "dependencies": {
+ "base64-js": "^1.0.2",
+ "ieee754": "^1.1.4"
+ },
+ "description": "Node.js Buffer API, for the browser",
+ "devDependencies": {
+ "airtap": "^3.0.0",
+ "benchmark": "^2.0.0",
+ "browserify": "^16.1.0",
+ "concat-stream": "^2.0.0",
+ "hyperquest": "^2.0.0",
+ "is-buffer": "^2.0.0",
+ "is-nan": "^1.0.1",
+ "split": "^1.0.0",
+ "standard": "*",
+ "tape": "^4.0.0",
+ "through2": "^3.0.1",
+ "uglify-js": "^3.4.5"
+ },
+ "homepage": "https://github.com/feross/buffer",
+ "jspm": {
+ "map": {
+ "./index.js": {
+ "node": "@node/buffer"
+ }
+ }
+ },
+ "keywords": [
+ "arraybuffer",
+ "browser",
+ "browserify",
+ "buffer",
+ "compatible",
+ "dataview",
+ "uint8array"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "buffer",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/buffer.git"
+ },
+ "scripts": {
+ "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html",
+ "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js",
+ "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c",
+ "test": "standard && node ./bin/test.js",
+ "test-browser-es5": "airtap -- test/*.js",
+ "test-browser-es5-local": "airtap --local -- test/*.js",
+ "test-browser-es6": "airtap -- test/*.js test/node/*.js",
+ "test-browser-es6-local": "airtap --local -- test/*.js test/node/*.js",
+ "test-node": "tape test/*.js test/node/*.js",
+ "update-authors": "./bin/update-authors.sh"
+ },
+ "standard": {
+ "ignore": [
+ "test/node/**/*.js",
+ "test/common.js",
+ "test/_polyfill.js",
+ "perf/**/*.js"
+ ],
+ "globals": [
+ "SharedArrayBuffer"
+ ]
+ },
+ "types": "index.d.ts",
+ "version": "5.6.0"
+}
diff --git a/node_modules/chalk/index.d.ts b/node_modules/chalk/index.d.ts
new file mode 100644
index 0000000..9cd88f3
--- /dev/null
+++ b/node_modules/chalk/index.d.ts
@@ -0,0 +1,415 @@
+/**
+Basic foreground colors.
+
+[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
+*/
+declare type ForegroundColor =
+ | 'black'
+ | 'red'
+ | 'green'
+ | 'yellow'
+ | 'blue'
+ | 'magenta'
+ | 'cyan'
+ | 'white'
+ | 'gray'
+ | 'grey'
+ | 'blackBright'
+ | 'redBright'
+ | 'greenBright'
+ | 'yellowBright'
+ | 'blueBright'
+ | 'magentaBright'
+ | 'cyanBright'
+ | 'whiteBright';
+
+/**
+Basic background colors.
+
+[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
+*/
+declare type BackgroundColor =
+ | 'bgBlack'
+ | 'bgRed'
+ | 'bgGreen'
+ | 'bgYellow'
+ | 'bgBlue'
+ | 'bgMagenta'
+ | 'bgCyan'
+ | 'bgWhite'
+ | 'bgGray'
+ | 'bgGrey'
+ | 'bgBlackBright'
+ | 'bgRedBright'
+ | 'bgGreenBright'
+ | 'bgYellowBright'
+ | 'bgBlueBright'
+ | 'bgMagentaBright'
+ | 'bgCyanBright'
+ | 'bgWhiteBright';
+
+/**
+Basic colors.
+
+[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
+*/
+declare type Color = ForegroundColor | BackgroundColor;
+
+declare type Modifiers =
+ | 'reset'
+ | 'bold'
+ | 'dim'
+ | 'italic'
+ | 'underline'
+ | 'inverse'
+ | 'hidden'
+ | 'strikethrough'
+ | 'visible';
+
+declare namespace chalk {
+ /**
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ type Level = 0 | 1 | 2 | 3;
+
+ interface Options {
+ /**
+ Specify the color support for Chalk.
+
+ By default, color support is automatically detected based on the environment.
+
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ level?: Level;
+ }
+
+ /**
+ Return a new Chalk instance.
+ */
+ type Instance = new (options?: Options) => Chalk;
+
+ /**
+ Detect whether the terminal supports color.
+ */
+ interface ColorSupport {
+ /**
+ The color level used by Chalk.
+ */
+ level: Level;
+
+ /**
+ Return whether Chalk supports basic 16 colors.
+ */
+ hasBasic: boolean;
+
+ /**
+ Return whether Chalk supports ANSI 256 colors.
+ */
+ has256: boolean;
+
+ /**
+ Return whether Chalk supports Truecolor 16 million colors.
+ */
+ has16m: boolean;
+ }
+
+ interface ChalkFunction {
+ /**
+ Use a template string.
+
+ @remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341))
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ log(chalk`
+ CPU: {red ${cpu.totalPercent}%}
+ RAM: {green ${ram.used / ram.total * 100}%}
+ DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
+ `);
+ ```
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ log(chalk.red.bgBlack`2 + 3 = {bold ${2 + 3}}`)
+ ```
+ */
+ (text: TemplateStringsArray, ...placeholders: unknown[]): string;
+
+ (...text: unknown[]): string;
+ }
+
+ interface Chalk extends ChalkFunction {
+ /**
+ Return a new Chalk instance.
+ */
+ Instance: Instance;
+
+ /**
+ The color support for Chalk.
+
+ By default, color support is automatically detected based on the environment.
+
+ Levels:
+ - `0` - All colors disabled.
+ - `1` - Basic 16 colors support.
+ - `2` - ANSI 256 colors support.
+ - `3` - Truecolor 16 million colors support.
+ */
+ level: Level;
+
+ /**
+ Use HEX value to set text color.
+
+ @param color - Hexadecimal value representing the desired color.
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ chalk.hex('#DEADED');
+ ```
+ */
+ hex(color: string): Chalk;
+
+ /**
+ Use keyword color value to set text color.
+
+ @param color - Keyword value representing the desired color.
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ chalk.keyword('orange');
+ ```
+ */
+ keyword(color: string): Chalk;
+
+ /**
+ Use RGB values to set text color.
+ */
+ rgb(red: number, green: number, blue: number): Chalk;
+
+ /**
+ Use HSL values to set text color.
+ */
+ hsl(hue: number, saturation: number, lightness: number): Chalk;
+
+ /**
+ Use HSV values to set text color.
+ */
+ hsv(hue: number, saturation: number, value: number): Chalk;
+
+ /**
+ Use HWB values to set text color.
+ */
+ hwb(hue: number, whiteness: number, blackness: number): Chalk;
+
+ /**
+ Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color.
+
+ 30 <= code && code < 38 || 90 <= code && code < 98
+ For example, 31 for red, 91 for redBright.
+ */
+ ansi(code: number): Chalk;
+
+ /**
+ Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
+ */
+ ansi256(index: number): Chalk;
+
+ /**
+ Use HEX value to set background color.
+
+ @param color - Hexadecimal value representing the desired color.
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ chalk.bgHex('#DEADED');
+ ```
+ */
+ bgHex(color: string): Chalk;
+
+ /**
+ Use keyword color value to set background color.
+
+ @param color - Keyword value representing the desired color.
+
+ @example
+ ```
+ import chalk = require('chalk');
+
+ chalk.bgKeyword('orange');
+ ```
+ */
+ bgKeyword(color: string): Chalk;
+
+ /**
+ Use RGB values to set background color.
+ */
+ bgRgb(red: number, green: number, blue: number): Chalk;
+
+ /**
+ Use HSL values to set background color.
+ */
+ bgHsl(hue: number, saturation: number, lightness: number): Chalk;
+
+ /**
+ Use HSV values to set background color.
+ */
+ bgHsv(hue: number, saturation: number, value: number): Chalk;
+
+ /**
+ Use HWB values to set background color.
+ */
+ bgHwb(hue: number, whiteness: number, blackness: number): Chalk;
+
+ /**
+ Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color.
+
+ 30 <= code && code < 38 || 90 <= code && code < 98
+ For example, 31 for red, 91 for redBright.
+ Use the foreground code, not the background code (for example, not 41, nor 101).
+ */
+ bgAnsi(code: number): Chalk;
+
+ /**
+ Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
+ */
+ bgAnsi256(index: number): Chalk;
+
+ /**
+ Modifier: Resets the current color chain.
+ */
+ readonly reset: Chalk;
+
+ /**
+ Modifier: Make text bold.
+ */
+ readonly bold: Chalk;
+
+ /**
+ Modifier: Emitting only a small amount of light.
+ */
+ readonly dim: Chalk;
+
+ /**
+ Modifier: Make text italic. (Not widely supported)
+ */
+ readonly italic: Chalk;
+
+ /**
+ Modifier: Make text underline. (Not widely supported)
+ */
+ readonly underline: Chalk;
+
+ /**
+ Modifier: Inverse background and foreground colors.
+ */
+ readonly inverse: Chalk;
+
+ /**
+ Modifier: Prints the text, but makes it invisible.
+ */
+ readonly hidden: Chalk;
+
+ /**
+ Modifier: Puts a horizontal line through the center of the text. (Not widely supported)
+ */
+ readonly strikethrough: Chalk;
+
+ /**
+ Modifier: Prints the text only when Chalk has a color support level > 0.
+ Can be useful for things that are purely cosmetic.
+ */
+ readonly visible: Chalk;
+
+ readonly black: Chalk;
+ readonly red: Chalk;
+ readonly green: Chalk;
+ readonly yellow: Chalk;
+ readonly blue: Chalk;
+ readonly magenta: Chalk;
+ readonly cyan: Chalk;
+ readonly white: Chalk;
+
+ /*
+ Alias for `blackBright`.
+ */
+ readonly gray: Chalk;
+
+ /*
+ Alias for `blackBright`.
+ */
+ readonly grey: Chalk;
+
+ readonly blackBright: Chalk;
+ readonly redBright: Chalk;
+ readonly greenBright: Chalk;
+ readonly yellowBright: Chalk;
+ readonly blueBright: Chalk;
+ readonly magentaBright: Chalk;
+ readonly cyanBright: Chalk;
+ readonly whiteBright: Chalk;
+
+ readonly bgBlack: Chalk;
+ readonly bgRed: Chalk;
+ readonly bgGreen: Chalk;
+ readonly bgYellow: Chalk;
+ readonly bgBlue: Chalk;
+ readonly bgMagenta: Chalk;
+ readonly bgCyan: Chalk;
+ readonly bgWhite: Chalk;
+
+ /*
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGray: Chalk;
+
+ /*
+ Alias for `bgBlackBright`.
+ */
+ readonly bgGrey: Chalk;
+
+ readonly bgBlackBright: Chalk;
+ readonly bgRedBright: Chalk;
+ readonly bgGreenBright: Chalk;
+ readonly bgYellowBright: Chalk;
+ readonly bgBlueBright: Chalk;
+ readonly bgMagentaBright: Chalk;
+ readonly bgCyanBright: Chalk;
+ readonly bgWhiteBright: Chalk;
+ }
+}
+
+/**
+Main Chalk object that allows to chain styles together.
+Call the last one as a method with a string argument.
+Order doesn't matter, and later styles take precedent in case of a conflict.
+This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+*/
+declare const chalk: chalk.Chalk & chalk.ChalkFunction & {
+ supportsColor: chalk.ColorSupport | false;
+ Level: chalk.Level;
+ Color: Color;
+ ForegroundColor: ForegroundColor;
+ BackgroundColor: BackgroundColor;
+ Modifiers: Modifiers;
+ stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false};
+};
+
+export = chalk;
diff --git a/node_modules/chalk/license b/node_modules/chalk/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/chalk/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json
new file mode 100644
index 0000000..1b6f8bc
--- /dev/null
+++ b/node_modules/chalk/package.json
@@ -0,0 +1,105 @@
+{
+ "_args": [
+ [
+ "chalk@4.1.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "chalk@4.1.0",
+ "_id": "chalk@4.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "_location": "/chalk",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "chalk@4.1.0",
+ "name": "chalk",
+ "escapedName": "chalk",
+ "rawSpec": "4.1.0",
+ "saveSpec": null,
+ "fetchSpec": "4.1.0"
+ },
+ "_requiredBy": [
+ "/",
+ "/log-symbols",
+ "/ora"
+ ],
+ "_resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+ "_spec": "4.1.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "bugs": {
+ "url": "https://github.com/chalk/chalk/issues"
+ },
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "description": "Terminal string styling done right",
+ "devDependencies": {
+ "ava": "^2.4.0",
+ "coveralls": "^3.0.7",
+ "execa": "^4.0.0",
+ "import-fresh": "^3.1.0",
+ "matcha": "^0.7.0",
+ "nyc": "^15.0.0",
+ "resolve-from": "^5.0.0",
+ "tsd": "^0.7.4",
+ "xo": "^0.28.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "files": [
+ "source",
+ "index.d.ts"
+ ],
+ "funding": "https://github.com/chalk/chalk?sponsor=1",
+ "homepage": "https://github.com/chalk/chalk#readme",
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "str",
+ "ansi",
+ "style",
+ "styles",
+ "tty",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "main": "source",
+ "name": "chalk",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/chalk.git"
+ },
+ "scripts": {
+ "bench": "matcha benchmark.js",
+ "test": "xo && nyc ava && tsd"
+ },
+ "version": "4.1.0",
+ "xo": {
+ "rules": {
+ "unicorn/prefer-string-slice": "off",
+ "unicorn/prefer-includes": "off",
+ "@typescript-eslint/member-ordering": "off",
+ "no-redeclare": "off",
+ "unicorn/string-content": "off",
+ "unicorn/better-regex": "off"
+ }
+ }
+}
diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md
new file mode 100644
index 0000000..338f42c
--- /dev/null
+++ b/node_modules/chalk/readme.md
@@ -0,0 +1,293 @@
+<h1 align="center">
+ <br>
+ <br>
+ <img width="320" src="media/logo.svg" alt="Chalk">
+ <br>
+ <br>
+ <br>
+</h1>
+
+> Terminal string styling done right
+
+[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents) [![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) ![TypeScript-ready](https://img.shields.io/npm/types/chalk.svg) [![run on repl.it](https://repl.it/badge/github/chalk/chalk)](https://repl.it/github/chalk/chalk)
+
+<img src="https://cdn.jsdelivr.net/gh/chalk/ansi-styles@8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
+
+## Highlights
+
+- Expressive API
+- Highly performant
+- Ability to nest styles
+- [256/Truecolor color support](#256-and-truecolor-color-support)
+- Auto-detects color support
+- Doesn't extend `String.prototype`
+- Clean and focused
+- Actively maintained
+- [Used by ~50,000 packages](https://www.npmjs.com/browse/depended/chalk) as of January 1, 2020
+
+## Install
+
+```console
+$ npm install chalk
+```
+
+## Usage
+
+```js
+const chalk = require('chalk');
+
+console.log(chalk.blue('Hello world!'));
+```
+
+Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
+
+```js
+const chalk = require('chalk');
+const log = console.log;
+
+// Combine styled and normal strings
+log(chalk.blue('Hello') + ' World' + chalk.red('!'));
+
+// Compose multiple styles using the chainable API
+log(chalk.blue.bgRed.bold('Hello world!'));
+
+// Pass in multiple arguments
+log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
+
+// Nest styles
+log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
+
+// Nest styles of the same type even (color, underline, background)
+log(chalk.green(
+ 'I am a green line ' +
+ chalk.blue.underline.bold('with a blue substring') +
+ ' that becomes green again!'
+));
+
+// ES2015 template literal
+log(`
+CPU: ${chalk.red('90%')}
+RAM: ${chalk.green('40%')}
+DISK: ${chalk.yellow('70%')}
+`);
+
+// ES2015 tagged template literal
+log(chalk`
+CPU: {red ${cpu.totalPercent}%}
+RAM: {green ${ram.used / ram.total * 100}%}
+DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
+`);
+
+// Use RGB colors in terminal emulators that support it.
+log(chalk.keyword('orange')('Yay for orange colored text!'));
+log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
+log(chalk.hex('#DEADED').bold('Bold gray!'));
+```
+
+Easily define your own themes:
+
+```js
+const chalk = require('chalk');
+
+const error = chalk.bold.red;
+const warning = chalk.keyword('orange');
+
+console.log(error('Error!'));
+console.log(warning('Warning!'));
+```
+
+Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
+
+```js
+const name = 'Sindre';
+console.log(chalk.green('Hello %s'), name);
+//=> 'Hello Sindre'
+```
+
+## API
+
+### chalk.`<style>[.<style>...](string, [string...])`
+
+Example: `chalk.red.bold.underline('Hello', 'world');`
+
+Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+
+Multiple arguments will be separated by space.
+
+### chalk.level
+
+Specifies the level of color support.
+
+Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
+
+If you need to change this in a reusable module, create a new instance:
+
+```js
+const ctx = new chalk.Instance({level: 0});
+```
+
+| Level | Description |
+| :---: | :--- |
+| `0` | All colors disabled |
+| `1` | Basic color support (16 colors) |
+| `2` | 256 color support |
+| `3` | Truecolor support (16 million colors) |
+
+### chalk.supportsColor
+
+Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+### chalk.stderr and chalk.stderr.supportsColor
+
+`chalk.stderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `chalk.supportsColor` apply to this too. `chalk.stderr.supportsColor` is exposed for convenience.
+
+## Styles
+
+### Modifiers
+
+- `reset` - Resets the current color chain.
+- `bold` - Make text bold.
+- `dim` - Emitting only a small amount of light.
+- `italic` - Make text italic. *(Not widely supported)*
+- `underline` - Make text underline. *(Not widely supported)*
+- `inverse`- Inverse background and foreground colors.
+- `hidden` - Prints the text, but makes it invisible.
+- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
+- `visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic.
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `blackBright` (alias: `gray`, `grey`)
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+## Tagged template literal
+
+Chalk can be used as a [tagged template literal](https://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals).
+
+```js
+const chalk = require('chalk');
+
+const miles = 18;
+const calculateFeet = miles => miles * 5280;
+
+console.log(chalk`
+ There are {bold 5280 feet} in a mile.
+ In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.
+`);
+```
+
+Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`).
+
+Template styles are chained exactly like normal Chalk styles. The following three statements are equivalent:
+
+```js
+console.log(chalk.bold.rgb(10, 100, 200)('Hello!'));
+console.log(chalk.bold.rgb(10, 100, 200)`Hello!`);
+console.log(chalk`{bold.rgb(10,100,200) Hello!}`);
+```
+
+Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters.
+
+All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped.
+
+## 256 and Truecolor color support
+
+Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps.
+
+Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
+
+Examples:
+
+- `chalk.hex('#DEADED').underline('Hello, world!')`
+- `chalk.keyword('orange')('Some orange text')`
+- `chalk.rgb(15, 100, 204).inverse('Hello!')`
+
+Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors).
+
+- `chalk.bgHex('#DEADED').underline('Hello, world!')`
+- `chalk.bgKeyword('orange')('Some orange text')`
+- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
+
+The following color models can be used:
+
+- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
+- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
+- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
+- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
+- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')`
+- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')`
+- [`ansi`](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) - Example: `chalk.ansi(31).bgAnsi(93)('red on yellowBright')`
+- [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')`
+
+## Windows
+
+If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`.
+
+## Origin story
+
+[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
+
+## chalk for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of chalk and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-chalk?utm_source=npm-chalk&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+## Related
+
+- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
+- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
+- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
+- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
+- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
+- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
+- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
+- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
+- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
+- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
diff --git a/node_modules/chalk/source/index.js b/node_modules/chalk/source/index.js
new file mode 100644
index 0000000..75ec663
--- /dev/null
+++ b/node_modules/chalk/source/index.js
@@ -0,0 +1,229 @@
+'use strict';
+const ansiStyles = require('ansi-styles');
+const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');
+const {
+ stringReplaceAll,
+ stringEncaseCRLFWithFirstIndex
+} = require('./util');
+
+const {isArray} = Array;
+
+// `supportsColor.level` → `ansiStyles.color[name]` mapping
+const levelMapping = [
+ 'ansi',
+ 'ansi',
+ 'ansi256',
+ 'ansi16m'
+];
+
+const styles = Object.create(null);
+
+const applyOptions = (object, options = {}) => {
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
+ throw new Error('The `level` option should be an integer from 0 to 3');
+ }
+
+ // Detect level if not set manually
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
+ object.level = options.level === undefined ? colorLevel : options.level;
+};
+
+class ChalkClass {
+ constructor(options) {
+ // eslint-disable-next-line no-constructor-return
+ return chalkFactory(options);
+ }
+}
+
+const chalkFactory = options => {
+ const chalk = {};
+ applyOptions(chalk, options);
+
+ chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
+
+ Object.setPrototypeOf(chalk, Chalk.prototype);
+ Object.setPrototypeOf(chalk.template, chalk);
+
+ chalk.template.constructor = () => {
+ throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');
+ };
+
+ chalk.template.Instance = ChalkClass;
+
+ return chalk.template;
+};
+
+function Chalk(options) {
+ return chalkFactory(options);
+}
+
+for (const [styleName, style] of Object.entries(ansiStyles)) {
+ styles[styleName] = {
+ get() {
+ const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
+ Object.defineProperty(this, styleName, {value: builder});
+ return builder;
+ }
+ };
+}
+
+styles.visible = {
+ get() {
+ const builder = createBuilder(this, this._styler, true);
+ Object.defineProperty(this, 'visible', {value: builder});
+ return builder;
+ }
+};
+
+const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];
+
+for (const model of usedModels) {
+ styles[model] = {
+ get() {
+ const {level} = this;
+ return function (...arguments_) {
+ const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
+ return createBuilder(this, styler, this._isEmpty);
+ };
+ }
+ };
+}
+
+for (const model of usedModels) {
+ const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
+ styles[bgModel] = {
+ get() {
+ const {level} = this;
+ return function (...arguments_) {
+ const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
+ return createBuilder(this, styler, this._isEmpty);
+ };
+ }
+ };
+}
+
+const proto = Object.defineProperties(() => {}, {
+ ...styles,
+ level: {
+ enumerable: true,
+ get() {
+ return this._generator.level;
+ },
+ set(level) {
+ this._generator.level = level;
+ }
+ }
+});
+
+const createStyler = (open, close, parent) => {
+ let openAll;
+ let closeAll;
+ if (parent === undefined) {
+ openAll = open;
+ closeAll = close;
+ } else {
+ openAll = parent.openAll + open;
+ closeAll = close + parent.closeAll;
+ }
+
+ return {
+ open,
+ close,
+ openAll,
+ closeAll,
+ parent
+ };
+};
+
+const createBuilder = (self, _styler, _isEmpty) => {
+ const builder = (...arguments_) => {
+ if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
+ // Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`
+ return applyStyle(builder, chalkTag(builder, ...arguments_));
+ }
+
+ // Single argument is hot path, implicit coercion is faster than anything
+ // eslint-disable-next-line no-implicit-coercion
+ return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
+ };
+
+ // We alter the prototype because we must return a function, but there is
+ // no way to create a function with a different prototype
+ Object.setPrototypeOf(builder, proto);
+
+ builder._generator = self;
+ builder._styler = _styler;
+ builder._isEmpty = _isEmpty;
+
+ return builder;
+};
+
+const applyStyle = (self, string) => {
+ if (self.level <= 0 || !string) {
+ return self._isEmpty ? '' : string;
+ }
+
+ let styler = self._styler;
+
+ if (styler === undefined) {
+ return string;
+ }
+
+ const {openAll, closeAll} = styler;
+ if (string.indexOf('\u001B') !== -1) {
+ while (styler !== undefined) {
+ // Replace any instances already present with a re-opening code
+ // otherwise only the part of the string until said closing code
+ // will be colored, and the rest will simply be 'plain'.
+ string = stringReplaceAll(string, styler.close, styler.open);
+
+ styler = styler.parent;
+ }
+ }
+
+ // We can move both next actions out of loop, because remaining actions in loop won't have
+ // any/visible effect on parts we add here. Close the styling before a linebreak and reopen
+ // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
+ const lfIndex = string.indexOf('\n');
+ if (lfIndex !== -1) {
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
+ }
+
+ return openAll + string + closeAll;
+};
+
+let template;
+const chalkTag = (chalk, ...strings) => {
+ const [firstString] = strings;
+
+ if (!isArray(firstString) || !isArray(firstString.raw)) {
+ // If chalk() was called by itself or with a string,
+ // return the string itself as a string.
+ return strings.join(' ');
+ }
+
+ const arguments_ = strings.slice(1);
+ const parts = [firstString.raw[0]];
+
+ for (let i = 1; i < firstString.length; i++) {
+ parts.push(
+ String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'),
+ String(firstString.raw[i])
+ );
+ }
+
+ if (template === undefined) {
+ template = require('./templates');
+ }
+
+ return template(chalk, parts.join(''));
+};
+
+Object.defineProperties(Chalk.prototype, styles);
+
+const chalk = Chalk(); // eslint-disable-line new-cap
+chalk.supportsColor = stdoutColor;
+chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap
+chalk.stderr.supportsColor = stderrColor;
+
+module.exports = chalk;
diff --git a/node_modules/chalk/source/templates.js b/node_modules/chalk/source/templates.js
new file mode 100644
index 0000000..b130949
--- /dev/null
+++ b/node_modules/chalk/source/templates.js
@@ -0,0 +1,134 @@
+'use strict';
+const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
+const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
+const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
+const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
+
+const ESCAPES = new Map([
+ ['n', '\n'],
+ ['r', '\r'],
+ ['t', '\t'],
+ ['b', '\b'],
+ ['f', '\f'],
+ ['v', '\v'],
+ ['0', '\0'],
+ ['\\', '\\'],
+ ['e', '\u001B'],
+ ['a', '\u0007']
+]);
+
+function unescape(c) {
+ const u = c[0] === 'u';
+ const bracket = c[1] === '{';
+
+ if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
+ return String.fromCharCode(parseInt(c.slice(1), 16));
+ }
+
+ if (u && bracket) {
+ return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
+ }
+
+ return ESCAPES.get(c) || c;
+}
+
+function parseArguments(name, arguments_) {
+ const results = [];
+ const chunks = arguments_.trim().split(/\s*,\s*/g);
+ let matches;
+
+ for (const chunk of chunks) {
+ const number = Number(chunk);
+ if (!Number.isNaN(number)) {
+ results.push(number);
+ } else if ((matches = chunk.match(STRING_REGEX))) {
+ results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
+ } else {
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
+ }
+ }
+
+ return results;
+}
+
+function parseStyle(style) {
+ STYLE_REGEX.lastIndex = 0;
+
+ const results = [];
+ let matches;
+
+ while ((matches = STYLE_REGEX.exec(style)) !== null) {
+ const name = matches[1];
+
+ if (matches[2]) {
+ const args = parseArguments(name, matches[2]);
+ results.push([name].concat(args));
+ } else {
+ results.push([name]);
+ }
+ }
+
+ return results;
+}
+
+function buildStyle(chalk, styles) {
+ const enabled = {};
+
+ for (const layer of styles) {
+ for (const style of layer.styles) {
+ enabled[style[0]] = layer.inverse ? null : style.slice(1);
+ }
+ }
+
+ let current = chalk;
+ for (const [styleName, styles] of Object.entries(enabled)) {
+ if (!Array.isArray(styles)) {
+ continue;
+ }
+
+ if (!(styleName in current)) {
+ throw new Error(`Unknown Chalk style: ${styleName}`);
+ }
+
+ current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
+ }
+
+ return current;
+}
+
+module.exports = (chalk, temporary) => {
+ const styles = [];
+ const chunks = [];
+ let chunk = [];
+
+ // eslint-disable-next-line max-params
+ temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
+ if (escapeCharacter) {
+ chunk.push(unescape(escapeCharacter));
+ } else if (style) {
+ const string = chunk.join('');
+ chunk = [];
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
+ styles.push({inverse, styles: parseStyle(style)});
+ } else if (close) {
+ if (styles.length === 0) {
+ throw new Error('Found extraneous } in Chalk template literal');
+ }
+
+ chunks.push(buildStyle(chalk, styles)(chunk.join('')));
+ chunk = [];
+ styles.pop();
+ } else {
+ chunk.push(character);
+ }
+ });
+
+ chunks.push(chunk.join(''));
+
+ if (styles.length > 0) {
+ const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
+ throw new Error(errMessage);
+ }
+
+ return chunks.join('');
+};
diff --git a/node_modules/chalk/source/util.js b/node_modules/chalk/source/util.js
new file mode 100644
index 0000000..ca466fd
--- /dev/null
+++ b/node_modules/chalk/source/util.js
@@ -0,0 +1,39 @@
+'use strict';
+
+const stringReplaceAll = (string, substring, replacer) => {
+ let index = string.indexOf(substring);
+ if (index === -1) {
+ return string;
+ }
+
+ const substringLength = substring.length;
+ let endIndex = 0;
+ let returnValue = '';
+ do {
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
+ endIndex = index + substringLength;
+ index = string.indexOf(substring, endIndex);
+ } while (index !== -1);
+
+ returnValue += string.substr(endIndex);
+ return returnValue;
+};
+
+const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
+ let endIndex = 0;
+ let returnValue = '';
+ do {
+ const gotCR = string[index - 1] === '\r';
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
+ endIndex = index + 1;
+ index = string.indexOf('\n', endIndex);
+ } while (index !== -1);
+
+ returnValue += string.substr(endIndex);
+ return returnValue;
+};
+
+module.exports = {
+ stringReplaceAll,
+ stringEncaseCRLFWithFirstIndex
+};
diff --git a/node_modules/chownr/LICENSE b/node_modules/chownr/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/chownr/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/chownr/README.md b/node_modules/chownr/README.md
new file mode 100644
index 0000000..70e9a54
--- /dev/null
+++ b/node_modules/chownr/README.md
@@ -0,0 +1,3 @@
+Like `chown -R`.
+
+Takes the same arguments as `fs.chown()`
diff --git a/node_modules/chownr/chownr.js b/node_modules/chownr/chownr.js
new file mode 100644
index 0000000..0d40932
--- /dev/null
+++ b/node_modules/chownr/chownr.js
@@ -0,0 +1,167 @@
+'use strict'
+const fs = require('fs')
+const path = require('path')
+
+/* istanbul ignore next */
+const LCHOWN = fs.lchown ? 'lchown' : 'chown'
+/* istanbul ignore next */
+const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
+
+/* istanbul ignore next */
+const needEISDIRHandled = fs.lchown &&
+ !process.version.match(/v1[1-9]+\./) &&
+ !process.version.match(/v10\.[6-9]/)
+
+const lchownSync = (path, uid, gid) => {
+ try {
+ return fs[LCHOWNSYNC](path, uid, gid)
+ } catch (er) {
+ if (er.code !== 'ENOENT')
+ throw er
+ }
+}
+
+/* istanbul ignore next */
+const chownSync = (path, uid, gid) => {
+ try {
+ return fs.chownSync(path, uid, gid)
+ } catch (er) {
+ if (er.code !== 'ENOENT')
+ throw er
+ }
+}
+
+/* istanbul ignore next */
+const handleEISDIR =
+ needEISDIRHandled ? (path, uid, gid, cb) => er => {
+ // Node prior to v10 had a very questionable implementation of
+ // fs.lchown, which would always try to call fs.open on a directory
+ // Fall back to fs.chown in those cases.
+ if (!er || er.code !== 'EISDIR')
+ cb(er)
+ else
+ fs.chown(path, uid, gid, cb)
+ }
+ : (_, __, ___, cb) => cb
+
+/* istanbul ignore next */
+const handleEISDirSync =
+ needEISDIRHandled ? (path, uid, gid) => {
+ try {
+ return lchownSync(path, uid, gid)
+ } catch (er) {
+ if (er.code !== 'EISDIR')
+ throw er
+ chownSync(path, uid, gid)
+ }
+ }
+ : (path, uid, gid) => lchownSync(path, uid, gid)
+
+// fs.readdir could only accept an options object as of node v6
+const nodeVersion = process.version
+let readdir = (path, options, cb) => fs.readdir(path, options, cb)
+let readdirSync = (path, options) => fs.readdirSync(path, options)
+/* istanbul ignore next */
+if (/^v4\./.test(nodeVersion))
+ readdir = (path, options, cb) => fs.readdir(path, cb)
+
+const chown = (cpath, uid, gid, cb) => {
+ fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => {
+ // Skip ENOENT error
+ cb(er && er.code !== 'ENOENT' ? er : null)
+ }))
+}
+
+const chownrKid = (p, child, uid, gid, cb) => {
+ if (typeof child === 'string')
+ return fs.lstat(path.resolve(p, child), (er, stats) => {
+ // Skip ENOENT error
+ if (er)
+ return cb(er.code !== 'ENOENT' ? er : null)
+ stats.name = child
+ chownrKid(p, stats, uid, gid, cb)
+ })
+
+ if (child.isDirectory()) {
+ chownr(path.resolve(p, child.name), uid, gid, er => {
+ if (er)
+ return cb(er)
+ const cpath = path.resolve(p, child.name)
+ chown(cpath, uid, gid, cb)
+ })
+ } else {
+ const cpath = path.resolve(p, child.name)
+ chown(cpath, uid, gid, cb)
+ }
+}
+
+
+const chownr = (p, uid, gid, cb) => {
+ readdir(p, { withFileTypes: true }, (er, children) => {
+ // any error other than ENOTDIR or ENOTSUP means it's not readable,
+ // or doesn't exist. give up.
+ if (er) {
+ if (er.code === 'ENOENT')
+ return cb()
+ else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
+ return cb(er)
+ }
+ if (er || !children.length)
+ return chown(p, uid, gid, cb)
+
+ let len = children.length
+ let errState = null
+ const then = er => {
+ if (errState)
+ return
+ if (er)
+ return cb(errState = er)
+ if (-- len === 0)
+ return chown(p, uid, gid, cb)
+ }
+
+ children.forEach(child => chownrKid(p, child, uid, gid, then))
+ })
+}
+
+const chownrKidSync = (p, child, uid, gid) => {
+ if (typeof child === 'string') {
+ try {
+ const stats = fs.lstatSync(path.resolve(p, child))
+ stats.name = child
+ child = stats
+ } catch (er) {
+ if (er.code === 'ENOENT')
+ return
+ else
+ throw er
+ }
+ }
+
+ if (child.isDirectory())
+ chownrSync(path.resolve(p, child.name), uid, gid)
+
+ handleEISDirSync(path.resolve(p, child.name), uid, gid)
+}
+
+const chownrSync = (p, uid, gid) => {
+ let children
+ try {
+ children = readdirSync(p, { withFileTypes: true })
+ } catch (er) {
+ if (er.code === 'ENOENT')
+ return
+ else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP')
+ return handleEISDirSync(p, uid, gid)
+ else
+ throw er
+ }
+
+ if (children && children.length)
+ children.forEach(child => chownrKidSync(p, child, uid, gid))
+
+ return handleEISDirSync(p, uid, gid)
+}
+
+module.exports = chownr
+chownr.sync = chownrSync
diff --git a/node_modules/chownr/package.json b/node_modules/chownr/package.json
new file mode 100644
index 0000000..9594fca
--- /dev/null
+++ b/node_modules/chownr/package.json
@@ -0,0 +1,65 @@
+{
+ "_args": [
+ [
+ "chownr@1.1.4",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "chownr@1.1.4",
+ "_id": "chownr@1.1.4",
+ "_inBundle": false,
+ "_integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
+ "_location": "/chownr",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "chownr@1.1.4",
+ "name": "chownr",
+ "escapedName": "chownr",
+ "rawSpec": "1.1.4",
+ "saveSpec": null,
+ "fetchSpec": "1.1.4"
+ },
+ "_requiredBy": [
+ "/tar-fs"
+ ],
+ "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+ "_spec": "1.1.4",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/chownr/issues"
+ },
+ "description": "like `chown -R`",
+ "devDependencies": {
+ "mkdirp": "0.3",
+ "rimraf": "^2.7.1",
+ "tap": "^14.10.6"
+ },
+ "files": [
+ "chownr.js"
+ ],
+ "homepage": "https://github.com/isaacs/chownr#readme",
+ "license": "ISC",
+ "main": "chownr.js",
+ "name": "chownr",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/chownr.git"
+ },
+ "scripts": {
+ "postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
+ "preversion": "npm test",
+ "test": "tap"
+ },
+ "tap": {
+ "check-coverage": true
+ },
+ "version": "1.1.4"
+}
diff --git a/node_modules/cli-cursor/index.d.ts b/node_modules/cli-cursor/index.d.ts
new file mode 100644
index 0000000..2b252d0
--- /dev/null
+++ b/node_modules/cli-cursor/index.d.ts
@@ -0,0 +1,45 @@
+/// <reference types="node"/>
+
+/**
+Show cursor.
+
+@param stream - Default: `process.stderr`.
+
+@example
+```
+import * as cliCursor from 'cli-cursor';
+
+cliCursor.show();
+```
+*/
+export function show(stream?: NodeJS.WritableStream): void;
+
+/**
+Hide cursor.
+
+@param stream - Default: `process.stderr`.
+
+@example
+```
+import * as cliCursor from 'cli-cursor';
+
+cliCursor.hide();
+```
+*/
+export function hide(stream?: NodeJS.WritableStream): void;
+
+/**
+Toggle cursor visibility.
+
+@param force - Is useful to show or hide the cursor based on a boolean.
+@param stream - Default: `process.stderr`.
+
+@example
+```
+import * as cliCursor from 'cli-cursor';
+
+const unicornsAreAwesome = true;
+cliCursor.toggle(unicornsAreAwesome);
+```
+*/
+export function toggle(force?: boolean, stream?: NodeJS.WritableStream): void;
diff --git a/node_modules/cli-cursor/index.js b/node_modules/cli-cursor/index.js
new file mode 100644
index 0000000..710c405
--- /dev/null
+++ b/node_modules/cli-cursor/index.js
@@ -0,0 +1,35 @@
+'use strict';
+const restoreCursor = require('restore-cursor');
+
+let isHidden = false;
+
+exports.show = (writableStream = process.stderr) => {
+ if (!writableStream.isTTY) {
+ return;
+ }
+
+ isHidden = false;
+ writableStream.write('\u001B[?25h');
+};
+
+exports.hide = (writableStream = process.stderr) => {
+ if (!writableStream.isTTY) {
+ return;
+ }
+
+ restoreCursor();
+ isHidden = true;
+ writableStream.write('\u001B[?25l');
+};
+
+exports.toggle = (force, writableStream) => {
+ if (force !== undefined) {
+ isHidden = force;
+ }
+
+ if (isHidden) {
+ exports.show(writableStream);
+ } else {
+ exports.hide(writableStream);
+ }
+};
diff --git a/node_modules/cli-cursor/license b/node_modules/cli-cursor/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/cli-cursor/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/cli-cursor/package.json b/node_modules/cli-cursor/package.json
new file mode 100644
index 0000000..8d9c4d7
--- /dev/null
+++ b/node_modules/cli-cursor/package.json
@@ -0,0 +1,81 @@
+{
+ "_args": [
+ [
+ "cli-cursor@3.1.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "cli-cursor@3.1.0",
+ "_id": "cli-cursor@3.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
+ "_location": "/cli-cursor",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "cli-cursor@3.1.0",
+ "name": "cli-cursor",
+ "escapedName": "cli-cursor",
+ "rawSpec": "3.1.0",
+ "saveSpec": null,
+ "fetchSpec": "3.1.0"
+ },
+ "_requiredBy": [
+ "/ora"
+ ],
+ "_resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
+ "_spec": "3.1.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/cli-cursor/issues"
+ },
+ "dependencies": {
+ "restore-cursor": "^3.1.0"
+ },
+ "description": "Toggle the CLI cursor",
+ "devDependencies": {
+ "@types/node": "^12.0.7",
+ "ava": "^2.1.0",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/sindresorhus/cli-cursor#readme",
+ "keywords": [
+ "cli",
+ "cursor",
+ "ansi",
+ "toggle",
+ "display",
+ "show",
+ "hide",
+ "term",
+ "terminal",
+ "console",
+ "tty",
+ "shell",
+ "command-line"
+ ],
+ "license": "MIT",
+ "name": "cli-cursor",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/cli-cursor.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "3.1.0"
+}
diff --git a/node_modules/cli-cursor/readme.md b/node_modules/cli-cursor/readme.md
new file mode 100644
index 0000000..3478ac8
--- /dev/null
+++ b/node_modules/cli-cursor/readme.md
@@ -0,0 +1,55 @@
+# cli-cursor [![Build Status](https://travis-ci.org/sindresorhus/cli-cursor.svg?branch=master)](https://travis-ci.org/sindresorhus/cli-cursor)
+
+> Toggle the CLI cursor
+
+The cursor is [gracefully restored](https://github.com/sindresorhus/restore-cursor) if the process exits.
+
+
+## Install
+
+```
+$ npm install cli-cursor
+```
+
+
+## Usage
+
+```js
+const cliCursor = require('cli-cursor');
+
+cliCursor.hide();
+
+const unicornsAreAwesome = true;
+cliCursor.toggle(unicornsAreAwesome);
+```
+
+
+## API
+
+### .show(stream?)
+
+### .hide(stream?)
+
+### .toggle(force?, stream?)
+
+#### force
+
+Useful for showing or hiding the cursor based on a boolean.
+
+#### stream
+
+Type: `stream.Writable`<br>
+Default: `process.stderr`
+
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-cli-cursor?utm_source=npm-cli-cursor&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/cli-spinners/index.d.ts b/node_modules/cli-spinners/index.d.ts
new file mode 100644
index 0000000..e9aeff0
--- /dev/null
+++ b/node_modules/cli-spinners/index.d.ts
@@ -0,0 +1,115 @@
+declare namespace cliSpinners {
+ type SpinnerName =
+ | 'dots'
+ | 'dots2'
+ | 'dots3'
+ | 'dots4'
+ | 'dots5'
+ | 'dots6'
+ | 'dots7'
+ | 'dots8'
+ | 'dots9'
+ | 'dots10'
+ | 'dots11'
+ | 'dots12'
+ | 'dots8Bit'
+ | 'line'
+ | 'line2'
+ | 'pipe'
+ | 'simpleDots'
+ | 'simpleDotsScrolling'
+ | 'star'
+ | 'star2'
+ | 'flip'
+ | 'hamburger'
+ | 'growVertical'
+ | 'growHorizontal'
+ | 'balloon'
+ | 'balloon2'
+ | 'noise'
+ | 'bounce'
+ | 'boxBounce'
+ | 'boxBounce2'
+ | 'triangle'
+ | 'arc'
+ | 'circle'
+ | 'squareCorners'
+ | 'circleQuarters'
+ | 'circleHalves'
+ | 'squish'
+ | 'toggle'
+ | 'toggle2'
+ | 'toggle3'
+ | 'toggle4'
+ | 'toggle5'
+ | 'toggle6'
+ | 'toggle7'
+ | 'toggle8'
+ | 'toggle9'
+ | 'toggle10'
+ | 'toggle11'
+ | 'toggle12'
+ | 'toggle13'
+ | 'arrow'
+ | 'arrow2'
+ | 'arrow3'
+ | 'bouncingBar'
+ | 'bouncingBall'
+ | 'smiley'
+ | 'monkey'
+ | 'hearts'
+ | 'clock'
+ | 'earth'
+ | 'material'
+ | 'moon'
+ | 'runner'
+ | 'pong'
+ | 'shark'
+ | 'dqpb'
+ | 'weather'
+ | 'christmas'
+ | 'grenade'
+ | 'point'
+ | 'layer'
+ | 'betaWave';
+
+ interface Spinner {
+ /**
+ Recommended interval.
+ */
+ readonly interval: number;
+
+ /**
+ A list of frames to show for the spinner.
+ */
+ readonly frames: string[];
+ }
+}
+
+/**
+70+ spinners for use in the terminal.
+
+@example
+```
+import cliSpinners = require('cli-spinners');
+
+console.log(cliSpinners.dots);
+// {
+// interval: 80,
+// frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
+// }
+```
+*/
+declare const cliSpinners: {
+ readonly [spinnerName in cliSpinners.SpinnerName]: cliSpinners.Spinner;
+} & {
+ /**
+ Returns a random spinner each time it's called.
+ */
+ readonly random: cliSpinners.Spinner;
+
+ // TODO: Remove this for the next major release
+ default: typeof cliSpinners;
+};
+
+export = cliSpinners;
diff --git a/node_modules/cli-spinners/index.js b/node_modules/cli-spinners/index.js
new file mode 100644
index 0000000..38920a3
--- /dev/null
+++ b/node_modules/cli-spinners/index.js
@@ -0,0 +1,17 @@
+'use strict';
+
+const spinners = Object.assign({}, require('./spinners.json'));
+
+const spinnersList = Object.keys(spinners);
+
+Object.defineProperty(spinners, 'random', {
+ get() {
+ const randomIndex = Math.floor(Math.random() * spinnersList.length);
+ const spinnerName = spinnersList[randomIndex];
+ return spinners[spinnerName];
+ }
+});
+
+module.exports = spinners;
+// TODO: Remove this for the next major release
+module.exports.default = spinners;
diff --git a/node_modules/cli-spinners/license b/node_modules/cli-spinners/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/cli-spinners/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/cli-spinners/package.json b/node_modules/cli-spinners/package.json
new file mode 100644
index 0000000..ac4796b
--- /dev/null
+++ b/node_modules/cli-spinners/package.json
@@ -0,0 +1,83 @@
+{
+ "_args": [
+ [
+ "cli-spinners@2.5.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "cli-spinners@2.5.0",
+ "_id": "cli-spinners@2.5.0",
+ "_inBundle": false,
+ "_integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==",
+ "_location": "/cli-spinners",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "cli-spinners@2.5.0",
+ "name": "cli-spinners",
+ "escapedName": "cli-spinners",
+ "rawSpec": "2.5.0",
+ "saveSpec": null,
+ "fetchSpec": "2.5.0"
+ },
+ "_requiredBy": [
+ "/ora"
+ ],
+ "_resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz",
+ "_spec": "2.5.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/cli-spinners/issues"
+ },
+ "description": "Spinners for use in the terminal",
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "log-update": "^3.2.0",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "spinners.json"
+ ],
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "homepage": "https://github.com/sindresorhus/cli-spinners#readme",
+ "keywords": [
+ "cli",
+ "spinner",
+ "spinners",
+ "terminal",
+ "term",
+ "console",
+ "ascii",
+ "unicode",
+ "loading",
+ "indicator",
+ "progress",
+ "busy",
+ "wait",
+ "idle",
+ "json"
+ ],
+ "license": "MIT",
+ "name": "cli-spinners",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/cli-spinners.git"
+ },
+ "scripts": {
+ "asciicast": "asciinema rec --command='node example-all.js' --title='cli-spinner' --quiet",
+ "test": "xo && ava && tsd"
+ },
+ "version": "2.5.0"
+}
diff --git a/node_modules/cli-spinners/readme.md b/node_modules/cli-spinners/readme.md
new file mode 100644
index 0000000..44e06c7
--- /dev/null
+++ b/node_modules/cli-spinners/readme.md
@@ -0,0 +1,53 @@
+# cli-spinners [![Build Status](https://travis-ci.com/sindresorhus/cli-spinners.svg?branch=master)](https://travis-ci.com/github/sindresorhus/cli-spinners)
+
+> 70+ spinners for use in the terminal
+
+<p align="center">
+ <br>
+ <img width="700" src="screenshot.svg">
+ <br>
+ <br>
+</p>
+
+The list of spinners is just a [JSON file](spinners.json) and can be used wherever.
+
+You probably want to use one of these spinners through the [`ora`](https://github.com/sindresorhus/ora) module.
+
+## Install
+
+```
+$ npm install cli-spinners
+```
+
+## Usage
+
+```js
+const cliSpinners = require('cli-spinners');
+
+console.log(cliSpinners.dots);
+/*
+{
+ interval: 80,
+ frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
+}
+*/
+```
+
+## Preview
+
+The header GIF is outdated. See all the [spinner at once](https://jsfiddle.net/sindresorhus/2eLtsbey/embedded/result/) or [one at the time](https://asciinema.org/a/95348?size=big).
+
+## API
+
+Each spinner comes with a recommended `interval` and an array of `frames`.
+
+[See the spinners.](spinners.json)
+
+The `random` spinner will return a random spinner each time it's called.
+
+## Related
+
+- [ora](https://github.com/sindresorhus/ora) - Elegant terminal spinner
+- [CLISpinner](https://github.com/kiliankoe/CLISpinner) - Terminal spinners for Swift
+- [py-spinners](https://github.com/ManrajGrover/py-spinners) - Python port
+- [spinners](https://github.com/FGRibreau/spinners) - Terminal spinners for Rust
diff --git a/node_modules/cli-spinners/spinners.json b/node_modules/cli-spinners/spinners.json
new file mode 100644
index 0000000..e3ff32d
--- /dev/null
+++ b/node_modules/cli-spinners/spinners.json
@@ -0,0 +1,1295 @@
+{
+ "dots": {
+ "interval": 80,
+ "frames": [
+ "⠋",
+ "⠙",
+ "⠹",
+ "⠸",
+ "⠼",
+ "⠴",
+ "⠦",
+ "⠧",
+ "⠇",
+ "⠏"
+ ]
+ },
+ "dots2": {
+ "interval": 80,
+ "frames": [
+ "⣾",
+ "⣽",
+ "⣻",
+ "⢿",
+ "⡿",
+ "⣟",
+ "⣯",
+ "⣷"
+ ]
+ },
+ "dots3": {
+ "interval": 80,
+ "frames": [
+ "⠋",
+ "⠙",
+ "⠚",
+ "⠞",
+ "⠖",
+ "⠦",
+ "⠴",
+ "⠲",
+ "⠳",
+ "⠓"
+ ]
+ },
+ "dots4": {
+ "interval": 80,
+ "frames": [
+ "⠄",
+ "⠆",
+ "⠇",
+ "⠋",
+ "⠙",
+ "⠸",
+ "⠰",
+ "⠠",
+ "⠰",
+ "⠸",
+ "⠙",
+ "⠋",
+ "⠇",
+ "⠆"
+ ]
+ },
+ "dots5": {
+ "interval": 80,
+ "frames": [
+ "⠋",
+ "⠙",
+ "⠚",
+ "⠒",
+ "⠂",
+ "⠂",
+ "⠒",
+ "⠲",
+ "⠴",
+ "⠦",
+ "⠖",
+ "⠒",
+ "⠐",
+ "⠐",
+ "⠒",
+ "⠓",
+ "⠋"
+ ]
+ },
+ "dots6": {
+ "interval": 80,
+ "frames": [
+ "⠁",
+ "⠉",
+ "⠙",
+ "⠚",
+ "⠒",
+ "⠂",
+ "⠂",
+ "⠒",
+ "⠲",
+ "⠴",
+ "⠤",
+ "⠄",
+ "⠄",
+ "⠤",
+ "⠴",
+ "⠲",
+ "⠒",
+ "⠂",
+ "⠂",
+ "⠒",
+ "⠚",
+ "⠙",
+ "⠉",
+ "⠁"
+ ]
+ },
+ "dots7": {
+ "interval": 80,
+ "frames": [
+ "⠈",
+ "⠉",
+ "⠋",
+ "⠓",
+ "⠒",
+ "⠐",
+ "⠐",
+ "⠒",
+ "⠖",
+ "⠦",
+ "⠤",
+ "⠠",
+ "⠠",
+ "⠤",
+ "⠦",
+ "⠖",
+ "⠒",
+ "⠐",
+ "⠐",
+ "⠒",
+ "⠓",
+ "⠋",
+ "⠉",
+ "⠈"
+ ]
+ },
+ "dots8": {
+ "interval": 80,
+ "frames": [
+ "⠁",
+ "⠁",
+ "⠉",
+ "⠙",
+ "⠚",
+ "⠒",
+ "⠂",
+ "⠂",
+ "⠒",
+ "⠲",
+ "⠴",
+ "⠤",
+ "⠄",
+ "⠄",
+ "⠤",
+ "⠠",
+ "⠠",
+ "⠤",
+ "⠦",
+ "⠖",
+ "⠒",
+ "⠐",
+ "⠐",
+ "⠒",
+ "⠓",
+ "⠋",
+ "⠉",
+ "⠈",
+ "⠈"
+ ]
+ },
+ "dots9": {
+ "interval": 80,
+ "frames": [
+ "⢹",
+ "⢺",
+ "⢼",
+ "⣸",
+ "⣇",
+ "⡧",
+ "⡗",
+ "⡏"
+ ]
+ },
+ "dots10": {
+ "interval": 80,
+ "frames": [
+ "⢄",
+ "⢂",
+ "⢁",
+ "⡁",
+ "⡈",
+ "⡐",
+ "⡠"
+ ]
+ },
+ "dots11": {
+ "interval": 100,
+ "frames": [
+ "⠁",
+ "⠂",
+ "⠄",
+ "⡀",
+ "⢀",
+ "⠠",
+ "⠐",
+ "⠈"
+ ]
+ },
+ "dots12": {
+ "interval": 80,
+ "frames": [
+ "⢀⠀",
+ "⡀⠀",
+ "⠄⠀",
+ "⢂⠀",
+ "⡂⠀",
+ "⠅⠀",
+ "⢃⠀",
+ "⡃⠀",
+ "⠍⠀",
+ "⢋⠀",
+ "⡋⠀",
+ "⠍⠁",
+ "⢋⠁",
+ "⡋⠁",
+ "⠍⠉",
+ "⠋⠉",
+ "⠋⠉",
+ "⠉⠙",
+ "⠉⠙",
+ "⠉⠩",
+ "⠈⢙",
+ "⠈⡙",
+ "⢈⠩",
+ "⡀⢙",
+ "⠄⡙",
+ "⢂⠩",
+ "⡂⢘",
+ "⠅⡘",
+ "⢃⠨",
+ "⡃⢐",
+ "⠍⡐",
+ "⢋⠠",
+ "⡋⢀",
+ "⠍⡁",
+ "⢋⠁",
+ "⡋⠁",
+ "⠍⠉",
+ "⠋⠉",
+ "⠋⠉",
+ "⠉⠙",
+ "⠉⠙",
+ "⠉⠩",
+ "⠈⢙",
+ "⠈⡙",
+ "⠈⠩",
+ "⠀⢙",
+ "⠀⡙",
+ "⠀⠩",
+ "⠀⢘",
+ "⠀⡘",
+ "⠀⠨",
+ "⠀⢐",
+ "⠀⡐",
+ "⠀⠠",
+ "⠀⢀",
+ "⠀⡀"
+ ]
+ },
+ "dots8Bit": {
+ "interval": 80,
+ "frames": [
+ "⠀",
+ "⠁",
+ "⠂",
+ "⠃",
+ "⠄",
+ "⠅",
+ "⠆",
+ "⠇",
+ "⡀",
+ "⡁",
+ "⡂",
+ "⡃",
+ "⡄",
+ "⡅",
+ "⡆",
+ "⡇",
+ "⠈",
+ "⠉",
+ "⠊",
+ "⠋",
+ "⠌",
+ "⠍",
+ "⠎",
+ "⠏",
+ "⡈",
+ "⡉",
+ "⡊",
+ "⡋",
+ "⡌",
+ "⡍",
+ "⡎",
+ "⡏",
+ "⠐",
+ "⠑",
+ "⠒",
+ "⠓",
+ "⠔",
+ "⠕",
+ "⠖",
+ "⠗",
+ "⡐",
+ "⡑",
+ "⡒",
+ "⡓",
+ "⡔",
+ "⡕",
+ "⡖",
+ "⡗",
+ "⠘",
+ "⠙",
+ "⠚",
+ "⠛",
+ "⠜",
+ "⠝",
+ "⠞",
+ "⠟",
+ "⡘",
+ "⡙",
+ "⡚",
+ "⡛",
+ "⡜",
+ "⡝",
+ "⡞",
+ "⡟",
+ "⠠",
+ "⠡",
+ "⠢",
+ "⠣",
+ "⠤",
+ "⠥",
+ "⠦",
+ "⠧",
+ "⡠",
+ "⡡",
+ "⡢",
+ "⡣",
+ "⡤",
+ "⡥",
+ "⡦",
+ "⡧",
+ "⠨",
+ "⠩",
+ "⠪",
+ "⠫",
+ "⠬",
+ "⠭",
+ "⠮",
+ "⠯",
+ "⡨",
+ "⡩",
+ "⡪",
+ "⡫",
+ "⡬",
+ "⡭",
+ "⡮",
+ "⡯",
+ "⠰",
+ "⠱",
+ "⠲",
+ "⠳",
+ "⠴",
+ "⠵",
+ "⠶",
+ "⠷",
+ "⡰",
+ "⡱",
+ "⡲",
+ "⡳",
+ "⡴",
+ "⡵",
+ "⡶",
+ "⡷",
+ "⠸",
+ "⠹",
+ "⠺",
+ "⠻",
+ "⠼",
+ "⠽",
+ "⠾",
+ "⠿",
+ "⡸",
+ "⡹",
+ "⡺",
+ "⡻",
+ "⡼",
+ "⡽",
+ "⡾",
+ "⡿",
+ "⢀",
+ "⢁",
+ "⢂",
+ "⢃",
+ "⢄",
+ "⢅",
+ "⢆",
+ "⢇",
+ "⣀",
+ "⣁",
+ "⣂",
+ "⣃",
+ "⣄",
+ "⣅",
+ "⣆",
+ "⣇",
+ "⢈",
+ "⢉",
+ "⢊",
+ "⢋",
+ "⢌",
+ "⢍",
+ "⢎",
+ "⢏",
+ "⣈",
+ "⣉",
+ "⣊",
+ "⣋",
+ "⣌",
+ "⣍",
+ "⣎",
+ "⣏",
+ "⢐",
+ "⢑",
+ "⢒",
+ "⢓",
+ "⢔",
+ "⢕",
+ "⢖",
+ "⢗",
+ "⣐",
+ "⣑",
+ "⣒",
+ "⣓",
+ "⣔",
+ "⣕",
+ "⣖",
+ "⣗",
+ "⢘",
+ "⢙",
+ "⢚",
+ "⢛",
+ "⢜",
+ "⢝",
+ "⢞",
+ "⢟",
+ "⣘",
+ "⣙",
+ "⣚",
+ "⣛",
+ "⣜",
+ "⣝",
+ "⣞",
+ "⣟",
+ "⢠",
+ "⢡",
+ "⢢",
+ "⢣",
+ "⢤",
+ "⢥",
+ "⢦",
+ "⢧",
+ "⣠",
+ "⣡",
+ "⣢",
+ "⣣",
+ "⣤",
+ "⣥",
+ "⣦",
+ "⣧",
+ "⢨",
+ "⢩",
+ "⢪",
+ "⢫",
+ "⢬",
+ "⢭",
+ "⢮",
+ "⢯",
+ "⣨",
+ "⣩",
+ "⣪",
+ "⣫",
+ "⣬",
+ "⣭",
+ "⣮",
+ "⣯",
+ "⢰",
+ "⢱",
+ "⢲",
+ "⢳",
+ "⢴",
+ "⢵",
+ "⢶",
+ "⢷",
+ "⣰",
+ "⣱",
+ "⣲",
+ "⣳",
+ "⣴",
+ "⣵",
+ "⣶",
+ "⣷",
+ "⢸",
+ "⢹",
+ "⢺",
+ "⢻",
+ "⢼",
+ "⢽",
+ "⢾",
+ "⢿",
+ "⣸",
+ "⣹",
+ "⣺",
+ "⣻",
+ "⣼",
+ "⣽",
+ "⣾",
+ "⣿"
+ ]
+ },
+ "line": {
+ "interval": 130,
+ "frames": [
+ "-",
+ "\\",
+ "|",
+ "/"
+ ]
+ },
+ "line2": {
+ "interval": 100,
+ "frames": [
+ "⠂",
+ "-",
+ "–",
+ "—",
+ "–",
+ "-"
+ ]
+ },
+ "pipe": {
+ "interval": 100,
+ "frames": [
+ "┤",
+ "┘",
+ "┴",
+ "└",
+ "├",
+ "┌",
+ "┬",
+ "┐"
+ ]
+ },
+ "simpleDots": {
+ "interval": 400,
+ "frames": [
+ ". ",
+ ".. ",
+ "...",
+ " "
+ ]
+ },
+ "simpleDotsScrolling": {
+ "interval": 200,
+ "frames": [
+ ". ",
+ ".. ",
+ "...",
+ " ..",
+ " .",
+ " "
+ ]
+ },
+ "star": {
+ "interval": 70,
+ "frames": [
+ "✶",
+ "✸",
+ "✹",
+ "✺",
+ "✹",
+ "✷"
+ ]
+ },
+ "star2": {
+ "interval": 80,
+ "frames": [
+ "+",
+ "x",
+ "*"
+ ]
+ },
+ "flip": {
+ "interval": 70,
+ "frames": [
+ "_",
+ "_",
+ "_",
+ "-",
+ "`",
+ "`",
+ "'",
+ "´",
+ "-",
+ "_",
+ "_",
+ "_"
+ ]
+ },
+ "hamburger": {
+ "interval": 100,
+ "frames": [
+ "☱",
+ "☲",
+ "☴"
+ ]
+ },
+ "growVertical": {
+ "interval": 120,
+ "frames": [
+ "▁",
+ "▃",
+ "▄",
+ "▅",
+ "▆",
+ "▇",
+ "▆",
+ "▅",
+ "▄",
+ "▃"
+ ]
+ },
+ "growHorizontal": {
+ "interval": 120,
+ "frames": [
+ "▏",
+ "▎",
+ "▍",
+ "▌",
+ "▋",
+ "▊",
+ "▉",
+ "▊",
+ "▋",
+ "▌",
+ "▍",
+ "▎"
+ ]
+ },
+ "balloon": {
+ "interval": 140,
+ "frames": [
+ " ",
+ ".",
+ "o",
+ "O",
+ "@",
+ "*",
+ " "
+ ]
+ },
+ "balloon2": {
+ "interval": 120,
+ "frames": [
+ ".",
+ "o",
+ "O",
+ "°",
+ "O",
+ "o",
+ "."
+ ]
+ },
+ "noise": {
+ "interval": 100,
+ "frames": [
+ "▓",
+ "▒",
+ "░"
+ ]
+ },
+ "bounce": {
+ "interval": 120,
+ "frames": [
+ "⠁",
+ "⠂",
+ "⠄",
+ "⠂"
+ ]
+ },
+ "boxBounce": {
+ "interval": 120,
+ "frames": [
+ "▖",
+ "▘",
+ "▝",
+ "▗"
+ ]
+ },
+ "boxBounce2": {
+ "interval": 100,
+ "frames": [
+ "▌",
+ "▀",
+ "▐",
+ "▄"
+ ]
+ },
+ "triangle": {
+ "interval": 50,
+ "frames": [
+ "◢",
+ "◣",
+ "◤",
+ "◥"
+ ]
+ },
+ "arc": {
+ "interval": 100,
+ "frames": [
+ "◜",
+ "◠",
+ "◝",
+ "◞",
+ "◡",
+ "◟"
+ ]
+ },
+ "circle": {
+ "interval": 120,
+ "frames": [
+ "◡",
+ "⊙",
+ "◠"
+ ]
+ },
+ "squareCorners": {
+ "interval": 180,
+ "frames": [
+ "◰",
+ "◳",
+ "◲",
+ "◱"
+ ]
+ },
+ "circleQuarters": {
+ "interval": 120,
+ "frames": [
+ "◴",
+ "◷",
+ "◶",
+ "◵"
+ ]
+ },
+ "circleHalves": {
+ "interval": 50,
+ "frames": [
+ "◐",
+ "◓",
+ "◑",
+ "◒"
+ ]
+ },
+ "squish": {
+ "interval": 100,
+ "frames": [
+ "╫",
+ "╪"
+ ]
+ },
+ "toggle": {
+ "interval": 250,
+ "frames": [
+ "⊶",
+ "⊷"
+ ]
+ },
+ "toggle2": {
+ "interval": 80,
+ "frames": [
+ "▫",
+ "▪"
+ ]
+ },
+ "toggle3": {
+ "interval": 120,
+ "frames": [
+ "□",
+ "■"
+ ]
+ },
+ "toggle4": {
+ "interval": 100,
+ "frames": [
+ "■",
+ "□",
+ "▪",
+ "▫"
+ ]
+ },
+ "toggle5": {
+ "interval": 100,
+ "frames": [
+ "▮",
+ "▯"
+ ]
+ },
+ "toggle6": {
+ "interval": 300,
+ "frames": [
+ "ဝ",
+ "၀"
+ ]
+ },
+ "toggle7": {
+ "interval": 80,
+ "frames": [
+ "⦾",
+ "⦿"
+ ]
+ },
+ "toggle8": {
+ "interval": 100,
+ "frames": [
+ "◍",
+ "◌"
+ ]
+ },
+ "toggle9": {
+ "interval": 100,
+ "frames": [
+ "◉",
+ "◎"
+ ]
+ },
+ "toggle10": {
+ "interval": 100,
+ "frames": [
+ "㊂",
+ "㊀",
+ "㊁"
+ ]
+ },
+ "toggle11": {
+ "interval": 50,
+ "frames": [
+ "⧇",
+ "⧆"
+ ]
+ },
+ "toggle12": {
+ "interval": 120,
+ "frames": [
+ "☗",
+ "☖"
+ ]
+ },
+ "toggle13": {
+ "interval": 80,
+ "frames": [
+ "=",
+ "*",
+ "-"
+ ]
+ },
+ "arrow": {
+ "interval": 100,
+ "frames": [
+ "←",
+ "↖",
+ "↑",
+ "↗",
+ "→",
+ "↘",
+ "↓",
+ "↙"
+ ]
+ },
+ "arrow2": {
+ "interval": 80,
+ "frames": [
+ "⬆️ ",
+ "↗️ ",
+ "➡️ ",
+ "↘️ ",
+ "⬇️ ",
+ "↙️ ",
+ "⬅️ ",
+ "↖️ "
+ ]
+ },
+ "arrow3": {
+ "interval": 120,
+ "frames": [
+ "▹▹▹▹▹",
+ "▸▹▹▹▹",
+ "▹▸▹▹▹",
+ "▹▹▸▹▹",
+ "▹▹▹▸▹",
+ "▹▹▹▹▸"
+ ]
+ },
+ "bouncingBar": {
+ "interval": 80,
+ "frames": [
+ "[ ]",
+ "[= ]",
+ "[== ]",
+ "[=== ]",
+ "[ ===]",
+ "[ ==]",
+ "[ =]",
+ "[ ]",
+ "[ =]",
+ "[ ==]",
+ "[ ===]",
+ "[====]",
+ "[=== ]",
+ "[== ]",
+ "[= ]"
+ ]
+ },
+ "bouncingBall": {
+ "interval": 80,
+ "frames": [
+ "( ● )",
+ "( ● )",
+ "( ● )",
+ "( ● )",
+ "( ●)",
+ "( ● )",
+ "( ● )",
+ "( ● )",
+ "( ● )",
+ "(● )"
+ ]
+ },
+ "smiley": {
+ "interval": 200,
+ "frames": [
+ "😄 ",
+ "😝 "
+ ]
+ },
+ "monkey": {
+ "interval": 300,
+ "frames": [
+ "🙈 ",
+ "🙈 ",
+ "🙉 ",
+ "🙊 "
+ ]
+ },
+ "hearts": {
+ "interval": 100,
+ "frames": [
+ "💛 ",
+ "💙 ",
+ "💜 ",
+ "💚 ",
+ "❤️ "
+ ]
+ },
+ "clock": {
+ "interval": 100,
+ "frames": [
+ "🕛 ",
+ "🕐 ",
+ "🕑 ",
+ "🕒 ",
+ "🕓 ",
+ "🕔 ",
+ "🕕 ",
+ "🕖 ",
+ "🕗 ",
+ "🕘 ",
+ "🕙 ",
+ "🕚 "
+ ]
+ },
+ "earth": {
+ "interval": 180,
+ "frames": [
+ "🌍 ",
+ "🌎 ",
+ "🌏 "
+ ]
+ },
+ "material": {
+ "interval": 17,
+ "frames": [
+ "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "███████▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "████████▁▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "██████████▁▁▁▁▁▁▁▁▁▁",
+ "███████████▁▁▁▁▁▁▁▁▁",
+ "█████████████▁▁▁▁▁▁▁",
+ "██████████████▁▁▁▁▁▁",
+ "██████████████▁▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁▁██████████████▁▁▁▁",
+ "▁▁▁██████████████▁▁▁",
+ "▁▁▁▁█████████████▁▁▁",
+ "▁▁▁▁██████████████▁▁",
+ "▁▁▁▁██████████████▁▁",
+ "▁▁▁▁▁██████████████▁",
+ "▁▁▁▁▁██████████████▁",
+ "▁▁▁▁▁██████████████▁",
+ "▁▁▁▁▁▁██████████████",
+ "▁▁▁▁▁▁██████████████",
+ "▁▁▁▁▁▁▁█████████████",
+ "▁▁▁▁▁▁▁█████████████",
+ "▁▁▁▁▁▁▁▁████████████",
+ "▁▁▁▁▁▁▁▁████████████",
+ "▁▁▁▁▁▁▁▁▁███████████",
+ "▁▁▁▁▁▁▁▁▁███████████",
+ "▁▁▁▁▁▁▁▁▁▁██████████",
+ "▁▁▁▁▁▁▁▁▁▁██████████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁████████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
+ "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
+ "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
+ "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "██████▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "████████▁▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
+ "███████████▁▁▁▁▁▁▁▁▁",
+ "████████████▁▁▁▁▁▁▁▁",
+ "████████████▁▁▁▁▁▁▁▁",
+ "██████████████▁▁▁▁▁▁",
+ "██████████████▁▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁██████████████▁▁▁▁▁",
+ "▁▁▁█████████████▁▁▁▁",
+ "▁▁▁▁▁████████████▁▁▁",
+ "▁▁▁▁▁████████████▁▁▁",
+ "▁▁▁▁▁▁███████████▁▁▁",
+ "▁▁▁▁▁▁▁▁█████████▁▁▁",
+ "▁▁▁▁▁▁▁▁█████████▁▁▁",
+ "▁▁▁▁▁▁▁▁▁█████████▁▁",
+ "▁▁▁▁▁▁▁▁▁█████████▁▁",
+ "▁▁▁▁▁▁▁▁▁▁█████████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁████████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁████████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"
+ ]
+ },
+ "moon": {
+ "interval": 80,
+ "frames": [
+ "🌑 ",
+ "🌒 ",
+ "🌓 ",
+ "🌔 ",
+ "🌕 ",
+ "🌖 ",
+ "🌗 ",
+ "🌘 "
+ ]
+ },
+ "runner": {
+ "interval": 140,
+ "frames": [
+ "🚶 ",
+ "🏃 "
+ ]
+ },
+ "pong": {
+ "interval": 80,
+ "frames": [
+ "▐⠂ ▌",
+ "▐⠈ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⡀ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠈ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⡀ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠈ ▌",
+ "▐ ⠂▌",
+ "▐ ⠠▌",
+ "▐ ⡀▌",
+ "▐ ⠠ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠈ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⡀ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠈ ▌",
+ "▐ ⠂ ▌",
+ "▐ ⠠ ▌",
+ "▐ ⡀ ▌",
+ "▐⠠ ▌"
+ ]
+ },
+ "shark": {
+ "interval": 120,
+ "frames": [
+ "▐|\\____________▌",
+ "▐_|\\___________▌",
+ "▐__|\\__________▌",
+ "▐___|\\_________▌",
+ "▐____|\\________▌",
+ "▐_____|\\_______▌",
+ "▐______|\\______▌",
+ "▐_______|\\_____▌",
+ "▐________|\\____▌",
+ "▐_________|\\___▌",
+ "▐__________|\\__▌",
+ "▐___________|\\_▌",
+ "▐____________|\\▌",
+ "▐____________/|▌",
+ "▐___________/|_▌",
+ "▐__________/|__▌",
+ "▐_________/|___▌",
+ "▐________/|____▌",
+ "▐_______/|_____▌",
+ "▐______/|______▌",
+ "▐_____/|_______▌",
+ "▐____/|________▌",
+ "▐___/|_________▌",
+ "▐__/|__________▌",
+ "▐_/|___________▌",
+ "▐/|____________▌"
+ ]
+ },
+ "dqpb": {
+ "interval": 100,
+ "frames": [
+ "d",
+ "q",
+ "p",
+ "b"
+ ]
+ },
+ "weather": {
+ "interval": 100,
+ "frames": [
+ "☀️ ",
+ "☀️ ",
+ "☀️ ",
+ "🌤 ",
+ "⛅️ ",
+ "🌥 ",
+ "☁️ ",
+ "🌧 ",
+ "🌨 ",
+ "🌧 ",
+ "🌨 ",
+ "🌧 ",
+ "🌨 ",
+ "⛈ ",
+ "🌨 ",
+ "🌧 ",
+ "🌨 ",
+ "☁️ ",
+ "🌥 ",
+ "⛅️ ",
+ "🌤 ",
+ "☀️ ",
+ "☀️ "
+ ]
+ },
+ "christmas": {
+ "interval": 400,
+ "frames": [
+ "🌲",
+ "🎄"
+ ]
+ },
+ "grenade": {
+ "interval": 80,
+ "frames": [
+ "، ",
+ "′ ",
+ " ´ ",
+ " ‾ ",
+ " ⸌",
+ " ⸊",
+ " |",
+ " ⁎",
+ " ⁕",
+ " ෴ ",
+ " ⁓",
+ " ",
+ " ",
+ " "
+ ]
+ },
+ "point": {
+ "interval": 125,
+ "frames": [
+ "∙∙∙",
+ "●∙∙",
+ "∙●∙",
+ "∙∙●",
+ "∙∙∙"
+ ]
+ },
+ "layer": {
+ "interval": 150,
+ "frames": [
+ "-",
+ "=",
+ "≡"
+ ]
+ },
+ "betaWave": {
+ "interval": 80,
+ "frames": [
+ "ρββββββ",
+ "βρβββββ",
+ "ββρββββ",
+ "βββρβββ",
+ "ββββρββ",
+ "βββββρβ",
+ "ββββββρ"
+ ]
+ },
+ "aesthetic": {
+ "interval": 80,
+ "frames": [
+ "▰▱▱▱▱▱▱",
+ "▰▰▱▱▱▱▱",
+ "▰▰▰▱▱▱▱",
+ "▰▰▰▰▱▱▱",
+ "▰▰▰▰▰▱▱",
+ "▰▰▰▰▰▰▱",
+ "▰▰▰▰▰▰▰",
+ "▰▱▱▱▱▱▱"
+ ]
+ }
+}
diff --git a/node_modules/clone/.npmignore b/node_modules/clone/.npmignore
new file mode 100644
index 0000000..c797cbf
--- /dev/null
+++ b/node_modules/clone/.npmignore
@@ -0,0 +1,4 @@
+/node_modules/
+/test.js
+/*.html
+/.travis.yml
diff --git a/node_modules/clone/LICENSE b/node_modules/clone/LICENSE
new file mode 100644
index 0000000..cc3c87b
--- /dev/null
+++ b/node_modules/clone/LICENSE
@@ -0,0 +1,18 @@
+Copyright © 2011-2015 Paul Vorbach <paul@vorba.ch>
+
+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:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+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, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/clone/README.md b/node_modules/clone/README.md
new file mode 100644
index 0000000..0b6ceca
--- /dev/null
+++ b/node_modules/clone/README.md
@@ -0,0 +1,126 @@
+# clone
+
+[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone)
+
+[![info badge](https://nodei.co/npm/clone.png?downloads=true&downloadRank=true&stars=true)](http://npm-stat.com/charts.html?package=clone)
+
+offers foolproof _deep cloning_ of objects, arrays, numbers, strings etc. in JavaScript.
+
+
+## Installation
+
+ npm install clone
+
+(It also works with browserify, ender or standalone.)
+
+
+## Example
+
+~~~ javascript
+var clone = require('clone');
+
+var a, b;
+
+a = { foo: { bar: 'baz' } }; // initial value of a
+
+b = clone(a); // clone a -> b
+a.foo.bar = 'foo'; // change a
+
+console.log(a); // show a
+console.log(b); // show b
+~~~
+
+This will print:
+
+~~~ javascript
+{ foo: { bar: 'foo' } }
+{ foo: { bar: 'baz' } }
+~~~
+
+**clone** masters cloning simple objects (even with custom prototype), arrays,
+Date objects, and RegExp objects. Everything is cloned recursively, so that you
+can clone dates in arrays in objects, for example.
+
+
+## API
+
+`clone(val, circular, depth)`
+
+ * `val` -- the value that you want to clone, any type allowed
+ * `circular` -- boolean
+
+ Call `clone` with `circular` set to `false` if you are certain that `obj`
+ contains no circular references. This will give better performance if needed.
+ There is no error if `undefined` or `null` is passed as `obj`.
+ * `depth` -- depth to which the object is to be cloned (optional,
+ defaults to infinity)
+
+`clone.clonePrototype(obj)`
+
+ * `obj` -- the object that you want to clone
+
+Does a prototype clone as
+[described by Oran Looney](http://oranlooney.com/functional-javascript/).
+
+
+## Circular References
+
+~~~ javascript
+var a, b;
+
+a = { hello: 'world' };
+
+a.myself = a;
+b = clone(a);
+
+console.log(b);
+~~~
+
+This will print:
+
+~~~ javascript
+{ hello: "world", myself: [Circular] }
+~~~
+
+So, `b.myself` points to `b`, not `a`. Neat!
+
+
+## Test
+
+ npm test
+
+
+## Caveat
+
+Some special objects like a socket or `process.stdout`/`stderr` are known to not
+be cloneable. If you find other objects that cannot be cloned, please [open an
+issue](https://github.com/pvorb/node-clone/issues/new).
+
+
+## Bugs and Issues
+
+If you encounter any bugs or issues, feel free to [open an issue at
+github](https://github.com/pvorb/node-clone/issues) or send me an email to
+<paul@vorba.ch>. I also always like to hear from you, if you’re using my code.
+
+## License
+
+Copyright © 2011-2015 [Paul Vorbach](http://paul.vorba.ch/) and
+[contributors](https://github.com/pvorb/node-clone/graphs/contributors).
+
+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:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+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, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/clone/clone.iml b/node_modules/clone/clone.iml
new file mode 100644
index 0000000..30de8ae
--- /dev/null
+++ b/node_modules/clone/clone.iml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="clone node_modules" level="project" />
+ </component>
+</module> \ No newline at end of file
diff --git a/node_modules/clone/clone.js b/node_modules/clone/clone.js
new file mode 100644
index 0000000..ba200c2
--- /dev/null
+++ b/node_modules/clone/clone.js
@@ -0,0 +1,166 @@
+var clone = (function() {
+'use strict';
+
+/**
+ * Clones (copies) an Object using deep copying.
+ *
+ * This function supports circular references by default, but if you are certain
+ * there are no circular references in your object, you can save some CPU time
+ * by calling clone(obj, false).
+ *
+ * Caution: if `circular` is false and `parent` contains circular references,
+ * your program may enter an infinite loop and crash.
+ *
+ * @param `parent` - the object to be cloned
+ * @param `circular` - set to true if the object to be cloned may contain
+ * circular references. (optional - true by default)
+ * @param `depth` - set to a number if the object is only to be cloned to
+ * a particular depth. (optional - defaults to Infinity)
+ * @param `prototype` - sets the prototype to be used when cloning an object.
+ * (optional - defaults to parent prototype).
+*/
+function clone(parent, circular, depth, prototype) {
+ var filter;
+ if (typeof circular === 'object') {
+ depth = circular.depth;
+ prototype = circular.prototype;
+ filter = circular.filter;
+ circular = circular.circular
+ }
+ // maintain two arrays for circular references, where corresponding parents
+ // and children have the same index
+ var allParents = [];
+ var allChildren = [];
+
+ var useBuffer = typeof Buffer != 'undefined';
+
+ if (typeof circular == 'undefined')
+ circular = true;
+
+ if (typeof depth == 'undefined')
+ depth = Infinity;
+
+ // recurse this function so we don't reset allParents and allChildren
+ function _clone(parent, depth) {
+ // cloning null always returns null
+ if (parent === null)
+ return null;
+
+ if (depth == 0)
+ return parent;
+
+ var child;
+ var proto;
+ if (typeof parent != 'object') {
+ return parent;
+ }
+
+ if (clone.__isArray(parent)) {
+ child = [];
+ } else if (clone.__isRegExp(parent)) {
+ child = new RegExp(parent.source, __getRegExpFlags(parent));
+ if (parent.lastIndex) child.lastIndex = parent.lastIndex;
+ } else if (clone.__isDate(parent)) {
+ child = new Date(parent.getTime());
+ } else if (useBuffer && Buffer.isBuffer(parent)) {
+ if (Buffer.allocUnsafe) {
+ // Node.js >= 4.5.0
+ child = Buffer.allocUnsafe(parent.length);
+ } else {
+ // Older Node.js versions
+ child = new Buffer(parent.length);
+ }
+ parent.copy(child);
+ return child;
+ } else {
+ if (typeof prototype == 'undefined') {
+ proto = Object.getPrototypeOf(parent);
+ child = Object.create(proto);
+ }
+ else {
+ child = Object.create(prototype);
+ proto = prototype;
+ }
+ }
+
+ if (circular) {
+ var index = allParents.indexOf(parent);
+
+ if (index != -1) {
+ return allChildren[index];
+ }
+ allParents.push(parent);
+ allChildren.push(child);
+ }
+
+ for (var i in parent) {
+ var attrs;
+ if (proto) {
+ attrs = Object.getOwnPropertyDescriptor(proto, i);
+ }
+
+ if (attrs && attrs.set == null) {
+ continue;
+ }
+ child[i] = _clone(parent[i], depth - 1);
+ }
+
+ return child;
+ }
+
+ return _clone(parent, depth);
+}
+
+/**
+ * Simple flat clone using prototype, accepts only objects, usefull for property
+ * override on FLAT configuration object (no nested props).
+ *
+ * USE WITH CAUTION! This may not behave as you wish if you do not know how this
+ * works.
+ */
+clone.clonePrototype = function clonePrototype(parent) {
+ if (parent === null)
+ return null;
+
+ var c = function () {};
+ c.prototype = parent;
+ return new c();
+};
+
+// private utility functions
+
+function __objToStr(o) {
+ return Object.prototype.toString.call(o);
+};
+clone.__objToStr = __objToStr;
+
+function __isDate(o) {
+ return typeof o === 'object' && __objToStr(o) === '[object Date]';
+};
+clone.__isDate = __isDate;
+
+function __isArray(o) {
+ return typeof o === 'object' && __objToStr(o) === '[object Array]';
+};
+clone.__isArray = __isArray;
+
+function __isRegExp(o) {
+ return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
+};
+clone.__isRegExp = __isRegExp;
+
+function __getRegExpFlags(re) {
+ var flags = '';
+ if (re.global) flags += 'g';
+ if (re.ignoreCase) flags += 'i';
+ if (re.multiline) flags += 'm';
+ return flags;
+};
+clone.__getRegExpFlags = __getRegExpFlags;
+
+return clone;
+})();
+
+if (typeof module === 'object' && module.exports) {
+ module.exports = clone;
+}
diff --git a/node_modules/clone/package.json b/node_modules/clone/package.json
new file mode 100644
index 0000000..e7e5269
--- /dev/null
+++ b/node_modules/clone/package.json
@@ -0,0 +1,140 @@
+{
+ "_args": [
+ [
+ "clone@1.0.4",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "clone@1.0.4",
+ "_id": "clone@1.0.4",
+ "_inBundle": false,
+ "_integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
+ "_location": "/clone",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "clone@1.0.4",
+ "name": "clone",
+ "escapedName": "clone",
+ "rawSpec": "1.0.4",
+ "saveSpec": null,
+ "fetchSpec": "1.0.4"
+ },
+ "_requiredBy": [
+ "/defaults"
+ ],
+ "_resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "_spec": "1.0.4",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Paul Vorbach",
+ "email": "paul@vorba.ch",
+ "url": "http://paul.vorba.ch/"
+ },
+ "bugs": {
+ "url": "https://github.com/pvorb/node-clone/issues"
+ },
+ "contributors": [
+ {
+ "name": "Blake Miner",
+ "email": "miner.blake@gmail.com",
+ "url": "http://www.blakeminer.com/"
+ },
+ {
+ "name": "Tian You",
+ "email": "axqd001@gmail.com",
+ "url": "http://blog.axqd.net/"
+ },
+ {
+ "name": "George Stagas",
+ "email": "gstagas@gmail.com",
+ "url": "http://stagas.com/"
+ },
+ {
+ "name": "Tobiasz Cudnik",
+ "email": "tobiasz.cudnik@gmail.com",
+ "url": "https://github.com/TobiaszCudnik"
+ },
+ {
+ "name": "Pavel Lang",
+ "email": "langpavel@phpskelet.org",
+ "url": "https://github.com/langpavel"
+ },
+ {
+ "name": "Dan MacTough",
+ "url": "http://yabfog.com/"
+ },
+ {
+ "name": "w1nk",
+ "url": "https://github.com/w1nk"
+ },
+ {
+ "name": "Hugh Kennedy",
+ "url": "http://twitter.com/hughskennedy"
+ },
+ {
+ "name": "Dustin Diaz",
+ "url": "http://dustindiaz.com"
+ },
+ {
+ "name": "Ilya Shaisultanov",
+ "url": "https://github.com/diversario"
+ },
+ {
+ "name": "Nathan MacInnes",
+ "email": "nathan@macinn.es",
+ "url": "http://macinn.es/"
+ },
+ {
+ "name": "Benjamin E. Coe",
+ "email": "ben@npmjs.com",
+ "url": "https://twitter.com/benjamincoe"
+ },
+ {
+ "name": "Nathan Zadoks",
+ "url": "https://github.com/nathan7"
+ },
+ {
+ "name": "Róbert Oroszi",
+ "email": "robert+gh@oroszi.net",
+ "url": "https://github.com/oroce"
+ },
+ {
+ "name": "Aurélio A. Heckert",
+ "url": "http://softwarelivre.org/aurium"
+ },
+ {
+ "name": "Guy Ellis",
+ "url": "http://www.guyellisrocks.com/"
+ }
+ ],
+ "dependencies": {},
+ "description": "deep cloning of objects and arrays",
+ "devDependencies": {
+ "nodeunit": "~0.9.0"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "homepage": "https://github.com/pvorb/node-clone#readme",
+ "license": "MIT",
+ "main": "clone.js",
+ "name": "clone",
+ "optionalDependencies": {},
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/pvorb/node-clone.git"
+ },
+ "scripts": {
+ "test": "nodeunit test.js"
+ },
+ "tags": [
+ "clone",
+ "object",
+ "array",
+ "function",
+ "date"
+ ],
+ "version": "1.0.4"
+}
diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md
new file mode 100644
index 0000000..0a7bce4
--- /dev/null
+++ b/node_modules/color-convert/CHANGELOG.md
@@ -0,0 +1,54 @@
+# 1.0.0 - 2016-01-07
+
+- Removed: unused speed test
+- Added: Automatic routing between previously unsupported conversions
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Removed: `convert()` class
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Changed: all functions to lookup dictionary
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Changed: `ansi` to `ansi256`
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Fixed: argument grouping for functions requiring only one argument
+([#27](https://github.com/Qix-/color-convert/pull/27))
+
+# 0.6.0 - 2015-07-23
+
+- Added: methods to handle
+[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors:
+ - rgb2ansi16
+ - rgb2ansi
+ - hsl2ansi16
+ - hsl2ansi
+ - hsv2ansi16
+ - hsv2ansi
+ - hwb2ansi16
+ - hwb2ansi
+ - cmyk2ansi16
+ - cmyk2ansi
+ - keyword2ansi16
+ - keyword2ansi
+ - ansi162rgb
+ - ansi162hsl
+ - ansi162hsv
+ - ansi162hwb
+ - ansi162cmyk
+ - ansi162keyword
+ - ansi2rgb
+ - ansi2hsl
+ - ansi2hsv
+ - ansi2hwb
+ - ansi2cmyk
+ - ansi2keyword
+([#18](https://github.com/harthur/color-convert/pull/18))
+
+# 0.5.3 - 2015-06-02
+
+- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]`
+([#15](https://github.com/harthur/color-convert/issues/15))
+
+---
+
+Check out commit logs for older releases
diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE
new file mode 100644
index 0000000..5b4c386
--- /dev/null
+++ b/node_modules/color-convert/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>
+
+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:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+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.
+
diff --git a/node_modules/color-convert/README.md b/node_modules/color-convert/README.md
new file mode 100644
index 0000000..d4b08fc
--- /dev/null
+++ b/node_modules/color-convert/README.md
@@ -0,0 +1,68 @@
+# color-convert
+
+[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert)
+
+Color-convert is a color conversion library for JavaScript and node.
+It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest):
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hsl(140, 200, 100); // [96, 48, 59]
+convert.keyword.rgb('blue'); // [0, 0, 255]
+
+var rgbChannels = convert.rgb.channels; // 3
+var cmykChannels = convert.cmyk.channels; // 4
+var ansiChannels = convert.ansi16.channels; // 1
+```
+
+# Install
+
+```console
+$ npm install color-convert
+```
+
+# API
+
+Simply get the property of the _from_ and _to_ conversion that you're looking for.
+
+All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function.
+
+All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha).
+
+```js
+var convert = require('color-convert');
+
+// Hex to LAB
+convert.hex.lab('DEADBF'); // [ 76, 21, -2 ]
+convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ]
+
+// RGB to CMYK
+convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ]
+convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ]
+```
+
+### Arrays
+All functions that accept multiple arguments also support passing an array.
+
+Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.)
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hex(123, 45, 67); // '7B2D43'
+convert.rgb.hex([123, 45, 67]); // '7B2D43'
+```
+
+## Routing
+
+Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex).
+
+Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js).
+
+# Contribute
+
+If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request.
+
+# License
+Copyright &copy; 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE).
diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js
new file mode 100644
index 0000000..2657f26
--- /dev/null
+++ b/node_modules/color-convert/conversions.js
@@ -0,0 +1,839 @@
+/* MIT license */
+/* eslint-disable no-mixed-operators */
+const cssKeywords = require('color-name');
+
+// NOTE: conversions should only return primitive values (i.e. arrays, or
+// values that give correct `typeof` results).
+// do not use box values types (i.e. Number(), String(), etc.)
+
+const reverseKeywords = {};
+for (const key of Object.keys(cssKeywords)) {
+ reverseKeywords[cssKeywords[key]] = key;
+}
+
+const convert = {
+ rgb: {channels: 3, labels: 'rgb'},
+ hsl: {channels: 3, labels: 'hsl'},
+ hsv: {channels: 3, labels: 'hsv'},
+ hwb: {channels: 3, labels: 'hwb'},
+ cmyk: {channels: 4, labels: 'cmyk'},
+ xyz: {channels: 3, labels: 'xyz'},
+ lab: {channels: 3, labels: 'lab'},
+ lch: {channels: 3, labels: 'lch'},
+ hex: {channels: 1, labels: ['hex']},
+ keyword: {channels: 1, labels: ['keyword']},
+ ansi16: {channels: 1, labels: ['ansi16']},
+ ansi256: {channels: 1, labels: ['ansi256']},
+ hcg: {channels: 3, labels: ['h', 'c', 'g']},
+ apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
+ gray: {channels: 1, labels: ['gray']}
+};
+
+module.exports = convert;
+
+// Hide .channels and .labels properties
+for (const model of Object.keys(convert)) {
+ if (!('channels' in convert[model])) {
+ throw new Error('missing channels property: ' + model);
+ }
+
+ if (!('labels' in convert[model])) {
+ throw new Error('missing channel labels property: ' + model);
+ }
+
+ if (convert[model].labels.length !== convert[model].channels) {
+ throw new Error('channel and label counts mismatch: ' + model);
+ }
+
+ const {channels, labels} = convert[model];
+ delete convert[model].channels;
+ delete convert[model].labels;
+ Object.defineProperty(convert[model], 'channels', {value: channels});
+ Object.defineProperty(convert[model], 'labels', {value: labels});
+}
+
+convert.rgb.hsl = function (rgb) {
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+ const min = Math.min(r, g, b);
+ const max = Math.max(r, g, b);
+ const delta = max - min;
+ let h;
+ let s;
+
+ if (max === min) {
+ h = 0;
+ } else if (r === max) {
+ h = (g - b) / delta;
+ } else if (g === max) {
+ h = 2 + (b - r) / delta;
+ } else if (b === max) {
+ h = 4 + (r - g) / delta;
+ }
+
+ h = Math.min(h * 60, 360);
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ const l = (min + max) / 2;
+
+ if (max === min) {
+ s = 0;
+ } else if (l <= 0.5) {
+ s = delta / (max + min);
+ } else {
+ s = delta / (2 - max - min);
+ }
+
+ return [h, s * 100, l * 100];
+};
+
+convert.rgb.hsv = function (rgb) {
+ let rdif;
+ let gdif;
+ let bdif;
+ let h;
+ let s;
+
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+ const v = Math.max(r, g, b);
+ const diff = v - Math.min(r, g, b);
+ const diffc = function (c) {
+ return (v - c) / 6 / diff + 1 / 2;
+ };
+
+ if (diff === 0) {
+ h = 0;
+ s = 0;
+ } else {
+ s = diff / v;
+ rdif = diffc(r);
+ gdif = diffc(g);
+ bdif = diffc(b);
+
+ if (r === v) {
+ h = bdif - gdif;
+ } else if (g === v) {
+ h = (1 / 3) + rdif - bdif;
+ } else if (b === v) {
+ h = (2 / 3) + gdif - rdif;
+ }
+
+ if (h < 0) {
+ h += 1;
+ } else if (h > 1) {
+ h -= 1;
+ }
+ }
+
+ return [
+ h * 360,
+ s * 100,
+ v * 100
+ ];
+};
+
+convert.rgb.hwb = function (rgb) {
+ const r = rgb[0];
+ const g = rgb[1];
+ let b = rgb[2];
+ const h = convert.rgb.hsl(rgb)[0];
+ const w = 1 / 255 * Math.min(r, Math.min(g, b));
+
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
+
+ return [h, w * 100, b * 100];
+};
+
+convert.rgb.cmyk = function (rgb) {
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+
+ const k = Math.min(1 - r, 1 - g, 1 - b);
+ const c = (1 - r - k) / (1 - k) || 0;
+ const m = (1 - g - k) / (1 - k) || 0;
+ const y = (1 - b - k) / (1 - k) || 0;
+
+ return [c * 100, m * 100, y * 100, k * 100];
+};
+
+function comparativeDistance(x, y) {
+ /*
+ See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
+ */
+ return (
+ ((x[0] - y[0]) ** 2) +
+ ((x[1] - y[1]) ** 2) +
+ ((x[2] - y[2]) ** 2)
+ );
+}
+
+convert.rgb.keyword = function (rgb) {
+ const reversed = reverseKeywords[rgb];
+ if (reversed) {
+ return reversed;
+ }
+
+ let currentClosestDistance = Infinity;
+ let currentClosestKeyword;
+
+ for (const keyword of Object.keys(cssKeywords)) {
+ const value = cssKeywords[keyword];
+
+ // Compute comparative distance
+ const distance = comparativeDistance(rgb, value);
+
+ // Check if its less, if so set as closest
+ if (distance < currentClosestDistance) {
+ currentClosestDistance = distance;
+ currentClosestKeyword = keyword;
+ }
+ }
+
+ return currentClosestKeyword;
+};
+
+convert.keyword.rgb = function (keyword) {
+ return cssKeywords[keyword];
+};
+
+convert.rgb.xyz = function (rgb) {
+ let r = rgb[0] / 255;
+ let g = rgb[1] / 255;
+ let b = rgb[2] / 255;
+
+ // Assume sRGB
+ r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);
+ g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);
+ b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);
+
+ const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
+ const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
+ const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
+
+ return [x * 100, y * 100, z * 100];
+};
+
+convert.rgb.lab = function (rgb) {
+ const xyz = convert.rgb.xyz(rgb);
+ let x = xyz[0];
+ let y = xyz[1];
+ let z = xyz[2];
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
+
+ const l = (116 * y) - 16;
+ const a = 500 * (x - y);
+ const b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.hsl.rgb = function (hsl) {
+ const h = hsl[0] / 360;
+ const s = hsl[1] / 100;
+ const l = hsl[2] / 100;
+ let t2;
+ let t3;
+ let val;
+
+ if (s === 0) {
+ val = l * 255;
+ return [val, val, val];
+ }
+
+ if (l < 0.5) {
+ t2 = l * (1 + s);
+ } else {
+ t2 = l + s - l * s;
+ }
+
+ const t1 = 2 * l - t2;
+
+ const rgb = [0, 0, 0];
+ for (let i = 0; i < 3; i++) {
+ t3 = h + 1 / 3 * -(i - 1);
+ if (t3 < 0) {
+ t3++;
+ }
+
+ if (t3 > 1) {
+ t3--;
+ }
+
+ if (6 * t3 < 1) {
+ val = t1 + (t2 - t1) * 6 * t3;
+ } else if (2 * t3 < 1) {
+ val = t2;
+ } else if (3 * t3 < 2) {
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
+ } else {
+ val = t1;
+ }
+
+ rgb[i] = val * 255;
+ }
+
+ return rgb;
+};
+
+convert.hsl.hsv = function (hsl) {
+ const h = hsl[0];
+ let s = hsl[1] / 100;
+ let l = hsl[2] / 100;
+ let smin = s;
+ const lmin = Math.max(l, 0.01);
+
+ l *= 2;
+ s *= (l <= 1) ? l : 2 - l;
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
+ const v = (l + s) / 2;
+ const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
+
+ return [h, sv * 100, v * 100];
+};
+
+convert.hsv.rgb = function (hsv) {
+ const h = hsv[0] / 60;
+ const s = hsv[1] / 100;
+ let v = hsv[2] / 100;
+ const hi = Math.floor(h) % 6;
+
+ const f = h - Math.floor(h);
+ const p = 255 * v * (1 - s);
+ const q = 255 * v * (1 - (s * f));
+ const t = 255 * v * (1 - (s * (1 - f)));
+ v *= 255;
+
+ switch (hi) {
+ case 0:
+ return [v, t, p];
+ case 1:
+ return [q, v, p];
+ case 2:
+ return [p, v, t];
+ case 3:
+ return [p, q, v];
+ case 4:
+ return [t, p, v];
+ case 5:
+ return [v, p, q];
+ }
+};
+
+convert.hsv.hsl = function (hsv) {
+ const h = hsv[0];
+ const s = hsv[1] / 100;
+ const v = hsv[2] / 100;
+ const vmin = Math.max(v, 0.01);
+ let sl;
+ let l;
+
+ l = (2 - s) * v;
+ const lmin = (2 - s) * vmin;
+ sl = s * vmin;
+ sl /= (lmin <= 1) ? lmin : 2 - lmin;
+ sl = sl || 0;
+ l /= 2;
+
+ return [h, sl * 100, l * 100];
+};
+
+// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
+convert.hwb.rgb = function (hwb) {
+ const h = hwb[0] / 360;
+ let wh = hwb[1] / 100;
+ let bl = hwb[2] / 100;
+ const ratio = wh + bl;
+ let f;
+
+ // Wh + bl cant be > 1
+ if (ratio > 1) {
+ wh /= ratio;
+ bl /= ratio;
+ }
+
+ const i = Math.floor(6 * h);
+ const v = 1 - bl;
+ f = 6 * h - i;
+
+ if ((i & 0x01) !== 0) {
+ f = 1 - f;
+ }
+
+ const n = wh + f * (v - wh); // Linear interpolation
+
+ let r;
+ let g;
+ let b;
+ /* eslint-disable max-statements-per-line,no-multi-spaces */
+ switch (i) {
+ default:
+ case 6:
+ case 0: r = v; g = n; b = wh; break;
+ case 1: r = n; g = v; b = wh; break;
+ case 2: r = wh; g = v; b = n; break;
+ case 3: r = wh; g = n; b = v; break;
+ case 4: r = n; g = wh; b = v; break;
+ case 5: r = v; g = wh; b = n; break;
+ }
+ /* eslint-enable max-statements-per-line,no-multi-spaces */
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.cmyk.rgb = function (cmyk) {
+ const c = cmyk[0] / 100;
+ const m = cmyk[1] / 100;
+ const y = cmyk[2] / 100;
+ const k = cmyk[3] / 100;
+
+ const r = 1 - Math.min(1, c * (1 - k) + k);
+ const g = 1 - Math.min(1, m * (1 - k) + k);
+ const b = 1 - Math.min(1, y * (1 - k) + k);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.rgb = function (xyz) {
+ const x = xyz[0] / 100;
+ const y = xyz[1] / 100;
+ const z = xyz[2] / 100;
+ let r;
+ let g;
+ let b;
+
+ r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
+ g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
+ b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
+
+ // Assume sRGB
+ r = r > 0.0031308
+ ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)
+ : r * 12.92;
+
+ g = g > 0.0031308
+ ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)
+ : g * 12.92;
+
+ b = b > 0.0031308
+ ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)
+ : b * 12.92;
+
+ r = Math.min(Math.max(0, r), 1);
+ g = Math.min(Math.max(0, g), 1);
+ b = Math.min(Math.max(0, b), 1);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.lab = function (xyz) {
+ let x = xyz[0];
+ let y = xyz[1];
+ let z = xyz[2];
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
+
+ const l = (116 * y) - 16;
+ const a = 500 * (x - y);
+ const b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.lab.xyz = function (lab) {
+ const l = lab[0];
+ const a = lab[1];
+ const b = lab[2];
+ let x;
+ let y;
+ let z;
+
+ y = (l + 16) / 116;
+ x = a / 500 + y;
+ z = y - b / 200;
+
+ const y2 = y ** 3;
+ const x2 = x ** 3;
+ const z2 = z ** 3;
+ y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
+ x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
+ z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
+
+ x *= 95.047;
+ y *= 100;
+ z *= 108.883;
+
+ return [x, y, z];
+};
+
+convert.lab.lch = function (lab) {
+ const l = lab[0];
+ const a = lab[1];
+ const b = lab[2];
+ let h;
+
+ const hr = Math.atan2(b, a);
+ h = hr * 360 / 2 / Math.PI;
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ const c = Math.sqrt(a * a + b * b);
+
+ return [l, c, h];
+};
+
+convert.lch.lab = function (lch) {
+ const l = lch[0];
+ const c = lch[1];
+ const h = lch[2];
+
+ const hr = h / 360 * 2 * Math.PI;
+ const a = c * Math.cos(hr);
+ const b = c * Math.sin(hr);
+
+ return [l, a, b];
+};
+
+convert.rgb.ansi16 = function (args, saturation = null) {
+ const [r, g, b] = args;
+ let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
+
+ value = Math.round(value / 50);
+
+ if (value === 0) {
+ return 30;
+ }
+
+ let ansi = 30
+ + ((Math.round(b / 255) << 2)
+ | (Math.round(g / 255) << 1)
+ | Math.round(r / 255));
+
+ if (value === 2) {
+ ansi += 60;
+ }
+
+ return ansi;
+};
+
+convert.hsv.ansi16 = function (args) {
+ // Optimization here; we already know the value and don't need to get
+ // it converted for us.
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
+};
+
+convert.rgb.ansi256 = function (args) {
+ const r = args[0];
+ const g = args[1];
+ const b = args[2];
+
+ // We use the extended greyscale palette here, with the exception of
+ // black and white. normal palette only has 4 greyscale shades.
+ if (r === g && g === b) {
+ if (r < 8) {
+ return 16;
+ }
+
+ if (r > 248) {
+ return 231;
+ }
+
+ return Math.round(((r - 8) / 247) * 24) + 232;
+ }
+
+ const ansi = 16
+ + (36 * Math.round(r / 255 * 5))
+ + (6 * Math.round(g / 255 * 5))
+ + Math.round(b / 255 * 5);
+
+ return ansi;
+};
+
+convert.ansi16.rgb = function (args) {
+ let color = args % 10;
+
+ // Handle greyscale
+ if (color === 0 || color === 7) {
+ if (args > 50) {
+ color += 3.5;
+ }
+
+ color = color / 10.5 * 255;
+
+ return [color, color, color];
+ }
+
+ const mult = (~~(args > 50) + 1) * 0.5;
+ const r = ((color & 1) * mult) * 255;
+ const g = (((color >> 1) & 1) * mult) * 255;
+ const b = (((color >> 2) & 1) * mult) * 255;
+
+ return [r, g, b];
+};
+
+convert.ansi256.rgb = function (args) {
+ // Handle greyscale
+ if (args >= 232) {
+ const c = (args - 232) * 10 + 8;
+ return [c, c, c];
+ }
+
+ args -= 16;
+
+ let rem;
+ const r = Math.floor(args / 36) / 5 * 255;
+ const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
+ const b = (rem % 6) / 5 * 255;
+
+ return [r, g, b];
+};
+
+convert.rgb.hex = function (args) {
+ const integer = ((Math.round(args[0]) & 0xFF) << 16)
+ + ((Math.round(args[1]) & 0xFF) << 8)
+ + (Math.round(args[2]) & 0xFF);
+
+ const string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.hex.rgb = function (args) {
+ const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
+ if (!match) {
+ return [0, 0, 0];
+ }
+
+ let colorString = match[0];
+
+ if (match[0].length === 3) {
+ colorString = colorString.split('').map(char => {
+ return char + char;
+ }).join('');
+ }
+
+ const integer = parseInt(colorString, 16);
+ const r = (integer >> 16) & 0xFF;
+ const g = (integer >> 8) & 0xFF;
+ const b = integer & 0xFF;
+
+ return [r, g, b];
+};
+
+convert.rgb.hcg = function (rgb) {
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+ const max = Math.max(Math.max(r, g), b);
+ const min = Math.min(Math.min(r, g), b);
+ const chroma = (max - min);
+ let grayscale;
+ let hue;
+
+ if (chroma < 1) {
+ grayscale = min / (1 - chroma);
+ } else {
+ grayscale = 0;
+ }
+
+ if (chroma <= 0) {
+ hue = 0;
+ } else
+ if (max === r) {
+ hue = ((g - b) / chroma) % 6;
+ } else
+ if (max === g) {
+ hue = 2 + (b - r) / chroma;
+ } else {
+ hue = 4 + (r - g) / chroma;
+ }
+
+ hue /= 6;
+ hue %= 1;
+
+ return [hue * 360, chroma * 100, grayscale * 100];
+};
+
+convert.hsl.hcg = function (hsl) {
+ const s = hsl[1] / 100;
+ const l = hsl[2] / 100;
+
+ const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));
+
+ let f = 0;
+ if (c < 1.0) {
+ f = (l - 0.5 * c) / (1.0 - c);
+ }
+
+ return [hsl[0], c * 100, f * 100];
+};
+
+convert.hsv.hcg = function (hsv) {
+ const s = hsv[1] / 100;
+ const v = hsv[2] / 100;
+
+ const c = s * v;
+ let f = 0;
+
+ if (c < 1.0) {
+ f = (v - c) / (1 - c);
+ }
+
+ return [hsv[0], c * 100, f * 100];
+};
+
+convert.hcg.rgb = function (hcg) {
+ const h = hcg[0] / 360;
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+
+ if (c === 0.0) {
+ return [g * 255, g * 255, g * 255];
+ }
+
+ const pure = [0, 0, 0];
+ const hi = (h % 1) * 6;
+ const v = hi % 1;
+ const w = 1 - v;
+ let mg = 0;
+
+ /* eslint-disable max-statements-per-line */
+ switch (Math.floor(hi)) {
+ case 0:
+ pure[0] = 1; pure[1] = v; pure[2] = 0; break;
+ case 1:
+ pure[0] = w; pure[1] = 1; pure[2] = 0; break;
+ case 2:
+ pure[0] = 0; pure[1] = 1; pure[2] = v; break;
+ case 3:
+ pure[0] = 0; pure[1] = w; pure[2] = 1; break;
+ case 4:
+ pure[0] = v; pure[1] = 0; pure[2] = 1; break;
+ default:
+ pure[0] = 1; pure[1] = 0; pure[2] = w;
+ }
+ /* eslint-enable max-statements-per-line */
+
+ mg = (1.0 - c) * g;
+
+ return [
+ (c * pure[0] + mg) * 255,
+ (c * pure[1] + mg) * 255,
+ (c * pure[2] + mg) * 255
+ ];
+};
+
+convert.hcg.hsv = function (hcg) {
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+
+ const v = c + g * (1.0 - c);
+ let f = 0;
+
+ if (v > 0.0) {
+ f = c / v;
+ }
+
+ return [hcg[0], f * 100, v * 100];
+};
+
+convert.hcg.hsl = function (hcg) {
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+
+ const l = g * (1.0 - c) + 0.5 * c;
+ let s = 0;
+
+ if (l > 0.0 && l < 0.5) {
+ s = c / (2 * l);
+ } else
+ if (l >= 0.5 && l < 1.0) {
+ s = c / (2 * (1 - l));
+ }
+
+ return [hcg[0], s * 100, l * 100];
+};
+
+convert.hcg.hwb = function (hcg) {
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+ const v = c + g * (1.0 - c);
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
+};
+
+convert.hwb.hcg = function (hwb) {
+ const w = hwb[1] / 100;
+ const b = hwb[2] / 100;
+ const v = 1 - b;
+ const c = v - w;
+ let g = 0;
+
+ if (c < 1) {
+ g = (v - c) / (1 - c);
+ }
+
+ return [hwb[0], c * 100, g * 100];
+};
+
+convert.apple.rgb = function (apple) {
+ return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
+};
+
+convert.rgb.apple = function (rgb) {
+ return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
+};
+
+convert.gray.rgb = function (args) {
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
+};
+
+convert.gray.hsl = function (args) {
+ return [0, 0, args[0]];
+};
+
+convert.gray.hsv = convert.gray.hsl;
+
+convert.gray.hwb = function (gray) {
+ return [0, 100, gray[0]];
+};
+
+convert.gray.cmyk = function (gray) {
+ return [0, 0, 0, gray[0]];
+};
+
+convert.gray.lab = function (gray) {
+ return [gray[0], 0, 0];
+};
+
+convert.gray.hex = function (gray) {
+ const val = Math.round(gray[0] / 100 * 255) & 0xFF;
+ const integer = (val << 16) + (val << 8) + val;
+
+ const string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.rgb.gray = function (rgb) {
+ const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
+ return [val / 255 * 100];
+};
diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js
new file mode 100644
index 0000000..b648e57
--- /dev/null
+++ b/node_modules/color-convert/index.js
@@ -0,0 +1,81 @@
+const conversions = require('./conversions');
+const route = require('./route');
+
+const convert = {};
+
+const models = Object.keys(conversions);
+
+function wrapRaw(fn) {
+ const wrappedFn = function (...args) {
+ const arg0 = args[0];
+ if (arg0 === undefined || arg0 === null) {
+ return arg0;
+ }
+
+ if (arg0.length > 1) {
+ args = arg0;
+ }
+
+ return fn(args);
+ };
+
+ // Preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+function wrapRounded(fn) {
+ const wrappedFn = function (...args) {
+ const arg0 = args[0];
+
+ if (arg0 === undefined || arg0 === null) {
+ return arg0;
+ }
+
+ if (arg0.length > 1) {
+ args = arg0;
+ }
+
+ const result = fn(args);
+
+ // We're assuming the result is an array here.
+ // see notice in conversions.js; don't use box types
+ // in conversion functions.
+ if (typeof result === 'object') {
+ for (let len = result.length, i = 0; i < len; i++) {
+ result[i] = Math.round(result[i]);
+ }
+ }
+
+ return result;
+ };
+
+ // Preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+models.forEach(fromModel => {
+ convert[fromModel] = {};
+
+ Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
+ Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
+
+ const routes = route(fromModel);
+ const routeModels = Object.keys(routes);
+
+ routeModels.forEach(toModel => {
+ const fn = routes[toModel];
+
+ convert[fromModel][toModel] = wrapRounded(fn);
+ convert[fromModel][toModel].raw = wrapRaw(fn);
+ });
+});
+
+module.exports = convert;
diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json
new file mode 100644
index 0000000..8e0bd79
--- /dev/null
+++ b/node_modules/color-convert/package.json
@@ -0,0 +1,86 @@
+{
+ "_args": [
+ [
+ "color-convert@2.0.1",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "color-convert@2.0.1",
+ "_id": "color-convert@2.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "_location": "/color-convert",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "color-convert@2.0.1",
+ "name": "color-convert",
+ "escapedName": "color-convert",
+ "rawSpec": "2.0.1",
+ "saveSpec": null,
+ "fetchSpec": "2.0.1"
+ },
+ "_requiredBy": [
+ "/ansi-styles"
+ ],
+ "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "_spec": "2.0.1",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Heather Arthur",
+ "email": "fayearthur@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/Qix-/color-convert/issues"
+ },
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "description": "Plain color conversion functions",
+ "devDependencies": {
+ "chalk": "^2.4.2",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ },
+ "files": [
+ "index.js",
+ "conversions.js",
+ "route.js"
+ ],
+ "homepage": "https://github.com/Qix-/color-convert#readme",
+ "keywords": [
+ "color",
+ "colour",
+ "convert",
+ "converter",
+ "conversion",
+ "rgb",
+ "hsl",
+ "hsv",
+ "hwb",
+ "cmyk",
+ "ansi",
+ "ansi16"
+ ],
+ "license": "MIT",
+ "name": "color-convert",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Qix-/color-convert.git"
+ },
+ "scripts": {
+ "pretest": "xo",
+ "test": "node test/basic.js"
+ },
+ "version": "2.0.1",
+ "xo": {
+ "rules": {
+ "default-case": 0,
+ "no-inline-comments": 0,
+ "operator-linebreak": 0
+ }
+ }
+}
diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js
new file mode 100644
index 0000000..1a08521
--- /dev/null
+++ b/node_modules/color-convert/route.js
@@ -0,0 +1,97 @@
+const conversions = require('./conversions');
+
+/*
+ This function routes a model to all other models.
+
+ all functions that are routed have a property `.conversion` attached
+ to the returned synthetic function. This property is an array
+ of strings, each with the steps in between the 'from' and 'to'
+ color models (inclusive).
+
+ conversions that are not possible simply are not included.
+*/
+
+function buildGraph() {
+ const graph = {};
+ // https://jsperf.com/object-keys-vs-for-in-with-closure/3
+ const models = Object.keys(conversions);
+
+ for (let len = models.length, i = 0; i < len; i++) {
+ graph[models[i]] = {
+ // http://jsperf.com/1-vs-infinity
+ // micro-opt, but this is simple.
+ distance: -1,
+ parent: null
+ };
+ }
+
+ return graph;
+}
+
+// https://en.wikipedia.org/wiki/Breadth-first_search
+function deriveBFS(fromModel) {
+ const graph = buildGraph();
+ const queue = [fromModel]; // Unshift -> queue -> pop
+
+ graph[fromModel].distance = 0;
+
+ while (queue.length) {
+ const current = queue.pop();
+ const adjacents = Object.keys(conversions[current]);
+
+ for (let len = adjacents.length, i = 0; i < len; i++) {
+ const adjacent = adjacents[i];
+ const node = graph[adjacent];
+
+ if (node.distance === -1) {
+ node.distance = graph[current].distance + 1;
+ node.parent = current;
+ queue.unshift(adjacent);
+ }
+ }
+ }
+
+ return graph;
+}
+
+function link(from, to) {
+ return function (args) {
+ return to(from(args));
+ };
+}
+
+function wrapConversion(toModel, graph) {
+ const path = [graph[toModel].parent, toModel];
+ let fn = conversions[graph[toModel].parent][toModel];
+
+ let cur = graph[toModel].parent;
+ while (graph[cur].parent) {
+ path.unshift(graph[cur].parent);
+ fn = link(conversions[graph[cur].parent][cur], fn);
+ cur = graph[cur].parent;
+ }
+
+ fn.conversion = path;
+ return fn;
+}
+
+module.exports = function (fromModel) {
+ const graph = deriveBFS(fromModel);
+ const conversion = {};
+
+ const models = Object.keys(graph);
+ for (let len = models.length, i = 0; i < len; i++) {
+ const toModel = models[i];
+ const node = graph[toModel];
+
+ if (node.parent === null) {
+ // No possible conversion, or this node is the source model.
+ continue;
+ }
+
+ conversion[toModel] = wrapConversion(toModel, graph);
+ }
+
+ return conversion;
+};
+
diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE
new file mode 100644
index 0000000..4d9802a
--- /dev/null
+++ b/node_modules/color-name/LICENSE
@@ -0,0 +1,8 @@
+The MIT License (MIT)
+Copyright (c) 2015 Dmitry Ivanov
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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. \ No newline at end of file
diff --git a/node_modules/color-name/README.md b/node_modules/color-name/README.md
new file mode 100644
index 0000000..3611a6b
--- /dev/null
+++ b/node_modules/color-name/README.md
@@ -0,0 +1,11 @@
+A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors.
+
+[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/)
+
+
+```js
+var colors = require('color-name');
+colors.red //[255,0,0]
+```
+
+<a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a>
diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js
new file mode 100644
index 0000000..e42aa68
--- /dev/null
+++ b/node_modules/color-name/index.js
@@ -0,0 +1,152 @@
+'use strict'
+
+module.exports = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "darkkhaki": [189, 183, 107],
+ "darkmagenta": [139, 0, 139],
+ "darkolivegreen": [85, 107, 47],
+ "darkorange": [255, 140, 0],
+ "darkorchid": [153, 50, 204],
+ "darkred": [139, 0, 0],
+ "darksalmon": [233, 150, 122],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
+};
diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json
new file mode 100644
index 0000000..31f87c9
--- /dev/null
+++ b/node_modules/color-name/package.json
@@ -0,0 +1,59 @@
+{
+ "_args": [
+ [
+ "color-name@1.1.4",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "color-name@1.1.4",
+ "_id": "color-name@1.1.4",
+ "_inBundle": false,
+ "_integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "_location": "/color-name",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "color-name@1.1.4",
+ "name": "color-name",
+ "escapedName": "color-name",
+ "rawSpec": "1.1.4",
+ "saveSpec": null,
+ "fetchSpec": "1.1.4"
+ },
+ "_requiredBy": [
+ "/color-convert"
+ ],
+ "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "_spec": "1.1.4",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "DY",
+ "email": "dfcreative@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/colorjs/color-name/issues"
+ },
+ "description": "A list of color names and its values",
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/colorjs/color-name",
+ "keywords": [
+ "color-name",
+ "color",
+ "color-keyword",
+ "keyword"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "color-name",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/colorjs/color-name.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.1.4"
+}
diff --git a/node_modules/defaults/.npmignore b/node_modules/defaults/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/defaults/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/defaults/LICENSE b/node_modules/defaults/LICENSE
new file mode 100644
index 0000000..d88b072
--- /dev/null
+++ b/node_modules/defaults/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Elijah Insua
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/defaults/README.md b/node_modules/defaults/README.md
new file mode 100644
index 0000000..1a4a2ea
--- /dev/null
+++ b/node_modules/defaults/README.md
@@ -0,0 +1,43 @@
+# defaults
+
+A simple one level options merge utility
+
+## install
+
+`npm install defaults`
+
+## use
+
+```javascript
+
+var defaults = require('defaults');
+
+var handle = function(options, fn) {
+ options = defaults(options, {
+ timeout: 100
+ });
+
+ setTimeout(function() {
+ fn(options);
+ }, options.timeout);
+}
+
+handle({ timeout: 1000 }, function() {
+ // we're here 1000 ms later
+});
+
+handle({ timeout: 10000 }, function() {
+ // we're here 10s later
+});
+
+```
+
+## summary
+
+this module exports a function that takes 2 arguments: `options` and `defaults`. When called, it overrides all of `undefined` properties in `options` with the clones of properties defined in `defaults`
+
+Sidecases: if called with a falsy `options` value, options will be initialized to a new object before being merged onto.
+
+## license
+
+[MIT](LICENSE)
diff --git a/node_modules/defaults/index.js b/node_modules/defaults/index.js
new file mode 100644
index 0000000..cb7d75c
--- /dev/null
+++ b/node_modules/defaults/index.js
@@ -0,0 +1,13 @@
+var clone = require('clone');
+
+module.exports = function(options, defaults) {
+ options = options || {};
+
+ Object.keys(defaults).forEach(function(key) {
+ if (typeof options[key] === 'undefined') {
+ options[key] = clone(defaults[key]);
+ }
+ });
+
+ return options;
+}; \ No newline at end of file
diff --git a/node_modules/defaults/package.json b/node_modules/defaults/package.json
new file mode 100644
index 0000000..f4fb909
--- /dev/null
+++ b/node_modules/defaults/package.json
@@ -0,0 +1,60 @@
+{
+ "_args": [
+ [
+ "defaults@1.0.3",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "defaults@1.0.3",
+ "_id": "defaults@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
+ "_location": "/defaults",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "defaults@1.0.3",
+ "name": "defaults",
+ "escapedName": "defaults",
+ "rawSpec": "1.0.3",
+ "saveSpec": null,
+ "fetchSpec": "1.0.3"
+ },
+ "_requiredBy": [
+ "/wcwidth"
+ ],
+ "_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
+ "_spec": "1.0.3",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Elijah Insua",
+ "email": "tmpvar@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/tmpvar/defaults/issues"
+ },
+ "dependencies": {
+ "clone": "^1.0.2"
+ },
+ "description": "merge single level defaults over a config object",
+ "devDependencies": {
+ "tap": "^2.0.0"
+ },
+ "homepage": "https://github.com/tmpvar/defaults#readme",
+ "keywords": [
+ "config",
+ "defaults"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "defaults",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/tmpvar/defaults.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.0.3"
+}
diff --git a/node_modules/defaults/test.js b/node_modules/defaults/test.js
new file mode 100644
index 0000000..60e0ffb
--- /dev/null
+++ b/node_modules/defaults/test.js
@@ -0,0 +1,34 @@
+var defaults = require('./'),
+ test = require('tap').test;
+
+test("ensure options is an object", function(t) {
+ var options = defaults(false, { a : true });
+ t.ok(options.a);
+ t.end()
+});
+
+test("ensure defaults override keys", function(t) {
+ var result = defaults({}, { a: false, b: true });
+ t.ok(result.b, 'b merges over undefined');
+ t.equal(result.a, false, 'a merges over undefined');
+ t.end();
+});
+
+test("ensure defined keys are not overwritten", function(t) {
+ var result = defaults({ b: false }, { a: false, b: true });
+ t.equal(result.b, false, 'b not merged');
+ t.equal(result.a, false, 'a merges over undefined');
+ t.end();
+});
+
+test("ensure defaults clone nested objects", function(t) {
+ var d = { a: [1,2,3], b: { hello : 'world' } };
+ var result = defaults({}, d);
+ t.equal(result.a.length, 3, 'objects should be clones');
+ t.ok(result.a !== d.a, 'objects should be clones');
+
+ t.equal(Object.keys(result.b).length, 1, 'objects should be clones');
+ t.ok(result.b !== d.b, 'objects should be clones');
+ t.end();
+});
+
diff --git a/node_modules/end-of-stream/LICENSE b/node_modules/end-of-stream/LICENSE
new file mode 100644
index 0000000..757562e
--- /dev/null
+++ b/node_modules/end-of-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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. \ No newline at end of file
diff --git a/node_modules/end-of-stream/README.md b/node_modules/end-of-stream/README.md
new file mode 100644
index 0000000..857b14b
--- /dev/null
+++ b/node_modules/end-of-stream/README.md
@@ -0,0 +1,54 @@
+# end-of-stream
+
+A node module that calls a callback when a readable/writable/duplex stream has completed or failed.
+
+ npm install end-of-stream
+
+[![Build status](https://travis-ci.org/mafintosh/end-of-stream.svg?branch=master)](https://travis-ci.org/mafintosh/end-of-stream)
+
+## Usage
+
+Simply pass a stream and a callback to the `eos`.
+Both legacy streams, streams2 and stream3 are supported.
+
+``` js
+var eos = require('end-of-stream');
+
+eos(readableStream, function(err) {
+ // this will be set to the stream instance
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended', this === readableStream);
+});
+
+eos(writableStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished', this === writableStream);
+});
+
+eos(duplexStream, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended and finished', this === duplexStream);
+});
+
+eos(duplexStream, {readable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has finished but might still be readable');
+});
+
+eos(duplexStream, {writable:false}, function(err) {
+ if (err) return console.log('stream had an error or closed early');
+ console.log('stream has ended but might still be writable');
+});
+
+eos(readableStream, {error:false}, function(err) {
+ // do not treat emit('error', err) as a end-of-stream
+});
+```
+
+## License
+
+MIT
+
+## Related
+
+`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/node_modules/end-of-stream/index.js b/node_modules/end-of-stream/index.js
new file mode 100644
index 0000000..c77f0d5
--- /dev/null
+++ b/node_modules/end-of-stream/index.js
@@ -0,0 +1,94 @@
+var once = require('once');
+
+var noop = function() {};
+
+var isRequest = function(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+};
+
+var isChildProcess = function(stream) {
+ return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
+};
+
+var eos = function(stream, opts, callback) {
+ if (typeof opts === 'function') return eos(stream, null, opts);
+ if (!opts) opts = {};
+
+ callback = once(callback || noop);
+
+ var ws = stream._writableState;
+ var rs = stream._readableState;
+ var readable = opts.readable || (opts.readable !== false && stream.readable);
+ var writable = opts.writable || (opts.writable !== false && stream.writable);
+ var cancelled = false;
+
+ var onlegacyfinish = function() {
+ if (!stream.writable) onfinish();
+ };
+
+ var onfinish = function() {
+ writable = false;
+ if (!readable) callback.call(stream);
+ };
+
+ var onend = function() {
+ readable = false;
+ if (!writable) callback.call(stream);
+ };
+
+ var onexit = function(exitCode) {
+ callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
+ };
+
+ var onerror = function(err) {
+ callback.call(stream, err);
+ };
+
+ var onclose = function() {
+ process.nextTick(onclosenexttick);
+ };
+
+ var onclosenexttick = function() {
+ if (cancelled) return;
+ if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));
+ if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));
+ };
+
+ var onrequest = function() {
+ stream.req.on('finish', onfinish);
+ };
+
+ if (isRequest(stream)) {
+ stream.on('complete', onfinish);
+ stream.on('abort', onclose);
+ if (stream.req) onrequest();
+ else stream.on('request', onrequest);
+ } else if (writable && !ws) { // legacy streams
+ stream.on('end', onlegacyfinish);
+ stream.on('close', onlegacyfinish);
+ }
+
+ if (isChildProcess(stream)) stream.on('exit', onexit);
+
+ stream.on('end', onend);
+ stream.on('finish', onfinish);
+ if (opts.error !== false) stream.on('error', onerror);
+ stream.on('close', onclose);
+
+ return function() {
+ cancelled = true;
+ stream.removeListener('complete', onfinish);
+ stream.removeListener('abort', onclose);
+ stream.removeListener('request', onrequest);
+ if (stream.req) stream.req.removeListener('finish', onfinish);
+ stream.removeListener('end', onlegacyfinish);
+ stream.removeListener('close', onlegacyfinish);
+ stream.removeListener('finish', onfinish);
+ stream.removeListener('exit', onexit);
+ stream.removeListener('end', onend);
+ stream.removeListener('error', onerror);
+ stream.removeListener('close', onclose);
+ };
+};
+
+module.exports = eos;
diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json
new file mode 100644
index 0000000..af1516b
--- /dev/null
+++ b/node_modules/end-of-stream/package.json
@@ -0,0 +1,69 @@
+{
+ "_args": [
+ [
+ "end-of-stream@1.4.4",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "end-of-stream@1.4.4",
+ "_id": "end-of-stream@1.4.4",
+ "_inBundle": false,
+ "_integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "_location": "/end-of-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "end-of-stream@1.4.4",
+ "name": "end-of-stream",
+ "escapedName": "end-of-stream",
+ "rawSpec": "1.4.4",
+ "saveSpec": null,
+ "fetchSpec": "1.4.4"
+ },
+ "_requiredBy": [
+ "/pump",
+ "/tar-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "_spec": "1.4.4",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Mathias Buus",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/end-of-stream/issues"
+ },
+ "dependencies": {
+ "once": "^1.4.0"
+ },
+ "description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
+ "devDependencies": {
+ "tape": "^4.11.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/mafintosh/end-of-stream",
+ "keywords": [
+ "stream",
+ "streams",
+ "callback",
+ "finish",
+ "close",
+ "end",
+ "wait"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "end-of-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/end-of-stream.git"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "version": "1.4.4"
+}
diff --git a/node_modules/file-type/browser.d.ts b/node_modules/file-type/browser.d.ts
new file mode 100644
index 0000000..5aeacb6
--- /dev/null
+++ b/node_modules/file-type/browser.d.ts
@@ -0,0 +1,50 @@
+/// <reference lib="dom"/>
+import * as core from './core';
+
+export type FileTypeResult = core.FileTypeResult;
+export type FileExtension = core.FileExtension;
+export type MimeType = core.MimeType;
+
+/**
+Determine file type from a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).
+
+```
+import FileType = require('file-type/browser');
+
+const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg';
+
+(async () => {
+ const response = await fetch(url);
+ const fileType = await FileType.fromStream(response.body);
+
+ console.log(fileType);
+ //=> {ext: 'jpg', mime: 'image/jpeg'}
+})();
+```
+*/
+export declare function fromStream(stream: ReadableStream): Promise<core.FileTypeResult | undefined>;
+
+/**
+Determine file type from a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob).
+
+```
+import FileType = require('file-type/browser');
+
+(async () => {
+ const blob = new Blob(['<?xml version="1.0" encoding="ISO-8859-1" ?>'], {
+ type: 'plain/text',
+ endings: 'native'
+ });
+
+ console.log(await FileType.fromBlob(blob));
+ //=> {ext: 'txt', mime: 'plain/text'}
+})();
+```
+*/
+export declare function fromBlob(blob: Blob): Promise<core.FileTypeResult | undefined>;
+
+export {
+ fromBuffer,
+ extensions,
+ mimeTypes
+} from './core';
diff --git a/node_modules/file-type/browser.js b/node_modules/file-type/browser.js
new file mode 100644
index 0000000..1de2437
--- /dev/null
+++ b/node_modules/file-type/browser.js
@@ -0,0 +1,50 @@
+'use strict';
+const {ReadableWebToNodeStream} = require('readable-web-to-node-stream');
+const toBuffer = require('typedarray-to-buffer');
+const core = require('./core');
+
+async function fromStream(stream) {
+ const readableWebToNodeStream = new ReadableWebToNodeStream(stream);
+ const fileType = await core.fromStream(readableWebToNodeStream);
+ await readableWebToNodeStream.close();
+ return fileType;
+}
+
+async function fromBlob(blob) {
+ const buffer = await convertBlobToBuffer(blob);
+ return core.fromBuffer(buffer);
+}
+
+/**
+Convert Web API File to Node Buffer.
+@param {Blob} blob - Web API Blob.
+@returns {Promise<Buffer>}
+*/
+function convertBlobToBuffer(blob) {
+ return new Promise((resolve, reject) => {
+ const fileReader = new FileReader();
+ fileReader.addEventListener('loadend', event => {
+ let data = event.target.result;
+ if (data instanceof ArrayBuffer) {
+ data = toBuffer(new Uint8Array(event.target.result));
+ }
+
+ resolve(data);
+ });
+
+ fileReader.addEventListener('error', event => {
+ reject(new Error(event.message));
+ });
+
+ fileReader.addEventListener('abort', event => {
+ reject(new Error(event.type));
+ });
+
+ fileReader.readAsArrayBuffer(blob);
+ });
+}
+
+Object.assign(module.exports, core, {
+ fromStream,
+ fromBlob
+});
diff --git a/node_modules/file-type/core.d.ts b/node_modules/file-type/core.d.ts
new file mode 100644
index 0000000..569ed18
--- /dev/null
+++ b/node_modules/file-type/core.d.ts
@@ -0,0 +1,379 @@
+/// <reference types="node"/>
+import {Readable as ReadableStream} from 'stream';
+import {ITokenizer} from 'strtok3/lib/core';
+
+declare namespace core {
+ type FileExtension =
+ | 'jpg'
+ | 'png'
+ | 'apng'
+ | 'gif'
+ | 'webp'
+ | 'flif'
+ | 'cr2'
+ | 'cr3'
+ | 'orf'
+ | 'arw'
+ | 'dng'
+ | 'nef'
+ | 'rw2'
+ | 'raf'
+ | 'tif'
+ | 'bmp'
+ | 'icns'
+ | 'jxr'
+ | 'psd'
+ | 'indd'
+ | 'zip'
+ | 'tar'
+ | 'rar'
+ | 'gz'
+ | 'bz2'
+ | '7z'
+ | 'dmg'
+ | 'mp4'
+ | 'mid'
+ | 'mkv'
+ | 'webm'
+ | 'mov'
+ | 'avi'
+ | 'mpg'
+ | 'mp2'
+ | 'mp3'
+ | 'm4a'
+ | 'ogg'
+ | 'opus'
+ | 'flac'
+ | 'wav'
+ | 'qcp'
+ | 'amr'
+ | 'pdf'
+ | 'epub'
+ | 'mobi'
+ | 'exe'
+ | 'swf'
+ | 'rtf'
+ | 'woff'
+ | 'woff2'
+ | 'eot'
+ | 'ttf'
+ | 'otf'
+ | 'ico'
+ | 'flv'
+ | 'ps'
+ | 'xz'
+ | 'sqlite'
+ | 'nes'
+ | 'crx'
+ | 'xpi'
+ | 'cab'
+ | 'deb'
+ | 'ar'
+ | 'rpm'
+ | 'Z'
+ | 'lz'
+ | 'cfb'
+ | 'mxf'
+ | 'mts'
+ | 'wasm'
+ | 'blend'
+ | 'bpg'
+ | 'docx'
+ | 'pptx'
+ | 'xlsx'
+ | '3gp'
+ | '3g2'
+ | 'jp2'
+ | 'jpm'
+ | 'jpx'
+ | 'mj2'
+ | 'aif'
+ | 'odt'
+ | 'ods'
+ | 'odp'
+ | 'xml'
+ | 'heic'
+ | 'cur'
+ | 'ktx'
+ | 'ape'
+ | 'wv'
+ | 'asf'
+ | 'dcm'
+ | 'mpc'
+ | 'ics'
+ | 'glb'
+ | 'pcap'
+ | 'dsf'
+ | 'lnk'
+ | 'alias'
+ | 'voc'
+ | 'ac3'
+ | 'm4b'
+ | 'm4p'
+ | 'm4v'
+ | 'f4a'
+ | 'f4b'
+ | 'f4p'
+ | 'f4v'
+ | 'mie'
+ | 'ogv'
+ | 'ogm'
+ | 'oga'
+ | 'spx'
+ | 'ogx'
+ | 'arrow'
+ | 'shp'
+ | 'aac'
+ | 'mp1'
+ | 'it'
+ | 's3m'
+ | 'xm'
+ | 'ai'
+ | 'skp'
+ | 'avif'
+ | 'eps'
+ | 'lzh'
+ | 'pgp'
+ | 'asar'
+ | 'stl'
+ | 'chm'
+ | '3mf';
+
+ type MimeType =
+ | 'image/jpeg'
+ | 'image/png'
+ | 'image/gif'
+ | 'image/webp'
+ | 'image/flif'
+ | 'image/x-canon-cr2'
+ | 'image/x-canon-cr3'
+ | 'image/tiff'
+ | 'image/bmp'
+ | 'image/icns'
+ | 'image/vnd.ms-photo'
+ | 'image/vnd.adobe.photoshop'
+ | 'application/x-indesign'
+ | 'application/epub+zip'
+ | 'application/x-xpinstall'
+ | 'application/vnd.oasis.opendocument.text'
+ | 'application/vnd.oasis.opendocument.spreadsheet'
+ | 'application/vnd.oasis.opendocument.presentation'
+ | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+ | 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
+ | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+ | 'application/zip'
+ | 'application/x-tar'
+ | 'application/x-rar-compressed'
+ | 'application/gzip'
+ | 'application/x-bzip2'
+ | 'application/x-7z-compressed'
+ | 'application/x-apple-diskimage'
+ | 'video/mp4'
+ | 'audio/midi'
+ | 'video/x-matroska'
+ | 'video/webm'
+ | 'video/quicktime'
+ | 'video/vnd.avi'
+ | 'audio/vnd.wave'
+ | 'audio/qcelp'
+ | 'audio/x-ms-asf'
+ | 'video/x-ms-asf'
+ | 'application/vnd.ms-asf'
+ | 'video/mpeg'
+ | 'video/3gpp'
+ | 'audio/mpeg'
+ | 'audio/mp4' // RFC 4337
+ | 'audio/opus'
+ | 'video/ogg'
+ | 'audio/ogg'
+ | 'application/ogg'
+ | 'audio/x-flac'
+ | 'audio/ape'
+ | 'audio/wavpack'
+ | 'audio/amr'
+ | 'application/pdf'
+ | 'application/x-msdownload'
+ | 'application/x-shockwave-flash'
+ | 'application/rtf'
+ | 'application/wasm'
+ | 'font/woff'
+ | 'font/woff2'
+ | 'application/vnd.ms-fontobject'
+ | 'font/ttf'
+ | 'font/otf'
+ | 'image/x-icon'
+ | 'video/x-flv'
+ | 'application/postscript'
+ | 'application/eps'
+ | 'application/x-xz'
+ | 'application/x-sqlite3'
+ | 'application/x-nintendo-nes-rom'
+ | 'application/x-google-chrome-extension'
+ | 'application/vnd.ms-cab-compressed'
+ | 'application/x-deb'
+ | 'application/x-unix-archive'
+ | 'application/x-rpm'
+ | 'application/x-compress'
+ | 'application/x-lzip'
+ | 'application/x-cfb'
+ | 'application/x-mie'
+ | 'application/x-apache-arrow'
+ | 'application/mxf'
+ | 'video/mp2t'
+ | 'application/x-blender'
+ | 'image/bpg'
+ | 'image/jp2'
+ | 'image/jpx'
+ | 'image/jpm'
+ | 'image/mj2'
+ | 'audio/aiff'
+ | 'application/xml'
+ | 'application/x-mobipocket-ebook'
+ | 'image/heif'
+ | 'image/heif-sequence'
+ | 'image/heic'
+ | 'image/heic-sequence'
+ | 'image/ktx'
+ | 'application/dicom'
+ | 'audio/x-musepack'
+ | 'text/calendar'
+ | 'model/gltf-binary'
+ | 'application/vnd.tcpdump.pcap'
+ | 'audio/x-dsf' // Non-standard
+ | 'application/x.ms.shortcut' // Invented by us
+ | 'application/x.apple.alias' // Invented by us
+ | 'audio/x-voc'
+ | 'audio/vnd.dolby.dd-raw'
+ | 'audio/x-m4a'
+ | 'image/apng'
+ | 'image/x-olympus-orf'
+ | 'image/x-sony-arw'
+ | 'image/x-adobe-dng'
+ | 'image/x-nikon-nef'
+ | 'image/x-panasonic-rw2'
+ | 'image/x-fujifilm-raf'
+ | 'video/x-m4v'
+ | 'video/3gpp2'
+ | 'application/x-esri-shape'
+ | 'audio/aac'
+ | 'audio/x-it'
+ | 'audio/x-s3m'
+ | 'audio/x-xm'
+ | 'video/MP1S'
+ | 'video/MP2P'
+ | 'application/vnd.sketchup.skp'
+ | 'image/avif'
+ | 'application/x-lzh-compressed'
+ | 'application/pgp-encrypted'
+ | 'application/x-asar'
+ | 'model/stl'
+ | 'application/vnd.ms-htmlhelp'
+ | 'model/3mf';
+
+ interface FileTypeResult {
+ /**
+ One of the supported [file types](https://github.com/sindresorhus/file-type#supported-file-types).
+ */
+ readonly ext: FileExtension;
+
+ /**
+ The detected [MIME type](https://en.wikipedia.org/wiki/Internet_media_type).
+ */
+ readonly mime: MimeType;
+ }
+
+ type ReadableStreamWithFileType = ReadableStream & {
+ readonly fileType?: FileTypeResult;
+ };
+
+ /**
+ Detect the file type of a `Buffer`, `Uint8Array`, or `ArrayBuffer`.
+
+ The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
+
+ If file access is available, it is recommended to use `.fromFile()` instead.
+
+ @param buffer - A buffer representing file data. It works best if the buffer contains the entire file, it may work with a smaller portion as well.
+ @returns The detected file type and MIME type, or `undefined` when there is no match.
+ */
+ function fromBuffer(buffer: Buffer | Uint8Array | ArrayBuffer): Promise<core.FileTypeResult | undefined>;
+
+ /**
+ Detect the file type of a Node.js [readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable).
+
+ The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
+
+ @param stream - A readable stream representing file data.
+ @returns The detected file type and MIME type, or `undefined` when there is no match.
+ */
+ function fromStream(stream: ReadableStream): Promise<core.FileTypeResult | undefined>;
+
+ /**
+ Detect the file type from an [`ITokenizer`](https://github.com/Borewit/strtok3#tokenizer) source.
+
+ This method is used internally, but can also be used for a special "tokenizer" reader.
+
+ A tokenizer propagates the internal read functions, allowing alternative transport mechanisms, to access files, to be implemented and used.
+
+ An example is [`@tokenizer/http`](https://github.com/Borewit/tokenizer-http), which requests data using [HTTP-range-requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests). A difference with a conventional stream and the [*tokenizer*](https://github.com/Borewit/strtok3#tokenizer), is that it is able to *ignore* (seek, fast-forward) in the stream. For example, you may only need and read the first 6 bytes, and the last 128 bytes, which may be an advantage in case reading the entire file would take longer.
+
+ ```
+ import {makeTokenizer} = require('@tokenizer/http');
+ import FileType = require('file-type');
+
+ const audioTrackUrl = 'https://test-audio.netlify.com/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/01%20-%20Diablo%20Swing%20Orchestra%20-%20Heroines.mp3';
+
+ (async () => {
+ const httpTokenizer = await makeTokenizer(audioTrackUrl);
+ const fileType = await FileType.fromTokenizer(httpTokenizer);
+
+ console.log(fileType);
+ //=> {ext: 'mp3', mime: 'audio/mpeg'}
+ })();
+ ```
+
+ @param tokenizer - File source implementing the tokenizer interface.
+ @returns The detected file type and MIME type, or `undefined` when there is no match.
+ */
+ function fromTokenizer(tokenizer: ITokenizer): Promise<core.FileTypeResult | undefined>;
+
+ /**
+ Supported file extensions.
+ */
+ const extensions: Set<core.FileExtension>;
+
+ /**
+ Supported MIME types.
+ */
+ const mimeTypes: readonly core.MimeType[];
+
+ /**
+ Detect the file type of a readable stream.
+
+ @param readableStream - A [readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable) containing a file to examine.
+ @returns A `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `FileType.fromFile()`.
+
+ @example
+ ```
+ import * as fs from 'fs';
+ import * as crypto from 'crypto';
+ import fileType = require('file-type');
+
+ (async () => {
+ const read = fs.createReadStream('encrypted.enc');
+ const decipher = crypto.createDecipheriv(alg, key, iv);
+ const stream = await fileType.stream(read.pipe(decipher));
+
+ console.log(stream.fileType);
+ //=> {ext: 'mov', mime: 'video/quicktime'}
+
+ const write = fs.createWriteStream(`decrypted.${stream.fileType.ext}`);
+ stream.pipe(write);
+ })();
+ ```
+ */
+ function stream(readableStream: ReadableStream): Promise<core.ReadableStreamWithFileType>
+}
+
+export = core;
+
diff --git a/node_modules/file-type/core.js b/node_modules/file-type/core.js
new file mode 100644
index 0000000..5a1f516
--- /dev/null
+++ b/node_modules/file-type/core.js
@@ -0,0 +1,1433 @@
+'use strict';
+const Token = require('token-types');
+const strtok3 = require('strtok3/lib/core');
+const {
+ stringToBytes,
+ tarHeaderChecksumMatches,
+ uint32SyncSafeToken
+} = require('./util');
+const supported = require('./supported');
+
+const minimumBytes = 4100; // A fair amount of file-types are detectable within this range
+
+async function fromStream(stream) {
+ const tokenizer = await strtok3.fromStream(stream);
+ try {
+ return await fromTokenizer(tokenizer);
+ } finally {
+ await tokenizer.close();
+ }
+}
+
+async function fromBuffer(input) {
+ if (!(input instanceof Uint8Array || input instanceof ArrayBuffer || Buffer.isBuffer(input))) {
+ throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof input}\``);
+ }
+
+ const buffer = input instanceof Buffer ? input : Buffer.from(input);
+
+ if (!(buffer && buffer.length > 1)) {
+ return;
+ }
+
+ const tokenizer = strtok3.fromBuffer(buffer);
+ return fromTokenizer(tokenizer);
+}
+
+function _check(buffer, headers, options) {
+ options = {
+ offset: 0,
+ ...options
+ };
+
+ for (const [index, header] of headers.entries()) {
+ // If a bitmask is set
+ if (options.mask) {
+ // If header doesn't equal `buf` with bits masked off
+ if (header !== (options.mask[index] & buffer[index + options.offset])) {
+ return false;
+ }
+ } else if (header !== buffer[index + options.offset]) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+async function fromTokenizer(tokenizer) {
+ try {
+ return _fromTokenizer(tokenizer);
+ } catch (error) {
+ if (!(error instanceof strtok3.EndOfStreamError)) {
+ throw error;
+ }
+ }
+}
+
+async function _fromTokenizer(tokenizer) {
+ let buffer = Buffer.alloc(minimumBytes);
+ const bytesRead = 12;
+ const check = (header, options) => _check(buffer, header, options);
+ const checkString = (header, options) => check(stringToBytes(header), options);
+
+ // Keep reading until EOF if the file size is unknown.
+ if (!tokenizer.fileInfo.size) {
+ tokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER;
+ }
+
+ await tokenizer.peekBuffer(buffer, {length: bytesRead, mayBeLess: true});
+
+ // -- 2-byte signatures --
+
+ if (check([0x42, 0x4D])) {
+ return {
+ ext: 'bmp',
+ mime: 'image/bmp'
+ };
+ }
+
+ if (check([0x0B, 0x77])) {
+ return {
+ ext: 'ac3',
+ mime: 'audio/vnd.dolby.dd-raw'
+ };
+ }
+
+ if (check([0x78, 0x01])) {
+ return {
+ ext: 'dmg',
+ mime: 'application/x-apple-diskimage'
+ };
+ }
+
+ if (check([0x4D, 0x5A])) {
+ return {
+ ext: 'exe',
+ mime: 'application/x-msdownload'
+ };
+ }
+
+ if (check([0x25, 0x21])) {
+ await tokenizer.peekBuffer(buffer, {length: 24, mayBeLess: true});
+
+ if (checkString('PS-Adobe-', {offset: 2}) &&
+ checkString(' EPSF-', {offset: 14})) {
+ return {
+ ext: 'eps',
+ mime: 'application/eps'
+ };
+ }
+
+ return {
+ ext: 'ps',
+ mime: 'application/postscript'
+ };
+ }
+
+ if (
+ check([0x1F, 0xA0]) ||
+ check([0x1F, 0x9D])
+ ) {
+ return {
+ ext: 'Z',
+ mime: 'application/x-compress'
+ };
+ }
+
+ // -- 3-byte signatures --
+
+ if (check([0xFF, 0xD8, 0xFF])) {
+ return {
+ ext: 'jpg',
+ mime: 'image/jpeg'
+ };
+ }
+
+ if (check([0x49, 0x49, 0xBC])) {
+ return {
+ ext: 'jxr',
+ mime: 'image/vnd.ms-photo'
+ };
+ }
+
+ if (check([0x1F, 0x8B, 0x8])) {
+ return {
+ ext: 'gz',
+ mime: 'application/gzip'
+ };
+ }
+
+ if (check([0x42, 0x5A, 0x68])) {
+ return {
+ ext: 'bz2',
+ mime: 'application/x-bzip2'
+ };
+ }
+
+ if (checkString('ID3')) {
+ await tokenizer.ignore(6); // Skip ID3 header until the header size
+ const id3HeaderLen = await tokenizer.readToken(uint32SyncSafeToken);
+ if (tokenizer.position + id3HeaderLen > tokenizer.fileInfo.size) {
+ // Guess file type based on ID3 header for backward compatibility
+ return {
+ ext: 'mp3',
+ mime: 'audio/mpeg'
+ };
+ }
+
+ await tokenizer.ignore(id3HeaderLen);
+ return fromTokenizer(tokenizer); // Skip ID3 header, recursion
+ }
+
+ // Musepack, SV7
+ if (checkString('MP+')) {
+ return {
+ ext: 'mpc',
+ mime: 'audio/x-musepack'
+ };
+ }
+
+ if (
+ (buffer[0] === 0x43 || buffer[0] === 0x46) &&
+ check([0x57, 0x53], {offset: 1})
+ ) {
+ return {
+ ext: 'swf',
+ mime: 'application/x-shockwave-flash'
+ };
+ }
+
+ // -- 4-byte signatures --
+
+ if (check([0x47, 0x49, 0x46])) {
+ return {
+ ext: 'gif',
+ mime: 'image/gif'
+ };
+ }
+
+ if (checkString('FLIF')) {
+ return {
+ ext: 'flif',
+ mime: 'image/flif'
+ };
+ }
+
+ if (checkString('8BPS')) {
+ return {
+ ext: 'psd',
+ mime: 'image/vnd.adobe.photoshop'
+ };
+ }
+
+ if (checkString('WEBP', {offset: 8})) {
+ return {
+ ext: 'webp',
+ mime: 'image/webp'
+ };
+ }
+
+ // Musepack, SV8
+ if (checkString('MPCK')) {
+ return {
+ ext: 'mpc',
+ mime: 'audio/x-musepack'
+ };
+ }
+
+ if (checkString('FORM')) {
+ return {
+ ext: 'aif',
+ mime: 'audio/aiff'
+ };
+ }
+
+ if (checkString('icns', {offset: 0})) {
+ return {
+ ext: 'icns',
+ mime: 'image/icns'
+ };
+ }
+
+ // Zip-based file formats
+ // Need to be before the `zip` check
+ if (check([0x50, 0x4B, 0x3, 0x4])) { // Local file header signature
+ try {
+ while (tokenizer.position + 30 < tokenizer.fileInfo.size) {
+ await tokenizer.readBuffer(buffer, {length: 30});
+
+ // https://en.wikipedia.org/wiki/Zip_(file_format)#File_headers
+ const zipHeader = {
+ compressedSize: buffer.readUInt32LE(18),
+ uncompressedSize: buffer.readUInt32LE(22),
+ filenameLength: buffer.readUInt16LE(26),
+ extraFieldLength: buffer.readUInt16LE(28)
+ };
+
+ zipHeader.filename = await tokenizer.readToken(new Token.StringType(zipHeader.filenameLength, 'utf-8'));
+ await tokenizer.ignore(zipHeader.extraFieldLength);
+
+ // Assumes signed `.xpi` from addons.mozilla.org
+ if (zipHeader.filename === 'META-INF/mozilla.rsa') {
+ return {
+ ext: 'xpi',
+ mime: 'application/x-xpinstall'
+ };
+ }
+
+ if (zipHeader.filename.endsWith('.rels') || zipHeader.filename.endsWith('.xml')) {
+ const type = zipHeader.filename.split('/')[0];
+ switch (type) {
+ case '_rels':
+ break;
+ case 'word':
+ return {
+ ext: 'docx',
+ mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+ };
+ case 'ppt':
+ return {
+ ext: 'pptx',
+ mime: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
+ };
+ case 'xl':
+ return {
+ ext: 'xlsx',
+ mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+ };
+ default:
+ break;
+ }
+ }
+
+ if (zipHeader.filename.startsWith('xl/')) {
+ return {
+ ext: 'xlsx',
+ mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+ };
+ }
+
+ if (zipHeader.filename.startsWith('3D/') && zipHeader.filename.endsWith('.model')) {
+ return {
+ ext: '3mf',
+ mime: 'model/3mf'
+ };
+ }
+
+ // The docx, xlsx and pptx file types extend the Office Open XML file format:
+ // https://en.wikipedia.org/wiki/Office_Open_XML_file_formats
+ // We look for:
+ // - one entry named '[Content_Types].xml' or '_rels/.rels',
+ // - one entry indicating specific type of file.
+ // MS Office, OpenOffice and LibreOffice may put the parts in different order, so the check should not rely on it.
+ if (zipHeader.filename === 'mimetype' && zipHeader.compressedSize === zipHeader.uncompressedSize) {
+ const mimeType = await tokenizer.readToken(new Token.StringType(zipHeader.compressedSize, 'utf-8'));
+
+ switch (mimeType) {
+ case 'application/epub+zip':
+ return {
+ ext: 'epub',
+ mime: 'application/epub+zip'
+ };
+ case 'application/vnd.oasis.opendocument.text':
+ return {
+ ext: 'odt',
+ mime: 'application/vnd.oasis.opendocument.text'
+ };
+ case 'application/vnd.oasis.opendocument.spreadsheet':
+ return {
+ ext: 'ods',
+ mime: 'application/vnd.oasis.opendocument.spreadsheet'
+ };
+ case 'application/vnd.oasis.opendocument.presentation':
+ return {
+ ext: 'odp',
+ mime: 'application/vnd.oasis.opendocument.presentation'
+ };
+ default:
+ }
+ }
+
+ // Try to find next header manually when current one is corrupted
+ if (zipHeader.compressedSize === 0) {
+ let nextHeaderIndex = -1;
+
+ while (nextHeaderIndex < 0 && (tokenizer.position < tokenizer.fileInfo.size)) {
+ await tokenizer.peekBuffer(buffer, {mayBeLess: true});
+
+ nextHeaderIndex = buffer.indexOf('504B0304', 0, 'hex');
+ // Move position to the next header if found, skip the whole buffer otherwise
+ await tokenizer.ignore(nextHeaderIndex >= 0 ? nextHeaderIndex : buffer.length);
+ }
+ } else {
+ await tokenizer.ignore(zipHeader.compressedSize);
+ }
+ }
+ } catch (error) {
+ if (!(error instanceof strtok3.EndOfStreamError)) {
+ throw error;
+ }
+ }
+
+ return {
+ ext: 'zip',
+ mime: 'application/zip'
+ };
+ }
+
+ if (checkString('OggS')) {
+ // This is an OGG container
+ await tokenizer.ignore(28);
+ const type = Buffer.alloc(8);
+ await tokenizer.readBuffer(type);
+
+ // Needs to be before `ogg` check
+ if (_check(type, [0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64])) {
+ return {
+ ext: 'opus',
+ mime: 'audio/opus'
+ };
+ }
+
+ // If ' theora' in header.
+ if (_check(type, [0x80, 0x74, 0x68, 0x65, 0x6F, 0x72, 0x61])) {
+ return {
+ ext: 'ogv',
+ mime: 'video/ogg'
+ };
+ }
+
+ // If '\x01video' in header.
+ if (_check(type, [0x01, 0x76, 0x69, 0x64, 0x65, 0x6F, 0x00])) {
+ return {
+ ext: 'ogm',
+ mime: 'video/ogg'
+ };
+ }
+
+ // If ' FLAC' in header https://xiph.org/flac/faq.html
+ if (_check(type, [0x7F, 0x46, 0x4C, 0x41, 0x43])) {
+ return {
+ ext: 'oga',
+ mime: 'audio/ogg'
+ };
+ }
+
+ // 'Speex ' in header https://en.wikipedia.org/wiki/Speex
+ if (_check(type, [0x53, 0x70, 0x65, 0x65, 0x78, 0x20, 0x20])) {
+ return {
+ ext: 'spx',
+ mime: 'audio/ogg'
+ };
+ }
+
+ // If '\x01vorbis' in header
+ if (_check(type, [0x01, 0x76, 0x6F, 0x72, 0x62, 0x69, 0x73])) {
+ return {
+ ext: 'ogg',
+ mime: 'audio/ogg'
+ };
+ }
+
+ // Default OGG container https://www.iana.org/assignments/media-types/application/ogg
+ return {
+ ext: 'ogx',
+ mime: 'application/ogg'
+ };
+ }
+
+ if (
+ check([0x50, 0x4B]) &&
+ (buffer[2] === 0x3 || buffer[2] === 0x5 || buffer[2] === 0x7) &&
+ (buffer[3] === 0x4 || buffer[3] === 0x6 || buffer[3] === 0x8)
+ ) {
+ return {
+ ext: 'zip',
+ mime: 'application/zip'
+ };
+ }
+
+ //
+
+ // File Type Box (https://en.wikipedia.org/wiki/ISO_base_media_file_format)
+ // It's not required to be first, but it's recommended to be. Almost all ISO base media files start with `ftyp` box.
+ // `ftyp` box must contain a brand major identifier, which must consist of ISO 8859-1 printable characters.
+ // Here we check for 8859-1 printable characters (for simplicity, it's a mask which also catches one non-printable character).
+ if (
+ checkString('ftyp', {offset: 4}) &&
+ (buffer[8] & 0x60) !== 0x00 // Brand major, first character ASCII?
+ ) {
+ // They all can have MIME `video/mp4` except `application/mp4` special-case which is hard to detect.
+ // For some cases, we're specific, everything else falls to `video/mp4` with `mp4` extension.
+ const brandMajor = buffer.toString('binary', 8, 12).replace('\0', ' ').trim();
+ switch (brandMajor) {
+ case 'avif':
+ return {ext: 'avif', mime: 'image/avif'};
+ case 'mif1':
+ return {ext: 'heic', mime: 'image/heif'};
+ case 'msf1':
+ return {ext: 'heic', mime: 'image/heif-sequence'};
+ case 'heic':
+ case 'heix':
+ return {ext: 'heic', mime: 'image/heic'};
+ case 'hevc':
+ case 'hevx':
+ return {ext: 'heic', mime: 'image/heic-sequence'};
+ case 'qt':
+ return {ext: 'mov', mime: 'video/quicktime'};
+ case 'M4V':
+ case 'M4VH':
+ case 'M4VP':
+ return {ext: 'm4v', mime: 'video/x-m4v'};
+ case 'M4P':
+ return {ext: 'm4p', mime: 'video/mp4'};
+ case 'M4B':
+ return {ext: 'm4b', mime: 'audio/mp4'};
+ case 'M4A':
+ return {ext: 'm4a', mime: 'audio/x-m4a'};
+ case 'F4V':
+ return {ext: 'f4v', mime: 'video/mp4'};
+ case 'F4P':
+ return {ext: 'f4p', mime: 'video/mp4'};
+ case 'F4A':
+ return {ext: 'f4a', mime: 'audio/mp4'};
+ case 'F4B':
+ return {ext: 'f4b', mime: 'audio/mp4'};
+ case 'crx':
+ return {ext: 'cr3', mime: 'image/x-canon-cr3'};
+ default:
+ if (brandMajor.startsWith('3g')) {
+ if (brandMajor.startsWith('3g2')) {
+ return {ext: '3g2', mime: 'video/3gpp2'};
+ }
+
+ return {ext: '3gp', mime: 'video/3gpp'};
+ }
+
+ return {ext: 'mp4', mime: 'video/mp4'};
+ }
+ }
+
+ if (checkString('MThd')) {
+ return {
+ ext: 'mid',
+ mime: 'audio/midi'
+ };
+ }
+
+ if (
+ checkString('wOFF') &&
+ (
+ check([0x00, 0x01, 0x00, 0x00], {offset: 4}) ||
+ checkString('OTTO', {offset: 4})
+ )
+ ) {
+ return {
+ ext: 'woff',
+ mime: 'font/woff'
+ };
+ }
+
+ if (
+ checkString('wOF2') &&
+ (
+ check([0x00, 0x01, 0x00, 0x00], {offset: 4}) ||
+ checkString('OTTO', {offset: 4})
+ )
+ ) {
+ return {
+ ext: 'woff2',
+ mime: 'font/woff2'
+ };
+ }
+
+ if (check([0xD4, 0xC3, 0xB2, 0xA1]) || check([0xA1, 0xB2, 0xC3, 0xD4])) {
+ return {
+ ext: 'pcap',
+ mime: 'application/vnd.tcpdump.pcap'
+ };
+ }
+
+ // Sony DSD Stream File (DSF)
+ if (checkString('DSD ')) {
+ return {
+ ext: 'dsf',
+ mime: 'audio/x-dsf' // Non-standard
+ };
+ }
+
+ if (checkString('LZIP')) {
+ return {
+ ext: 'lz',
+ mime: 'application/x-lzip'
+ };
+ }
+
+ if (checkString('fLaC')) {
+ return {
+ ext: 'flac',
+ mime: 'audio/x-flac'
+ };
+ }
+
+ if (check([0x42, 0x50, 0x47, 0xFB])) {
+ return {
+ ext: 'bpg',
+ mime: 'image/bpg'
+ };
+ }
+
+ if (checkString('wvpk')) {
+ return {
+ ext: 'wv',
+ mime: 'audio/wavpack'
+ };
+ }
+
+ if (checkString('%PDF')) {
+ await tokenizer.ignore(1350);
+ const maxBufferSize = 10 * 1024 * 1024;
+ const buffer = Buffer.alloc(Math.min(maxBufferSize, tokenizer.fileInfo.size));
+ await tokenizer.readBuffer(buffer, {mayBeLess: true});
+
+ // Check if this is an Adobe Illustrator file
+ if (buffer.includes(Buffer.from('AIPrivateData'))) {
+ return {
+ ext: 'ai',
+ mime: 'application/postscript'
+ };
+ }
+
+ // Assume this is just a normal PDF
+ return {
+ ext: 'pdf',
+ mime: 'application/pdf'
+ };
+ }
+
+ if (check([0x00, 0x61, 0x73, 0x6D])) {
+ return {
+ ext: 'wasm',
+ mime: 'application/wasm'
+ };
+ }
+
+ // TIFF, little-endian type
+ if (check([0x49, 0x49, 0x2A, 0x0])) {
+ if (checkString('CR', {offset: 8})) {
+ return {
+ ext: 'cr2',
+ mime: 'image/x-canon-cr2'
+ };
+ }
+
+ if (check([0x1C, 0x00, 0xFE, 0x00], {offset: 8}) || check([0x1F, 0x00, 0x0B, 0x00], {offset: 8})) {
+ return {
+ ext: 'nef',
+ mime: 'image/x-nikon-nef'
+ };
+ }
+
+ if (
+ check([0x08, 0x00, 0x00, 0x00], {offset: 4}) &&
+ (check([0x2D, 0x00, 0xFE, 0x00], {offset: 8}) ||
+ check([0x27, 0x00, 0xFE, 0x00], {offset: 8}))
+ ) {
+ return {
+ ext: 'dng',
+ mime: 'image/x-adobe-dng'
+ };
+ }
+
+ buffer = Buffer.alloc(24);
+ await tokenizer.peekBuffer(buffer);
+ if (
+ (check([0x10, 0xFB, 0x86, 0x01], {offset: 4}) || check([0x08, 0x00, 0x00, 0x00], {offset: 4})) &&
+ // This pattern differentiates ARW from other TIFF-ish file types:
+ check([0x00, 0xFE, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x01], {offset: 9})
+ ) {
+ return {
+ ext: 'arw',
+ mime: 'image/x-sony-arw'
+ };
+ }
+
+ return {
+ ext: 'tif',
+ mime: 'image/tiff'
+ };
+ }
+
+ // TIFF, big-endian type
+ if (check([0x4D, 0x4D, 0x0, 0x2A])) {
+ return {
+ ext: 'tif',
+ mime: 'image/tiff'
+ };
+ }
+
+ if (checkString('MAC ')) {
+ return {
+ ext: 'ape',
+ mime: 'audio/ape'
+ };
+ }
+
+ // https://github.com/threatstack/libmagic/blob/master/magic/Magdir/matroska
+ if (check([0x1A, 0x45, 0xDF, 0xA3])) { // Root element: EBML
+ async function readField() {
+ const msb = await tokenizer.peekNumber(Token.UINT8);
+ let mask = 0x80;
+ let ic = 0; // 0 = A, 1 = B, 2 = C, 3 = D
+
+ while ((msb & mask) === 0) {
+ ++ic;
+ mask >>= 1;
+ }
+
+ const id = Buffer.alloc(ic + 1);
+ await tokenizer.readBuffer(id);
+ return id;
+ }
+
+ async function readElement() {
+ const id = await readField();
+ const lenField = await readField();
+ lenField[0] ^= 0x80 >> (lenField.length - 1);
+ const nrLen = Math.min(6, lenField.length); // JavaScript can max read 6 bytes integer
+ return {
+ id: id.readUIntBE(0, id.length),
+ len: lenField.readUIntBE(lenField.length - nrLen, nrLen)
+ };
+ }
+
+ async function readChildren(level, children) {
+ while (children > 0) {
+ const e = await readElement();
+ if (e.id === 0x4282) {
+ return tokenizer.readToken(new Token.StringType(e.len, 'utf-8')); // Return DocType
+ }
+
+ await tokenizer.ignore(e.len); // ignore payload
+ --children;
+ }
+ }
+
+ const re = await readElement();
+ const docType = await readChildren(1, re.len);
+
+ switch (docType) {
+ case 'webm':
+ return {
+ ext: 'webm',
+ mime: 'video/webm'
+ };
+
+ case 'matroska':
+ return {
+ ext: 'mkv',
+ mime: 'video/x-matroska'
+ };
+
+ default:
+ return;
+ }
+ }
+
+ // RIFF file format which might be AVI, WAV, QCP, etc
+ if (check([0x52, 0x49, 0x46, 0x46])) {
+ if (check([0x41, 0x56, 0x49], {offset: 8})) {
+ return {
+ ext: 'avi',
+ mime: 'video/vnd.avi'
+ };
+ }
+
+ if (check([0x57, 0x41, 0x56, 0x45], {offset: 8})) {
+ return {
+ ext: 'wav',
+ mime: 'audio/vnd.wave'
+ };
+ }
+
+ // QLCM, QCP file
+ if (check([0x51, 0x4C, 0x43, 0x4D], {offset: 8})) {
+ return {
+ ext: 'qcp',
+ mime: 'audio/qcelp'
+ };
+ }
+ }
+
+ if (checkString('SQLi')) {
+ return {
+ ext: 'sqlite',
+ mime: 'application/x-sqlite3'
+ };
+ }
+
+ if (check([0x4E, 0x45, 0x53, 0x1A])) {
+ return {
+ ext: 'nes',
+ mime: 'application/x-nintendo-nes-rom'
+ };
+ }
+
+ if (checkString('Cr24')) {
+ return {
+ ext: 'crx',
+ mime: 'application/x-google-chrome-extension'
+ };
+ }
+
+ if (
+ checkString('MSCF') ||
+ checkString('ISc(')
+ ) {
+ return {
+ ext: 'cab',
+ mime: 'application/vnd.ms-cab-compressed'
+ };
+ }
+
+ if (check([0xED, 0xAB, 0xEE, 0xDB])) {
+ return {
+ ext: 'rpm',
+ mime: 'application/x-rpm'
+ };
+ }
+
+ if (check([0xC5, 0xD0, 0xD3, 0xC6])) {
+ return {
+ ext: 'eps',
+ mime: 'application/eps'
+ };
+ }
+
+ // -- 5-byte signatures --
+
+ if (check([0x4F, 0x54, 0x54, 0x4F, 0x00])) {
+ return {
+ ext: 'otf',
+ mime: 'font/otf'
+ };
+ }
+
+ if (checkString('#!AMR')) {
+ return {
+ ext: 'amr',
+ mime: 'audio/amr'
+ };
+ }
+
+ if (checkString('{\\rtf')) {
+ return {
+ ext: 'rtf',
+ mime: 'application/rtf'
+ };
+ }
+
+ if (check([0x46, 0x4C, 0x56, 0x01])) {
+ return {
+ ext: 'flv',
+ mime: 'video/x-flv'
+ };
+ }
+
+ if (checkString('IMPM')) {
+ return {
+ ext: 'it',
+ mime: 'audio/x-it'
+ };
+ }
+
+ if (
+ checkString('-lh0-', {offset: 2}) ||
+ checkString('-lh1-', {offset: 2}) ||
+ checkString('-lh2-', {offset: 2}) ||
+ checkString('-lh3-', {offset: 2}) ||
+ checkString('-lh4-', {offset: 2}) ||
+ checkString('-lh5-', {offset: 2}) ||
+ checkString('-lh6-', {offset: 2}) ||
+ checkString('-lh7-', {offset: 2}) ||
+ checkString('-lzs-', {offset: 2}) ||
+ checkString('-lz4-', {offset: 2}) ||
+ checkString('-lz5-', {offset: 2}) ||
+ checkString('-lhd-', {offset: 2})
+ ) {
+ return {
+ ext: 'lzh',
+ mime: 'application/x-lzh-compressed'
+ };
+ }
+
+ // MPEG program stream (PS or MPEG-PS)
+ if (check([0x00, 0x00, 0x01, 0xBA])) {
+ // MPEG-PS, MPEG-1 Part 1
+ if (check([0x21], {offset: 4, mask: [0xF1]})) {
+ return {
+ ext: 'mpg', // May also be .ps, .mpeg
+ mime: 'video/MP1S'
+ };
+ }
+
+ // MPEG-PS, MPEG-2 Part 1
+ if (check([0x44], {offset: 4, mask: [0xC4]})) {
+ return {
+ ext: 'mpg', // May also be .mpg, .m2p, .vob or .sub
+ mime: 'video/MP2P'
+ };
+ }
+ }
+
+ if (checkString('ITSF')) {
+ return {
+ ext: 'chm',
+ mime: 'application/vnd.ms-htmlhelp'
+ };
+ }
+
+ // -- 6-byte signatures --
+
+ if (check([0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00])) {
+ return {
+ ext: 'xz',
+ mime: 'application/x-xz'
+ };
+ }
+
+ if (checkString('<?xml ')) {
+ return {
+ ext: 'xml',
+ mime: 'application/xml'
+ };
+ }
+
+ if (checkString('BEGIN:')) {
+ return {
+ ext: 'ics',
+ mime: 'text/calendar'
+ };
+ }
+
+ if (check([0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C])) {
+ return {
+ ext: '7z',
+ mime: 'application/x-7z-compressed'
+ };
+ }
+
+ if (
+ check([0x52, 0x61, 0x72, 0x21, 0x1A, 0x7]) &&
+ (buffer[6] === 0x0 || buffer[6] === 0x1)
+ ) {
+ return {
+ ext: 'rar',
+ mime: 'application/x-rar-compressed'
+ };
+ }
+
+ if (checkString('solid ')) {
+ return {
+ ext: 'stl',
+ mime: 'model/stl'
+ };
+ }
+
+ // -- 7-byte signatures --
+
+ if (checkString('BLENDER')) {
+ return {
+ ext: 'blend',
+ mime: 'application/x-blender'
+ };
+ }
+
+ if (checkString('!<arch>')) {
+ await tokenizer.ignore(8);
+ const str = await tokenizer.readToken(new Token.StringType(13, 'ascii'));
+ if (str === 'debian-binary') {
+ return {
+ ext: 'deb',
+ mime: 'application/x-deb'
+ };
+ }
+
+ return {
+ ext: 'ar',
+ mime: 'application/x-unix-archive'
+ };
+ }
+
+ // -- 8-byte signatures --
+
+ if (check([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])) {
+ // APNG format (https://wiki.mozilla.org/APNG_Specification)
+ // 1. Find the first IDAT (image data) chunk (49 44 41 54)
+ // 2. Check if there is an "acTL" chunk before the IDAT one (61 63 54 4C)
+
+ // Offset calculated as follows:
+ // - 8 bytes: PNG signature
+ // - 4 (length) + 4 (chunk type) + 13 (chunk data) + 4 (CRC): IHDR chunk
+
+ await tokenizer.ignore(8); // ignore PNG signature
+
+ async function readChunkHeader() {
+ return {
+ length: await tokenizer.readToken(Token.INT32_BE),
+ type: await tokenizer.readToken(new Token.StringType(4, 'binary'))
+ };
+ }
+
+ do {
+ const chunk = await readChunkHeader();
+ if (chunk.length < 0) {
+ return; // Invalid chunk length
+ }
+
+ switch (chunk.type) {
+ case 'IDAT':
+ return {
+ ext: 'png',
+ mime: 'image/png'
+ };
+ case 'acTL':
+ return {
+ ext: 'apng',
+ mime: 'image/apng'
+ };
+ default:
+ await tokenizer.ignore(chunk.length + 4); // Ignore chunk-data + CRC
+ }
+ } while (tokenizer.position + 8 < tokenizer.fileInfo.size);
+
+ return {
+ ext: 'png',
+ mime: 'image/png'
+ };
+ }
+
+ if (check([0x41, 0x52, 0x52, 0x4F, 0x57, 0x31, 0x00, 0x00])) {
+ return {
+ ext: 'arrow',
+ mime: 'application/x-apache-arrow'
+ };
+ }
+
+ if (check([0x67, 0x6C, 0x54, 0x46, 0x02, 0x00, 0x00, 0x00])) {
+ return {
+ ext: 'glb',
+ mime: 'model/gltf-binary'
+ };
+ }
+
+ // `mov` format variants
+ if (
+ check([0x66, 0x72, 0x65, 0x65], {offset: 4}) || // `free`
+ check([0x6D, 0x64, 0x61, 0x74], {offset: 4}) || // `mdat` MJPEG
+ check([0x6D, 0x6F, 0x6F, 0x76], {offset: 4}) || // `moov`
+ check([0x77, 0x69, 0x64, 0x65], {offset: 4}) // `wide`
+ ) {
+ return {
+ ext: 'mov',
+ mime: 'video/quicktime'
+ };
+ }
+
+ // -- 9-byte signatures --
+
+ if (check([0x49, 0x49, 0x52, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x18])) {
+ return {
+ ext: 'orf',
+ mime: 'image/x-olympus-orf'
+ };
+ }
+
+ // -- 12-byte signatures --
+
+ if (check([0x49, 0x49, 0x55, 0x00, 0x18, 0x00, 0x00, 0x00, 0x88, 0xE7, 0x74, 0xD8])) {
+ return {
+ ext: 'rw2',
+ mime: 'image/x-panasonic-rw2'
+ };
+ }
+
+ // ASF_Header_Object first 80 bytes
+ if (check([0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9])) {
+ async function readHeader() {
+ const guid = Buffer.alloc(16);
+ await tokenizer.readBuffer(guid);
+ return {
+ id: guid,
+ size: await tokenizer.readToken(Token.UINT64_LE)
+ };
+ }
+
+ await tokenizer.ignore(30);
+ // Search for header should be in first 1KB of file.
+ while (tokenizer.position + 24 < tokenizer.fileInfo.size) {
+ const header = await readHeader();
+ let payload = header.size - 24;
+ if (_check(header.id, [0x91, 0x07, 0xDC, 0xB7, 0xB7, 0xA9, 0xCF, 0x11, 0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65])) {
+ // Sync on Stream-Properties-Object (B7DC0791-A9B7-11CF-8EE6-00C00C205365)
+ const typeId = Buffer.alloc(16);
+ payload -= await tokenizer.readBuffer(typeId);
+
+ if (_check(typeId, [0x40, 0x9E, 0x69, 0xF8, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) {
+ // Found audio:
+ return {
+ ext: 'asf',
+ mime: 'audio/x-ms-asf'
+ };
+ }
+
+ if (_check(typeId, [0xC0, 0xEF, 0x19, 0xBC, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) {
+ // Found video:
+ return {
+ ext: 'asf',
+ mime: 'video/x-ms-asf'
+ };
+ }
+
+ break;
+ }
+
+ await tokenizer.ignore(payload);
+ }
+
+ // Default to ASF generic extension
+ return {
+ ext: 'asf',
+ mime: 'application/vnd.ms-asf'
+ };
+ }
+
+ if (check([0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A])) {
+ return {
+ ext: 'ktx',
+ mime: 'image/ktx'
+ };
+ }
+
+ if ((check([0x7E, 0x10, 0x04]) || check([0x7E, 0x18, 0x04])) && check([0x30, 0x4D, 0x49, 0x45], {offset: 4})) {
+ return {
+ ext: 'mie',
+ mime: 'application/x-mie'
+ };
+ }
+
+ if (check([0x27, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], {offset: 2})) {
+ return {
+ ext: 'shp',
+ mime: 'application/x-esri-shape'
+ };
+ }
+
+ if (check([0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A])) {
+ // JPEG-2000 family
+
+ await tokenizer.ignore(20);
+ const type = await tokenizer.readToken(new Token.StringType(4, 'ascii'));
+ switch (type) {
+ case 'jp2 ':
+ return {
+ ext: 'jp2',
+ mime: 'image/jp2'
+ };
+ case 'jpx ':
+ return {
+ ext: 'jpx',
+ mime: 'image/jpx'
+ };
+ case 'jpm ':
+ return {
+ ext: 'jpm',
+ mime: 'image/jpm'
+ };
+ case 'mjp2':
+ return {
+ ext: 'mj2',
+ mime: 'image/mj2'
+ };
+ default:
+ return;
+ }
+ }
+
+ // -- Unsafe signatures --
+
+ if (
+ check([0x0, 0x0, 0x1, 0xBA]) ||
+ check([0x0, 0x0, 0x1, 0xB3])
+ ) {
+ return {
+ ext: 'mpg',
+ mime: 'video/mpeg'
+ };
+ }
+
+ if (check([0x00, 0x01, 0x00, 0x00, 0x00])) {
+ return {
+ ext: 'ttf',
+ mime: 'font/ttf'
+ };
+ }
+
+ if (check([0x00, 0x00, 0x01, 0x00])) {
+ return {
+ ext: 'ico',
+ mime: 'image/x-icon'
+ };
+ }
+
+ if (check([0x00, 0x00, 0x02, 0x00])) {
+ return {
+ ext: 'cur',
+ mime: 'image/x-icon'
+ };
+ }
+
+ if (check([0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1])) {
+ // Detected Microsoft Compound File Binary File (MS-CFB) Format.
+ return {
+ ext: 'cfb',
+ mime: 'application/x-cfb'
+ };
+ }
+
+ // Increase sample size from 12 to 256.
+ await tokenizer.peekBuffer(buffer, {length: Math.min(256, tokenizer.fileInfo.size), mayBeLess: true});
+
+ // `raf` is here just to keep all the raw image detectors together.
+ if (checkString('FUJIFILMCCD-RAW')) {
+ return {
+ ext: 'raf',
+ mime: 'image/x-fujifilm-raf'
+ };
+ }
+
+ if (checkString('Extended Module:')) {
+ return {
+ ext: 'xm',
+ mime: 'audio/x-xm'
+ };
+ }
+
+ if (checkString('Creative Voice File')) {
+ return {
+ ext: 'voc',
+ mime: 'audio/x-voc'
+ };
+ }
+
+ if (check([0x04, 0x00, 0x00, 0x00]) && buffer.length >= 16) { // Rough & quick check Pickle/ASAR
+ const jsonSize = buffer.readUInt32LE(12);
+ if (jsonSize > 12 && jsonSize < 240 && buffer.length >= jsonSize + 16) {
+ try {
+ const header = buffer.slice(16, jsonSize + 16).toString();
+ const json = JSON.parse(header);
+ // Check if Pickle is ASAR
+ if (json.files) { // Final check, assuring Pickle/ASAR format
+ return {
+ ext: 'asar',
+ mime: 'application/x-asar'
+ };
+ }
+ } catch (_) {
+ }
+ }
+ }
+
+ if (check([0x06, 0x0E, 0x2B, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0D, 0x01, 0x02, 0x01, 0x01, 0x02])) {
+ return {
+ ext: 'mxf',
+ mime: 'application/mxf'
+ };
+ }
+
+ if (checkString('SCRM', {offset: 44})) {
+ return {
+ ext: 's3m',
+ mime: 'audio/x-s3m'
+ };
+ }
+
+ if (check([0x47], {offset: 4}) && (check([0x47], {offset: 192}) || check([0x47], {offset: 196}))) {
+ return {
+ ext: 'mts',
+ mime: 'video/mp2t'
+ };
+ }
+
+ if (check([0x42, 0x4F, 0x4F, 0x4B, 0x4D, 0x4F, 0x42, 0x49], {offset: 60})) {
+ return {
+ ext: 'mobi',
+ mime: 'application/x-mobipocket-ebook'
+ };
+ }
+
+ if (check([0x44, 0x49, 0x43, 0x4D], {offset: 128})) {
+ return {
+ ext: 'dcm',
+ mime: 'application/dicom'
+ };
+ }
+
+ if (check([0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46])) {
+ return {
+ ext: 'lnk',
+ mime: 'application/x.ms.shortcut' // Invented by us
+ };
+ }
+
+ if (check([0x62, 0x6F, 0x6F, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x00])) {
+ return {
+ ext: 'alias',
+ mime: 'application/x.apple.alias' // Invented by us
+ };
+ }
+
+ if (
+ check([0x4C, 0x50], {offset: 34}) &&
+ (
+ check([0x00, 0x00, 0x01], {offset: 8}) ||
+ check([0x01, 0x00, 0x02], {offset: 8}) ||
+ check([0x02, 0x00, 0x02], {offset: 8})
+ )
+ ) {
+ return {
+ ext: 'eot',
+ mime: 'application/vnd.ms-fontobject'
+ };
+ }
+
+ if (check([0x06, 0x06, 0xED, 0xF5, 0xD8, 0x1D, 0x46, 0xE5, 0xBD, 0x31, 0xEF, 0xE7, 0xFE, 0x74, 0xB7, 0x1D])) {
+ return {
+ ext: 'indd',
+ mime: 'application/x-indesign'
+ };
+ }
+
+ // Increase sample size from 256 to 512
+ await tokenizer.peekBuffer(buffer, {length: Math.min(512, tokenizer.fileInfo.size), mayBeLess: true});
+
+ // Requires a buffer size of 512 bytes
+ if (tarHeaderChecksumMatches(buffer)) {
+ return {
+ ext: 'tar',
+ mime: 'application/x-tar'
+ };
+ }
+
+ if (check([0xFF, 0xFE, 0xFF, 0x0E, 0x53, 0x00, 0x6B, 0x00, 0x65, 0x00, 0x74, 0x00, 0x63, 0x00, 0x68, 0x00, 0x55, 0x00, 0x70, 0x00, 0x20, 0x00, 0x4D, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6C, 0x00])) {
+ return {
+ ext: 'skp',
+ mime: 'application/vnd.sketchup.skp'
+ };
+ }
+
+ if (checkString('-----BEGIN PGP MESSAGE-----')) {
+ return {
+ ext: 'pgp',
+ mime: 'application/pgp-encrypted'
+ };
+ }
+
+ // Check for MPEG header at different starting offsets
+ for (let start = 0; start < 2 && start < (buffer.length - 16); start++) {
+ // Check MPEG 1 or 2 Layer 3 header, or 'layer 0' for ADTS (MPEG sync-word 0xFFE)
+ if (buffer.length >= start + 2 && check([0xFF, 0xE0], {offset: start, mask: [0xFF, 0xE0]})) {
+ if (check([0x10], {offset: start + 1, mask: [0x16]})) {
+ // Check for (ADTS) MPEG-2
+ if (check([0x08], {offset: start + 1, mask: [0x08]})) {
+ return {
+ ext: 'aac',
+ mime: 'audio/aac'
+ };
+ }
+
+ // Must be (ADTS) MPEG-4
+ return {
+ ext: 'aac',
+ mime: 'audio/aac'
+ };
+ }
+
+ // MPEG 1 or 2 Layer 3 header
+ // Check for MPEG layer 3
+ if (check([0x02], {offset: start + 1, mask: [0x06]})) {
+ return {
+ ext: 'mp3',
+ mime: 'audio/mpeg'
+ };
+ }
+
+ // Check for MPEG layer 2
+ if (check([0x04], {offset: start + 1, mask: [0x06]})) {
+ return {
+ ext: 'mp2',
+ mime: 'audio/mpeg'
+ };
+ }
+
+ // Check for MPEG layer 1
+ if (check([0x06], {offset: start + 1, mask: [0x06]})) {
+ return {
+ ext: 'mp1',
+ mime: 'audio/mpeg'
+ };
+ }
+ }
+ }
+}
+
+const stream = readableStream => new Promise((resolve, reject) => {
+ // Using `eval` to work around issues when bundling with Webpack
+ const stream = eval('require')('stream'); // eslint-disable-line no-eval
+
+ readableStream.on('error', reject);
+ readableStream.once('readable', async () => {
+ // Set up output stream
+ const pass = new stream.PassThrough();
+ let outputStream;
+ if (stream.pipeline) {
+ outputStream = stream.pipeline(readableStream, pass, () => {
+ });
+ } else {
+ outputStream = readableStream.pipe(pass);
+ }
+
+ // Read the input stream and detect the filetype
+ const chunk = readableStream.read(minimumBytes) || readableStream.read() || Buffer.alloc(0);
+ try {
+ const fileType = await fromBuffer(chunk);
+ pass.fileType = fileType;
+ } catch (error) {
+ reject(error);
+ }
+
+ resolve(outputStream);
+ });
+});
+
+const fileType = {
+ fromStream,
+ fromTokenizer,
+ fromBuffer,
+ stream
+};
+
+Object.defineProperty(fileType, 'extensions', {
+ get() {
+ return new Set(supported.extensions);
+ }
+});
+
+Object.defineProperty(fileType, 'mimeTypes', {
+ get() {
+ return new Set(supported.mimeTypes);
+ }
+});
+
+module.exports = fileType;
diff --git a/node_modules/file-type/index.d.ts b/node_modules/file-type/index.d.ts
new file mode 100644
index 0000000..30c8eff
--- /dev/null
+++ b/node_modules/file-type/index.d.ts
@@ -0,0 +1,27 @@
+/// <reference types="node"/>
+import {Readable as ReadableStream} from 'stream';
+import * as core from './core';
+
+export type ReadableStreamWithFileType = core.ReadableStreamWithFileType;
+export type FileTypeResult = core.FileTypeResult;
+export type FileExtension = core.FileExtension;
+export type MimeType = core.MimeType;
+
+/**
+Detect the file type of a file path.
+
+The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
+
+@param path - The file path to parse.
+@returns The detected file type and MIME type or `undefined` when there is no match.
+*/
+export function fromFile(path: string): Promise<core.FileTypeResult | undefined>;
+
+export {
+ fromBuffer,
+ fromStream,
+ fromTokenizer,
+ extensions,
+ mimeTypes,
+ stream
+} from './core';
diff --git a/node_modules/file-type/index.js b/node_modules/file-type/index.js
new file mode 100644
index 0000000..2c42ac0
--- /dev/null
+++ b/node_modules/file-type/index.js
@@ -0,0 +1,32 @@
+'use strict';
+const strtok3 = require('strtok3');
+const core = require('./core');
+
+async function fromFile(path) {
+ const tokenizer = await strtok3.fromFile(path);
+ try {
+ return await core.fromTokenizer(tokenizer);
+ } finally {
+ await tokenizer.close();
+ }
+}
+
+const fileType = {
+ fromFile
+};
+
+Object.assign(fileType, core);
+
+Object.defineProperty(fileType, 'extensions', {
+ get() {
+ return core.extensions;
+ }
+});
+
+Object.defineProperty(fileType, 'mimeTypes', {
+ get() {
+ return core.mimeTypes;
+ }
+});
+
+module.exports = fileType;
diff --git a/node_modules/file-type/license b/node_modules/file-type/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/file-type/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/file-type/package.json b/node_modules/file-type/package.json
new file mode 100644
index 0000000..3ede47b
--- /dev/null
+++ b/node_modules/file-type/package.json
@@ -0,0 +1,245 @@
+{
+ "_from": "file-type",
+ "_id": "file-type@16.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-1Wwww3mmZCMmLjBfslCluwt2mxH80GsAXYrvPnfQ42G1EGWag336kB1iyCgyn7UXiKY3cJrNykXPrCwA7xb5Ag==",
+ "_location": "/file-type",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "file-type",
+ "name": "file-type",
+ "escapedName": "file-type",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/file-type/-/file-type-16.2.0.tgz",
+ "_shasum": "d4f1da71ddda758db7f15f93adfaed09ce9e2715",
+ "_spec": "file-type",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/file-type/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "readable-web-to-node-stream": "^3.0.0",
+ "strtok3": "^6.0.3",
+ "token-types": "^2.0.0",
+ "typedarray-to-buffer": "^3.1.5"
+ },
+ "deprecated": false,
+ "description": "Detect the file type of a Buffer/Uint8Array/ArrayBuffer",
+ "devDependencies": {
+ "@types/node": "^13.1.4",
+ "ava": "^2.3.0",
+ "noop-stream": "^0.1.0",
+ "read-chunk": "^3.2.0",
+ "tsd": "^0.11.0",
+ "xo": "^0.25.3"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "browser.js",
+ "browser.d.ts",
+ "core.js",
+ "core.d.ts",
+ "supported.js",
+ "util.js"
+ ],
+ "funding": "https://github.com/sindresorhus/file-type?sponsor=1",
+ "homepage": "https://github.com/sindresorhus/file-type#readme",
+ "keywords": [
+ "mime",
+ "file",
+ "type",
+ "magic",
+ "archive",
+ "image",
+ "img",
+ "pic",
+ "picture",
+ "flash",
+ "photo",
+ "video",
+ "detect",
+ "check",
+ "is",
+ "exif",
+ "exe",
+ "binary",
+ "buffer",
+ "uint8array",
+ "jpg",
+ "png",
+ "apng",
+ "gif",
+ "webp",
+ "flif",
+ "cr2",
+ "cr3",
+ "orf",
+ "arw",
+ "dng",
+ "nef",
+ "rw2",
+ "raf",
+ "tif",
+ "bmp",
+ "icns",
+ "jxr",
+ "psd",
+ "indd",
+ "zip",
+ "tar",
+ "rar",
+ "gz",
+ "bz2",
+ "7z",
+ "dmg",
+ "mp4",
+ "mid",
+ "mkv",
+ "webm",
+ "mov",
+ "avi",
+ "mpg",
+ "mp2",
+ "mp3",
+ "m4a",
+ "ogg",
+ "opus",
+ "flac",
+ "wav",
+ "amr",
+ "pdf",
+ "epub",
+ "mobi",
+ "swf",
+ "rtf",
+ "woff",
+ "woff2",
+ "eot",
+ "ttf",
+ "otf",
+ "ico",
+ "flv",
+ "ps",
+ "xz",
+ "sqlite",
+ "xpi",
+ "cab",
+ "deb",
+ "ar",
+ "rpm",
+ "Z",
+ "lz",
+ "cfb",
+ "mxf",
+ "mts",
+ "wasm",
+ "webassembly",
+ "blend",
+ "bpg",
+ "docx",
+ "pptx",
+ "xlsx",
+ "3gp",
+ "jp2",
+ "jpm",
+ "jpx",
+ "mj2",
+ "aif",
+ "odt",
+ "ods",
+ "odp",
+ "xml",
+ "heic",
+ "ics",
+ "glb",
+ "pcap",
+ "dsf",
+ "lnk",
+ "alias",
+ "voc",
+ "ac3",
+ "3g2",
+ "m4b",
+ "m4p",
+ "m4v",
+ "f4a",
+ "f4b",
+ "f4p",
+ "f4v",
+ "mie",
+ "qcp",
+ "asf",
+ "ogv",
+ "ogm",
+ "oga",
+ "spx",
+ "ogx",
+ "ape",
+ "wv",
+ "cur",
+ "nes",
+ "crx",
+ "ktx",
+ "dcm",
+ "mpc",
+ "arrow",
+ "shp",
+ "aac",
+ "mp1",
+ "it",
+ "s3m",
+ "xm",
+ "ai",
+ "skp",
+ "avif",
+ "eps",
+ "lzh",
+ "pgp",
+ "asar",
+ "stl",
+ "chm",
+ "3mf"
+ ],
+ "license": "MIT",
+ "name": "file-type",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/file-type.git"
+ },
+ "scripts": {
+ "ava": "ava --serial --verbose",
+ "test": "xo && ava && tsd"
+ },
+ "version": "16.2.0",
+ "xo": {
+ "envs": [
+ "node",
+ "browser"
+ ],
+ "rules": {
+ "no-inner-declarations": "warn",
+ "no-await-in-loop": "warn",
+ "promise/prefer-await-to-then": "warn",
+ "prefer-named-capture-group": "off"
+ }
+ }
+}
diff --git a/node_modules/file-type/readme.md b/node_modules/file-type/readme.md
new file mode 100644
index 0000000..795677e
--- /dev/null
+++ b/node_modules/file-type/readme.md
@@ -0,0 +1,436 @@
+# file-type
+
+> Detect the file type of a Buffer/Uint8Array/ArrayBuffer
+
+The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
+
+This package is for detecting binary-based file formats, not text-based formats like `.txt`, `.csv`, `.svg`, etc.
+
+## Install
+
+```
+$ npm install file-type
+```
+
+## Usage
+
+#### Node.js
+
+Determine file type from a file:
+
+```js
+const FileType = require('file-type');
+
+(async () => {
+ console.log(await FileType.fromFile('Unicorn.png'));
+ //=> {ext: 'png', mime: 'image/png'}
+})();
+```
+
+Determine file type from a Buffer, which may be a portion of the beginning of a file:
+
+```js
+const FileType = require('file-type');
+const readChunk = require('read-chunk');
+
+(async () => {
+ const buffer = readChunk.sync('Unicorn.png', 0, 4100);
+
+ console.log(await FileType.fromBuffer(buffer));
+ //=> {ext: 'png', mime: 'image/png'}
+})();
+```
+
+Determine file type from a stream:
+
+```js
+const fs = require('fs');
+const FileType = require('file-type');
+
+(async () => {
+ const stream = fs.createReadStream('Unicorn.mp4');
+
+ console.log(await FileType.fromStream(stream));
+ //=> {ext: 'mp4', mime: 'video/mp4'}
+}
+)();
+```
+
+The stream method can also be used to read from a remote location:
+
+```js
+const got = require('got');
+const FileType = require('file-type');
+
+const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg';
+
+(async () => {
+ const stream = got.stream(url);
+
+ console.log(await FileType.fromStream(stream));
+ //=> {ext: 'jpg', mime: 'image/jpeg'}
+})();
+```
+
+Another stream example:
+
+```js
+const stream = require('stream');
+const fs = require('fs');
+const crypto = require('crypto');
+const FileType = require('file-type');
+
+(async () => {
+ const read = fs.createReadStream('encrypted.enc');
+ const decipher = crypto.createDecipheriv(alg, key, iv);
+
+ const fileTypeStream = await FileType.stream(stream.pipeline(read, decipher));
+
+ console.log(fileTypeStream.fileType);
+ //=> {ext: 'mov', mime: 'video/quicktime'}
+
+ const write = fs.createWriteStream(`decrypted.${fileTypeStream.fileType.ext}`);
+ fileTypeStream.pipe(write);
+})();
+```
+
+#### Browser
+
+```js
+const FileType = require('file-type/browser');
+
+const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg';
+
+(async () => {
+ const response = await fetch(url);
+ const fileType = await FileType.fromStream(response.body);
+
+ console.log(fileType);
+ //=> {ext: 'jpg', mime: 'image/jpeg'}
+})();
+```
+
+```js
+const FileType = require('file-type/browser');
+
+(async () => {
+ const blob = new Blob(['<?xml version="1.0" encoding="ISO-8859-1" ?>'], {
+ type: 'plain/text',
+ endings: 'native'
+ });
+
+ console.log(await FileType.fromBlob(blob));
+ //=> {ext: 'txt', mime: 'plain/text'}
+})();
+```
+
+## API
+
+### FileType.fromBuffer(buffer)
+
+Detect the file type of a `Buffer`, `Uint8Array`, or `ArrayBuffer`.
+
+The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
+
+If file access is available, it is recommended to use `FileType.fromFile()` instead.
+
+Returns a `Promise` for an object with the detected file type and MIME type:
+
+- `ext` - One of the [supported file types](#supported-file-types)
+- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type)
+
+Or `undefined` when there is no match.
+
+#### buffer
+
+Type: `Buffer | Uint8Array | ArrayBuffer`
+
+A buffer representing file data. It works best if the buffer contains the entire file, it may work with a smaller portion as well.
+
+### FileType.fromFile(filePath)
+
+Detect the file type of a file path.
+
+The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
+
+Returns a `Promise` for an object with the detected file type and MIME type:
+
+- `ext` - One of the [supported file types](#supported-file-types)
+- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type)
+
+Or `undefined` when there is no match.
+
+#### filePath
+
+Type: `string`
+
+The file path to parse.
+
+### FileType.fromStream(stream)
+
+Detect the file type of a Node.js [readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable).
+
+The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
+
+Returns a `Promise` for an object with the detected file type and MIME type:
+
+- `ext` - One of the [supported file types](#supported-file-types)
+- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type)
+
+Or `undefined` when there is no match.
+
+#### stream
+
+Type: [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable)
+
+A readable stream representing file data.
+
+### FileType.fromTokenizer(tokenizer)
+
+Detect the file type from an `ITokenizer` source.
+
+This method is used internally, but can also be used for a special "tokenizer" reader.
+
+A tokenizer propagates the internal read functions, allowing alternative transport mechanisms, to access files, to be implemented and used.
+
+Returns a `Promise` for an object with the detected file type and MIME type:
+
+- `ext` - One of the [supported file types](#supported-file-types)
+- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type)
+
+Or `undefined` when there is no match.
+
+An example is [`@tokenizer/http`](https://github.com/Borewit/tokenizer-http), which requests data using [HTTP-range-requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests). A difference with a conventional stream and the [*tokenizer*](https://github.com/Borewit/strtok3#tokenizer), is that it can *ignore* (seek, fast-forward) in the stream. For example, you may only need and read the first 6 bytes, and the last 128 bytes, which may be an advantage in case reading the entire file would take longer.
+
+```js
+const {makeTokenizer} = require('@tokenizer/http');
+const FileType = require('file-type');
+
+const audioTrackUrl = 'https://test-audio.netlify.com/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/01%20-%20Diablo%20Swing%20Orchestra%20-%20Heroines.mp3';
+
+(async () => {
+ const httpTokenizer = await makeTokenizer(audioTrackUrl);
+ const fileType = await FileType.fromTokenizer(httpTokenizer);
+
+ console.log(fileType);
+ //=> {ext: 'mp3', mime: 'audio/mpeg'}
+})();
+```
+
+Or use [`@tokenizer/s3`](https://github.com/Borewit/tokenizer-s3) to determine the file type of a file stored on [Amazon S3](https://aws.amazon.com/s3):
+
+```js
+const FileType = require('file-type');
+const S3 = require('aws-sdk/clients/s3');
+const {makeTokenizer} = require('@tokenizer/s3');
+
+(async () => {
+ // Initialize the S3 client
+ const s3 = new S3();
+
+ // Initialize the S3 tokenizer.
+ const s3Tokenizer = await makeTokenizer(s3, {
+ Bucket: 'affectlab',
+ Key: '1min_35sec.mp4'
+ });
+
+ // Figure out what kind of file it is.
+ const fileType = await FileType.fromTokenizer(s3Tokenizer);
+ console.log(fileType);
+})();
+```
+
+Note that only the minimum amount of data required to determine the file type is read (okay, just a bit extra to prevent too many fragmented reads).
+
+#### tokenizer
+
+Type: [`ITokenizer`](https://github.com/Borewit/strtok3#tokenizer)
+
+A file source implementing the [tokenizer interface](https://github.com/Borewit/strtok3#tokenizer).
+
+### FileType.stream(readableStream)
+
+Detect the file type of a readable stream.
+
+Returns a `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `FileType.fromFile()`.
+
+*Note:* This method is only available using Node.js.
+
+#### readableStream
+
+Type: [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable)
+
+The input stream.
+
+### FileType.extensions
+
+Returns a set of supported file extensions.
+
+### FileType.mimeTypes
+
+Returns a set of supported MIME types.
+
+## Supported file types
+
+- [`jpg`](https://en.wikipedia.org/wiki/JPEG)
+- [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics)
+- [`apng`](https://en.wikipedia.org/wiki/APNG) - Animated Portable Network Graphics
+- [`gif`](https://en.wikipedia.org/wiki/GIF)
+- [`webp`](https://en.wikipedia.org/wiki/WebP)
+- [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format)
+- [`cr2`](https://fileinfo.com/extension/cr2) - Canon Raw image file (v2)
+- [`cr3`](https://fileinfo.com/extension/cr3) - Canon Raw image file (v3)
+- [`orf`](https://en.wikipedia.org/wiki/ORF_format) - Olympus Raw image file
+- [`arw`](https://en.wikipedia.org/wiki/Raw_image_format#ARW) - Sony Alpha Raw image file
+- [`dng`](https://en.wikipedia.org/wiki/Digital_Negative) - Adobe Digital Negative image file
+- [`nef`](https://www.nikonusa.com/en/learn-and-explore/a/products-and-innovation/nikon-electronic-format-nef.html) - Nikon Electronic Format image file
+- [`rw2`](https://en.wikipedia.org/wiki/Raw_image_format) - Panasonic RAW image file
+- [`raf`](https://en.wikipedia.org/wiki/Raw_image_format) - Fujifilm RAW image file
+- [`tif`](https://en.wikipedia.org/wiki/Tagged_Image_File_Format)
+- [`bmp`](https://en.wikipedia.org/wiki/BMP_file_format)
+- [`icns`](https://en.wikipedia.org/wiki/Apple_Icon_Image_format)
+- [`jxr`](https://en.wikipedia.org/wiki/JPEG_XR)
+- [`psd`](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format)
+- [`indd`](https://en.wikipedia.org/wiki/Adobe_InDesign#File_format)
+- [`zip`](https://en.wikipedia.org/wiki/Zip_(file_format))
+- [`tar`](https://en.wikipedia.org/wiki/Tar_(computing)#File_format)
+- [`rar`](https://en.wikipedia.org/wiki/RAR_(file_format))
+- [`gz`](https://en.wikipedia.org/wiki/Gzip)
+- [`bz2`](https://en.wikipedia.org/wiki/Bzip2)
+- [`7z`](https://en.wikipedia.org/wiki/7z)
+- [`dmg`](https://en.wikipedia.org/wiki/Apple_Disk_Image)
+- [`mp4`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions)
+- [`mid`](https://en.wikipedia.org/wiki/MIDI)
+- [`mkv`](https://en.wikipedia.org/wiki/Matroska)
+- [`webm`](https://en.wikipedia.org/wiki/WebM)
+- [`mov`](https://en.wikipedia.org/wiki/QuickTime_File_Format)
+- [`avi`](https://en.wikipedia.org/wiki/Audio_Video_Interleave)
+- [`mpg`](https://en.wikipedia.org/wiki/MPEG-1)
+- [`mp1`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_I) - MPEG-1 Audio Layer I
+- [`mp2`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_II)
+- [`mp3`](https://en.wikipedia.org/wiki/MP3)
+- [`ogg`](https://en.wikipedia.org/wiki/Ogg)
+- [`ogv`](https://en.wikipedia.org/wiki/Ogg)
+- [`ogm`](https://en.wikipedia.org/wiki/Ogg)
+- [`oga`](https://en.wikipedia.org/wiki/Ogg)
+- [`spx`](https://en.wikipedia.org/wiki/Ogg)
+- [`ogx`](https://en.wikipedia.org/wiki/Ogg)
+- [`opus`](https://en.wikipedia.org/wiki/Opus_(audio_format))
+- [`flac`](https://en.wikipedia.org/wiki/FLAC)
+- [`wav`](https://en.wikipedia.org/wiki/WAV)
+- [`qcp`](https://en.wikipedia.org/wiki/QCP)
+- [`amr`](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec)
+- [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format)
+- [`epub`](https://en.wikipedia.org/wiki/EPUB)
+- [`mobi`](https://en.wikipedia.org/wiki/Mobipocket) - Mobipocket
+- [`exe`](https://en.wikipedia.org/wiki/.exe)
+- [`swf`](https://en.wikipedia.org/wiki/SWF)
+- [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format)
+- [`woff`](https://en.wikipedia.org/wiki/Web_Open_Font_Format)
+- [`woff2`](https://en.wikipedia.org/wiki/Web_Open_Font_Format)
+- [`eot`](https://en.wikipedia.org/wiki/Embedded_OpenType)
+- [`ttf`](https://en.wikipedia.org/wiki/TrueType)
+- [`otf`](https://en.wikipedia.org/wiki/OpenType)
+- [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format))
+- [`flv`](https://en.wikipedia.org/wiki/Flash_Video)
+- [`ps`](https://en.wikipedia.org/wiki/Postscript)
+- [`xz`](https://en.wikipedia.org/wiki/Xz)
+- [`sqlite`](https://www.sqlite.org/fileformat2.html)
+- [`nes`](https://fileinfo.com/extension/nes)
+- [`crx`](https://developer.chrome.com/extensions/crx)
+- [`xpi`](https://en.wikipedia.org/wiki/XPInstall)
+- [`cab`](https://en.wikipedia.org/wiki/Cabinet_(file_format))
+- [`deb`](https://en.wikipedia.org/wiki/Deb_(file_format))
+- [`ar`](https://en.wikipedia.org/wiki/Ar_(Unix))
+- [`rpm`](https://fileinfo.com/extension/rpm)
+- [`Z`](https://fileinfo.com/extension/z)
+- [`lz`](https://en.wikipedia.org/wiki/Lzip)
+- [`cfb`](https://en.wikipedia.org/wiki/Compound_File_Binary_Format)
+- [`mxf`](https://en.wikipedia.org/wiki/Material_Exchange_Format)
+- [`mts`](https://en.wikipedia.org/wiki/.m2ts)
+- [`wasm`](https://en.wikipedia.org/wiki/WebAssembly)
+- [`blend`](https://wiki.blender.org/index.php/Dev:Source/Architecture/File_Format)
+- [`bpg`](https://bellard.org/bpg/)
+- [`docx`](https://en.wikipedia.org/wiki/Office_Open_XML)
+- [`pptx`](https://en.wikipedia.org/wiki/Office_Open_XML)
+- [`xlsx`](https://en.wikipedia.org/wiki/Office_Open_XML)
+- [`jp2`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
+- [`jpm`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
+- [`jpx`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
+- [`mj2`](https://en.wikipedia.org/wiki/Motion_JPEG_2000) - Motion JPEG 2000
+- [`aif`](https://en.wikipedia.org/wiki/Audio_Interchange_File_Format)
+- [`odt`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for word processing
+- [`ods`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for spreadsheets
+- [`odp`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for presentations
+- [`xml`](https://en.wikipedia.org/wiki/XML)
+- [`heic`](https://nokiatech.github.io/heif/technical.html)
+- [`cur`](https://en.wikipedia.org/wiki/ICO_(file_format))
+- [`ktx`](https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/)
+- [`ape`](https://en.wikipedia.org/wiki/Monkey%27s_Audio) - Monkey's Audio
+- [`wv`](https://en.wikipedia.org/wiki/WavPack) - WavPack
+- [`asf`](https://en.wikipedia.org/wiki/Advanced_Systems_Format) - Advanced Systems Format
+- [`dcm`](https://en.wikipedia.org/wiki/DICOM#Data_format) - DICOM Image File
+- [`mpc`](https://en.wikipedia.org/wiki/Musepack) - Musepack (SV7 & SV8)
+- [`ics`](https://en.wikipedia.org/wiki/ICalendar#Data_format) - iCalendar
+- [`glb`](https://github.com/KhronosGroup/glTF) - GL Transmission Format
+- [`pcap`](https://wiki.wireshark.org/Development/LibpcapFileFormat) - Libpcap File Format
+- [`dsf`](https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf) - Sony DSD Stream File (DSF)
+- [`lnk`](https://en.wikipedia.org/wiki/Shortcut_%28computing%29#Microsoft_Windows) - Microsoft Windows file shortcut
+- [`alias`](https://en.wikipedia.org/wiki/Alias_%28Mac_OS%29) - macOS Alias file
+- [`voc`](https://wiki.multimedia.cx/index.php/Creative_Voice) - Creative Voice File
+- [`ac3`](https://www.atsc.org/standard/a522012-digital-audio-compression-ac-3-e-ac-3-standard-12172012/) - ATSC A/52 Audio File
+- [`3gp`](https://en.wikipedia.org/wiki/3GP_and_3G2#3GP) - Multimedia container format defined by the Third Generation Partnership Project (3GPP) for 3G UMTS multimedia services
+- [`3g2`](https://en.wikipedia.org/wiki/3GP_and_3G2#3G2) - Multimedia container format defined by the 3GPP2 for 3G CDMA2000 multimedia services
+- [`m4v`](https://en.wikipedia.org/wiki/M4V) - MPEG-4 Visual bitstreams
+- [`m4p`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) - MPEG-4 files with audio streams encrypted by FairPlay Digital Rights Management as were sold through the iTunes Store
+- [`m4a`](https://en.wikipedia.org/wiki/M4A) - Audio-only MPEG-4 files
+- [`m4b`](https://en.wikipedia.org/wiki/M4B) - Audiobook and podcast MPEG-4 files, which also contain metadata including chapter markers, images, and hyperlinks
+- [`f4v`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format used by Adobe Flash Player
+- [`f4p`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format protected by Adobe Access DRM used by Adobe Flash Player
+- [`f4a`](https://en.wikipedia.org/wiki/Flash_Video) - Audio-only ISO base media file format used by Adobe Flash Player
+- [`f4b`](https://en.wikipedia.org/wiki/Flash_Video) - Audiobook and podcast ISO base media file format used by Adobe Flash Player
+- [`mie`](https://en.wikipedia.org/wiki/Sidecar_file) - Dedicated meta information format which supports storage of binary as well as textual meta information
+- [`shp`](https://en.wikipedia.org/wiki/Shapefile) - Geospatial vector data format
+- [`arrow`](https://arrow.apache.org) - Columnar format for tables of data
+- [`aac`](https://en.wikipedia.org/wiki/Advanced_Audio_Coding) - Advanced Audio Coding
+- [`it`](https://wiki.openmpt.org/Manual:_Module_formats#The_Impulse_Tracker_format_.28.it.29) - Audio module format: Impulse Tracker
+- [`s3m`](https://wiki.openmpt.org/Manual:_Module_formats#The_ScreamTracker_3_format_.28.s3m.29) - Audio module format: ScreamTracker 3
+- [`xm`](https://wiki.openmpt.org/Manual:_Module_formats#The_FastTracker_2_format_.28.xm.29) - Audio module format: FastTracker 2
+- [`ai`](https://en.wikipedia.org/wiki/Adobe_Illustrator_Artwork) - Adobe Illustrator Artwork
+- [`skp`](https://en.wikipedia.org/wiki/SketchUp) - SketchUp
+- [`avif`](https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)) - AV1 Image File Format
+- [`eps`](https://en.wikipedia.org/wiki/Encapsulated_PostScript) - Encapsulated PostScript
+- [`lzh`](https://en.wikipedia.org/wiki/LHA_(file_format)) - LZH archive
+- [`pgp`](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) - Pretty Good Privacy
+- [`asar`](https://github.com/electron/asar#format) - Archive format primarily used to enclose Electron applications
+- [`stl`](https://en.wikipedia.org/wiki/STL_(file_format)) - Standard Tesselated Geometry File Format (ASCII only)
+- [`chm`](https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help) - Microsoft Compiled HTML Help
+- [`3mf`](https://en.wikipedia.org/wiki/3D_Manufacturing_Format) - 3D Manufacturing Format
+
+*Pull requests are welcome for additional commonly used file types.*
+
+The following file types will not be accepted:
+- [MS-CFB: Microsoft Compound File Binary File Format based formats](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b), too old and difficult to parse:
+ - `.doc` - Microsoft Word 97-2003 Document
+ - `.xls` - Microsoft Excel 97-2003 Document
+ - `.ppt` - Microsoft PowerPoint97-2003 Document
+ - `.msi` - Microsoft Windows Installer
+- `.csv` - [Reason.](https://github.com/sindresorhus/file-type/issues/264#issuecomment-568439196)
+- `.svg` - Detecting it requires a full-blown parser. Check out [`is-svg`](https://github.com/sindresorhus/is-svg) for something that mostly works.
+
+## file-type for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of file-type and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-file-type?utm_source=npm-file-type&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+## Related
+
+- [file-type-cli](https://github.com/sindresorhus/file-type-cli) - CLI for this module
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Mikael Finstad](https://github.com/mifi)
+- [Ben Brook](https://github.com/bencmbrook)
+- [Borewit](https://github.com/Borewit)
diff --git a/node_modules/file-type/supported.js b/node_modules/file-type/supported.js
new file mode 100644
index 0000000..2febb18
--- /dev/null
+++ b/node_modules/file-type/supported.js
@@ -0,0 +1,271 @@
+'use strict';
+
+module.exports = {
+ extensions: [
+ 'jpg',
+ 'png',
+ 'apng',
+ 'gif',
+ 'webp',
+ 'flif',
+ 'cr2',
+ 'cr3',
+ 'orf',
+ 'arw',
+ 'dng',
+ 'nef',
+ 'rw2',
+ 'raf',
+ 'tif',
+ 'bmp',
+ 'icns',
+ 'jxr',
+ 'psd',
+ 'indd',
+ 'zip',
+ 'tar',
+ 'rar',
+ 'gz',
+ 'bz2',
+ '7z',
+ 'dmg',
+ 'mp4',
+ 'mid',
+ 'mkv',
+ 'webm',
+ 'mov',
+ 'avi',
+ 'mpg',
+ 'mp2',
+ 'mp3',
+ 'm4a',
+ 'oga',
+ 'ogg',
+ 'ogv',
+ 'opus',
+ 'flac',
+ 'wav',
+ 'spx',
+ 'amr',
+ 'pdf',
+ 'epub',
+ 'exe',
+ 'swf',
+ 'rtf',
+ 'wasm',
+ 'woff',
+ 'woff2',
+ 'eot',
+ 'ttf',
+ 'otf',
+ 'ico',
+ 'flv',
+ 'ps',
+ 'xz',
+ 'sqlite',
+ 'nes',
+ 'crx',
+ 'xpi',
+ 'cab',
+ 'deb',
+ 'ar',
+ 'rpm',
+ 'Z',
+ 'lz',
+ 'cfb',
+ 'mxf',
+ 'mts',
+ 'blend',
+ 'bpg',
+ 'docx',
+ 'pptx',
+ 'xlsx',
+ '3gp',
+ '3g2',
+ 'jp2',
+ 'jpm',
+ 'jpx',
+ 'mj2',
+ 'aif',
+ 'qcp',
+ 'odt',
+ 'ods',
+ 'odp',
+ 'xml',
+ 'mobi',
+ 'heic',
+ 'cur',
+ 'ktx',
+ 'ape',
+ 'wv',
+ 'dcm',
+ 'ics',
+ 'glb',
+ 'pcap',
+ 'dsf',
+ 'lnk',
+ 'alias',
+ 'voc',
+ 'ac3',
+ 'm4v',
+ 'm4p',
+ 'm4b',
+ 'f4v',
+ 'f4p',
+ 'f4b',
+ 'f4a',
+ 'mie',
+ 'asf',
+ 'ogm',
+ 'ogx',
+ 'mpc',
+ 'arrow',
+ 'shp',
+ 'aac',
+ 'mp1',
+ 'it',
+ 's3m',
+ 'xm',
+ 'ai',
+ 'skp',
+ 'avif',
+ 'eps',
+ 'lzh',
+ 'pgp',
+ 'asar',
+ 'stl',
+ 'chm',
+ '3mf'
+ ],
+ mimeTypes: [
+ 'image/jpeg',
+ 'image/png',
+ 'image/gif',
+ 'image/webp',
+ 'image/flif',
+ 'image/x-canon-cr2',
+ 'image/x-canon-cr3',
+ 'image/tiff',
+ 'image/bmp',
+ 'image/vnd.ms-photo',
+ 'image/vnd.adobe.photoshop',
+ 'application/x-indesign',
+ 'application/epub+zip',
+ 'application/x-xpinstall',
+ 'application/vnd.oasis.opendocument.text',
+ 'application/vnd.oasis.opendocument.spreadsheet',
+ 'application/vnd.oasis.opendocument.presentation',
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'application/zip',
+ 'application/x-tar',
+ 'application/x-rar-compressed',
+ 'application/gzip',
+ 'application/x-bzip2',
+ 'application/x-7z-compressed',
+ 'application/x-apple-diskimage',
+ 'application/x-apache-arrow',
+ 'video/mp4',
+ 'audio/midi',
+ 'video/x-matroska',
+ 'video/webm',
+ 'video/quicktime',
+ 'video/vnd.avi',
+ 'audio/vnd.wave',
+ 'audio/qcelp',
+ 'audio/x-ms-asf',
+ 'video/x-ms-asf',
+ 'application/vnd.ms-asf',
+ 'video/mpeg',
+ 'video/3gpp',
+ 'audio/mpeg',
+ 'audio/mp4', // RFC 4337
+ 'audio/opus',
+ 'video/ogg',
+ 'audio/ogg',
+ 'application/ogg',
+ 'audio/x-flac',
+ 'audio/ape',
+ 'audio/wavpack',
+ 'audio/amr',
+ 'application/pdf',
+ 'application/x-msdownload',
+ 'application/x-shockwave-flash',
+ 'application/rtf',
+ 'application/wasm',
+ 'font/woff',
+ 'font/woff2',
+ 'application/vnd.ms-fontobject',
+ 'font/ttf',
+ 'font/otf',
+ 'image/x-icon',
+ 'video/x-flv',
+ 'application/postscript',
+ 'application/eps',
+ 'application/x-xz',
+ 'application/x-sqlite3',
+ 'application/x-nintendo-nes-rom',
+ 'application/x-google-chrome-extension',
+ 'application/vnd.ms-cab-compressed',
+ 'application/x-deb',
+ 'application/x-unix-archive',
+ 'application/x-rpm',
+ 'application/x-compress',
+ 'application/x-lzip',
+ 'application/x-cfb',
+ 'application/x-mie',
+ 'application/mxf',
+ 'video/mp2t',
+ 'application/x-blender',
+ 'image/bpg',
+ 'image/jp2',
+ 'image/jpx',
+ 'image/jpm',
+ 'image/mj2',
+ 'audio/aiff',
+ 'application/xml',
+ 'application/x-mobipocket-ebook',
+ 'image/heif',
+ 'image/heif-sequence',
+ 'image/heic',
+ 'image/heic-sequence',
+ 'image/icns',
+ 'image/ktx',
+ 'application/dicom',
+ 'audio/x-musepack',
+ 'text/calendar',
+ 'model/gltf-binary',
+ 'application/vnd.tcpdump.pcap',
+ 'audio/x-dsf', // Non-standard
+ 'application/x.ms.shortcut', // Invented by us
+ 'application/x.apple.alias', // Invented by us
+ 'audio/x-voc',
+ 'audio/vnd.dolby.dd-raw',
+ 'audio/x-m4a',
+ 'image/apng',
+ 'image/x-olympus-orf',
+ 'image/x-sony-arw',
+ 'image/x-adobe-dng',
+ 'image/x-nikon-nef',
+ 'image/x-panasonic-rw2',
+ 'image/x-fujifilm-raf',
+ 'video/x-m4v',
+ 'video/3gpp2',
+ 'application/x-esri-shape',
+ 'audio/aac',
+ 'audio/x-it',
+ 'audio/x-s3m',
+ 'audio/x-xm',
+ 'video/MP1S',
+ 'video/MP2P',
+ 'application/vnd.sketchup.skp',
+ 'image/avif',
+ 'application/x-lzh-compressed',
+ 'application/pgp-encrypted',
+ 'application/x-asar',
+ 'model/stl',
+ 'application/vnd.ms-htmlhelp',
+ 'model/3mf'
+ ]
+};
diff --git a/node_modules/file-type/util.js b/node_modules/file-type/util.js
new file mode 100644
index 0000000..d9cd54d
--- /dev/null
+++ b/node_modules/file-type/util.js
@@ -0,0 +1,40 @@
+'use strict';
+
+exports.stringToBytes = string => [...string].map(character => character.charCodeAt(0));
+
+/**
+Checks whether the TAR checksum is valid.
+
+@param {Buffer} buffer - The TAR header `[offset ... offset + 512]`.
+@param {number} offset - TAR header offset.
+@returns {boolean} `true` if the TAR checksum is valid, otherwise `false`.
+*/
+exports.tarHeaderChecksumMatches = (buffer, offset = 0) => {
+ const readSum = parseInt(buffer.toString('utf8', 148, 154).replace(/\0.*$/, '').trim(), 8); // Read sum in header
+ if (isNaN(readSum)) {
+ return false;
+ }
+
+ let sum = 8 * 0x20; // Initialize signed bit sum
+
+ for (let i = offset; i < offset + 148; i++) {
+ sum += buffer[i];
+ }
+
+ for (let i = offset + 156; i < offset + 512; i++) {
+ sum += buffer[i];
+ }
+
+ return readSum === sum;
+};
+
+/**
+ID3 UINT32 sync-safe tokenizer token.
+28 bits (representing up to 256MB) integer, the msb is 0 to avoid "false syncsignals".
+*/
+exports.uint32SyncSafeToken = {
+ get: (buffer, offset) => {
+ return (buffer[offset + 3] & 0x7F) | ((buffer[offset + 2]) << 7) | ((buffer[offset + 1]) << 14) | ((buffer[offset]) << 21);
+ },
+ len: 4
+};
diff --git a/node_modules/formidable/LICENSE b/node_modules/formidable/LICENSE
new file mode 100644
index 0000000..7c66bea
--- /dev/null
+++ b/node_modules/formidable/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2011-present Felix Geisendörfer, and contributors.
+
+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:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+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.
+
diff --git a/node_modules/formidable/README.md b/node_modules/formidable/README.md
new file mode 100644
index 0000000..e6c5075
--- /dev/null
+++ b/node_modules/formidable/README.md
@@ -0,0 +1,735 @@
+<p align="center">
+ <img alt="npm formidable package logo" src="https://raw.githubusercontent.com/node-formidable/formidable/master/logo.png" />
+</p>
+
+# formidable [![npm version][npmv-img]][npmv-url] [![MIT license][license-img]][license-url] [![Libera Manifesto][libera-manifesto-img]][libera-manifesto-url] [![Twitter][twitter-img]][twitter-url]
+
+> A Node.js module for parsing form data, especially file uploads.
+
+### Important Notes
+
+- This README is for the upcoming (end of February) v2 release!
+- Every version prior and including `v1.2.2` is deprecated, please upgrade!
+- Install with `formidable@canary` until v2 land officially in `latest`
+- see more about the changes in the [CHANGELOG.md](https://github.com/node-formidable/formidable/blob/master/CHANGELOG.md)
+
+[![Code style][codestyle-img]][codestyle-url]
+[![codecoverage][codecov-img]][codecov-url]
+[![linux build status][linux-build-img]][build-url]
+[![windows build status][windows-build-img]][build-url]
+[![macos build status][macos-build-img]][build-url]
+
+If you have any _how-to_ kind of questions, please read the [Contributing
+Guide][contributing-url] and [Code of Conduct][code_of_conduct-url]
+documents.<br /> For bugs reports and feature requests, [please create an
+issue][open-issue-url] or ping [@tunnckoCore](https://twitter.com/tunnckoCore)
+at Twitter.
+
+[![Conventional Commits][ccommits-img]][ccommits-url]
+[![Minimum Required Nodejs][nodejs-img]][npmv-url]
+[![Tidelift Subcsription][tidelift-img]][tidelift-url]
+[![Buy me a Kofi][kofi-img]][kofi-url]
+[![Renovate App Status][renovateapp-img]][renovateapp-url]
+[![Make A Pull Request][prs-welcome-img]][prs-welcome-url]
+
+This project is [semantically versioned](https://semver.org) and available as
+part of the [Tidelift Subscription][tidelift-url] for professional grade
+assurances, enhanced support and security.
+[Learn more.](https://tidelift.com/subscription/pkg/npm-formidable?utm_source=npm-formidable&utm_medium=referral&utm_campaign=enterprise)
+
+_The maintainers of `formidable` and thousands of other packages are working
+with Tidelift to deliver commercial support and maintenance for the Open Source
+dependencies you use to build your applications. Save time, reduce risk, and
+improve code health, while paying the maintainers of the exact dependencies you
+use._
+
+[![][npm-weekly-img]][npmv-url] [![][npm-monthly-img]][npmv-url]
+[![][npm-yearly-img]][npmv-url] [![][npm-alltime-img]][npmv-url]
+
+## Status: Maintained [![npm version][npmv-canary-img]][npmv-url]
+
+This module was initially developed by
+[**@felixge**](https://github.com/felixge) for
+[Transloadit](http://transloadit.com/), a service focused on uploading and
+encoding images and videos. It has been battle-tested against hundreds of GBs of
+file uploads from a large variety of clients and is considered production-ready
+and is used in production for years.
+
+Currently, we are few maintainers trying to deal with it. :) More contributors
+are always welcome! :heart: Jump on
+[issue #412](https://github.com/felixge/node-formidable/issues/412) which is
+closed, but if you are interested we can discuss it and add you after strict rules, like
+enabling Two-Factor Auth in your npm and GitHub accounts.
+
+_**Note:** The github `master` branch is a "canary" branch - try it with `npm i formidable@canary`.
+Do not expect (for now) things from it to be inside the`latest` "dist-tag" in the
+Npm. The`formidable@latest`is the`v1.2.1` version and probably it will be the
+last`v1` release!_
+
+_**Note: v2 is coming soon!**_
+
+## Highlights
+
+- [Fast (~900-2500 mb/sec)](#benchmarks) & streaming multipart parser
+- Automatically writing file uploads to disk (soon optionally)
+- [Plugins API](#useplugin-plugin) - allowing custom parsers and plugins
+- Low memory footprint
+- Graceful error handling
+- Very high test coverage
+
+## Install
+
+This project requires `Node.js >= 10.13`. Install it using
+[yarn](https://yarnpkg.com) or [npm](https://npmjs.com).<br /> _We highly
+recommend to use Yarn when you think to contribute to this project._
+
+```sh
+npm install formidable
+# or the canary version
+npm install formidable@canary
+```
+
+or with Yarn v1/v2
+
+```sh
+yarn add formidable
+# or the canary version
+yarn add formidable@canary
+```
+
+This is a low-level package, and if you're using a high-level framework it _may_
+already be included. Check the examples below and the `examples/` folder.
+
+## Examples
+
+For more examples look at the `examples/` directory.
+
+### with Node.js http module
+
+Parse an incoming file upload, with the
+[Node.js's built-in `http` module](https://nodejs.org/api/http.html).
+
+```js
+const http = require('http');
+const formidable = require('formidable');
+
+const server = http.createServer((req, res) => {
+ if (req.url === '/api/upload' && req.method.toLowerCase() === 'post') {
+ // parse a file upload
+ const form = formidable({ multiples: true });
+
+ form.parse(req, (err, fields, files) => {
+ res.writeHead(200, { 'content-type': 'application/json' });
+ res.end(JSON.stringify({ fields, files }, null, 2));
+ });
+
+ return;
+ }
+
+ // show a file upload form
+ res.writeHead(200, { 'content-type': 'text/html' });
+ res.end(`
+ <h2>With Node.js <code>"http"</code> module</h2>
+ <form action="/api/upload" enctype="multipart/form-data" method="post">
+ <div>Text field title: <input type="text" name="title" /></div>
+ <div>File: <input type="file" name="multipleFiles" multiple="multiple" /></div>
+ <input type="submit" value="Upload" />
+ </form>
+ `);
+});
+
+server.listen(8080, () => {
+ console.log('Server listening on http://localhost:8080/ ...');
+});
+```
+
+### with Express.js
+
+There are multiple variants to do this, but Formidable just need Node.js Request
+stream, so something like the following example should work just fine, without
+any third-party [Express.js](https://ghub.now.sh/express) middleware.
+
+Or try the
+[examples/with-express.js](https://github.com/node-formidable/node-formidable/blob/master/examples/with-express.js)
+
+```js
+const express = require('express');
+const formidable = require('formidable');
+
+const app = express();
+
+app.get('/', (req, res) => {
+ res.send(`
+ <h2>With <code>"express"</code> npm package</h2>
+ <form action="/api/upload" enctype="multipart/form-data" method="post">
+ <div>Text field title: <input type="text" name="title" /></div>
+ <div>File: <input type="file" name="someExpressFiles" multiple="multiple" /></div>
+ <input type="submit" value="Upload" />
+ </form>
+ `);
+});
+
+app.post('/api/upload', (req, res, next) => {
+ const form = formidable({ multiples: true });
+
+ form.parse(req, (err, fields, files) => {
+ if (err) {
+ next(err);
+ return;
+ }
+ res.json({ fields, files });
+ });
+});
+
+app.listen(3000, () => {
+ console.log('Server listening on http://localhost:3000 ...');
+});
+```
+
+### with Koa and Formidable
+
+Of course, with [Koa v1, v2 or future v3](https://ghub.now.sh/koa) the things
+are very similar. You can use `formidable` manually as shown below or through
+the [koa-better-body](https://ghub.now.sh/koa-better-body) package which is
+using `formidable` under the hood and support more features and different
+request bodies, check its documentation for more info.
+
+_Note: this example is assuming Koa v2. Be aware that you should pass `ctx.req`
+which is Node.js's Request, and **NOT** the `ctx.request` which is Koa's Request
+object - there is a difference._
+
+```js
+const Koa = require('koa');
+const formidable = require('formidable');
+
+const app = new Koa();
+
+app.on('error', (err) => {
+ console.error('server error', err);
+});
+
+app.use(async (ctx, next) => {
+ if (ctx.url === '/api/upload' && ctx.method.toLowerCase() === 'post') {
+ const form = formidable({ multiples: true });
+
+ // not very elegant, but that's for now if you don't want touse `koa-better-body`
+ // or other middlewares.
+ await new Promise((resolve, reject) => {
+ form.parse(ctx.req, (err, fields, files) => {
+ if (err) {
+ reject(err);
+ return;
+ }
+
+ ctx.set('Content-Type', 'application/json');
+ ctx.status = 200;
+ ctx.state = { fields, files };
+ ctx.body = JSON.stringify(ctx.state, null, 2);
+ resolve();
+ });
+ });
+ await next();
+ return;
+ }
+
+ // show a file upload form
+ ctx.set('Content-Type', 'text/html');
+ ctx.status = 200;
+ ctx.body = `
+ <h2>With <code>"koa"</code> npm package</h2>
+ <form action="/api/upload" enctype="multipart/form-data" method="post">
+ <div>Text field title: <input type="text" name="title" /></div>
+ <div>File: <input type="file" name="koaFiles" multiple="multiple" /></div>
+ <input type="submit" value="Upload" />
+ </form>
+ `;
+});
+
+app.use((ctx) => {
+ console.log('The next middleware is called');
+ console.log('Results:', ctx.state);
+});
+
+app.listen(3000, () => {
+ console.log('Server listening on http://localhost:3000 ...');
+});
+```
+
+## Benchmarks (for v2)
+
+The benchmark is quite old, from the old codebase. But maybe quite true though.
+Previously the numbers was around ~500 mb/sec. Currently with moving to the new
+Node.js Streams API it's faster. You can clearly see the differences between the
+Node versions.
+
+_Note: a lot better benchmarking could and should be done in future._
+
+Benchmarked on 8GB RAM, Xeon X3440 (2.53 GHz, 4 cores, 8 threads)
+
+```
+~/github/node-formidable master
+❯ nve --parallel 8 10 12 13 node benchmark/bench-multipart-parser.js
+
+ ⬢ Node 8
+
+1261.08 mb/sec
+
+ ⬢ Node 10
+
+1113.04 mb/sec
+
+ ⬢ Node 12
+
+2107.00 mb/sec
+
+ ⬢ Node 13
+
+2566.42 mb/sec
+```
+
+![benchmark January 29th, 2020](./benchmark-2020-01-29_xeon-x3440.png)
+
+## API
+
+### Formidable / IncomingForm
+
+All shown are equivalent.
+
+_Please pass [`options`](#options) to the function/constructor, not by assigning
+them to the instance `form`_
+
+```js
+const formidable = require('formidable');
+const form = formidable(options);
+
+// or
+const { formidable } = require('formidable');
+const form = formidable(options);
+
+// or
+const { IncomingForm } = require('formidable');
+const form = new IncomingForm(options);
+
+// or
+const { Formidable } = require('formidable');
+const form = new Formidable(options);
+```
+
+### Options
+
+See it's defaults in [src/Formidable.js](./src/Formidable.js#L14-L22) (the
+`DEFAULT_OPTIONS` constant).
+
+- `options.encoding` **{string}** - default `'utf-8'`; sets encoding for
+ incoming form fields,
+- `options.uploadDir` **{string}** - default `os.tmpdir()`; the directory for
+ placing file uploads in. You can move them later by using `fs.rename()`
+- `options.keepExtensions` **{boolean}** - default `false`; to include the
+ extensions of the original files or not
+- `options.maxFileSize` **{number}** - default `200 * 1024 * 1024` (200mb);
+ limit the size of uploaded file.
+- `options.maxFields` **{number}** - default `1000`; limit the number of fields
+ that the Querystring parser will decode, set 0 for unlimited
+- `options.maxFieldsSize` **{number}** - default `20 * 1024 * 1024` (20mb);
+ limit the amount of memory all fields together (except files) can allocate in
+ bytes.
+- `options.hash` **{boolean}** - default `false`; include checksums calculated
+ for incoming files, set this to some hash algorithm, see
+ [crypto.createHash](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options)
+ for available algorithms
+- `options.multiples` **{boolean}** - default `false`; when you call the
+ `.parse` method, the `files` argument (of the callback) will contain arrays of
+ files for inputs which submit multiple files using the HTML5 `multiple`
+ attribute. Also, the `fields` argument will contain arrays of values for
+ fields that have names ending with '[]'.
+
+_**Note:** If this size of combined fields, or size of some file is exceeded, an
+`'error'` event is fired._
+
+```js
+// The amount of bytes received for this form so far.
+form.bytesReceived;
+```
+
+```js
+// The expected number of bytes in this form.
+form.bytesExpected;
+```
+
+### .parse(request, callback)
+
+Parses an incoming Node.js `request` containing form data. If `callback` is
+provided, all fields and files are collected and passed to the callback.
+
+```js
+const formidable = require('formidable');
+
+const form = formidable({ multiples: true, uploadDir: __dirname });
+
+form.parse(req, (err, fields, files) => {
+ console.log('fields:', fields);
+ console.log('files:', files);
+});
+```
+
+You may overwrite this method if you are interested in directly accessing the
+multipart stream. Doing so will disable any `'field'` / `'file'` events
+processing which would occur otherwise, making you fully responsible for
+handling the processing.
+
+In the example below, we listen on couple of events and direct them to the
+`data` listener, so you can do whatever you choose there, based on whether its
+before the file been emitted, the header value, the header name, on field, on
+file and etc.
+
+Or the other way could be to just override the `form.onPart` as it's shown a bit
+later.
+
+```js
+form.once('error', console.error);
+
+form.on('fileBegin', (filename, file) => {
+ form.emit('data', { name: 'fileBegin', filename, value: file });
+});
+
+form.on('file', (filename, file) => {
+ form.emit('data', { name: 'file', key: filename, value: file });
+});
+
+form.on('field', (fieldName, fieldValue) => {
+ form.emit('data', { name: 'field', key: fieldName, value: fieldValue });
+});
+
+form.once('end', () => {
+ console.log('Done!');
+});
+
+// If you want to customize whatever you want...
+form.on('data', ({ name, key, value, buffer, start, end, ...more }) => {
+ if (name === 'partBegin') {
+ }
+ if (name === 'partData') {
+ }
+ if (name === 'headerField') {
+ }
+ if (name === 'headerValue') {
+ }
+ if (name === 'headerEnd') {
+ }
+ if (name === 'headersEnd') {
+ }
+ if (name === 'field') {
+ console.log('field name:', key);
+ console.log('field value:', value);
+ }
+ if (name === 'file') {
+ console.log('file:', key, value);
+ }
+ if (name === 'fileBegin') {
+ console.log('fileBegin:', key, value);
+ }
+});
+```
+
+### .use(plugin: Plugin)
+
+A method that allows you to extend the Formidable library. By default we include
+4 plugins, which esentially are adapters to plug the different built-in parsers.
+
+**The plugins added by this method are always enabled.**
+
+_See [src/plugins/](./src/plugins/) for more detailed look on default plugins._
+
+The `plugin` param has such signature:
+
+```typescript
+function(formidable: Formidable, options: Options): void;
+```
+
+The architecture is simple. The `plugin` is a function that is passed with the
+Formidable instance (the `form` across the README examples) and the options.
+
+**Note:** the plugin function's `this` context is also the same instance.
+
+```js
+const formidable = require('formidable');
+
+const form = formidable({ keepExtensions: true });
+
+form.use((self, options) => {
+ // self === this === form
+ console.log('woohoo, custom plugin');
+ // do your stuff; check `src/plugins` for inspiration
+});
+
+form.parse(req, (error, fields, files) => {
+ console.log('done!');
+});
+```
+
+**Important to note**, is that inside plugin `this.options`, `self.options` and
+`options` MAY or MAY NOT be the same. General best practice is to always use the
+`this`, so you can later test your plugin independently and more easily.
+
+If you want to disable some parsing capabilities of Formidable, you can disable
+the plugin which corresponds to the parser. For example, if you want to disable
+multipart parsing (so the [src/parsers/Multipart.js](./src/parsers/Multipart.js)
+which is used in [src/plugins/multipart.js](./src/plugins/multipart.js)), then
+you can remove it from the `options.enabledPlugins`, like so
+
+```js
+const { Formidable } = require('formidable');
+
+const form = new Formidable({
+ hash: 'sha1',
+ enabledPlugins: ['octetstream', 'querystring', 'json'],
+});
+```
+
+**Be aware** that the order _MAY_ be important too. The names corresponds 1:1 to
+files in [src/plugins/](./src/plugins) folder.
+
+Pull requests for new built-in plugins MAY be accepted - for example, more
+advanced querystring parser. Add your plugin as a new file in `src/plugins/`
+folder (lowercased) and follow how the other plugins are made.
+
+### form.onPart
+
+If you want to use Formidable to only handle certain parts for you, you can do
+something similar. Or see
+[#387](https://github.com/node-formidable/node-formidable/issues/387) for
+inspiration, you can for example validate the mime-type.
+
+```js
+const form = formidable();
+
+form.onPart = (part) => {
+ part.on('data', (buffer) {
+ // do whatever you want here
+ });
+};
+```
+
+For example, force Formidable to be used only on non-file "parts" (i.e., html
+fields)
+
+```js
+const form = formidable();
+
+form.onPart = function(part) {
+ // let formidable handle only non-file parts
+ if (part.filename === '' || !part.mime) {
+ // used internally, please do not override!
+ form.handlePart(part);
+ }
+};
+```
+
+### File
+
+```ts
+export interface File {
+ // The size of the uploaded file in bytes.
+ // If the file is still being uploaded (see `'fileBegin'` event),
+ // this property says how many bytes of the file have been written to disk yet.
+ file.size: number;
+
+ // The path this file is being written to. You can modify this in the `'fileBegin'` event in
+ // case you are unhappy with the way formidable generates a temporary path for your files.
+ file.path: string;
+
+ // The name this file had according to the uploading client.
+ file.name: string | null;
+
+ // The mime type of this file, according to the uploading client.
+ file.type: string | null;
+
+ // A Date object (or `null`) containing the time this file was last written to.
+ // Mostly here for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/).
+ file.lastModifiedDate: Date | null;
+
+ // If `options.hash` calculation was set, you can read the hex digest out of this var.
+ file.hash: string | 'sha1' | 'md5' | 'sha256' | null;
+}
+```
+
+#### file.toJSON()
+
+This method returns a JSON-representation of the file, allowing you to
+`JSON.stringify()` the file which is useful for logging and responding to
+requests.
+
+### Events
+
+#### `'progress'`
+
+Emitted after each incoming chunk of data that has been parsed. Can be used to
+roll your own progress bar.
+
+```js
+form.on('progress', (bytesReceived, bytesExpected) => {});
+```
+
+#### `'field'`
+
+Emitted whenever a field / value pair has been received.
+
+```js
+form.on('field', (name, value) => {});
+```
+
+#### `'fileBegin'`
+
+Emitted whenever a new file is detected in the upload stream. Use this event if
+you want to stream the file to somewhere else while buffering the upload on the
+file system.
+
+```js
+form.on('fileBegin', (name, file) => {});
+```
+
+#### `'file'`
+
+Emitted whenever a field / file pair has been received. `file` is an instance of
+`File`.
+
+```js
+form.on('file', (name, file) => {});
+```
+
+#### `'error'`
+
+Emitted when there is an error processing the incoming form. A request that
+experiences an error is automatically paused, you will have to manually call
+`request.resume()` if you want the request to continue firing `'data'` events.
+
+```js
+form.on('error', (err) => {});
+```
+
+#### `'aborted'`
+
+Emitted when the request was aborted by the user. Right now this can be due to a
+'timeout' or 'close' event on the socket. After this event is emitted, an
+`error` event will follow. In the future there will be a separate 'timeout'
+event (needs a change in the node core).
+
+```js
+form.on('aborted', () => {});
+```
+
+#### `'end'`
+
+Emitted when the entire request has been received, and all contained files have
+finished flushing to disk. This is a great place for you to send your response.
+
+```js
+form.on('end', () => {});
+```
+
+## Ports & Credits
+
+- [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++
+ parser based on formidable
+- [Ryan Dahl](http://twitter.com/ryah) for his work on
+ [http-parser](http://github.com/ry/http-parser) which heavily inspired the
+ initial `multipart_parser.js`.
+
+## Contributing
+
+If the documentation is unclear or has a typo, please click on the page's `Edit`
+button (pencil icon) and suggest a correction. If you would like to help us fix
+a bug or add a new feature, please check our
+[Contributing Guide](./CONTRIBUTING.md). Pull requests are welcome!
+
+Thanks goes to these wonderful people
+([emoji key](https://allcontributors.org/docs/en/emoji-key)):
+
+<!-- ALL-CONTRIBUTORS-LIST:START -->
+<!-- prettier-ignore-start -->
+<!-- markdownlint-disable -->
+<table>
+ <tr>
+ <td align="center"><a href="https://twitter.com/felixge"><img src="https://avatars3.githubusercontent.com/u/15000?s=460&v=4" width="100px;" alt=""/><br /><sub><b>Felix Geisendörfer</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/commits?author=felixge" title="Code">💻</a> <a href="#design-felixge" title="Design">🎨</a> <a href="#ideas-felixge" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=felixge" title="Documentation">📖</a></td>
+ <td align="center"><a href="https://tunnckoCore.com"><img src="https://avatars3.githubusercontent.com/u/5038030?v=4" width="100px;" alt=""/><br /><sub><b>Charlike Mike Reagent</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/issues?q=author%3AtunnckoCore" title="Bug reports">🐛</a> <a href="#infra-tunnckoCore" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#design-tunnckoCore" title="Design">🎨</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=tunnckoCore" title="Code">💻</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=tunnckoCore" title="Documentation">📖</a> <a href="#example-tunnckoCore" title="Examples">💡</a> <a href="#ideas-tunnckoCore" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-tunnckoCore" title="Maintenance">🚧</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=tunnckoCore" title="Tests">⚠️</a></td>
+ <td align="center"><a href="https://github.com/kedarv"><img src="https://avatars1.githubusercontent.com/u/1365665?v=4" width="100px;" alt=""/><br /><sub><b>Kedar</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/commits?author=kedarv" title="Code">💻</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=kedarv" title="Tests">⚠️</a> <a href="#question-kedarv" title="Answering Questions">💬</a> <a href="https://github.com/node-formidable/node-formidable/issues?q=author%3Akedarv" title="Bug reports">🐛</a></td>
+ <td align="center"><a href="https://github.com/GrosSacASac"><img src="https://avatars0.githubusercontent.com/u/5721194?v=4" width="100px;" alt=""/><br /><sub><b>Walle Cyril</b></sub></a><br /><a href="#question-GrosSacASac" title="Answering Questions">💬</a> <a href="https://github.com/node-formidable/node-formidable/issues?q=author%3AGrosSacASac" title="Bug reports">🐛</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=GrosSacASac" title="Code">💻</a> <a href="#financial-GrosSacASac" title="Financial">💵</a> <a href="#ideas-GrosSacASac" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-GrosSacASac" title="Maintenance">🚧</a></td>
+ <td align="center"><a href="https://github.com/xarguments"><img src="https://avatars2.githubusercontent.com/u/40522463?v=4" width="100px;" alt=""/><br /><sub><b>Xargs</b></sub></a><br /><a href="#question-xarguments" title="Answering Questions">💬</a> <a href="https://github.com/node-formidable/node-formidable/issues?q=author%3Axarguments" title="Bug reports">🐛</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=xarguments" title="Code">💻</a> <a href="#maintenance-xarguments" title="Maintenance">🚧</a></td>
+ <td align="center"><a href="https://github.com/Amit-A"><img src="https://avatars1.githubusercontent.com/u/7987238?v=4" width="100px;" alt=""/><br /><sub><b>Amit-A</b></sub></a><br /><a href="#question-Amit-A" title="Answering Questions">💬</a> <a href="https://github.com/node-formidable/node-formidable/issues?q=author%3AAmit-A" title="Bug reports">🐛</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=Amit-A" title="Code">💻</a></td>
+ </tr>
+ <tr>
+ <td align="center"><a href="https://charmander.me/"><img src="https://avatars1.githubusercontent.com/u/1889843?v=4" width="100px;" alt=""/><br /><sub><b>Charmander</b></sub></a><br /><a href="#question-charmander" title="Answering Questions">💬</a> <a href="https://github.com/node-formidable/node-formidable/issues?q=author%3Acharmander" title="Bug reports">🐛</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=charmander" title="Code">💻</a> <a href="#ideas-charmander" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-charmander" title="Maintenance">🚧</a></td>
+ <td align="center"><a href="https://twitter.com/dylan_piercey"><img src="https://avatars2.githubusercontent.com/u/4985201?v=4" width="100px;" alt=""/><br /><sub><b>Dylan Piercey</b></sub></a><br /><a href="#ideas-DylanPiercey" title="Ideas, Planning, & Feedback">🤔</a></td>
+ <td align="center"><a href="http://ochrona.jawne.info.pl"><img src="https://avatars1.githubusercontent.com/u/3618479?v=4" width="100px;" alt=""/><br /><sub><b>Adam Dobrawy</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/issues?q=author%3Aad-m" title="Bug reports">🐛</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=ad-m" title="Documentation">📖</a></td>
+ <td align="center"><a href="https://github.com/amitrohatgi"><img src="https://avatars3.githubusercontent.com/u/12177021?v=4" width="100px;" alt=""/><br /><sub><b>amitrohatgi</b></sub></a><br /><a href="#ideas-amitrohatgi" title="Ideas, Planning, & Feedback">🤔</a></td>
+ <td align="center"><a href="https://github.com/fengxinming"><img src="https://avatars2.githubusercontent.com/u/6262382?v=4" width="100px;" alt=""/><br /><sub><b>Jesse Feng</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/issues?q=author%3Afengxinming" title="Bug reports">🐛</a></td>
+ <td align="center"><a href="https://qtmsheep.com"><img src="https://avatars1.githubusercontent.com/u/7271496?v=4" width="100px;" alt=""/><br /><sub><b>Nathanael Demacon</b></sub></a><br /><a href="#question-quantumsheep" title="Answering Questions">💬</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=quantumsheep" title="Code">💻</a> <a href="https://github.com/node-formidable/node-formidable/pulls?q=is%3Apr+reviewed-by%3Aquantumsheep" title="Reviewed Pull Requests">👀</a></td>
+ </tr>
+ <tr>
+ <td align="center"><a href="https://github.com/MunMunMiao"><img src="https://avatars1.githubusercontent.com/u/18216142?v=4" width="100px;" alt=""/><br /><sub><b>MunMunMiao</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/issues?q=author%3AMunMunMiao" title="Bug reports">🐛</a></td>
+ <td align="center"><a href="https://github.com/gabipetrovay"><img src="https://avatars0.githubusercontent.com/u/1170398?v=4" width="100px;" alt=""/><br /><sub><b>Gabriel Petrovay</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/issues?q=author%3Agabipetrovay" title="Bug reports">🐛</a> <a href="https://github.com/node-formidable/node-formidable/commits?author=gabipetrovay" title="Code">💻</a></td>
+ <td align="center"><a href="https://github.com/Elzair"><img src="https://avatars0.githubusercontent.com/u/2352818?v=4" width="100px;" alt=""/><br /><sub><b>Philip Woods</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/commits?author=Elzair" title="Code">💻</a> <a href="#ideas-Elzair" title="Ideas, Planning, & Feedback">🤔</a></td>
+ <td align="center"><a href="https://github.com/dmolim"><img src="https://avatars2.githubusercontent.com/u/7090374?v=4" width="100px;" alt=""/><br /><sub><b>Dmitry Ivonin</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/commits?author=dmolim" title="Documentation">📖</a></td>
+ <td align="center"><a href="https://audiobox.fm"><img src="https://avatars1.githubusercontent.com/u/12844?v=4" width="100px;" alt=""/><br /><sub><b>Claudio Poli</b></sub></a><br /><a href="https://github.com/node-formidable/node-formidable/commits?author=masterkain" title="Code">💻</a></td>
+ </tr>
+</table>
+
+<!-- markdownlint-enable -->
+<!-- prettier-ignore-end -->
+
+<!-- ALL-CONTRIBUTORS-LIST:END -->
+
+## License
+
+Formidable is licensed under the [MIT License][license-url].
+
+<!-- badges -->
+<!-- prettier-ignore-start -->
+
+[codestyle-url]: https://github.com/airbnb/javascript
+[codestyle-img]: https://badgen.net/badge/code%20style/airbnb%20%2B%20prettier/ff5a5f?icon=airbnb&cache=300
+[codecov-url]: https://codecov.io/gh/node-formidable/node-formidable
+[codecov-img]: https://badgen.net/codecov/c/github/node-formidable/node-formidable/master?icon=codecov
+[npmv-canary-img]: https://badgen.net/npm/v/formidable/canary?icon=npm
+[npmv-dev-img]: https://badgen.net/npm/v/formidable/dev?icon=npm
+[npmv-img]: https://badgen.net/npm/v/formidable?icon=npm
+[npmv-url]: https://npmjs.com/package/formidable
+[license-img]: https://badgen.net/npm/license/formidable
+[license-url]: https://github.com/node-formidable/node-formidable/blob/master/LICENSE
+[chat-img]: https://badgen.net/badge/chat/on%20gitter/46BC99?icon=gitter
+[chat-url]: https://gitter.im/node-formidable/Lobby
+[libera-manifesto-url]: https://liberamanifesto.com
+[libera-manifesto-img]: https://badgen.net/badge/libera/manifesto/grey
+[renovateapp-url]: https://renovatebot.com
+[renovateapp-img]: https://badgen.net/badge/renovate/enabled/green?cache=300
+[prs-welcome-img]: https://badgen.net/badge/PRs/welcome/green?cache=300
+[prs-welcome-url]: http://makeapullrequest.com
+[twitter-url]: https://twitter.com/tunnckoCore
+[twitter-img]: https://badgen.net/twitter/follow/tunnckoCore?icon=twitter&color=1da1f2&cache=300
+
+[npm-weekly-img]: https://badgen.net/npm/dw/formidable?icon=npm&cache=300
+[npm-monthly-img]: https://badgen.net/npm/dm/formidable?icon=npm&cache=300
+[npm-yearly-img]: https://badgen.net/npm/dy/formidable?icon=npm&cache=300
+[npm-alltime-img]: https://badgen.net/npm/dt/formidable?icon=npm&cache=300&label=total%20downloads
+
+[nodejs-img]: https://badgen.net/badge/node/>=%2010.13/green?cache=300
+
+[ccommits-url]: https://conventionalcommits.org/
+[ccommits-img]: https://badgen.net/badge/conventional%20commits/v1.0.0/green?cache=300
+
+[contributing-url]: https://github.com/node-formidable/node-formidable/blob/master/CONTRIBUTING.md
+[code_of_conduct-url]: https://github.com/node-formidable/node-formidable/blob/master/CODE_OF_CONDUCT.md
+
+[open-issue-url]: https://github.com/node-formidable/node-formidable/issues/new
+
+[tidelift-url]: https://tidelift.com/subscription/pkg/npm-formidable?utm_source=npm-formidable&utm_medium=referral&utm_campaign=enterprise
+[tidelift-img]: https://badgen.net/badge/tidelift/subscription/4B5168?labelColor=F6914D
+
+[kofi-url]: https://ko-fi.com/tunnckoCore/commissions
+[kofi-img]: https://badgen.net/badge/ko-fi/support/29abe0c2?cache=300&icon=https://rawcdn.githack.com/tunnckoCore/badgen-icons/f8264c6414e0bec449dd86f2241d50a9b89a1203/icons/kofi.svg
+
+[linux-build-img]: https://badgen-net.charlike.now.sh/github/checks/node-formidable/node-formidable?label=linux%20build&icon=github
+[macos-build-img]: https://badgen-net.charlike.now.sh/github/checks/node-formidable/node-formidable?label=macos%20build&icon=github
+[windows-build-img]: https://badgen-net.charlike.now.sh/github/checks/node-formidable/node-formidable?label=windows%20build&icon=github
+[build-url]: https://github.com/node-formidable/node-formidable/actions?query=workflow%3Anodejs
+<!-- prettier-ignore-end -->
diff --git a/node_modules/formidable/benchmark-2020-01-29_xeon-x3440.png b/node_modules/formidable/benchmark-2020-01-29_xeon-x3440.png
new file mode 100644
index 0000000..ef6f0fb
--- /dev/null
+++ b/node_modules/formidable/benchmark-2020-01-29_xeon-x3440.png
Binary files differ
diff --git a/node_modules/formidable/lib/file.js b/node_modules/formidable/lib/file.js
new file mode 100644
index 0000000..50d34c0
--- /dev/null
+++ b/node_modules/formidable/lib/file.js
@@ -0,0 +1,81 @@
+if (global.GENTLY) require = GENTLY.hijack(require);
+
+var util = require('util'),
+ fs = require('fs'),
+ EventEmitter = require('events').EventEmitter,
+ crypto = require('crypto');
+
+function File(properties) {
+ EventEmitter.call(this);
+
+ this.size = 0;
+ this.path = null;
+ this.name = null;
+ this.type = null;
+ this.hash = null;
+ this.lastModifiedDate = null;
+
+ this._writeStream = null;
+
+ for (var key in properties) {
+ this[key] = properties[key];
+ }
+
+ if(typeof this.hash === 'string') {
+ this.hash = crypto.createHash(properties.hash);
+ } else {
+ this.hash = null;
+ }
+}
+module.exports = File;
+util.inherits(File, EventEmitter);
+
+File.prototype.open = function() {
+ this._writeStream = new fs.WriteStream(this.path);
+};
+
+File.prototype.toJSON = function() {
+ var json = {
+ size: this.size,
+ path: this.path,
+ name: this.name,
+ type: this.type,
+ mtime: this.lastModifiedDate,
+ length: this.length,
+ filename: this.filename,
+ mime: this.mime
+ };
+ if (this.hash && this.hash != "") {
+ json.hash = this.hash;
+ }
+ return json;
+};
+
+File.prototype.write = function(buffer, cb) {
+ var self = this;
+ if (self.hash) {
+ self.hash.update(buffer);
+ }
+
+ if (this._writeStream.closed) {
+ return cb();
+ }
+
+ this._writeStream.write(buffer, function() {
+ self.lastModifiedDate = new Date();
+ self.size += buffer.length;
+ self.emit('progress', self.size);
+ cb();
+ });
+};
+
+File.prototype.end = function(cb) {
+ var self = this;
+ if (self.hash) {
+ self.hash = self.hash.digest('hex');
+ }
+ this._writeStream.end(function() {
+ self.emit('end');
+ cb();
+ });
+};
diff --git a/node_modules/formidable/lib/incoming_form.js b/node_modules/formidable/lib/incoming_form.js
new file mode 100644
index 0000000..dbd920b
--- /dev/null
+++ b/node_modules/formidable/lib/incoming_form.js
@@ -0,0 +1,558 @@
+if (global.GENTLY) require = GENTLY.hijack(require);
+
+var crypto = require('crypto');
+var fs = require('fs');
+var util = require('util'),
+ path = require('path'),
+ File = require('./file'),
+ MultipartParser = require('./multipart_parser').MultipartParser,
+ QuerystringParser = require('./querystring_parser').QuerystringParser,
+ OctetParser = require('./octet_parser').OctetParser,
+ JSONParser = require('./json_parser').JSONParser,
+ StringDecoder = require('string_decoder').StringDecoder,
+ EventEmitter = require('events').EventEmitter,
+ Stream = require('stream').Stream,
+ os = require('os');
+
+function IncomingForm(opts) {
+ if (!(this instanceof IncomingForm)) return new IncomingForm(opts);
+ EventEmitter.call(this);
+
+ opts=opts||{};
+
+ this.error = null;
+ this.ended = false;
+
+ this.maxFields = opts.maxFields || 1000;
+ this.maxFieldsSize = opts.maxFieldsSize || 20 * 1024 * 1024;
+ this.maxFileSize = opts.maxFileSize || 200 * 1024 * 1024;
+ this.keepExtensions = opts.keepExtensions || false;
+ this.uploadDir = opts.uploadDir || (os.tmpdir && os.tmpdir()) || os.tmpDir();
+ this.encoding = opts.encoding || 'utf-8';
+ this.headers = null;
+ this.type = null;
+ this.hash = opts.hash || false;
+ this.multiples = opts.multiples || false;
+
+ this.bytesReceived = null;
+ this.bytesExpected = null;
+
+ this._parser = null;
+ this._flushing = 0;
+ this._fieldsSize = 0;
+ this._fileSize = 0;
+ this.openedFiles = [];
+
+ return this;
+}
+util.inherits(IncomingForm, EventEmitter);
+exports.IncomingForm = IncomingForm;
+
+IncomingForm.prototype.parse = function(req, cb) {
+ this.pause = function() {
+ try {
+ req.pause();
+ } catch (err) {
+ // the stream was destroyed
+ if (!this.ended) {
+ // before it was completed, crash & burn
+ this._error(err);
+ }
+ return false;
+ }
+ return true;
+ };
+
+ this.resume = function() {
+ try {
+ req.resume();
+ } catch (err) {
+ // the stream was destroyed
+ if (!this.ended) {
+ // before it was completed, crash & burn
+ this._error(err);
+ }
+ return false;
+ }
+
+ return true;
+ };
+
+ // Setup callback first, so we don't miss anything from data events emitted
+ // immediately.
+ if (cb) {
+ var fields = {}, files = {};
+ this
+ .on('field', function(name, value) {
+ fields[name] = value;
+ })
+ .on('file', function(name, file) {
+ if (this.multiples) {
+ if (files[name]) {
+ if (!Array.isArray(files[name])) {
+ files[name] = [files[name]];
+ }
+ files[name].push(file);
+ } else {
+ files[name] = file;
+ }
+ } else {
+ files[name] = file;
+ }
+ })
+ .on('error', function(err) {
+ cb(err, fields, files);
+ })
+ .on('end', function() {
+ cb(null, fields, files);
+ });
+ }
+
+ // Parse headers and setup the parser, ready to start listening for data.
+ this.writeHeaders(req.headers);
+
+ // Start listening for data.
+ var self = this;
+ req
+ .on('error', function(err) {
+ self._error(err);
+ })
+ .on('aborted', function() {
+ self.emit('aborted');
+ self._error(new Error('Request aborted'));
+ })
+ .on('data', function(buffer) {
+ self.write(buffer);
+ })
+ .on('end', function() {
+ if (self.error) {
+ return;
+ }
+
+ var err = self._parser.end();
+ if (err) {
+ self._error(err);
+ }
+ });
+
+ return this;
+};
+
+IncomingForm.prototype.writeHeaders = function(headers) {
+ this.headers = headers;
+ this._parseContentLength();
+ this._parseContentType();
+};
+
+IncomingForm.prototype.write = function(buffer) {
+ if (this.error) {
+ return;
+ }
+ if (!this._parser) {
+ this._error(new Error('uninitialized parser'));
+ return;
+ }
+
+ this.bytesReceived += buffer.length;
+ this.emit('progress', this.bytesReceived, this.bytesExpected);
+
+ var bytesParsed = this._parser.write(buffer);
+ if (bytesParsed !== buffer.length) {
+ this._error(new Error('parser error, '+bytesParsed+' of '+buffer.length+' bytes parsed'));
+ }
+
+ return bytesParsed;
+};
+
+IncomingForm.prototype.pause = function() {
+ // this does nothing, unless overwritten in IncomingForm.parse
+ return false;
+};
+
+IncomingForm.prototype.resume = function() {
+ // this does nothing, unless overwritten in IncomingForm.parse
+ return false;
+};
+
+IncomingForm.prototype.onPart = function(part) {
+ // this method can be overwritten by the user
+ this.handlePart(part);
+};
+
+IncomingForm.prototype.handlePart = function(part) {
+ var self = this;
+
+ // This MUST check exactly for undefined. You can not change it to !part.filename.
+ if (part.filename === undefined) {
+ var value = ''
+ , decoder = new StringDecoder(this.encoding);
+
+ part.on('data', function(buffer) {
+ self._fieldsSize += buffer.length;
+ if (self._fieldsSize > self.maxFieldsSize) {
+ self._error(new Error('maxFieldsSize exceeded, received '+self._fieldsSize+' bytes of field data'));
+ return;
+ }
+ value += decoder.write(buffer);
+ });
+
+ part.on('end', function() {
+ self.emit('field', part.name, value);
+ });
+ return;
+ }
+
+ this._flushing++;
+
+ var file = new File({
+ path: this._uploadPath(part.filename),
+ name: part.filename,
+ type: part.mime,
+ hash: self.hash
+ });
+
+ this.emit('fileBegin', part.name, file);
+
+ file.open();
+ this.openedFiles.push(file);
+
+ part.on('data', function(buffer) {
+ self._fileSize += buffer.length;
+ if (self._fileSize > self.maxFileSize) {
+ self._error(new Error('maxFileSize exceeded, received '+self._fileSize+' bytes of file data'));
+ return;
+ }
+ if (buffer.length == 0) {
+ return;
+ }
+ self.pause();
+ file.write(buffer, function() {
+ self.resume();
+ });
+ });
+
+ part.on('end', function() {
+ file.end(function() {
+ self._flushing--;
+ self.emit('file', part.name, file);
+ self._maybeEnd();
+ });
+ });
+};
+
+function dummyParser(self) {
+ return {
+ end: function () {
+ self.ended = true;
+ self._maybeEnd();
+ return null;
+ }
+ };
+}
+
+IncomingForm.prototype._parseContentType = function() {
+ if (this.bytesExpected === 0) {
+ this._parser = dummyParser(this);
+ return;
+ }
+
+ if (!this.headers['content-type']) {
+ this._error(new Error('bad content-type header, no content-type'));
+ return;
+ }
+
+ if (this.headers['content-type'].match(/octet-stream/i)) {
+ this._initOctetStream();
+ return;
+ }
+
+ if (this.headers['content-type'].match(/urlencoded/i)) {
+ this._initUrlencoded();
+ return;
+ }
+
+ if (this.headers['content-type'].match(/multipart/i)) {
+ var m = this.headers['content-type'].match(/boundary=(?:"([^"]+)"|([^;]+))/i);
+ if (m) {
+ this._initMultipart(m[1] || m[2]);
+ } else {
+ this._error(new Error('bad content-type header, no multipart boundary'));
+ }
+ return;
+ }
+
+ if (this.headers['content-type'].match(/json/i)) {
+ this._initJSONencoded();
+ return;
+ }
+
+ this._error(new Error('bad content-type header, unknown content-type: '+this.headers['content-type']));
+};
+
+IncomingForm.prototype._error = function(err) {
+ if (this.error || this.ended) {
+ return;
+ }
+
+ this.error = err;
+ this.emit('error', err);
+
+ if (Array.isArray(this.openedFiles)) {
+ this.openedFiles.forEach(function(file) {
+ file._writeStream.destroy();
+ setTimeout(fs.unlink, 0, file.path, function(error) { });
+ });
+ }
+};
+
+IncomingForm.prototype._parseContentLength = function() {
+ this.bytesReceived = 0;
+ if (this.headers['content-length']) {
+ this.bytesExpected = parseInt(this.headers['content-length'], 10);
+ } else if (this.headers['transfer-encoding'] === undefined) {
+ this.bytesExpected = 0;
+ }
+
+ if (this.bytesExpected !== null) {
+ this.emit('progress', this.bytesReceived, this.bytesExpected);
+ }
+};
+
+IncomingForm.prototype._newParser = function() {
+ return new MultipartParser();
+};
+
+IncomingForm.prototype._initMultipart = function(boundary) {
+ this.type = 'multipart';
+
+ var parser = new MultipartParser(),
+ self = this,
+ headerField,
+ headerValue,
+ part;
+
+ parser.initWithBoundary(boundary);
+
+ parser.onPartBegin = function() {
+ part = new Stream();
+ part.readable = true;
+ part.headers = {};
+ part.name = null;
+ part.filename = null;
+ part.mime = null;
+
+ part.transferEncoding = 'binary';
+ part.transferBuffer = '';
+
+ headerField = '';
+ headerValue = '';
+ };
+
+ parser.onHeaderField = function(b, start, end) {
+ headerField += b.toString(self.encoding, start, end);
+ };
+
+ parser.onHeaderValue = function(b, start, end) {
+ headerValue += b.toString(self.encoding, start, end);
+ };
+
+ parser.onHeaderEnd = function() {
+ headerField = headerField.toLowerCase();
+ part.headers[headerField] = headerValue;
+
+ // matches either a quoted-string or a token (RFC 2616 section 19.5.1)
+ var m = headerValue.match(/\bname=("([^"]*)"|([^\(\)<>@,;:\\"\/\[\]\?=\{\}\s\t/]+))/i);
+ if (headerField == 'content-disposition') {
+ if (m) {
+ part.name = m[2] || m[3] || '';
+ }
+
+ part.filename = self._fileName(headerValue);
+ } else if (headerField == 'content-type') {
+ part.mime = headerValue;
+ } else if (headerField == 'content-transfer-encoding') {
+ part.transferEncoding = headerValue.toLowerCase();
+ }
+
+ headerField = '';
+ headerValue = '';
+ };
+
+ parser.onHeadersEnd = function() {
+ switch(part.transferEncoding){
+ case 'binary':
+ case '7bit':
+ case '8bit':
+ parser.onPartData = function(b, start, end) {
+ part.emit('data', b.slice(start, end));
+ };
+
+ parser.onPartEnd = function() {
+ part.emit('end');
+ };
+ break;
+
+ case 'base64':
+ parser.onPartData = function(b, start, end) {
+ part.transferBuffer += b.slice(start, end).toString('ascii');
+
+ /*
+ four bytes (chars) in base64 converts to three bytes in binary
+ encoding. So we should always work with a number of bytes that
+ can be divided by 4, it will result in a number of buytes that
+ can be divided vy 3.
+ */
+ var offset = parseInt(part.transferBuffer.length / 4, 10) * 4;
+ part.emit('data', new Buffer(part.transferBuffer.substring(0, offset), 'base64'));
+ part.transferBuffer = part.transferBuffer.substring(offset);
+ };
+
+ parser.onPartEnd = function() {
+ part.emit('data', new Buffer(part.transferBuffer, 'base64'));
+ part.emit('end');
+ };
+ break;
+
+ default:
+ return self._error(new Error('unknown transfer-encoding'));
+ }
+
+ self.onPart(part);
+ };
+
+
+ parser.onEnd = function() {
+ self.ended = true;
+ self._maybeEnd();
+ };
+
+ this._parser = parser;
+};
+
+IncomingForm.prototype._fileName = function(headerValue) {
+ // matches either a quoted-string or a token (RFC 2616 section 19.5.1)
+ var m = headerValue.match(/\bfilename=("(.*?)"|([^\(\)<>@,;:\\"\/\[\]\?=\{\}\s\t/]+))($|;\s)/i);
+ if (!m) return;
+
+ var match = m[2] || m[3] || '';
+ var filename = match.substr(match.lastIndexOf('\\') + 1);
+ filename = filename.replace(/%22/g, '"');
+ filename = filename.replace(/&#([\d]{4});/g, function(m, code) {
+ return String.fromCharCode(code);
+ });
+ return filename;
+};
+
+IncomingForm.prototype._initUrlencoded = function() {
+ this.type = 'urlencoded';
+
+ var parser = new QuerystringParser(this.maxFields)
+ , self = this;
+
+ parser.onField = function(key, val) {
+ self.emit('field', key, val);
+ };
+
+ parser.onEnd = function() {
+ self.ended = true;
+ self._maybeEnd();
+ };
+
+ this._parser = parser;
+};
+
+IncomingForm.prototype._initOctetStream = function() {
+ this.type = 'octet-stream';
+ var filename = this.headers['x-file-name'];
+ var mime = this.headers['content-type'];
+
+ var file = new File({
+ path: this._uploadPath(filename),
+ name: filename,
+ type: mime
+ });
+
+ this.emit('fileBegin', filename, file);
+ file.open();
+ this.openedFiles.push(file);
+ this._flushing++;
+
+ var self = this;
+
+ self._parser = new OctetParser();
+
+ //Keep track of writes that haven't finished so we don't emit the file before it's done being written
+ var outstandingWrites = 0;
+
+ self._parser.on('data', function(buffer){
+ self.pause();
+ outstandingWrites++;
+
+ file.write(buffer, function() {
+ outstandingWrites--;
+ self.resume();
+
+ if(self.ended){
+ self._parser.emit('doneWritingFile');
+ }
+ });
+ });
+
+ self._parser.on('end', function(){
+ self._flushing--;
+ self.ended = true;
+
+ var done = function(){
+ file.end(function() {
+ self.emit('file', 'file', file);
+ self._maybeEnd();
+ });
+ };
+
+ if(outstandingWrites === 0){
+ done();
+ } else {
+ self._parser.once('doneWritingFile', done);
+ }
+ });
+};
+
+IncomingForm.prototype._initJSONencoded = function() {
+ this.type = 'json';
+
+ var parser = new JSONParser(this)
+ , self = this;
+
+ parser.onField = function(key, val) {
+ self.emit('field', key, val);
+ };
+
+ parser.onEnd = function() {
+ self.ended = true;
+ self._maybeEnd();
+ };
+
+ this._parser = parser;
+};
+
+IncomingForm.prototype._uploadPath = function(filename) {
+ var buf = crypto.randomBytes(16);
+ var name = 'upload_' + buf.toString('hex');
+
+ if (this.keepExtensions) {
+ var ext = path.extname(filename);
+ ext = ext.replace(/(\.[a-z0-9]+).*/i, '$1');
+
+ name += ext;
+ }
+
+ return path.join(this.uploadDir, name);
+};
+
+IncomingForm.prototype._maybeEnd = function() {
+ if (!this.ended || this._flushing || this.error) {
+ return;
+ }
+
+ this.emit('end');
+};
diff --git a/node_modules/formidable/lib/index.js b/node_modules/formidable/lib/index.js
new file mode 100644
index 0000000..7a6e3e1
--- /dev/null
+++ b/node_modules/formidable/lib/index.js
@@ -0,0 +1,3 @@
+var IncomingForm = require('./incoming_form').IncomingForm;
+IncomingForm.IncomingForm = IncomingForm;
+module.exports = IncomingForm;
diff --git a/node_modules/formidable/lib/json_parser.js b/node_modules/formidable/lib/json_parser.js
new file mode 100644
index 0000000..28a23ba
--- /dev/null
+++ b/node_modules/formidable/lib/json_parser.js
@@ -0,0 +1,30 @@
+if (global.GENTLY) require = GENTLY.hijack(require);
+
+var Buffer = require('buffer').Buffer;
+
+function JSONParser(parent) {
+ this.parent = parent;
+ this.chunks = [];
+ this.bytesWritten = 0;
+}
+exports.JSONParser = JSONParser;
+
+JSONParser.prototype.write = function(buffer) {
+ this.bytesWritten += buffer.length;
+ this.chunks.push(buffer);
+ return buffer.length;
+};
+
+JSONParser.prototype.end = function() {
+ try {
+ var fields = JSON.parse(Buffer.concat(this.chunks));
+ for (var field in fields) {
+ this.onField(field, fields[field]);
+ }
+ } catch (e) {
+ this.parent.emit('error', e);
+ }
+ this.data = null;
+
+ this.onEnd();
+};
diff --git a/node_modules/formidable/lib/multipart_parser.js b/node_modules/formidable/lib/multipart_parser.js
new file mode 100644
index 0000000..36de2b0
--- /dev/null
+++ b/node_modules/formidable/lib/multipart_parser.js
@@ -0,0 +1,332 @@
+var Buffer = require('buffer').Buffer,
+ s = 0,
+ S =
+ { PARSER_UNINITIALIZED: s++,
+ START: s++,
+ START_BOUNDARY: s++,
+ HEADER_FIELD_START: s++,
+ HEADER_FIELD: s++,
+ HEADER_VALUE_START: s++,
+ HEADER_VALUE: s++,
+ HEADER_VALUE_ALMOST_DONE: s++,
+ HEADERS_ALMOST_DONE: s++,
+ PART_DATA_START: s++,
+ PART_DATA: s++,
+ PART_END: s++,
+ END: s++
+ },
+
+ f = 1,
+ F =
+ { PART_BOUNDARY: f,
+ LAST_BOUNDARY: f *= 2
+ },
+
+ LF = 10,
+ CR = 13,
+ SPACE = 32,
+ HYPHEN = 45,
+ COLON = 58,
+ A = 97,
+ Z = 122,
+
+ lower = function(c) {
+ return c | 0x20;
+ };
+
+for (s in S) {
+ exports[s] = S[s];
+}
+
+function MultipartParser() {
+ this.boundary = null;
+ this.boundaryChars = null;
+ this.lookbehind = null;
+ this.state = S.PARSER_UNINITIALIZED;
+
+ this.index = null;
+ this.flags = 0;
+}
+exports.MultipartParser = MultipartParser;
+
+MultipartParser.stateToString = function(stateNumber) {
+ for (var state in S) {
+ var number = S[state];
+ if (number === stateNumber) return state;
+ }
+};
+
+MultipartParser.prototype.initWithBoundary = function(str) {
+ this.boundary = new Buffer(str.length+4);
+ this.boundary.write('\r\n--', 0);
+ this.boundary.write(str, 4);
+ this.lookbehind = new Buffer(this.boundary.length+8);
+ this.state = S.START;
+
+ this.boundaryChars = {};
+ for (var i = 0; i < this.boundary.length; i++) {
+ this.boundaryChars[this.boundary[i]] = true;
+ }
+};
+
+MultipartParser.prototype.write = function(buffer) {
+ var self = this,
+ i = 0,
+ len = buffer.length,
+ prevIndex = this.index,
+ index = this.index,
+ state = this.state,
+ flags = this.flags,
+ lookbehind = this.lookbehind,
+ boundary = this.boundary,
+ boundaryChars = this.boundaryChars,
+ boundaryLength = this.boundary.length,
+ boundaryEnd = boundaryLength - 1,
+ bufferLength = buffer.length,
+ c,
+ cl,
+
+ mark = function(name) {
+ self[name+'Mark'] = i;
+ },
+ clear = function(name) {
+ delete self[name+'Mark'];
+ },
+ callback = function(name, buffer, start, end) {
+ if (start !== undefined && start === end) {
+ return;
+ }
+
+ var callbackSymbol = 'on'+name.substr(0, 1).toUpperCase()+name.substr(1);
+ if (callbackSymbol in self) {
+ self[callbackSymbol](buffer, start, end);
+ }
+ },
+ dataCallback = function(name, clear) {
+ var markSymbol = name+'Mark';
+ if (!(markSymbol in self)) {
+ return;
+ }
+
+ if (!clear) {
+ callback(name, buffer, self[markSymbol], buffer.length);
+ self[markSymbol] = 0;
+ } else {
+ callback(name, buffer, self[markSymbol], i);
+ delete self[markSymbol];
+ }
+ };
+
+ for (i = 0; i < len; i++) {
+ c = buffer[i];
+ switch (state) {
+ case S.PARSER_UNINITIALIZED:
+ return i;
+ case S.START:
+ index = 0;
+ state = S.START_BOUNDARY;
+ case S.START_BOUNDARY:
+ if (index == boundary.length - 2) {
+ if (c == HYPHEN) {
+ flags |= F.LAST_BOUNDARY;
+ } else if (c != CR) {
+ return i;
+ }
+ index++;
+ break;
+ } else if (index - 1 == boundary.length - 2) {
+ if (flags & F.LAST_BOUNDARY && c == HYPHEN){
+ callback('end');
+ state = S.END;
+ flags = 0;
+ } else if (!(flags & F.LAST_BOUNDARY) && c == LF) {
+ index = 0;
+ callback('partBegin');
+ state = S.HEADER_FIELD_START;
+ } else {
+ return i;
+ }
+ break;
+ }
+
+ if (c != boundary[index+2]) {
+ index = -2;
+ }
+ if (c == boundary[index+2]) {
+ index++;
+ }
+ break;
+ case S.HEADER_FIELD_START:
+ state = S.HEADER_FIELD;
+ mark('headerField');
+ index = 0;
+ case S.HEADER_FIELD:
+ if (c == CR) {
+ clear('headerField');
+ state = S.HEADERS_ALMOST_DONE;
+ break;
+ }
+
+ index++;
+ if (c == HYPHEN) {
+ break;
+ }
+
+ if (c == COLON) {
+ if (index == 1) {
+ // empty header field
+ return i;
+ }
+ dataCallback('headerField', true);
+ state = S.HEADER_VALUE_START;
+ break;
+ }
+
+ cl = lower(c);
+ if (cl < A || cl > Z) {
+ return i;
+ }
+ break;
+ case S.HEADER_VALUE_START:
+ if (c == SPACE) {
+ break;
+ }
+
+ mark('headerValue');
+ state = S.HEADER_VALUE;
+ case S.HEADER_VALUE:
+ if (c == CR) {
+ dataCallback('headerValue', true);
+ callback('headerEnd');
+ state = S.HEADER_VALUE_ALMOST_DONE;
+ }
+ break;
+ case S.HEADER_VALUE_ALMOST_DONE:
+ if (c != LF) {
+ return i;
+ }
+ state = S.HEADER_FIELD_START;
+ break;
+ case S.HEADERS_ALMOST_DONE:
+ if (c != LF) {
+ return i;
+ }
+
+ callback('headersEnd');
+ state = S.PART_DATA_START;
+ break;
+ case S.PART_DATA_START:
+ state = S.PART_DATA;
+ mark('partData');
+ case S.PART_DATA:
+ prevIndex = index;
+
+ if (index === 0) {
+ // boyer-moore derrived algorithm to safely skip non-boundary data
+ i += boundaryEnd;
+ while (i < bufferLength && !(buffer[i] in boundaryChars)) {
+ i += boundaryLength;
+ }
+ i -= boundaryEnd;
+ c = buffer[i];
+ }
+
+ if (index < boundary.length) {
+ if (boundary[index] == c) {
+ if (index === 0) {
+ dataCallback('partData', true);
+ }
+ index++;
+ } else {
+ index = 0;
+ }
+ } else if (index == boundary.length) {
+ index++;
+ if (c == CR) {
+ // CR = part boundary
+ flags |= F.PART_BOUNDARY;
+ } else if (c == HYPHEN) {
+ // HYPHEN = end boundary
+ flags |= F.LAST_BOUNDARY;
+ } else {
+ index = 0;
+ }
+ } else if (index - 1 == boundary.length) {
+ if (flags & F.PART_BOUNDARY) {
+ index = 0;
+ if (c == LF) {
+ // unset the PART_BOUNDARY flag
+ flags &= ~F.PART_BOUNDARY;
+ callback('partEnd');
+ callback('partBegin');
+ state = S.HEADER_FIELD_START;
+ break;
+ }
+ } else if (flags & F.LAST_BOUNDARY) {
+ if (c == HYPHEN) {
+ callback('partEnd');
+ callback('end');
+ state = S.END;
+ flags = 0;
+ } else {
+ index = 0;
+ }
+ } else {
+ index = 0;
+ }
+ }
+
+ if (index > 0) {
+ // when matching a possible boundary, keep a lookbehind reference
+ // in case it turns out to be a false lead
+ lookbehind[index-1] = c;
+ } else if (prevIndex > 0) {
+ // if our boundary turned out to be rubbish, the captured lookbehind
+ // belongs to partData
+ callback('partData', lookbehind, 0, prevIndex);
+ prevIndex = 0;
+ mark('partData');
+
+ // reconsider the current character even so it interrupted the sequence
+ // it could be the beginning of a new sequence
+ i--;
+ }
+
+ break;
+ case S.END:
+ break;
+ default:
+ return i;
+ }
+ }
+
+ dataCallback('headerField');
+ dataCallback('headerValue');
+ dataCallback('partData');
+
+ this.index = index;
+ this.state = state;
+ this.flags = flags;
+
+ return len;
+};
+
+MultipartParser.prototype.end = function() {
+ var callback = function(self, name) {
+ var callbackSymbol = 'on'+name.substr(0, 1).toUpperCase()+name.substr(1);
+ if (callbackSymbol in self) {
+ self[callbackSymbol]();
+ }
+ };
+ if ((this.state == S.HEADER_FIELD_START && this.index === 0) ||
+ (this.state == S.PART_DATA && this.index == this.boundary.length)) {
+ callback(this, 'partEnd');
+ callback(this, 'end');
+ } else if (this.state != S.END) {
+ return new Error('MultipartParser.end(): stream ended unexpectedly: ' + this.explain());
+ }
+};
+
+MultipartParser.prototype.explain = function() {
+ return 'state = ' + MultipartParser.stateToString(this.state);
+};
diff --git a/node_modules/formidable/lib/octet_parser.js b/node_modules/formidable/lib/octet_parser.js
new file mode 100644
index 0000000..6e8b551
--- /dev/null
+++ b/node_modules/formidable/lib/octet_parser.js
@@ -0,0 +1,20 @@
+var EventEmitter = require('events').EventEmitter
+ , util = require('util');
+
+function OctetParser(options){
+ if(!(this instanceof OctetParser)) return new OctetParser(options);
+ EventEmitter.call(this);
+}
+
+util.inherits(OctetParser, EventEmitter);
+
+exports.OctetParser = OctetParser;
+
+OctetParser.prototype.write = function(buffer) {
+ this.emit('data', buffer);
+ return buffer.length;
+};
+
+OctetParser.prototype.end = function() {
+ this.emit('end');
+};
diff --git a/node_modules/formidable/lib/querystring_parser.js b/node_modules/formidable/lib/querystring_parser.js
new file mode 100644
index 0000000..fcaffe0
--- /dev/null
+++ b/node_modules/formidable/lib/querystring_parser.js
@@ -0,0 +1,27 @@
+if (global.GENTLY) require = GENTLY.hijack(require);
+
+// This is a buffering parser, not quite as nice as the multipart one.
+// If I find time I'll rewrite this to be fully streaming as well
+var querystring = require('querystring');
+
+function QuerystringParser(maxKeys) {
+ this.maxKeys = maxKeys;
+ this.buffer = '';
+}
+exports.QuerystringParser = QuerystringParser;
+
+QuerystringParser.prototype.write = function(buffer) {
+ this.buffer += buffer.toString('ascii');
+ return buffer.length;
+};
+
+QuerystringParser.prototype.end = function() {
+ var fields = querystring.parse(this.buffer, '&', '=', { maxKeys: this.maxKeys });
+ for (var field in fields) {
+ this.onField(field, fields[field]);
+ }
+ this.buffer = '';
+
+ this.onEnd();
+};
+
diff --git a/node_modules/formidable/package.json b/node_modules/formidable/package.json
new file mode 100644
index 0000000..d63b7b9
--- /dev/null
+++ b/node_modules/formidable/package.json
@@ -0,0 +1,60 @@
+{
+ "_args": [
+ [
+ "formidable@1.2.2",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "formidable@1.2.2",
+ "_id": "formidable@1.2.2",
+ "_inBundle": false,
+ "_integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==",
+ "_location": "/formidable",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "formidable@1.2.2",
+ "name": "formidable",
+ "escapedName": "formidable",
+ "rawSpec": "1.2.2",
+ "saveSpec": null,
+ "fetchSpec": "1.2.2"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz",
+ "_spec": "1.2.2",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "bugs": {
+ "url": "https://github.com/node-formidable/formidable/issues"
+ },
+ "description": "A node.js module for parsing form data, especially file uploads.",
+ "devDependencies": {
+ "findit": "^0.1.2",
+ "gently": "^0.8.0",
+ "hashish": "^0.0.4",
+ "request": "^2.11.4",
+ "urun": "^0.0.6",
+ "utest": "^0.0.8"
+ },
+ "files": [
+ "lib",
+ "benchmark-2020-01-29_xeon-x3440.png"
+ ],
+ "funding": "https://ko-fi.com/tunnckoCore/commissions",
+ "homepage": "https://github.com/node-formidable/formidable",
+ "license": "MIT",
+ "main": "./lib/index.js",
+ "name": "formidable",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/node-formidable/formidable.git"
+ },
+ "scripts": {
+ "clean": "rm test/tmp/*",
+ "test": "node test/run.js"
+ },
+ "version": "1.2.2"
+}
diff --git a/node_modules/fs-constants/LICENSE b/node_modules/fs-constants/LICENSE
new file mode 100644
index 0000000..cb757e5
--- /dev/null
+++ b/node_modules/fs-constants/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 Mathias Buus
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/fs-constants/README.md b/node_modules/fs-constants/README.md
new file mode 100644
index 0000000..62b3374
--- /dev/null
+++ b/node_modules/fs-constants/README.md
@@ -0,0 +1,26 @@
+# fs-constants
+
+Small module that allows you to get the fs constants across
+Node and the browser.
+
+```
+npm install fs-constants
+```
+
+Previously you would use `require('constants')` for this in node but that has been
+deprecated and changed to `require('fs').constants` which does not browserify.
+
+This module uses `require('constants')` in the browser and `require('fs').constants` in node to work around this
+
+
+## Usage
+
+``` js
+var constants = require('fs-constants')
+
+console.log('constants:', constants)
+```
+
+## License
+
+MIT
diff --git a/node_modules/fs-constants/browser.js b/node_modules/fs-constants/browser.js
new file mode 100644
index 0000000..3c87638
--- /dev/null
+++ b/node_modules/fs-constants/browser.js
@@ -0,0 +1 @@
+module.exports = require('constants')
diff --git a/node_modules/fs-constants/index.js b/node_modules/fs-constants/index.js
new file mode 100644
index 0000000..2a3aadf
--- /dev/null
+++ b/node_modules/fs-constants/index.js
@@ -0,0 +1 @@
+module.exports = require('fs').constants || require('constants')
diff --git a/node_modules/fs-constants/package.json b/node_modules/fs-constants/package.json
new file mode 100644
index 0000000..c569777
--- /dev/null
+++ b/node_modules/fs-constants/package.json
@@ -0,0 +1,50 @@
+{
+ "_args": [
+ [
+ "fs-constants@1.0.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "fs-constants@1.0.0",
+ "_id": "fs-constants@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
+ "_location": "/fs-constants",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "fs-constants@1.0.0",
+ "name": "fs-constants",
+ "escapedName": "fs-constants",
+ "rawSpec": "1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "1.0.0"
+ },
+ "_requiredBy": [
+ "/tar-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
+ "_spec": "1.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "browser": "browser.js",
+ "bugs": {
+ "url": "https://github.com/mafintosh/fs-constants/issues"
+ },
+ "dependencies": {},
+ "description": "Require constants across node and the browser",
+ "devDependencies": {},
+ "homepage": "https://github.com/mafintosh/fs-constants",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "fs-constants",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/fs-constants.git"
+ },
+ "version": "1.0.0"
+}
diff --git a/node_modules/has-flag/index.d.ts b/node_modules/has-flag/index.d.ts
new file mode 100644
index 0000000..a0a48c8
--- /dev/null
+++ b/node_modules/has-flag/index.d.ts
@@ -0,0 +1,39 @@
+/**
+Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag.
+
+@param flag - CLI flag to look for. The `--` prefix is optional.
+@param argv - CLI arguments. Default: `process.argv`.
+@returns Whether the flag exists.
+
+@example
+```
+// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow
+
+// foo.ts
+import hasFlag = require('has-flag');
+
+hasFlag('unicorn');
+//=> true
+
+hasFlag('--unicorn');
+//=> true
+
+hasFlag('f');
+//=> true
+
+hasFlag('-f');
+//=> true
+
+hasFlag('foo=bar');
+//=> true
+
+hasFlag('foo');
+//=> false
+
+hasFlag('rainbow');
+//=> false
+```
+*/
+declare function hasFlag(flag: string, argv?: string[]): boolean;
+
+export = hasFlag;
diff --git a/node_modules/has-flag/index.js b/node_modules/has-flag/index.js
new file mode 100644
index 0000000..b6f80b1
--- /dev/null
+++ b/node_modules/has-flag/index.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = (flag, argv = process.argv) => {
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
+ const position = argv.indexOf(prefix + flag);
+ const terminatorPosition = argv.indexOf('--');
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
+};
diff --git a/node_modules/has-flag/license b/node_modules/has-flag/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/has-flag/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/has-flag/package.json b/node_modules/has-flag/package.json
new file mode 100644
index 0000000..22ad122
--- /dev/null
+++ b/node_modules/has-flag/package.json
@@ -0,0 +1,81 @@
+{
+ "_args": [
+ [
+ "has-flag@4.0.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "has-flag@4.0.0",
+ "_id": "has-flag@4.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "_location": "/has-flag",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "has-flag@4.0.0",
+ "name": "has-flag",
+ "escapedName": "has-flag",
+ "rawSpec": "4.0.0",
+ "saveSpec": null,
+ "fetchSpec": "4.0.0"
+ },
+ "_requiredBy": [
+ "/supports-color"
+ ],
+ "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "_spec": "4.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/has-flag/issues"
+ },
+ "description": "Check if argv has a specific flag",
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/sindresorhus/has-flag#readme",
+ "keywords": [
+ "has",
+ "check",
+ "detect",
+ "contains",
+ "find",
+ "flag",
+ "cli",
+ "command-line",
+ "argv",
+ "process",
+ "arg",
+ "args",
+ "argument",
+ "arguments",
+ "getopt",
+ "minimist",
+ "optimist"
+ ],
+ "license": "MIT",
+ "name": "has-flag",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/has-flag.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "4.0.0"
+}
diff --git a/node_modules/has-flag/readme.md b/node_modules/has-flag/readme.md
new file mode 100644
index 0000000..3f72dff
--- /dev/null
+++ b/node_modules/has-flag/readme.md
@@ -0,0 +1,89 @@
+# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag)
+
+> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag
+
+Correctly stops looking after an `--` argument terminator.
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-has-flag?utm_source=npm-has-flag&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
+
+---
+
+
+## Install
+
+```
+$ npm install has-flag
+```
+
+
+## Usage
+
+```js
+// foo.js
+const hasFlag = require('has-flag');
+
+hasFlag('unicorn');
+//=> true
+
+hasFlag('--unicorn');
+//=> true
+
+hasFlag('f');
+//=> true
+
+hasFlag('-f');
+//=> true
+
+hasFlag('foo=bar');
+//=> true
+
+hasFlag('foo');
+//=> false
+
+hasFlag('rainbow');
+//=> false
+```
+
+```
+$ node foo.js -f --unicorn --foo=bar -- --rainbow
+```
+
+
+## API
+
+### hasFlag(flag, [argv])
+
+Returns a boolean for whether the flag exists.
+
+#### flag
+
+Type: `string`
+
+CLI flag to look for. The `--` prefix is optional.
+
+#### argv
+
+Type: `string[]`<br>
+Default: `process.argv`
+
+CLI arguments.
+
+
+## Security
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/ieee754/LICENSE b/node_modules/ieee754/LICENSE
new file mode 100644
index 0000000..5aac82c
--- /dev/null
+++ b/node_modules/ieee754/LICENSE
@@ -0,0 +1,11 @@
+Copyright 2008 Fair Oaks Labs, Inc.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/ieee754/README.md b/node_modules/ieee754/README.md
new file mode 100644
index 0000000..c5291d2
--- /dev/null
+++ b/node_modules/ieee754/README.md
@@ -0,0 +1,53 @@
+# ieee754 [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/ieee754/master.svg
+[travis-url]: https://travis-ci.org/feross/ieee754
+[npm-image]: https://img.shields.io/npm/v/ieee754.svg
+[npm-url]: https://npmjs.org/package/ieee754
+[downloads-image]: https://img.shields.io/npm/dm/ieee754.svg
+[downloads-url]: https://npmjs.org/package/ieee754
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+[![saucelabs][saucelabs-image]][saucelabs-url]
+
+[saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg
+[saucelabs-url]: https://saucelabs.com/u/ieee754
+
+### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object.
+
+## install
+
+```
+npm install ieee754
+```
+
+[Get supported ieee754 with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-ieee754?utm_source=npm-ieee754&utm_medium=referral&utm_campaign=readme)
+
+## methods
+
+`var ieee754 = require('ieee754')`
+
+The `ieee754` object has the following functions:
+
+```
+ieee754.read = function (buffer, offset, isLE, mLen, nBytes)
+ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes)
+```
+
+The arguments mean the following:
+
+- buffer = the buffer
+- offset = offset into the buffer
+- value = value to set (only for `write`)
+- isLe = is little endian?
+- mLen = mantissa length
+- nBytes = number of bytes
+
+## what is ieee754?
+
+The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point).
+
+## license
+
+BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc.
diff --git a/node_modules/ieee754/index.js b/node_modules/ieee754/index.js
new file mode 100644
index 0000000..e87e6ff
--- /dev/null
+++ b/node_modules/ieee754/index.js
@@ -0,0 +1,84 @@
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+ var e, m
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var nBits = -7
+ var i = isLE ? (nBytes - 1) : 0
+ var d = isLE ? -1 : 1
+ var s = buffer[offset + i]
+
+ i += d
+
+ e = s & ((1 << (-nBits)) - 1)
+ s >>= (-nBits)
+ nBits += eLen
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & ((1 << (-nBits)) - 1)
+ e >>= (-nBits)
+ nBits += mLen
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
+ } else {
+ m = m + Math.pow(2, mLen)
+ e = e - eBias
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+}
+
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+ var i = isLE ? 0 : (nBytes - 1)
+ var d = isLE ? 1 : -1
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+ value = Math.abs(value)
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0
+ e = eMax
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2)
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--
+ c *= 2
+ }
+ if (e + eBias >= 1) {
+ value += rt / c
+ } else {
+ value += rt * Math.pow(2, 1 - eBias)
+ }
+ if (value * c >= 2) {
+ e++
+ c /= 2
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0
+ e = eMax
+ } else if (e + eBias >= 1) {
+ m = ((value * c) - 1) * Math.pow(2, mLen)
+ e = e + eBias
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+ e = 0
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+ e = (e << mLen) | m
+ eLen += mLen
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+ buffer[offset + i - d] |= s * 128
+}
diff --git a/node_modules/ieee754/package.json b/node_modules/ieee754/package.json
new file mode 100644
index 0000000..99509c3
--- /dev/null
+++ b/node_modules/ieee754/package.json
@@ -0,0 +1,72 @@
+{
+ "_args": [
+ [
+ "ieee754@1.1.13",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "ieee754@1.1.13",
+ "_id": "ieee754@1.1.13",
+ "_inBundle": false,
+ "_integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
+ "_location": "/ieee754",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ieee754@1.1.13",
+ "name": "ieee754",
+ "escapedName": "ieee754",
+ "rawSpec": "1.1.13",
+ "saveSpec": null,
+ "fetchSpec": "1.1.13"
+ },
+ "_requiredBy": [
+ "/buffer"
+ ],
+ "_resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
+ "_spec": "1.1.13",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "http://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/ieee754/issues"
+ },
+ "contributors": [
+ {
+ "name": "Romain Beauxis",
+ "email": "toots@rastageeks.org"
+ }
+ ],
+ "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object",
+ "devDependencies": {
+ "airtap": "0.1.0",
+ "standard": "*",
+ "tape": "^4.0.0"
+ },
+ "homepage": "https://github.com/feross/ieee754#readme",
+ "keywords": [
+ "IEEE 754",
+ "buffer",
+ "convert",
+ "floating point",
+ "ieee754"
+ ],
+ "license": "BSD-3-Clause",
+ "main": "index.js",
+ "name": "ieee754",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/ieee754.git"
+ },
+ "scripts": {
+ "test": "standard && npm run test-node && npm run test-browser",
+ "test-browser": "airtap -- test/*.js",
+ "test-browser-local": "airtap --local -- test/*.js",
+ "test-node": "tape test/*.js"
+ },
+ "version": "1.1.13"
+}
diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE
new file mode 100644
index 0000000..dea3013
--- /dev/null
+++ b/node_modules/inherits/LICENSE
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/node_modules/inherits/README.md b/node_modules/inherits/README.md
new file mode 100644
index 0000000..b1c5665
--- /dev/null
+++ b/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js
new file mode 100644
index 0000000..f71f2d9
--- /dev/null
+++ b/node_modules/inherits/inherits.js
@@ -0,0 +1,9 @@
+try {
+ var util = require('util');
+ /* istanbul ignore next */
+ if (typeof util.inherits !== 'function') throw '';
+ module.exports = util.inherits;
+} catch (e) {
+ /* istanbul ignore next */
+ module.exports = require('./inherits_browser.js');
+}
diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000..86bbb3d
--- /dev/null
+++ b/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,27 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ if (superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ })
+ }
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ if (superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+ }
+}
diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json
new file mode 100644
index 0000000..f738cfb
--- /dev/null
+++ b/node_modules/inherits/package.json
@@ -0,0 +1,66 @@
+{
+ "_args": [
+ [
+ "inherits@2.0.4",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "inherits@2.0.4",
+ "_id": "inherits@2.0.4",
+ "_inBundle": false,
+ "_integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "_location": "/inherits",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "inherits@2.0.4",
+ "name": "inherits",
+ "escapedName": "inherits",
+ "rawSpec": "2.0.4",
+ "saveSpec": null,
+ "fetchSpec": "2.0.4"
+ },
+ "_requiredBy": [
+ "/bl",
+ "/readable-stream",
+ "/tar-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "_spec": "2.0.4",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "browser": "./inherits_browser.js",
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "devDependencies": {
+ "tap": "^14.2.4"
+ },
+ "files": [
+ "inherits.js",
+ "inherits_browser.js"
+ ],
+ "homepage": "https://github.com/isaacs/inherits#readme",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "license": "ISC",
+ "main": "./inherits.js",
+ "name": "inherits",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/inherits.git"
+ },
+ "scripts": {
+ "test": "tap"
+ },
+ "version": "2.0.4"
+}
diff --git a/node_modules/is-interactive/index.d.ts b/node_modules/is-interactive/index.d.ts
new file mode 100644
index 0000000..5984dc6
--- /dev/null
+++ b/node_modules/is-interactive/index.d.ts
@@ -0,0 +1,31 @@
+/// <reference types="node"/>
+
+declare namespace isInteractive {
+ interface Options {
+ /**
+ The stream to check.
+
+ @default process.stdout
+ */
+ readonly stream?: NodeJS.WritableStream;
+ }
+}
+
+/**
+Check if stdout or stderr is [interactive](https://unix.stackexchange.com/a/43389/7678).
+
+It checks that the stream is [TTY](https://jameshfisher.com/2017/12/09/what-is-a-tty/), not a dumb terminal, and not running in a CI.
+
+This can be useful to decide whether to present interactive UI or animations in the terminal.
+
+@example
+```
+import isInteractive = require('is-interactive');
+
+isInteractive();
+//=> true
+```
+*/
+declare function isInteractive(options?: isInteractive.Options): boolean;
+
+export = isInteractive;
diff --git a/node_modules/is-interactive/index.js b/node_modules/is-interactive/index.js
new file mode 100644
index 0000000..99ff823
--- /dev/null
+++ b/node_modules/is-interactive/index.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = ({stream = process.stdout} = {}) => {
+ return Boolean(
+ stream && stream.isTTY &&
+ process.env.TERM !== 'dumb' &&
+ !('CI' in process.env)
+ );
+};
diff --git a/node_modules/is-interactive/license b/node_modules/is-interactive/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/is-interactive/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/is-interactive/package.json b/node_modules/is-interactive/package.json
new file mode 100644
index 0000000..a56ba31
--- /dev/null
+++ b/node_modules/is-interactive/package.json
@@ -0,0 +1,73 @@
+{
+ "_args": [
+ [
+ "is-interactive@1.0.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "is-interactive@1.0.0",
+ "_id": "is-interactive@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
+ "_location": "/is-interactive",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "is-interactive@1.0.0",
+ "name": "is-interactive",
+ "escapedName": "is-interactive",
+ "rawSpec": "1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "1.0.0"
+ },
+ "_requiredBy": [
+ "/ora"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
+ "_spec": "1.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-interactive/issues"
+ },
+ "description": "Check if stdout or stderr is interactive",
+ "devDependencies": {
+ "@types/node": "^12.0.12",
+ "ava": "^2.1.0",
+ "tsd": "^0.7.3",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-interactive#readme",
+ "keywords": [
+ "interactive",
+ "stdout",
+ "stderr",
+ "detect",
+ "is",
+ "terminal",
+ "shell",
+ "tty"
+ ],
+ "license": "MIT",
+ "name": "is-interactive",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-interactive.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "1.0.0"
+}
diff --git a/node_modules/is-interactive/readme.md b/node_modules/is-interactive/readme.md
new file mode 100644
index 0000000..49a8598
--- /dev/null
+++ b/node_modules/is-interactive/readme.md
@@ -0,0 +1,51 @@
+# is-interactive [![Build Status](https://travis-ci.com/sindresorhus/is-interactive.svg?branch=master)](https://travis-ci.com/sindresorhus/is-interactive)
+
+> Check if stdout or stderr is [interactive](https://unix.stackexchange.com/a/43389/7678)
+
+It checks that the stream is [TTY](https://jameshfisher.com/2017/12/09/what-is-a-tty/), not a dumb terminal, and not running in a CI.
+
+This can be useful to decide whether to present interactive UI or animations in the terminal.
+
+
+## Install
+
+```
+$ npm install is-interactive
+```
+
+
+## Usage
+
+```js
+const isInteractive = require('is-interactive');
+
+isInteractive();
+//=> true
+```
+
+
+## API
+
+### isInteractive(options?)
+
+#### options
+
+Type: `object`
+
+##### stream
+
+Type: [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable)<br>
+Default: [`process.stdout`](https://nodejs.org/api/process.html#process_process_stdout)
+
+The stream to check.
+
+
+## FAQ
+
+#### Why are you not using [`ci-info`](https://github.com/watson/ci-info) for the CI check?
+
+It's silly to have to detect individual CIs. They should identify themselves with the `CI` environment variable, and most do just that. A manually maintained list of detections will easily get out of date. And if a package using `ci-info` doesn't update to the latest version all the time, they will not support certain CIs. It also creates unpredictability as you might assume a CI is not supported and then suddenly it gets supported and you didn't account for that. In addition, some of the manual detections are loose and might cause false-positives which could create hard-to-debug bugs.
+
+#### Why does this even exist? It's just a few lines.
+
+It's not about the number of lines, but rather discoverability and documentation. A lot of people wouldn't even know they need this. Feel free to copy-paste the code if you don't want the dependency. You might also want to read [this blog post](https://blog.sindresorhus.com/small-focused-modules-9238d977a92a).
diff --git a/node_modules/is-typedarray/LICENSE.md b/node_modules/is-typedarray/LICENSE.md
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/node_modules/is-typedarray/LICENSE.md
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+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:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/is-typedarray/README.md b/node_modules/is-typedarray/README.md
new file mode 100644
index 0000000..2752863
--- /dev/null
+++ b/node_modules/is-typedarray/README.md
@@ -0,0 +1,16 @@
+# is-typedarray [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
+
+Detect whether or not an object is a
+[Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays).
+
+## Usage
+
+[![NPM](https://nodei.co/npm/is-typedarray.png)](https://nodei.co/npm/is-typedarray/)
+
+### isTypedArray(array)
+
+Returns `true` when array is a Typed Array, and `false` when it is not.
+
+## License
+
+MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details.
diff --git a/node_modules/is-typedarray/index.js b/node_modules/is-typedarray/index.js
new file mode 100644
index 0000000..5859603
--- /dev/null
+++ b/node_modules/is-typedarray/index.js
@@ -0,0 +1,41 @@
+module.exports = isTypedArray
+isTypedArray.strict = isStrictTypedArray
+isTypedArray.loose = isLooseTypedArray
+
+var toString = Object.prototype.toString
+var names = {
+ '[object Int8Array]': true
+ , '[object Int16Array]': true
+ , '[object Int32Array]': true
+ , '[object Uint8Array]': true
+ , '[object Uint8ClampedArray]': true
+ , '[object Uint16Array]': true
+ , '[object Uint32Array]': true
+ , '[object Float32Array]': true
+ , '[object Float64Array]': true
+}
+
+function isTypedArray(arr) {
+ return (
+ isStrictTypedArray(arr)
+ || isLooseTypedArray(arr)
+ )
+}
+
+function isStrictTypedArray(arr) {
+ return (
+ arr instanceof Int8Array
+ || arr instanceof Int16Array
+ || arr instanceof Int32Array
+ || arr instanceof Uint8Array
+ || arr instanceof Uint8ClampedArray
+ || arr instanceof Uint16Array
+ || arr instanceof Uint32Array
+ || arr instanceof Float32Array
+ || arr instanceof Float64Array
+ )
+}
+
+function isLooseTypedArray(arr) {
+ return names[toString.call(arr)]
+}
diff --git a/node_modules/is-typedarray/package.json b/node_modules/is-typedarray/package.json
new file mode 100644
index 0000000..08b948c
--- /dev/null
+++ b/node_modules/is-typedarray/package.json
@@ -0,0 +1,59 @@
+{
+ "_from": "is-typedarray@^1.0.0",
+ "_id": "is-typedarray@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+ "_location": "/is-typedarray",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-typedarray@^1.0.0",
+ "name": "is-typedarray",
+ "escapedName": "is-typedarray",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/typedarray-to-buffer"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "_shasum": "e479c80858df0c1b11ddda6940f96011fcda4a9a",
+ "_spec": "is-typedarray@^1.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/typedarray-to-buffer",
+ "author": {
+ "name": "Hugh Kennedy",
+ "email": "hughskennedy@gmail.com",
+ "url": "http://hughsk.io/"
+ },
+ "bugs": {
+ "url": "https://github.com/hughsk/is-typedarray/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "Detect whether or not an object is a Typed Array",
+ "devDependencies": {
+ "tape": "^2.13.1"
+ },
+ "homepage": "https://github.com/hughsk/is-typedarray",
+ "keywords": [
+ "typed",
+ "array",
+ "detect",
+ "is",
+ "util"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "is-typedarray",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/hughsk/is-typedarray.git"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "version": "1.0.0"
+}
diff --git a/node_modules/is-typedarray/test.js b/node_modules/is-typedarray/test.js
new file mode 100644
index 0000000..b0c176f
--- /dev/null
+++ b/node_modules/is-typedarray/test.js
@@ -0,0 +1,34 @@
+var test = require('tape')
+var ista = require('./')
+
+test('strict', function(t) {
+ t.ok(ista.strict(new Int8Array), 'Int8Array')
+ t.ok(ista.strict(new Int16Array), 'Int16Array')
+ t.ok(ista.strict(new Int32Array), 'Int32Array')
+ t.ok(ista.strict(new Uint8Array), 'Uint8Array')
+ t.ok(ista.strict(new Uint16Array), 'Uint16Array')
+ t.ok(ista.strict(new Uint32Array), 'Uint32Array')
+ t.ok(ista.strict(new Float32Array), 'Float32Array')
+ t.ok(ista.strict(new Float64Array), 'Float64Array')
+
+ t.ok(!ista.strict(new Array), 'Array')
+ t.ok(!ista.strict([]), '[]')
+
+ t.end()
+})
+
+test('loose', function(t) {
+ t.ok(ista.loose(new Int8Array), 'Int8Array')
+ t.ok(ista.loose(new Int16Array), 'Int16Array')
+ t.ok(ista.loose(new Int32Array), 'Int32Array')
+ t.ok(ista.loose(new Uint8Array), 'Uint8Array')
+ t.ok(ista.loose(new Uint16Array), 'Uint16Array')
+ t.ok(ista.loose(new Uint32Array), 'Uint32Array')
+ t.ok(ista.loose(new Float32Array), 'Float32Array')
+ t.ok(ista.loose(new Float64Array), 'Float64Array')
+
+ t.ok(!ista.loose(new Array), 'Array')
+ t.ok(!ista.loose([]), '[]')
+
+ t.end()
+})
diff --git a/node_modules/log-symbols/browser.js b/node_modules/log-symbols/browser.js
new file mode 100644
index 0000000..a66f8ec
--- /dev/null
+++ b/node_modules/log-symbols/browser.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = {
+ info: 'ℹ️',
+ success: '✅',
+ warning: '⚠️',
+ error: '❌️'
+};
diff --git a/node_modules/log-symbols/index.d.ts b/node_modules/log-symbols/index.d.ts
new file mode 100644
index 0000000..4d3b7d1
--- /dev/null
+++ b/node_modules/log-symbols/index.d.ts
@@ -0,0 +1,25 @@
+/**
+Colored symbols for various log levels.
+
+Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).
+
+@example
+```
+import logSymbols = require('log-symbols');
+
+console.log(logSymbols.success, 'Finished successfully!');
+// On good OSes: ✔ Finished successfully!
+// On Windows: √ Finished successfully!
+```
+*/
+declare const logSymbols: {
+ readonly info: string;
+
+ readonly success: string;
+
+ readonly warning: string;
+
+ readonly error: string;
+};
+
+export = logSymbols;
diff --git a/node_modules/log-symbols/index.js b/node_modules/log-symbols/index.js
new file mode 100644
index 0000000..247bb59
--- /dev/null
+++ b/node_modules/log-symbols/index.js
@@ -0,0 +1,20 @@
+'use strict';
+const chalk = require('chalk');
+
+const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color';
+
+const main = {
+ info: chalk.blue('ℹ'),
+ success: chalk.green('✔'),
+ warning: chalk.yellow('⚠'),
+ error: chalk.red('✖')
+};
+
+const fallbacks = {
+ info: chalk.blue('i'),
+ success: chalk.green('√'),
+ warning: chalk.yellow('‼'),
+ error: chalk.red('×')
+};
+
+module.exports = isSupported ? main : fallbacks;
diff --git a/node_modules/log-symbols/license b/node_modules/log-symbols/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/log-symbols/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/log-symbols/package.json b/node_modules/log-symbols/package.json
new file mode 100644
index 0000000..4ad9ca9
--- /dev/null
+++ b/node_modules/log-symbols/package.json
@@ -0,0 +1,85 @@
+{
+ "_args": [
+ [
+ "log-symbols@4.0.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "log-symbols@4.0.0",
+ "_id": "log-symbols@4.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==",
+ "_location": "/log-symbols",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "log-symbols@4.0.0",
+ "name": "log-symbols",
+ "escapedName": "log-symbols",
+ "rawSpec": "4.0.0",
+ "saveSpec": null,
+ "fetchSpec": "4.0.0"
+ },
+ "_requiredBy": [
+ "/ora"
+ ],
+ "_resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz",
+ "_spec": "4.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "browser": "browser.js",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/log-symbols/issues"
+ },
+ "dependencies": {
+ "chalk": "^4.0.0"
+ },
+ "description": "Colored symbols for various log levels. Example: `✔︎ Success`",
+ "devDependencies": {
+ "ava": "^3.7.1",
+ "strip-ansi": "^6.0.0",
+ "tsd": "^0.11.0",
+ "xo": "^0.30.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "browser.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/log-symbols#readme",
+ "keywords": [
+ "unicode",
+ "cli",
+ "cmd",
+ "command-line",
+ "characters",
+ "symbol",
+ "symbols",
+ "figure",
+ "figures",
+ "fallback",
+ "windows",
+ "log",
+ "logging",
+ "terminal",
+ "stdout"
+ ],
+ "license": "MIT",
+ "name": "log-symbols",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/log-symbols.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "4.0.0"
+}
diff --git a/node_modules/log-symbols/readme.md b/node_modules/log-symbols/readme.md
new file mode 100644
index 0000000..9c34cc8
--- /dev/null
+++ b/node_modules/log-symbols/readme.md
@@ -0,0 +1,51 @@
+# log-symbols [![Build Status](https://travis-ci.com/sindresorhus/log-symbols.svg?branch=master)](https://travis-ci.com/sindresorhus/log-symbols)
+
+<img src="screenshot.png" width="226" height="192" align="right">
+
+> Colored symbols for various log levels
+
+Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).
+
+## Install
+
+```
+$ npm install log-symbols
+```
+
+## Usage
+
+```js
+const logSymbols = require('log-symbols');
+
+console.log(logSymbols.success, 'Finished successfully!');
+// On good OSes: ✔ Finished successfully!
+// On Windows: √ Finished successfully!
+```
+
+## API
+
+### logSymbols
+
+#### info
+#### success
+#### warning
+#### error
+
+## Related
+
+- [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows CMD fallbacks
+- [py-log-symbols](https://github.com/ManrajGrover/py-log-symbols) - Python port
+- [log-symbols](https://github.com/palash25/log-symbols) - Ruby port
+- [guumaster/logsymbols](https://github.com/guumaster/logsymbols) - Golang port
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-log-symbols?utm_source=npm-log-symbols&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
diff --git a/node_modules/mime/CHANGELOG.md b/node_modules/mime/CHANGELOG.md
new file mode 100644
index 0000000..968fabe
--- /dev/null
+++ b/node_modules/mime/CHANGELOG.md
@@ -0,0 +1,268 @@
+# Changelog
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+### [2.4.6](https://github.com/broofa/mime/compare/v2.4.5...v2.4.6) (2020-05-27)
+
+
+### Bug Fixes
+
+* add cli.js to package.json files ([#237](https://github.com/broofa/mime/issues/237)) ([6c070bc](https://github.com/broofa/mime/commit/6c070bc298fa12a48e2ed126fbb9de641a1e7ebc))
+
+### [2.4.5](https://github.com/broofa/mime/compare/v2.4.4...v2.4.5) (2020-05-01)
+
+
+### Bug Fixes
+
+* fix [#236](https://github.com/broofa/mime/issues/236) ([7f4ecd0](https://github.com/broofa/mime/commit/7f4ecd0d850ed22c9e3bfda2c11fc74e4dde12a7))
+* update to latest mime-db ([c5cb3f2](https://github.com/broofa/mime/commit/c5cb3f2ab8b07642a066efbde1142af1b90c927b))
+
+### [2.4.4](https://github.com/broofa/mime/compare/v2.4.3...v2.4.4) (2019-06-07)
+
+
+
+### [2.4.3](https://github.com/broofa/mime/compare/v2.4.2...v2.4.3) (2019-05-15)
+
+
+
+### [2.4.2](https://github.com/broofa/mime/compare/v2.4.1...v2.4.2) (2019-04-07)
+
+
+### Bug Fixes
+
+* don't use arrow function introduced in 2.4.1 ([2e00b5c](https://github.com/broofa/mime/commit/2e00b5c))
+
+
+
+### [2.4.1](https://github.com/broofa/mime/compare/v2.4.0...v2.4.1) (2019-04-03)
+
+
+### Bug Fixes
+
+* update MDN and mime-db types ([3e567a9](https://github.com/broofa/mime/commit/3e567a9))
+
+
+
+# [2.4.0](https://github.com/broofa/mime/compare/v2.3.1...v2.4.0) (2018-11-26)
+
+
+### Features
+
+* Bind exported methods ([9d2a7b8](https://github.com/broofa/mime/commit/9d2a7b8))
+* update to mime-db@1.37.0 ([49e6e41](https://github.com/broofa/mime/commit/49e6e41))
+
+
+
+### [2.3.1](https://github.com/broofa/mime/compare/v2.3.0...v2.3.1) (2018-04-11)
+
+
+### Bug Fixes
+
+* fix [#198](https://github.com/broofa/mime/issues/198) ([25ca180](https://github.com/broofa/mime/commit/25ca180))
+
+
+
+# [2.3.0](https://github.com/broofa/mime/compare/v2.2.2...v2.3.0) (2018-04-11)
+
+
+### Bug Fixes
+
+* fix [#192](https://github.com/broofa/mime/issues/192) ([5c35df6](https://github.com/broofa/mime/commit/5c35df6))
+
+
+### Features
+
+* add travis-ci testing ([d64160f](https://github.com/broofa/mime/commit/d64160f))
+
+
+
+### [2.2.2](https://github.com/broofa/mime/compare/v2.2.1...v2.2.2) (2018-03-30)
+
+
+### Bug Fixes
+
+* update types files to mime-db@1.32.0 ([85aac16](https://github.com/broofa/mime/commit/85aac16))
+
+
+### [2.2.1](https://github.com/broofa/mime/compare/v2.2.0...v2.2.1) (2018-03-30)
+
+
+### Bug Fixes
+
+* Retain type->extension mappings for non-default types. Fixes [#180](https://github.com/broofa/mime/issues/180) ([b5c83fb](https://github.com/broofa/mime/commit/b5c83fb))
+
+
+
+# [2.2.0](https://github.com/broofa/mime/compare/v2.1.0...v2.2.0) (2018-01-04)
+
+
+### Features
+
+* Retain type->extension mappings for non-default types. Fixes [#180](https://github.com/broofa/mime/issues/180) ([10f82ac](https://github.com/broofa/mime/commit/10f82ac))
+
+
+
+# [2.1.0](https://github.com/broofa/mime/compare/v2.0.5...v2.1.0) (2017-12-22)
+
+
+### Features
+
+* Upgrade to mime-db@1.32.0. Fixes [#185](https://github.com/broofa/mime/issues/185) ([3f775ba](https://github.com/broofa/mime/commit/3f775ba))
+
+
+
+### [2.0.5](https://github.com/broofa/mime/compare/v2.0.1...v2.0.5) (2017-12-22)
+
+
+### Bug Fixes
+
+* ES5 support (back to node v0.4) ([f14ccb6](https://github.com/broofa/mime/commit/f14ccb6))
+
+
+
+# Changelog
+
+### v2.0.4 (24/11/2017)
+- [**closed**] Switch to mime-score module for resolving extension contention issues. [#182](https://github.com/broofa/mime/issues/182)
+- [**closed**] Update mime-db to 1.31.0 in v1.x branch [#181](https://github.com/broofa/mime/issues/181)
+
+---
+
+## v1.5.0 (22/11/2017)
+- [**closed**] need ES5 version ready in npm package [#179](https://github.com/broofa/mime/issues/179)
+- [**closed**] mime-db no trace of iWork - pages / numbers / etc. [#178](https://github.com/broofa/mime/issues/178)
+- [**closed**] How it works in brownser ? [#176](https://github.com/broofa/mime/issues/176)
+- [**closed**] Missing `./Mime` [#175](https://github.com/broofa/mime/issues/175)
+- [**closed**] Vulnerable Regular Expression [#167](https://github.com/broofa/mime/issues/167)
+
+---
+
+### v2.0.3 (25/09/2017)
+*No changelog for this release.*
+
+---
+
+### v1.4.1 (25/09/2017)
+- [**closed**] Issue when bundling with webpack [#172](https://github.com/broofa/mime/issues/172)
+
+---
+
+### v2.0.2 (15/09/2017)
+- [**V2**] fs.readFileSync is not a function [#165](https://github.com/broofa/mime/issues/165)
+- [**closed**] The extension for video/quicktime should map to .mov, not .qt [#164](https://github.com/broofa/mime/issues/164)
+- [**V2**] [v2 Feedback request] Mime class API [#163](https://github.com/broofa/mime/issues/163)
+- [**V2**] [v2 Feedback request] Resolving conflicts over extensions [#162](https://github.com/broofa/mime/issues/162)
+- [**V2**] Allow callers to load module with official, full, or no defined types. [#161](https://github.com/broofa/mime/issues/161)
+- [**V2**] Use "facets" to resolve extension conflicts [#160](https://github.com/broofa/mime/issues/160)
+- [**V2**] Remove fs and path dependencies [#152](https://github.com/broofa/mime/issues/152)
+- [**V2**] Default content-type should not be application/octet-stream [#139](https://github.com/broofa/mime/issues/139)
+- [**V2**] reset mime-types [#124](https://github.com/broofa/mime/issues/124)
+- [**V2**] Extensionless paths should return null or false [#113](https://github.com/broofa/mime/issues/113)
+
+---
+
+### v2.0.1 (14/09/2017)
+- [**closed**] Changelog for v2.0 does not mention breaking changes [#171](https://github.com/broofa/mime/issues/171)
+- [**closed**] MIME breaking with 'class' declaration as it is without 'use strict mode' [#170](https://github.com/broofa/mime/issues/170)
+
+---
+
+## v2.0.0 (12/09/2017)
+- [**closed**] woff and woff2 [#168](https://github.com/broofa/mime/issues/168)
+
+---
+
+## v1.4.0 (28/08/2017)
+- [**closed**] support for ac3 voc files [#159](https://github.com/broofa/mime/issues/159)
+- [**closed**] Help understanding change from application/xml to text/xml [#158](https://github.com/broofa/mime/issues/158)
+- [**closed**] no longer able to override mimetype [#157](https://github.com/broofa/mime/issues/157)
+- [**closed**] application/vnd.adobe.photoshop [#147](https://github.com/broofa/mime/issues/147)
+- [**closed**] Directories should appear as something other than application/octet-stream [#135](https://github.com/broofa/mime/issues/135)
+- [**closed**] requested features [#131](https://github.com/broofa/mime/issues/131)
+- [**closed**] Make types.json loading optional? [#129](https://github.com/broofa/mime/issues/129)
+- [**closed**] Cannot find module './types.json' [#120](https://github.com/broofa/mime/issues/120)
+- [**V2**] .wav files show up as "audio/x-wav" instead of "audio/x-wave" [#118](https://github.com/broofa/mime/issues/118)
+- [**closed**] Don't be a pain in the ass for node community [#108](https://github.com/broofa/mime/issues/108)
+- [**closed**] don't make default_type global [#78](https://github.com/broofa/mime/issues/78)
+- [**closed**] mime.extension() fails if the content-type is parameterized [#74](https://github.com/broofa/mime/issues/74)
+
+---
+
+### v1.3.6 (11/05/2017)
+- [**closed**] .md should be text/markdown as of March 2016 [#154](https://github.com/broofa/mime/issues/154)
+- [**closed**] Error while installing mime [#153](https://github.com/broofa/mime/issues/153)
+- [**closed**] application/manifest+json [#149](https://github.com/broofa/mime/issues/149)
+- [**closed**] Dynamic adaptive streaming over HTTP (DASH) file extension typo [#141](https://github.com/broofa/mime/issues/141)
+- [**closed**] charsets image/png undefined [#140](https://github.com/broofa/mime/issues/140)
+- [**closed**] Mime-db dependency out of date [#130](https://github.com/broofa/mime/issues/130)
+- [**closed**] how to support plist? [#126](https://github.com/broofa/mime/issues/126)
+- [**closed**] how does .types file format look like? [#123](https://github.com/broofa/mime/issues/123)
+- [**closed**] Feature: support for expanding MIME patterns [#121](https://github.com/broofa/mime/issues/121)
+- [**closed**] DEBUG_MIME doesn't work [#117](https://github.com/broofa/mime/issues/117)
+
+---
+
+### v1.3.4 (06/02/2015)
+*No changelog for this release.*
+
+---
+
+### v1.3.3 (06/02/2015)
+*No changelog for this release.*
+
+---
+
+### v1.3.1 (05/02/2015)
+- [**closed**] Consider adding support for Handlebars .hbs file ending [#111](https://github.com/broofa/mime/issues/111)
+- [**closed**] Consider adding support for hjson. [#110](https://github.com/broofa/mime/issues/110)
+- [**closed**] Add mime type for Opus audio files [#94](https://github.com/broofa/mime/issues/94)
+- [**closed**] Consider making the `Requesting New Types` information more visible [#77](https://github.com/broofa/mime/issues/77)
+
+---
+
+## v1.3.0 (05/02/2015)
+- [**closed**] Add common name? [#114](https://github.com/broofa/mime/issues/114)
+- [**closed**] application/x-yaml [#104](https://github.com/broofa/mime/issues/104)
+- [**closed**] Add mime type for WOFF file format 2.0 [#102](https://github.com/broofa/mime/issues/102)
+- [**closed**] application/x-msi for .msi [#99](https://github.com/broofa/mime/issues/99)
+- [**closed**] Add mimetype for gettext translation files [#98](https://github.com/broofa/mime/issues/98)
+- [**closed**] collaborators [#88](https://github.com/broofa/mime/issues/88)
+- [**closed**] getting errot in installation of mime module...any1 can help? [#87](https://github.com/broofa/mime/issues/87)
+- [**closed**] should application/json's charset be utf8? [#86](https://github.com/broofa/mime/issues/86)
+- [**closed**] Add "license" and "licenses" to package.json [#81](https://github.com/broofa/mime/issues/81)
+- [**closed**] lookup with extension-less file on Windows returns wrong type [#68](https://github.com/broofa/mime/issues/68)
+
+---
+
+### v1.2.11 (15/08/2013)
+- [**closed**] Update mime.types [#65](https://github.com/broofa/mime/issues/65)
+- [**closed**] Publish a new version [#63](https://github.com/broofa/mime/issues/63)
+- [**closed**] README should state upfront that "application/octet-stream" is default for unknown extension [#55](https://github.com/broofa/mime/issues/55)
+- [**closed**] Suggested improvement to the charset API [#52](https://github.com/broofa/mime/issues/52)
+
+---
+
+### v1.2.10 (25/07/2013)
+- [**closed**] Mime type for woff files should be application/font-woff and not application/x-font-woff [#62](https://github.com/broofa/mime/issues/62)
+- [**closed**] node.types in conflict with mime.types [#51](https://github.com/broofa/mime/issues/51)
+
+---
+
+### v1.2.9 (17/01/2013)
+- [**closed**] Please update "mime" NPM [#49](https://github.com/broofa/mime/issues/49)
+- [**closed**] Please add semicolon [#46](https://github.com/broofa/mime/issues/46)
+- [**closed**] parse full mime types [#43](https://github.com/broofa/mime/issues/43)
+
+---
+
+### v1.2.8 (10/01/2013)
+- [**closed**] /js directory mime is application/javascript. Is it correct? [#47](https://github.com/broofa/mime/issues/47)
+- [**closed**] Add mime types for lua code. [#45](https://github.com/broofa/mime/issues/45)
+
+---
+
+### v1.2.7 (19/10/2012)
+- [**closed**] cannot install 1.2.7 via npm [#41](https://github.com/broofa/mime/issues/41)
+- [**closed**] Transfer ownership to @broofa [#36](https://github.com/broofa/mime/issues/36)
+- [**closed**] it's wrong to set charset to UTF-8 for text [#30](https://github.com/broofa/mime/issues/30)
+- [**closed**] Allow multiple instances of MIME types container [#27](https://github.com/broofa/mime/issues/27)
diff --git a/node_modules/mime/LICENSE b/node_modules/mime/LICENSE
new file mode 100644
index 0000000..d3f46f7
--- /dev/null
+++ b/node_modules/mime/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/mime/Mime.js b/node_modules/mime/Mime.js
new file mode 100644
index 0000000..7fe3921
--- /dev/null
+++ b/node_modules/mime/Mime.js
@@ -0,0 +1,95 @@
+'use strict';
+
+/**
+ * @param typeMap [Object] Map of MIME type -> Array[extensions]
+ * @param ...
+ */
+function Mime() {
+ this._types = Object.create(null);
+ this._extensions = Object.create(null);
+
+ for (var i = 0; i < arguments.length; i++) {
+ this.define(arguments[i]);
+ }
+
+ this.define = this.define.bind(this);
+ this.getType = this.getType.bind(this);
+ this.getExtension = this.getExtension.bind(this);
+}
+
+/**
+ * Define mimetype -> extension mappings. Each key is a mime-type that maps
+ * to an array of extensions associated with the type. The first extension is
+ * used as the default extension for the type.
+ *
+ * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
+ *
+ * If a type declares an extension that has already been defined, an error will
+ * be thrown. To suppress this error and force the extension to be associated
+ * with the new type, pass `force`=true. Alternatively, you may prefix the
+ * extension with "*" to map the type to extension, without mapping the
+ * extension to the type.
+ *
+ * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']});
+ *
+ *
+ * @param map (Object) type definitions
+ * @param force (Boolean) if true, force overriding of existing definitions
+ */
+Mime.prototype.define = function(typeMap, force) {
+ for (var type in typeMap) {
+ var extensions = typeMap[type].map(function(t) {return t.toLowerCase()});
+ type = type.toLowerCase();
+
+ for (var i = 0; i < extensions.length; i++) {
+ var ext = extensions[i];
+
+ // '*' prefix = not the preferred type for this extension. So fixup the
+ // extension, and skip it.
+ if (ext[0] == '*') {
+ continue;
+ }
+
+ if (!force && (ext in this._types)) {
+ throw new Error(
+ 'Attempt to change mapping for "' + ext +
+ '" extension from "' + this._types[ext] + '" to "' + type +
+ '". Pass `force=true` to allow this, otherwise remove "' + ext +
+ '" from the list of extensions for "' + type + '".'
+ );
+ }
+
+ this._types[ext] = type;
+ }
+
+ // Use first extension as default
+ if (force || !this._extensions[type]) {
+ var ext = extensions[0];
+ this._extensions[type] = (ext[0] != '*') ? ext : ext.substr(1)
+ }
+ }
+};
+
+/**
+ * Lookup a mime type based on extension
+ */
+Mime.prototype.getType = function(path) {
+ path = String(path);
+ var last = path.replace(/^.*[/\\]/, '').toLowerCase();
+ var ext = last.replace(/^.*\./, '').toLowerCase();
+
+ var hasPath = last.length < path.length;
+ var hasDot = ext.length < last.length - 1;
+
+ return (hasDot || !hasPath) && this._types[ext] || null;
+};
+
+/**
+ * Return file extension associated with a mime type
+ */
+Mime.prototype.getExtension = function(type) {
+ type = /^\s*([^;\s]*)/.test(type) && RegExp.$1;
+ return type && this._extensions[type.toLowerCase()] || null;
+};
+
+module.exports = Mime;
diff --git a/node_modules/mime/README.md b/node_modules/mime/README.md
new file mode 100644
index 0000000..81c5749
--- /dev/null
+++ b/node_modules/mime/README.md
@@ -0,0 +1,187 @@
+<!--
+ -- This file is auto-generated from src/README_js.md. Changes should be made there.
+ -->
+# Mime
+
+A comprehensive, compact MIME type module.
+
+[![Build Status](https://travis-ci.org/broofa/mime.svg?branch=master)](https://travis-ci.org/broofa/mime)
+
+## Version 2 Notes
+
+Version 2 is a breaking change from 1.x as the semver implies. Specifically:
+
+* `lookup()` renamed to `getType()`
+* `extension()` renamed to `getExtension()`
+* `charset()` and `load()` methods have been removed
+
+If you prefer the legacy version of this module please `npm install mime@^1`. Version 1 docs may be found [here](https://github.com/broofa/mime/tree/v1.4.0).
+
+## Install
+
+### NPM
+```
+npm install mime
+```
+
+### Browser
+
+It is recommended that you use a bundler such as
+[webpack](https://webpack.github.io/) or [browserify](http://browserify.org/) to
+package your code. However, browser-ready versions are available via wzrd.in.
+E.g. For the full version:
+
+ <script src="https://wzrd.in/standalone/mime@latest"></script>
+ <script>
+ mime.getType(...); // etc.
+ <script>
+
+Or, for the `mime/lite` version:
+
+ <script src="https://wzrd.in/standalone/mime%2flite@latest"></script>
+ <script>
+ mimelite.getType(...); // (Note `mimelite` here)
+ <script>
+
+## Quick Start
+
+For the full version (800+ MIME types, 1,000+ extensions):
+
+```javascript
+const mime = require('mime');
+
+mime.getType('txt'); // ⇨ 'text/plain'
+mime.getExtension('text/plain'); // ⇨ 'txt'
+```
+
+See [Mime API](#mime-api) below for API details.
+
+## Lite Version
+
+There is also a "lite" version of this module that omits vendor-specific
+(`*/vnd.*`) and experimental (`*/x-*`) types. It weighs in at ~2.5KB, compared
+to 8KB for the full version. To load the lite version:
+
+```javascript
+const mime = require('mime/lite');
+```
+
+## Mime .vs. mime-types .vs. mime-db modules
+
+For those of you wondering about the difference between these [popular] NPM modules,
+here's a brief rundown ...
+
+[`mime-db`](https://github.com/jshttp/mime-db) is "the source of
+truth" for MIME type information. It is not an API. Rather, it is a canonical
+dataset of mime type definitions pulled from IANA, Apache, NGINX, and custom mappings
+submitted by the Node.js community.
+
+[`mime-types`](https://github.com/jshttp/mime-types) is a thin
+wrapper around mime-db that provides an API drop-in compatible(ish) with `mime @ < v1.3.6` API.
+
+`mime` is, as of v2, a self-contained module bundled with a pre-optimized version
+of the `mime-db` dataset. It provides a simplified API with the following characteristics:
+
+* Intelligently resolved type conflicts (See [mime-score](https://github.com/broofa/mime-score) for details)
+* Method naming consistent with industry best-practices
+* Compact footprint. E.g. The minified+compressed sizes of the various modules:
+
+Module | Size
+--- | ---
+`mime-db` | 18 KB
+`mime-types` | same as mime-db
+`mime` | 8 KB
+`mime/lite` | 2 KB
+
+## Mime API
+
+Both `require('mime')` and `require('mime/lite')` return instances of the MIME
+class, documented below.
+
+Note: Inputs to this API are case-insensitive. Outputs (returned values) will
+be lowercase.
+
+### new Mime(typeMap, ... more maps)
+
+Most users of this module will not need to create Mime instances directly.
+However if you would like to create custom mappings, you may do so as follows
+...
+
+```javascript
+// Require Mime class
+const Mime = require('mime/Mime');
+
+// Define mime type -> extensions map
+const typeMap = {
+ 'text/abc': ['abc', 'alpha', 'bet'],
+ 'text/def': ['leppard']
+};
+
+// Create and use Mime instance
+const myMime = new Mime(typeMap);
+myMime.getType('abc'); // ⇨ 'text/abc'
+myMime.getExtension('text/def'); // ⇨ 'leppard'
+```
+
+If more than one map argument is provided, each map is `define()`ed (see below), in order.
+
+### mime.getType(pathOrExtension)
+
+Get mime type for the given path or extension. E.g.
+
+```javascript
+mime.getType('js'); // ⇨ 'application/javascript'
+mime.getType('json'); // ⇨ 'application/json'
+
+mime.getType('txt'); // ⇨ 'text/plain'
+mime.getType('dir/text.txt'); // ⇨ 'text/plain'
+mime.getType('dir\\text.txt'); // ⇨ 'text/plain'
+mime.getType('.text.txt'); // ⇨ 'text/plain'
+mime.getType('.txt'); // ⇨ 'text/plain'
+```
+
+`null` is returned in cases where an extension is not detected or recognized
+
+```javascript
+mime.getType('foo/txt'); // ⇨ null
+mime.getType('bogus_type'); // ⇨ null
+```
+
+### mime.getExtension(type)
+Get extension for the given mime type. Charset options (often included in
+Content-Type headers) are ignored.
+
+```javascript
+mime.getExtension('text/plain'); // ⇨ 'txt'
+mime.getExtension('application/json'); // ⇨ 'json'
+mime.getExtension('text/html; charset=utf8'); // ⇨ 'html'
+```
+
+### mime.define(typeMap[, force = false])
+
+Define [more] type mappings.
+
+`typeMap` is a map of type -> extensions, as documented in `new Mime`, above.
+
+By default this method will throw an error if you try to map a type to an
+extension that is already assigned to another type. Passing `true` for the
+`force` argument will suppress this behavior (overriding any previous mapping).
+
+```javascript
+mime.define({'text/x-abc': ['abc', 'abcd']});
+
+mime.getType('abcd'); // ⇨ 'text/x-abc'
+mime.getExtension('text/x-abc') // ⇨ 'abc'
+```
+
+## Command Line
+
+ mime [path_or_extension]
+
+E.g.
+
+ > mime scripts/jquery.js
+ application/javascript
+
+----
+Markdown generated from [src/README_js.md](src/README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file
diff --git a/node_modules/mime/cli.js b/node_modules/mime/cli.js
new file mode 100644
index 0000000..73e1ce6
--- /dev/null
+++ b/node_modules/mime/cli.js
@@ -0,0 +1,10 @@
+#!/usr/bin/env node
+
+'use strict';
+
+var mime = require('.');
+var file = process.argv[2];
+var type = mime.getType(file);
+
+process.stdout.write(type + '\n');
+
diff --git a/node_modules/mime/index.js b/node_modules/mime/index.js
new file mode 100644
index 0000000..17d3a7a
--- /dev/null
+++ b/node_modules/mime/index.js
@@ -0,0 +1,4 @@
+'use strict';
+
+var Mime = require('./Mime');
+module.exports = new Mime(require('./types/standard'), require('./types/other'));
diff --git a/node_modules/mime/lite.js b/node_modules/mime/lite.js
new file mode 100644
index 0000000..ee6a387
--- /dev/null
+++ b/node_modules/mime/lite.js
@@ -0,0 +1,4 @@
+'use strict';
+
+var Mime = require('./Mime');
+module.exports = new Mime(require('./types/standard'));
diff --git a/node_modules/mime/package.json b/node_modules/mime/package.json
new file mode 100644
index 0000000..b1c544f
--- /dev/null
+++ b/node_modules/mime/package.json
@@ -0,0 +1,84 @@
+{
+ "_args": [
+ [
+ "mime@2.4.6",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "mime@2.4.6",
+ "_id": "mime@2.4.6",
+ "_inBundle": false,
+ "_integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==",
+ "_location": "/mime",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "mime@2.4.6",
+ "name": "mime",
+ "escapedName": "mime",
+ "rawSpec": "2.4.6",
+ "saveSpec": null,
+ "fetchSpec": "2.4.6"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
+ "_spec": "2.4.6",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ },
+ "bin": {
+ "mime": "cli.js"
+ },
+ "bugs": {
+ "url": "https://github.com/broofa/mime/issues"
+ },
+ "contributors": [],
+ "dependencies": {},
+ "description": "A comprehensive library for mime-type mapping",
+ "devDependencies": {
+ "benchmark": "*",
+ "chalk": "*",
+ "eslint": "*",
+ "mime-db": "1.44.0",
+ "mime-score": "1.2.0",
+ "mime-types": "2.1.27",
+ "mocha": "7.1.2",
+ "runmd": "*",
+ "standard-version": "7.1.0"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ },
+ "files": [
+ "index.js",
+ "lite.js",
+ "Mime.js",
+ "cli.js",
+ "/types"
+ ],
+ "homepage": "https://github.com/broofa/mime#readme",
+ "keywords": [
+ "util",
+ "mime"
+ ],
+ "license": "MIT",
+ "name": "mime",
+ "repository": {
+ "url": "git+https://github.com/broofa/mime.git",
+ "type": "git"
+ },
+ "scripts": {
+ "benchmark": "node src/benchmark.js",
+ "md": "runmd --watch --output README.md src/README_js.md",
+ "prepare": "node src/build.js && runmd --output README.md src/README_js.md",
+ "release": "standard-version",
+ "test": "mocha src/test.js"
+ },
+ "version": "2.4.6"
+}
diff --git a/node_modules/mime/types/other.js b/node_modules/mime/types/other.js
new file mode 100644
index 0000000..8cbd8ce
--- /dev/null
+++ b/node_modules/mime/types/other.js
@@ -0,0 +1 @@
+module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["keynote"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}; \ No newline at end of file
diff --git a/node_modules/mime/types/standard.js b/node_modules/mime/types/standard.js
new file mode 100644
index 0000000..2eadbea
--- /dev/null
+++ b/node_modules/mime/types/standard.js
@@ -0,0 +1 @@
+module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; \ No newline at end of file
diff --git a/node_modules/mimic-fn/index.d.ts b/node_modules/mimic-fn/index.d.ts
new file mode 100644
index 0000000..b4047d5
--- /dev/null
+++ b/node_modules/mimic-fn/index.d.ts
@@ -0,0 +1,54 @@
+declare const mimicFn: {
+ /**
+ Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
+
+ @param to - Mimicking function.
+ @param from - Function to mimic.
+ @returns The modified `to` function.
+
+ @example
+ ```
+ import mimicFn = require('mimic-fn');
+
+ function foo() {}
+ foo.unicorn = '🦄';
+
+ function wrapper() {
+ return foo();
+ }
+
+ console.log(wrapper.name);
+ //=> 'wrapper'
+
+ mimicFn(wrapper, foo);
+
+ console.log(wrapper.name);
+ //=> 'foo'
+
+ console.log(wrapper.unicorn);
+ //=> '🦄'
+ ```
+ */
+ <
+ ArgumentsType extends unknown[],
+ ReturnType,
+ FunctionType extends (...arguments: ArgumentsType) => ReturnType
+ >(
+ to: (...arguments: ArgumentsType) => ReturnType,
+ from: FunctionType
+ ): FunctionType;
+
+ // TODO: Remove this for the next major release, refactor the whole definition to:
+ // declare function mimicFn<
+ // ArgumentsType extends unknown[],
+ // ReturnType,
+ // FunctionType extends (...arguments: ArgumentsType) => ReturnType
+ // >(
+ // to: (...arguments: ArgumentsType) => ReturnType,
+ // from: FunctionType
+ // ): FunctionType;
+ // export = mimicFn;
+ default: typeof mimicFn;
+};
+
+export = mimicFn;
diff --git a/node_modules/mimic-fn/index.js b/node_modules/mimic-fn/index.js
new file mode 100644
index 0000000..1a59705
--- /dev/null
+++ b/node_modules/mimic-fn/index.js
@@ -0,0 +1,13 @@
+'use strict';
+
+const mimicFn = (to, from) => {
+ for (const prop of Reflect.ownKeys(from)) {
+ Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
+ }
+
+ return to;
+};
+
+module.exports = mimicFn;
+// TODO: Remove this for the next major release
+module.exports.default = mimicFn;
diff --git a/node_modules/mimic-fn/license b/node_modules/mimic-fn/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/mimic-fn/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/mimic-fn/package.json b/node_modules/mimic-fn/package.json
new file mode 100644
index 0000000..909fa69
--- /dev/null
+++ b/node_modules/mimic-fn/package.json
@@ -0,0 +1,77 @@
+{
+ "_args": [
+ [
+ "mimic-fn@2.1.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "mimic-fn@2.1.0",
+ "_id": "mimic-fn@2.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "_location": "/mimic-fn",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "mimic-fn@2.1.0",
+ "name": "mimic-fn",
+ "escapedName": "mimic-fn",
+ "rawSpec": "2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "2.1.0"
+ },
+ "_requiredBy": [
+ "/onetime"
+ ],
+ "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "_spec": "2.1.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/mimic-fn/issues"
+ },
+ "description": "Make a function mimic another one",
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/sindresorhus/mimic-fn#readme",
+ "keywords": [
+ "function",
+ "mimic",
+ "imitate",
+ "rename",
+ "copy",
+ "inherit",
+ "properties",
+ "name",
+ "func",
+ "fn",
+ "set",
+ "infer",
+ "change"
+ ],
+ "license": "MIT",
+ "name": "mimic-fn",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/mimic-fn.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "2.1.0"
+}
diff --git a/node_modules/mimic-fn/readme.md b/node_modules/mimic-fn/readme.md
new file mode 100644
index 0000000..0ef8a13
--- /dev/null
+++ b/node_modules/mimic-fn/readme.md
@@ -0,0 +1,69 @@
+# mimic-fn [![Build Status](https://travis-ci.org/sindresorhus/mimic-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-fn)
+
+> Make a function mimic another one
+
+Useful when you wrap a function in another function and like to preserve the original name and other properties.
+
+
+## Install
+
+```
+$ npm install mimic-fn
+```
+
+
+## Usage
+
+```js
+const mimicFn = require('mimic-fn');
+
+function foo() {}
+foo.unicorn = '🦄';
+
+function wrapper() {
+ return foo();
+}
+
+console.log(wrapper.name);
+//=> 'wrapper'
+
+mimicFn(wrapper, foo);
+
+console.log(wrapper.name);
+//=> 'foo'
+
+console.log(wrapper.unicorn);
+//=> '🦄'
+```
+
+
+## API
+
+It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
+
+### mimicFn(to, from)
+
+Modifies the `to` function and returns it.
+
+#### to
+
+Type: `Function`
+
+Mimicking function.
+
+#### from
+
+Type: `Function`
+
+Function to mimic.
+
+
+## Related
+
+- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
+- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/mkdirp-classic/LICENSE b/node_modules/mkdirp-classic/LICENSE
new file mode 100644
index 0000000..f6b3a0d
--- /dev/null
+++ b/node_modules/mkdirp-classic/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 James Halliday (mail@substack.net) and Mathias Buus
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/mkdirp-classic/README.md b/node_modules/mkdirp-classic/README.md
new file mode 100644
index 0000000..be5ac93
--- /dev/null
+++ b/node_modules/mkdirp-classic/README.md
@@ -0,0 +1,18 @@
+# mkdirp-classic
+
+Just a non-deprecated mirror of [mkdirp 0.5.2](https://github.com/substack/node-mkdirp/tree/0.5.1)
+for use in modules where we depend on the non promise interface.
+
+```
+npm install mkdirp-classic
+```
+
+## Usage
+
+``` js
+// See the above link
+```
+
+## License
+
+MIT
diff --git a/node_modules/mkdirp-classic/index.js b/node_modules/mkdirp-classic/index.js
new file mode 100644
index 0000000..6ce241b
--- /dev/null
+++ b/node_modules/mkdirp-classic/index.js
@@ -0,0 +1,98 @@
+var path = require('path');
+var fs = require('fs');
+var _0777 = parseInt('0777', 8);
+
+module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
+
+function mkdirP (p, opts, f, made) {
+ if (typeof opts === 'function') {
+ f = opts;
+ opts = {};
+ }
+ else if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = _0777 & (~process.umask());
+ }
+ if (!made) made = null;
+
+ var cb = f || function () {};
+ p = path.resolve(p);
+
+ xfs.mkdir(p, mode, function (er) {
+ if (!er) {
+ made = made || p;
+ return cb(null, made);
+ }
+ switch (er.code) {
+ case 'ENOENT':
+ mkdirP(path.dirname(p), opts, function (er, made) {
+ if (er) cb(er, made);
+ else mkdirP(p, opts, cb, made);
+ });
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ xfs.stat(p, function (er2, stat) {
+ // if the stat fails, then that's super weird.
+ // let the original error be the failure reason.
+ if (er2 || !stat.isDirectory()) cb(er, made)
+ else cb(null, made);
+ });
+ break;
+ }
+ });
+}
+
+mkdirP.sync = function sync (p, opts, made) {
+ if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = _0777 & (~process.umask());
+ }
+ if (!made) made = null;
+
+ p = path.resolve(p);
+
+ try {
+ xfs.mkdirSync(p, mode);
+ made = made || p;
+ }
+ catch (err0) {
+ switch (err0.code) {
+ case 'ENOENT' :
+ made = sync(path.dirname(p), opts, made);
+ sync(p, opts, made);
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ var stat;
+ try {
+ stat = xfs.statSync(p);
+ }
+ catch (err1) {
+ throw err0;
+ }
+ if (!stat.isDirectory()) throw err0;
+ break;
+ }
+ }
+
+ return made;
+};
diff --git a/node_modules/mkdirp-classic/package.json b/node_modules/mkdirp-classic/package.json
new file mode 100644
index 0000000..a3f8ba7
--- /dev/null
+++ b/node_modules/mkdirp-classic/package.json
@@ -0,0 +1,49 @@
+{
+ "_args": [
+ [
+ "mkdirp-classic@0.5.3",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "mkdirp-classic@0.5.3",
+ "_id": "mkdirp-classic@0.5.3",
+ "_inBundle": false,
+ "_integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
+ "_location": "/mkdirp-classic",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "mkdirp-classic@0.5.3",
+ "name": "mkdirp-classic",
+ "escapedName": "mkdirp-classic",
+ "rawSpec": "0.5.3",
+ "saveSpec": null,
+ "fetchSpec": "0.5.3"
+ },
+ "_requiredBy": [
+ "/tar-fs"
+ ],
+ "_resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
+ "_spec": "0.5.3",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Mathias Buus",
+ "url": "@mafintosh"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/mkdirp-classic/issues"
+ },
+ "dependencies": {},
+ "description": "Mirror of mkdirp 0.5.2",
+ "devDependencies": {},
+ "homepage": "https://github.com/mafintosh/mkdirp-classic",
+ "license": "MIT",
+ "main": "index.js",
+ "name": "mkdirp-classic",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/mkdirp-classic.git"
+ },
+ "version": "0.5.3"
+}
diff --git a/node_modules/mute-stream/LICENSE b/node_modules/mute-stream/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/mute-stream/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/mute-stream/README.md b/node_modules/mute-stream/README.md
new file mode 100644
index 0000000..8ab1238
--- /dev/null
+++ b/node_modules/mute-stream/README.md
@@ -0,0 +1,68 @@
+# mute-stream
+
+Bytes go in, but they don't come out (when muted).
+
+This is a basic pass-through stream, but when muted, the bytes are
+silently dropped, rather than being passed through.
+
+## Usage
+
+```javascript
+var MuteStream = require('mute-stream')
+
+var ms = new MuteStream(options)
+
+ms.pipe(process.stdout)
+ms.write('foo') // writes 'foo' to stdout
+ms.mute()
+ms.write('bar') // does not write 'bar'
+ms.unmute()
+ms.write('baz') // writes 'baz' to stdout
+
+// can also be used to mute incoming data
+var ms = new MuteStream
+input.pipe(ms)
+
+ms.on('data', function (c) {
+ console.log('data: ' + c)
+})
+
+input.emit('data', 'foo') // logs 'foo'
+ms.mute()
+input.emit('data', 'bar') // does not log 'bar'
+ms.unmute()
+input.emit('data', 'baz') // logs 'baz'
+```
+
+## Options
+
+All options are optional.
+
+* `replace` Set to a string to replace each character with the
+ specified string when muted. (So you can show `****` instead of the
+ password, for example.)
+
+* `prompt` If you are using a replacement char, and also using a
+ prompt with a readline stream (as for a `Password: *****` input),
+ then specify what the prompt is so that backspace will work
+ properly. Otherwise, pressing backspace will overwrite the prompt
+ with the replacement character, which is weird.
+
+## ms.mute()
+
+Set `muted` to `true`. Turns `.write()` into a no-op.
+
+## ms.unmute()
+
+Set `muted` to `false`
+
+## ms.isTTY
+
+True if the pipe destination is a TTY, or if the incoming pipe source is
+a TTY.
+
+## Other stream methods...
+
+The other standard readable and writable stream methods are all
+available. The MuteStream object acts as a facade to its pipe source
+and destination.
diff --git a/node_modules/mute-stream/mute.js b/node_modules/mute-stream/mute.js
new file mode 100644
index 0000000..a24fc09
--- /dev/null
+++ b/node_modules/mute-stream/mute.js
@@ -0,0 +1,145 @@
+var Stream = require('stream')
+
+module.exports = MuteStream
+
+// var out = new MuteStream(process.stdout)
+// argument auto-pipes
+function MuteStream (opts) {
+ Stream.apply(this)
+ opts = opts || {}
+ this.writable = this.readable = true
+ this.muted = false
+ this.on('pipe', this._onpipe)
+ this.replace = opts.replace
+
+ // For readline-type situations
+ // This much at the start of a line being redrawn after a ctrl char
+ // is seen (such as backspace) won't be redrawn as the replacement
+ this._prompt = opts.prompt || null
+ this._hadControl = false
+}
+
+MuteStream.prototype = Object.create(Stream.prototype)
+
+Object.defineProperty(MuteStream.prototype, 'constructor', {
+ value: MuteStream,
+ enumerable: false
+})
+
+MuteStream.prototype.mute = function () {
+ this.muted = true
+}
+
+MuteStream.prototype.unmute = function () {
+ this.muted = false
+}
+
+Object.defineProperty(MuteStream.prototype, '_onpipe', {
+ value: onPipe,
+ enumerable: false,
+ writable: true,
+ configurable: true
+})
+
+function onPipe (src) {
+ this._src = src
+}
+
+Object.defineProperty(MuteStream.prototype, 'isTTY', {
+ get: getIsTTY,
+ set: setIsTTY,
+ enumerable: true,
+ configurable: true
+})
+
+function getIsTTY () {
+ return( (this._dest) ? this._dest.isTTY
+ : (this._src) ? this._src.isTTY
+ : false
+ )
+}
+
+// basically just get replace the getter/setter with a regular value
+function setIsTTY (isTTY) {
+ Object.defineProperty(this, 'isTTY', {
+ value: isTTY,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ })
+}
+
+Object.defineProperty(MuteStream.prototype, 'rows', {
+ get: function () {
+ return( this._dest ? this._dest.rows
+ : this._src ? this._src.rows
+ : undefined )
+ }, enumerable: true, configurable: true })
+
+Object.defineProperty(MuteStream.prototype, 'columns', {
+ get: function () {
+ return( this._dest ? this._dest.columns
+ : this._src ? this._src.columns
+ : undefined )
+ }, enumerable: true, configurable: true })
+
+
+MuteStream.prototype.pipe = function (dest, options) {
+ this._dest = dest
+ return Stream.prototype.pipe.call(this, dest, options)
+}
+
+MuteStream.prototype.pause = function () {
+ if (this._src) return this._src.pause()
+}
+
+MuteStream.prototype.resume = function () {
+ if (this._src) return this._src.resume()
+}
+
+MuteStream.prototype.write = function (c) {
+ if (this.muted) {
+ if (!this.replace) return true
+ if (c.match(/^\u001b/)) {
+ if(c.indexOf(this._prompt) === 0) {
+ c = c.substr(this._prompt.length);
+ c = c.replace(/./g, this.replace);
+ c = this._prompt + c;
+ }
+ this._hadControl = true
+ return this.emit('data', c)
+ } else {
+ if (this._prompt && this._hadControl &&
+ c.indexOf(this._prompt) === 0) {
+ this._hadControl = false
+ this.emit('data', this._prompt)
+ c = c.substr(this._prompt.length)
+ }
+ c = c.toString().replace(/./g, this.replace)
+ }
+ }
+ this.emit('data', c)
+}
+
+MuteStream.prototype.end = function (c) {
+ if (this.muted) {
+ if (c && this.replace) {
+ c = c.toString().replace(/./g, this.replace)
+ } else {
+ c = null
+ }
+ }
+ if (c) this.emit('data', c)
+ this.emit('end')
+}
+
+function proxy (fn) { return function () {
+ var d = this._dest
+ var s = this._src
+ if (d && d[fn]) d[fn].apply(d, arguments)
+ if (s && s[fn]) s[fn].apply(s, arguments)
+}}
+
+MuteStream.prototype.destroy = proxy('destroy')
+MuteStream.prototype.destroySoon = proxy('destroySoon')
+MuteStream.prototype.close = proxy('close')
diff --git a/node_modules/mute-stream/package.json b/node_modules/mute-stream/package.json
new file mode 100644
index 0000000..0c755ab
--- /dev/null
+++ b/node_modules/mute-stream/package.json
@@ -0,0 +1,65 @@
+{
+ "_args": [
+ [
+ "mute-stream@0.0.8",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "mute-stream@0.0.8",
+ "_id": "mute-stream@0.0.8",
+ "_inBundle": false,
+ "_integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
+ "_location": "/mute-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "mute-stream@0.0.8",
+ "name": "mute-stream",
+ "escapedName": "mute-stream",
+ "rawSpec": "0.0.8",
+ "saveSpec": null,
+ "fetchSpec": "0.0.8"
+ },
+ "_requiredBy": [
+ "/ora"
+ ],
+ "_resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+ "_spec": "0.0.8",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/mute-stream/issues"
+ },
+ "description": "Bytes go in, but they don't come out (when muted).",
+ "devDependencies": {
+ "tap": "^12.1.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "mute.js"
+ ],
+ "homepage": "https://github.com/isaacs/mute-stream#readme",
+ "keywords": [
+ "mute",
+ "stream",
+ "pipe"
+ ],
+ "license": "ISC",
+ "main": "mute.js",
+ "name": "mute-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/mute-stream.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js --cov"
+ },
+ "version": "0.0.8"
+}
diff --git a/node_modules/ncp/.npmignore b/node_modules/ncp/.npmignore
new file mode 100644
index 0000000..3e6a4d7
--- /dev/null
+++ b/node_modules/ncp/.npmignore
@@ -0,0 +1,4 @@
+node_modules
+.*.sw[op]
+.DS_Store
+test/*fixtures/out
diff --git a/node_modules/ncp/.travis.yml b/node_modules/ncp/.travis.yml
new file mode 100644
index 0000000..a6e2198
--- /dev/null
+++ b/node_modules/ncp/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+
+node_js:
+ - 0.8
+ - "0.10"
+ - "0.11"
diff --git a/node_modules/ncp/LICENSE.md b/node_modules/ncp/LICENSE.md
new file mode 100644
index 0000000..e2b9b41
--- /dev/null
+++ b/node_modules/ncp/LICENSE.md
@@ -0,0 +1,21 @@
+# MIT License
+
+###Copyright (C) 2011 by Charlie McConnell
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/ncp/README.md b/node_modules/ncp/README.md
new file mode 100644
index 0000000..9480032
--- /dev/null
+++ b/node_modules/ncp/README.md
@@ -0,0 +1,63 @@
+# ncp - Asynchronous recursive file & directory copying
+
+[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp)
+
+Think `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically.
+
+## Command Line usage
+
+Usage is simple: `ncp [source] [dest] [--limit=concurrency limit]
+[--filter=filter] --stopOnErr`
+
+The 'filter' is a Regular Expression - matched files will be copied.
+
+The 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time.
+
+'stoponerr' is a boolean flag that will tell `ncp` to stop immediately if any
+errors arise, rather than attempting to continue while logging errors. The default behavior is to complete as many copies as possible, logging errors along the way.
+
+If there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue.
+
+## Programmatic usage
+
+Programmatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error.
+
+```javascript
+var ncp = require('ncp').ncp;
+
+ncp.limit = 16;
+
+ncp(source, destination, function (err) {
+ if (err) {
+ return console.error(err);
+ }
+ console.log('done!');
+});
+```
+
+You can also call ncp like `ncp(source, destination, options, callback)`.
+`options` should be a dictionary. Currently, such options are available:
+
+ * `options.filter` - a `RegExp` instance, against which each file name is
+ tested to determine whether to copy it or not, or a function taking single
+ parameter: copied file name, returning `true` or `false`, determining
+ whether to copy file or not.
+
+ * `options.transform` - a function: `function (read, write) { read.pipe(write) }`
+ used to apply streaming transforms while copying.
+
+ * `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite
+ destination files that already exist.
+
+ * `options.dereference` - boolean=false. If set to true, `ncp` will follow symbolic
+ links. For example, a symlink in the source tree pointing to a regular file
+ will become a regular file in the destination tree. Broken symlinks will result in
+ errors.
+
+ * `options.stopOnErr` - boolean=false. If set to true, `ncp` will behave like `cp -r`,
+ and stop on the first error it encounters. By default, `ncp` continues copying, logging all
+ errors and returning an array.
+
+ * `options.errs` - stream. If `options.stopOnErr` is `false`, a stream can be provided, and errors will be written to this stream.
+
+Please open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`.
diff --git a/node_modules/ncp/bin/ncp b/node_modules/ncp/bin/ncp
new file mode 100644
index 0000000..388eaba
--- /dev/null
+++ b/node_modules/ncp/bin/ncp
@@ -0,0 +1,48 @@
+#!/usr/bin/env node
+
+
+
+
+var ncp = require('../lib/ncp'),
+ args = process.argv.slice(2),
+ source, dest;
+
+if (args.length < 2) {
+ console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]');
+ process.exit(1);
+}
+
+// parse arguments the hard way
+function startsWith(str, prefix) {
+ return str.substr(0, prefix.length) == prefix;
+}
+
+var options = {};
+args.forEach(function (arg) {
+ if (startsWith(arg, "--limit=")) {
+ options.limit = parseInt(arg.split('=', 2)[1], 10);
+ }
+ if (startsWith(arg, "--filter=")) {
+ options.filter = new RegExp(arg.split('=', 2)[1]);
+ }
+ if (startsWith(arg, "--stoponerr")) {
+ options.stopOnErr = true;
+ }
+});
+
+ncp.ncp(args[0], args[1], options, function (err) {
+ if (Array.isArray(err)) {
+ console.error('There were errors during the copy.');
+ err.forEach(function (err) {
+ console.error(err.stack || err.message);
+ });
+ process.exit(1);
+ }
+ else if (err) {
+ console.error('An error has occurred.');
+ console.error(err.stack || err.message);
+ process.exit(1);
+ }
+});
+
+
diff --git a/node_modules/ncp/lib/ncp.js b/node_modules/ncp/lib/ncp.js
new file mode 100644
index 0000000..96eed47
--- /dev/null
+++ b/node_modules/ncp/lib/ncp.js
@@ -0,0 +1,261 @@
+var fs = require('fs'),
+ path = require('path');
+
+module.exports = ncp;
+ncp.ncp = ncp;
+
+function ncp (source, dest, options, callback) {
+ var cback = callback;
+
+ if (!callback) {
+ cback = options;
+ options = {};
+ }
+
+ var basePath = process.cwd(),
+ currentPath = path.resolve(basePath, source),
+ targetPath = path.resolve(basePath, dest),
+ filter = options.filter,
+ rename = options.rename,
+ transform = options.transform,
+ clobber = options.clobber !== false,
+ modified = options.modified,
+ dereference = options.dereference,
+ errs = null,
+ started = 0,
+ finished = 0,
+ running = 0,
+ limit = options.limit || ncp.limit || 16;
+
+ limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit;
+
+ startCopy(currentPath);
+
+ function startCopy(source) {
+ started++;
+ if (filter) {
+ if (filter instanceof RegExp) {
+ if (!filter.test(source)) {
+ return cb(true);
+ }
+ }
+ else if (typeof filter === 'function') {
+ if (!filter(source)) {
+ return cb(true);
+ }
+ }
+ }
+ return getStats(source);
+ }
+
+ function getStats(source) {
+ var stat = dereference ? fs.stat : fs.lstat;
+ if (running >= limit) {
+ return setImmediate(function () {
+ getStats(source);
+ });
+ }
+ running++;
+ stat(source, function (err, stats) {
+ var item = {};
+ if (err) {
+ return onError(err);
+ }
+
+ // We need to get the mode from the stats object and preserve it.
+ item.name = source;
+ item.mode = stats.mode;
+ item.mtime = stats.mtime; //modified time
+ item.atime = stats.atime; //access time
+
+ if (stats.isDirectory()) {
+ return onDir(item);
+ }
+ else if (stats.isFile()) {
+ return onFile(item);
+ }
+ else if (stats.isSymbolicLink()) {
+ // Symlinks don't really need to know about the mode.
+ return onLink(source);
+ }
+ });
+ }
+
+ function onFile(file) {
+ var target = file.name.replace(currentPath, targetPath);
+ if(rename) {
+ target = rename(target);
+ }
+ isWritable(target, function (writable) {
+ if (writable) {
+ return copyFile(file, target);
+ }
+ if(clobber) {
+ rmFile(target, function () {
+ copyFile(file, target);
+ });
+ }
+ if (modified) {
+ var stat = dereference ? fs.stat : fs.lstat;
+ stat(target, function(err, stats) {
+ //if souce modified time greater to target modified time copy file
+ if (file.mtime.getTime()>stats.mtime.getTime())
+ copyFile(file, target);
+ else return cb();
+ });
+ }
+ else {
+ return cb();
+ }
+ });
+ }
+
+ function copyFile(file, target) {
+ var readStream = fs.createReadStream(file.name),
+ writeStream = fs.createWriteStream(target, { mode: file.mode });
+
+ readStream.on('error', onError);
+ writeStream.on('error', onError);
+
+ if(transform) {
+ transform(readStream, writeStream, file);
+ } else {
+ writeStream.on('open', function() {
+ readStream.pipe(writeStream);
+ });
+ }
+ writeStream.once('finish', function() {
+ if (modified) {
+ //target file modified date sync.
+ fs.utimesSync(target, file.atime, file.mtime);
+ cb();
+ }
+ else cb();
+ });
+ }
+
+ function rmFile(file, done) {
+ fs.unlink(file, function (err) {
+ if (err) {
+ return onError(err);
+ }
+ return done();
+ });
+ }
+
+ function onDir(dir) {
+ var target = dir.name.replace(currentPath, targetPath);
+ isWritable(target, function (writable) {
+ if (writable) {
+ return mkDir(dir, target);
+ }
+ copyDir(dir.name);
+ });
+ }
+
+ function mkDir(dir, target) {
+ fs.mkdir(target, dir.mode, function (err) {
+ if (err) {
+ return onError(err);
+ }
+ copyDir(dir.name);
+ });
+ }
+
+ function copyDir(dir) {
+ fs.readdir(dir, function (err, items) {
+ if (err) {
+ return onError(err);
+ }
+ items.forEach(function (item) {
+ startCopy(path.join(dir, item));
+ });
+ return cb();
+ });
+ }
+
+ function onLink(link) {
+ var target = link.replace(currentPath, targetPath);
+ fs.readlink(link, function (err, resolvedPath) {
+ if (err) {
+ return onError(err);
+ }
+ checkLink(resolvedPath, target);
+ });
+ }
+
+ function checkLink(resolvedPath, target) {
+ if (dereference) {
+ resolvedPath = path.resolve(basePath, resolvedPath);
+ }
+ isWritable(target, function (writable) {
+ if (writable) {
+ return makeLink(resolvedPath, target);
+ }
+ fs.readlink(target, function (err, targetDest) {
+ if (err) {
+ return onError(err);
+ }
+ if (dereference) {
+ targetDest = path.resolve(basePath, targetDest);
+ }
+ if (targetDest === resolvedPath) {
+ return cb();
+ }
+ return rmFile(target, function () {
+ makeLink(resolvedPath, target);
+ });
+ });
+ });
+ }
+
+ function makeLink(linkPath, target) {
+ fs.symlink(linkPath, target, function (err) {
+ if (err) {
+ return onError(err);
+ }
+ return cb();
+ });
+ }
+
+ function isWritable(path, done) {
+ fs.lstat(path, function (err) {
+ if (err) {
+ if (err.code === 'ENOENT') return done(true);
+ return done(false);
+ }
+ return done(false);
+ });
+ }
+
+ function onError(err) {
+ if (options.stopOnError) {
+ return cback(err);
+ }
+ else if (!errs && options.errs) {
+ errs = fs.createWriteStream(options.errs);
+ }
+ else if (!errs) {
+ errs = [];
+ }
+ if (typeof errs.write === 'undefined') {
+ errs.push(err);
+ }
+ else {
+ errs.write(err.stack + '\n\n');
+ }
+ return cb();
+ }
+
+ function cb(skipped) {
+ if (!skipped) running--;
+ finished++;
+ if ((started === finished) && (running === 0)) {
+ if (cback !== undefined ) {
+ return errs ? cback(errs) : cback(null);
+ }
+ }
+ }
+}
+
+
diff --git a/node_modules/ncp/package.json b/node_modules/ncp/package.json
new file mode 100644
index 0000000..fe0dd97
--- /dev/null
+++ b/node_modules/ncp/package.json
@@ -0,0 +1,65 @@
+{
+ "_args": [
+ [
+ "ncp@2.0.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "ncp@2.0.0",
+ "_id": "ncp@2.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=",
+ "_location": "/ncp",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ncp@2.0.0",
+ "name": "ncp",
+ "escapedName": "ncp",
+ "rawSpec": "2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "2.0.0"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz",
+ "_spec": "2.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "AvianFlu",
+ "email": "charlie@charlieistheman.com"
+ },
+ "bin": {
+ "ncp": "bin/ncp"
+ },
+ "bugs": {
+ "url": "https://github.com/AvianFlu/ncp/issues"
+ },
+ "description": "Asynchronous recursive file copy utility.",
+ "devDependencies": {
+ "mocha": "1.15.x",
+ "read-dir-files": "0.0.x",
+ "rimraf": "1.0.x"
+ },
+ "engine": {
+ "node": ">=0.10"
+ },
+ "homepage": "https://github.com/AvianFlu/ncp#readme",
+ "keywords": [
+ "cli",
+ "copy"
+ ],
+ "license": "MIT",
+ "main": "./lib/ncp.js",
+ "name": "ncp",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/AvianFlu/ncp.git"
+ },
+ "scripts": {
+ "test": "mocha -R spec"
+ },
+ "version": "2.0.0"
+}
diff --git a/node_modules/ncp/test/modified-files/out/a b/node_modules/ncp/test/modified-files/out/a
new file mode 100644
index 0000000..29f446a
--- /dev/null
+++ b/node_modules/ncp/test/modified-files/out/a
@@ -0,0 +1 @@
+test3 \ No newline at end of file
diff --git a/node_modules/ncp/test/modified-files/src/a b/node_modules/ncp/test/modified-files/src/a
new file mode 100644
index 0000000..29f446a
--- /dev/null
+++ b/node_modules/ncp/test/modified-files/src/a
@@ -0,0 +1 @@
+test3 \ No newline at end of file
diff --git a/node_modules/ncp/test/ncp.js b/node_modules/ncp/test/ncp.js
new file mode 100644
index 0000000..bc6df22
--- /dev/null
+++ b/node_modules/ncp/test/ncp.js
@@ -0,0 +1,197 @@
+
+
+var assert = require('assert'),
+ fs = require('fs'),
+ path = require('path'),
+ rimraf = require('rimraf'),
+ readDirFiles = require('read-dir-files'),
+ util = require('util'),
+ ncp = require('../').ncp;
+
+
+
+describe('ncp', function () {
+ describe('regular files and directories', function () {
+ var fixtures = path.join(__dirname, 'regular-fixtures'),
+ src = path.join(fixtures, 'src'),
+ out = path.join(fixtures, 'out');
+
+ before(function (cb) {
+ rimraf(out, function() {
+ ncp(src, out, cb);
+ });
+ });
+
+ describe('when copying a directory of files', function () {
+ it('files are copied correctly', function (cb) {
+ readDirFiles(src, 'utf8', function (srcErr, srcFiles) {
+ readDirFiles(out, 'utf8', function (outErr, outFiles) {
+ assert.ifError(srcErr);
+ assert.deepEqual(srcFiles, outFiles);
+ cb();
+ });
+ });
+ });
+ });
+
+ describe('when copying files using filter', function () {
+ before(function (cb) {
+ var filter = function(name) {
+ return name.substr(name.length - 1) != 'a';
+ };
+ rimraf(out, function () {
+ ncp(src, out, {filter: filter}, cb);
+ });
+ });
+
+ it('files are copied correctly', function (cb) {
+ readDirFiles(src, 'utf8', function (srcErr, srcFiles) {
+ function filter(files) {
+ for (var fileName in files) {
+ var curFile = files[fileName];
+ if (curFile instanceof Object)
+ return filter(curFile);
+ if (fileName.substr(fileName.length - 1) == 'a')
+ delete files[fileName];
+ }
+ }
+ filter(srcFiles);
+ readDirFiles(out, 'utf8', function (outErr, outFiles) {
+ assert.ifError(outErr);
+ assert.deepEqual(srcFiles, outFiles);
+ cb();
+ });
+ });
+ });
+ });
+
+ describe('when using clobber=false', function () {
+ it('the copy is completed successfully', function (cb) {
+ ncp(src, out, function() {
+ ncp(src, out, {clobber: false}, function(err) {
+ assert.ifError(err);
+ cb();
+ });
+ });
+ });
+ });
+
+ describe('when using transform', function () {
+ it('file descriptors are passed correctly', function (cb) {
+ ncp(src, out, {
+ transform: function(read,write,file) {
+ assert.notEqual(file.name, undefined);
+ assert.strictEqual(typeof file.mode,'number');
+ read.pipe(write);
+ }
+ }, cb);
+ });
+ });
+
+ describe('when using rename', function() {
+ it('output files are correctly redirected', function(cb) {
+ ncp(src, out, {
+ rename: function(target) {
+ if(path.basename(target) == 'a') return path.resolve(path.dirname(target), 'z');
+ return target;
+ }
+ }, function(err) {
+ if(err) return cb(err);
+
+ readDirFiles(src, 'utf8', function (srcErr, srcFiles) {
+ readDirFiles(out, 'utf8', function (outErr, outFiles) {
+ assert.ifError(srcErr);
+ assert.deepEqual(srcFiles.a, outFiles.z);
+ cb();
+ });
+ });
+ });
+ });
+ });
+ });
+
+ describe('symlink handling', function () {
+ var fixtures = path.join(__dirname, 'symlink-fixtures'),
+ src = path.join(fixtures, 'src'),
+ out = path.join(fixtures, 'out');
+
+ beforeEach(function (cb) {
+ rimraf(out, cb);
+ });
+
+ it('copies symlinks by default', function (cb) {
+ ncp(src, out, function (err) {
+ if (err) return cb(err);
+ assert.equal(fs.readlinkSync(path.join(out, 'file-symlink')), 'foo');
+ assert.equal(fs.readlinkSync(path.join(out, 'dir-symlink')), 'dir');
+ cb();
+ })
+ });
+
+ it('copies file contents when dereference=true', function (cb) {
+ ncp(src, out, { dereference: true }, function (err) {
+ var fileSymlinkPath = path.join(out, 'file-symlink');
+ assert.ok(fs.lstatSync(fileSymlinkPath).isFile());
+ assert.equal(fs.readFileSync(fileSymlinkPath), 'foo contents');
+
+ var dirSymlinkPath = path.join(out, 'dir-symlink');
+ assert.ok(fs.lstatSync(dirSymlinkPath).isDirectory());
+ assert.deepEqual(fs.readdirSync(dirSymlinkPath), ['bar']);
+
+ cb();
+ });
+ });
+ });
+
+ describe('broken symlink handling', function () {
+ var fixtures = path.join(__dirname, 'broken-symlink-fixtures'),
+ src = path.join(fixtures, 'src'),
+ out = path.join(fixtures, 'out');
+
+ beforeEach(function (cb) {
+ rimraf(out, cb);
+ });
+
+ it('copies broken symlinks by default', function (cb) {
+ ncp(src, out, function (err) {
+ if (err) return cb(err);
+ assert.equal(fs.readlinkSync(path.join(out, 'broken-symlink')), 'does-not-exist');
+ cb();
+ })
+ });
+
+ it('returns an error when dereference=true', function (cb) {
+ ncp(src, out, {dereference: true}, function (err) {
+ assert.equal(err.length, 1);
+ assert.equal(err[0].code, 'ENOENT');
+ cb();
+ });
+ });
+ });
+
+ describe('modified files copies', function () {
+ var fixtures = path.join(__dirname, 'modified-files'),
+ src = path.join(fixtures, 'src'),
+ out = path.join(fixtures, 'out');
+
+ it('if file not exists copy file to target', function(cb) {
+ rimraf(out, function() {
+ ncp(src, out, {modified: true, clobber: false}, function (err) {
+ assert.equal(fs.existsSync(out), true);
+ cb();
+ });
+ });
+ });
+
+ it('change source file mtime and copy', function(cb) {
+ fs.utimesSync(src+"/a", new Date().getTime()/1000, new Date('2015-01-01 00:00:00').getTime()/1000);
+ ncp(src, out, {modified: true, clobber: false}, function (err) {
+ fs.stat(out+"/a", function(err, stats) {
+ assert.equal(stats.mtime.getTime(), new Date('2015-01-01 00:00:00').getTime());
+ cb();
+ });
+ });
+ });
+
+ });
+}); \ No newline at end of file
diff --git a/node_modules/ncp/test/regular-fixtures/src/a b/node_modules/ncp/test/regular-fixtures/src/a
new file mode 100644
index 0000000..802992c
--- /dev/null
+++ b/node_modules/ncp/test/regular-fixtures/src/a
@@ -0,0 +1 @@
+Hello world
diff --git a/node_modules/ncp/test/regular-fixtures/src/b b/node_modules/ncp/test/regular-fixtures/src/b
new file mode 100644
index 0000000..9f6bb18
--- /dev/null
+++ b/node_modules/ncp/test/regular-fixtures/src/b
@@ -0,0 +1 @@
+Hello ncp
diff --git a/node_modules/ncp/test/regular-fixtures/src/c b/node_modules/ncp/test/regular-fixtures/src/c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/ncp/test/regular-fixtures/src/c
diff --git a/node_modules/ncp/test/regular-fixtures/src/d b/node_modules/ncp/test/regular-fixtures/src/d
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/ncp/test/regular-fixtures/src/d
diff --git a/node_modules/ncp/test/regular-fixtures/src/e b/node_modules/ncp/test/regular-fixtures/src/e
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/ncp/test/regular-fixtures/src/e
diff --git a/node_modules/ncp/test/regular-fixtures/src/f b/node_modules/ncp/test/regular-fixtures/src/f
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/ncp/test/regular-fixtures/src/f
diff --git a/node_modules/ncp/test/regular-fixtures/src/sub/a b/node_modules/ncp/test/regular-fixtures/src/sub/a
new file mode 100644
index 0000000..cf291b5
--- /dev/null
+++ b/node_modules/ncp/test/regular-fixtures/src/sub/a
@@ -0,0 +1 @@
+Hello nodejitsu
diff --git a/node_modules/ncp/test/regular-fixtures/src/sub/b b/node_modules/ncp/test/regular-fixtures/src/sub/b
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/ncp/test/regular-fixtures/src/sub/b
diff --git a/node_modules/ncp/test/symlink-fixtures/src/dir/bar b/node_modules/ncp/test/symlink-fixtures/src/dir/bar
new file mode 100644
index 0000000..fd06f5f
--- /dev/null
+++ b/node_modules/ncp/test/symlink-fixtures/src/dir/bar
@@ -0,0 +1 @@
+bar contents \ No newline at end of file
diff --git a/node_modules/ncp/test/symlink-fixtures/src/foo b/node_modules/ncp/test/symlink-fixtures/src/foo
new file mode 100644
index 0000000..35fc060
--- /dev/null
+++ b/node_modules/ncp/test/symlink-fixtures/src/foo
@@ -0,0 +1 @@
+foo contents \ No newline at end of file
diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/once/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/once/README.md b/node_modules/once/README.md
new file mode 100644
index 0000000..1f1ffca
--- /dev/null
+++ b/node_modules/once/README.md
@@ -0,0 +1,79 @@
+# once
+
+Only call a function once.
+
+## usage
+
+```javascript
+var once = require('once')
+
+function load (file, cb) {
+ cb = once(cb)
+ loader.load('file')
+ loader.once('load', cb)
+ loader.once('error', cb)
+}
+```
+
+Or add to the Function.prototype in a responsible way:
+
+```javascript
+// only has to be done once
+require('once').proto()
+
+function load (file, cb) {
+ cb = cb.once()
+ loader.load('file')
+ loader.once('load', cb)
+ loader.once('error', cb)
+}
+```
+
+Ironically, the prototype feature makes this module twice as
+complicated as necessary.
+
+To check whether you function has been called, use `fn.called`. Once the
+function is called for the first time the return value of the original
+function is saved in `fn.value` and subsequent calls will continue to
+return this value.
+
+```javascript
+var once = require('once')
+
+function load (cb) {
+ cb = once(cb)
+ var stream = createStream()
+ stream.once('data', cb)
+ stream.once('end', function () {
+ if (!cb.called) cb(new Error('not found'))
+ })
+}
+```
+
+## `once.strict(func)`
+
+Throw an error if the function is called twice.
+
+Some functions are expected to be called only once. Using `once` for them would
+potentially hide logical errors.
+
+In the example below, the `greet` function has to call the callback only once:
+
+```javascript
+function greet (name, cb) {
+ // return is missing from the if statement
+ // when no name is passed, the callback is called twice
+ if (!name) cb('Hello anonymous')
+ cb('Hello ' + name)
+}
+
+function log (msg) {
+ console.log(msg)
+}
+
+// this will print 'Hello anonymous' but the logical error will be missed
+greet(null, once(msg))
+
+// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
+greet(null, once.strict(msg))
+```
diff --git a/node_modules/once/once.js b/node_modules/once/once.js
new file mode 100644
index 0000000..2354067
--- /dev/null
+++ b/node_modules/once/once.js
@@ -0,0 +1,42 @@
+var wrappy = require('wrappy')
+module.exports = wrappy(once)
+module.exports.strict = wrappy(onceStrict)
+
+once.proto = once(function () {
+ Object.defineProperty(Function.prototype, 'once', {
+ value: function () {
+ return once(this)
+ },
+ configurable: true
+ })
+
+ Object.defineProperty(Function.prototype, 'onceStrict', {
+ value: function () {
+ return onceStrict(this)
+ },
+ configurable: true
+ })
+})
+
+function once (fn) {
+ var f = function () {
+ if (f.called) return f.value
+ f.called = true
+ return f.value = fn.apply(this, arguments)
+ }
+ f.called = false
+ return f
+}
+
+function onceStrict (fn) {
+ var f = function () {
+ if (f.called)
+ throw new Error(f.onceError)
+ f.called = true
+ return f.value = fn.apply(this, arguments)
+ }
+ var name = fn.name || 'Function wrapped with `once`'
+ f.onceError = name + " shouldn't be called more than once"
+ f.called = false
+ return f
+}
diff --git a/node_modules/once/package.json b/node_modules/once/package.json
new file mode 100644
index 0000000..e5060cd
--- /dev/null
+++ b/node_modules/once/package.json
@@ -0,0 +1,70 @@
+{
+ "_args": [
+ [
+ "once@1.4.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "once@1.4.0",
+ "_id": "once@1.4.0",
+ "_inBundle": false,
+ "_integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "_location": "/once",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "once@1.4.0",
+ "name": "once",
+ "escapedName": "once",
+ "rawSpec": "1.4.0",
+ "saveSpec": null,
+ "fetchSpec": "1.4.0"
+ },
+ "_requiredBy": [
+ "/end-of-stream",
+ "/pump"
+ ],
+ "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "_spec": "1.4.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/once/issues"
+ },
+ "dependencies": {
+ "wrappy": "1"
+ },
+ "description": "Run a function exactly one time",
+ "devDependencies": {
+ "tap": "^7.0.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "once.js"
+ ],
+ "homepage": "https://github.com/isaacs/once#readme",
+ "keywords": [
+ "once",
+ "function",
+ "one",
+ "single"
+ ],
+ "license": "ISC",
+ "main": "once.js",
+ "name": "once",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/once.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "1.4.0"
+}
diff --git a/node_modules/onetime/index.d.ts b/node_modules/onetime/index.d.ts
new file mode 100644
index 0000000..ea84cab
--- /dev/null
+++ b/node_modules/onetime/index.d.ts
@@ -0,0 +1,64 @@
+declare namespace onetime {
+ interface Options {
+ /**
+ Throw an error when called more than once.
+
+ @default false
+ */
+ throw?: boolean;
+ }
+}
+
+declare const onetime: {
+ /**
+ Ensure a function is only called once. When called multiple times it will return the return value from the first call.
+
+ @param fn - Function that should only be called once.
+ @returns A function that only calls `fn` once.
+
+ @example
+ ```
+ import onetime = require('onetime');
+
+ let i = 0;
+
+ const foo = onetime(() => ++i);
+
+ foo(); //=> 1
+ foo(); //=> 1
+ foo(); //=> 1
+
+ onetime.callCount(foo); //=> 3
+ ```
+ */
+ <ArgumentsType extends unknown[], ReturnType>(
+ fn: (...arguments: ArgumentsType) => ReturnType,
+ options?: onetime.Options
+ ): (...arguments: ArgumentsType) => ReturnType;
+
+ /**
+ Get the number of times `fn` has been called.
+
+ @param fn - Function to get call count from.
+ @returns A number representing how many times `fn` has been called.
+
+ @example
+ ```
+ import onetime = require('onetime');
+
+ const foo = onetime(() => {});
+ foo();
+ foo();
+ foo();
+
+ console.log(onetime.callCount(foo));
+ //=> 3
+ ```
+ */
+ callCount(fn: (...arguments: any[]) => unknown): number;
+
+ // TODO: Remove this for the next major release
+ default: typeof onetime;
+};
+
+export = onetime;
diff --git a/node_modules/onetime/index.js b/node_modules/onetime/index.js
new file mode 100644
index 0000000..99c5fc1
--- /dev/null
+++ b/node_modules/onetime/index.js
@@ -0,0 +1,44 @@
+'use strict';
+const mimicFn = require('mimic-fn');
+
+const calledFunctions = new WeakMap();
+
+const onetime = (function_, options = {}) => {
+ if (typeof function_ !== 'function') {
+ throw new TypeError('Expected a function');
+ }
+
+ let returnValue;
+ let callCount = 0;
+ const functionName = function_.displayName || function_.name || '<anonymous>';
+
+ const onetime = function (...arguments_) {
+ calledFunctions.set(onetime, ++callCount);
+
+ if (callCount === 1) {
+ returnValue = function_.apply(this, arguments_);
+ function_ = null;
+ } else if (options.throw === true) {
+ throw new Error(`Function \`${functionName}\` can only be called once`);
+ }
+
+ return returnValue;
+ };
+
+ mimicFn(onetime, function_);
+ calledFunctions.set(onetime, callCount);
+
+ return onetime;
+};
+
+module.exports = onetime;
+// TODO: Remove this for the next major release
+module.exports.default = onetime;
+
+module.exports.callCount = function_ => {
+ if (!calledFunctions.has(function_)) {
+ throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
+ }
+
+ return calledFunctions.get(function_);
+};
diff --git a/node_modules/onetime/license b/node_modules/onetime/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/onetime/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/onetime/package.json b/node_modules/onetime/package.json
new file mode 100644
index 0000000..f16349f
--- /dev/null
+++ b/node_modules/onetime/package.json
@@ -0,0 +1,78 @@
+{
+ "_args": [
+ [
+ "onetime@5.1.2",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "onetime@5.1.2",
+ "_id": "onetime@5.1.2",
+ "_inBundle": false,
+ "_integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "_location": "/onetime",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "onetime@5.1.2",
+ "name": "onetime",
+ "escapedName": "onetime",
+ "rawSpec": "5.1.2",
+ "saveSpec": null,
+ "fetchSpec": "5.1.2"
+ },
+ "_requiredBy": [
+ "/restore-cursor"
+ ],
+ "_resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "_spec": "5.1.2",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/onetime/issues"
+ },
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "description": "Ensure a function is only called once",
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "tsd": "^0.7.1",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "homepage": "https://github.com/sindresorhus/onetime#readme",
+ "keywords": [
+ "once",
+ "function",
+ "one",
+ "onetime",
+ "func",
+ "fn",
+ "single",
+ "call",
+ "called",
+ "prevent"
+ ],
+ "license": "MIT",
+ "name": "onetime",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/onetime.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "5.1.2"
+}
diff --git a/node_modules/onetime/readme.md b/node_modules/onetime/readme.md
new file mode 100644
index 0000000..2d133d3
--- /dev/null
+++ b/node_modules/onetime/readme.md
@@ -0,0 +1,94 @@
+# onetime [![Build Status](https://travis-ci.com/sindresorhus/onetime.svg?branch=master)](https://travis-ci.com/github/sindresorhus/onetime)
+
+> Ensure a function is only called once
+
+When called multiple times it will return the return value from the first call.
+
+*Unlike the module [once](https://github.com/isaacs/once), this one isn't naughty and extending `Function.prototype`.*
+
+## Install
+
+```
+$ npm install onetime
+```
+
+## Usage
+
+```js
+const onetime = require('onetime');
+
+let i = 0;
+
+const foo = onetime(() => ++i);
+
+foo(); //=> 1
+foo(); //=> 1
+foo(); //=> 1
+
+onetime.callCount(foo); //=> 3
+```
+
+```js
+const onetime = require('onetime');
+
+const foo = onetime(() => {}, {throw: true});
+
+foo();
+
+foo();
+//=> Error: Function `foo` can only be called once
+```
+
+## API
+
+### onetime(fn, options?)
+
+Returns a function that only calls `fn` once.
+
+#### fn
+
+Type: `Function`
+
+Function that should only be called once.
+
+#### options
+
+Type: `object`
+
+##### throw
+
+Type: `boolean`\
+Default: `false`
+
+Throw an error when called more than once.
+
+### onetime.callCount(fn)
+
+Returns a number representing how many times `fn` has been called.
+
+Note: It throws an error if you pass in a function that is not wrapped by `onetime`.
+
+```js
+const onetime = require('onetime');
+
+const foo = onetime(() => {});
+
+foo();
+foo();
+foo();
+
+console.log(onetime.callCount(foo));
+//=> 3
+```
+
+#### fn
+
+Type: `Function`
+
+Function to get call count from.
+
+## onetime for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of onetime and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-onetime?utm_source=npm-onetime&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/node_modules/ora/index.d.ts b/node_modules/ora/index.d.ts
new file mode 100644
index 0000000..dc58717
--- /dev/null
+++ b/node_modules/ora/index.d.ts
@@ -0,0 +1,278 @@
+/// <reference types="node"/>
+import {SpinnerName} from 'cli-spinners';
+
+declare namespace ora {
+ interface Spinner {
+ readonly interval?: number;
+ readonly frames: string[];
+ }
+
+ type Color =
+ | 'black'
+ | 'red'
+ | 'green'
+ | 'yellow'
+ | 'blue'
+ | 'magenta'
+ | 'cyan'
+ | 'white'
+ | 'gray';
+
+ type PrefixTextGenerator = () => string;
+
+ interface Options {
+ /**
+ Text to display after the spinner.
+ */
+ readonly text?: string;
+
+ /**
+ Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.
+ */
+ readonly prefixText?: string | PrefixTextGenerator;
+
+ /**
+ Name of one of the provided spinners. See [`example.js`](https://github.com/BendingBender/ora/blob/master/example.js) in this repo if you want to test out different spinners. On Windows, it will always use the line spinner as the Windows command-line doesn't have proper Unicode support.
+
+ @default 'dots'
+
+ Or an object like:
+
+ @example
+ ```
+ {
+ interval: 80, // Optional
+ frames: ['-', '+', '-']
+ }
+ ```
+ */
+ readonly spinner?: SpinnerName | Spinner;
+
+ /**
+ Color of the spinner.
+
+ @default 'cyan'
+ */
+ readonly color?: Color;
+
+ /**
+ Set to `false` to stop Ora from hiding the cursor.
+
+ @default true
+ */
+ readonly hideCursor?: boolean;
+
+ /**
+ Indent the spinner with the given number of spaces.
+
+ @default 0
+ */
+ readonly indent?: number;
+
+ /**
+ Interval between each frame.
+
+ Spinners provide their own recommended interval, so you don't really need to specify this.
+
+ Default: Provided by the spinner or `100`.
+ */
+ readonly interval?: number;
+
+ /**
+ Stream to write the output.
+
+ You could for example set this to `process.stdout` instead.
+
+ @default process.stderr
+ */
+ readonly stream?: NodeJS.WritableStream;
+
+ /**
+ Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
+
+ Note that `{isEnabled: false}` doesn't mean it won't output anything. It just means it won't output the spinner, colors, and other ansi escape codes. It will still log text.
+ */
+ readonly isEnabled?: boolean;
+
+ /**
+ Disable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.
+
+ @default false
+ */
+ readonly isSilent?: boolean;
+
+ /**
+ Discard stdin input (except Ctrl+C) while running if it's TTY. This prevents the spinner from twitching on input, outputting broken lines on `Enter` key presses, and prevents buffering of input while the spinner is running.
+
+ This has no effect on Windows as there's no good way to implement discarding stdin properly there.
+
+ @default true
+ */
+ readonly discardStdin?: boolean;
+ }
+
+ interface PersistOptions {
+ /**
+ Symbol to replace the spinner with.
+
+ @default ' '
+ */
+ readonly symbol?: string;
+
+ /**
+ Text to be persisted after the symbol.
+
+ Default: Current `text`.
+ */
+ readonly text?: string;
+
+ /**
+ Text or a function that returns text to be persisted before the symbol. No prefix text will be displayed if set to an empty string.
+
+ Default: Current `prefixText`.
+ */
+ readonly prefixText?: string | PrefixTextGenerator;
+ }
+
+ interface Ora {
+ /**
+ A boolean of whether the instance is currently spinning.
+ */
+ readonly isSpinning: boolean;
+
+ /**
+ Change the text after the spinner.
+ */
+ text: string;
+
+ /**
+ Change the text or function that returns text before the spinner. No prefix text will be displayed if set to an empty string.
+ */
+ prefixText: string | PrefixTextGenerator;
+
+ /**
+ Change the spinner color.
+ */
+ color: Color;
+
+ /**
+ Change the spinner.
+ */
+ spinner: SpinnerName | Spinner;
+
+ /**
+ Change the spinner indent.
+ */
+ indent: number;
+
+ /**
+ Start the spinner.
+
+ @param text - Set the current text.
+ @returns The spinner instance.
+ */
+ start(text?: string): Ora;
+
+ /**
+ Stop and clear the spinner.
+
+ @returns The spinner instance.
+ */
+ stop(): Ora;
+
+ /**
+ Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ succeed(text?: string): Ora;
+
+ /**
+ Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ fail(text?: string): Ora;
+
+ /**
+ Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ warn(text?: string): Ora;
+
+ /**
+ Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ info(text?: string): Ora;
+
+ /**
+ Stop the spinner and change the symbol or text.
+
+ @returns The spinner instance.
+ */
+ stopAndPersist(options?: PersistOptions): Ora;
+
+ /**
+ Clear the spinner.
+
+ @returns The spinner instance.
+ */
+ clear(): Ora;
+
+ /**
+ Manually render a new frame.
+
+ @returns The spinner instance.
+ */
+ render(): Ora;
+
+ /**
+ Get a new frame.
+
+ @returns The spinner instance text.
+ */
+ frame(): string;
+ }
+}
+
+declare const ora: {
+ /**
+ Elegant terminal spinner.
+
+ @param options - If a string is provided, it is treated as a shortcut for `options.text`.
+
+ @example
+ ```
+ import ora = require('ora');
+
+ const spinner = ora('Loading unicorns').start();
+
+ setTimeout(() => {
+ spinner.color = 'yellow';
+ spinner.text = 'Loading rainbows';
+ }, 1000);
+ ```
+ */
+ (options?: ora.Options | string): ora.Ora;
+
+ /**
+ Starts a spinner for a promise. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects.
+
+ @param action - The promise to start the spinner for.
+ @param options - If a string is provided, it is treated as a shortcut for `options.text`.
+ @returns The spinner instance.
+ */
+ promise(
+ action: PromiseLike<unknown>,
+ options?: ora.Options | string
+ ): ora.Ora;
+};
+
+export = ora;
diff --git a/node_modules/ora/index.js b/node_modules/ora/index.js
new file mode 100644
index 0000000..980502c
--- /dev/null
+++ b/node_modules/ora/index.js
@@ -0,0 +1,407 @@
+'use strict';
+const readline = require('readline');
+const chalk = require('chalk');
+const cliCursor = require('cli-cursor');
+const cliSpinners = require('cli-spinners');
+const logSymbols = require('log-symbols');
+const stripAnsi = require('strip-ansi');
+const wcwidth = require('wcwidth');
+const isInteractive = require('is-interactive');
+const MuteStream = require('mute-stream');
+
+const TEXT = Symbol('text');
+const PREFIX_TEXT = Symbol('prefixText');
+
+const ASCII_ETX_CODE = 0x03; // Ctrl+C emits this code
+
+class StdinDiscarder {
+ constructor() {
+ this.requests = 0;
+
+ this.mutedStream = new MuteStream();
+ this.mutedStream.pipe(process.stdout);
+ this.mutedStream.mute();
+
+ const self = this;
+ this.ourEmit = function (event, data, ...args) {
+ const {stdin} = process;
+ if (self.requests > 0 || stdin.emit === self.ourEmit) {
+ if (event === 'keypress') { // Fixes readline behavior
+ return;
+ }
+
+ if (event === 'data' && data.includes(ASCII_ETX_CODE)) {
+ process.emit('SIGINT');
+ }
+
+ Reflect.apply(self.oldEmit, this, [event, data, ...args]);
+ } else {
+ Reflect.apply(process.stdin.emit, this, [event, data, ...args]);
+ }
+ };
+ }
+
+ start() {
+ this.requests++;
+
+ if (this.requests === 1) {
+ this.realStart();
+ }
+ }
+
+ stop() {
+ if (this.requests <= 0) {
+ throw new Error('`stop` called more times than `start`');
+ }
+
+ this.requests--;
+
+ if (this.requests === 0) {
+ this.realStop();
+ }
+ }
+
+ realStart() {
+ // No known way to make it work reliably on Windows
+ if (process.platform === 'win32') {
+ return;
+ }
+
+ this.rl = readline.createInterface({
+ input: process.stdin,
+ output: this.mutedStream
+ });
+
+ this.rl.on('SIGINT', () => {
+ if (process.listenerCount('SIGINT') === 0) {
+ process.emit('SIGINT');
+ } else {
+ this.rl.close();
+ process.kill(process.pid, 'SIGINT');
+ }
+ });
+ }
+
+ realStop() {
+ if (process.platform === 'win32') {
+ return;
+ }
+
+ this.rl.close();
+ this.rl = undefined;
+ }
+}
+
+let stdinDiscarder;
+
+class Ora {
+ constructor(options) {
+ if (!stdinDiscarder) {
+ stdinDiscarder = new StdinDiscarder();
+ }
+
+ if (typeof options === 'string') {
+ options = {
+ text: options
+ };
+ }
+
+ this.options = {
+ text: '',
+ color: 'cyan',
+ stream: process.stderr,
+ discardStdin: true,
+ ...options
+ };
+
+ this.spinner = this.options.spinner;
+
+ this.color = this.options.color;
+ this.hideCursor = this.options.hideCursor !== false;
+ this.interval = this.options.interval || this.spinner.interval || 100;
+ this.stream = this.options.stream;
+ this.id = undefined;
+ this.isEnabled = typeof this.options.isEnabled === 'boolean' ? this.options.isEnabled : isInteractive({stream: this.stream});
+ this.isSilent = typeof this.options.isSilent === 'boolean' ? this.options.isSilent : false;
+
+ // Set *after* `this.stream`
+ this.text = this.options.text;
+ this.prefixText = this.options.prefixText;
+ this.linesToClear = 0;
+ this.indent = this.options.indent;
+ this.discardStdin = this.options.discardStdin;
+ this.isDiscardingStdin = false;
+ }
+
+ get indent() {
+ return this._indent;
+ }
+
+ set indent(indent = 0) {
+ if (!(indent >= 0 && Number.isInteger(indent))) {
+ throw new Error('The `indent` option must be an integer from 0 and up');
+ }
+
+ this._indent = indent;
+ }
+
+ _updateInterval(interval) {
+ if (interval !== undefined) {
+ this.interval = interval;
+ }
+ }
+
+ get spinner() {
+ return this._spinner;
+ }
+
+ set spinner(spinner) {
+ this.frameIndex = 0;
+
+ if (typeof spinner === 'object') {
+ if (spinner.frames === undefined) {
+ throw new Error('The given spinner must have a `frames` property');
+ }
+
+ this._spinner = spinner;
+ } else if (process.platform === 'win32') {
+ this._spinner = cliSpinners.line;
+ } else if (spinner === undefined) {
+ // Set default spinner
+ this._spinner = cliSpinners.dots;
+ } else if (cliSpinners[spinner]) {
+ this._spinner = cliSpinners[spinner];
+ } else {
+ throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json for a full list.`);
+ }
+
+ this._updateInterval(this._spinner.interval);
+ }
+
+ get text() {
+ return this[TEXT];
+ }
+
+ get prefixText() {
+ return this[PREFIX_TEXT];
+ }
+
+ get isSpinning() {
+ return this.id !== undefined;
+ }
+
+ getFullPrefixText(prefixText = this[PREFIX_TEXT], postfix = ' ') {
+ if (typeof prefixText === 'string') {
+ return prefixText + postfix;
+ }
+
+ if (typeof prefixText === 'function') {
+ return prefixText() + postfix;
+ }
+
+ return '';
+ }
+
+ updateLineCount() {
+ const columns = this.stream.columns || 80;
+ const fullPrefixText = this.getFullPrefixText(this.prefixText, '-');
+ this.lineCount = stripAnsi(fullPrefixText + '--' + this[TEXT]).split('\n').reduce((count, line) => {
+ return count + Math.max(1, Math.ceil(wcwidth(line) / columns));
+ }, 0);
+ }
+
+ set text(value) {
+ this[TEXT] = value;
+ this.updateLineCount();
+ }
+
+ set prefixText(value) {
+ this[PREFIX_TEXT] = value;
+ this.updateLineCount();
+ }
+
+ get isEnabled() {
+ return this._isEnabled && !this.isSilent;
+ }
+
+ set isEnabled(value) {
+ if (typeof value !== 'boolean') {
+ throw new TypeError('The `isEnabled` option must be a boolean');
+ }
+
+ this._isEnabled = value;
+ }
+
+ get isSilent() {
+ return this._isSilent;
+ }
+
+ set isSilent(value) {
+ if (typeof value !== 'boolean') {
+ throw new TypeError('The `isSilent` option must be a boolean');
+ }
+
+ this._isSilent = value;
+ }
+
+ frame() {
+ const {frames} = this.spinner;
+ let frame = frames[this.frameIndex];
+
+ if (this.color) {
+ frame = chalk[this.color](frame);
+ }
+
+ this.frameIndex = ++this.frameIndex % frames.length;
+ const fullPrefixText = (typeof this.prefixText === 'string' && this.prefixText !== '') ? this.prefixText + ' ' : '';
+ const fullText = typeof this.text === 'string' ? ' ' + this.text : '';
+
+ return fullPrefixText + frame + fullText;
+ }
+
+ clear() {
+ if (!this.isEnabled || !this.stream.isTTY) {
+ return this;
+ }
+
+ for (let i = 0; i < this.linesToClear; i++) {
+ if (i > 0) {
+ this.stream.moveCursor(0, -1);
+ }
+
+ this.stream.clearLine();
+ this.stream.cursorTo(this.indent);
+ }
+
+ this.linesToClear = 0;
+
+ return this;
+ }
+
+ render() {
+ if (this.isSilent) {
+ return this;
+ }
+
+ this.clear();
+ this.stream.write(this.frame());
+ this.linesToClear = this.lineCount;
+
+ return this;
+ }
+
+ start(text) {
+ if (text) {
+ this.text = text;
+ }
+
+ if (this.isSilent) {
+ return this;
+ }
+
+ if (!this.isEnabled) {
+ if (this.text) {
+ this.stream.write(`- ${this.text}\n`);
+ }
+
+ return this;
+ }
+
+ if (this.isSpinning) {
+ return this;
+ }
+
+ if (this.hideCursor) {
+ cliCursor.hide(this.stream);
+ }
+
+ if (this.discardStdin && process.stdin.isTTY) {
+ this.isDiscardingStdin = true;
+ stdinDiscarder.start();
+ }
+
+ this.render();
+ this.id = setInterval(this.render.bind(this), this.interval);
+
+ return this;
+ }
+
+ stop() {
+ if (!this.isEnabled) {
+ return this;
+ }
+
+ clearInterval(this.id);
+ this.id = undefined;
+ this.frameIndex = 0;
+ this.clear();
+ if (this.hideCursor) {
+ cliCursor.show(this.stream);
+ }
+
+ if (this.discardStdin && process.stdin.isTTY && this.isDiscardingStdin) {
+ stdinDiscarder.stop();
+ this.isDiscardingStdin = false;
+ }
+
+ return this;
+ }
+
+ succeed(text) {
+ return this.stopAndPersist({symbol: logSymbols.success, text});
+ }
+
+ fail(text) {
+ return this.stopAndPersist({symbol: logSymbols.error, text});
+ }
+
+ warn(text) {
+ return this.stopAndPersist({symbol: logSymbols.warning, text});
+ }
+
+ info(text) {
+ return this.stopAndPersist({symbol: logSymbols.info, text});
+ }
+
+ stopAndPersist(options = {}) {
+ if (this.isSilent) {
+ return this;
+ }
+
+ const prefixText = options.prefixText || this.prefixText;
+ const text = options.text || this.text;
+ const fullText = (typeof text === 'string') ? ' ' + text : '';
+
+ this.stop();
+ this.stream.write(`${this.getFullPrefixText(prefixText, ' ')}${options.symbol || ' '}${fullText}\n`);
+
+ return this;
+ }
+}
+
+const oraFactory = function (options) {
+ return new Ora(options);
+};
+
+module.exports = oraFactory;
+
+module.exports.promise = (action, options) => {
+ // eslint-disable-next-line promise/prefer-await-to-then
+ if (typeof action.then !== 'function') {
+ throw new TypeError('Parameter `action` must be a Promise');
+ }
+
+ const spinner = new Ora(options);
+ spinner.start();
+
+ (async () => {
+ try {
+ await action;
+ spinner.succeed();
+ } catch (_) {
+ spinner.fail();
+ }
+ })();
+
+ return spinner;
+};
diff --git a/node_modules/ora/license b/node_modules/ora/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/ora/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/ora/package.json b/node_modules/ora/package.json
new file mode 100644
index 0000000..53a7323
--- /dev/null
+++ b/node_modules/ora/package.json
@@ -0,0 +1,91 @@
+{
+ "_args": [
+ [
+ "ora@5.1.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "ora@5.1.0",
+ "_id": "ora@5.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==",
+ "_location": "/ora",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ora@5.1.0",
+ "name": "ora",
+ "escapedName": "ora",
+ "rawSpec": "5.1.0",
+ "saveSpec": null,
+ "fetchSpec": "5.1.0"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/ora/-/ora-5.1.0.tgz",
+ "_spec": "5.1.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/ora/issues"
+ },
+ "dependencies": {
+ "chalk": "^4.1.0",
+ "cli-cursor": "^3.1.0",
+ "cli-spinners": "^2.4.0",
+ "is-interactive": "^1.0.0",
+ "log-symbols": "^4.0.0",
+ "mute-stream": "0.0.8",
+ "strip-ansi": "^6.0.0",
+ "wcwidth": "^1.0.1"
+ },
+ "description": "Elegant terminal spinner",
+ "devDependencies": {
+ "@types/node": "^14.0.27",
+ "ava": "^2.4.0",
+ "get-stream": "^5.1.0",
+ "tsd": "^0.13.1",
+ "xo": "^0.25.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "homepage": "https://github.com/sindresorhus/ora#readme",
+ "keywords": [
+ "cli",
+ "spinner",
+ "spinners",
+ "terminal",
+ "term",
+ "console",
+ "ascii",
+ "unicode",
+ "loading",
+ "indicator",
+ "progress",
+ "busy",
+ "wait",
+ "idle"
+ ],
+ "license": "MIT",
+ "name": "ora",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/ora.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "5.1.0"
+}
diff --git a/node_modules/ora/readme.md b/node_modules/ora/readme.md
new file mode 100644
index 0000000..ca44995
--- /dev/null
+++ b/node_modules/ora/readme.md
@@ -0,0 +1,263 @@
+# ora [![Build Status](https://travis-ci.com/sindresorhus/ora.svg?branch=master)](https://travis-ci.com/github/sindresorhus/ora)
+
+> Elegant terminal spinner
+
+<p align="center">
+ <br>
+ <img src="screenshot.svg" width="500">
+ <br>
+</p>
+
+## Install
+
+```
+$ npm install ora
+```
+
+## Usage
+
+```js
+const ora = require('ora');
+
+const spinner = ora('Loading unicorns').start();
+
+setTimeout(() => {
+ spinner.color = 'yellow';
+ spinner.text = 'Loading rainbows';
+}, 1000);
+```
+
+## API
+
+### ora(text)
+### ora(options)
+
+If a string is provided, it is treated as a shortcut for [`options.text`](#text).
+
+#### options
+
+Type: `object`
+
+##### text
+
+Type: `string`
+
+Text to display after the spinner.
+
+##### prefixText
+
+Type: `string | () => string`
+
+Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.
+
+##### spinner
+
+Type: `string | object`\
+Default: `'dots'` <img src="screenshot-spinner.gif" width="14">
+
+Name of one of the [provided spinners](https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json). See `example.js` in this repo if you want to test out different spinners. On Windows, it will always use the `line` spinner as the Windows command-line doesn't have proper Unicode support.
+
+Or an object like:
+
+```js
+{
+ interval: 80, // Optional
+ frames: ['-', '+', '-']
+}
+```
+
+##### color
+
+Type: `string`\
+Default: `'cyan'`\
+Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'`
+
+Color of the spinner.
+
+##### hideCursor
+
+Type: `boolean`\
+Default: `true`
+
+Set to `false` to stop Ora from hiding the cursor.
+
+##### indent
+
+Type: `number`\
+Default: `0`
+
+Indent the spinner with the given number of spaces.
+
+##### interval
+
+Type: `number`\
+Default: Provided by the spinner or `100`
+
+Interval between each frame.
+
+Spinners provide their own recommended interval, so you don't really need to specify this.
+
+##### stream
+
+Type: `stream.Writable`\
+Default: `process.stderr`
+
+Stream to write the output.
+
+You could for example set this to `process.stdout` instead.
+
+##### isEnabled
+
+Type: `boolean`
+
+Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
+
+Note that `{isEnabled: false}` doesn't mean it won't output anything. It just means it won't output the spinner, colors, and other ansi escape codes. It will still log text.
+
+##### isSilent
+
+Type: `boolean`\
+Default: `false`
+
+Disable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.
+
+##### discardStdin
+
+Type: `boolean`\
+Default: `true`
+
+Discard stdin input (except Ctrl+C) while running if it's TTY. This prevents the spinner from twitching on input, outputting broken lines on <kbd>Enter</kbd> key presses, and prevents buffering of input while the spinner is running.
+
+This has no effect on Windows as there's no good way to implement discarding stdin properly there.
+
+### Instance
+
+#### .start(text?)
+
+Start the spinner. Returns the instance. Set the current text if `text` is provided.
+
+#### .stop()
+
+Stop and clear the spinner. Returns the instance.
+
+#### .succeed(text?)
+
+Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
+
+#### .fail(text?)
+
+Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
+
+#### .warn(text?)
+
+Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided. Returns the instance.
+
+#### .info(text?)
+
+Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided. Returns the instance.
+
+#### .isSpinning
+
+A boolean of whether the instance is currently spinning.
+
+#### .stopAndPersist(options?)
+
+Stop the spinner and change the symbol or text. Returns the instance. See the GIF below.
+
+##### options
+
+Type: `object`
+
+###### symbol
+
+Type: `string`\
+Default: `' '`
+
+Symbol to replace the spinner with.
+
+###### text
+
+Type: `string`\
+Default: Current `'text'`
+
+Text to be persisted after the symbol
+
+###### prefixText
+
+Type: `string`\
+Default: Current `prefixText`
+
+Text to be persisted before the symbol. No prefix text will be displayed if set to an empty string.
+
+<img src="screenshot-2.gif" width="480">
+
+#### .clear()
+
+Clear the spinner. Returns the instance.
+
+#### .render()
+
+Manually render a new frame. Returns the instance.
+
+#### .frame()
+
+Get a new frame.
+
+#### .text
+
+Change the text after the spinner.
+
+#### .prefixText
+
+Change the text before the spinner. No prefix text will be displayed if set to an empty string.
+
+#### .color
+
+Change the spinner color.
+
+#### .spinner
+
+Change the spinner.
+
+#### .indent
+
+Change the spinner indent.
+
+### ora.promise(action, text)
+### ora.promise(action, options)
+
+Starts a spinner for a promise. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects. Returns the spinner instance.
+
+#### action
+
+Type: `Promise`
+
+## FAQ
+
+### How do I change the color of the text?
+
+Use [Chalk](https://github.com/chalk/chalk):
+
+```js
+const ora = require('ora');
+const chalk = require('chalk');
+
+const spinner = ora(`Loading ${chalk.red('unicorns')}`).start();
+```
+
+### Why does the spinner freeze?
+
+JavaScript is single-threaded, so synchronous operations blocks the thread, including the spinner animation. Prefer asynchronous operations whenever possible.
+
+## Related
+
+- [cli-spinners](https://github.com/sindresorhus/cli-spinners) - Spinners for use in the terminal
+- [listr](https://github.com/SamVerschueren/listr) - Terminal task list
+- [CLISpinner](https://github.com/kiliankoe/CLISpinner) - Terminal spinner library for Swift
+- [halo](https://github.com/ManrajGrover/halo) - Python port
+- [spinners](https://github.com/FGRibreau/spinners) - Terminal spinners for Rust
+- [marquee-ora](https://github.com/joeycozza/marquee-ora) - Scrolling marquee spinner for Ora
+- [briandowns/spinner](https://github.com/briandowns/spinner) - Terminal spinner/progress indicator for Go
+- [tj/go-spin](https://github.com/tj/go-spin) - Terminal spinner package for Go
+- [observablehq.com/@victordidenko/ora](https://observablehq.com/@victordidenko/ora) - Ora port to Observable notebooks
+- [spinnies](https://github.com/jcarpanelli/spinnies) - Terminal multi-spinner library for Node.js
diff --git a/node_modules/peek-readable/LICENSE b/node_modules/peek-readable/LICENSE
new file mode 100644
index 0000000..9ba5f03
--- /dev/null
+++ b/node_modules/peek-readable/LICENSE
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2010-2017 Borewit
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/peek-readable/README.md b/node_modules/peek-readable/README.md
new file mode 100644
index 0000000..6996d05
--- /dev/null
+++ b/node_modules/peek-readable/README.md
@@ -0,0 +1,104 @@
+![Node.js CI](https://github.com/Borewit/peek-readable/workflows/Node.js%20CI/badge.svg)
+[![NPM version](https://badge.fury.io/js/peek-readable.svg)](https://npmjs.org/package/peek-readable)
+[![npm downloads](http://img.shields.io/npm/dm/peek-readable.svg)](https://npmcharts.com/compare/peek-readable?start=600&interval=30)
+[![Coverage Status](https://coveralls.io/repos/github/Borewit/peek-readable/badge.svg?branch=master)](https://coveralls.io/github/Borewit/peek-readable?branch=master)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8a89b90858734a6da07570eaf2e89849)](https://www.codacy.com/app/Borewit/peek-readable?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Borewit/peek-readable&amp;utm_campaign=Badge_Grade)
+[![Total alerts](https://img.shields.io/lgtm/alerts/g/Borewit/peek-readable.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Borewit/peek-readable/alerts/)
+[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/Borewit/peek-readable.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Borewit/peek-readable/context:javascript)
+[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/peek-readable/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/peek-readable?targetFile=package.json)
+
+# peek-readable
+
+A promise based asynchronous stream reader, which makes reading from a stream easy.
+
+Allows to read and peek from a [Readable Stream](https://nodejs.org/api/stream.html#stream_readable_streams)
+
+Note that [peek-readable](https://github.com/Borewit/peek-readable) was formally released as [then-read-stream](https://github.com/Borewit/peek-readable).
+
+## Usage
+
+### Installation
+
+```shell script
+npm install --save peek-readable
+```
+
+The `peek-readable` contains one class: `StreamReader`, which reads from a [stream.Readable](https://nodejs.org/api/stream.html#stream_class_stream_readable).
+
+### Compatibility
+
+NPM module is compliant with [ECMAScript 2017 (ES8)](https://en.wikipedia.org/wiki/ECMAScript#8th_Edition_-_ECMAScript_2017).
+
+## Examples
+
+In the following example we read the first 16 bytes from a stream and store them in our buffer.
+Source code of examples can be found [here](test/examples.ts).
+
+```js
+const fs = require('fs');
+const { StreamReader } = require('peek-readable');
+
+(async () => {
+
+ const fileReadStream = fs.createReadStream('JPEG_example_JPG_RIP_001.jpg');
+ const streamReader = new StreamReader(fileReadStream);
+ const buffer = Buffer.alloc(16);
+
+ const bytesRead = await streamReader.read(buffer, 0, 16);
+ // buffer contains 16 bytes, if the end-of-stream has not been reached
+})();
+```
+
+End-of-stream detection:
+```js
+(async () => {
+
+ const fileReadStream = fs.createReadStream('JPEG_example_JPG_RIP_001.jpg');
+ const streamReader = new StreamReader(fileReadStream);
+ const buffer = Buffer.alloc(16);
+
+ try {
+ await streamReader.read(buffer, 0, 16);
+ // buffer contains 16 bytes, if the end-of-stream has not been reached
+ } catch(error) {
+ if (error instanceof EndOfStreamError) {
+ console.log('End-of-stream reached');
+ }
+ }
+})();
+```
+
+With peek you can read ahead:
+```js
+const fs = require('fs');
+const { StreamReader } = require('peek-readable');
+
+const fileReadStream = fs.createReadStream('JPEG_example_JPG_RIP_001.jpg');
+const streamReader = new StreamReader(fileReadStream);
+const buffer = Buffer.alloc(20);
+
+(async () => {
+ let bytesRead = await streamReader.peek(buffer, 0, 3);
+ if (bytesRead === 3 && buffer[0] === 0xFF && buffer[1] === 0xD8 && buffer[2] === 0xFF) {
+ console.log('This is a JPEG file');
+ } else {
+ throw Error('Expected a JPEG file');
+ }
+
+ bytesRead = await streamReader.read(buffer, 0, 20); // Read JPEG header
+ if (bytesRead === 20) {
+ console.log('Got the JPEG header');
+ } else {
+ throw Error('Failed to read JPEG header');
+ }
+})();
+```
+
+If you have to skip a part of the data, you can use ignore:
+```js
+(async () => {
+ //...
+ await streamReader.ignore(16);
+})();
+```
+
diff --git a/node_modules/peek-readable/lib/EndOfFileStream.d.ts b/node_modules/peek-readable/lib/EndOfFileStream.d.ts
new file mode 100644
index 0000000..1081cb0
--- /dev/null
+++ b/node_modules/peek-readable/lib/EndOfFileStream.d.ts
@@ -0,0 +1,7 @@
+export declare const defaultMessages = "End-Of-Stream";
+/**
+ * Thrown on read operation of the end of file or stream has been reached
+ */
+export declare class EndOfStreamError extends Error {
+ constructor();
+}
diff --git a/node_modules/peek-readable/lib/EndOfFileStream.js b/node_modules/peek-readable/lib/EndOfFileStream.js
new file mode 100644
index 0000000..6ae832e
--- /dev/null
+++ b/node_modules/peek-readable/lib/EndOfFileStream.js
@@ -0,0 +1,13 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.EndOfStreamError = exports.defaultMessages = void 0;
+exports.defaultMessages = 'End-Of-Stream';
+/**
+ * Thrown on read operation of the end of file or stream has been reached
+ */
+class EndOfStreamError extends Error {
+ constructor() {
+ super(exports.defaultMessages);
+ }
+}
+exports.EndOfStreamError = EndOfStreamError;
diff --git a/node_modules/peek-readable/lib/index.d.ts b/node_modules/peek-readable/lib/index.d.ts
new file mode 100644
index 0000000..a313ba8
--- /dev/null
+++ b/node_modules/peek-readable/lib/index.d.ts
@@ -0,0 +1,43 @@
+/// <reference types="node" />
+import * as stream from 'stream';
+export { EndOfStreamError } from './EndOfFileStream';
+export declare class StreamReader {
+ private s;
+ /**
+ * Deferred read request
+ */
+ private request;
+ private endOfStream;
+ /**
+ * Store peeked data
+ * @type {Array}
+ */
+ private peekQueue;
+ constructor(s: stream.Readable);
+ /**
+ * Read ahead (peek) from stream. Subsequent read or peeks will return the same data
+ * @param buffer - Buffer to store data read from stream in
+ * @param offset - Offset buffer
+ * @param length - Number of bytes to read
+ * @returns Number of bytes peeked
+ */
+ peek(buffer: Buffer | Uint8Array, offset: number, length: number): Promise<number>;
+ /**
+ * Read chunk from stream
+ * @param buffer - Target buffer to store data read from stream in
+ * @param offset - Offset of target buffer
+ * @param length - Number of bytes to read
+ * @returns Number of bytes read
+ */
+ read(buffer: Buffer | Uint8Array, offset: number, length: number): Promise<number>;
+ /**
+ * Read chunk from stream
+ * @param buffer Buffer to store data read from stream in
+ * @param offset Offset buffer
+ * @param length Number of bytes to read
+ * @returns Number of bytes read
+ */
+ private _read;
+ private tryRead;
+ private reject;
+}
diff --git a/node_modules/peek-readable/lib/index.js b/node_modules/peek-readable/lib/index.js
new file mode 100644
index 0000000..00dced4
--- /dev/null
+++ b/node_modules/peek-readable/lib/index.js
@@ -0,0 +1,137 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StreamReader = exports.EndOfStreamError = void 0;
+const EndOfFileStream_1 = require("./EndOfFileStream");
+var EndOfFileStream_2 = require("./EndOfFileStream");
+Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return EndOfFileStream_2.EndOfStreamError; } });
+class Deferred {
+ constructor() {
+ this.promise = new Promise((resolve, reject) => {
+ this.reject = reject;
+ this.resolve = resolve;
+ });
+ }
+}
+const maxStreamReadSize = 1 * 1024 * 1024; // Maximum request length on read-stream operation
+class StreamReader {
+ constructor(s) {
+ this.s = s;
+ this.endOfStream = false;
+ /**
+ * Store peeked data
+ * @type {Array}
+ */
+ this.peekQueue = [];
+ if (!s.read || !s.once) {
+ throw new Error('Expected an instance of stream.Readable');
+ }
+ this.s.once('end', () => this.reject(new EndOfFileStream_1.EndOfStreamError()));
+ this.s.once('error', err => this.reject(err));
+ this.s.once('close', () => this.reject(new Error('Stream closed')));
+ }
+ /**
+ * Read ahead (peek) from stream. Subsequent read or peeks will return the same data
+ * @param buffer - Buffer to store data read from stream in
+ * @param offset - Offset buffer
+ * @param length - Number of bytes to read
+ * @returns Number of bytes peeked
+ */
+ async peek(buffer, offset, length) {
+ const bytesRead = await this.read(buffer, offset, length);
+ this.peekQueue.push(buffer.slice(offset, offset + bytesRead)); // Put read data back to peek buffer
+ return bytesRead;
+ }
+ /**
+ * Read chunk from stream
+ * @param buffer - Target buffer to store data read from stream in
+ * @param offset - Offset of target buffer
+ * @param length - Number of bytes to read
+ * @returns Number of bytes read
+ */
+ async read(buffer, offset, length) {
+ if (length === 0) {
+ return 0;
+ }
+ if (this.peekQueue.length === 0 && this.endOfStream) {
+ throw new EndOfFileStream_1.EndOfStreamError();
+ }
+ let remaining = length;
+ let bytesRead = 0;
+ // consume peeked data first
+ while (this.peekQueue.length > 0 && remaining > 0) {
+ const peekData = this.peekQueue.pop(); // Front of queue
+ const lenCopy = Math.min(peekData.length, remaining);
+ peekData.copy(buffer, offset + bytesRead, 0, lenCopy);
+ bytesRead += lenCopy;
+ remaining -= lenCopy;
+ if (lenCopy < peekData.length) {
+ // remainder back to queue
+ this.peekQueue.push(peekData.slice(lenCopy));
+ }
+ }
+ // continue reading from stream if required
+ while (remaining > 0 && !this.endOfStream) {
+ const reqLen = Math.min(remaining, maxStreamReadSize);
+ const chunkLen = await this._read(buffer, offset + bytesRead, reqLen);
+ bytesRead += chunkLen;
+ if (chunkLen < reqLen)
+ break;
+ remaining -= chunkLen;
+ }
+ return bytesRead;
+ }
+ /**
+ * Read chunk from stream
+ * @param buffer Buffer to store data read from stream in
+ * @param offset Offset buffer
+ * @param length Number of bytes to read
+ * @returns Number of bytes read
+ */
+ async _read(buffer, offset, length) {
+ if (this.request)
+ throw new Error('Concurrent read operation?');
+ const readBuffer = this.s.read(length);
+ if (readBuffer) {
+ readBuffer.copy(buffer, offset);
+ return readBuffer.length;
+ }
+ else {
+ this.request = {
+ buffer,
+ offset,
+ length,
+ deferred: new Deferred()
+ };
+ this.s.once('readable', () => {
+ this.tryRead();
+ });
+ return this.request.deferred.promise.then(n => {
+ this.request = null;
+ return n;
+ }, err => {
+ this.request = null;
+ throw err;
+ });
+ }
+ }
+ tryRead() {
+ const readBuffer = this.s.read(this.request.length);
+ if (readBuffer) {
+ readBuffer.copy(this.request.buffer, this.request.offset);
+ this.request.deferred.resolve(readBuffer.length);
+ }
+ else {
+ this.s.once('readable', () => {
+ this.tryRead();
+ });
+ }
+ }
+ reject(err) {
+ this.endOfStream = true;
+ if (this.request) {
+ this.request.deferred.reject(err);
+ this.request = null;
+ }
+ }
+}
+exports.StreamReader = StreamReader;
diff --git a/node_modules/peek-readable/package.json b/node_modules/peek-readable/package.json
new file mode 100644
index 0000000..7c3c1e8
--- /dev/null
+++ b/node_modules/peek-readable/package.json
@@ -0,0 +1,106 @@
+{
+ "_from": "peek-readable@^3.1.3",
+ "_id": "peek-readable@3.1.3",
+ "_inBundle": false,
+ "_integrity": "sha512-mpAcysyRJxmICBcBa5IXH7SZPvWkcghm6Fk8RekoS3v+BpbSzlZzuWbMx+GXrlUwESi9qHar4nVEZNMKylIHvg==",
+ "_location": "/peek-readable",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "peek-readable@^3.1.3",
+ "name": "peek-readable",
+ "escapedName": "peek-readable",
+ "rawSpec": "^3.1.3",
+ "saveSpec": null,
+ "fetchSpec": "^3.1.3"
+ },
+ "_requiredBy": [
+ "/strtok3"
+ ],
+ "_resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-3.1.3.tgz",
+ "_shasum": "932480d46cf6aa553c46c68566c4fb69a82cd2b1",
+ "_spec": "peek-readable@^3.1.3",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/strtok3",
+ "author": {
+ "name": "Borewit",
+ "url": "https://github.com/Borewit"
+ },
+ "bugs": {
+ "url": "https://github.com/Borewit/peek-readable/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Read and peek from a readable stream",
+ "devDependencies": {
+ "@types/mocha": "^8.2.0",
+ "@types/node": "^14.14.20",
+ "@typescript-eslint/eslint-plugin": "^2.34.0",
+ "@typescript-eslint/parser": "^2.34.0",
+ "add": "^2.0.6",
+ "chai": "^4.2.0",
+ "coveralls": "^3.1.0",
+ "del-cli": "^3.0.1",
+ "eslint": "^6.8.0",
+ "mocha": "^7.2.0",
+ "nyc": "^15.1.0",
+ "remark-cli": "^9.0.0",
+ "remark-preset-lint-recommended": "^5.0.0",
+ "ts-node": "^9.1.1",
+ "typescript": "^4.1.3"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "lib/**/*.js",
+ "lib/**/*.d.ts"
+ ],
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Borewit"
+ },
+ "homepage": "https://github.com/Borewit/peek-readable#readme",
+ "keywords": [
+ "readable",
+ "buffer",
+ "stream",
+ "read"
+ ],
+ "license": "MIT",
+ "main": "lib/index.js",
+ "name": "peek-readable",
+ "nyc": {
+ "check-coverage": true,
+ "extension": [
+ ".ts"
+ ],
+ "sourceMap": true,
+ "instrument": true,
+ "reporter": [
+ "lcov",
+ "text"
+ ],
+ "report-dir": "coverage"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Borewit/peek-readable.git"
+ },
+ "scripts": {
+ "build": "npm run clean && npm run compile",
+ "clean": "del-cli lib/**/*.js lib/**/*.js.map lib/**/*.d.ts test/**/*.js test/**/*.js.map coverage .nyc_output",
+ "compile": "npm run compile-src && yarn run compile-test",
+ "compile-src": "tsc -p lib",
+ "compile-test": "tsc -p test",
+ "eslint": "eslint lib test --ext .ts --ignore-pattern *.d.ts",
+ "lint": "npm run lint-md && npm run eslint",
+ "lint-md": "remark -u preset-lint-recommended .",
+ "send-coveralls": "nyc report --reporter=text-lcov | coveralls",
+ "start": "npm run compile && npm run lint && npm run cover-test",
+ "test": "mocha --require ts-node/register --require source-map-support/register --full-trace test/*.ts",
+ "test-coverage": "nyc npm run test"
+ },
+ "types": "lib/index.d.ts",
+ "version": "3.1.3"
+}
diff --git a/node_modules/progress/CHANGELOG.md b/node_modules/progress/CHANGELOG.md
new file mode 100644
index 0000000..d9be0aa
--- /dev/null
+++ b/node_modules/progress/CHANGELOG.md
@@ -0,0 +1,115 @@
+
+2.0.0 / 2017-04-04
+==================
+
+ * Fix: check before using stream.clearLine to prevent crash in Docker
+ * Fix: fixed output multiline on windows cmd
+ * Fix: Bug with array length when window is too small
+ * Fix: Don't clear whole line every time; instead, clear everything after end of line
+ * Fix: Use `this.stream` instead of `console.log` when terminating a progress bar to ensure that, if a writable stream is provided, it uses that rather than process.stdout
+ * Fix: Bug causing potentially stale tokens on render
+ * Feature: configurable cursor
+ * Feature: feature to interrupt the bar and display a message
+ * Feature: Add rate reporting to progress bar
+ * Improvement: Add head option to specify head character
+ * Improvement: Rename tickTokens to tokens
+ * Improvement: Change default throttle time to 16ms
+ * Improvement: Rename renderDelay to renderThrottle
+ * Improvement: Add delay between render updates
+ * Docs: Add example and documentation for custom token usage
+ * Docs: Add head option to readme
+ * Docs: Updated README example for public use
+ * Docs: Add renderThrottle option to code documentation
+
+1.1.7 / 2014-06-30
+==================
+
+ * fixed a bug that occurs when a progress bar attempts to draw itself
+ on a console with very few columns
+
+1.1.6 / 2014-06-16
+==================
+
+ * now prevents progress bar from exceeding TTY width by limiting its width to
+ the with of the TTY
+
+1.1.5 / 2014-03-25
+==================
+
+ * updated documentation and various other repo maintenance
+ * updated makefile to run examples with `make`
+ * removed dependency on readline module
+
+1.1.4 / 2014-03-14
+==================
+
+ * now supports streams, for example output progress bar to stderr, while piping
+ stdout
+ * increases performance and flicker by remembering the last drawn progress bar
+
+1.1.3 / 2013-12-31
+==================
+
+ * fixes a bug where bar would bug when initializing
+ * allows to pass updated tokens when ticking or updating the bar
+ * fixes a bug where the bar would throw if skipping to far
+
+1.1.2 / 2013-10-17
+==================
+
+ * lets you pass an `fmt` and a `total` instead of an options object
+
+1.1.0 / 2013-09-18
+==================
+
+ * eta and elapsed tokens default to 0.0 instead of ?.?
+ * better JSDocs
+ * added back and forth example
+ * added method to update the progress bar to a specific percentage
+ * added an option to hide the bar on completion
+
+1.0.1 / 2013-08-07
+==================
+
+ * on os x readline now works, reverting the terminal hack
+
+1.0.0 / 2013-06-18
+==================
+
+ * remove .version
+ * merge pull request #15 from davglass/readline-osx
+ * on OSX revert back to terminal hack to avoid a readline bug
+
+0.1.0 / 2012-09-19
+==================
+
+ * fixed logic bug that caused bar to jump one extra space at the end [davglass]
+ * working with readline impl, even on Windows [davglass]
+ * using readline instead of the \r hack [davglass]
+
+0.0.5 / 2012-08-07
+==================
+
+ * add ability to tick by zero chunks - tick(0)
+ * fix ETA. Closes #4 [lwille]
+
+0.0.4 / 2011-11-14
+==================
+
+ * allow more recent versions of node
+
+0.0.3 / 2011-04-20
+==================
+
+ * changed; erase the line when complete
+
+0.0.2 / 2011-04-20
+==================
+
+ * added custom tokens support
+ * fixed; clear line before writing
+
+0.0.1 / 2010-01-03
+==================
+
+ * initial release
diff --git a/node_modules/progress/LICENSE b/node_modules/progress/LICENSE
new file mode 100644
index 0000000..4608b39
--- /dev/null
+++ b/node_modules/progress/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2017 TJ Holowaychuk <tj@vision-media.ca>
+
+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:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/progress/Makefile b/node_modules/progress/Makefile
new file mode 100644
index 0000000..f933be1
--- /dev/null
+++ b/node_modules/progress/Makefile
@@ -0,0 +1,8 @@
+
+EXAMPLES = $(foreach EXAMPLE, $(wildcard examples/*.js), $(EXAMPLE))
+
+.PHONY: test
+test: $(EXAMPLES)
+
+.PHONY: $(EXAMPLES)
+$(EXAMPLES): ; node $@ && echo
diff --git a/node_modules/progress/Readme.md b/node_modules/progress/Readme.md
new file mode 100644
index 0000000..6d4271a
--- /dev/null
+++ b/node_modules/progress/Readme.md
@@ -0,0 +1,146 @@
+Flexible ascii progress bar.
+
+## Installation
+
+```bash
+$ npm install progress
+```
+
+## Usage
+
+First we create a `ProgressBar`, giving it a format string
+as well as the `total`, telling the progress bar when it will
+be considered complete. After that all we need to do is `tick()` appropriately.
+
+```javascript
+var ProgressBar = require('progress');
+
+var bar = new ProgressBar(':bar', { total: 10 });
+var timer = setInterval(function () {
+ bar.tick();
+ if (bar.complete) {
+ console.log('\ncomplete\n');
+ clearInterval(timer);
+ }
+}, 100);
+```
+
+### Options
+
+These are keys in the options object you can pass to the progress bar along with
+`total` as seen in the example above.
+
+- `curr` current completed index
+- `total` total number of ticks to complete
+- `width` the displayed width of the progress bar defaulting to total
+- `stream` the output stream defaulting to stderr
+- `head` head character defaulting to complete character
+- `complete` completion character defaulting to "="
+- `incomplete` incomplete character defaulting to "-"
+- `renderThrottle` minimum time between updates in milliseconds defaulting to 16
+- `clear` option to clear the bar on completion defaulting to false
+- `callback` optional function to call when the progress bar completes
+
+### Tokens
+
+These are tokens you can use in the format of your progress bar.
+
+- `:bar` the progress bar itself
+- `:current` current tick number
+- `:total` total ticks
+- `:elapsed` time elapsed in seconds
+- `:percent` completion percentage
+- `:eta` estimated completion time in seconds
+- `:rate` rate of ticks per second
+
+### Custom Tokens
+
+You can define custom tokens by adding a `{'name': value}` object parameter to your method (`tick()`, `update()`, etc.) calls.
+
+```javascript
+var bar = new ProgressBar(':current: :token1 :token2', { total: 3 })
+bar.tick({
+ 'token1': "Hello",
+ 'token2': "World!\n"
+})
+bar.tick(2, {
+ 'token1': "Goodbye",
+ 'token2': "World!"
+})
+```
+The above example would result in the output below.
+
+```
+1: Hello World!
+3: Goodbye World!
+```
+
+## Examples
+
+### Download
+
+In our download example each tick has a variable influence, so we pass the chunk
+length which adjusts the progress bar appropriately relative to the total
+length.
+
+```javascript
+var ProgressBar = require('progress');
+var https = require('https');
+
+var req = https.request({
+ host: 'download.github.com',
+ port: 443,
+ path: '/visionmedia-node-jscoverage-0d4608a.zip'
+});
+
+req.on('response', function(res){
+ var len = parseInt(res.headers['content-length'], 10);
+
+ console.log();
+ var bar = new ProgressBar(' downloading [:bar] :rate/bps :percent :etas', {
+ complete: '=',
+ incomplete: ' ',
+ width: 20,
+ total: len
+ });
+
+ res.on('data', function (chunk) {
+ bar.tick(chunk.length);
+ });
+
+ res.on('end', function () {
+ console.log('\n');
+ });
+});
+
+req.end();
+```
+
+The above example result in a progress bar like the one below.
+
+```
+downloading [===== ] 39/bps 29% 3.7s
+```
+
+### Interrupt
+
+To display a message during progress bar execution, use `interrupt()`
+```javascript
+var ProgressBar = require('progress');
+
+var bar = new ProgressBar(':bar :current/:total', { total: 10 });
+var timer = setInterval(function () {
+ bar.tick();
+ if (bar.complete) {
+ clearInterval(timer);
+ } else if (bar.curr === 5) {
+ bar.interrupt('this message appears above the progress bar\ncurrent progress is ' + bar.curr + '/' + bar.total);
+ }
+}, 1000);
+```
+
+You can see more examples in the `examples` folder.
+
+## License
+
+MIT
diff --git a/node_modules/progress/index.js b/node_modules/progress/index.js
new file mode 100644
index 0000000..4449dd3
--- /dev/null
+++ b/node_modules/progress/index.js
@@ -0,0 +1 @@
+module.exports = require('./lib/node-progress');
diff --git a/node_modules/progress/lib/node-progress.js b/node_modules/progress/lib/node-progress.js
new file mode 100644
index 0000000..8eb0740
--- /dev/null
+++ b/node_modules/progress/lib/node-progress.js
@@ -0,0 +1,236 @@
+/*!
+ * node-progress
+ * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Expose `ProgressBar`.
+ */
+
+exports = module.exports = ProgressBar;
+
+/**
+ * Initialize a `ProgressBar` with the given `fmt` string and `options` or
+ * `total`.
+ *
+ * Options:
+ *
+ * - `curr` current completed index
+ * - `total` total number of ticks to complete
+ * - `width` the displayed width of the progress bar defaulting to total
+ * - `stream` the output stream defaulting to stderr
+ * - `head` head character defaulting to complete character
+ * - `complete` completion character defaulting to "="
+ * - `incomplete` incomplete character defaulting to "-"
+ * - `renderThrottle` minimum time between updates in milliseconds defaulting to 16
+ * - `callback` optional function to call when the progress bar completes
+ * - `clear` will clear the progress bar upon termination
+ *
+ * Tokens:
+ *
+ * - `:bar` the progress bar itself
+ * - `:current` current tick number
+ * - `:total` total ticks
+ * - `:elapsed` time elapsed in seconds
+ * - `:percent` completion percentage
+ * - `:eta` eta in seconds
+ * - `:rate` rate of ticks per second
+ *
+ * @param {string} fmt
+ * @param {object|number} options or total
+ * @api public
+ */
+
+function ProgressBar(fmt, options) {
+ this.stream = options.stream || process.stderr;
+
+ if (typeof(options) == 'number') {
+ var total = options;
+ options = {};
+ options.total = total;
+ } else {
+ options = options || {};
+ if ('string' != typeof fmt) throw new Error('format required');
+ if ('number' != typeof options.total) throw new Error('total required');
+ }
+
+ this.fmt = fmt;
+ this.curr = options.curr || 0;
+ this.total = options.total;
+ this.width = options.width || this.total;
+ this.clear = options.clear
+ this.chars = {
+ complete : options.complete || '=',
+ incomplete : options.incomplete || '-',
+ head : options.head || (options.complete || '=')
+ };
+ this.renderThrottle = options.renderThrottle !== 0 ? (options.renderThrottle || 16) : 0;
+ this.lastRender = -Infinity;
+ this.callback = options.callback || function () {};
+ this.tokens = {};
+ this.lastDraw = '';
+}
+
+/**
+ * "tick" the progress bar with optional `len` and optional `tokens`.
+ *
+ * @param {number|object} len or tokens
+ * @param {object} tokens
+ * @api public
+ */
+
+ProgressBar.prototype.tick = function(len, tokens){
+ if (len !== 0)
+ len = len || 1;
+
+ // swap tokens
+ if ('object' == typeof len) tokens = len, len = 1;
+ if (tokens) this.tokens = tokens;
+
+ // start time for eta
+ if (0 == this.curr) this.start = new Date;
+
+ this.curr += len
+
+ // try to render
+ this.render();
+
+ // progress complete
+ if (this.curr >= this.total) {
+ this.render(undefined, true);
+ this.complete = true;
+ this.terminate();
+ this.callback(this);
+ return;
+ }
+};
+
+/**
+ * Method to render the progress bar with optional `tokens` to place in the
+ * progress bar's `fmt` field.
+ *
+ * @param {object} tokens
+ * @api public
+ */
+
+ProgressBar.prototype.render = function (tokens, force) {
+ force = force !== undefined ? force : false;
+ if (tokens) this.tokens = tokens;
+
+ if (!this.stream.isTTY) return;
+
+ var now = Date.now();
+ var delta = now - this.lastRender;
+ if (!force && (delta < this.renderThrottle)) {
+ return;
+ } else {
+ this.lastRender = now;
+ }
+
+ var ratio = this.curr / this.total;
+ ratio = Math.min(Math.max(ratio, 0), 1);
+
+ var percent = Math.floor(ratio * 100);
+ var incomplete, complete, completeLength;
+ var elapsed = new Date - this.start;
+ var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1);
+ var rate = this.curr / (elapsed / 1000);
+
+ /* populate the bar template with percentages and timestamps */
+ var str = this.fmt
+ .replace(':current', this.curr)
+ .replace(':total', this.total)
+ .replace(':elapsed', isNaN(elapsed) ? '0.0' : (elapsed / 1000).toFixed(1))
+ .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? '0.0' : (eta / 1000)
+ .toFixed(1))
+ .replace(':percent', percent.toFixed(0) + '%')
+ .replace(':rate', Math.round(rate));
+
+ /* compute the available space (non-zero) for the bar */
+ var availableSpace = Math.max(0, this.stream.columns - str.replace(':bar', '').length);
+ if(availableSpace && process.platform === 'win32'){
+ availableSpace = availableSpace - 1;
+ }
+
+ var width = Math.min(this.width, availableSpace);
+
+ /* TODO: the following assumes the user has one ':bar' token */
+ completeLength = Math.round(width * ratio);
+ complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete);
+ incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete);
+
+ /* add head to the complete string */
+ if(completeLength > 0)
+ complete = complete.slice(0, -1) + this.chars.head;
+
+ /* fill in the actual progress bar */
+ str = str.replace(':bar', complete + incomplete);
+
+ /* replace the extra tokens */
+ if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]);
+
+ if (this.lastDraw !== str) {
+ this.stream.cursorTo(0);
+ this.stream.write(str);
+ this.stream.clearLine(1);
+ this.lastDraw = str;
+ }
+};
+
+/**
+ * "update" the progress bar to represent an exact percentage.
+ * The ratio (between 0 and 1) specified will be multiplied by `total` and
+ * floored, representing the closest available "tick." For example, if a
+ * progress bar has a length of 3 and `update(0.5)` is called, the progress
+ * will be set to 1.
+ *
+ * A ratio of 0.5 will attempt to set the progress to halfway.
+ *
+ * @param {number} ratio The ratio (between 0 and 1 inclusive) to set the
+ * overall completion to.
+ * @api public
+ */
+
+ProgressBar.prototype.update = function (ratio, tokens) {
+ var goal = Math.floor(ratio * this.total);
+ var delta = goal - this.curr;
+
+ this.tick(delta, tokens);
+};
+
+/**
+ * "interrupt" the progress bar and write a message above it.
+ * @param {string} message The message to write.
+ * @api public
+ */
+
+ProgressBar.prototype.interrupt = function (message) {
+ // clear the current line
+ this.stream.clearLine();
+ // move the cursor to the start of the line
+ this.stream.cursorTo(0);
+ // write the message text
+ this.stream.write(message);
+ // terminate the line after writing the message
+ this.stream.write('\n');
+ // re-display the progress bar with its lastDraw
+ this.stream.write(this.lastDraw);
+};
+
+/**
+ * Terminates a progress bar.
+ *
+ * @api public
+ */
+
+ProgressBar.prototype.terminate = function () {
+ if (this.clear) {
+ if (this.stream.clearLine) {
+ this.stream.clearLine();
+ this.stream.cursorTo(0);
+ }
+ } else {
+ this.stream.write('\n');
+ }
+};
diff --git a/node_modules/progress/package.json b/node_modules/progress/package.json
new file mode 100644
index 0000000..10944bc
--- /dev/null
+++ b/node_modules/progress/package.json
@@ -0,0 +1,73 @@
+{
+ "_args": [
+ [
+ "progress@2.0.3",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "progress@2.0.3",
+ "_id": "progress@2.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "_location": "/progress",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "progress@2.0.3",
+ "name": "progress",
+ "escapedName": "progress",
+ "rawSpec": "2.0.3",
+ "saveSpec": null,
+ "fetchSpec": "2.0.3"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "_spec": "2.0.3",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "bugs": {
+ "url": "https://github.com/visionmedia/node-progress/issues"
+ },
+ "contributors": [
+ {
+ "name": "Christoffer Hallas",
+ "email": "christoffer.hallas@gmail.com"
+ },
+ {
+ "name": "Jordan Scales",
+ "email": "scalesjordan@gmail.com"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ },
+ {
+ "name": "Marco Brack",
+ "email": "PapstDonB@Googlemail.com"
+ }
+ ],
+ "dependencies": {},
+ "description": "Flexible ascii progress bar",
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "homepage": "https://github.com/visionmedia/node-progress#readme",
+ "keywords": [
+ "cli",
+ "progress"
+ ],
+ "license": "MIT",
+ "main": "./index.js",
+ "name": "progress",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/node-progress.git"
+ },
+ "version": "2.0.3"
+}
diff --git a/node_modules/pump/.travis.yml b/node_modules/pump/.travis.yml
new file mode 100644
index 0000000..17f9433
--- /dev/null
+++ b/node_modules/pump/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+
+script: "npm test"
diff --git a/node_modules/pump/LICENSE b/node_modules/pump/LICENSE
new file mode 100644
index 0000000..757562e
--- /dev/null
+++ b/node_modules/pump/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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. \ No newline at end of file
diff --git a/node_modules/pump/README.md b/node_modules/pump/README.md
new file mode 100644
index 0000000..4c81471
--- /dev/null
+++ b/node_modules/pump/README.md
@@ -0,0 +1,65 @@
+# pump
+
+pump is a small node module that pipes streams together and destroys all of them if one of them closes.
+
+```
+npm install pump
+```
+
+[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
+
+## What problem does it solve?
+
+When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
+You are also not able to provide a callback to tell when then pipe has finished.
+
+pump does these two things for you
+
+## Usage
+
+Simply pass the streams you want to pipe together to pump and add an optional callback
+
+``` js
+var pump = require('pump')
+var fs = require('fs')
+
+var source = fs.createReadStream('/dev/random')
+var dest = fs.createWriteStream('/dev/null')
+
+pump(source, dest, function(err) {
+ console.log('pipe finished', err)
+})
+
+setTimeout(function() {
+ dest.destroy() // when dest is closed pump will destroy source
+}, 1000)
+```
+
+You can use pump to pipe more than two streams together as well
+
+``` js
+var transform = someTransformStream()
+
+pump(source, transform, anotherTransform, dest, function(err) {
+ console.log('pipe finished', err)
+})
+```
+
+If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
+
+Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do:
+
+```
+return pump(s1, s2) // returns s2
+```
+
+If you want to return a stream that combines *both* s1 and s2 to a single stream use
+[pumpify](https://github.com/mafintosh/pumpify) instead.
+
+## License
+
+MIT
+
+## Related
+
+`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/node_modules/pump/index.js b/node_modules/pump/index.js
new file mode 100644
index 0000000..c15059f
--- /dev/null
+++ b/node_modules/pump/index.js
@@ -0,0 +1,82 @@
+var once = require('once')
+var eos = require('end-of-stream')
+var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
+
+var noop = function () {}
+var ancient = /^v?\.0/.test(process.version)
+
+var isFn = function (fn) {
+ return typeof fn === 'function'
+}
+
+var isFS = function (stream) {
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
+ if (!fs) return false // browser
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
+}
+
+var isRequest = function (stream) {
+ return stream.setHeader && isFn(stream.abort)
+}
+
+var destroyer = function (stream, reading, writing, callback) {
+ callback = once(callback)
+
+ var closed = false
+ stream.on('close', function () {
+ closed = true
+ })
+
+ eos(stream, {readable: reading, writable: writing}, function (err) {
+ if (err) return callback(err)
+ closed = true
+ callback()
+ })
+
+ var destroyed = false
+ return function (err) {
+ if (closed) return
+ if (destroyed) return
+ destroyed = true
+
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
+
+ if (isFn(stream.destroy)) return stream.destroy()
+
+ callback(err || new Error('stream was destroyed'))
+ }
+}
+
+var call = function (fn) {
+ fn()
+}
+
+var pipe = function (from, to) {
+ return from.pipe(to)
+}
+
+var pump = function () {
+ var streams = Array.prototype.slice.call(arguments)
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
+
+ if (Array.isArray(streams[0])) streams = streams[0]
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
+
+ var error
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1
+ var writing = i > 0
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err
+ if (err) destroys.forEach(call)
+ if (reading) return
+ destroys.forEach(call)
+ callback(error)
+ })
+ })
+
+ return streams.reduce(pipe)
+}
+
+module.exports = pump
diff --git a/node_modules/pump/package.json b/node_modules/pump/package.json
new file mode 100644
index 0000000..5185513
--- /dev/null
+++ b/node_modules/pump/package.json
@@ -0,0 +1,62 @@
+{
+ "_args": [
+ [
+ "pump@3.0.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "pump@3.0.0",
+ "_id": "pump@3.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "_location": "/pump",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "pump@3.0.0",
+ "name": "pump",
+ "escapedName": "pump",
+ "rawSpec": "3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "3.0.0"
+ },
+ "_requiredBy": [
+ "/tar-fs"
+ ],
+ "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "_spec": "3.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Mathias Buus Madsen",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "browser": {
+ "fs": false
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/pump/issues"
+ },
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ },
+ "description": "pipe streams together and close all of them if one of them closes",
+ "homepage": "https://github.com/mafintosh/pump#readme",
+ "keywords": [
+ "streams",
+ "pipe",
+ "destroy",
+ "callback"
+ ],
+ "license": "MIT",
+ "name": "pump",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mafintosh/pump.git"
+ },
+ "scripts": {
+ "test": "node test-browser.js && node test-node.js"
+ },
+ "version": "3.0.0"
+}
diff --git a/node_modules/pump/test-browser.js b/node_modules/pump/test-browser.js
new file mode 100644
index 0000000..9a06c8a
--- /dev/null
+++ b/node_modules/pump/test-browser.js
@@ -0,0 +1,66 @@
+var stream = require('stream')
+var pump = require('./index')
+
+var rs = new stream.Readable()
+var ws = new stream.Writable()
+
+rs._read = function (size) {
+ this.push(Buffer(size).fill('abc'))
+}
+
+ws._write = function (chunk, encoding, cb) {
+ setTimeout(function () {
+ cb()
+ }, 100)
+}
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-browser.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('finish', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('end', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res !== ws) {
+ throw new Error('should return last stream')
+}
+
+setTimeout(function () {
+ rs.push(null)
+ rs.emit('close')
+}, 1000)
+
+var timeout = setTimeout(function () {
+ check()
+ throw new Error('timeout')
+}, 5000)
diff --git a/node_modules/pump/test-node.js b/node_modules/pump/test-node.js
new file mode 100644
index 0000000..561251a
--- /dev/null
+++ b/node_modules/pump/test-node.js
@@ -0,0 +1,53 @@
+var pump = require('./index')
+
+var rs = require('fs').createReadStream('/dev/random')
+var ws = require('fs').createWriteStream('/dev/null')
+
+var toHex = function () {
+ var reverse = new (require('stream').Transform)()
+
+ reverse._transform = function (chunk, enc, callback) {
+ reverse.push(chunk.toString('hex'))
+ callback()
+ }
+
+ return reverse
+}
+
+var wsClosed = false
+var rsClosed = false
+var callbackCalled = false
+
+var check = function () {
+ if (wsClosed && rsClosed && callbackCalled) {
+ console.log('test-node.js passes')
+ clearTimeout(timeout)
+ }
+}
+
+ws.on('close', function () {
+ wsClosed = true
+ check()
+})
+
+rs.on('close', function () {
+ rsClosed = true
+ check()
+})
+
+var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
+ callbackCalled = true
+ check()
+})
+
+if (res !== ws) {
+ throw new Error('should return last stream')
+}
+
+setTimeout(function () {
+ rs.destroy()
+}, 1000)
+
+var timeout = setTimeout(function () {
+ throw new Error('timeout')
+}, 5000)
diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md
new file mode 100644
index 0000000..f478d58
--- /dev/null
+++ b/node_modules/readable-stream/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+* (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+* (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md
new file mode 100644
index 0000000..16ffb93
--- /dev/null
+++ b/node_modules/readable-stream/GOVERNANCE.md
@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited. There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting. This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions. If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer. If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus. See
+"WG Membership" above.
diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE
new file mode 100644
index 0000000..2873b3b
--- /dev/null
+++ b/node_modules/readable-stream/LICENSE
@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
+"""
diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md
new file mode 100644
index 0000000..6f035ab
--- /dev/null
+++ b/node_modules/readable-stream/README.md
@@ -0,0 +1,106 @@
+# readable-stream
+
+***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+This package is a mirror of the streams implementations in Node.js.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.19.0/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+## Version 3.x.x
+
+v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
+
+1. Error codes: https://github.com/nodejs/node/pull/13310,
+ https://github.com/nodejs/node/pull/13291,
+ https://github.com/nodejs/node/pull/16589,
+ https://github.com/nodejs/node/pull/15042,
+ https://github.com/nodejs/node/pull/15665,
+ https://github.com/nodejs/readable-stream/pull/344
+2. 'readable' have precedence over flowing
+ https://github.com/nodejs/node/pull/18994
+3. make virtual methods errors consistent
+ https://github.com/nodejs/node/pull/18813
+4. updated streams error handling
+ https://github.com/nodejs/node/pull/18438
+5. writable.end should return this.
+ https://github.com/nodejs/node/pull/18780
+6. readable continues to read when push('')
+ https://github.com/nodejs/node/pull/18211
+7. add custom inspect to BufferList
+ https://github.com/nodejs/node/pull/17907
+8. always defer 'readable' with nextTick
+ https://github.com/nodejs/node/pull/17979
+
+## Version 2.x.x
+v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11.
+
+### Big Thanks
+
+Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce]
+
+# Usage
+
+You can swap your `require('stream')` with `require('readable-stream')`
+without any changes, if you are just using one of the main classes and
+functions.
+
+```js
+const {
+ Readable,
+ Writable,
+ Transform,
+ Duplex,
+ pipeline,
+ finished
+} = require('readable-stream')
+````
+
+Note that `require('stream')` will return `Stream`, while
+`require('readable-stream')` will return `Readable`. We discourage using
+whatever is exported directly, but rather use one of the properties as
+shown in the example above.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+ - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+ - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
+* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) &lt;yoshuawuyts@gmail.com&gt;
+
+[sauce]: https://saucelabs.com
diff --git a/node_modules/readable-stream/errors-browser.js b/node_modules/readable-stream/errors-browser.js
new file mode 100644
index 0000000..fb8e73e
--- /dev/null
+++ b/node_modules/readable-stream/errors-browser.js
@@ -0,0 +1,127 @@
+'use strict';
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
+
+var codes = {};
+
+function createErrorType(code, message, Base) {
+ if (!Base) {
+ Base = Error;
+ }
+
+ function getMessage(arg1, arg2, arg3) {
+ if (typeof message === 'string') {
+ return message;
+ } else {
+ return message(arg1, arg2, arg3);
+ }
+ }
+
+ var NodeError =
+ /*#__PURE__*/
+ function (_Base) {
+ _inheritsLoose(NodeError, _Base);
+
+ function NodeError(arg1, arg2, arg3) {
+ return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
+ }
+
+ return NodeError;
+ }(Base);
+
+ NodeError.prototype.name = Base.name;
+ NodeError.prototype.code = code;
+ codes[code] = NodeError;
+} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
+
+
+function oneOf(expected, thing) {
+ if (Array.isArray(expected)) {
+ var len = expected.length;
+ expected = expected.map(function (i) {
+ return String(i);
+ });
+
+ if (len > 2) {
+ return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1];
+ } else if (len === 2) {
+ return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
+ } else {
+ return "of ".concat(thing, " ").concat(expected[0]);
+ }
+ } else {
+ return "of ".concat(thing, " ").concat(String(expected));
+ }
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
+
+
+function startsWith(str, search, pos) {
+ return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
+
+
+function endsWith(str, search, this_len) {
+ if (this_len === undefined || this_len > str.length) {
+ this_len = str.length;
+ }
+
+ return str.substring(this_len - search.length, this_len) === search;
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
+
+
+function includes(str, search, start) {
+ if (typeof start !== 'number') {
+ start = 0;
+ }
+
+ if (start + search.length > str.length) {
+ return false;
+ } else {
+ return str.indexOf(search, start) !== -1;
+ }
+}
+
+createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
+ return 'The value "' + value + '" is invalid for option "' + name + '"';
+}, TypeError);
+createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
+ // determiner: 'must be' or 'must not be'
+ var determiner;
+
+ if (typeof expected === 'string' && startsWith(expected, 'not ')) {
+ determiner = 'must not be';
+ expected = expected.replace(/^not /, '');
+ } else {
+ determiner = 'must be';
+ }
+
+ var msg;
+
+ if (endsWith(name, ' argument')) {
+ // For cases like 'first argument'
+ msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
+ } else {
+ var type = includes(name, '.') ? 'property' : 'argument';
+ msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
+ }
+
+ msg += ". Received type ".concat(typeof actual);
+ return msg;
+}, TypeError);
+createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
+createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
+ return 'The ' + name + ' method is not implemented';
+});
+createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
+createErrorType('ERR_STREAM_DESTROYED', function (name) {
+ return 'Cannot call ' + name + ' after a stream was destroyed';
+});
+createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
+createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
+createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
+createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
+createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
+ return 'Unknown encoding: ' + arg;
+}, TypeError);
+createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
+module.exports.codes = codes;
diff --git a/node_modules/readable-stream/errors.js b/node_modules/readable-stream/errors.js
new file mode 100644
index 0000000..8471526
--- /dev/null
+++ b/node_modules/readable-stream/errors.js
@@ -0,0 +1,116 @@
+'use strict';
+
+const codes = {};
+
+function createErrorType(code, message, Base) {
+ if (!Base) {
+ Base = Error
+ }
+
+ function getMessage (arg1, arg2, arg3) {
+ if (typeof message === 'string') {
+ return message
+ } else {
+ return message(arg1, arg2, arg3)
+ }
+ }
+
+ class NodeError extends Base {
+ constructor (arg1, arg2, arg3) {
+ super(getMessage(arg1, arg2, arg3));
+ }
+ }
+
+ NodeError.prototype.name = Base.name;
+ NodeError.prototype.code = code;
+
+ codes[code] = NodeError;
+}
+
+// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
+function oneOf(expected, thing) {
+ if (Array.isArray(expected)) {
+ const len = expected.length;
+ expected = expected.map((i) => String(i));
+ if (len > 2) {
+ return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` +
+ expected[len - 1];
+ } else if (len === 2) {
+ return `one of ${thing} ${expected[0]} or ${expected[1]}`;
+ } else {
+ return `of ${thing} ${expected[0]}`;
+ }
+ } else {
+ return `of ${thing} ${String(expected)}`;
+ }
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
+function startsWith(str, search, pos) {
+ return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
+function endsWith(str, search, this_len) {
+ if (this_len === undefined || this_len > str.length) {
+ this_len = str.length;
+ }
+ return str.substring(this_len - search.length, this_len) === search;
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
+function includes(str, search, start) {
+ if (typeof start !== 'number') {
+ start = 0;
+ }
+
+ if (start + search.length > str.length) {
+ return false;
+ } else {
+ return str.indexOf(search, start) !== -1;
+ }
+}
+
+createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
+ return 'The value "' + value + '" is invalid for option "' + name + '"'
+}, TypeError);
+createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
+ // determiner: 'must be' or 'must not be'
+ let determiner;
+ if (typeof expected === 'string' && startsWith(expected, 'not ')) {
+ determiner = 'must not be';
+ expected = expected.replace(/^not /, '');
+ } else {
+ determiner = 'must be';
+ }
+
+ let msg;
+ if (endsWith(name, ' argument')) {
+ // For cases like 'first argument'
+ msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`;
+ } else {
+ const type = includes(name, '.') ? 'property' : 'argument';
+ msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`;
+ }
+
+ msg += `. Received type ${typeof actual}`;
+ return msg;
+}, TypeError);
+createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
+createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
+ return 'The ' + name + ' method is not implemented'
+});
+createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
+createErrorType('ERR_STREAM_DESTROYED', function (name) {
+ return 'Cannot call ' + name + ' after a stream was destroyed';
+});
+createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
+createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
+createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
+createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
+createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
+ return 'Unknown encoding: ' + arg
+}, TypeError);
+createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
+
+module.exports.codes = codes;
diff --git a/node_modules/readable-stream/experimentalWarning.js b/node_modules/readable-stream/experimentalWarning.js
new file mode 100644
index 0000000..78e8414
--- /dev/null
+++ b/node_modules/readable-stream/experimentalWarning.js
@@ -0,0 +1,17 @@
+'use strict'
+
+var experimentalWarnings = new Set();
+
+function emitExperimentalWarning(feature) {
+ if (experimentalWarnings.has(feature)) return;
+ var msg = feature + ' is an experimental feature. This feature could ' +
+ 'change at any time';
+ experimentalWarnings.add(feature);
+ process.emitWarning(msg, 'ExperimentalWarning');
+}
+
+function noop() {}
+
+module.exports.emitExperimentalWarning = process.emitWarning
+ ? emitExperimentalWarning
+ : noop;
diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js
new file mode 100644
index 0000000..6752519
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_duplex.js
@@ -0,0 +1,139 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// 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.
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+'use strict';
+/*<replacement>*/
+
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+
+ for (var key in obj) {
+ keys.push(key);
+ }
+
+ return keys;
+};
+/*</replacement>*/
+
+
+module.exports = Duplex;
+
+var Readable = require('./_stream_readable');
+
+var Writable = require('./_stream_writable');
+
+require('inherits')(Duplex, Readable);
+
+{
+ // Allow the keys array to be GC'ed.
+ var keys = objectKeys(Writable.prototype);
+
+ for (var v = 0; v < keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+ }
+}
+
+function Duplex(options) {
+ if (!(this instanceof Duplex)) return new Duplex(options);
+ Readable.call(this, options);
+ Writable.call(this, options);
+ this.allowHalfOpen = true;
+
+ if (options) {
+ if (options.readable === false) this.readable = false;
+ if (options.writable === false) this.writable = false;
+
+ if (options.allowHalfOpen === false) {
+ this.allowHalfOpen = false;
+ this.once('end', onend);
+ }
+ }
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState.highWaterMark;
+ }
+});
+Object.defineProperty(Duplex.prototype, 'writableBuffer', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState && this._writableState.getBuffer();
+ }
+});
+Object.defineProperty(Duplex.prototype, 'writableLength', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState.length;
+ }
+}); // the no-half-open enforcer
+
+function onend() {
+ // If the writable side ended, then we're ok.
+ if (this._writableState.ended) return; // no more data can be written.
+ // But allow more writes to happen in this tick.
+
+ process.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+ self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return false;
+ }
+
+ return this._readableState.destroyed && this._writableState.destroyed;
+ },
+ set: function set(value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (this._readableState === undefined || this._writableState === undefined) {
+ return;
+ } // backward compatibility, the user is explicitly
+ // managing destroyed
+
+
+ this._readableState.destroyed = value;
+ this._writableState.destroyed = value;
+ }
+}); \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js
new file mode 100644
index 0000000..32e7414
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_passthrough.js
@@ -0,0 +1,39 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// 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.
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+require('inherits')(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+}; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js
new file mode 100644
index 0000000..192d451
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_readable.js
@@ -0,0 +1,1124 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// 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.
+'use strict';
+
+module.exports = Readable;
+/*<replacement>*/
+
+var Duplex;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+/*<replacement>*/
+
+var EE = require('events').EventEmitter;
+
+var EElistenerCount = function EElistenerCount(emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+/*<replacement>*/
+
+
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+
+var Buffer = require('buffer').Buffer;
+
+var OurUint8Array = global.Uint8Array || function () {};
+
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+/*<replacement>*/
+
+
+var debugUtil = require('util');
+
+var debug;
+
+if (debugUtil && debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+ debug = function debug() {};
+}
+/*</replacement>*/
+
+
+var BufferList = require('./internal/streams/buffer_list');
+
+var destroyImpl = require('./internal/streams/destroy');
+
+var _require = require('./internal/streams/state'),
+ getHighWaterMark = _require.getHighWaterMark;
+
+var _require$codes = require('../errors').codes,
+ ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
+ ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+ ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.
+
+
+var StringDecoder;
+var createReadableStreamAsyncIterator;
+var from;
+
+require('inherits')(Readable, Stream);
+
+var errorOrDestroy = destroyImpl.errorOrDestroy;
+var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
+
+function prependListener(emitter, event, fn) {
+ // Sadly this is not cacheable as some libraries bundle their own
+ // event emitter implementation with them.
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any
+ // userland ones. NEVER DO THIS. This is here only because this code needs
+ // to continue to work with older versions of Node.js that do not include
+ // the prependListener() method. The goal is to eventually remove this hack.
+
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
+function ReadableState(options, stream, isDuplex) {
+ Duplex = Duplex || require('./_stream_duplex');
+ options = options || {}; // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream.
+ // These options can be provided separately as readableXXX and writableXXX.
+
+ if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+
+ this.objectMode = !!options.objectMode;
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+
+ this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the
+ // linked list can remove elements from the beginning faster than
+ // array.shift()
+
+ this.buffer = new BufferList();
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted
+ // immediately, or on a later tick. We set this to true at first, because
+ // any actions that shouldn't happen until "later" should generally also
+ // not happen before the first read call.
+
+ this.sync = true; // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+ this.paused = true; // Should close be emitted on destroy. Defaults to true.
+
+ this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')
+
+ this.autoDestroy = !!options.autoDestroy; // has it been destroyed
+
+ this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+
+ this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s
+
+ this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled
+
+ this.readingMore = false;
+ this.decoder = null;
+ this.encoding = null;
+
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+ if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside
+ // the ReadableState constructor, at least with V8 6.5
+
+ var isDuplex = this instanceof Duplex;
+ this._readableState = new ReadableState(options, this, isDuplex); // legacy
+
+ this.readable = true;
+
+ if (options) {
+ if (typeof options.read === 'function') this._read = options.read;
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ }
+
+ Stream.call(this);
+}
+
+Object.defineProperty(Readable.prototype, 'destroyed', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ if (this._readableState === undefined) {
+ return false;
+ }
+
+ return this._readableState.destroyed;
+ },
+ set: function set(value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._readableState) {
+ return;
+ } // backward compatibility, the user is explicitly
+ // managing destroyed
+
+
+ this._readableState.destroyed = value;
+ }
+});
+Readable.prototype.destroy = destroyImpl.destroy;
+Readable.prototype._undestroy = destroyImpl.undestroy;
+
+Readable.prototype._destroy = function (err, cb) {
+ cb(err);
+}; // Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+
+
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+ var skipChunkCheck;
+
+ if (!state.objectMode) {
+ if (typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+
+ if (encoding !== state.encoding) {
+ chunk = Buffer.from(chunk, encoding);
+ encoding = '';
+ }
+
+ skipChunkCheck = true;
+ }
+ } else {
+ skipChunkCheck = true;
+ }
+
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
+}; // Unshift should *always* be something directly out of read()
+
+
+Readable.prototype.unshift = function (chunk) {
+ return readableAddChunk(this, chunk, null, true, false);
+};
+
+function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
+ debug('readableAddChunk', chunk);
+ var state = stream._readableState;
+
+ if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else {
+ var er;
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
+
+ if (er) {
+ errorOrDestroy(stream, er);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (addToFront) {
+ if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);
+ } else if (state.ended) {
+ errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
+ } else if (state.destroyed) {
+ return false;
+ } else {
+ state.reading = false;
+
+ if (state.decoder && !encoding) {
+ chunk = state.decoder.write(chunk);
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
+ } else {
+ addChunk(stream, state, chunk, false);
+ }
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ maybeReadMore(stream, state);
+ }
+ } // We can push more data if we are below the highWaterMark.
+ // Also, if we have no data yet, we can stand some more bytes.
+ // This is to work around cases where hwm=0, such as the repl.
+
+
+ return !state.ended && (state.length < state.highWaterMark || state.length === 0);
+}
+
+function addChunk(stream, state, chunk, addToFront) {
+ if (state.flowing && state.length === 0 && !state.sync) {
+ state.awaitDrain = 0;
+ stream.emit('data', chunk);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+ if (state.needReadable) emitReadable(stream);
+ }
+
+ maybeReadMore(stream, state);
+}
+
+function chunkInvalid(state, chunk) {
+ var er;
+
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);
+ }
+
+ return er;
+}
+
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+}; // backwards compatibility.
+
+
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ var decoder = new StringDecoder(enc);
+ this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8
+
+ this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:
+
+ var p = this._readableState.buffer.head;
+ var content = '';
+
+ while (p !== null) {
+ content += decoder.write(p.data);
+ p = p.next;
+ }
+
+ this._readableState.buffer.clear();
+
+ if (content !== '') this._readableState.buffer.push(content);
+ this._readableState.length = content.length;
+ return this;
+}; // Don't raise the hwm > 1GB
+
+
+var MAX_HWM = 0x40000000;
+
+function computeNewHighWaterMark(n) {
+ if (n >= MAX_HWM) {
+ // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
+ // tiny amounts
+ n--;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ n++;
+ }
+
+ return n;
+} // This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+
+
+function howMuchToRead(n, state) {
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
+ if (state.objectMode) return 1;
+
+ if (n !== n) {
+ // Only flow one buffer at a time
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
+ } // If we're asking for more than the current hwm, then raise the hwm.
+
+
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+ if (n <= state.length) return n; // Don't have enough
+
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ }
+
+ return state.length;
+} // you can override either this method, or the async _read(n) below.
+
+
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ n = parseInt(n, 10);
+ var state = this._readableState;
+ var nOrig = n;
+ if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+
+ if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.
+
+ if (n === 0 && state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ } // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+ // if we need a readable event, then we need to do some reading.
+
+
+ var doRead = state.needReadable;
+ debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some
+
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ } // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+
+
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ } else if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true; // if the length is currently zero, then we *need* a readable event.
+
+ if (state.length === 0) state.needReadable = true; // call internal read method
+
+ this._read(state.highWaterMark);
+
+ state.sync = false; // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+
+ if (!state.reading) n = howMuchToRead(nOrig, state);
+ }
+
+ var ret;
+ if (n > 0) ret = fromList(n, state);else ret = null;
+
+ if (ret === null) {
+ state.needReadable = state.length <= state.highWaterMark;
+ n = 0;
+ } else {
+ state.length -= n;
+ state.awaitDrain = 0;
+ }
+
+ if (state.length === 0) {
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.
+
+ if (nOrig !== n && state.ended) endReadable(this);
+ }
+
+ if (ret !== null) this.emit('data', ret);
+ return ret;
+};
+
+function onEofChunk(stream, state) {
+ debug('onEofChunk');
+ if (state.ended) return;
+
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+
+ state.ended = true;
+
+ if (state.sync) {
+ // if we are sync, wait until next tick to emit the data.
+ // Otherwise we risk emitting data in the flow()
+ // the readable code triggers during a read() call
+ emitReadable(stream);
+ } else {
+ // emit 'readable' now to make sure it gets picked up.
+ state.needReadable = false;
+
+ if (!state.emittedReadable) {
+ state.emittedReadable = true;
+ emitReadable_(stream);
+ }
+ }
+} // Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+
+
+function emitReadable(stream) {
+ var state = stream._readableState;
+ debug('emitReadable', state.needReadable, state.emittedReadable);
+ state.needReadable = false;
+
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ process.nextTick(emitReadable_, stream);
+ }
+}
+
+function emitReadable_(stream) {
+ var state = stream._readableState;
+ debug('emitReadable_', state.destroyed, state.length, state.ended);
+
+ if (!state.destroyed && (state.length || state.ended)) {
+ stream.emit('readable');
+ state.emittedReadable = false;
+ } // The stream needs another readable event if
+ // 1. It is not flowing, as the flow mechanism will take
+ // care of it.
+ // 2. It is not ended.
+ // 3. It is below the highWaterMark, so we can schedule
+ // another readable later.
+
+
+ state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;
+ flow(stream);
+} // at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+
+
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ process.nextTick(maybeReadMore_, stream, state);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ // Attempt to read more data if we should.
+ //
+ // The conditions for reading more data are (one of):
+ // - Not enough data buffered (state.length < state.highWaterMark). The loop
+ // is responsible for filling the buffer with enough data if such data
+ // is available. If highWaterMark is 0 and we are not in the flowing mode
+ // we should _not_ attempt to buffer any extra data. We'll get more data
+ // when the stream consumer calls read() instead.
+ // - No data in the buffer, and the stream is in flowing mode. In this mode
+ // the loop below is responsible for ensuring read() is called. Failing to
+ // call read here would abort the flow and there's no other mechanism for
+ // continuing the flow if the stream consumer has just subscribed to the
+ // 'data' event.
+ //
+ // In addition to the above conditions to keep reading data, the following
+ // conditions prevent the data from being read:
+ // - The stream has ended (state.ended).
+ // - There is already a pending 'read' operation (state.reading). This is a
+ // case where the the stream has called the implementation defined _read()
+ // method, but they are processing the call asynchronously and have _not_
+ // called push() with new data. In this case we skip performing more
+ // read()s. The execution ends in this method again after the _read() ends
+ // up calling push() with more data.
+ while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {
+ var len = state.length;
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length) // didn't get any data, stop spinning.
+ break;
+ }
+
+ state.readingMore = false;
+} // abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+
+
+Readable.prototype._read = function (n) {
+ errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));
+};
+
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
+ var endFn = doEnd ? onend : unpipe;
+ if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);
+ dest.on('unpipe', onunpipe);
+
+ function onunpipe(readable, unpipeInfo) {
+ debug('onunpipe');
+
+ if (readable === src) {
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
+ unpipeInfo.hasUnpiped = true;
+ cleanup();
+ }
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ } // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+
+
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+ var cleanedUp = false;
+
+ function cleanup() {
+ debug('cleanup'); // cleanup event handlers once the pipe is broken
+
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', unpipe);
+ src.removeListener('data', ondata);
+ cleanedUp = true; // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+
+ src.on('data', ondata);
+
+ function ondata(chunk) {
+ debug('ondata');
+ var ret = dest.write(chunk);
+ debug('dest.write', ret);
+
+ if (ret === false) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
+ debug('false write response, pause', state.awaitDrain);
+ state.awaitDrain++;
+ }
+
+ src.pause();
+ }
+ } // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+
+
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);
+ } // Make sure our error handler is attached before userland ones.
+
+
+ prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.
+
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+
+ dest.once('close', onclose);
+
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ } // tell the dest that it's being piped to
+
+
+ dest.emit('pipe', src); // start the flow if it hasn't been started already.
+
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function pipeOnDrainFunctionResult() {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+ var unpipeInfo = {
+ hasUnpiped: false
+ }; // if we're not piping anywhere, then do nothing.
+
+ if (state.pipesCount === 0) return this; // just one destination. most common case.
+
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes) return this;
+ if (!dest) dest = state.pipes; // got a match.
+
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
+ return this;
+ } // slow case. multiple pipe destinations.
+
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++) {
+ dests[i].emit('unpipe', this, {
+ hasUnpiped: false
+ });
+ }
+
+ return this;
+ } // try to find the right one.
+
+
+ var index = indexOf(state.pipes, dest);
+ if (index === -1) return this;
+ state.pipes.splice(index, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
+ dest.emit('unpipe', this, unpipeInfo);
+ return this;
+}; // set up data events if they are asked for
+// Ensure readable listeners eventually get something
+
+
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+ var state = this._readableState;
+
+ if (ev === 'data') {
+ // update readableListening so that resume() may be a no-op
+ // a few lines down. This is needed to support once('readable').
+ state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused
+
+ if (state.flowing !== false) this.resume();
+ } else if (ev === 'readable') {
+ if (!state.endEmitted && !state.readableListening) {
+ state.readableListening = state.needReadable = true;
+ state.flowing = false;
+ state.emittedReadable = false;
+ debug('on readable', state.length, state.reading);
+
+ if (state.length) {
+ emitReadable(this);
+ } else if (!state.reading) {
+ process.nextTick(nReadingNextTick, this);
+ }
+ }
+ }
+
+ return res;
+};
+
+Readable.prototype.addListener = Readable.prototype.on;
+
+Readable.prototype.removeListener = function (ev, fn) {
+ var res = Stream.prototype.removeListener.call(this, ev, fn);
+
+ if (ev === 'readable') {
+ // We need to check if there is someone still listening to
+ // readable and reset the state. However this needs to happen
+ // after readable has been emitted but before I/O (nextTick) to
+ // support once('readable', fn) cycles. This means that calling
+ // resume within the same tick will have no
+ // effect.
+ process.nextTick(updateReadableListening, this);
+ }
+
+ return res;
+};
+
+Readable.prototype.removeAllListeners = function (ev) {
+ var res = Stream.prototype.removeAllListeners.apply(this, arguments);
+
+ if (ev === 'readable' || ev === undefined) {
+ // We need to check if there is someone still listening to
+ // readable and reset the state. However this needs to happen
+ // after readable has been emitted but before I/O (nextTick) to
+ // support once('readable', fn) cycles. This means that calling
+ // resume within the same tick will have no
+ // effect.
+ process.nextTick(updateReadableListening, this);
+ }
+
+ return res;
+};
+
+function updateReadableListening(self) {
+ var state = self._readableState;
+ state.readableListening = self.listenerCount('readable') > 0;
+
+ if (state.resumeScheduled && !state.paused) {
+ // flowing needs to be set to true now, otherwise
+ // the upcoming resume will not flow.
+ state.flowing = true; // crude way to check if we should resume
+ } else if (self.listenerCount('data') > 0) {
+ self.resume();
+ }
+}
+
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+} // pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+
+
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+
+ if (!state.flowing) {
+ debug('resume'); // we flow only if there is no one listening
+ // for readable, but we still have to call
+ // resume()
+
+ state.flowing = !state.readableListening;
+ resume(this, state);
+ }
+
+ state.paused = false;
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ process.nextTick(resume_, stream, state);
+ }
+}
+
+function resume_(stream, state) {
+ debug('resume', state.reading);
+
+ if (!state.reading) {
+ stream.read(0);
+ }
+
+ state.resumeScheduled = false;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading) stream.read(0);
+}
+
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+
+ if (this._readableState.flowing !== false) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+
+ this._readableState.paused = true;
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+
+ while (state.flowing && stream.read() !== null) {
+ ;
+ }
+} // wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+
+
+Readable.prototype.wrap = function (stream) {
+ var _this = this;
+
+ var state = this._readableState;
+ var paused = false;
+ stream.on('end', function () {
+ debug('wrapped end');
+
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) _this.push(chunk);
+ }
+
+ _this.push(null);
+ });
+ stream.on('data', function (chunk) {
+ debug('wrapped data');
+ if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode
+
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
+
+ var ret = _this.push(chunk);
+
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ }); // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+
+ for (var i in stream) {
+ if (this[i] === undefined && typeof stream[i] === 'function') {
+ this[i] = function methodWrap(method) {
+ return function methodWrapReturnFunction() {
+ return stream[method].apply(stream, arguments);
+ };
+ }(i);
+ }
+ } // proxy certain important events.
+
+
+ for (var n = 0; n < kProxyEvents.length; n++) {
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
+ } // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+
+
+ this._read = function (n) {
+ debug('wrapped _read', n);
+
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return this;
+};
+
+if (typeof Symbol === 'function') {
+ Readable.prototype[Symbol.asyncIterator] = function () {
+ if (createReadableStreamAsyncIterator === undefined) {
+ createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');
+ }
+
+ return createReadableStreamAsyncIterator(this);
+ };
+}
+
+Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState.highWaterMark;
+ }
+});
+Object.defineProperty(Readable.prototype, 'readableBuffer', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState && this._readableState.buffer;
+ }
+});
+Object.defineProperty(Readable.prototype, 'readableFlowing', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState.flowing;
+ },
+ set: function set(state) {
+ if (this._readableState) {
+ this._readableState.flowing = state;
+ }
+ }
+}); // exposed for testing purposes only.
+
+Readable._fromList = fromList;
+Object.defineProperty(Readable.prototype, 'readableLength', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._readableState.length;
+ }
+}); // Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+// This function is designed to be inlinable, so please take care when making
+// changes to the function body.
+
+function fromList(n, state) {
+ // nothing buffered
+ if (state.length === 0) return null;
+ var ret;
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
+ // read it all, truncate the list
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);
+ state.buffer.clear();
+ } else {
+ // read part of list
+ ret = state.buffer.consume(n, state.decoder);
+ }
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+ debug('endReadable', state.endEmitted);
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ process.nextTick(endReadableNT, state, stream);
+ }
+}
+
+function endReadableNT(state, stream) {
+ debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.
+
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+
+ if (state.autoDestroy) {
+ // In case of duplex streams we need a way to detect
+ // if the writable side is ready for autoDestroy as well
+ var wState = stream._writableState;
+
+ if (!wState || wState.autoDestroy && wState.finished) {
+ stream.destroy();
+ }
+ }
+ }
+}
+
+if (typeof Symbol === 'function') {
+ Readable.from = function (iterable, opts) {
+ if (from === undefined) {
+ from = require('./internal/streams/from');
+ }
+
+ return from(Readable, iterable, opts);
+ };
+}
+
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+
+ return -1;
+} \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js
new file mode 100644
index 0000000..41a738c
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_transform.js
@@ -0,0 +1,201 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// 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.
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+'use strict';
+
+module.exports = Transform;
+
+var _require$codes = require('../errors').codes,
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+ ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
+ ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,
+ ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
+
+var Duplex = require('./_stream_duplex');
+
+require('inherits')(Transform, Duplex);
+
+function afterTransform(er, data) {
+ var ts = this._transformState;
+ ts.transforming = false;
+ var cb = ts.writecb;
+
+ if (cb === null) {
+ return this.emit('error', new ERR_MULTIPLE_CALLBACK());
+ }
+
+ ts.writechunk = null;
+ ts.writecb = null;
+ if (data != null) // single equals check for both `null` and `undefined`
+ this.push(data);
+ cb(er);
+ var rs = this._readableState;
+ rs.reading = false;
+
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ this._read(rs.highWaterMark);
+ }
+}
+
+function Transform(options) {
+ if (!(this instanceof Transform)) return new Transform(options);
+ Duplex.call(this, options);
+ this._transformState = {
+ afterTransform: afterTransform.bind(this),
+ needTransform: false,
+ transforming: false,
+ writecb: null,
+ writechunk: null,
+ writeencoding: null
+ }; // start out asking for a readable event once data is transformed.
+
+ this._readableState.needReadable = true; // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+
+ this._readableState.sync = false;
+
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ } // When the writable side finishes, then flush out anything remaining.
+
+
+ this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+ var _this = this;
+
+ if (typeof this._flush === 'function' && !this._readableState.destroyed) {
+ this._flush(function (er, data) {
+ done(_this, er, data);
+ });
+ } else {
+ done(this, null, null);
+ }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+}; // This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+
+
+Transform.prototype._transform = function (chunk, encoding, cb) {
+ cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+}; // Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+
+
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+
+ if (ts.writechunk !== null && !ts.transforming) {
+ ts.transforming = true;
+
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+ Duplex.prototype._destroy.call(this, err, function (err2) {
+ cb(err2);
+ });
+};
+
+function done(stream, er, data) {
+ if (er) return stream.emit('error', er);
+ if (data != null) // single equals check for both `null` and `undefined`
+ stream.push(data); // TODO(BridgeAR): Write a test for these two error cases
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+
+ if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
+ if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
+ return stream.push(null);
+} \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js
new file mode 100644
index 0000000..a2634d7
--- /dev/null
+++ b/node_modules/readable-stream/lib/_stream_writable.js
@@ -0,0 +1,697 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// 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.
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+'use strict';
+
+module.exports = Writable;
+/* <replacement> */
+
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+} // It seems a linked list but it is not
+// there will be only 2 of these for each stream
+
+
+function CorkedRequest(state) {
+ var _this = this;
+
+ this.next = null;
+ this.entry = null;
+
+ this.finish = function () {
+ onCorkedFinish(_this, state);
+ };
+}
+/* </replacement> */
+
+/*<replacement>*/
+
+
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+/*<replacement>*/
+
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+
+var Buffer = require('buffer').Buffer;
+
+var OurUint8Array = global.Uint8Array || function () {};
+
+function _uint8ArrayToBuffer(chunk) {
+ return Buffer.from(chunk);
+}
+
+function _isUint8Array(obj) {
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+var destroyImpl = require('./internal/streams/destroy');
+
+var _require = require('./internal/streams/state'),
+ getHighWaterMark = _require.getHighWaterMark;
+
+var _require$codes = require('../errors').codes,
+ ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+ ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
+ ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,
+ ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,
+ ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,
+ ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,
+ ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
+
+var errorOrDestroy = destroyImpl.errorOrDestroy;
+
+require('inherits')(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream, isDuplex) {
+ Duplex = Duplex || require('./_stream_duplex');
+ options = options || {}; // Duplex streams are both readable and writable, but share
+ // the same options object.
+ // However, some cases require setting options to different
+ // values for the readable and the writable sides of the duplex stream,
+ // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.
+
+ if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+
+ this.objectMode = !!options.objectMode;
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+
+ this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called
+
+ this.finalCalled = false; // drain event flag.
+
+ this.needDrain = false; // at the start of calling end()
+
+ this.ending = false; // when end() has been called, and returned
+
+ this.ended = false; // when 'finish' is emitted
+
+ this.finished = false; // has it been destroyed
+
+ this.destroyed = false; // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+
+ this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+
+ this.length = 0; // a flag to see when we're in the middle of a write.
+
+ this.writing = false; // when true all writes will be buffered until .uncork() call
+
+ this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+
+ this.sync = true; // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+
+ this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)
+
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ }; // the callback that the user supplies to write(chunk,encoding,cb)
+
+
+ this.writecb = null; // the amount that is being written when _write is called.
+
+ this.writelen = 0;
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null; // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+
+ this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+
+ this.prefinished = false; // True if the error was already emitted and should not be thrown again
+
+ this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.
+
+ this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')
+
+ this.autoDestroy = !!options.autoDestroy; // count buffered requests
+
+ this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+
+ return out;
+};
+
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(function writableStateBufferGetter() {
+ return this.getBuffer();
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+ });
+ } catch (_) {}
+})(); // Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+
+
+var realHasInstance;
+
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+ realHasInstance = Function.prototype[Symbol.hasInstance];
+ Object.defineProperty(Writable, Symbol.hasInstance, {
+ value: function value(object) {
+ if (realHasInstance.call(this, object)) return true;
+ if (this !== Writable) return false;
+ return object && object._writableState instanceof WritableState;
+ }
+ });
+} else {
+ realHasInstance = function realHasInstance(object) {
+ return object instanceof this;
+ };
+}
+
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too.
+ // `realHasInstance` is necessary because using plain `instanceof`
+ // would return false, as no `_writableState` property is attached.
+ // Trying to use the custom `instanceof` for Writable here will also break the
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
+ // `_writableState` that would lead to infinite recursion.
+ // Checking for a Stream.Duplex instance is faster here instead of inside
+ // the WritableState constructor, at least with V8 6.5
+
+ var isDuplex = this instanceof Duplex;
+ if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);
+ this._writableState = new WritableState(options, this, isDuplex); // legacy.
+
+ this.writable = true;
+
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+ if (typeof options.writev === 'function') this._writev = options.writev;
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
+ if (typeof options.final === 'function') this._final = options.final;
+ }
+
+ Stream.call(this);
+} // Otherwise people can pipe Writable streams, which is just wrong.
+
+
+Writable.prototype.pipe = function () {
+ errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
+};
+
+function writeAfterEnd(stream, cb) {
+ var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb
+
+ errorOrDestroy(stream, er);
+ process.nextTick(cb, er);
+} // Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+
+
+function validChunk(stream, state, chunk, cb) {
+ var er;
+
+ if (chunk === null) {
+ er = new ERR_STREAM_NULL_VALUES();
+ } else if (typeof chunk !== 'string' && !state.objectMode) {
+ er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);
+ }
+
+ if (er) {
+ errorOrDestroy(stream, er);
+ process.nextTick(cb, er);
+ return false;
+ }
+
+ return true;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+ if (isBuf && !Buffer.isBuffer(chunk)) {
+ chunk = _uint8ArrayToBuffer(chunk);
+ }
+
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+ if (typeof cb !== 'function') cb = nop;
+ if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+ }
+ return ret;
+};
+
+Writable.prototype.cork = function () {
+ this._writableState.corked++;
+};
+
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+ if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+
+Object.defineProperty(Writable.prototype, 'writableBuffer', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState && this._writableState.getBuffer();
+ }
+});
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+ chunk = Buffer.from(chunk, encoding);
+ }
+
+ return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState.highWaterMark;
+ }
+}); // if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ var newChunk = decodeChunk(state, chunk, encoding);
+
+ if (chunk !== newChunk) {
+ isBuf = true;
+ encoding = 'buffer';
+ chunk = newChunk;
+ }
+ }
+
+ var len = state.objectMode ? 1 : chunk.length;
+ state.length += len;
+ var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.
+
+ if (!ret) state.needDrain = true;
+
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = {
+ chunk: chunk,
+ encoding: encoding,
+ isBuf: isBuf,
+ callback: cb,
+ next: null
+ };
+
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ --state.pendingcb;
+
+ if (sync) {
+ // defer the callback if we are being called synchronously
+ // to avoid piling up things on the stack
+ process.nextTick(cb, er); // this can emit finish, and it will always happen
+ // after error
+
+ process.nextTick(finishMaybe, stream, state);
+ stream._writableState.errorEmitted = true;
+ errorOrDestroy(stream, er);
+ } else {
+ // the caller expect this to happen before if
+ // it is async
+ cb(er);
+ stream._writableState.errorEmitted = true;
+ errorOrDestroy(stream, er); // this can emit finish, but finish must
+ // always follow error
+
+ finishMaybe(stream, state);
+ }
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+ if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();
+ onwriteStateUpdate(state);
+ if (er) onwriteError(stream, state, sync, er, cb);else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state) || stream.destroyed;
+
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ process.nextTick(afterWrite, stream, state, finished, cb);
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+} // Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+
+
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+} // if there's something in the buffer waiting, then process it
+
+
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+
+ if (stream._writev && entry && entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+ var count = 0;
+ var allBuffers = true;
+
+ while (entry) {
+ buffer[count] = entry;
+ if (!entry.isBuf) allBuffers = false;
+ entry = entry.next;
+ count += 1;
+ }
+
+ buffer.allBuffers = allBuffers;
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+
+ state.bufferedRequestCount = 0;
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+
+ if (state.writing) {
+ break;
+ }
+ }
+
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+ cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks
+
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ } // ignore unnecessary end() calls.
+
+
+ if (!state.ending) endWritable(this, state, cb);
+ return this;
+};
+
+Object.defineProperty(Writable.prototype, 'writableLength', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ return this._writableState.length;
+ }
+});
+
+function needFinish(state) {
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+
+function callFinal(stream, state) {
+ stream._final(function (err) {
+ state.pendingcb--;
+
+ if (err) {
+ errorOrDestroy(stream, err);
+ }
+
+ state.prefinished = true;
+ stream.emit('prefinish');
+ finishMaybe(stream, state);
+ });
+}
+
+function prefinish(stream, state) {
+ if (!state.prefinished && !state.finalCalled) {
+ if (typeof stream._final === 'function' && !state.destroyed) {
+ state.pendingcb++;
+ state.finalCalled = true;
+ process.nextTick(callFinal, stream, state);
+ } else {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+
+ if (need) {
+ prefinish(stream, state);
+
+ if (state.pendingcb === 0) {
+ state.finished = true;
+ stream.emit('finish');
+
+ if (state.autoDestroy) {
+ // In case of duplex streams we need a way to detect
+ // if the readable side is ready for autoDestroy as well
+ var rState = stream._readableState;
+
+ if (!rState || rState.autoDestroy && rState.endEmitted) {
+ stream.destroy();
+ }
+ }
+ }
+ }
+
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+
+ if (cb) {
+ if (state.finished) process.nextTick(cb);else stream.once('finish', cb);
+ }
+
+ state.ended = true;
+ stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+ var entry = corkReq.entry;
+ corkReq.entry = null;
+
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ } // reuse the free corkReq.
+
+
+ state.corkedRequestsFree.next = corkReq;
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+ // making it explicit this property is not enumerable
+ // because otherwise some prototype manipulation in
+ // userland will fail
+ enumerable: false,
+ get: function get() {
+ if (this._writableState === undefined) {
+ return false;
+ }
+
+ return this._writableState.destroyed;
+ },
+ set: function set(value) {
+ // we ignore the value if the stream
+ // has not been initialized yet
+ if (!this._writableState) {
+ return;
+ } // backward compatibility, the user is explicitly
+ // managing destroyed
+
+
+ this._writableState.destroyed = value;
+ }
+});
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+
+Writable.prototype._destroy = function (err, cb) {
+ cb(err);
+}; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/node_modules/readable-stream/lib/internal/streams/async_iterator.js
new file mode 100644
index 0000000..9fb615a
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/async_iterator.js
@@ -0,0 +1,207 @@
+'use strict';
+
+var _Object$setPrototypeO;
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var finished = require('./end-of-stream');
+
+var kLastResolve = Symbol('lastResolve');
+var kLastReject = Symbol('lastReject');
+var kError = Symbol('error');
+var kEnded = Symbol('ended');
+var kLastPromise = Symbol('lastPromise');
+var kHandlePromise = Symbol('handlePromise');
+var kStream = Symbol('stream');
+
+function createIterResult(value, done) {
+ return {
+ value: value,
+ done: done
+ };
+}
+
+function readAndResolve(iter) {
+ var resolve = iter[kLastResolve];
+
+ if (resolve !== null) {
+ var data = iter[kStream].read(); // we defer if data is null
+ // we can be expecting either 'end' or
+ // 'error'
+
+ if (data !== null) {
+ iter[kLastPromise] = null;
+ iter[kLastResolve] = null;
+ iter[kLastReject] = null;
+ resolve(createIterResult(data, false));
+ }
+ }
+}
+
+function onReadable(iter) {
+ // we wait for the next tick, because it might
+ // emit an error with process.nextTick
+ process.nextTick(readAndResolve, iter);
+}
+
+function wrapForNext(lastPromise, iter) {
+ return function (resolve, reject) {
+ lastPromise.then(function () {
+ if (iter[kEnded]) {
+ resolve(createIterResult(undefined, true));
+ return;
+ }
+
+ iter[kHandlePromise](resolve, reject);
+ }, reject);
+ };
+}
+
+var AsyncIteratorPrototype = Object.getPrototypeOf(function () {});
+var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
+ get stream() {
+ return this[kStream];
+ },
+
+ next: function next() {
+ var _this = this;
+
+ // if we have detected an error in the meanwhile
+ // reject straight away
+ var error = this[kError];
+
+ if (error !== null) {
+ return Promise.reject(error);
+ }
+
+ if (this[kEnded]) {
+ return Promise.resolve(createIterResult(undefined, true));
+ }
+
+ if (this[kStream].destroyed) {
+ // We need to defer via nextTick because if .destroy(err) is
+ // called, the error will be emitted via nextTick, and
+ // we cannot guarantee that there is no error lingering around
+ // waiting to be emitted.
+ return new Promise(function (resolve, reject) {
+ process.nextTick(function () {
+ if (_this[kError]) {
+ reject(_this[kError]);
+ } else {
+ resolve(createIterResult(undefined, true));
+ }
+ });
+ });
+ } // if we have multiple next() calls
+ // we will wait for the previous Promise to finish
+ // this logic is optimized to support for await loops,
+ // where next() is only called once at a time
+
+
+ var lastPromise = this[kLastPromise];
+ var promise;
+
+ if (lastPromise) {
+ promise = new Promise(wrapForNext(lastPromise, this));
+ } else {
+ // fast path needed to support multiple this.push()
+ // without triggering the next() queue
+ var data = this[kStream].read();
+
+ if (data !== null) {
+ return Promise.resolve(createIterResult(data, false));
+ }
+
+ promise = new Promise(this[kHandlePromise]);
+ }
+
+ this[kLastPromise] = promise;
+ return promise;
+ }
+}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {
+ return this;
+}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
+ var _this2 = this;
+
+ // destroy(err, cb) is a private API
+ // we can guarantee we have that here, because we control the
+ // Readable class this is attached to
+ return new Promise(function (resolve, reject) {
+ _this2[kStream].destroy(null, function (err) {
+ if (err) {
+ reject(err);
+ return;
+ }
+
+ resolve(createIterResult(undefined, true));
+ });
+ });
+}), _Object$setPrototypeO), AsyncIteratorPrototype);
+
+var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {
+ var _Object$create;
+
+ var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
+ value: stream,
+ writable: true
+ }), _defineProperty(_Object$create, kLastResolve, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kLastReject, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kError, {
+ value: null,
+ writable: true
+ }), _defineProperty(_Object$create, kEnded, {
+ value: stream._readableState.endEmitted,
+ writable: true
+ }), _defineProperty(_Object$create, kHandlePromise, {
+ value: function value(resolve, reject) {
+ var data = iterator[kStream].read();
+
+ if (data) {
+ iterator[kLastPromise] = null;
+ iterator[kLastResolve] = null;
+ iterator[kLastReject] = null;
+ resolve(createIterResult(data, false));
+ } else {
+ iterator[kLastResolve] = resolve;
+ iterator[kLastReject] = reject;
+ }
+ },
+ writable: true
+ }), _Object$create));
+ iterator[kLastPromise] = null;
+ finished(stream, function (err) {
+ if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
+ var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise
+ // returned by next() and store the error
+
+ if (reject !== null) {
+ iterator[kLastPromise] = null;
+ iterator[kLastResolve] = null;
+ iterator[kLastReject] = null;
+ reject(err);
+ }
+
+ iterator[kError] = err;
+ return;
+ }
+
+ var resolve = iterator[kLastResolve];
+
+ if (resolve !== null) {
+ iterator[kLastPromise] = null;
+ iterator[kLastResolve] = null;
+ iterator[kLastReject] = null;
+ resolve(createIterResult(undefined, true));
+ }
+
+ iterator[kEnded] = true;
+ });
+ stream.on('readable', onReadable.bind(null, iterator));
+ return iterator;
+};
+
+module.exports = createReadableStreamAsyncIterator; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/node_modules/readable-stream/lib/internal/streams/buffer_list.js
new file mode 100644
index 0000000..cdea425
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/buffer_list.js
@@ -0,0 +1,210 @@
+'use strict';
+
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
+
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
+
+var _require = require('buffer'),
+ Buffer = _require.Buffer;
+
+var _require2 = require('util'),
+ inspect = _require2.inspect;
+
+var custom = inspect && inspect.custom || 'inspect';
+
+function copyBuffer(src, target, offset) {
+ Buffer.prototype.copy.call(src, target, offset);
+}
+
+module.exports =
+/*#__PURE__*/
+function () {
+ function BufferList() {
+ _classCallCheck(this, BufferList);
+
+ this.head = null;
+ this.tail = null;
+ this.length = 0;
+ }
+
+ _createClass(BufferList, [{
+ key: "push",
+ value: function push(v) {
+ var entry = {
+ data: v,
+ next: null
+ };
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
+ this.tail = entry;
+ ++this.length;
+ }
+ }, {
+ key: "unshift",
+ value: function unshift(v) {
+ var entry = {
+ data: v,
+ next: this.head
+ };
+ if (this.length === 0) this.tail = entry;
+ this.head = entry;
+ ++this.length;
+ }
+ }, {
+ key: "shift",
+ value: function shift() {
+ if (this.length === 0) return;
+ var ret = this.head.data;
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
+ --this.length;
+ return ret;
+ }
+ }, {
+ key: "clear",
+ value: function clear() {
+ this.head = this.tail = null;
+ this.length = 0;
+ }
+ }, {
+ key: "join",
+ value: function join(s) {
+ if (this.length === 0) return '';
+ var p = this.head;
+ var ret = '' + p.data;
+
+ while (p = p.next) {
+ ret += s + p.data;
+ }
+
+ return ret;
+ }
+ }, {
+ key: "concat",
+ value: function concat(n) {
+ if (this.length === 0) return Buffer.alloc(0);
+ var ret = Buffer.allocUnsafe(n >>> 0);
+ var p = this.head;
+ var i = 0;
+
+ while (p) {
+ copyBuffer(p.data, ret, i);
+ i += p.data.length;
+ p = p.next;
+ }
+
+ return ret;
+ } // Consumes a specified amount of bytes or characters from the buffered data.
+
+ }, {
+ key: "consume",
+ value: function consume(n, hasStrings) {
+ var ret;
+
+ if (n < this.head.data.length) {
+ // `slice` is the same for buffers and strings.
+ ret = this.head.data.slice(0, n);
+ this.head.data = this.head.data.slice(n);
+ } else if (n === this.head.data.length) {
+ // First chunk is a perfect match.
+ ret = this.shift();
+ } else {
+ // Result spans more than one buffer.
+ ret = hasStrings ? this._getString(n) : this._getBuffer(n);
+ }
+
+ return ret;
+ }
+ }, {
+ key: "first",
+ value: function first() {
+ return this.head.data;
+ } // Consumes a specified amount of characters from the buffered data.
+
+ }, {
+ key: "_getString",
+ value: function _getString(n) {
+ var p = this.head;
+ var c = 1;
+ var ret = p.data;
+ n -= ret.length;
+
+ while (p = p.next) {
+ var str = p.data;
+ var nb = n > str.length ? str.length : n;
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
+ n -= nb;
+
+ if (n === 0) {
+ if (nb === str.length) {
+ ++c;
+ if (p.next) this.head = p.next;else this.head = this.tail = null;
+ } else {
+ this.head = p;
+ p.data = str.slice(nb);
+ }
+
+ break;
+ }
+
+ ++c;
+ }
+
+ this.length -= c;
+ return ret;
+ } // Consumes a specified amount of bytes from the buffered data.
+
+ }, {
+ key: "_getBuffer",
+ value: function _getBuffer(n) {
+ var ret = Buffer.allocUnsafe(n);
+ var p = this.head;
+ var c = 1;
+ p.data.copy(ret);
+ n -= p.data.length;
+
+ while (p = p.next) {
+ var buf = p.data;
+ var nb = n > buf.length ? buf.length : n;
+ buf.copy(ret, ret.length - n, 0, nb);
+ n -= nb;
+
+ if (n === 0) {
+ if (nb === buf.length) {
+ ++c;
+ if (p.next) this.head = p.next;else this.head = this.tail = null;
+ } else {
+ this.head = p;
+ p.data = buf.slice(nb);
+ }
+
+ break;
+ }
+
+ ++c;
+ }
+
+ this.length -= c;
+ return ret;
+ } // Make sure the linked list only shows the minimal necessary information.
+
+ }, {
+ key: custom,
+ value: function value(_, options) {
+ return inspect(this, _objectSpread({}, options, {
+ // Only inspect one level.
+ depth: 0,
+ // It should not recurse.
+ customInspect: false
+ }));
+ }
+ }]);
+
+ return BufferList;
+}(); \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js
new file mode 100644
index 0000000..3268a16
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -0,0 +1,105 @@
+'use strict'; // undocumented cb() API, needed for core, not for public API
+
+function destroy(err, cb) {
+ var _this = this;
+
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+ if (readableDestroyed || writableDestroyed) {
+ if (cb) {
+ cb(err);
+ } else if (err) {
+ if (!this._writableState) {
+ process.nextTick(emitErrorNT, this, err);
+ } else if (!this._writableState.errorEmitted) {
+ this._writableState.errorEmitted = true;
+ process.nextTick(emitErrorNT, this, err);
+ }
+ }
+
+ return this;
+ } // we set destroyed to true before firing error callbacks in order
+ // to make it re-entrance safe in case destroy() is called within callbacks
+
+
+ if (this._readableState) {
+ this._readableState.destroyed = true;
+ } // if this is a duplex stream mark the writable part as destroyed as well
+
+
+ if (this._writableState) {
+ this._writableState.destroyed = true;
+ }
+
+ this._destroy(err || null, function (err) {
+ if (!cb && err) {
+ if (!_this._writableState) {
+ process.nextTick(emitErrorAndCloseNT, _this, err);
+ } else if (!_this._writableState.errorEmitted) {
+ _this._writableState.errorEmitted = true;
+ process.nextTick(emitErrorAndCloseNT, _this, err);
+ } else {
+ process.nextTick(emitCloseNT, _this);
+ }
+ } else if (cb) {
+ process.nextTick(emitCloseNT, _this);
+ cb(err);
+ } else {
+ process.nextTick(emitCloseNT, _this);
+ }
+ });
+
+ return this;
+}
+
+function emitErrorAndCloseNT(self, err) {
+ emitErrorNT(self, err);
+ emitCloseNT(self);
+}
+
+function emitCloseNT(self) {
+ if (self._writableState && !self._writableState.emitClose) return;
+ if (self._readableState && !self._readableState.emitClose) return;
+ self.emit('close');
+}
+
+function undestroy() {
+ if (this._readableState) {
+ this._readableState.destroyed = false;
+ this._readableState.reading = false;
+ this._readableState.ended = false;
+ this._readableState.endEmitted = false;
+ }
+
+ if (this._writableState) {
+ this._writableState.destroyed = false;
+ this._writableState.ended = false;
+ this._writableState.ending = false;
+ this._writableState.finalCalled = false;
+ this._writableState.prefinished = false;
+ this._writableState.finished = false;
+ this._writableState.errorEmitted = false;
+ }
+}
+
+function emitErrorNT(self, err) {
+ self.emit('error', err);
+}
+
+function errorOrDestroy(stream, err) {
+ // We have tests that rely on errors being emitted
+ // in the same tick, so changing this is semver major.
+ // For now when you opt-in to autoDestroy we allow
+ // the error to be emitted nextTick. In a future
+ // semver major update we should change the default to this.
+ var rState = stream._readableState;
+ var wState = stream._writableState;
+ if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);
+}
+
+module.exports = {
+ destroy: destroy,
+ undestroy: undestroy,
+ errorOrDestroy: errorOrDestroy
+}; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
new file mode 100644
index 0000000..831f286
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
@@ -0,0 +1,104 @@
+// Ported from https://github.com/mafintosh/end-of-stream with
+// permission from the author, Mathias Buus (@mafintosh).
+'use strict';
+
+var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;
+
+function once(callback) {
+ var called = false;
+ return function () {
+ if (called) return;
+ called = true;
+
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ callback.apply(this, args);
+ };
+}
+
+function noop() {}
+
+function isRequest(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+}
+
+function eos(stream, opts, callback) {
+ if (typeof opts === 'function') return eos(stream, null, opts);
+ if (!opts) opts = {};
+ callback = once(callback || noop);
+ var readable = opts.readable || opts.readable !== false && stream.readable;
+ var writable = opts.writable || opts.writable !== false && stream.writable;
+
+ var onlegacyfinish = function onlegacyfinish() {
+ if (!stream.writable) onfinish();
+ };
+
+ var writableEnded = stream._writableState && stream._writableState.finished;
+
+ var onfinish = function onfinish() {
+ writable = false;
+ writableEnded = true;
+ if (!readable) callback.call(stream);
+ };
+
+ var readableEnded = stream._readableState && stream._readableState.endEmitted;
+
+ var onend = function onend() {
+ readable = false;
+ readableEnded = true;
+ if (!writable) callback.call(stream);
+ };
+
+ var onerror = function onerror(err) {
+ callback.call(stream, err);
+ };
+
+ var onclose = function onclose() {
+ var err;
+
+ if (readable && !readableEnded) {
+ if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
+ return callback.call(stream, err);
+ }
+
+ if (writable && !writableEnded) {
+ if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
+ return callback.call(stream, err);
+ }
+ };
+
+ var onrequest = function onrequest() {
+ stream.req.on('finish', onfinish);
+ };
+
+ if (isRequest(stream)) {
+ stream.on('complete', onfinish);
+ stream.on('abort', onclose);
+ if (stream.req) onrequest();else stream.on('request', onrequest);
+ } else if (writable && !stream._writableState) {
+ // legacy streams
+ stream.on('end', onlegacyfinish);
+ stream.on('close', onlegacyfinish);
+ }
+
+ stream.on('end', onend);
+ stream.on('finish', onfinish);
+ if (opts.error !== false) stream.on('error', onerror);
+ stream.on('close', onclose);
+ return function () {
+ stream.removeListener('complete', onfinish);
+ stream.removeListener('abort', onclose);
+ stream.removeListener('request', onrequest);
+ if (stream.req) stream.req.removeListener('finish', onfinish);
+ stream.removeListener('end', onlegacyfinish);
+ stream.removeListener('close', onlegacyfinish);
+ stream.removeListener('finish', onfinish);
+ stream.removeListener('end', onend);
+ stream.removeListener('error', onerror);
+ stream.removeListener('close', onclose);
+ };
+}
+
+module.exports = eos; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/from-browser.js b/node_modules/readable-stream/lib/internal/streams/from-browser.js
new file mode 100644
index 0000000..a4ce56f
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/from-browser.js
@@ -0,0 +1,3 @@
+module.exports = function () {
+ throw new Error('Readable.from is not available in the browser')
+};
diff --git a/node_modules/readable-stream/lib/internal/streams/from.js b/node_modules/readable-stream/lib/internal/streams/from.js
new file mode 100644
index 0000000..6c41284
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/from.js
@@ -0,0 +1,64 @@
+'use strict';
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
+
+function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
+
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE;
+
+function from(Readable, iterable, opts) {
+ var iterator;
+
+ if (iterable && typeof iterable.next === 'function') {
+ iterator = iterable;
+ } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable);
+
+ var readable = new Readable(_objectSpread({
+ objectMode: true
+ }, opts)); // Reading boolean to protect against _read
+ // being called before last iteration completion.
+
+ var reading = false;
+
+ readable._read = function () {
+ if (!reading) {
+ reading = true;
+ next();
+ }
+ };
+
+ function next() {
+ return _next2.apply(this, arguments);
+ }
+
+ function _next2() {
+ _next2 = _asyncToGenerator(function* () {
+ try {
+ var _ref = yield iterator.next(),
+ value = _ref.value,
+ done = _ref.done;
+
+ if (done) {
+ readable.push(null);
+ } else if (readable.push((yield value))) {
+ next();
+ } else {
+ reading = false;
+ }
+ } catch (err) {
+ readable.destroy(err);
+ }
+ });
+ return _next2.apply(this, arguments);
+ }
+
+ return readable;
+}
+
+module.exports = from; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/pipeline.js b/node_modules/readable-stream/lib/internal/streams/pipeline.js
new file mode 100644
index 0000000..6589909
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/pipeline.js
@@ -0,0 +1,97 @@
+// Ported from https://github.com/mafintosh/pump with
+// permission from the author, Mathias Buus (@mafintosh).
+'use strict';
+
+var eos;
+
+function once(callback) {
+ var called = false;
+ return function () {
+ if (called) return;
+ called = true;
+ callback.apply(void 0, arguments);
+ };
+}
+
+var _require$codes = require('../../../errors').codes,
+ ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,
+ ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
+
+function noop(err) {
+ // Rethrow the error if it exists to avoid swallowing it
+ if (err) throw err;
+}
+
+function isRequest(stream) {
+ return stream.setHeader && typeof stream.abort === 'function';
+}
+
+function destroyer(stream, reading, writing, callback) {
+ callback = once(callback);
+ var closed = false;
+ stream.on('close', function () {
+ closed = true;
+ });
+ if (eos === undefined) eos = require('./end-of-stream');
+ eos(stream, {
+ readable: reading,
+ writable: writing
+ }, function (err) {
+ if (err) return callback(err);
+ closed = true;
+ callback();
+ });
+ var destroyed = false;
+ return function (err) {
+ if (closed) return;
+ if (destroyed) return;
+ destroyed = true; // request.destroy just do .end - .abort is what we want
+
+ if (isRequest(stream)) return stream.abort();
+ if (typeof stream.destroy === 'function') return stream.destroy();
+ callback(err || new ERR_STREAM_DESTROYED('pipe'));
+ };
+}
+
+function call(fn) {
+ fn();
+}
+
+function pipe(from, to) {
+ return from.pipe(to);
+}
+
+function popCallback(streams) {
+ if (!streams.length) return noop;
+ if (typeof streams[streams.length - 1] !== 'function') return noop;
+ return streams.pop();
+}
+
+function pipeline() {
+ for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
+ streams[_key] = arguments[_key];
+ }
+
+ var callback = popCallback(streams);
+ if (Array.isArray(streams[0])) streams = streams[0];
+
+ if (streams.length < 2) {
+ throw new ERR_MISSING_ARGS('streams');
+ }
+
+ var error;
+ var destroys = streams.map(function (stream, i) {
+ var reading = i < streams.length - 1;
+ var writing = i > 0;
+ return destroyer(stream, reading, writing, function (err) {
+ if (!error) error = err;
+ if (err) destroys.forEach(call);
+ if (reading) return;
+ destroys.forEach(call);
+ callback(error);
+ });
+ });
+ return streams.reduce(pipe);
+}
+
+module.exports = pipeline; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/state.js b/node_modules/readable-stream/lib/internal/streams/state.js
new file mode 100644
index 0000000..19887eb
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/state.js
@@ -0,0 +1,27 @@
+'use strict';
+
+var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;
+
+function highWaterMarkFrom(options, isDuplex, duplexKey) {
+ return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
+}
+
+function getHighWaterMark(state, options, duplexKey, isDuplex) {
+ var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
+
+ if (hwm != null) {
+ if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
+ var name = isDuplex ? duplexKey : 'highWaterMark';
+ throw new ERR_INVALID_OPT_VALUE(name, hwm);
+ }
+
+ return Math.floor(hwm);
+ } // Default value
+
+
+ return state.objectMode ? 16 : 16 * 1024;
+}
+
+module.exports = {
+ getHighWaterMark: getHighWaterMark
+}; \ No newline at end of file
diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js
new file mode 100644
index 0000000..9332a3f
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/stream-browser.js
@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;
diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js
new file mode 100644
index 0000000..ce2ad5b
--- /dev/null
+++ b/node_modules/readable-stream/lib/internal/streams/stream.js
@@ -0,0 +1 @@
+module.exports = require('stream');
diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json
new file mode 100644
index 0000000..4748aa0
--- /dev/null
+++ b/node_modules/readable-stream/package.json
@@ -0,0 +1,101 @@
+{
+ "_args": [
+ [
+ "readable-stream@3.6.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "readable-stream@3.6.0",
+ "_id": "readable-stream@3.6.0",
+ "_inBundle": false,
+ "_integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "_location": "/readable-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "readable-stream@3.6.0",
+ "name": "readable-stream",
+ "escapedName": "readable-stream",
+ "rawSpec": "3.6.0",
+ "saveSpec": null,
+ "fetchSpec": "3.6.0"
+ },
+ "_requiredBy": [
+ "/bl",
+ "/tar-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "_spec": "3.6.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "browser": {
+ "util": false,
+ "worker_threads": false,
+ "./errors": "./errors-browser.js",
+ "./readable.js": "./readable-browser.js",
+ "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js",
+ "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+ },
+ "bugs": {
+ "url": "https://github.com/nodejs/readable-stream/issues"
+ },
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "description": "Streams3, a user-land copy of the stream library from Node.js",
+ "devDependencies": {
+ "@babel/cli": "^7.2.0",
+ "@babel/core": "^7.2.0",
+ "@babel/polyfill": "^7.0.0",
+ "@babel/preset-env": "^7.2.0",
+ "airtap": "0.0.9",
+ "assert": "^1.4.0",
+ "bl": "^2.0.0",
+ "deep-strict-equal": "^0.2.0",
+ "events.once": "^2.0.2",
+ "glob": "^7.1.2",
+ "gunzip-maybe": "^1.4.1",
+ "hyperquest": "^2.1.3",
+ "lolex": "^2.6.0",
+ "nyc": "^11.0.0",
+ "pump": "^3.0.0",
+ "rimraf": "^2.6.2",
+ "tap": "^12.0.0",
+ "tape": "^4.9.0",
+ "tar-fs": "^1.16.2",
+ "util-promisify": "^2.1.0"
+ },
+ "engines": {
+ "node": ">= 6"
+ },
+ "homepage": "https://github.com/nodejs/readable-stream#readme",
+ "keywords": [
+ "readable",
+ "stream",
+ "pipe"
+ ],
+ "license": "MIT",
+ "main": "readable.js",
+ "name": "readable-stream",
+ "nyc": {
+ "include": [
+ "lib/**.js"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/readable-stream.git"
+ },
+ "scripts": {
+ "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap",
+ "cover": "nyc npm test",
+ "report": "nyc report --reporter=lcov",
+ "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js",
+ "test-browser-local": "airtap --open --local -- test/browser.js",
+ "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js",
+ "update-browser-errors": "babel -o errors-browser.js errors.js"
+ },
+ "version": "3.6.0"
+}
diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js
new file mode 100644
index 0000000..adbf60d
--- /dev/null
+++ b/node_modules/readable-stream/readable-browser.js
@@ -0,0 +1,9 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
+exports.finished = require('./lib/internal/streams/end-of-stream.js');
+exports.pipeline = require('./lib/internal/streams/pipeline.js');
diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js
new file mode 100644
index 0000000..9e0ca12
--- /dev/null
+++ b/node_modules/readable-stream/readable.js
@@ -0,0 +1,16 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream.Readable;
+ Object.assign(module.exports, Stream);
+ module.exports.Stream = Stream;
+} else {
+ exports = module.exports = require('./lib/_stream_readable.js');
+ exports.Stream = Stream || exports;
+ exports.Readable = exports;
+ exports.Writable = require('./lib/_stream_writable.js');
+ exports.Duplex = require('./lib/_stream_duplex.js');
+ exports.Transform = require('./lib/_stream_transform.js');
+ exports.PassThrough = require('./lib/_stream_passthrough.js');
+ exports.finished = require('./lib/internal/streams/end-of-stream.js');
+ exports.pipeline = require('./lib/internal/streams/pipeline.js');
+}
diff --git a/node_modules/readable-web-to-node-stream/README.md b/node_modules/readable-web-to-node-stream/README.md
new file mode 100644
index 0000000..69a30dd
--- /dev/null
+++ b/node_modules/readable-web-to-node-stream/README.md
@@ -0,0 +1,70 @@
+![Karma CI](https://github.com/Borewit/readable-web-to-node-stream/workflows/Karma%20CI/badge.svg)[![NPM version](https://badge.fury.io/js/readable-web-to-node-stream.svg)](https://npmjs.org/package/readable-web-to-node-stream)
+[![npm downloads](http://img.shields.io/npm/dm/readable-web-to-node-stream.svg)](https://npmcharts.com/compare/readable-web-to-node-stream)
+[![dependencies Status](https://david-dm.org/Borewit/readable-web-to-node-stream/status.svg)](https://david-dm.org/Borewit/readable-web-to-node-stream)
+[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/readable-web-to-node-stream/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/readable-web-to-node-stream?targetFile=package.json)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b48f9601e0984734b1962913f70432a6)](https://www.codacy.com/app/Borewit/readable-web-to-node-stream?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Borewit/readable-web-to-node-stream&amp;utm_campaign=Badge_Grade)
+[![Coverage Status](https://coveralls.io/repos/github/Borewit/readable-web-to-node-stream/badge.svg?branch=master)](https://coveralls.io/github/Borewit/readable-web-to-node-stream?branch=master)
+[![Minified size](https://badgen.net/bundlephobia/min/readable-web-to-node-stream)](https://bundlephobia.com/result?p=readable-web-to-node-stream)
+
+# readable-web-stream-to-node
+
+Converts a [Web-API readable stream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader) into a [Node.js readable stream](https://nodejs.org/api/stream.html#stream_readable_streams).
+
+## Installation
+Install via [npm](http://npmjs.org/):
+
+```bash
+npm install readable-web-to-node-stream
+```
+or or [yarn](https://yarnpkg.com/):
+```bash
+yarn add readable-web-to-node-stream
+```
+
+## Compatibility
+
+Source is written in TypeScript and compiled to ECMAScript 2017 (ES8).
+
+Unit tests are performed on the following browsers:
+
+* Google Chrome 74.0
+* Firefox 68.0
+* Safari 12.0
+* Opera 60.0
+
+## Example
+
+Import readable-web-stream-to-node in JavaScript:
+```js
+const {ReadableWebToNodeStream} = require('readable-web-to-node-stream');
+
+async function download(url) {
+ const response = await fetch(url);
+ const readableWebStream = response.body;
+ const nodeStream = new ReadableWebToNodeStream(readableWebStream);
+}
+```
+
+## API
+
+**constructor(stream: ReadableStream): Promise<void>**
+
+`stream: ReadableStream`: the [Web-API readable stream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader).
+
+**close(): Promise<void>**
+Will cancel close the Readable-node stream, and will release Web-API-readable-stream.
+
+**waitForReadToComplete(): Promise<void>**
+If there is no unresolved read call to Web-API Readable​Stream immediately returns, otherwise it will wait until the read is resolved.
+
+## Licence
+
+(The MIT License)
+
+Copyright (c) 2019 Borewit
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/readable-web-to-node-stream/lib/index.d.ts b/node_modules/readable-web-to-node-stream/lib/index.d.ts
new file mode 100644
index 0000000..7d7145b
--- /dev/null
+++ b/node_modules/readable-web-to-node-stream/lib/index.d.ts
@@ -0,0 +1,39 @@
+import { Readable } from 'readable-stream';
+/**
+ * Converts a Web-API stream into Node stream.Readable class
+ * Node stream readable: https://nodejs.org/api/stream.html#stream_readable_streams
+ * Web API readable-stream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
+ * Node readable stream: https://nodejs.org/api/stream.html#stream_readable_streams
+ */
+export declare class ReadableWebToNodeStream extends Readable {
+ bytesRead: number;
+ released: boolean;
+ /**
+ * Default web API stream reader
+ * https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader
+ */
+ private reader;
+ private pendingRead;
+ /**
+ *
+ * @param stream Readable​Stream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
+ */
+ constructor(stream: ReadableStream);
+ /**
+ * Implementation of readable._read(size).
+ * When readable._read() is called, if data is available from the resource,
+ * the implementation should begin pushing that data into the read queue
+ * https://nodejs.org/api/stream.html#stream_readable_read_size_1
+ */
+ _read(): Promise<void>;
+ /**
+ * If there is no unresolved read call to Web-API Readable​Stream immediately returns;
+ * otherwise will wait until the read is resolved.
+ */
+ waitForReadToComplete(): Promise<void>;
+ /**
+ * Close wrapper
+ */
+ close(): Promise<void>;
+ private syncAndRelease;
+}
diff --git a/node_modules/readable-web-to-node-stream/lib/index.js b/node_modules/readable-web-to-node-stream/lib/index.js
new file mode 100644
index 0000000..1efaea1
--- /dev/null
+++ b/node_modules/readable-web-to-node-stream/lib/index.js
@@ -0,0 +1,69 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ReadableWebToNodeStream = void 0;
+const readable_stream_1 = require("readable-stream");
+/**
+ * Converts a Web-API stream into Node stream.Readable class
+ * Node stream readable: https://nodejs.org/api/stream.html#stream_readable_streams
+ * Web API readable-stream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
+ * Node readable stream: https://nodejs.org/api/stream.html#stream_readable_streams
+ */
+class ReadableWebToNodeStream extends readable_stream_1.Readable {
+ /**
+ *
+ * @param stream Readable​Stream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
+ */
+ constructor(stream) {
+ super();
+ this.bytesRead = 0;
+ this.released = false;
+ this.reader = stream.getReader();
+ }
+ /**
+ * Implementation of readable._read(size).
+ * When readable._read() is called, if data is available from the resource,
+ * the implementation should begin pushing that data into the read queue
+ * https://nodejs.org/api/stream.html#stream_readable_read_size_1
+ */
+ async _read() {
+ // Should start pushing data into the queue
+ // Read data from the underlying Web-API-readable-stream
+ if (this.released) {
+ this.push(null); // Signal EOF
+ return;
+ }
+ this.pendingRead = this.reader.read();
+ const data = await this.pendingRead;
+ // clear the promise before pushing pushing new data to the queue and allow sequential calls to _read()
+ delete this.pendingRead;
+ if (data.done || this.released) {
+ this.push(null); // Signal EOF
+ }
+ else {
+ this.bytesRead += data.value.length;
+ this.push(data.value); // Push new data to the queue
+ }
+ }
+ /**
+ * If there is no unresolved read call to Web-API Readable​Stream immediately returns;
+ * otherwise will wait until the read is resolved.
+ */
+ async waitForReadToComplete() {
+ if (this.pendingRead) {
+ await this.pendingRead;
+ }
+ }
+ /**
+ * Close wrapper
+ */
+ async close() {
+ await this.syncAndRelease();
+ }
+ async syncAndRelease() {
+ this.released = true;
+ await this.waitForReadToComplete();
+ await this.reader.releaseLock();
+ }
+}
+exports.ReadableWebToNodeStream = ReadableWebToNodeStream;
+//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/readable-web-to-node-stream/lib/index.spec.js b/node_modules/readable-web-to-node-stream/lib/index.spec.js
new file mode 100644
index 0000000..98ddd4e
--- /dev/null
+++ b/node_modules/readable-web-to-node-stream/lib/index.spec.js
@@ -0,0 +1,147 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.parseReadableStream = void 0;
+localStorage.debug = 'readable-web-to-node-stream';
+const assert = require("assert");
+const mmb = require("music-metadata-browser");
+const index_1 = require("./index");
+async function httpGetByUrl(url) {
+ const response = await fetch(url);
+ const headers = [];
+ response.headers.forEach(header => {
+ headers.push(header);
+ });
+ assert.ok(response.ok, `HTTP error status=${response.status}: ${response.statusText}`);
+ assert.ok(response.body, 'HTTP-stream');
+ return response;
+}
+async function parseReadableStream(stream, fileInfo, options) {
+ const ns = new index_1.ReadableWebToNodeStream(stream);
+ const res = await mmb.parseNodeStream(ns, fileInfo, options);
+ await ns.close();
+ return res;
+}
+exports.parseReadableStream = parseReadableStream;
+const tiuqottigeloot_vol24_Tracks = [
+ {
+ url: '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/01%20-%20Diablo%20Swing%20Orchestra%20-%20Heroines.mp3',
+ duration: 322.612245,
+ metaData: {
+ title: 'Heroines',
+ artist: 'Diablo Swing Orchestra'
+ }
+ },
+ {
+ url: '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/02%20-%20Eclectek%20-%20We%20Are%20Going%20To%20Eclecfunk%20Your%20Ass.mp3',
+ duration: 190.093061,
+ metaData: {
+ title: 'We Are Going to Eclecfunk Your Ass',
+ artist: 'Eclectek'
+ }
+ } /* ,
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/03%20-%20Auto-Pilot%20-%20Seventeen.mp3',
+ duration: 214.622041,
+ metaData: {
+ title: 'Seventeen',
+ artist: 'Auto-Pilot'
+ }
+ },
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/04%20-%20Muha%20-%20Microphone.mp3',
+ duration: 181.838367,
+ metaData: {
+ title: 'Microphone',
+ artist: 'Muha'
+ }
+ },
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/05%20-%20Just%20Plain%20Ant%20-%20Stumble.mp3',
+ duration: 86.047347,
+ metaData: {
+ title: 'Stumble',
+ artist: 'Just Plain Ant'
+ }
+ },
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/06%20-%20Sleaze%20-%20God%20Damn.mp3',
+ duration: 226.795102,
+ metaData: {
+ title: 'God Damn',
+ artist: 'Sleaze'
+ }
+ },
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/07%20-%20Juanitos%20-%20Hola%20Hola%20Bossa%20Nova.mp3',
+ duration: 207.072653,
+ metaData: {
+ title: 'Hola Hola Bossa Nova',
+ artist: 'Juanitos'
+ }
+ },
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/08%20-%20Entertainment%20For%20The%20Braindead%20-%20Resolutions%20(Chris%20Summer%20Remix).mp3',
+ duration: 314.331429,
+ metaData: {
+ title: 'Resolutions (Chris Summer remix)',
+ artist: 'Entertainment for the Braindead'
+ }
+ },
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/09%20-%20Nobara%20Hayakawa%20-%20Trail.mp3',
+ duration: 204.042449,
+ metaData: {
+ title: 'Trail',
+ artist: 'Nobara Hayakawa'
+ }
+ },
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/10%20-%20Paper%20Navy%20-%20Tongue%20Tied.mp3',
+ duration: 201.116735,
+ metaData: {
+ title: 'Tongue Tied',
+ artist: 'Paper Navy'
+ }
+ },
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/11%20-%2060%20Tigres%20-%20Garage.mp3',
+ duration: 245.394286,
+ metaData: {
+ title: 'Garage',
+ artist: '60 Tigres'
+ }
+ },
+ {
+ url:
+ '/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/12%20-%20CM%20aka%20Creative%20-%20The%20Cycle%20(Featuring%20Mista%20Mista).mp3',
+ duration: 221.44,
+ metaData: {
+ title: 'The Cycle (feat. Mista Mista)',
+ artist: 'CM aka Creative'
+ }
+ } */
+];
+describe('Parse WebAmp tracks', () => {
+ tiuqottigeloot_vol24_Tracks.forEach(track => {
+ it(`track ${track.metaData.artist} - ${track.metaData.title}`, async () => {
+ const url = 'https://raw.githubusercontent.com/Borewit/test-audio/958e057' + track.url;
+ const response = await httpGetByUrl(url);
+ const metadata = await parseReadableStream(response.body, {
+ size: parseInt(response.headers.get('Content-Length'), 10),
+ mimeType: response.headers.get('Content-Type')
+ });
+ expect(metadata.common.artist).toEqual(track.metaData.artist);
+ expect(metadata.common.title).toEqual(track.metaData.title);
+ }, 20000);
+ });
+});
+//# sourceMappingURL=index.spec.js.map \ No newline at end of file
diff --git a/node_modules/readable-web-to-node-stream/package.json b/node_modules/readable-web-to-node-stream/package.json
new file mode 100644
index 0000000..1ea7926
--- /dev/null
+++ b/node_modules/readable-web-to-node-stream/package.json
@@ -0,0 +1,113 @@
+{
+ "_from": "readable-web-to-node-stream@^3.0.0",
+ "_id": "readable-web-to-node-stream@3.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-4zDC6CvjUyusN7V0QLsXVB7pJCD9+vtrM9bYDRv6uBQ+SKfx36rp5AFNPRgh9auKRul/a1iFZJYXcCbwRL+SaA==",
+ "_location": "/readable-web-to-node-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "readable-web-to-node-stream@^3.0.0",
+ "name": "readable-web-to-node-stream",
+ "escapedName": "readable-web-to-node-stream",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/file-type"
+ ],
+ "_resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.1.tgz",
+ "_shasum": "3f619b1bc5dd73a4cfe5c5f9b4f6faba55dff845",
+ "_spec": "readable-web-to-node-stream@^3.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/file-type",
+ "author": {
+ "name": "Borewit",
+ "url": "https://github.com/Borewit"
+ },
+ "bugs": {
+ "url": "https://github.com/Borewit/readable-web-to-node-stream/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "@types/readable-stream": "^2.3.9",
+ "readable-stream": "^3.6.0"
+ },
+ "deprecated": false,
+ "description": "Converts a Web-API readable-stream into a Node readable-stream.",
+ "devDependencies": {
+ "@types/jasmine": "^3.6.2",
+ "@types/node": "^14.14.17",
+ "coveralls": "^3.1.0",
+ "del-cli": "^3.0.1",
+ "eslint": "^7.16.0",
+ "istanbul-instrumenter-loader": "^3.0.1",
+ "jasmine-core": "^3.6.0",
+ "karma": "^5.2.3",
+ "karma-browserstack-launcher": "^1.6.0",
+ "karma-chrome-launcher": "^3.1.0",
+ "karma-coverage-istanbul-reporter": "^3.0.3",
+ "karma-firefox-launcher": "^2.1.0",
+ "karma-jasmine": "^4.0.1",
+ "karma-jasmine-html-reporter": "^1.5.4",
+ "karma-spec-reporter": "^0.0.32",
+ "karma-webpack": "^4.0.2",
+ "music-metadata-browser": "^2.1.6",
+ "ts-loader": "^8.0.13",
+ "tslint": "^6.1.3",
+ "typescript": "^4.1.2",
+ "webpack": "^4.44.2"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "lib/**/*.js",
+ "lib/**/*.d.ts"
+ ],
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Borewit"
+ },
+ "homepage": "https://github.com/Borewit/readable-web-to-node-stream#readme",
+ "keywords": [
+ "stream.readable",
+ "web",
+ "node",
+ "browser",
+ "stream",
+ "covert",
+ "coverter",
+ "readable",
+ "readablestream"
+ ],
+ "license": "MIT",
+ "main": "lib/index.js",
+ "name": "readable-web-to-node-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Borewit/readable-web-to-node-stream.git"
+ },
+ "scripts": {
+ "browserstack": "karma start --browsers bs_win_chrome,bs_win_firefox,bs_osx_safari --single-run --reporters coverage-istanbul,spec",
+ "build": "npm run compile-lib && npm run compile-test",
+ "clean": "del-cli lib/**/*.js lib/**/*.js.map lib/**/*.d.ts coverage",
+ "compile-lib": "tsc -p lib/tsconfig.json",
+ "compile-test": "tsc -p lib/tsconfig.spec.json",
+ "eslint": "eslint karma.conf.js",
+ "karma": "karma start",
+ "karma-firefox": "karma start --browsers Firefox",
+ "karma-once": "karma start --browsers Chrome --single-run",
+ "lint": "npm run tslint && npm run eslint",
+ "post-codacy": " codacy-coverage < coverage/lcov.info",
+ "post-coveralls": "coveralls < coverage/lcov.info",
+ "prepublishOnly": "yarn run build",
+ "test": "karma start --single-run",
+ "travis-karma": "karma start --browsers Firefox --single-run --reporters coverage-istanbul,spec",
+ "travis-karma-browserstack": "karma start --browsers bs_win_chrome,bs_win_firefox,bs_osx_safari,bs_win_opera --single-run --reporters coverage-istanbul,spec,BrowserStack",
+ "tslint": "tslint 'lib/**/*.ts' --exclude 'lib/**/*.d.ts'"
+ },
+ "types": "lib/index.d.ts",
+ "version": "3.0.1"
+}
diff --git a/node_modules/restore-cursor/index.d.ts b/node_modules/restore-cursor/index.d.ts
new file mode 100644
index 0000000..83ff2f4
--- /dev/null
+++ b/node_modules/restore-cursor/index.d.ts
@@ -0,0 +1,13 @@
+/**
+Gracefully restore the CLI cursor on exit.
+
+@example
+```
+import restoreCursor = require('restore-cursor');
+
+restoreCursor();
+```
+*/
+declare function restoreCursor(): void;
+
+export = restoreCursor;
diff --git a/node_modules/restore-cursor/index.js b/node_modules/restore-cursor/index.js
new file mode 100644
index 0000000..3e8dd07
--- /dev/null
+++ b/node_modules/restore-cursor/index.js
@@ -0,0 +1,9 @@
+'use strict';
+const onetime = require('onetime');
+const signalExit = require('signal-exit');
+
+module.exports = onetime(() => {
+ signalExit(() => {
+ process.stderr.write('\u001B[?25h');
+ }, {alwaysLast: true});
+});
diff --git a/node_modules/restore-cursor/license b/node_modules/restore-cursor/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/restore-cursor/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/restore-cursor/package.json b/node_modules/restore-cursor/package.json
new file mode 100644
index 0000000..24ade5f
--- /dev/null
+++ b/node_modules/restore-cursor/package.json
@@ -0,0 +1,87 @@
+{
+ "_args": [
+ [
+ "restore-cursor@3.1.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "restore-cursor@3.1.0",
+ "_id": "restore-cursor@3.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
+ "_location": "/restore-cursor",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "restore-cursor@3.1.0",
+ "name": "restore-cursor",
+ "escapedName": "restore-cursor",
+ "rawSpec": "3.1.0",
+ "saveSpec": null,
+ "fetchSpec": "3.1.0"
+ },
+ "_requiredBy": [
+ "/cli-cursor"
+ ],
+ "_resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
+ "_spec": "3.1.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/restore-cursor/issues"
+ },
+ "dependencies": {
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
+ },
+ "description": "Gracefully restore the CLI cursor on exit",
+ "devDependencies": {
+ "tsd": "^0.7.2",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/sindresorhus/restore-cursor#readme",
+ "keywords": [
+ "exit",
+ "quit",
+ "process",
+ "graceful",
+ "shutdown",
+ "sigterm",
+ "sigint",
+ "terminate",
+ "kill",
+ "stop",
+ "cli",
+ "cursor",
+ "ansi",
+ "show",
+ "term",
+ "terminal",
+ "console",
+ "tty",
+ "shell",
+ "command-line"
+ ],
+ "license": "MIT",
+ "name": "restore-cursor",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/restore-cursor.git"
+ },
+ "scripts": {
+ "test": "xo && tsd"
+ },
+ "version": "3.1.0"
+}
diff --git a/node_modules/restore-cursor/readme.md b/node_modules/restore-cursor/readme.md
new file mode 100644
index 0000000..c224a29
--- /dev/null
+++ b/node_modules/restore-cursor/readme.md
@@ -0,0 +1,26 @@
+# restore-cursor [![Build Status](https://travis-ci.org/sindresorhus/restore-cursor.svg?branch=master)](https://travis-ci.org/sindresorhus/restore-cursor)
+
+> Gracefully restore the CLI cursor on exit
+
+Prevent the cursor you've hidden interactively from remaining hidden if the process crashes.
+
+
+## Install
+
+```
+$ npm install restore-cursor
+```
+
+
+## Usage
+
+```js
+const restoreCursor = require('restore-cursor');
+
+restoreCursor();
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/safe-buffer/LICENSE b/node_modules/safe-buffer/LICENSE
new file mode 100644
index 0000000..0c068ce
--- /dev/null
+++ b/node_modules/safe-buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/safe-buffer/README.md b/node_modules/safe-buffer/README.md
new file mode 100644
index 0000000..e9a81af
--- /dev/null
+++ b/node_modules/safe-buffer/README.md
@@ -0,0 +1,584 @@
+# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/safe-buffer
+[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg
+[npm-url]: https://npmjs.org/package/safe-buffer
+[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg
+[downloads-url]: https://npmjs.org/package/safe-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Safer Node.js Buffer API
+
+**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,
+`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**
+
+**Uses the built-in implementation when available.**
+
+## install
+
+```
+npm install safe-buffer
+```
+
+## usage
+
+The goal of this package is to provide a safe replacement for the node.js `Buffer`.
+
+It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to
+the top of your node.js modules:
+
+```js
+var Buffer = require('safe-buffer').Buffer
+
+// Existing buffer code will continue to work without issues:
+
+new Buffer('hey', 'utf8')
+new Buffer([1, 2, 3], 'utf8')
+new Buffer(obj)
+new Buffer(16) // create an uninitialized buffer (potentially unsafe)
+
+// But you can use these new explicit APIs to make clear what you want:
+
+Buffer.from('hey', 'utf8') // convert from many types to a Buffer
+Buffer.alloc(16) // create a zero-filled buffer (safe)
+Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
+```
+
+## api
+
+### Class Method: Buffer.from(array)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `array` {Array}
+
+Allocates a new `Buffer` using an `array` of octets.
+
+```js
+const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);
+ // creates a new Buffer containing ASCII bytes
+ // ['b','u','f','f','e','r']
+```
+
+A `TypeError` will be thrown if `array` is not an `Array`.
+
+### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or
+ a `new ArrayBuffer()`
+* `byteOffset` {Number} Default: `0`
+* `length` {Number} Default: `arrayBuffer.length - byteOffset`
+
+When passed a reference to the `.buffer` property of a `TypedArray` instance,
+the newly created `Buffer` will share the same allocated memory as the
+TypedArray.
+
+```js
+const arr = new Uint16Array(2);
+arr[0] = 5000;
+arr[1] = 4000;
+
+const buf = Buffer.from(arr.buffer); // shares the memory with arr;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 a0 0f>
+
+// changing the TypedArray changes the Buffer also
+arr[1] = 6000;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 70 17>
+```
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+```js
+const ab = new ArrayBuffer(10);
+const buf = Buffer.from(ab, 0, 2);
+console.log(buf.length);
+ // Prints: 2
+```
+
+A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.
+
+### Class Method: Buffer.from(buffer)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `buffer` {Buffer}
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+```js
+const buf1 = Buffer.from('buffer');
+const buf2 = Buffer.from(buf1);
+
+buf1[0] = 0x61;
+console.log(buf1.toString());
+ // 'auffer'
+console.log(buf2.toString());
+ // 'buffer' (copy is not changed)
+```
+
+A `TypeError` will be thrown if `buffer` is not a `Buffer`.
+
+### Class Method: Buffer.from(str[, encoding])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `str` {String} String to encode.
+* `encoding` {String} Encoding to use, Default: `'utf8'`
+
+Creates a new `Buffer` containing the given JavaScript string `str`. If
+provided, the `encoding` parameter identifies the character encoding.
+If not provided, `encoding` defaults to `'utf8'`.
+
+```js
+const buf1 = Buffer.from('this is a tést');
+console.log(buf1.toString());
+ // prints: this is a tést
+console.log(buf1.toString('ascii'));
+ // prints: this is a tC)st
+
+const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+console.log(buf2.toString());
+ // prints: this is a tést
+```
+
+A `TypeError` will be thrown if `str` is not a string.
+
+### Class Method: Buffer.alloc(size[, fill[, encoding]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+* `fill` {Value} Default: `undefined`
+* `encoding` {String} Default: `utf8`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
+`Buffer` will be *zero-filled*.
+
+```js
+const buf = Buffer.alloc(5);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+The `size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+If `fill` is specified, the allocated `Buffer` will be initialized by calling
+`buf.fill(fill)`. See [`buf.fill()`][] for more information.
+
+```js
+const buf = Buffer.alloc(5, 'a');
+console.log(buf);
+ // <Buffer 61 61 61 61 61>
+```
+
+If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+initialized by calling `buf.fill(fill, encoding)`. For example:
+
+```js
+const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+console.log(buf);
+ // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+```
+
+Calling `Buffer.alloc(size)` can be significantly slower than the alternative
+`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance
+contents will *never contain sensitive data*.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### Class Method: Buffer.allocUnsafe(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must
+be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit
+architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is
+thrown. A zero-length Buffer will be created if a `size` less than or equal to
+0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+```js
+const buf = Buffer.allocUnsafe(5);
+console.log(buf);
+ // <Buffer 78 e0 82 02 01>
+ // (octets will be different, every time)
+buf.fill(0);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+A `TypeError` will be thrown if `size` is not a number.
+
+Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
+size `Buffer.poolSize` that is used as a pool for the fast allocation of new
+`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated
+`new Buffer(size)` constructor) only when `size` is less than or equal to
+`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default
+value of `Buffer.poolSize` is `8192` but can be modified.
+
+Use of this pre-allocated internal memory pool is a key difference between
+calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
+pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
+Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
+difference is subtle but can be important when an application requires the
+additional performance that `Buffer.allocUnsafe(size)` provides.
+
+### Class Method: Buffer.allocUnsafeSlow(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The
+`size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+allocations under 4KB are, by default, sliced from a single pre-allocated
+`Buffer`. This allows applications to avoid the garbage collection overhead of
+creating many individually allocated Buffers. This approach improves both
+performance and memory usage by eliminating the need to track and cleanup as
+many `Persistent` objects.
+
+However, in the case where a developer may need to retain a small chunk of
+memory from a pool for an indeterminate amount of time, it may be appropriate
+to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then
+copy out the relevant bits.
+
+```js
+// need to keep around a few small chunks of memory
+const store = [];
+
+socket.on('readable', () => {
+ const data = socket.read();
+ // allocate for retained data
+ const sb = Buffer.allocUnsafeSlow(10);
+ // copy the data into the new allocation
+ data.copy(sb, 0, 0, 10);
+ store.push(sb);
+});
+```
+
+Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*
+a developer has observed undue memory retention in their applications.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### All the Rest
+
+The rest of the `Buffer` API is exactly the same as in node.js.
+[See the docs](https://nodejs.org/api/buffer.html).
+
+
+## Related links
+
+- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)
+- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)
+
+## Why is `Buffer` unsafe?
+
+Today, the node.js `Buffer` constructor is overloaded to handle many different argument
+types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),
+`ArrayBuffer`, and also `Number`.
+
+The API is optimized for convenience: you can throw any type at it, and it will try to do
+what you want.
+
+Because the Buffer constructor is so powerful, you often see code like this:
+
+```js
+// Convert UTF-8 strings to hex
+function toHex (str) {
+ return new Buffer(str).toString('hex')
+}
+```
+
+***But what happens if `toHex` is called with a `Number` argument?***
+
+### Remote Memory Disclosure
+
+If an attacker can make your program call the `Buffer` constructor with a `Number`
+argument, then they can make it allocate uninitialized memory from the node.js process.
+This could potentially disclose TLS private keys, user data, or database passwords.
+
+When the `Buffer` constructor is passed a `Number` argument, it returns an
+**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like
+this, you **MUST** overwrite the contents before returning it to the user.
+
+From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
+
+> `new Buffer(size)`
+>
+> - `size` Number
+>
+> The underlying memory for `Buffer` instances created in this way is not initialized.
+> **The contents of a newly created `Buffer` are unknown and could contain sensitive
+> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.
+
+(Emphasis our own.)
+
+Whenever the programmer intended to create an uninitialized `Buffer` you often see code
+like this:
+
+```js
+var buf = new Buffer(16)
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### Would this ever be a problem in real code?
+
+Yes. It's surprisingly common to forget to check the type of your variables in a
+dynamically-typed language like JavaScript.
+
+Usually the consequences of assuming the wrong type is that your program crashes with an
+uncaught exception. But the failure mode for forgetting to check the type of arguments to
+the `Buffer` constructor is more catastrophic.
+
+Here's an example of a vulnerable service that takes a JSON payload and converts it to
+hex:
+
+```js
+// Take a JSON payload {str: "some string"} and convert it to hex
+var server = http.createServer(function (req, res) {
+ var data = ''
+ req.setEncoding('utf8')
+ req.on('data', function (chunk) {
+ data += chunk
+ })
+ req.on('end', function () {
+ var body = JSON.parse(data)
+ res.end(new Buffer(body.str).toString('hex'))
+ })
+})
+
+server.listen(8080)
+```
+
+In this example, an http client just has to send:
+
+```json
+{
+ "str": 1000
+}
+```
+
+and it will get back 1,000 bytes of uninitialized memory from the server.
+
+This is a very serious bug. It's similar in severity to the
+[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process
+memory by remote attackers.
+
+
+### Which real-world packages were vulnerable?
+
+#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)
+
+[Mathias Buus](https://github.com/mafintosh) and I
+([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,
+[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow
+anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get
+them to reveal 20 bytes at a time of uninitialized memory from the node.js process.
+
+Here's
+[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)
+that fixed it. We released a new fixed version, created a
+[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all
+vulnerable versions on npm so users will get a warning to upgrade to a newer version.
+
+#### [`ws`](https://www.npmjs.com/package/ws)
+
+That got us wondering if there were other vulnerable packages. Sure enough, within a short
+period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the
+most popular WebSocket implementation in node.js.
+
+If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as
+expected, then uninitialized server memory would be disclosed to the remote peer.
+
+These were the vulnerable methods:
+
+```js
+socket.send(number)
+socket.ping(number)
+socket.pong(number)
+```
+
+Here's a vulnerable socket server with some echo functionality:
+
+```js
+server.on('connection', function (socket) {
+ socket.on('message', function (message) {
+ message = JSON.parse(message)
+ if (message.type === 'echo') {
+ socket.send(message.data) // send back the user's message
+ }
+ })
+})
+```
+
+`socket.send(number)` called on the server, will disclose server memory.
+
+Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue
+was fixed, with a more detailed explanation. Props to
+[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the
+[Node Security Project disclosure](https://nodesecurity.io/advisories/67).
+
+
+### What's the solution?
+
+It's important that node.js offers a fast way to get memory otherwise performance-critical
+applications would needlessly get a lot slower.
+
+But we need a better way to *signal our intent* as programmers. **When we want
+uninitialized memory, we should request it explicitly.**
+
+Sensitive functionality should not be packed into a developer-friendly API that loosely
+accepts many different types. This type of API encourages the lazy practice of passing
+variables in without checking the type very carefully.
+
+#### A new API: `Buffer.allocUnsafe(number)`
+
+The functionality of creating buffers with uninitialized memory should be part of another
+API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that
+frequently gets user input of all sorts of different types passed into it.
+
+```js
+var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### How do we fix node.js core?
+
+We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as
+`semver-major`) which defends against one case:
+
+```js
+var str = 16
+new Buffer(str, 'utf8')
+```
+
+In this situation, it's implied that the programmer intended the first argument to be a
+string, since they passed an encoding as a second argument. Today, node.js will allocate
+uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not
+what the programmer intended.
+
+But this is only a partial solution, since if the programmer does `new Buffer(variable)`
+(without an `encoding` parameter) there's no way to know what they intended. If `variable`
+is sometimes a number, then uninitialized memory will sometimes be returned.
+
+### What's the real long-term fix?
+
+We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when
+we need uninitialized memory. But that would break 1000s of packages.
+
+~~We believe the best solution is to:~~
+
+~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~
+
+~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~
+
+#### Update
+
+We now support adding three new APIs:
+
+- `Buffer.from(value)` - convert from any type to a buffer
+- `Buffer.alloc(size)` - create a zero-filled buffer
+- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size
+
+This solves the core problem that affected `ws` and `bittorrent-dht` which is
+`Buffer(variable)` getting tricked into taking a number argument.
+
+This way, existing code continues working and the impact on the npm ecosystem will be
+minimal. Over time, npm maintainers can migrate performance-critical code to use
+`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.
+
+
+### Conclusion
+
+We think there's a serious design issue with the `Buffer` API as it exists today. It
+promotes insecure software by putting high-risk functionality into a convenient API
+with friendly "developer ergonomics".
+
+This wasn't merely a theoretical exercise because we found the issue in some of the
+most popular npm packages.
+
+Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of
+`buffer`.
+
+```js
+var Buffer = require('safe-buffer').Buffer
+```
+
+Eventually, we hope that node.js core can switch to this new, safer behavior. We believe
+the impact on the ecosystem would be minimal since it's not a breaking change.
+Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while
+older, insecure packages would magically become safe from this attack vector.
+
+
+## links
+
+- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)
+- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)
+- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)
+
+
+## credit
+
+The original issues in `bittorrent-dht`
+([disclosure](https://nodesecurity.io/advisories/68)) and
+`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by
+[Mathias Buus](https://github.com/mafintosh) and
+[Feross Aboukhadijeh](http://feross.org/).
+
+Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues
+and for his work running the [Node Security Project](https://nodesecurity.io/).
+
+Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and
+auditing the code.
+
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
diff --git a/node_modules/safe-buffer/index.d.ts b/node_modules/safe-buffer/index.d.ts
new file mode 100644
index 0000000..e9fed80
--- /dev/null
+++ b/node_modules/safe-buffer/index.d.ts
@@ -0,0 +1,187 @@
+declare module "safe-buffer" {
+ export class Buffer {
+ length: number
+ write(string: string, offset?: number, length?: number, encoding?: string): number;
+ toString(encoding?: string, start?: number, end?: number): string;
+ toJSON(): { type: 'Buffer', data: any[] };
+ equals(otherBuffer: Buffer): boolean;
+ compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
+ copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+ slice(start?: number, end?: number): Buffer;
+ writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
+ readUInt8(offset: number, noAssert?: boolean): number;
+ readUInt16LE(offset: number, noAssert?: boolean): number;
+ readUInt16BE(offset: number, noAssert?: boolean): number;
+ readUInt32LE(offset: number, noAssert?: boolean): number;
+ readUInt32BE(offset: number, noAssert?: boolean): number;
+ readInt8(offset: number, noAssert?: boolean): number;
+ readInt16LE(offset: number, noAssert?: boolean): number;
+ readInt16BE(offset: number, noAssert?: boolean): number;
+ readInt32LE(offset: number, noAssert?: boolean): number;
+ readInt32BE(offset: number, noAssert?: boolean): number;
+ readFloatLE(offset: number, noAssert?: boolean): number;
+ readFloatBE(offset: number, noAssert?: boolean): number;
+ readDoubleLE(offset: number, noAssert?: boolean): number;
+ readDoubleBE(offset: number, noAssert?: boolean): number;
+ swap16(): Buffer;
+ swap32(): Buffer;
+ swap64(): Buffer;
+ writeUInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt8(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
+ writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
+ writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
+ writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
+ fill(value: any, offset?: number, end?: number): this;
+ indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
+ includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
+
+ /**
+ * Allocates a new buffer containing the given {str}.
+ *
+ * @param str String to store in buffer.
+ * @param encoding encoding to use, optional. Default is 'utf8'
+ */
+ constructor (str: string, encoding?: string);
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ */
+ constructor (size: number);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: Uint8Array);
+ /**
+ * Produces a Buffer backed by the same allocated memory as
+ * the given {ArrayBuffer}.
+ *
+ *
+ * @param arrayBuffer The ArrayBuffer with which to share memory.
+ */
+ constructor (arrayBuffer: ArrayBuffer);
+ /**
+ * Allocates a new buffer containing the given {array} of octets.
+ *
+ * @param array The octets to store.
+ */
+ constructor (array: any[]);
+ /**
+ * Copies the passed {buffer} data onto a new {Buffer} instance.
+ *
+ * @param buffer The buffer to copy.
+ */
+ constructor (buffer: Buffer);
+ prototype: Buffer;
+ /**
+ * Allocates a new Buffer using an {array} of octets.
+ *
+ * @param array
+ */
+ static from(array: any[]): Buffer;
+ /**
+ * When passed a reference to the .buffer property of a TypedArray instance,
+ * the newly created Buffer will share the same allocated memory as the TypedArray.
+ * The optional {byteOffset} and {length} arguments specify a memory range
+ * within the {arrayBuffer} that will be shared by the Buffer.
+ *
+ * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
+ * @param byteOffset
+ * @param length
+ */
+ static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
+ /**
+ * Copies the passed {buffer} data onto a new Buffer instance.
+ *
+ * @param buffer
+ */
+ static from(buffer: Buffer): Buffer;
+ /**
+ * Creates a new Buffer containing the given JavaScript string {str}.
+ * If provided, the {encoding} parameter identifies the character encoding.
+ * If not provided, {encoding} defaults to 'utf8'.
+ *
+ * @param str
+ */
+ static from(str: string, encoding?: string): Buffer;
+ /**
+ * Returns true if {obj} is a Buffer
+ *
+ * @param obj object to test.
+ */
+ static isBuffer(obj: any): obj is Buffer;
+ /**
+ * Returns true if {encoding} is a valid encoding argument.
+ * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
+ *
+ * @param encoding string to test.
+ */
+ static isEncoding(encoding: string): boolean;
+ /**
+ * Gives the actual byte length of a string. encoding defaults to 'utf8'.
+ * This is not the same as String.prototype.length since that returns the number of characters in a string.
+ *
+ * @param string string to test.
+ * @param encoding encoding used to evaluate (defaults to 'utf8')
+ */
+ static byteLength(string: string, encoding?: string): number;
+ /**
+ * Returns a buffer which is the result of concatenating all the buffers in the list together.
+ *
+ * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
+ * If the list has exactly one item, then the first item of the list is returned.
+ * If the list has more than one item, then a new Buffer is created.
+ *
+ * @param list An array of Buffer objects to concatenate
+ * @param totalLength Total length of the buffers when concatenated.
+ * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
+ */
+ static concat(list: Buffer[], totalLength?: number): Buffer;
+ /**
+ * The same as buf1.compare(buf2).
+ */
+ static compare(buf1: Buffer, buf2: Buffer): number;
+ /**
+ * Allocates a new buffer of {size} octets.
+ *
+ * @param size count of octets to allocate.
+ * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
+ * If parameter is omitted, buffer will be filled with zeros.
+ * @param encoding encoding used for call to buf.fill while initalizing
+ */
+ static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
+ /**
+ * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafe(size: number): Buffer;
+ /**
+ * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
+ * of the newly created Buffer are unknown and may contain sensitive data.
+ *
+ * @param size count of octets to allocate
+ */
+ static allocUnsafeSlow(size: number): Buffer;
+ }
+} \ No newline at end of file
diff --git a/node_modules/safe-buffer/index.js b/node_modules/safe-buffer/index.js
new file mode 100644
index 0000000..f8d3ec9
--- /dev/null
+++ b/node_modules/safe-buffer/index.js
@@ -0,0 +1,65 @@
+/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
+/* eslint-disable node/no-deprecated-api */
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.prototype = Object.create(Buffer.prototype)
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
diff --git a/node_modules/safe-buffer/package.json b/node_modules/safe-buffer/package.json
new file mode 100644
index 0000000..d968b03
--- /dev/null
+++ b/node_modules/safe-buffer/package.json
@@ -0,0 +1,79 @@
+{
+ "_args": [
+ [
+ "safe-buffer@5.2.1",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "safe-buffer@5.2.1",
+ "_id": "safe-buffer@5.2.1",
+ "_inBundle": false,
+ "_integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "_location": "/safe-buffer",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "safe-buffer@5.2.1",
+ "name": "safe-buffer",
+ "escapedName": "safe-buffer",
+ "rawSpec": "5.2.1",
+ "saveSpec": null,
+ "fetchSpec": "5.2.1"
+ },
+ "_requiredBy": [
+ "/string_decoder"
+ ],
+ "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "_spec": "5.2.1",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "https://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/safe-buffer/issues"
+ },
+ "description": "Safer Node.js Buffer API",
+ "devDependencies": {
+ "standard": "*",
+ "tape": "^5.0.0"
+ },
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "homepage": "https://github.com/feross/safe-buffer",
+ "keywords": [
+ "buffer",
+ "buffer allocate",
+ "node security",
+ "safe",
+ "safe-buffer",
+ "security",
+ "uninitialized"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "safe-buffer",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/safe-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && tape test/*.js"
+ },
+ "types": "index.d.ts",
+ "version": "5.2.1"
+}
diff --git a/node_modules/signal-exit/CHANGELOG.md b/node_modules/signal-exit/CHANGELOG.md
new file mode 100644
index 0000000..ed104f4
--- /dev/null
+++ b/node_modules/signal-exit/CHANGELOG.md
@@ -0,0 +1,35 @@
+# Changelog
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+### [3.0.3](https://github.com/tapjs/signal-exit/compare/v3.0.2...v3.0.3) (2020-03-26)
+
+
+### Bug Fixes
+
+* patch `SIGHUP` to `SIGINT` when on Windows ([cfd1046](https://github.com/tapjs/signal-exit/commit/cfd1046079af4f0e44f93c69c237a09de8c23ef2))
+* **ci:** use Travis for Windows builds ([007add7](https://github.com/tapjs/signal-exit/commit/007add793d2b5ae3c382512103adbf321768a0b8))
+
+<a name="3.0.1"></a>
+## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08)
+
+
+### Bug Fixes
+
+* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb))
+
+
+
+<a name="3.0.0"></a>
+# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13)
+
+
+### Bug Fixes
+
+* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8))
+* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c))
+
+
+### BREAKING CHANGES
+
+* signal-exit no longer wires into SIGPROF
diff --git a/node_modules/signal-exit/LICENSE.txt b/node_modules/signal-exit/LICENSE.txt
new file mode 100644
index 0000000..eead04a
--- /dev/null
+++ b/node_modules/signal-exit/LICENSE.txt
@@ -0,0 +1,16 @@
+The ISC License
+
+Copyright (c) 2015, Contributors
+
+Permission to use, copy, modify, and/or distribute this software
+for any purpose with or without fee is hereby granted, provided
+that the above copyright notice and this permission notice
+appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/signal-exit/README.md b/node_modules/signal-exit/README.md
new file mode 100644
index 0000000..9f8eb59
--- /dev/null
+++ b/node_modules/signal-exit/README.md
@@ -0,0 +1,39 @@
+# signal-exit
+
+[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit)
+[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master)
+[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit)
+[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)
+
+When you want to fire an event no matter how a process exits:
+
+* reaching the end of execution.
+* explicitly having `process.exit(code)` called.
+* having `process.kill(pid, sig)` called.
+* receiving a fatal signal from outside the process
+
+Use `signal-exit`.
+
+```js
+var onExit = require('signal-exit')
+
+onExit(function (code, signal) {
+ console.log('process exited!')
+})
+```
+
+## API
+
+`var remove = onExit(function (code, signal) {}, options)`
+
+The return value of the function is a function that will remove the
+handler.
+
+Note that the function *only* fires for signals if the signal would
+cause the proces to exit. That is, there are no other listeners, and
+it is a fatal signal.
+
+## Options
+
+* `alwaysLast`: Run this handler after any other signal or exit
+ handlers. This causes `process.emit` to be monkeypatched.
diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js
new file mode 100644
index 0000000..6b6c43a
--- /dev/null
+++ b/node_modules/signal-exit/index.js
@@ -0,0 +1,163 @@
+// Note: since nyc uses this module to output coverage, any lines
+// that are in the direct sync flow of nyc's outputCoverage are
+// ignored, since we can never get coverage for them.
+var assert = require('assert')
+var signals = require('./signals.js')
+var isWin = /^win/i.test(process.platform)
+
+var EE = require('events')
+/* istanbul ignore if */
+if (typeof EE !== 'function') {
+ EE = EE.EventEmitter
+}
+
+var emitter
+if (process.__signal_exit_emitter__) {
+ emitter = process.__signal_exit_emitter__
+} else {
+ emitter = process.__signal_exit_emitter__ = new EE()
+ emitter.count = 0
+ emitter.emitted = {}
+}
+
+// Because this emitter is a global, we have to check to see if a
+// previous version of this library failed to enable infinite listeners.
+// I know what you're about to say. But literally everything about
+// signal-exit is a compromise with evil. Get used to it.
+if (!emitter.infinite) {
+ emitter.setMaxListeners(Infinity)
+ emitter.infinite = true
+}
+
+module.exports = function (cb, opts) {
+ assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
+
+ if (loaded === false) {
+ load()
+ }
+
+ var ev = 'exit'
+ if (opts && opts.alwaysLast) {
+ ev = 'afterexit'
+ }
+
+ var remove = function () {
+ emitter.removeListener(ev, cb)
+ if (emitter.listeners('exit').length === 0 &&
+ emitter.listeners('afterexit').length === 0) {
+ unload()
+ }
+ }
+ emitter.on(ev, cb)
+
+ return remove
+}
+
+module.exports.unload = unload
+function unload () {
+ if (!loaded) {
+ return
+ }
+ loaded = false
+
+ signals.forEach(function (sig) {
+ try {
+ process.removeListener(sig, sigListeners[sig])
+ } catch (er) {}
+ })
+ process.emit = originalProcessEmit
+ process.reallyExit = originalProcessReallyExit
+ emitter.count -= 1
+}
+
+function emit (event, code, signal) {
+ if (emitter.emitted[event]) {
+ return
+ }
+ emitter.emitted[event] = true
+ emitter.emit(event, code, signal)
+}
+
+// { <signal>: <listener fn>, ... }
+var sigListeners = {}
+signals.forEach(function (sig) {
+ sigListeners[sig] = function listener () {
+ // If there are no other listeners, an exit is coming!
+ // Simplest way: remove us and then re-send the signal.
+ // We know that this will kill the process, so we can
+ // safely emit now.
+ var listeners = process.listeners(sig)
+ if (listeners.length === emitter.count) {
+ unload()
+ emit('exit', null, sig)
+ /* istanbul ignore next */
+ emit('afterexit', null, sig)
+ /* istanbul ignore next */
+ if (isWin && sig === 'SIGHUP') {
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
+ // so use a supported signal instead
+ sig = 'SIGINT'
+ }
+ process.kill(process.pid, sig)
+ }
+ }
+})
+
+module.exports.signals = function () {
+ return signals
+}
+
+module.exports.load = load
+
+var loaded = false
+
+function load () {
+ if (loaded) {
+ return
+ }
+ loaded = true
+
+ // This is the number of onSignalExit's that are in play.
+ // It's important so that we can count the correct number of
+ // listeners on signals, and don't wait for the other one to
+ // handle it instead of us.
+ emitter.count += 1
+
+ signals = signals.filter(function (sig) {
+ try {
+ process.on(sig, sigListeners[sig])
+ return true
+ } catch (er) {
+ return false
+ }
+ })
+
+ process.emit = processEmit
+ process.reallyExit = processReallyExit
+}
+
+var originalProcessReallyExit = process.reallyExit
+function processReallyExit (code) {
+ process.exitCode = code || 0
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ /* istanbul ignore next */
+ originalProcessReallyExit.call(process, process.exitCode)
+}
+
+var originalProcessEmit = process.emit
+function processEmit (ev, arg) {
+ if (ev === 'exit') {
+ if (arg !== undefined) {
+ process.exitCode = arg
+ }
+ var ret = originalProcessEmit.apply(this, arguments)
+ emit('exit', process.exitCode, null)
+ /* istanbul ignore next */
+ emit('afterexit', process.exitCode, null)
+ return ret
+ } else {
+ return originalProcessEmit.apply(this, arguments)
+ }
+}
diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json
new file mode 100644
index 0000000..f99291f
--- /dev/null
+++ b/node_modules/signal-exit/package.json
@@ -0,0 +1,69 @@
+{
+ "_args": [
+ [
+ "signal-exit@3.0.3",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "signal-exit@3.0.3",
+ "_id": "signal-exit@3.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
+ "_location": "/signal-exit",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "signal-exit@3.0.3",
+ "name": "signal-exit",
+ "escapedName": "signal-exit",
+ "rawSpec": "3.0.3",
+ "saveSpec": null,
+ "fetchSpec": "3.0.3"
+ },
+ "_requiredBy": [
+ "/restore-cursor"
+ ],
+ "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
+ "_spec": "3.0.3",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Ben Coe",
+ "email": "ben@npmjs.com"
+ },
+ "bugs": {
+ "url": "https://github.com/tapjs/signal-exit/issues"
+ },
+ "description": "when you want to fire an event no matter how a process exits.",
+ "devDependencies": {
+ "chai": "^3.5.0",
+ "coveralls": "^2.11.10",
+ "nyc": "^8.1.0",
+ "standard": "^8.1.0",
+ "standard-version": "^2.3.0",
+ "tap": "^8.0.1"
+ },
+ "files": [
+ "index.js",
+ "signals.js"
+ ],
+ "homepage": "https://github.com/tapjs/signal-exit",
+ "keywords": [
+ "signal",
+ "exit"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "name": "signal-exit",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/tapjs/signal-exit.git"
+ },
+ "scripts": {
+ "coverage": "nyc report --reporter=text-lcov | coveralls",
+ "pretest": "standard",
+ "release": "standard-version",
+ "test": "tap --timeout=240 ./test/*.js --cov"
+ },
+ "version": "3.0.3"
+}
diff --git a/node_modules/signal-exit/signals.js b/node_modules/signal-exit/signals.js
new file mode 100644
index 0000000..3bd67a8
--- /dev/null
+++ b/node_modules/signal-exit/signals.js
@@ -0,0 +1,53 @@
+// This is not the set of all possible signals.
+//
+// It IS, however, the set of all signals that trigger
+// an exit on either Linux or BSD systems. Linux is a
+// superset of the signal names supported on BSD, and
+// the unknown signals just fail to register, so we can
+// catch that easily enough.
+//
+// Don't bother with SIGKILL. It's uncatchable, which
+// means that we can't fire any callbacks anyway.
+//
+// If a user does happen to register a handler on a non-
+// fatal signal like SIGWINCH or something, and then
+// exit, it'll end up firing `process.emit('exit')`, so
+// the handler will be fired anyway.
+//
+// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
+// artificially, inherently leave the process in a
+// state from which it is not safe to try and enter JS
+// listeners.
+module.exports = [
+ 'SIGABRT',
+ 'SIGALRM',
+ 'SIGHUP',
+ 'SIGINT',
+ 'SIGTERM'
+]
+
+if (process.platform !== 'win32') {
+ module.exports.push(
+ 'SIGVTALRM',
+ 'SIGXCPU',
+ 'SIGXFSZ',
+ 'SIGUSR2',
+ 'SIGTRAP',
+ 'SIGSYS',
+ 'SIGQUIT',
+ 'SIGIOT'
+ // should detect profiler and enable/disable accordingly.
+ // see #21
+ // 'SIGPROF'
+ )
+}
+
+if (process.platform === 'linux') {
+ module.exports.push(
+ 'SIGIO',
+ 'SIGPOLL',
+ 'SIGPWR',
+ 'SIGSTKFLT',
+ 'SIGUNUSED'
+ )
+}
diff --git a/node_modules/string_decoder/LICENSE b/node_modules/string_decoder/LICENSE
new file mode 100644
index 0000000..778edb2
--- /dev/null
+++ b/node_modules/string_decoder/LICENSE
@@ -0,0 +1,48 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
+"""
+
diff --git a/node_modules/string_decoder/README.md b/node_modules/string_decoder/README.md
new file mode 100644
index 0000000..5fd5831
--- /dev/null
+++ b/node_modules/string_decoder/README.md
@@ -0,0 +1,47 @@
+# string_decoder
+
+***Node-core v8.9.4 string_decoder for userland***
+
+
+[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
+[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
+
+
+```bash
+npm install --save string_decoder
+```
+
+***Node-core string_decoder for userland***
+
+This package is a mirror of the string_decoder implementation in Node-core.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
+
+As of version 1.0.0 **string_decoder** uses semantic versioning.
+
+## Previous versions
+
+Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
+
+## Update
+
+The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
+
+## Streams Working Group
+
+`string_decoder` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+ project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+ notice of changes.
+
+See [readable-stream](https://github.com/nodejs/readable-stream) for
+more details.
diff --git a/node_modules/string_decoder/lib/string_decoder.js b/node_modules/string_decoder/lib/string_decoder.js
new file mode 100644
index 0000000..2e89e63
--- /dev/null
+++ b/node_modules/string_decoder/lib/string_decoder.js
@@ -0,0 +1,296 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// 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.
+
+'use strict';
+
+/*<replacement>*/
+
+var Buffer = require('safe-buffer').Buffer;
+/*</replacement>*/
+
+var isEncoding = Buffer.isEncoding || function (encoding) {
+ encoding = '' + encoding;
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
+ return true;
+ default:
+ return false;
+ }
+};
+
+function _normalizeEncoding(enc) {
+ if (!enc) return 'utf8';
+ var retried;
+ while (true) {
+ switch (enc) {
+ case 'utf8':
+ case 'utf-8':
+ return 'utf8';
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return 'utf16le';
+ case 'latin1':
+ case 'binary':
+ return 'latin1';
+ case 'base64':
+ case 'ascii':
+ case 'hex':
+ return enc;
+ default:
+ if (retried) return; // undefined
+ enc = ('' + enc).toLowerCase();
+ retried = true;
+ }
+ }
+};
+
+// Do not cache `Buffer.isEncoding` when checking encoding names as some
+// modules monkey-patch it to support additional encodings
+function normalizeEncoding(enc) {
+ var nenc = _normalizeEncoding(enc);
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
+ return nenc || enc;
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters.
+exports.StringDecoder = StringDecoder;
+function StringDecoder(encoding) {
+ this.encoding = normalizeEncoding(encoding);
+ var nb;
+ switch (this.encoding) {
+ case 'utf16le':
+ this.text = utf16Text;
+ this.end = utf16End;
+ nb = 4;
+ break;
+ case 'utf8':
+ this.fillLast = utf8FillLast;
+ nb = 4;
+ break;
+ case 'base64':
+ this.text = base64Text;
+ this.end = base64End;
+ nb = 3;
+ break;
+ default:
+ this.write = simpleWrite;
+ this.end = simpleEnd;
+ return;
+ }
+ this.lastNeed = 0;
+ this.lastTotal = 0;
+ this.lastChar = Buffer.allocUnsafe(nb);
+}
+
+StringDecoder.prototype.write = function (buf) {
+ if (buf.length === 0) return '';
+ var r;
+ var i;
+ if (this.lastNeed) {
+ r = this.fillLast(buf);
+ if (r === undefined) return '';
+ i = this.lastNeed;
+ this.lastNeed = 0;
+ } else {
+ i = 0;
+ }
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
+ return r || '';
+};
+
+StringDecoder.prototype.end = utf8End;
+
+// Returns only complete characters in a Buffer
+StringDecoder.prototype.text = utf8Text;
+
+// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
+StringDecoder.prototype.fillLast = function (buf) {
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
+ this.lastNeed -= buf.length;
+};
+
+// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
+// continuation byte. If an invalid byte is detected, -2 is returned.
+function utf8CheckByte(byte) {
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
+ return byte >> 6 === 0x02 ? -1 : -2;
+}
+
+// Checks at most 3 bytes at the end of a Buffer in order to detect an
+// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
+// needed to complete the UTF-8 character (if applicable) are returned.
+function utf8CheckIncomplete(self, buf, i) {
+ var j = buf.length - 1;
+ if (j < i) return 0;
+ var nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 1;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) self.lastNeed = nb - 2;
+ return nb;
+ }
+ if (--j < i || nb === -2) return 0;
+ nb = utf8CheckByte(buf[j]);
+ if (nb >= 0) {
+ if (nb > 0) {
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
+ }
+ return nb;
+ }
+ return 0;
+}
+
+// Validates as many continuation bytes for a multi-byte UTF-8 character as
+// needed or are available. If we see a non-continuation byte where we expect
+// one, we "replace" the validated continuation bytes we've seen so far with
+// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
+// behavior. The continuation byte check is included three times in the case
+// where all of the continuation bytes for a character exist in the same buffer.
+// It is also done this way as a slight performance increase instead of using a
+// loop.
+function utf8CheckExtraBytes(self, buf, p) {
+ if ((buf[0] & 0xC0) !== 0x80) {
+ self.lastNeed = 0;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 1 && buf.length > 1) {
+ if ((buf[1] & 0xC0) !== 0x80) {
+ self.lastNeed = 1;
+ return '\ufffd';
+ }
+ if (self.lastNeed > 2 && buf.length > 2) {
+ if ((buf[2] & 0xC0) !== 0x80) {
+ self.lastNeed = 2;
+ return '\ufffd';
+ }
+ }
+ }
+}
+
+// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
+function utf8FillLast(buf) {
+ var p = this.lastTotal - this.lastNeed;
+ var r = utf8CheckExtraBytes(this, buf, p);
+ if (r !== undefined) return r;
+ if (this.lastNeed <= buf.length) {
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
+ }
+ buf.copy(this.lastChar, p, 0, buf.length);
+ this.lastNeed -= buf.length;
+}
+
+// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
+// partial character, the character's bytes are buffered until the required
+// number of bytes are available.
+function utf8Text(buf, i) {
+ var total = utf8CheckIncomplete(this, buf, i);
+ if (!this.lastNeed) return buf.toString('utf8', i);
+ this.lastTotal = total;
+ var end = buf.length - (total - this.lastNeed);
+ buf.copy(this.lastChar, 0, end);
+ return buf.toString('utf8', i, end);
+}
+
+// For UTF-8, a replacement character is added when ending on a partial
+// character.
+function utf8End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + '\ufffd';
+ return r;
+}
+
+// UTF-16LE typically needs two bytes per character, but even if we have an even
+// number of bytes available, we need to check if we end on a leading/high
+// surrogate. In that case, we need to wait for the next two bytes in order to
+// decode the last character properly.
+function utf16Text(buf, i) {
+ if ((buf.length - i) % 2 === 0) {
+ var r = buf.toString('utf16le', i);
+ if (r) {
+ var c = r.charCodeAt(r.length - 1);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+ this.lastNeed = 2;
+ this.lastTotal = 4;
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ return r.slice(0, -1);
+ }
+ }
+ return r;
+ }
+ this.lastNeed = 1;
+ this.lastTotal = 2;
+ this.lastChar[0] = buf[buf.length - 1];
+ return buf.toString('utf16le', i, buf.length - 1);
+}
+
+// For UTF-16LE we do not explicitly append special replacement characters if we
+// end on a partial character, we simply let v8 handle that.
+function utf16End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) {
+ var end = this.lastTotal - this.lastNeed;
+ return r + this.lastChar.toString('utf16le', 0, end);
+ }
+ return r;
+}
+
+function base64Text(buf, i) {
+ var n = (buf.length - i) % 3;
+ if (n === 0) return buf.toString('base64', i);
+ this.lastNeed = 3 - n;
+ this.lastTotal = 3;
+ if (n === 1) {
+ this.lastChar[0] = buf[buf.length - 1];
+ } else {
+ this.lastChar[0] = buf[buf.length - 2];
+ this.lastChar[1] = buf[buf.length - 1];
+ }
+ return buf.toString('base64', i, buf.length - n);
+}
+
+function base64End(buf) {
+ var r = buf && buf.length ? this.write(buf) : '';
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
+ return r;
+}
+
+// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
+function simpleWrite(buf) {
+ return buf.toString(this.encoding);
+}
+
+function simpleEnd(buf) {
+ return buf && buf.length ? this.write(buf) : '';
+} \ No newline at end of file
diff --git a/node_modules/string_decoder/package.json b/node_modules/string_decoder/package.json
new file mode 100644
index 0000000..d3764c0
--- /dev/null
+++ b/node_modules/string_decoder/package.json
@@ -0,0 +1,65 @@
+{
+ "_args": [
+ [
+ "string_decoder@1.3.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "string_decoder@1.3.0",
+ "_id": "string_decoder@1.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "_location": "/string_decoder",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "string_decoder@1.3.0",
+ "name": "string_decoder",
+ "escapedName": "string_decoder",
+ "rawSpec": "1.3.0",
+ "saveSpec": null,
+ "fetchSpec": "1.3.0"
+ },
+ "_requiredBy": [
+ "/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "_spec": "1.3.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "bugs": {
+ "url": "https://github.com/nodejs/string_decoder/issues"
+ },
+ "dependencies": {
+ "safe-buffer": "~5.2.0"
+ },
+ "description": "The string_decoder module from Node core",
+ "devDependencies": {
+ "babel-polyfill": "^6.23.0",
+ "core-util-is": "^1.0.2",
+ "inherits": "^2.0.3",
+ "tap": "~0.4.8"
+ },
+ "files": [
+ "lib"
+ ],
+ "homepage": "https://github.com/nodejs/string_decoder",
+ "keywords": [
+ "string",
+ "decoder",
+ "browser",
+ "browserify"
+ ],
+ "license": "MIT",
+ "main": "lib/string_decoder.js",
+ "name": "string_decoder",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/nodejs/string_decoder.git"
+ },
+ "scripts": {
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
+ "test": "tap test/parallel/*.js && node test/verify-dependencies"
+ },
+ "version": "1.3.0"
+}
diff --git a/node_modules/strip-ansi/index.d.ts b/node_modules/strip-ansi/index.d.ts
new file mode 100644
index 0000000..907fccc
--- /dev/null
+++ b/node_modules/strip-ansi/index.d.ts
@@ -0,0 +1,17 @@
+/**
+Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
+
+@example
+```
+import stripAnsi = require('strip-ansi');
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
+```
+*/
+declare function stripAnsi(string: string): string;
+
+export = stripAnsi;
diff --git a/node_modules/strip-ansi/index.js b/node_modules/strip-ansi/index.js
new file mode 100644
index 0000000..9a593df
--- /dev/null
+++ b/node_modules/strip-ansi/index.js
@@ -0,0 +1,4 @@
+'use strict';
+const ansiRegex = require('ansi-regex');
+
+module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;
diff --git a/node_modules/strip-ansi/license b/node_modules/strip-ansi/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/strip-ansi/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/strip-ansi/package.json b/node_modules/strip-ansi/package.json
new file mode 100644
index 0000000..485d285
--- /dev/null
+++ b/node_modules/strip-ansi/package.json
@@ -0,0 +1,89 @@
+{
+ "_args": [
+ [
+ "strip-ansi@6.0.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "strip-ansi@6.0.0",
+ "_id": "strip-ansi@6.0.0",
+ "_inBundle": false,
+ "_integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "_location": "/strip-ansi",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "strip-ansi@6.0.0",
+ "name": "strip-ansi",
+ "escapedName": "strip-ansi",
+ "rawSpec": "6.0.0",
+ "saveSpec": null,
+ "fetchSpec": "6.0.0"
+ },
+ "_requiredBy": [
+ "/ora"
+ ],
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "_spec": "6.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/chalk/strip-ansi/issues"
+ },
+ "dependencies": {
+ "ansi-regex": "^5.0.0"
+ },
+ "description": "Strip ANSI escape codes from a string",
+ "devDependencies": {
+ "ava": "^2.4.0",
+ "tsd": "^0.10.0",
+ "xo": "^0.25.3"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "homepage": "https://github.com/chalk/strip-ansi#readme",
+ "keywords": [
+ "strip",
+ "trim",
+ "remove",
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "license": "MIT",
+ "name": "strip-ansi",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/strip-ansi.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "6.0.0"
+}
diff --git a/node_modules/strip-ansi/readme.md b/node_modules/strip-ansi/readme.md
new file mode 100644
index 0000000..7c4b56d
--- /dev/null
+++ b/node_modules/strip-ansi/readme.md
@@ -0,0 +1,46 @@
+# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
+
+> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string
+
+
+## Install
+
+```
+$ npm install strip-ansi
+```
+
+
+## Usage
+
+```js
+const stripAnsi = require('strip-ansi');
+
+stripAnsi('\u001B[4mUnicorn\u001B[0m');
+//=> 'Unicorn'
+
+stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
+//=> 'Click'
+```
+
+
+## strip-ansi for enterprise
+
+Available as part of the Tidelift Subscription.
+
+The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
+
+
+## Related
+
+- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
diff --git a/node_modules/strtok3/LICENSE b/node_modules/strtok3/LICENSE
new file mode 100644
index 0000000..c85ef2c
--- /dev/null
+++ b/node_modules/strtok3/LICENSE
@@ -0,0 +1,15 @@
+Copyright (c) 2017, Borewit
+All rights reserved.
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
+Software.
+
+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. \ No newline at end of file
diff --git a/node_modules/strtok3/README.md b/node_modules/strtok3/README.md
new file mode 100644
index 0000000..b93a911
--- /dev/null
+++ b/node_modules/strtok3/README.md
@@ -0,0 +1,301 @@
+![Node.js CI](https://github.com/Borewit/strtok3/workflows/Node.js%20CI/badge.svg)
+[![NPM version](https://badge.fury.io/js/strtok3.svg)](https://npmjs.org/package/strtok3)
+[![npm downloads](http://img.shields.io/npm/dm/strtok3.svg)](https://npmcharts.com/compare/strtok3,token-types?start=1200&interval=30)
+[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=Borewit/music-metadata)](https://dependabot.com)[![Coverage status](https://coveralls.io/repos/github/Borewit/strtok3/badge.svg?branch=master)](https://coveralls.io/github/Borewit/strtok3?branch=master)
+[![DeepScan grade](https://deepscan.io/api/teams/5165/projects/8526/branches/103329/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=5165&pid=8526&bid=103329)
+[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/strtok3/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/strtok3?targetFile=package.json)
+[![Total alerts](https://img.shields.io/lgtm/alerts/g/Borewit/strtok3.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Borewit/strtok3/alerts/)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/59dd6795e61949fb97066ca52e6097ef)](https://www.codacy.com/app/Borewit/strtok3?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Borewit/strtok3&amp;utm_campaign=Badge_Grade)
+[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/Borewit/strtok3.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Borewit/strtok3/context:javascript)
+# strtok3
+
+A promise based streaming [*tokenizer*](#tokenizer) for [Node.js](http://nodejs.org) and browsers.
+This node module is a successor of [strtok2](https://github.com/Borewit/strtok2).
+
+The `strtok3` contains a few methods to turn different input into a [*tokenizer*](#tokenizer). Designed to
+* Support a streaming environment
+* Decoding of binary data, strings and numbers in mind
+* Read [predefined](https://github.com/Borewit/token-types) or custom tokens.
+* Optimized [*tokenizers*](#tokenizer) for reading from [file](#method-strtok3fromfile), [stream](#method-strtok3fromstream) or [buffer](#method-strtok3frombuffer).
+
+It can read from:
+* A file (taking a file path as an input)
+* A Node.js [stream](https://nodejs.org/api/stream.html).
+* A [Buffer](https://nodejs.org/api/buffer.html)
+* HTTP chunked transfer provided by [@tokenizer/http](https://github.com/Borewit/tokenizer-http).
+* Chunked [Amazon S3](https://aws.amazon.com/s3) access provided by [@tokenizer/s3](https://github.com/Borewit/tokenizer-s3).
+
+## Installation
+
+```sh
+npm install strtok3
+```
+
+## API
+
+Use one of the methods to instantiate an [*abstract tokenizer*](#tokenizer):
+* [strtok3.fromFile](#method-strtok3fromfile)
+* [strtok3.fromStream](#method-strtok3fromstream)
+* [strtok3.fromBuffer](#method-strtok3frombuffer)
+
+### strtok3 methods
+
+All of the strtok3 methods return a [*tokenizer*](#tokenizer), either directly or via a promise.
+
+#### Method `strtok3.fromFile()`
+
+| Parameter | Type | Description |
+|-----------|-----------------------|----------------------------|
+| path | Path to file (string) | Path to file to read from |
+
+Note that [file-information](#file-information) is automatically added.
+
+Returns, via a promise, a [*tokenizer*](#tokenizer) which can be used to parse a file.
+
+```js
+const strtok3 = require('strtok3');
+const Token = require('token-types');
+
+(async () => {
+
+ const tokenizer = await strtok3.fromFile("somefile.bin");
+ try {
+ const myNumber = await tokenizer.readToken(Token.UINT8);
+ console.log(`My number: ${myNumber}`);
+ } finally {
+ tokenizer.close(); // Close the file
+ }
+})();
+
+```
+
+#### Method `strtok3.fromStream()`
+
+Create [*tokenizer*](#tokenizer) from a node.js [readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable).
+
+| Parameter | Optional | Type | Description |
+|-----------|-----------|-----------------------------------------------------------------------------|--------------------------|
+| stream | no | [Readable](https://nodejs.org/api/stream.html#stream_class_stream_readable) | Stream to read from |
+| fileInfo | yes | [IFileInfo](#IFileInfo) | Provide file information |
+
+Returns a [*tokenizer*](#tokenizer), via a Promise, which can be used to parse a buffer.
+
+```js
+const strtok3 = require('strtok3');
+const Token = require('token-types');
+
+strtok3.fromStream(stream).then(tokenizer => {
+ return tokenizer.readToken(Token.UINT8).then(myUint8Number => {
+ console.log(`My number: ${myUint8Number}`);
+ });
+});
+```
+
+#### Method `strtok3.fromBuffer()`
+
+| Parameter | Optional | Type | Description |
+|-----------|----------|----------------------------------------------|--------------------------|
+| buffer | no | [Buffer](https://nodejs.org/api/buffer.html) | Buffer to read from |
+| fileInfo | yes | [IFileInfo](#IFileInfo) | Provide file information |
+
+Returns a [*tokenizer*](#tokenizer) which can be used to parse the provided buffer.
+
+```js
+const strtok3 = require('strtok3');
+
+const tokenizer = strtok3.fromBuffer(buffer);
+
+tokenizer.readToken(Token.UINT8).then(myUint8Number => {
+ console.log(`My number: ${myUint8Number}`);
+});
+```
+
+## Tokenizer
+The tokenizer allows us to *read* or *peek* from the *tokenizer-stream*. The *tokenizer-stream* is an abstraction of a [stream](https://nodejs.org/api/stream.html), file or [Buffer](https://nodejs.org/api/buffer.html).
+It can also be translated in chunked reads, as done in [@tokenizer/http](https://github.com/Borewit/tokenizer-http);
+
+What is the difference with Nodejs.js stream?
+* The *tokenizer-stream* supports jumping / seeking in a the *tokenizer-stream* using [`tokenizer.ignore()`](#method-tokenizerignore)
+* In addition to *read* methods, it has *peek* methods, to read a ahead and check what is coming.
+
+The [tokenizer.position](#attribute-tokenizerposition) keeps tracks of the read position.
+
+### strtok3 attributes
+
+#### Attribute `tokenizer.fileInfo`
+Optional attribute describing the file information, see [IFileInfo](#IFileInfo)
+
+#### Attribute `tokenizer.position`
+Pointer to the current position in the [*tokenizer*](#tokenizer) stream.
+If a *position* is provided to a *read* or *peek* method, is should be, at least, equal or greater than this value.
+
+### Tokenizer methods
+
+There are to groups of methods
+
+* *read* methods: used to read a *token* of [Buffer](https://nodejs.org/api/buffer.html) from the [*tokenizer*](#tokenizer). The position of the *tokenizer-stream* will advance with the size of the token.
+* *peek* methods: same as the read, but it will *not* advance the pointer. It allows to read (peek) ahead.
+
+#### Method `tokenizer.readBuffer()`
+
+Read buffer from stream.
+`readBuffer(buffer, options?)`
+
+| Parameter | Type | Description |
+|------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| buffer | [Buffer](https://nodejs.org/api/buffer.html) &#124; Uint8Array | Target buffer to write the data read to |
+| options | [IReadChunkOptions](#ireadchunkoptions) | An integer specifying the number of bytes to read |
+
+Return value `Promise<number>` Promise with number of bytes read. The number of bytes read maybe if less, *mayBeLess* flag was set.
+
+#### Method `tokenizer.peekBuffer()`
+
+Peek (read ahead) buffer from [*tokenizer*](#tokenizer)
+`peekBuffer(buffer, options?)`
+
+| Parameter | Type | Description |
+|------------|-----------------------------------------|-----------------------------------------------------|
+| buffer | Buffer &#124; Uint8Array | Target buffer to write the data read (peeked) to. |
+| options | [IReadChunkOptions](#ireadchunkoptions) | An integer specifying the number of bytes to read. | |
+
+Return value `Promise<number>` Promise with number of bytes read. The number of bytes read maybe if less, *mayBeLess* flag was set.
+
+#### Method `tokenizer.readToken()`
+
+Read a *token* from the tokenizer-stream.
+`readToken(token, position?)`
+
+| Parameter | Type | Description |
+|------------|-------------------------|---------------------------------------------------------------------------------------------------------------------- |
+| token | [IGetToken](#IGetToken) | Token to read from the tokenizer-stream. |
+| position? | number | Offset where to begin reading within the file. If position is null, data will be read from the current file position. |
+
+Return value `Promise<number>`. Promise with number of bytes read. The number of bytes read maybe if less, *mayBeLess* flag was set.
+
+#### Method `tokenizer.peekToken()`
+
+Peek a *token* from the [*tokenizer*](#tokenizer).
+`peekToken(token, position?)`
+
+| Parameter | Type | Description |
+|------------|----------------------------|-------------------------------------------------------------------------------------------------------------------------|
+| token | [IGetToken<T>](#IGetToken) | Token to read from the tokenizer-stream. |
+| position? | number | Offset where to begin reading within the file. If position is null, data will be read from the current file position. |
+
+Return value `Promise<T>` Promise with token value peeked from the [*tokenizer*](#tokenizer).
+
+#### Method `tokenizer.readNumber()`
+
+Peek a numeric [*token*](#token) from the [*tokenizer*](#tokenizer).
+`readNumber(token)`
+
+| Parameter | Type | Description |
+|------------|---------------------------------|----------------------------------------------------|
+| token | [IGetToken<number>](#IGetToken) | Numeric token to read from the tokenizer-stream. |
+
+Return value `Promise<number>` Promise with number peeked from the *tokenizer-stream*.
+
+#### Method `tokenizer.ignore()`
+
+Peek a numeric [*token*](#token) from the tokenizer-stream.
+`ignore(length)`
+
+| Parameter | Type | Description |
+|------------|--------|----------------------------------------------------------------------|
+| ignore | number | Numeric of bytes to ignore. Will advance the `tokenizer.position` |
+
+Return value `Promise<number>` Promise with number peeked from the *tokenizer-stream*.
+
+#### Method `tokenizer.close()`
+Clean up resources, such as closing a file pointer if applicable.
+
+### IReadChunkOptions
+
+Each attribute is optional:
+
+| Attribute | Type | Description |
+|-----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| offset | number | The offset in the buffer to start writing at; if not provided, start at 0 |
+| length | number | Requested number of bytes to read. |
+| position | number | Position where to peek from the file. If position is null, data will be read from the [current file position](#attribute-tokenizerposition). Position may not be less then [tokenizer.position](#attribute-tokenizerposition) |
+| mayBeLess | boolean | If and only if set, will not throw an EOF error if less then the requested *mayBeLess* could be read. |
+
+Example:
+```js
+ tokenizer.peekBuffer(buffer, {mayBeLess: true});
+```
+
+## IFileInfo
+
+File information interface which describes the underlying file, each attribute is optional.
+
+| Attribute | Type | Description |
+|-----------|---------|---------------------------------------------------------------------------------------------------|
+| size | number | File size in bytes |
+| mimeType | number | [MIME-type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of file. |
+| path | number | File path |
+| url | boolean | File URL |
+
+## Token
+
+The *token* is basically a description what to read form the [*tokenizer-stream*](#tokenizer).
+A basic set of *token types* can be found here: [*token-types*](https://github.com/Borewit/token-types).
+
+A token is something which implements the following interface:
+```ts
+export interface IGetToken<T> {
+
+ /**
+ * Length in bytes of encoded value
+ */
+ len: number;
+
+ /**
+ * Decode value from buffer at offset
+ * @param buf Buffer to read the decoded value from
+ * @param off Decode offset
+ */
+ get(buf: Buffer, off: number): T;
+}
+```
+The *tokenizer* reads `token.len` bytes from the *tokenizer-stream* into a Buffer.
+The `token.get` will be called with the Buffer. `token.get` is responsible for conversion from the buffer to the desired output type.
+
+## Browser compatibility
+To exclude fs based dependencies, you can use a submodule-import from 'strtok3/lib/core'.
+
+| function | 'strtok3' | 'strtok3/lib/core' |
+| ----------------------| --------------------|---------------------|
+| `parseBuffer` | ✓ | ✓ |
+| `parseStream` | ✓ | ✓ |
+| `fromFile` | ✓ | |
+
+### Working with Web-API readable stream
+To convert a [Web-API readable stream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader) into a [Node.js readable stream]((https://nodejs.org/api/stream.html#stream_readable_streams)), you can use [readable-web-to-node-stream](https://github.com/Borewit/readable-web-to-node-stream) to convert one in another.
+
+Example submodule-import:
+```js
+const strtok3core = require('strtok3/lib/core'); // Submodule-import to prevent Node.js specific dependencies
+const {ReadableWebToNodeStream} = require('readable-web-to-node-stream');
+
+(async () => {
+
+ const response = await fetch(url);
+ const readableWebStream = response.body; // Web-API readable stream
+ const nodeStream = new ReadableWebToNodeStream(readableWebStream); // convert to Node.js readable stream
+
+ const tokenizer = strtok3core.fromStream(nodeStream); // And we now have tokenizer in a web environment
+})();
+```
+
+## Licence
+
+(The MIT License)
+
+Copyright (c) 2020 Borewit
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/strtok3/lib/AbstractTokenizer.d.ts b/node_modules/strtok3/lib/AbstractTokenizer.d.ts
new file mode 100644
index 0000000..936a758
--- /dev/null
+++ b/node_modules/strtok3/lib/AbstractTokenizer.d.ts
@@ -0,0 +1,62 @@
+/// <reference types="node" />
+import { ITokenizer, IFileInfo, IReadChunkOptions } from './types';
+import { IGetToken, IToken } from '@tokenizer/token';
+/**
+ * Core tokenizer
+ */
+export declare abstract class AbstractTokenizer implements ITokenizer {
+ fileInfo: IFileInfo;
+ protected constructor(fileInfo?: IFileInfo);
+ /**
+ * Tokenizer-stream position
+ */
+ position: number;
+ private numBuffer;
+ /**
+ * Read buffer from tokenizer
+ * @param buffer - Target buffer to fill with data read from the tokenizer-stream
+ * @param options - Additional read options
+ * @returns Promise with number of bytes read
+ */
+ abstract readBuffer(buffer: Buffer | Uint8Array, options?: IReadChunkOptions): Promise<number>;
+ /**
+ * Peek (read ahead) buffer from tokenizer
+ * @param buffer - Target buffer to fill with data peek from the tokenizer-stream
+ * @param options - Peek behaviour options
+ * @returns Promise with number of bytes read
+ */
+ abstract peekBuffer(buffer: Buffer | Uint8Array, options?: IReadChunkOptions): Promise<number>;
+ /**
+ * Read a token from the tokenizer-stream
+ * @param token - The token to read
+ * @param position - If provided, the desired position in the tokenizer-stream
+ * @returns Promise with token data
+ */
+ readToken<T>(token: IGetToken<T>, position?: number): Promise<T>;
+ /**
+ * Peek a token from the tokenizer-stream.
+ * @param token - Token to peek from the tokenizer-stream.
+ * @param position - Offset where to begin reading within the file. If position is null, data will be read from the current file position.
+ * @returns Promise with token data
+ */
+ peekToken<T>(token: IGetToken<T>, position?: number): Promise<T>;
+ /**
+ * Read a numeric token from the stream
+ * @param token - Numeric token
+ * @returns Promise with number
+ */
+ readNumber(token: IToken<number>): Promise<number>;
+ /**
+ * Read a numeric token from the stream
+ * @param token - Numeric token
+ * @returns Promise with number
+ */
+ peekNumber(token: IToken<number>): Promise<number>;
+ /**
+ * Ignore number of bytes, advances the pointer in under tokenizer-stream.
+ * @param length - Number of bytes to skip (ignore)
+ * @return actual number of bytes ignored
+ */
+ abstract ignore(length: number): Promise<number>;
+ close(): Promise<void>;
+}
diff --git a/node_modules/strtok3/lib/AbstractTokenizer.js b/node_modules/strtok3/lib/AbstractTokenizer.js
new file mode 100644
index 0000000..d4d4dba
--- /dev/null
+++ b/node_modules/strtok3/lib/AbstractTokenizer.js
@@ -0,0 +1,69 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AbstractTokenizer = void 0;
+const peek_readable_1 = require("peek-readable");
+/**
+ * Core tokenizer
+ */
+class AbstractTokenizer {
+ constructor(fileInfo) {
+ /**
+ * Tokenizer-stream position
+ */
+ this.position = 0;
+ this.numBuffer = Buffer.alloc(10);
+ this.fileInfo = fileInfo ? fileInfo : {};
+ }
+ /**
+ * Read a token from the tokenizer-stream
+ * @param token - The token to read
+ * @param position - If provided, the desired position in the tokenizer-stream
+ * @returns Promise with token data
+ */
+ async readToken(token, position) {
+ const buffer = Buffer.alloc(token.len);
+ const len = await this.readBuffer(buffer, { position });
+ if (len < token.len)
+ throw new peek_readable_1.EndOfStreamError();
+ return token.get(buffer, 0);
+ }
+ /**
+ * Peek a token from the tokenizer-stream.
+ * @param token - Token to peek from the tokenizer-stream.
+ * @param position - Offset where to begin reading within the file. If position is null, data will be read from the current file position.
+ * @returns Promise with token data
+ */
+ async peekToken(token, position = this.position) {
+ const buffer = Buffer.alloc(token.len);
+ const len = await this.peekBuffer(buffer, { position });
+ if (len < token.len)
+ throw new peek_readable_1.EndOfStreamError();
+ return token.get(buffer, 0);
+ }
+ /**
+ * Read a numeric token from the stream
+ * @param token - Numeric token
+ * @returns Promise with number
+ */
+ async readNumber(token) {
+ const len = await this.readBuffer(this.numBuffer, { length: token.len });
+ if (len < token.len)
+ throw new peek_readable_1.EndOfStreamError();
+ return token.get(this.numBuffer, 0);
+ }
+ /**
+ * Read a numeric token from the stream
+ * @param token - Numeric token
+ * @returns Promise with number
+ */
+ async peekNumber(token) {
+ const len = await this.peekBuffer(this.numBuffer, { length: token.len });
+ if (len < token.len)
+ throw new peek_readable_1.EndOfStreamError();
+ return token.get(this.numBuffer, 0);
+ }
+ async close() {
+ // empty
+ }
+}
+exports.AbstractTokenizer = AbstractTokenizer;
diff --git a/node_modules/strtok3/lib/BufferTokenizer.d.ts b/node_modules/strtok3/lib/BufferTokenizer.d.ts
new file mode 100644
index 0000000..1dd6119
--- /dev/null
+++ b/node_modules/strtok3/lib/BufferTokenizer.d.ts
@@ -0,0 +1,37 @@
+/// <reference types="node" />
+import { IFileInfo, IReadChunkOptions, ITokenizer } from './types';
+import { IGetToken, IToken } from '@tokenizer/token';
+export declare class BufferTokenizer implements ITokenizer {
+ private buffer;
+ fileInfo: IFileInfo;
+ position: number;
+ /**
+ * Construct BufferTokenizer
+ * @param buffer - Buffer to tokenize
+ * @param fileInfo - Pass additional file information to the tokenizer
+ */
+ constructor(buffer: Buffer, fileInfo?: IFileInfo);
+ /**
+ * Read buffer from tokenizer
+ * @param buffer
+ * @param options - Read behaviour options
+ * @returns {Promise<number>}
+ */
+ readBuffer(buffer: Buffer | Uint8Array, options?: IReadChunkOptions): Promise<number>;
+ /**
+ * Peek (read ahead) buffer from tokenizer
+ * @param buffer
+ * @param options - Read behaviour options
+ * @returns {Promise<number>}
+ */
+ peekBuffer(buffer: Buffer | Uint8Array, options?: IReadChunkOptions): Promise<number>;
+ readToken<T>(token: IGetToken<T>, position?: number): Promise<T>;
+ peekToken<T>(token: IGetToken<T>, position?: number): Promise<T>;
+ readNumber(token: IToken<number>): Promise<number>;
+ peekNumber(token: IToken<number>): Promise<number>;
+ /**
+ * @return actual number of bytes ignored
+ */
+ ignore(length: number): Promise<number>;
+ close(): Promise<void>;
+}
diff --git a/node_modules/strtok3/lib/BufferTokenizer.js b/node_modules/strtok3/lib/BufferTokenizer.js
new file mode 100644
index 0000000..aae1395
--- /dev/null
+++ b/node_modules/strtok3/lib/BufferTokenizer.js
@@ -0,0 +1,114 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BufferTokenizer = void 0;
+const peek_readable_1 = require("peek-readable");
+class BufferTokenizer {
+ /**
+ * Construct BufferTokenizer
+ * @param buffer - Buffer to tokenize
+ * @param fileInfo - Pass additional file information to the tokenizer
+ */
+ constructor(buffer, fileInfo) {
+ this.buffer = buffer;
+ this.position = 0;
+ this.fileInfo = fileInfo ? fileInfo : {};
+ this.fileInfo.size = this.fileInfo.size ? this.fileInfo.size : buffer.length;
+ }
+ /**
+ * Read buffer from tokenizer
+ * @param buffer
+ * @param options - Read behaviour options
+ * @returns {Promise<number>}
+ */
+ async readBuffer(buffer, options) {
+ if (options && options.position) {
+ if (options.position < this.position) {
+ throw new Error('`options.position` must be equal or greater than `tokenizer.position`');
+ }
+ this.position = options.position;
+ }
+ return this.peekBuffer(buffer, options).then(bytesRead => {
+ this.position += bytesRead;
+ return bytesRead;
+ });
+ }
+ /**
+ * Peek (read ahead) buffer from tokenizer
+ * @param buffer
+ * @param options - Read behaviour options
+ * @returns {Promise<number>}
+ */
+ async peekBuffer(buffer, options) {
+ let offset = 0;
+ let length = buffer.length;
+ let position = this.position;
+ if (options) {
+ if (options.position) {
+ if (options.position < this.position) {
+ throw new Error('`options.position` can be less than `tokenizer.position`');
+ }
+ position = options.position;
+ }
+ if (Number.isInteger(options.length)) {
+ length = options.length;
+ }
+ else {
+ length -= options.offset || 0;
+ }
+ if (options.offset) {
+ offset = options.offset;
+ }
+ }
+ if (length === 0) {
+ return Promise.resolve(0);
+ }
+ position = position || this.position;
+ if (!length) {
+ length = buffer.length;
+ }
+ const bytes2read = Math.min(this.buffer.length - position, length);
+ if ((!options || !options.mayBeLess) && bytes2read < length) {
+ throw new peek_readable_1.EndOfStreamError();
+ }
+ else {
+ this.buffer.copy(buffer, offset, position, position + bytes2read);
+ return bytes2read;
+ }
+ }
+ async readToken(token, position) {
+ this.position = position || this.position;
+ try {
+ const tv = this.peekToken(token, this.position);
+ this.position += token.len;
+ return tv;
+ }
+ catch (err) {
+ this.position += this.buffer.length - position;
+ throw err;
+ }
+ }
+ async peekToken(token, position = this.position) {
+ if (this.buffer.length - position < token.len) {
+ throw new peek_readable_1.EndOfStreamError();
+ }
+ return token.get(this.buffer, position);
+ }
+ async readNumber(token) {
+ return this.readToken(token);
+ }
+ async peekNumber(token) {
+ return this.peekToken(token);
+ }
+ /**
+ * @return actual number of bytes ignored
+ */
+ async ignore(length) {
+ const bytesIgnored = Math.min(this.buffer.length - this.position, length);
+ this.position += bytesIgnored;
+ return bytesIgnored;
+ }
+ async close() {
+ // empty
+ }
+}
+exports.BufferTokenizer = BufferTokenizer;
diff --git a/node_modules/strtok3/lib/FileTokenizer.d.ts b/node_modules/strtok3/lib/FileTokenizer.d.ts
new file mode 100644
index 0000000..c15f74b
--- /dev/null
+++ b/node_modules/strtok3/lib/FileTokenizer.d.ts
@@ -0,0 +1,28 @@
+/// <reference types="node" />
+import { AbstractTokenizer } from './AbstractTokenizer';
+import { IFileInfo, IReadChunkOptions } from './types';
+export declare class FileTokenizer extends AbstractTokenizer {
+ private fd;
+ constructor(fd: number, fileInfo: IFileInfo);
+ /**
+ * Read buffer from file
+ * @param buffer
+ * @param options - Read behaviour options
+ * @returns Promise number of bytes read
+ */
+ readBuffer(buffer: Buffer, options?: IReadChunkOptions): Promise<number>;
+ /**
+ * Peek buffer from file
+ * @param buffer
+ * @param options - Read behaviour options
+ * @returns Promise number of bytes read
+ */
+ peekBuffer(buffer: Buffer, options?: IReadChunkOptions): Promise<number>;
+ /**
+ * @param length - Number of bytes to ignore
+ * @return resolves the number of bytes ignored, equals length if this available, otherwise the number of bytes available
+ */
+ ignore(length: number): Promise<number>;
+ close(): Promise<void>;
+}
+export declare function fromFile(sourceFilePath: string): Promise<FileTokenizer>;
diff --git a/node_modules/strtok3/lib/FileTokenizer.js b/node_modules/strtok3/lib/FileTokenizer.js
new file mode 100644
index 0000000..b3adc24
--- /dev/null
+++ b/node_modules/strtok3/lib/FileTokenizer.js
@@ -0,0 +1,112 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.fromFile = exports.FileTokenizer = void 0;
+const AbstractTokenizer_1 = require("./AbstractTokenizer");
+const peek_readable_1 = require("peek-readable");
+const fs = require("./FsPromise");
+class FileTokenizer extends AbstractTokenizer_1.AbstractTokenizer {
+ constructor(fd, fileInfo) {
+ super(fileInfo);
+ this.fd = fd;
+ }
+ /**
+ * Read buffer from file
+ * @param buffer
+ * @param options - Read behaviour options
+ * @returns Promise number of bytes read
+ */
+ async readBuffer(buffer, options) {
+ let offset = 0;
+ let length = buffer.length;
+ if (options) {
+ if (options.position) {
+ if (options.position < this.position) {
+ throw new Error('`options.position` must be equal or greater than `tokenizer.position`');
+ }
+ this.position = options.position;
+ }
+ if (Number.isInteger(options.length)) {
+ length = options.length;
+ }
+ else {
+ length -= options.offset || 0;
+ }
+ if (options.offset) {
+ offset = options.offset;
+ }
+ }
+ if (length === 0) {
+ return Promise.resolve(0);
+ }
+ const res = await fs.read(this.fd, buffer, offset, length, this.position);
+ this.position += res.bytesRead;
+ if (res.bytesRead < length && (!options || !options.mayBeLess)) {
+ throw new peek_readable_1.EndOfStreamError();
+ }
+ return res.bytesRead;
+ }
+ /**
+ * Peek buffer from file
+ * @param buffer
+ * @param options - Read behaviour options
+ * @returns Promise number of bytes read
+ */
+ async peekBuffer(buffer, options) {
+ let offset = 0;
+ let length = buffer.length;
+ let position = this.position;
+ if (options) {
+ if (options.position) {
+ if (options.position < this.position) {
+ throw new Error('`options.position` must be equal or greater than `tokenizer.position`');
+ }
+ position = options.position;
+ }
+ if (Number.isInteger(options.length)) {
+ length = options.length;
+ }
+ else {
+ length -= options.offset || 0;
+ }
+ if (options.offset) {
+ offset = options.offset;
+ }
+ }
+ if (length === 0) {
+ return Promise.resolve(0);
+ }
+ const res = await fs.read(this.fd, buffer, offset, length, position);
+ if ((!options || !options.mayBeLess) && res.bytesRead < length) {
+ throw new peek_readable_1.EndOfStreamError();
+ }
+ return res.bytesRead;
+ }
+ /**
+ * @param length - Number of bytes to ignore
+ * @return resolves the number of bytes ignored, equals length if this available, otherwise the number of bytes available
+ */
+ async ignore(length) {
+ const bytesLeft = this.fileInfo.size - this.position;
+ if (length <= bytesLeft) {
+ this.position += length;
+ return length;
+ }
+ else {
+ this.position += bytesLeft;
+ return bytesLeft;
+ }
+ }
+ async close() {
+ return fs.close(this.fd);
+ }
+}
+exports.FileTokenizer = FileTokenizer;
+async function fromFile(sourceFilePath) {
+ const stat = await fs.stat(sourceFilePath);
+ if (!stat.isFile) {
+ throw new Error(`File not a file: ${sourceFilePath}`);
+ }
+ const fd = await fs.open(sourceFilePath, 'r');
+ return new FileTokenizer(fd, { path: sourceFilePath, size: stat.size });
+}
+exports.fromFile = fromFile;
diff --git a/node_modules/strtok3/lib/FsPromise.d.ts b/node_modules/strtok3/lib/FsPromise.d.ts
new file mode 100644
index 0000000..1c9917a
--- /dev/null
+++ b/node_modules/strtok3/lib/FsPromise.d.ts
@@ -0,0 +1,18 @@
+/**
+ * Module convert fs functions to promise based functions
+ */
+/// <reference types="node" />
+import * as fs from 'fs';
+export interface IReadResult {
+ bytesRead: number;
+ buffer: Buffer;
+}
+export declare const pathExists: typeof fs.existsSync;
+export declare const createReadStream: typeof fs.createReadStream;
+export declare function stat(path: fs.PathLike): Promise<fs.Stats>;
+export declare function close(fd: number): Promise<void>;
+export declare function open(path: fs.PathLike, mode?: string): Promise<number>;
+export declare function read(fd: number, buffer: Buffer, offset: number, length: number, position: number): Promise<IReadResult>;
+export declare function writeFile(path: fs.PathLike, data: Buffer | string): Promise<void>;
+export declare function writeFileSync(path: fs.PathLike, data: Buffer | string): void;
+export declare function readFile(path: fs.PathLike): Promise<Buffer>;
diff --git a/node_modules/strtok3/lib/FsPromise.js b/node_modules/strtok3/lib/FsPromise.js
new file mode 100644
index 0000000..690a5e2
--- /dev/null
+++ b/node_modules/strtok3/lib/FsPromise.js
@@ -0,0 +1,79 @@
+"use strict";
+/**
+ * Module convert fs functions to promise based functions
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.readFile = exports.writeFileSync = exports.writeFile = exports.read = exports.open = exports.close = exports.stat = exports.createReadStream = exports.pathExists = void 0;
+const fs = require("fs");
+exports.pathExists = fs.existsSync;
+exports.createReadStream = fs.createReadStream;
+async function stat(path) {
+ return new Promise((resolve, reject) => {
+ fs.stat(path, (err, stats) => {
+ if (err)
+ reject(err);
+ else
+ resolve(stats);
+ });
+ });
+}
+exports.stat = stat;
+async function close(fd) {
+ return new Promise((resolve, reject) => {
+ fs.close(fd, err => {
+ if (err)
+ reject(err);
+ else
+ resolve();
+ });
+ });
+}
+exports.close = close;
+async function open(path, mode) {
+ return new Promise((resolve, reject) => {
+ fs.open(path, mode, (err, fd) => {
+ if (err)
+ reject(err);
+ else
+ resolve(fd);
+ });
+ });
+}
+exports.open = open;
+async function read(fd, buffer, offset, length, position) {
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, _buffer) => {
+ if (err)
+ reject(err);
+ else
+ resolve({ bytesRead, buffer: _buffer });
+ });
+ });
+}
+exports.read = read;
+async function writeFile(path, data) {
+ return new Promise((resolve, reject) => {
+ fs.writeFile(path, data, err => {
+ if (err)
+ reject(err);
+ else
+ resolve();
+ });
+ });
+}
+exports.writeFile = writeFile;
+function writeFileSync(path, data) {
+ fs.writeFileSync(path, data);
+}
+exports.writeFileSync = writeFileSync;
+async function readFile(path) {
+ return new Promise((resolve, reject) => {
+ fs.readFile(path, (err, buffer) => {
+ if (err)
+ reject(err);
+ else
+ resolve(buffer);
+ });
+ });
+}
+exports.readFile = readFile;
diff --git a/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts b/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts
new file mode 100644
index 0000000..fe0280f
--- /dev/null
+++ b/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts
@@ -0,0 +1,28 @@
+/// <reference types="node" />
+import { AbstractTokenizer } from './AbstractTokenizer';
+import * as Stream from 'stream';
+import { IFileInfo, IReadChunkOptions } from './types';
+export declare class ReadStreamTokenizer extends AbstractTokenizer {
+ private streamReader;
+ constructor(stream: Stream.Readable, fileInfo?: IFileInfo);
+ /**
+ * Get file information, an HTTP-client may implement this doing a HEAD request
+ * @return Promise with file information
+ */
+ getFileInfo(): Promise<IFileInfo>;
+ /**
+ * Read buffer from tokenizer
+ * @param buffer - Target buffer to fill with data read from the tokenizer-stream
+ * @param options - Read behaviour options
+ * @returns Promise with number of bytes read
+ */
+ readBuffer(buffer: Buffer | Uint8Array, options?: IReadChunkOptions): Promise<number>;
+ /**
+ * Peek (read ahead) buffer from tokenizer
+ * @param buffer - Target buffer to write the data read to
+ * @param options - Read behaviour options
+ * @returns Promise with number of bytes peeked
+ */
+ peekBuffer(buffer: Buffer | Uint8Array, options?: IReadChunkOptions): Promise<number>;
+ ignore(length: number): Promise<number>;
+}
diff --git a/node_modules/strtok3/lib/ReadStreamTokenizer.js b/node_modules/strtok3/lib/ReadStreamTokenizer.js
new file mode 100644
index 0000000..142d154
--- /dev/null
+++ b/node_modules/strtok3/lib/ReadStreamTokenizer.js
@@ -0,0 +1,128 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ReadStreamTokenizer = void 0;
+const AbstractTokenizer_1 = require("./AbstractTokenizer");
+const peek_readable_1 = require("peek-readable");
+// import * as _debug from 'debug';
+// const debug = _debug('strtok3:ReadStreamTokenizer');
+const maxBufferSize = 256000;
+class ReadStreamTokenizer extends AbstractTokenizer_1.AbstractTokenizer {
+ constructor(stream, fileInfo) {
+ super(fileInfo);
+ this.streamReader = new peek_readable_1.StreamReader(stream);
+ }
+ /**
+ * Get file information, an HTTP-client may implement this doing a HEAD request
+ * @return Promise with file information
+ */
+ async getFileInfo() {
+ return this.fileInfo;
+ }
+ /**
+ * Read buffer from tokenizer
+ * @param buffer - Target buffer to fill with data read from the tokenizer-stream
+ * @param options - Read behaviour options
+ * @returns Promise with number of bytes read
+ */
+ async readBuffer(buffer, options) {
+ // const _offset = position ? position : this.position;
+ // debug(`readBuffer ${_offset}...${_offset + length - 1}`);
+ let offset = 0;
+ let length = buffer.length;
+ if (options) {
+ if (Number.isInteger(options.length)) {
+ length = options.length;
+ }
+ else {
+ length -= options.offset || 0;
+ }
+ if (options.position) {
+ const skipBytes = options.position - this.position;
+ if (skipBytes > 0) {
+ await this.ignore(skipBytes);
+ return this.readBuffer(buffer, options);
+ }
+ else if (skipBytes < 0) {
+ throw new Error('`options.position` must be equal or greater than `tokenizer.position`');
+ }
+ }
+ if (options.offset) {
+ offset = options.offset;
+ }
+ }
+ if (length === 0) {
+ return 0;
+ }
+ const bytesRead = await this.streamReader.read(buffer, offset, length);
+ this.position += bytesRead;
+ if ((!options || !options.mayBeLess) && bytesRead < length) {
+ throw new peek_readable_1.EndOfStreamError();
+ }
+ return bytesRead;
+ }
+ /**
+ * Peek (read ahead) buffer from tokenizer
+ * @param buffer - Target buffer to write the data read to
+ * @param options - Read behaviour options
+ * @returns Promise with number of bytes peeked
+ */
+ async peekBuffer(buffer, options) {
+ // const _offset = position ? position : this.position;
+ // debug(`peek ${_offset}...${_offset + length - 1}`);
+ let offset = 0;
+ let bytesRead;
+ let length = buffer.length;
+ if (options) {
+ if (options.offset) {
+ offset = options.offset;
+ }
+ if (Number.isInteger(options.length)) {
+ length = options.length;
+ }
+ else {
+ length -= options.offset || 0;
+ }
+ if (options.position) {
+ const skipBytes = options.position - this.position;
+ if (skipBytes > 0) {
+ const skipBuffer = Buffer.alloc(length + skipBytes);
+ bytesRead = await this.peekBuffer(skipBuffer, { mayBeLess: options.mayBeLess });
+ skipBuffer.copy(buffer, offset, skipBytes);
+ return bytesRead - skipBytes;
+ }
+ else if (skipBytes < 0) {
+ throw new Error('Cannot peek from a negative offset in a stream');
+ }
+ }
+ }
+ try {
+ bytesRead = await this.streamReader.peek(buffer, offset, length);
+ }
+ catch (err) {
+ if (options && options.mayBeLess && err instanceof peek_readable_1.EndOfStreamError) {
+ return 0;
+ }
+ throw err;
+ }
+ if ((!options || !options.mayBeLess) && bytesRead < length) {
+ throw new peek_readable_1.EndOfStreamError();
+ }
+ return bytesRead;
+ }
+ async ignore(length) {
+ // debug(`ignore ${this.position}...${this.position + length - 1}`);
+ const bufSize = Math.min(maxBufferSize, length);
+ const buf = Buffer.alloc(bufSize);
+ let totBytesRead = 0;
+ while (totBytesRead < length) {
+ const remaining = length - totBytesRead;
+ const bytesRead = await this.readBuffer(buf, { length: Math.min(bufSize, remaining) });
+ if (bytesRead < 0) {
+ return bytesRead;
+ }
+ totBytesRead += bytesRead;
+ }
+ return totBytesRead;
+ }
+}
+exports.ReadStreamTokenizer = ReadStreamTokenizer;
diff --git a/node_modules/strtok3/lib/core.d.ts b/node_modules/strtok3/lib/core.d.ts
new file mode 100644
index 0000000..72db304
--- /dev/null
+++ b/node_modules/strtok3/lib/core.d.ts
@@ -0,0 +1,23 @@
+/// <reference types="node" />
+import { ReadStreamTokenizer } from './ReadStreamTokenizer';
+import * as Stream from 'stream';
+import { BufferTokenizer } from './BufferTokenizer';
+import { IFileInfo } from './types';
+export { EndOfStreamError } from 'peek-readable';
+export { ITokenizer, IFileInfo } from './types';
+export { IToken, IGetToken } from '@tokenizer/token';
+/**
+ * Construct ReadStreamTokenizer from given Stream.
+ * Will set fileSize, if provided given Stream has set the .path property/
+ * @param stream - Read from Node.js Stream.Readable
+ * @param fileInfo - Pass the file information, like size and MIME-type of the correspnding stream.
+ * @returns ReadStreamTokenizer
+ */
+export declare function fromStream(stream: Stream.Readable, fileInfo?: IFileInfo): ReadStreamTokenizer;
+/**
+ * Construct ReadStreamTokenizer from given Buffer.
+ * @param buffer - Buffer to tokenize
+ * @param fileInfo - Pass additional file information to the tokenizer
+ * @returns BufferTokenizer
+ */
+export declare function fromBuffer(buffer: Buffer, fileInfo?: IFileInfo): BufferTokenizer;
diff --git a/node_modules/strtok3/lib/core.js b/node_modules/strtok3/lib/core.js
new file mode 100644
index 0000000..e572b1c
--- /dev/null
+++ b/node_modules/strtok3/lib/core.js
@@ -0,0 +1,29 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.fromBuffer = exports.fromStream = exports.EndOfStreamError = void 0;
+const ReadStreamTokenizer_1 = require("./ReadStreamTokenizer");
+const BufferTokenizer_1 = require("./BufferTokenizer");
+var peek_readable_1 = require("peek-readable");
+Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return peek_readable_1.EndOfStreamError; } });
+/**
+ * Construct ReadStreamTokenizer from given Stream.
+ * Will set fileSize, if provided given Stream has set the .path property/
+ * @param stream - Read from Node.js Stream.Readable
+ * @param fileInfo - Pass the file information, like size and MIME-type of the correspnding stream.
+ * @returns ReadStreamTokenizer
+ */
+function fromStream(stream, fileInfo) {
+ fileInfo = fileInfo ? fileInfo : {};
+ return new ReadStreamTokenizer_1.ReadStreamTokenizer(stream, fileInfo);
+}
+exports.fromStream = fromStream;
+/**
+ * Construct ReadStreamTokenizer from given Buffer.
+ * @param buffer - Buffer to tokenize
+ * @param fileInfo - Pass additional file information to the tokenizer
+ * @returns BufferTokenizer
+ */
+function fromBuffer(buffer, fileInfo) {
+ return new BufferTokenizer_1.BufferTokenizer(buffer, fileInfo);
+}
+exports.fromBuffer = fromBuffer;
diff --git a/node_modules/strtok3/lib/index.d.ts b/node_modules/strtok3/lib/index.d.ts
new file mode 100644
index 0000000..95397c3
--- /dev/null
+++ b/node_modules/strtok3/lib/index.d.ts
@@ -0,0 +1,15 @@
+/// <reference types="node" />
+import * as Stream from 'stream';
+import { ReadStreamTokenizer } from './ReadStreamTokenizer';
+import * as core from './core';
+export { fromFile } from './FileTokenizer';
+export { ITokenizer, EndOfStreamError, fromBuffer, IFileInfo } from './core';
+export { IToken, IGetToken } from '@tokenizer/token';
+/**
+ * Construct ReadStreamTokenizer from given Stream.
+ * Will set fileSize, if provided given Stream has set the .path property.
+ * @param stream - Node.js Stream.Readable
+ * @param fileInfo - Pass additional file information to the tokenizer
+ * @returns Tokenizer
+ */
+export declare function fromStream(stream: Stream.Readable, fileInfo?: core.IFileInfo): Promise<ReadStreamTokenizer>;
diff --git a/node_modules/strtok3/lib/index.js b/node_modules/strtok3/lib/index.js
new file mode 100644
index 0000000..030e750
--- /dev/null
+++ b/node_modules/strtok3/lib/index.js
@@ -0,0 +1,27 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.fromStream = exports.fromBuffer = exports.EndOfStreamError = exports.fromFile = void 0;
+const fs = require("./FsPromise");
+const core = require("./core");
+var FileTokenizer_1 = require("./FileTokenizer");
+Object.defineProperty(exports, "fromFile", { enumerable: true, get: function () { return FileTokenizer_1.fromFile; } });
+var core_1 = require("./core");
+Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return core_1.EndOfStreamError; } });
+Object.defineProperty(exports, "fromBuffer", { enumerable: true, get: function () { return core_1.fromBuffer; } });
+/**
+ * Construct ReadStreamTokenizer from given Stream.
+ * Will set fileSize, if provided given Stream has set the .path property.
+ * @param stream - Node.js Stream.Readable
+ * @param fileInfo - Pass additional file information to the tokenizer
+ * @returns Tokenizer
+ */
+async function fromStream(stream, fileInfo) {
+ fileInfo = fileInfo ? fileInfo : {};
+ if (stream.path) {
+ const stat = await fs.stat(stream.path);
+ fileInfo.path = stream.path;
+ fileInfo.size = stat.size;
+ }
+ return core.fromStream(stream, fileInfo);
+}
+exports.fromStream = fromStream;
diff --git a/node_modules/strtok3/lib/types.d.ts b/node_modules/strtok3/lib/types.d.ts
new file mode 100644
index 0000000..93895df
--- /dev/null
+++ b/node_modules/strtok3/lib/types.d.ts
@@ -0,0 +1,103 @@
+/// <reference types="node" />
+import { IGetToken } from '@tokenizer/token';
+export interface IFileInfo {
+ /**
+ * File size in bytes
+ */
+ size?: number;
+ /**
+ * MIME-type of file
+ */
+ mimeType?: string;
+ /**
+ * File path
+ */
+ path?: string;
+ /**
+ * File URL
+ */
+ url?: string;
+}
+export interface IReadChunkOptions {
+ /**
+ * The offset in the buffer to start writing at; default is 0
+ */
+ offset?: number;
+ /**
+ * Number of bytes to read.
+ */
+ length?: number;
+ /**
+ * Position where to begin reading from the file.
+ * Default it is `tokenizer.position`.
+ * Position may not be less then `tokenizer.position`.
+ */
+ position?: number;
+ /**
+ * If set, will not throw an EOF error if not all of the requested data could be read
+ */
+ mayBeLess?: boolean;
+}
+/**
+ * The tokenizer allows us to read or peek from the tokenizer-stream.
+ * The tokenizer-stream is an abstraction of a stream, file or Buffer.
+ */
+export interface ITokenizer {
+ /**
+ * Provide access to information of the underlying information stream or file.
+ */
+ fileInfo: IFileInfo;
+ /**
+ * Offset in bytes (= number of bytes read) since beginning of file or stream
+ */
+ position: number;
+ /**
+ * Peek (read ahead) buffer from tokenizer
+ * @param buffer - Target buffer to fill with data peek from the tokenizer-stream
+ * @param options - Read behaviour options
+ * @returns Promise with number of bytes read
+ */
+ peekBuffer(buffer: Buffer, options?: IReadChunkOptions): Promise<number>;
+ /**
+ * Peek (read ahead) buffer from tokenizer
+ * @param buffer - Target buffer to fill with data peeked from the tokenizer-stream
+ * @param options - Additional read options
+ * @returns Promise with number of bytes read
+ */
+ readBuffer(buffer: Buffer, options?: IReadChunkOptions): Promise<number>;
+ /**
+ * Peek a token from the tokenizer-stream.
+ * @param token - Token to peek from the tokenizer-stream.
+ * @param position - Offset where to begin reading within the file. If position is null, data will be read from the current file position.
+ * @param maybeless - If set, will not throw an EOF error if the less then the requested length could be read.
+ */
+ peekToken<T>(token: IGetToken<T>, position?: number | null, maybeless?: boolean): Promise<T>;
+ /**
+ * Read a token from the tokenizer-stream.
+ * @param token - Token to peek from the tokenizer-stream.
+ * @param position - Offset where to begin reading within the file. If position is null, data will be read from the current file position.
+ */
+ readToken<T>(token: IGetToken<T>, position?: number): Promise<T>;
+ /**
+ * Peek a numeric token from the stream
+ * @param token - Numeric token
+ * @returns Promise with number
+ */
+ peekNumber(token: IGetToken<number>): Promise<number>;
+ /**
+ * Read a numeric token from the stream
+ * @param token - Numeric token
+ * @returns Promise with number
+ */
+ readNumber(token: IGetToken<number>): Promise<number>;
+ /**
+ * Ignore given number of bytes
+ * @param length - Number of bytes ignored
+ */
+ ignore(length: number): Promise<number>;
+ /**
+ * Clean up resources.
+ * It does not close the stream for StreamReader, but is does close the file-descriptor.
+ */
+ close(): Promise<void>;
+}
diff --git a/node_modules/strtok3/lib/types.js b/node_modules/strtok3/lib/types.js
new file mode 100644
index 0000000..c8ad2e5
--- /dev/null
+++ b/node_modules/strtok3/lib/types.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/strtok3/package.json b/node_modules/strtok3/package.json
new file mode 100644
index 0000000..e71b217
--- /dev/null
+++ b/node_modules/strtok3/package.json
@@ -0,0 +1,126 @@
+{
+ "_from": "strtok3@^6.0.3",
+ "_id": "strtok3@6.0.8",
+ "_inBundle": false,
+ "_integrity": "sha512-QLgv+oiXwXgCgp2PdPPa+Jpp4D9imK9e/0BsyfeFMr6QL6wMVqoVn9+OXQ9I7MZbmUzN6lmitTJ09uwS2OmGcw==",
+ "_location": "/strtok3",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "strtok3@^6.0.3",
+ "name": "strtok3",
+ "escapedName": "strtok3",
+ "rawSpec": "^6.0.3",
+ "saveSpec": null,
+ "fetchSpec": "^6.0.3"
+ },
+ "_requiredBy": [
+ "/file-type"
+ ],
+ "_resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.0.8.tgz",
+ "_shasum": "c839157f615c10ba0f4ae35067dad9959eeca346",
+ "_spec": "strtok3@^6.0.3",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/file-type",
+ "author": {
+ "name": "Borewit",
+ "url": "https://github.com/Borewit"
+ },
+ "bugs": {
+ "url": "https://github.com/Borewit/strtok3/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "@tokenizer/token": "^0.1.1",
+ "@types/debug": "^4.1.5",
+ "peek-readable": "^3.1.3"
+ },
+ "deprecated": false,
+ "description": "A promise based streaming tokenizer",
+ "devDependencies": {
+ "@types/chai": "^4.2.14",
+ "@types/mocha": "^8.2.0",
+ "@types/node": "^14.14.20",
+ "@typescript-eslint/eslint-plugin": "^2.34.0",
+ "@typescript-eslint/eslint-plugin-tslint": "^4.13.0",
+ "@typescript-eslint/parser": "^2.34.0",
+ "chai": "^4.2.0",
+ "coveralls": "^3.1.0",
+ "del-cli": "^3.0.1",
+ "eslint": "^6.8.0",
+ "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-prefer-arrow": "^1.2.2",
+ "mocha": "^7.2.0",
+ "nyc": "^15.1.0",
+ "remark-cli": "^9.0.0",
+ "remark-preset-lint-recommended": "^5.0.0",
+ "source-map-support": "^0.5.16",
+ "token-types": "^2.1.1",
+ "ts-node": "^9.1.1",
+ "tslint": "^6.1.3",
+ "typescript": "^4.1.3"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "lib/**/*.js",
+ "lib/**/*.d.ts"
+ ],
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Borewit"
+ },
+ "homepage": "https://github.com/Borewit/strtok3#readme",
+ "keywords": [
+ "tokenizer",
+ "reader",
+ "token",
+ "async",
+ "promise",
+ "parser",
+ "decoder",
+ "binary",
+ "endian",
+ "uint",
+ "stream",
+ "streaming"
+ ],
+ "license": "MIT",
+ "main": "lib/index.js",
+ "name": "strtok3",
+ "nyc": {
+ "check-coverage": false,
+ "extension": [
+ ".ts"
+ ],
+ "sourceMap": true,
+ "instrument": true,
+ "reporter": [
+ "lcov",
+ "text"
+ ],
+ "report-dir": "coverage"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Borewit/strtok3.git"
+ },
+ "scripts": {
+ "build": "npm run clean && npm run compile",
+ "clean": "del-cli lib/**/*.js lib/**/*.js.map lib/**/*.d.ts test/**/*.js test/**/*.js.map",
+ "compile": "npm run compile-src && npm run compile-test",
+ "compile-src": "tsc -p lib",
+ "compile-test": "tsc -p test",
+ "eslint": "eslint lib test --ext .ts --ignore-pattern *.d.ts",
+ "lint": "npm run lint-md && npm run eslint",
+ "lint-md": "remark -u preset-lint-recommended .",
+ "send-codacy": "nyc report --reporter=text-lcov | codacy-coverage",
+ "send-coveralls": "nyc report --reporter=text-lcov | coveralls",
+ "start": "npm run compile && npm run lint && npm run cover-test",
+ "test": "mocha --require ts-node/register --require source-map-support/register --full-trace test/test.ts",
+ "test-coverage": "nyc npm run test"
+ },
+ "types": "lib/index.d.ts",
+ "version": "6.0.8"
+}
diff --git a/node_modules/supports-color/browser.js b/node_modules/supports-color/browser.js
new file mode 100644
index 0000000..62afa3a
--- /dev/null
+++ b/node_modules/supports-color/browser.js
@@ -0,0 +1,5 @@
+'use strict';
+module.exports = {
+ stdout: false,
+ stderr: false
+};
diff --git a/node_modules/supports-color/index.js b/node_modules/supports-color/index.js
new file mode 100644
index 0000000..6fada39
--- /dev/null
+++ b/node_modules/supports-color/index.js
@@ -0,0 +1,135 @@
+'use strict';
+const os = require('os');
+const tty = require('tty');
+const hasFlag = require('has-flag');
+
+const {env} = process;
+
+let forceColor;
+if (hasFlag('no-color') ||
+ hasFlag('no-colors') ||
+ hasFlag('color=false') ||
+ hasFlag('color=never')) {
+ forceColor = 0;
+} else if (hasFlag('color') ||
+ hasFlag('colors') ||
+ hasFlag('color=true') ||
+ hasFlag('color=always')) {
+ forceColor = 1;
+}
+
+if ('FORCE_COLOR' in env) {
+ if (env.FORCE_COLOR === 'true') {
+ forceColor = 1;
+ } else if (env.FORCE_COLOR === 'false') {
+ forceColor = 0;
+ } else {
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
+ }
+}
+
+function translateLevel(level) {
+ if (level === 0) {
+ return false;
+ }
+
+ return {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3
+ };
+}
+
+function supportsColor(haveStream, streamIsTTY) {
+ if (forceColor === 0) {
+ return 0;
+ }
+
+ if (hasFlag('color=16m') ||
+ hasFlag('color=full') ||
+ hasFlag('color=truecolor')) {
+ return 3;
+ }
+
+ if (hasFlag('color=256')) {
+ return 2;
+ }
+
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
+ return 0;
+ }
+
+ const min = forceColor || 0;
+
+ if (env.TERM === 'dumb') {
+ return min;
+ }
+
+ if (process.platform === 'win32') {
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
+ const osRelease = os.release().split('.');
+ if (
+ Number(osRelease[0]) >= 10 &&
+ Number(osRelease[2]) >= 10586
+ ) {
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
+ }
+
+ return 1;
+ }
+
+ if ('CI' in env) {
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
+ return 1;
+ }
+
+ return min;
+ }
+
+ if ('TEAMCITY_VERSION' in env) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ }
+
+ if (env.COLORTERM === 'truecolor') {
+ return 3;
+ }
+
+ if ('TERM_PROGRAM' in env) {
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+
+ switch (env.TERM_PROGRAM) {
+ case 'iTerm.app':
+ return version >= 3 ? 3 : 2;
+ case 'Apple_Terminal':
+ return 2;
+ // No default
+ }
+ }
+
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
+ }
+
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
+ }
+
+ if ('COLORTERM' in env) {
+ return 1;
+ }
+
+ return min;
+}
+
+function getSupportLevel(stream) {
+ const level = supportsColor(stream, stream && stream.isTTY);
+ return translateLevel(level);
+}
+
+module.exports = {
+ supportsColor: getSupportLevel,
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
+};
diff --git a/node_modules/supports-color/license b/node_modules/supports-color/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/supports-color/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/supports-color/package.json b/node_modules/supports-color/package.json
new file mode 100644
index 0000000..538948f
--- /dev/null
+++ b/node_modules/supports-color/package.json
@@ -0,0 +1,88 @@
+{
+ "_args": [
+ [
+ "supports-color@7.2.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "supports-color@7.2.0",
+ "_id": "supports-color@7.2.0",
+ "_inBundle": false,
+ "_integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "_location": "/supports-color",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "supports-color@7.2.0",
+ "name": "supports-color",
+ "escapedName": "supports-color",
+ "rawSpec": "7.2.0",
+ "saveSpec": null,
+ "fetchSpec": "7.2.0"
+ },
+ "_requiredBy": [
+ "/chalk"
+ ],
+ "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "_spec": "7.2.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "browser": "browser.js",
+ "bugs": {
+ "url": "https://github.com/chalk/supports-color/issues"
+ },
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "description": "Detect whether a terminal supports color",
+ "devDependencies": {
+ "ava": "^1.4.1",
+ "import-fresh": "^3.0.0",
+ "xo": "^0.24.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "files": [
+ "index.js",
+ "browser.js"
+ ],
+ "homepage": "https://github.com/chalk/supports-color#readme",
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "ansi",
+ "styles",
+ "tty",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "support",
+ "supports",
+ "capability",
+ "detect",
+ "truecolor",
+ "16m"
+ ],
+ "license": "MIT",
+ "name": "supports-color",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/chalk/supports-color.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "7.2.0"
+}
diff --git a/node_modules/supports-color/readme.md b/node_modules/supports-color/readme.md
new file mode 100644
index 0000000..3654228
--- /dev/null
+++ b/node_modules/supports-color/readme.md
@@ -0,0 +1,76 @@
+# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
+
+> Detect whether a terminal supports color
+
+
+## Install
+
+```
+$ npm install supports-color
+```
+
+
+## Usage
+
+```js
+const supportsColor = require('supports-color');
+
+if (supportsColor.stdout) {
+ console.log('Terminal stdout supports color');
+}
+
+if (supportsColor.stdout.has256) {
+ console.log('Terminal stdout supports 256 colors');
+}
+
+if (supportsColor.stderr.has16m) {
+ console.log('Terminal stderr supports 16 million colors (truecolor)');
+}
+```
+
+
+## API
+
+Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported.
+
+The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag:
+
+- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
+- `.level = 2` and `.has256 = true`: 256 color support
+- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors)
+
+
+## Info
+
+It obeys the `--color` and `--no-color` CLI flags.
+
+For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+
+## Related
+
+- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+---
+
+<div align="center">
+ <b>
+ <a href="https://tidelift.com/subscription/pkg/npm-supports-color?utm_source=npm-supports-color&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
+ </b>
+ <br>
+ <sub>
+ Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
+ </sub>
+</div>
+
+---
diff --git a/node_modules/tar-fs/.travis.yml b/node_modules/tar-fs/.travis.yml
new file mode 100644
index 0000000..5911b74
--- /dev/null
+++ b/node_modules/tar-fs/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 6
+ - 8
+ - 10
diff --git a/node_modules/tar-fs/LICENSE b/node_modules/tar-fs/LICENSE
new file mode 100644
index 0000000..757562e
--- /dev/null
+++ b/node_modules/tar-fs/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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. \ No newline at end of file
diff --git a/node_modules/tar-fs/README.md b/node_modules/tar-fs/README.md
new file mode 100644
index 0000000..06ba046
--- /dev/null
+++ b/node_modules/tar-fs/README.md
@@ -0,0 +1,163 @@
+# tar-fs
+
+filesystem bindings for [tar-stream](https://github.com/mafintosh/tar-stream).
+
+```
+npm install tar-fs
+```
+
+[![build status](https://secure.travis-ci.org/mafintosh/tar-fs.png)](http://travis-ci.org/mafintosh/tar-fs)
+
+## Usage
+
+tar-fs allows you to pack directories into tarballs and extract tarballs into directories.
+
+It doesn't gunzip for you, so if you want to extract a `.tar.gz` with this you'll need to use something like [gunzip-maybe](https://github.com/mafintosh/gunzip-maybe) in addition to this.
+
+``` js
+var tar = require('tar-fs')
+var fs = require('fs')
+
+// packing a directory
+tar.pack('./my-directory').pipe(fs.createWriteStream('my-tarball.tar'))
+
+// extracting a directory
+fs.createReadStream('my-other-tarball.tar').pipe(tar.extract('./my-other-directory'))
+```
+
+To ignore various files when packing or extracting add a ignore function to the options. `ignore`
+is also an alias for `filter`. Additionally you get `header` if you use ignore while extracting.
+That way you could also filter by metadata.
+
+``` js
+var pack = tar.pack('./my-directory', {
+ ignore: function(name) {
+ return path.extname(name) === '.bin' // ignore .bin files when packing
+ }
+})
+
+var extract = tar.extract('./my-other-directory', {
+ ignore: function(name) {
+ return path.extname(name) === '.bin' // ignore .bin files inside the tarball when extracing
+ }
+})
+
+var extractFilesDirs = tar.extract('./my-other-other-directory', {
+ ignore: function(_, header) {
+ // pass files & directories, ignore e.g. symlinks
+ return header.type !== 'file' && header.type !== 'directory'
+ }
+})
+```
+
+You can also specify which entries to pack using the `entries` option
+
+```js
+var pack = tar.pack('./my-directory', {
+ entries: ['file1', 'subdir/file2'] // only the specific entries will be packed
+})
+```
+
+If you want to modify the headers when packing/extracting add a map function to the options
+
+``` js
+var pack = tar.pack('./my-directory', {
+ map: function(header) {
+ header.name = 'prefixed/'+header.name
+ return header
+ }
+})
+
+var extract = tar.extract('./my-directory', {
+ map: function(header) {
+ header.name = 'another-prefix/'+header.name
+ return header
+ }
+})
+```
+
+Similarly you can use `mapStream` incase you wanna modify the input/output file streams
+
+``` js
+var pack = tar.pack('./my-directory', {
+ mapStream: function(fileStream, header) {
+ if (path.extname(header.name) === '.js') {
+ return fileStream.pipe(someTransform)
+ }
+ return fileStream;
+ }
+})
+
+var extract = tar.extract('./my-directory', {
+ mapStream: function(fileStream, header) {
+ if (path.extname(header.name) === '.js') {
+ return fileStream.pipe(someTransform)
+ }
+ return fileStream;
+ }
+})
+```
+
+Set `options.fmode` and `options.dmode` to ensure that files/directories extracted have the corresponding modes
+
+``` js
+var extract = tar.extract('./my-directory', {
+ dmode: parseInt(555, 8), // all dirs should be readable
+ fmode: parseInt(444, 8) // all files should be readable
+})
+```
+
+It can be useful to use `dmode` and `fmode` if you are packing/unpacking tarballs between *nix/windows to ensure that all files/directories unpacked are readable.
+
+Alternatively you can set `options.readable` and/or `options.writable` to set the dmode and fmode to readable/writable.
+
+``` js
+var extract = tar.extract('./my-directory', {
+ readable: true, // all dirs and files should be readable
+ writable: true, // all dirs and files should be writable
+})
+```
+
+Set `options.strict` to `false` if you want to ignore errors due to unsupported entry types (like device files)
+
+To dereference symlinks (pack the contents of the symlink instead of the link itself) set `options.dereference` to `true`.
+
+## Copy a directory
+
+Copying a directory with permissions and mtime intact is as simple as
+
+``` js
+tar.pack('source-directory').pipe(tar.extract('dest-directory'))
+```
+
+## Interaction with [`tar-stream`](https://github.com/mafintosh/tar-stream)
+
+Use `finalize: false` and the `finish` hook to
+leave the pack stream open for further entries (see
+[`tar-stream#pack`](https://github.com/mafintosh/tar-stream#packing)),
+and use `pack` to pass an existing pack stream.
+
+``` js
+var mypack = tar.pack('./my-directory', {
+ finalize: false,
+ finish: function(sameAsMypack) {
+ mypack.entry({name: 'generated-file.txt'}, "hello")
+ tar.pack('./other-directory', {
+ pack: sameAsMypack
+ })
+ }
+})
+```
+
+
+## Performance
+
+Packing and extracting a 6.1 GB with 2496 directories and 2398 files yields the following results on my Macbook Air.
+[See the benchmark here](https://gist.github.com/mafintosh/8102201)
+
+* tar-fs: 34.261 seconds
+* [node-tar](https://github.com/isaacs/node-tar): 366.123 seconds (or 10x slower)
+
+## License
+
+MIT
diff --git a/node_modules/tar-fs/index.js b/node_modules/tar-fs/index.js
new file mode 100644
index 0000000..88a2a66
--- /dev/null
+++ b/node_modules/tar-fs/index.js
@@ -0,0 +1,348 @@
+var chownr = require('chownr')
+var tar = require('tar-stream')
+var pump = require('pump')
+var mkdirp = require('mkdirp-classic')
+var fs = require('fs')
+var path = require('path')
+var os = require('os')
+
+var win32 = os.platform() === 'win32'
+
+var noop = function () {}
+
+var echo = function (name) {
+ return name
+}
+
+var normalize = !win32 ? echo : function (name) {
+ return name.replace(/\\/g, '/').replace(/[:?<>|]/g, '_')
+}
+
+var statAll = function (fs, stat, cwd, ignore, entries, sort) {
+ var queue = entries || ['.']
+
+ return function loop (callback) {
+ if (!queue.length) return callback()
+ var next = queue.shift()
+ var nextAbs = path.join(cwd, next)
+
+ stat(nextAbs, function (err, stat) {
+ if (err) return callback(err)
+
+ if (!stat.isDirectory()) return callback(null, next, stat)
+
+ fs.readdir(nextAbs, function (err, files) {
+ if (err) return callback(err)
+
+ if (sort) files.sort()
+ for (var i = 0; i < files.length; i++) {
+ if (!ignore(path.join(cwd, next, files[i]))) queue.push(path.join(next, files[i]))
+ }
+
+ callback(null, next, stat)
+ })
+ })
+ }
+}
+
+var strip = function (map, level) {
+ return function (header) {
+ header.name = header.name.split('/').slice(level).join('/')
+
+ var linkname = header.linkname
+ if (linkname && (header.type === 'link' || path.isAbsolute(linkname))) {
+ header.linkname = linkname.split('/').slice(level).join('/')
+ }
+
+ return map(header)
+ }
+}
+
+exports.pack = function (cwd, opts) {
+ if (!cwd) cwd = '.'
+ if (!opts) opts = {}
+
+ var xfs = opts.fs || fs
+ var ignore = opts.ignore || opts.filter || noop
+ var map = opts.map || noop
+ var mapStream = opts.mapStream || echo
+ var statNext = statAll(xfs, opts.dereference ? xfs.stat : xfs.lstat, cwd, ignore, opts.entries, opts.sort)
+ var strict = opts.strict !== false
+ var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask()
+ var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0
+ var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0
+ var pack = opts.pack || tar.pack()
+ var finish = opts.finish || noop
+
+ if (opts.strip) map = strip(map, opts.strip)
+
+ if (opts.readable) {
+ dmode |= parseInt(555, 8)
+ fmode |= parseInt(444, 8)
+ }
+ if (opts.writable) {
+ dmode |= parseInt(333, 8)
+ fmode |= parseInt(222, 8)
+ }
+
+ var onsymlink = function (filename, header) {
+ xfs.readlink(path.join(cwd, filename), function (err, linkname) {
+ if (err) return pack.destroy(err)
+ header.linkname = normalize(linkname)
+ pack.entry(header, onnextentry)
+ })
+ }
+
+ var onstat = function (err, filename, stat) {
+ if (err) return pack.destroy(err)
+ if (!filename) {
+ if (opts.finalize !== false) pack.finalize()
+ return finish(pack)
+ }
+
+ if (stat.isSocket()) return onnextentry() // tar does not support sockets...
+
+ var header = {
+ name: normalize(filename),
+ mode: (stat.mode | (stat.isDirectory() ? dmode : fmode)) & umask,
+ mtime: stat.mtime,
+ size: stat.size,
+ type: 'file',
+ uid: stat.uid,
+ gid: stat.gid
+ }
+
+ if (stat.isDirectory()) {
+ header.size = 0
+ header.type = 'directory'
+ header = map(header) || header
+ return pack.entry(header, onnextentry)
+ }
+
+ if (stat.isSymbolicLink()) {
+ header.size = 0
+ header.type = 'symlink'
+ header = map(header) || header
+ return onsymlink(filename, header)
+ }
+
+ // TODO: add fifo etc...
+
+ header = map(header) || header
+
+ if (!stat.isFile()) {
+ if (strict) return pack.destroy(new Error('unsupported type for ' + filename))
+ return onnextentry()
+ }
+
+ var entry = pack.entry(header, onnextentry)
+ if (!entry) return
+
+ var rs = mapStream(xfs.createReadStream(path.join(cwd, filename), { start: 0, end: header.size > 0 ? header.size - 1 : header.size }), header)
+
+ rs.on('error', function (err) { // always forward errors on destroy
+ entry.destroy(err)
+ })
+
+ pump(rs, entry)
+ }
+
+ var onnextentry = function (err) {
+ if (err) return pack.destroy(err)
+ statNext(onstat)
+ }
+
+ onnextentry()
+
+ return pack
+}
+
+var head = function (list) {
+ return list.length ? list[list.length - 1] : null
+}
+
+var processGetuid = function () {
+ return process.getuid ? process.getuid() : -1
+}
+
+var processUmask = function () {
+ return process.umask ? process.umask() : 0
+}
+
+exports.extract = function (cwd, opts) {
+ if (!cwd) cwd = '.'
+ if (!opts) opts = {}
+
+ var xfs = opts.fs || fs
+ var ignore = opts.ignore || opts.filter || noop
+ var map = opts.map || noop
+ var mapStream = opts.mapStream || echo
+ var own = opts.chown !== false && !win32 && processGetuid() === 0
+ var extract = opts.extract || tar.extract()
+ var stack = []
+ var now = new Date()
+ var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask()
+ var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0
+ var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0
+ var strict = opts.strict !== false
+
+ if (opts.strip) map = strip(map, opts.strip)
+
+ if (opts.readable) {
+ dmode |= parseInt(555, 8)
+ fmode |= parseInt(444, 8)
+ }
+ if (opts.writable) {
+ dmode |= parseInt(333, 8)
+ fmode |= parseInt(222, 8)
+ }
+
+ var utimesParent = function (name, cb) { // we just set the mtime on the parent dir again everytime we write an entry
+ var top
+ while ((top = head(stack)) && name.slice(0, top[0].length) !== top[0]) stack.pop()
+ if (!top) return cb()
+ xfs.utimes(top[0], now, top[1], cb)
+ }
+
+ var utimes = function (name, header, cb) {
+ if (opts.utimes === false) return cb()
+
+ if (header.type === 'directory') return xfs.utimes(name, now, header.mtime, cb)
+ if (header.type === 'symlink') return utimesParent(name, cb) // TODO: how to set mtime on link?
+
+ xfs.utimes(name, now, header.mtime, function (err) {
+ if (err) return cb(err)
+ utimesParent(name, cb)
+ })
+ }
+
+ var chperm = function (name, header, cb) {
+ var link = header.type === 'symlink'
+
+ /* eslint-disable node/no-deprecated-api */
+ var chmod = link ? xfs.lchmod : xfs.chmod
+ var chown = link ? xfs.lchown : xfs.chown
+ /* eslint-enable node/no-deprecated-api */
+
+ if (!chmod) return cb()
+
+ var mode = (header.mode | (header.type === 'directory' ? dmode : fmode)) & umask
+ chmod(name, mode, function (err) {
+ if (err) return cb(err)
+ if (!own) return cb()
+ if (!chown) return cb()
+ chown(name, header.uid, header.gid, cb)
+ })
+ }
+
+ extract.on('entry', function (header, stream, next) {
+ header = map(header) || header
+ header.name = normalize(header.name)
+ var name = path.join(cwd, path.join('/', header.name))
+
+ if (ignore(name, header)) {
+ stream.resume()
+ return next()
+ }
+
+ var stat = function (err) {
+ if (err) return next(err)
+ utimes(name, header, function (err) {
+ if (err) return next(err)
+ if (win32) return next()
+ chperm(name, header, next)
+ })
+ }
+
+ var onsymlink = function () {
+ if (win32) return next() // skip symlinks on win for now before it can be tested
+ xfs.unlink(name, function () {
+ xfs.symlink(header.linkname, name, stat)
+ })
+ }
+
+ var onlink = function () {
+ if (win32) return next() // skip links on win for now before it can be tested
+ xfs.unlink(name, function () {
+ var srcpath = path.join(cwd, path.join('/', header.linkname))
+
+ xfs.link(srcpath, name, function (err) {
+ if (err && err.code === 'EPERM' && opts.hardlinkAsFilesFallback) {
+ stream = xfs.createReadStream(srcpath)
+ return onfile()
+ }
+
+ stat(err)
+ })
+ })
+ }
+
+ var onfile = function () {
+ var ws = xfs.createWriteStream(name)
+ var rs = mapStream(stream, header)
+
+ ws.on('error', function (err) { // always forward errors on destroy
+ rs.destroy(err)
+ })
+
+ pump(rs, ws, function (err) {
+ if (err) return next(err)
+ ws.on('close', stat)
+ })
+ }
+
+ if (header.type === 'directory') {
+ stack.push([name, header.mtime])
+ return mkdirfix(name, {
+ fs: xfs, own: own, uid: header.uid, gid: header.gid
+ }, stat)
+ }
+
+ var dir = path.dirname(name)
+
+ validate(xfs, dir, path.join(cwd, '.'), function (err, valid) {
+ if (err) return next(err)
+ if (!valid) return next(new Error(dir + ' is not a valid path'))
+
+ mkdirfix(dir, {
+ fs: xfs, own: own, uid: header.uid, gid: header.gid
+ }, function (err) {
+ if (err) return next(err)
+
+ switch (header.type) {
+ case 'file': return onfile()
+ case 'link': return onlink()
+ case 'symlink': return onsymlink()
+ }
+
+ if (strict) return next(new Error('unsupported type for ' + name + ' (' + header.type + ')'))
+
+ stream.resume()
+ next()
+ })
+ })
+ })
+
+ if (opts.finish) extract.on('finish', opts.finish)
+
+ return extract
+}
+
+function validate (fs, name, root, cb) {
+ if (name === root) return cb(null, true)
+ fs.lstat(name, function (err, st) {
+ if (err && err.code !== 'ENOENT') return cb(err)
+ if (err || st.isDirectory()) return validate(fs, path.join(name, '..'), root, cb)
+ cb(null, false)
+ })
+}
+
+function mkdirfix (name, opts, cb) {
+ mkdirp(name, { fs: opts.fs }, function (err, made) {
+ if (!err && made && opts.own) {
+ chownr(made, opts.uid, opts.gid, cb)
+ } else {
+ cb(err)
+ }
+ })
+}
diff --git a/node_modules/tar-fs/package.json b/node_modules/tar-fs/package.json
new file mode 100644
index 0000000..296698b
--- /dev/null
+++ b/node_modules/tar-fs/package.json
@@ -0,0 +1,71 @@
+{
+ "_args": [
+ [
+ "tar-fs@2.1.0",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "tar-fs@2.1.0",
+ "_id": "tar-fs@2.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==",
+ "_location": "/tar-fs",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "tar-fs@2.1.0",
+ "name": "tar-fs",
+ "escapedName": "tar-fs",
+ "rawSpec": "2.1.0",
+ "saveSpec": null,
+ "fetchSpec": "2.1.0"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz",
+ "_spec": "2.1.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Mathias Buus"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/tar-fs/issues"
+ },
+ "dependencies": {
+ "chownr": "^1.1.1",
+ "mkdirp-classic": "^0.5.2",
+ "pump": "^3.0.0",
+ "tar-stream": "^2.0.0"
+ },
+ "description": "filesystem bindings for tar-stream",
+ "devDependencies": {
+ "rimraf": "^2.6.3",
+ "standard": "^12.0.1",
+ "tape": "^4.9.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "homepage": "https://github.com/mafintosh/tar-fs",
+ "keywords": [
+ "tar",
+ "fs",
+ "file",
+ "tarball",
+ "directory",
+ "stream"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "tar-fs",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/tar-fs.git"
+ },
+ "scripts": {
+ "test": "standard && tape test/index.js"
+ },
+ "version": "2.1.0"
+}
diff --git a/node_modules/tar-fs/test/fixtures/a/hello.txt b/node_modules/tar-fs/test/fixtures/a/hello.txt
new file mode 100644
index 0000000..3b18e51
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/a/hello.txt
@@ -0,0 +1 @@
+hello world
diff --git a/node_modules/tar-fs/test/fixtures/b/a/test.txt b/node_modules/tar-fs/test/fixtures/b/a/test.txt
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/b/a/test.txt
@@ -0,0 +1 @@
+test
diff --git a/node_modules/tar-fs/test/fixtures/d/file1 b/node_modules/tar-fs/test/fixtures/d/file1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/d/file1
diff --git a/node_modules/tar-fs/test/fixtures/d/file2 b/node_modules/tar-fs/test/fixtures/d/file2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/d/file2
diff --git a/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 b/node_modules/tar-fs/test/fixtures/d/sub-dir/file5
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/d/sub-dir/file5
diff --git a/node_modules/tar-fs/test/fixtures/d/sub-files/file3 b/node_modules/tar-fs/test/fixtures/d/sub-files/file3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/d/sub-files/file3
diff --git a/node_modules/tar-fs/test/fixtures/d/sub-files/file4 b/node_modules/tar-fs/test/fixtures/d/sub-files/file4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/d/sub-files/file4
diff --git a/node_modules/tar-fs/test/fixtures/e/directory/.ignore b/node_modules/tar-fs/test/fixtures/e/directory/.ignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/e/directory/.ignore
diff --git a/node_modules/tar-fs/test/fixtures/e/file b/node_modules/tar-fs/test/fixtures/e/file
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/e/file
diff --git a/node_modules/tar-fs/test/fixtures/invalid.tar b/node_modules/tar-fs/test/fixtures/invalid.tar
new file mode 100644
index 0000000..a645e9c
--- /dev/null
+++ b/node_modules/tar-fs/test/fixtures/invalid.tar
Binary files differ
diff --git a/node_modules/tar-fs/test/index.js b/node_modules/tar-fs/test/index.js
new file mode 100644
index 0000000..3f5e07b
--- /dev/null
+++ b/node_modules/tar-fs/test/index.js
@@ -0,0 +1,346 @@
+var test = require('tape')
+var rimraf = require('rimraf')
+var tar = require('../index')
+var tarStream = require('tar-stream')
+var path = require('path')
+var fs = require('fs')
+var os = require('os')
+
+var win32 = os.platform() === 'win32'
+
+var mtime = function (st) {
+ return Math.floor(st.mtime.getTime() / 1000)
+}
+
+test('copy a -> copy/a', function (t) {
+ t.plan(5)
+
+ var a = path.join(__dirname, 'fixtures', 'a')
+ var b = path.join(__dirname, 'fixtures', 'copy', 'a')
+
+ rimraf.sync(b)
+ tar.pack(a)
+ .pipe(tar.extract(b))
+ .on('finish', function () {
+ var files = fs.readdirSync(b)
+ t.same(files.length, 1)
+ t.same(files[0], 'hello.txt')
+ var fileB = path.join(b, files[0])
+ var fileA = path.join(a, files[0])
+ t.same(fs.readFileSync(fileB, 'utf-8'), fs.readFileSync(fileA, 'utf-8'))
+ t.same(fs.statSync(fileB).mode, fs.statSync(fileA).mode)
+ t.same(mtime(fs.statSync(fileB)), mtime(fs.statSync(fileA)))
+ })
+})
+
+test('copy b -> copy/b', function (t) {
+ t.plan(8)
+
+ var a = path.join(__dirname, 'fixtures', 'b')
+ var b = path.join(__dirname, 'fixtures', 'copy', 'b')
+
+ rimraf.sync(b)
+ tar.pack(a)
+ .pipe(tar.extract(b))
+ .on('finish', function () {
+ var files = fs.readdirSync(b)
+ t.same(files.length, 1)
+ t.same(files[0], 'a')
+ var dirB = path.join(b, files[0])
+ var dirA = path.join(a, files[0])
+ t.same(fs.statSync(dirB).mode, fs.statSync(dirA).mode)
+ t.same(mtime(fs.statSync(dirB)), mtime(fs.statSync(dirA)))
+ t.ok(fs.statSync(dirB).isDirectory())
+ var fileB = path.join(dirB, 'test.txt')
+ var fileA = path.join(dirA, 'test.txt')
+ t.same(fs.readFileSync(fileB, 'utf-8'), fs.readFileSync(fileA, 'utf-8'))
+ t.same(fs.statSync(fileB).mode, fs.statSync(fileA).mode)
+ t.same(mtime(fs.statSync(fileB)), mtime(fs.statSync(fileA)))
+ })
+})
+
+test('symlink', function (t) {
+ if (win32) { // no symlink support on win32 currently. TODO: test if this can be enabled somehow
+ t.plan(1)
+ t.ok(true)
+ return
+ }
+
+ t.plan(5)
+
+ var a = path.join(__dirname, 'fixtures', 'c')
+
+ rimraf.sync(path.join(a, 'link'))
+ fs.symlinkSync('.gitignore', path.join(a, 'link'))
+
+ var b = path.join(__dirname, 'fixtures', 'copy', 'c')
+
+ rimraf.sync(b)
+ tar.pack(a)
+ .pipe(tar.extract(b))
+ .on('finish', function () {
+ var files = fs.readdirSync(b).sort()
+ t.same(files.length, 2)
+ t.same(files[0], '.gitignore')
+ t.same(files[1], 'link')
+
+ var linkA = path.join(a, 'link')
+ var linkB = path.join(b, 'link')
+
+ t.same(mtime(fs.lstatSync(linkB)), mtime(fs.lstatSync(linkA)))
+ t.same(fs.readlinkSync(linkB), fs.readlinkSync(linkA))
+ })
+})
+
+test('follow symlinks', function (t) {
+ if (win32) { // no symlink support on win32 currently. TODO: test if this can be enabled somehow
+ t.plan(1)
+ t.ok(true)
+ return
+ }
+
+ t.plan(5)
+
+ var a = path.join(__dirname, 'fixtures', 'c')
+
+ rimraf.sync(path.join(a, 'link'))
+ fs.symlinkSync('.gitignore', path.join(a, 'link'))
+
+ var b = path.join(__dirname, 'fixtures', 'copy', 'c-dereference')
+
+ rimraf.sync(b)
+ tar.pack(a, { dereference: true })
+ .pipe(tar.extract(b))
+ .on('finish', function () {
+ var files = fs.readdirSync(b).sort()
+ t.same(files.length, 2)
+ t.same(files[0], '.gitignore')
+ t.same(files[1], 'link')
+
+ var file1 = path.join(b, '.gitignore')
+ var file2 = path.join(b, 'link')
+
+ t.same(mtime(fs.lstatSync(file1)), mtime(fs.lstatSync(file2)))
+ t.same(fs.readFileSync(file1), fs.readFileSync(file2))
+ })
+})
+
+test('strip', function (t) {
+ t.plan(2)
+
+ var a = path.join(__dirname, 'fixtures', 'b')
+ var b = path.join(__dirname, 'fixtures', 'copy', 'b-strip')
+
+ rimraf.sync(b)
+
+ tar.pack(a)
+ .pipe(tar.extract(b, { strip: 1 }))
+ .on('finish', function () {
+ var files = fs.readdirSync(b).sort()
+ t.same(files.length, 1)
+ t.same(files[0], 'test.txt')
+ })
+})
+
+test('strip + map', function (t) {
+ t.plan(2)
+
+ var a = path.join(__dirname, 'fixtures', 'b')
+ var b = path.join(__dirname, 'fixtures', 'copy', 'b-strip')
+
+ rimraf.sync(b)
+
+ var uppercase = function (header) {
+ header.name = header.name.toUpperCase()
+ return header
+ }
+
+ tar.pack(a)
+ .pipe(tar.extract(b, { strip: 1, map: uppercase }))
+ .on('finish', function () {
+ var files = fs.readdirSync(b).sort()
+ t.same(files.length, 1)
+ t.same(files[0], 'TEST.TXT')
+ })
+})
+
+test('map + dir + permissions', function (t) {
+ t.plan(win32 ? 1 : 2) // skip chmod test, it's not working like unix
+
+ var a = path.join(__dirname, 'fixtures', 'b')
+ var b = path.join(__dirname, 'fixtures', 'copy', 'a-perms')
+
+ rimraf.sync(b)
+
+ var aWithMode = function (header) {
+ if (header.name === 'a') {
+ header.mode = parseInt(700, 8)
+ }
+ return header
+ }
+
+ tar.pack(a)
+ .pipe(tar.extract(b, { map: aWithMode }))
+ .on('finish', function () {
+ var files = fs.readdirSync(b).sort()
+ var stat = fs.statSync(path.join(b, 'a'))
+ t.same(files.length, 1)
+ if (!win32) {
+ t.same(stat.mode & parseInt(777, 8), parseInt(700, 8))
+ }
+ })
+})
+
+test('specific entries', function (t) {
+ t.plan(6)
+
+ var a = path.join(__dirname, 'fixtures', 'd')
+ var b = path.join(__dirname, 'fixtures', 'copy', 'd-entries')
+
+ var entries = [ 'file1', 'sub-files/file3', 'sub-dir' ]
+
+ rimraf.sync(b)
+ tar.pack(a, { entries: entries })
+ .pipe(tar.extract(b))
+ .on('finish', function () {
+ var files = fs.readdirSync(b)
+ t.same(files.length, 3)
+ t.notSame(files.indexOf('file1'), -1)
+ t.notSame(files.indexOf('sub-files'), -1)
+ t.notSame(files.indexOf('sub-dir'), -1)
+ var subFiles = fs.readdirSync(path.join(b, 'sub-files'))
+ t.same(subFiles, ['file3'])
+ var subDir = fs.readdirSync(path.join(b, 'sub-dir'))
+ t.same(subDir, ['file5'])
+ })
+})
+
+test('check type while mapping header on packing', function (t) {
+ t.plan(3)
+
+ var e = path.join(__dirname, 'fixtures', 'e')
+
+ var checkHeaderType = function (header) {
+ if (header.name.indexOf('.') === -1) t.same(header.type, header.name)
+ }
+
+ tar.pack(e, { map: checkHeaderType })
+})
+
+test('finish callbacks', function (t) {
+ t.plan(3)
+
+ var a = path.join(__dirname, 'fixtures', 'a')
+ var b = path.join(__dirname, 'fixtures', 'copy', 'a')
+
+ rimraf.sync(b)
+
+ var packEntries = 0
+ var extractEntries = 0
+
+ var countPackEntry = function (header) { packEntries++ }
+ var countExtractEntry = function (header) { extractEntries++ }
+
+ var pack
+ var onPackFinish = function (passedPack) {
+ t.equal(packEntries, 2, 'All entries have been packed') // 2 entries - the file and base directory
+ t.equal(passedPack, pack, 'The finish hook passes the pack')
+ }
+
+ var onExtractFinish = function () { t.equal(extractEntries, 2) }
+
+ pack = tar.pack(a, { map: countPackEntry, finish: onPackFinish })
+
+ pack.pipe(tar.extract(b, { map: countExtractEntry, finish: onExtractFinish }))
+ .on('finish', function () {
+ t.end()
+ })
+})
+
+test('not finalizing the pack', function (t) {
+ t.plan(2)
+
+ var a = path.join(__dirname, 'fixtures', 'a')
+ var b = path.join(__dirname, 'fixtures', 'b')
+
+ var out = path.join(__dirname, 'fixtures', 'copy', 'merged-packs')
+
+ rimraf.sync(out)
+
+ var prefixer = function (prefix) {
+ return function (header) {
+ header.name = path.join(prefix, header.name)
+ return header
+ }
+ }
+
+ tar.pack(a, {
+ map: prefixer('a-files'),
+ finalize: false,
+ finish: packB
+ })
+
+ function packB (pack) {
+ tar.pack(b, { pack: pack, map: prefixer('b-files') })
+ .pipe(tar.extract(out))
+ .on('finish', assertResults)
+ }
+
+ function assertResults () {
+ var containers = fs.readdirSync(out)
+ t.deepEqual(containers, ['a-files', 'b-files'])
+ var aFiles = fs.readdirSync(path.join(out, 'a-files'))
+ t.deepEqual(aFiles, ['hello.txt'])
+ }
+})
+
+test('do not extract invalid tar', function (t) {
+ var a = path.join(__dirname, 'fixtures', 'invalid.tar')
+
+ var out = path.join(__dirname, 'fixtures', 'invalid')
+
+ rimraf.sync(out)
+
+ fs.createReadStream(a)
+ .pipe(tar.extract(out))
+ .on('error', function (err) {
+ t.ok(/is not a valid path/i.test(err.message))
+ fs.stat(path.join(out, '../bar'), function (err) {
+ t.ok(err)
+ t.end()
+ })
+ })
+})
+
+test('no abs hardlink targets', function (t) {
+ var out = path.join(__dirname, 'fixtures', 'invalid')
+ var outside = path.join(__dirname, 'fixtures', 'outside')
+
+ rimraf.sync(out)
+
+ var s = tarStream.pack()
+
+ fs.writeFileSync(outside, 'something')
+
+ s.entry({
+ type: 'link',
+ name: 'link',
+ linkname: outside
+ })
+
+ s.entry({
+ name: 'link'
+ }, 'overwrite')
+
+ s.finalize()
+
+ s.pipe(tar.extract(out))
+ .on('error', function (err) {
+ t.ok(err, 'had error')
+ fs.readFile(outside, 'utf-8', function (err, str) {
+ t.error(err, 'no error')
+ t.same(str, 'something')
+ t.end()
+ })
+ })
+})
diff --git a/node_modules/tar-stream/LICENSE b/node_modules/tar-stream/LICENSE
new file mode 100644
index 0000000..757562e
--- /dev/null
+++ b/node_modules/tar-stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Mathias Buus
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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. \ No newline at end of file
diff --git a/node_modules/tar-stream/README.md b/node_modules/tar-stream/README.md
new file mode 100644
index 0000000..2679d9d
--- /dev/null
+++ b/node_modules/tar-stream/README.md
@@ -0,0 +1,168 @@
+# tar-stream
+
+tar-stream is a streaming tar parser and generator and nothing else. It is streams2 and operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.
+
+Note that you still need to gunzip your data if you have a `.tar.gz`. We recommend using [gunzip-maybe](https://github.com/mafintosh/gunzip-maybe) in conjunction with this.
+
+```
+npm install tar-stream
+```
+
+[![build status](https://secure.travis-ci.org/mafintosh/tar-stream.png)](http://travis-ci.org/mafintosh/tar-stream)
+[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
+
+## Usage
+
+tar-stream exposes two streams, [pack](https://github.com/mafintosh/tar-stream#packing) which creates tarballs and [extract](https://github.com/mafintosh/tar-stream#extracting) which extracts tarballs. To [modify an existing tarball](https://github.com/mafintosh/tar-stream#modifying-existing-tarballs) use both.
+
+
+It implementes USTAR with additional support for pax extended headers. It should be compatible with all popular tar distributions out there (gnutar, bsdtar etc)
+
+## Related
+
+If you want to pack/unpack directories on the file system check out [tar-fs](https://github.com/mafintosh/tar-fs) which provides file system bindings to this module.
+
+## Packing
+
+To create a pack stream use `tar.pack()` and call `pack.entry(header, [callback])` to add tar entries.
+
+``` js
+var tar = require('tar-stream')
+var pack = tar.pack() // pack is a streams2 stream
+
+// add a file called my-test.txt with the content "Hello World!"
+pack.entry({ name: 'my-test.txt' }, 'Hello World!')
+
+// add a file called my-stream-test.txt from a stream
+var entry = pack.entry({ name: 'my-stream-test.txt', size: 11 }, function(err) {
+ // the stream was added
+ // no more entries
+ pack.finalize()
+})
+
+entry.write('hello')
+entry.write(' ')
+entry.write('world')
+entry.end()
+
+// pipe the pack stream somewhere
+pack.pipe(process.stdout)
+```
+
+## Extracting
+
+To extract a stream use `tar.extract()` and listen for `extract.on('entry', (header, stream, next) )`
+
+``` js
+var extract = tar.extract()
+
+extract.on('entry', function(header, stream, next) {
+ // header is the tar header
+ // stream is the content body (might be an empty stream)
+ // call next when you are done with this entry
+
+ stream.on('end', function() {
+ next() // ready for next entry
+ })
+
+ stream.resume() // just auto drain the stream
+})
+
+extract.on('finish', function() {
+ // all entries read
+})
+
+pack.pipe(extract)
+```
+
+The tar archive is streamed sequentially, meaning you **must** drain each entry's stream as you get them or else the main extract stream will receive backpressure and stop reading.
+
+## Headers
+
+The header object using in `entry` should contain the following properties.
+Most of these values can be found by stat'ing a file.
+
+``` js
+{
+ name: 'path/to/this/entry.txt',
+ size: 1314, // entry size. defaults to 0
+ mode: 0o644, // entry mode. defaults to to 0o755 for dirs and 0o644 otherwise
+ mtime: new Date(), // last modified date for entry. defaults to now.
+ type: 'file', // type of entry. defaults to file. can be:
+ // file | link | symlink | directory | block-device
+ // character-device | fifo | contiguous-file
+ linkname: 'path', // linked file name
+ uid: 0, // uid of entry owner. defaults to 0
+ gid: 0, // gid of entry owner. defaults to 0
+ uname: 'maf', // uname of entry owner. defaults to null
+ gname: 'staff', // gname of entry owner. defaults to null
+ devmajor: 0, // device major version. defaults to 0
+ devminor: 0 // device minor version. defaults to 0
+}
+```
+
+## Modifying existing tarballs
+
+Using tar-stream it is easy to rewrite paths / change modes etc in an existing tarball.
+
+``` js
+var extract = tar.extract()
+var pack = tar.pack()
+var path = require('path')
+
+extract.on('entry', function(header, stream, callback) {
+ // let's prefix all names with 'tmp'
+ header.name = path.join('tmp', header.name)
+ // write the new entry to the pack stream
+ stream.pipe(pack.entry(header, callback))
+})
+
+extract.on('finish', function() {
+ // all entries done - lets finalize it
+ pack.finalize()
+})
+
+// pipe the old tarball to the extractor
+oldTarballStream.pipe(extract)
+
+// pipe the new tarball the another stream
+pack.pipe(newTarballStream)
+```
+
+## Saving tarball to fs
+
+
+``` js
+var fs = require('fs')
+var tar = require('tar-stream')
+
+var pack = tar.pack() // pack is a streams2 stream
+var path = 'YourTarBall.tar'
+var yourTarball = fs.createWriteStream(path)
+
+// add a file called YourFile.txt with the content "Hello World!"
+pack.entry({name: 'YourFile.txt'}, 'Hello World!', function (err) {
+ if (err) throw err
+ pack.finalize()
+})
+
+// pipe the pack stream to your file
+pack.pipe(yourTarball)
+
+yourTarball.on('close', function () {
+ console.log(path + ' has been written')
+ fs.stat(path, function(err, stats) {
+ if (err) throw err
+ console.log(stats)
+ console.log('Got file info successfully!')
+ })
+})
+```
+
+## Performance
+
+[See tar-fs for a performance comparison with node-tar](https://github.com/mafintosh/tar-fs/blob/master/README.md#performance)
+
+# License
+
+MIT
diff --git a/node_modules/tar-stream/extract.js b/node_modules/tar-stream/extract.js
new file mode 100644
index 0000000..6278c38
--- /dev/null
+++ b/node_modules/tar-stream/extract.js
@@ -0,0 +1,257 @@
+var util = require('util')
+var bl = require('bl')
+var headers = require('./headers')
+
+var Writable = require('readable-stream').Writable
+var PassThrough = require('readable-stream').PassThrough
+
+var noop = function () {}
+
+var overflow = function (size) {
+ size &= 511
+ return size && 512 - size
+}
+
+var emptyStream = function (self, offset) {
+ var s = new Source(self, offset)
+ s.end()
+ return s
+}
+
+var mixinPax = function (header, pax) {
+ if (pax.path) header.name = pax.path
+ if (pax.linkpath) header.linkname = pax.linkpath
+ if (pax.size) header.size = parseInt(pax.size, 10)
+ header.pax = pax
+ return header
+}
+
+var Source = function (self, offset) {
+ this._parent = self
+ this.offset = offset
+ PassThrough.call(this, { autoDestroy: false })
+}
+
+util.inherits(Source, PassThrough)
+
+Source.prototype.destroy = function (err) {
+ this._parent.destroy(err)
+}
+
+var Extract = function (opts) {
+ if (!(this instanceof Extract)) return new Extract(opts)
+ Writable.call(this, opts)
+
+ opts = opts || {}
+
+ this._offset = 0
+ this._buffer = bl()
+ this._missing = 0
+ this._partial = false
+ this._onparse = noop
+ this._header = null
+ this._stream = null
+ this._overflow = null
+ this._cb = null
+ this._locked = false
+ this._destroyed = false
+ this._pax = null
+ this._paxGlobal = null
+ this._gnuLongPath = null
+ this._gnuLongLinkPath = null
+
+ var self = this
+ var b = self._buffer
+
+ var oncontinue = function () {
+ self._continue()
+ }
+
+ var onunlock = function (err) {
+ self._locked = false
+ if (err) return self.destroy(err)
+ if (!self._stream) oncontinue()
+ }
+
+ var onstreamend = function () {
+ self._stream = null
+ var drain = overflow(self._header.size)
+ if (drain) self._parse(drain, ondrain)
+ else self._parse(512, onheader)
+ if (!self._locked) oncontinue()
+ }
+
+ var ondrain = function () {
+ self._buffer.consume(overflow(self._header.size))
+ self._parse(512, onheader)
+ oncontinue()
+ }
+
+ var onpaxglobalheader = function () {
+ var size = self._header.size
+ self._paxGlobal = headers.decodePax(b.slice(0, size))
+ b.consume(size)
+ onstreamend()
+ }
+
+ var onpaxheader = function () {
+ var size = self._header.size
+ self._pax = headers.decodePax(b.slice(0, size))
+ if (self._paxGlobal) self._pax = Object.assign({}, self._paxGlobal, self._pax)
+ b.consume(size)
+ onstreamend()
+ }
+
+ var ongnulongpath = function () {
+ var size = self._header.size
+ this._gnuLongPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding)
+ b.consume(size)
+ onstreamend()
+ }
+
+ var ongnulonglinkpath = function () {
+ var size = self._header.size
+ this._gnuLongLinkPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding)
+ b.consume(size)
+ onstreamend()
+ }
+
+ var onheader = function () {
+ var offset = self._offset
+ var header
+ try {
+ header = self._header = headers.decode(b.slice(0, 512), opts.filenameEncoding)
+ } catch (err) {
+ self.emit('error', err)
+ }
+ b.consume(512)
+
+ if (!header) {
+ self._parse(512, onheader)
+ oncontinue()
+ return
+ }
+ if (header.type === 'gnu-long-path') {
+ self._parse(header.size, ongnulongpath)
+ oncontinue()
+ return
+ }
+ if (header.type === 'gnu-long-link-path') {
+ self._parse(header.size, ongnulonglinkpath)
+ oncontinue()
+ return
+ }
+ if (header.type === 'pax-global-header') {
+ self._parse(header.size, onpaxglobalheader)
+ oncontinue()
+ return
+ }
+ if (header.type === 'pax-header') {
+ self._parse(header.size, onpaxheader)
+ oncontinue()
+ return
+ }
+
+ if (self._gnuLongPath) {
+ header.name = self._gnuLongPath
+ self._gnuLongPath = null
+ }
+
+ if (self._gnuLongLinkPath) {
+ header.linkname = self._gnuLongLinkPath
+ self._gnuLongLinkPath = null
+ }
+
+ if (self._pax) {
+ self._header = header = mixinPax(header, self._pax)
+ self._pax = null
+ }
+
+ self._locked = true
+
+ if (!header.size || header.type === 'directory') {
+ self._parse(512, onheader)
+ self.emit('entry', header, emptyStream(self, offset), onunlock)
+ return
+ }
+
+ self._stream = new Source(self, offset)
+
+ self.emit('entry', header, self._stream, onunlock)
+ self._parse(header.size, onstreamend)
+ oncontinue()
+ }
+
+ this._onheader = onheader
+ this._parse(512, onheader)
+}
+
+util.inherits(Extract, Writable)
+
+Extract.prototype.destroy = function (err) {
+ if (this._destroyed) return
+ this._destroyed = true
+
+ if (err) this.emit('error', err)
+ this.emit('close')
+ if (this._stream) this._stream.emit('close')
+}
+
+Extract.prototype._parse = function (size, onparse) {
+ if (this._destroyed) return
+ this._offset += size
+ this._missing = size
+ if (onparse === this._onheader) this._partial = false
+ this._onparse = onparse
+}
+
+Extract.prototype._continue = function () {
+ if (this._destroyed) return
+ var cb = this._cb
+ this._cb = noop
+ if (this._overflow) this._write(this._overflow, undefined, cb)
+ else cb()
+}
+
+Extract.prototype._write = function (data, enc, cb) {
+ if (this._destroyed) return
+
+ var s = this._stream
+ var b = this._buffer
+ var missing = this._missing
+ if (data.length) this._partial = true
+
+ // we do not reach end-of-chunk now. just forward it
+
+ if (data.length < missing) {
+ this._missing -= data.length
+ this._overflow = null
+ if (s) return s.write(data, cb)
+ b.append(data)
+ return cb()
+ }
+
+ // end-of-chunk. the parser should call cb.
+
+ this._cb = cb
+ this._missing = 0
+
+ var overflow = null
+ if (data.length > missing) {
+ overflow = data.slice(missing)
+ data = data.slice(0, missing)
+ }
+
+ if (s) s.end(data)
+ else b.append(data)
+
+ this._overflow = overflow
+ this._onparse()
+}
+
+Extract.prototype._final = function (cb) {
+ if (this._partial) return this.destroy(new Error('Unexpected end of data'))
+ cb()
+}
+
+module.exports = Extract
diff --git a/node_modules/tar-stream/headers.js b/node_modules/tar-stream/headers.js
new file mode 100644
index 0000000..2787cfd
--- /dev/null
+++ b/node_modules/tar-stream/headers.js
@@ -0,0 +1,293 @@
+var alloc = Buffer.alloc
+
+var ZEROS = '0000000000000000000'
+var SEVENS = '7777777777777777777'
+var ZERO_OFFSET = '0'.charCodeAt(0)
+var USTAR_MAGIC = Buffer.from('ustar\x00', 'binary')
+var USTAR_VER = Buffer.from('00', 'binary')
+var GNU_MAGIC = Buffer.from('ustar\x20', 'binary')
+var GNU_VER = Buffer.from('\x20\x00', 'binary')
+var MASK = parseInt('7777', 8)
+var MAGIC_OFFSET = 257
+var VERSION_OFFSET = 263
+
+var clamp = function (index, len, defaultValue) {
+ if (typeof index !== 'number') return defaultValue
+ index = ~~index // Coerce to integer.
+ if (index >= len) return len
+ if (index >= 0) return index
+ index += len
+ if (index >= 0) return index
+ return 0
+}
+
+var toType = function (flag) {
+ switch (flag) {
+ case 0:
+ return 'file'
+ case 1:
+ return 'link'
+ case 2:
+ return 'symlink'
+ case 3:
+ return 'character-device'
+ case 4:
+ return 'block-device'
+ case 5:
+ return 'directory'
+ case 6:
+ return 'fifo'
+ case 7:
+ return 'contiguous-file'
+ case 72:
+ return 'pax-header'
+ case 55:
+ return 'pax-global-header'
+ case 27:
+ return 'gnu-long-link-path'
+ case 28:
+ case 30:
+ return 'gnu-long-path'
+ }
+
+ return null
+}
+
+var toTypeflag = function (flag) {
+ switch (flag) {
+ case 'file':
+ return 0
+ case 'link':
+ return 1
+ case 'symlink':
+ return 2
+ case 'character-device':
+ return 3
+ case 'block-device':
+ return 4
+ case 'directory':
+ return 5
+ case 'fifo':
+ return 6
+ case 'contiguous-file':
+ return 7
+ case 'pax-header':
+ return 72
+ }
+
+ return 0
+}
+
+var indexOf = function (block, num, offset, end) {
+ for (; offset < end; offset++) {
+ if (block[offset] === num) return offset
+ }
+ return end
+}
+
+var cksum = function (block) {
+ var sum = 8 * 32
+ for (var i = 0; i < 148; i++) sum += block[i]
+ for (var j = 156; j < 512; j++) sum += block[j]
+ return sum
+}
+
+var encodeOct = function (val, n) {
+ val = val.toString(8)
+ if (val.length > n) return SEVENS.slice(0, n) + ' '
+ else return ZEROS.slice(0, n - val.length) + val + ' '
+}
+
+/* Copied from the node-tar repo and modified to meet
+ * tar-stream coding standard.
+ *
+ * Source: https://github.com/npm/node-tar/blob/51b6627a1f357d2eb433e7378e5f05e83b7aa6cd/lib/header.js#L349
+ */
+function parse256 (buf) {
+ // first byte MUST be either 80 or FF
+ // 80 for positive, FF for 2's comp
+ var positive
+ if (buf[0] === 0x80) positive = true
+ else if (buf[0] === 0xFF) positive = false
+ else return null
+
+ // build up a base-256 tuple from the least sig to the highest
+ var tuple = []
+ for (var i = buf.length - 1; i > 0; i--) {
+ var byte = buf[i]
+ if (positive) tuple.push(byte)
+ else tuple.push(0xFF - byte)
+ }
+
+ var sum = 0
+ var l = tuple.length
+ for (i = 0; i < l; i++) {
+ sum += tuple[i] * Math.pow(256, i)
+ }
+
+ return positive ? sum : -1 * sum
+}
+
+var decodeOct = function (val, offset, length) {
+ val = val.slice(offset, offset + length)
+ offset = 0
+
+ // If prefixed with 0x80 then parse as a base-256 integer
+ if (val[offset] & 0x80) {
+ return parse256(val)
+ } else {
+ // Older versions of tar can prefix with spaces
+ while (offset < val.length && val[offset] === 32) offset++
+ var end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length)
+ while (offset < end && val[offset] === 0) offset++
+ if (end === offset) return 0
+ return parseInt(val.slice(offset, end).toString(), 8)
+ }
+}
+
+var decodeStr = function (val, offset, length, encoding) {
+ return val.slice(offset, indexOf(val, 0, offset, offset + length)).toString(encoding)
+}
+
+var addLength = function (str) {
+ var len = Buffer.byteLength(str)
+ var digits = Math.floor(Math.log(len) / Math.log(10)) + 1
+ if (len + digits >= Math.pow(10, digits)) digits++
+
+ return (len + digits) + str
+}
+
+exports.decodeLongPath = function (buf, encoding) {
+ return decodeStr(buf, 0, buf.length, encoding)
+}
+
+exports.encodePax = function (opts) { // TODO: encode more stuff in pax
+ var result = ''
+ if (opts.name) result += addLength(' path=' + opts.name + '\n')
+ if (opts.linkname) result += addLength(' linkpath=' + opts.linkname + '\n')
+ var pax = opts.pax
+ if (pax) {
+ for (var key in pax) {
+ result += addLength(' ' + key + '=' + pax[key] + '\n')
+ }
+ }
+ return Buffer.from(result)
+}
+
+exports.decodePax = function (buf) {
+ var result = {}
+
+ while (buf.length) {
+ var i = 0
+ while (i < buf.length && buf[i] !== 32) i++
+ var len = parseInt(buf.slice(0, i).toString(), 10)
+ if (!len) return result
+
+ var b = buf.slice(i + 1, len - 1).toString()
+ var keyIndex = b.indexOf('=')
+ if (keyIndex === -1) return result
+ result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1)
+
+ buf = buf.slice(len)
+ }
+
+ return result
+}
+
+exports.encode = function (opts) {
+ var buf = alloc(512)
+ var name = opts.name
+ var prefix = ''
+
+ if (opts.typeflag === 5 && name[name.length - 1] !== '/') name += '/'
+ if (Buffer.byteLength(name) !== name.length) return null // utf-8
+
+ while (Buffer.byteLength(name) > 100) {
+ var i = name.indexOf('/')
+ if (i === -1) return null
+ prefix += prefix ? '/' + name.slice(0, i) : name.slice(0, i)
+ name = name.slice(i + 1)
+ }
+
+ if (Buffer.byteLength(name) > 100 || Buffer.byteLength(prefix) > 155) return null
+ if (opts.linkname && Buffer.byteLength(opts.linkname) > 100) return null
+
+ buf.write(name)
+ buf.write(encodeOct(opts.mode & MASK, 6), 100)
+ buf.write(encodeOct(opts.uid, 6), 108)
+ buf.write(encodeOct(opts.gid, 6), 116)
+ buf.write(encodeOct(opts.size, 11), 124)
+ buf.write(encodeOct((opts.mtime.getTime() / 1000) | 0, 11), 136)
+
+ buf[156] = ZERO_OFFSET + toTypeflag(opts.type)
+
+ if (opts.linkname) buf.write(opts.linkname, 157)
+
+ USTAR_MAGIC.copy(buf, MAGIC_OFFSET)
+ USTAR_VER.copy(buf, VERSION_OFFSET)
+ if (opts.uname) buf.write(opts.uname, 265)
+ if (opts.gname) buf.write(opts.gname, 297)
+ buf.write(encodeOct(opts.devmajor || 0, 6), 329)
+ buf.write(encodeOct(opts.devminor || 0, 6), 337)
+
+ if (prefix) buf.write(prefix, 345)
+
+ buf.write(encodeOct(cksum(buf), 6), 148)
+
+ return buf
+}
+
+exports.decode = function (buf, filenameEncoding) {
+ var typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET
+
+ var name = decodeStr(buf, 0, 100, filenameEncoding)
+ var mode = decodeOct(buf, 100, 8)
+ var uid = decodeOct(buf, 108, 8)
+ var gid = decodeOct(buf, 116, 8)
+ var size = decodeOct(buf, 124, 12)
+ var mtime = decodeOct(buf, 136, 12)
+ var type = toType(typeflag)
+ var linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100, filenameEncoding)
+ var uname = decodeStr(buf, 265, 32)
+ var gname = decodeStr(buf, 297, 32)
+ var devmajor = decodeOct(buf, 329, 8)
+ var devminor = decodeOct(buf, 337, 8)
+
+ var c = cksum(buf)
+
+ // checksum is still initial value if header was null.
+ if (c === 8 * 32) return null
+
+ // valid checksum
+ if (c !== decodeOct(buf, 148, 8)) throw new Error('Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?')
+
+ if (USTAR_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0) {
+ // ustar (posix) format.
+ // prepend prefix, if present.
+ if (buf[345]) name = decodeStr(buf, 345, 155, filenameEncoding) + '/' + name
+ } else if (GNU_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0 &&
+ GNU_VER.compare(buf, VERSION_OFFSET, VERSION_OFFSET + 2) === 0) {
+ // 'gnu'/'oldgnu' format. Similar to ustar, but has support for incremental and
+ // multi-volume tarballs.
+ } else {
+ throw new Error('Invalid tar header: unknown format.')
+ }
+
+ // to support old tar versions that use trailing / to indicate dirs
+ if (typeflag === 0 && name && name[name.length - 1] === '/') typeflag = 5
+
+ return {
+ name,
+ mode,
+ uid,
+ gid,
+ size,
+ mtime: new Date(1000 * mtime),
+ type,
+ linkname,
+ uname,
+ gname,
+ devmajor,
+ devminor
+ }
+}
diff --git a/node_modules/tar-stream/index.js b/node_modules/tar-stream/index.js
new file mode 100644
index 0000000..6481704
--- /dev/null
+++ b/node_modules/tar-stream/index.js
@@ -0,0 +1,2 @@
+exports.extract = require('./extract')
+exports.pack = require('./pack')
diff --git a/node_modules/tar-stream/pack.js b/node_modules/tar-stream/pack.js
new file mode 100644
index 0000000..f1da3b7
--- /dev/null
+++ b/node_modules/tar-stream/pack.js
@@ -0,0 +1,255 @@
+var constants = require('fs-constants')
+var eos = require('end-of-stream')
+var inherits = require('inherits')
+var alloc = Buffer.alloc
+
+var Readable = require('readable-stream').Readable
+var Writable = require('readable-stream').Writable
+var StringDecoder = require('string_decoder').StringDecoder
+
+var headers = require('./headers')
+
+var DMODE = parseInt('755', 8)
+var FMODE = parseInt('644', 8)
+
+var END_OF_TAR = alloc(1024)
+
+var noop = function () {}
+
+var overflow = function (self, size) {
+ size &= 511
+ if (size) self.push(END_OF_TAR.slice(0, 512 - size))
+}
+
+function modeToType (mode) {
+ switch (mode & constants.S_IFMT) {
+ case constants.S_IFBLK: return 'block-device'
+ case constants.S_IFCHR: return 'character-device'
+ case constants.S_IFDIR: return 'directory'
+ case constants.S_IFIFO: return 'fifo'
+ case constants.S_IFLNK: return 'symlink'
+ }
+
+ return 'file'
+}
+
+var Sink = function (to) {
+ Writable.call(this)
+ this.written = 0
+ this._to = to
+ this._destroyed = false
+}
+
+inherits(Sink, Writable)
+
+Sink.prototype._write = function (data, enc, cb) {
+ this.written += data.length
+ if (this._to.push(data)) return cb()
+ this._to._drain = cb
+}
+
+Sink.prototype.destroy = function () {
+ if (this._destroyed) return
+ this._destroyed = true
+ this.emit('close')
+}
+
+var LinkSink = function () {
+ Writable.call(this)
+ this.linkname = ''
+ this._decoder = new StringDecoder('utf-8')
+ this._destroyed = false
+}
+
+inherits(LinkSink, Writable)
+
+LinkSink.prototype._write = function (data, enc, cb) {
+ this.linkname += this._decoder.write(data)
+ cb()
+}
+
+LinkSink.prototype.destroy = function () {
+ if (this._destroyed) return
+ this._destroyed = true
+ this.emit('close')
+}
+
+var Void = function () {
+ Writable.call(this)
+ this._destroyed = false
+}
+
+inherits(Void, Writable)
+
+Void.prototype._write = function (data, enc, cb) {
+ cb(new Error('No body allowed for this entry'))
+}
+
+Void.prototype.destroy = function () {
+ if (this._destroyed) return
+ this._destroyed = true
+ this.emit('close')
+}
+
+var Pack = function (opts) {
+ if (!(this instanceof Pack)) return new Pack(opts)
+ Readable.call(this, opts)
+
+ this._drain = noop
+ this._finalized = false
+ this._finalizing = false
+ this._destroyed = false
+ this._stream = null
+}
+
+inherits(Pack, Readable)
+
+Pack.prototype.entry = function (header, buffer, callback) {
+ if (this._stream) throw new Error('already piping an entry')
+ if (this._finalized || this._destroyed) return
+
+ if (typeof buffer === 'function') {
+ callback = buffer
+ buffer = null
+ }
+
+ if (!callback) callback = noop
+
+ var self = this
+
+ if (!header.size || header.type === 'symlink') header.size = 0
+ if (!header.type) header.type = modeToType(header.mode)
+ if (!header.mode) header.mode = header.type === 'directory' ? DMODE : FMODE
+ if (!header.uid) header.uid = 0
+ if (!header.gid) header.gid = 0
+ if (!header.mtime) header.mtime = new Date()
+
+ if (typeof buffer === 'string') buffer = Buffer.from(buffer)
+ if (Buffer.isBuffer(buffer)) {
+ header.size = buffer.length
+ this._encode(header)
+ var ok = this.push(buffer)
+ overflow(self, header.size)
+ if (ok) process.nextTick(callback)
+ else this._drain = callback
+ return new Void()
+ }
+
+ if (header.type === 'symlink' && !header.linkname) {
+ var linkSink = new LinkSink()
+ eos(linkSink, function (err) {
+ if (err) { // stream was closed
+ self.destroy()
+ return callback(err)
+ }
+
+ header.linkname = linkSink.linkname
+ self._encode(header)
+ callback()
+ })
+
+ return linkSink
+ }
+
+ this._encode(header)
+
+ if (header.type !== 'file' && header.type !== 'contiguous-file') {
+ process.nextTick(callback)
+ return new Void()
+ }
+
+ var sink = new Sink(this)
+
+ this._stream = sink
+
+ eos(sink, function (err) {
+ self._stream = null
+
+ if (err) { // stream was closed
+ self.destroy()
+ return callback(err)
+ }
+
+ if (sink.written !== header.size) { // corrupting tar
+ self.destroy()
+ return callback(new Error('size mismatch'))
+ }
+
+ overflow(self, header.size)
+ if (self._finalizing) self.finalize()
+ callback()
+ })
+
+ return sink
+}
+
+Pack.prototype.finalize = function () {
+ if (this._stream) {
+ this._finalizing = true
+ return
+ }
+
+ if (this._finalized) return
+ this._finalized = true
+ this.push(END_OF_TAR)
+ this.push(null)
+}
+
+Pack.prototype.destroy = function (err) {
+ if (this._destroyed) return
+ this._destroyed = true
+
+ if (err) this.emit('error', err)
+ this.emit('close')
+ if (this._stream && this._stream.destroy) this._stream.destroy()
+}
+
+Pack.prototype._encode = function (header) {
+ if (!header.pax) {
+ var buf = headers.encode(header)
+ if (buf) {
+ this.push(buf)
+ return
+ }
+ }
+ this._encodePax(header)
+}
+
+Pack.prototype._encodePax = function (header) {
+ var paxHeader = headers.encodePax({
+ name: header.name,
+ linkname: header.linkname,
+ pax: header.pax
+ })
+
+ var newHeader = {
+ name: 'PaxHeader',
+ mode: header.mode,
+ uid: header.uid,
+ gid: header.gid,
+ size: paxHeader.length,
+ mtime: header.mtime,
+ type: 'pax-header',
+ linkname: header.linkname && 'PaxHeader',
+ uname: header.uname,
+ gname: header.gname,
+ devmajor: header.devmajor,
+ devminor: header.devminor
+ }
+
+ this.push(headers.encode(newHeader))
+ this.push(paxHeader)
+ overflow(this, paxHeader.length)
+
+ newHeader.size = header.size
+ newHeader.type = header.type
+ this.push(headers.encode(newHeader))
+}
+
+Pack.prototype._read = function (n) {
+ var drain = this._drain
+ this._drain = noop
+ drain()
+}
+
+module.exports = Pack
diff --git a/node_modules/tar-stream/package.json b/node_modules/tar-stream/package.json
new file mode 100644
index 0000000..2ee236c
--- /dev/null
+++ b/node_modules/tar-stream/package.json
@@ -0,0 +1,89 @@
+{
+ "_args": [
+ [
+ "tar-stream@2.1.4",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "tar-stream@2.1.4",
+ "_id": "tar-stream@2.1.4",
+ "_inBundle": false,
+ "_integrity": "sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==",
+ "_location": "/tar-stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "tar-stream@2.1.4",
+ "name": "tar-stream",
+ "escapedName": "tar-stream",
+ "rawSpec": "2.1.4",
+ "saveSpec": null,
+ "fetchSpec": "2.1.4"
+ },
+ "_requiredBy": [
+ "/tar-fs"
+ ],
+ "_resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.4.tgz",
+ "_spec": "2.1.4",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Mathias Buus",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/tar-stream/issues"
+ },
+ "dependencies": {
+ "bl": "^4.0.3",
+ "end-of-stream": "^1.4.1",
+ "fs-constants": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.1"
+ },
+ "description": "tar-stream is a streaming tar parser and generator and nothing else. It is streams2 and operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.",
+ "devDependencies": {
+ "concat-stream": "^2.0.0",
+ "standard": "^12.0.1",
+ "tape": "^4.9.2"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "*.js",
+ "LICENSE"
+ ],
+ "homepage": "https://github.com/mafintosh/tar-stream",
+ "keywords": [
+ "tar",
+ "tarball",
+ "parse",
+ "parser",
+ "generate",
+ "generator",
+ "stream",
+ "stream2",
+ "streams",
+ "streams2",
+ "streaming",
+ "pack",
+ "extract",
+ "modify"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "tar-stream",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/mafintosh/tar-stream.git"
+ },
+ "scripts": {
+ "test": "standard && tape test/extract.js test/pack.js",
+ "test-all": "standard && tape test/*.js"
+ },
+ "version": "2.1.4"
+}
diff --git a/node_modules/tar-stream/sandbox.js b/node_modules/tar-stream/sandbox.js
new file mode 100644
index 0000000..9b82d40
--- /dev/null
+++ b/node_modules/tar-stream/sandbox.js
@@ -0,0 +1,11 @@
+const tar = require('tar-stream')
+const fs = require('fs')
+const path = require('path')
+const pipeline = require('pump') // eequire('stream').pipeline
+
+fs.createReadStream('test.tar')
+ .pipe(tar.extract())
+ .on('entry', function (header, stream, done) {
+ console.log(header.name)
+ pipeline(stream, fs.createWriteStream(path.join('/tmp', header.name)), done)
+ })
diff --git a/node_modules/token-types/LICENSE b/node_modules/token-types/LICENSE
new file mode 100644
index 0000000..ffcebb7
--- /dev/null
+++ b/node_modules/token-types/LICENSE
@@ -0,0 +1,7 @@
+Copyright 2017 Borewit
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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. \ No newline at end of file
diff --git a/node_modules/token-types/README.md b/node_modules/token-types/README.md
new file mode 100644
index 0000000..dcb69a8
--- /dev/null
+++ b/node_modules/token-types/README.md
@@ -0,0 +1,107 @@
+![Node.js CI](https://github.com/Borewit/token-types/workflows/Node.js%20CI/badge.svg)
+[![NPM version](https://badge.fury.io/js/token-types.svg)](https://npmjs.org/package/token-types)
+[![npm downloads](http://img.shields.io/npm/dm/token-types.svg)](https://npmcharts.com/compare/token-types,strtok3?start=1200&interval=30)
+[![coveralls](https://coveralls.io/repos/github/Borewit/token-types/badge.svg?branch=master)](https://coveralls.io/github/Borewit/token-types?branch=master)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4723ce4613fc49cda8db5eed29f18834)](https://www.codacy.com/app/Borewit/token-types?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Borewit/token-types&amp;utm_campaign=Badge_Grade)
+[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/Borewit/token-types.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Borewit/token-types/context:javascript)
+[![Total alerts](https://img.shields.io/lgtm/alerts/g/Borewit/token-types.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Borewit/token-types/alerts/)
+[![DeepScan grade](https://deepscan.io/api/teams/5165/projects/6940/branches/61852/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=5165&pid=6940&bid=61852)
+[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/token-types/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/token-types?targetFile=package.json)
+
+# token-types
+
+A primitive token library used to read and write from a node `Buffer`.
+Although it is possible to use this module directly, it is primary designed to be used with [strtok3 tokenizer](https://github.com/Borewit/strtok3).
+
+## Installation
+
+```sh
+npm install --save token-types
+```
+Usually in combination with [strtok3](https://github.com/Borewit/strtok3):
+```sh
+npm install --save strtok3
+```
+
+## Example
+
+```js
+const strtok3 = require('strtok3');
+const token = require('token-types');
+
+(async () => {
+
+ const tokenizer = await strtok3.fromFile("somefile.bin");
+ try {
+ const myNumber = await tokenizer.readToken(token.Float32_BE);
+ console.log(`My number: ${myNumber}`);
+ } finally {
+ tokenizer.close(); // Close the file
+ }
+})();
+```
+
+## Tokens
+
+### Numeric tokens
+
+`node-strtok` supports a wide variety of numerical tokens out of the box:
+
+| Token | Number | Bits | Endianness |
+|---------------|------------------|------|----------------|
+| `UINT8` | Unsigned integer | 8 | n/a |
+| `UINT16_BE` | Unsigned integer | 16 | big endian |
+| `UINT16_LE` | Unsigned integer | 16 | little endian |
+| `UINT24_BE` | Unsigned integer | 24 | big endian |
+| `UINT24_LE` | Unsigned integer | 24 | little endian |
+| `UINT32_BE` | Unsigned integer | 32 | big endian |
+| `UINT32_LE` | Unsigned integer | 32 | little endian |
+| `UINT64_BE` | Unsigned integer | 64 | big endian |
+| `UINT64_LE`* | Unsigned integer | 64 | little endian |
+| `INT8` | Signed integer | 8 | n/a |
+| `INT16_BE` | Signed integer | 16 | big endian |
+| `INT16_LE` | Signed integer | 16 | little endian |
+| `INT24_BE` | Signed integer | 24 | big endian |
+| `INT24_LE` | Signed integer | 24 | little endian |
+| `INT32_BE` | Signed integer | 32 | big endian |
+| `INT32_LE` | Signed integer | 32 | little endian |
+| `INT64_BE` | Signed integer | 64 | big endian |
+| `INT64_LE`* | Signed integer | 64 | little endian |
+| `Float16_BE` | IEEE 754 float | 16 | big endian |
+| `Float16_LE` | IEEE 754 float | 16 | little endian |
+| `Float32_BE` | IEEE 754 float | 32 | big endian |
+| `Float32_LE` | IEEE 754 float | 32 | little endian |
+| `Float64_BE` | IEEE 754 float | 64 | big endian |
+| `Float64_LE` | IEEE 754 float | 64 | little endian |
+| `Float80_BE`* | IEEE 754 float | 80 | big endian |
+| `Float80_LE`* | IEEE 754 float | 80 | little endian |
+
+### Other tokens
+
+String types:
+* Windows-1252
+* ISO-8859-1
+
+*) The tokens exceed the JavaScript IEEE 754 64-bit Floating Point precision, decoding and encoding is best effort based.
+
+### Custom token
+
+Complex tokens can be added, which makes very suitable for reading binary files or network messages:
+```js
+ ExtendedHeader = {
+ len: 10,
+
+ get: (buf, off) => {
+ return {
+ // Extended header size
+ size: Token.UINT32_BE.get(buf, off),
+ // Extended Flags
+ extendedFlags: Token.UINT16_BE.get(buf, off + 4),
+ // Size of padding
+ sizeOfPadding: Token.UINT32_BE.get(buf, off + 6),
+ // CRC data present
+ crcDataPresent: common.strtokBITSET.get(buf, off + 4, 31)
+ };
+ }
+ };
+```
diff --git a/node_modules/token-types/lib/index.d.ts b/node_modules/token-types/lib/index.d.ts
new file mode 100644
index 0000000..20f71c9
--- /dev/null
+++ b/node_modules/token-types/lib/index.d.ts
@@ -0,0 +1,170 @@
+/// <reference types="node" />
+import { IToken, IGetToken } from '@tokenizer/token';
+/**
+ * 8-bit unsigned integer
+ */
+export declare const UINT8: IToken<number>;
+/**
+ * 16-bit unsigned integer, Little Endian byte order
+ */
+export declare const UINT16_LE: IToken<number>;
+/**
+ * 16-bit unsigned integer, Big Endian byte order
+ */
+export declare const UINT16_BE: IToken<number>;
+/**
+ * 24-bit unsigned integer, Little Endian byte order
+ */
+export declare const UINT24_LE: IToken<number>;
+/**
+ * 24-bit unsigned integer, Big Endian byte order
+ */
+export declare const UINT24_BE: IToken<number>;
+/**
+ * 32-bit unsigned integer, Little Endian byte order
+ */
+export declare const UINT32_LE: IToken<number>;
+/**
+ * 32-bit unsigned integer, Big Endian byte order
+ */
+export declare const UINT32_BE: IToken<number>;
+/**
+ * 8-bit signed integer
+ */
+export declare const INT8: IToken<number>;
+/**
+ * 16-bit signed integer, Big Endian byte order
+ */
+export declare const INT16_BE: IToken<number>;
+/**
+ * 16-bit signed integer, Little Endian byte order
+ */
+export declare const INT16_LE: IToken<number>;
+/**
+ * 24-bit signed integer, Little Endian byte order
+ */
+export declare const INT24_LE: IToken<number>;
+/**
+ * 24-bit signed integer, Big Endian byte order
+ */
+export declare const INT24_BE: IToken<number>;
+/**
+ * 32-bit signed integer, Big Endian byte order
+ */
+export declare const INT32_BE: IToken<number>;
+/**
+ * 32-bit signed integer, Big Endian byte order
+ */
+export declare const INT32_LE: IToken<number>;
+/**
+ * 64-bit unsigned integer, Little Endian byte order
+ */
+export declare const UINT64_LE: IToken<number>;
+/**
+ * 64-bit signed integer, Little Endian byte order
+ */
+export declare const INT64_LE: IToken<number>;
+/**
+ * 64-bit unsigned integer, Big Endian byte order
+ */
+export declare const UINT64_BE: IToken<number>;
+/**
+ * 64-bit signed integer, Big Endian byte order
+ */
+export declare const INT64_BE: IToken<number>;
+/**
+ * IEEE 754 16-bit (half precision) float, big endian
+ */
+export declare const Float16_BE: IToken<number>;
+/**
+ * IEEE 754 16-bit (half precision) float, little endian
+ */
+export declare const Float16_LE: IToken<number>;
+/**
+ * IEEE 754 32-bit (single precision) float, big endian
+ */
+export declare const Float32_BE: IToken<number>;
+/**
+ * IEEE 754 32-bit (single precision) float, little endian
+ */
+export declare const Float32_LE: IToken<number>;
+/**
+ * IEEE 754 64-bit (double precision) float, big endian
+ */
+export declare const Float64_BE: IToken<number>;
+/**
+ * IEEE 754 64-bit (double precision) float, little endian
+ */
+export declare const Float64_LE: IToken<number>;
+/**
+ * IEEE 754 80-bit (extended precision) float, big endian
+ */
+export declare const Float80_BE: IToken<number>;
+/**
+ * IEEE 754 80-bit (extended precision) float, little endian
+ */
+export declare const Float80_LE: IToken<number>;
+/**
+ * Ignore a given number of bytes
+ */
+export declare class IgnoreType implements IGetToken<void> {
+ len: number;
+ /**
+ * @param len number of bytes to ignore
+ */
+ constructor(len: number);
+ get(buf: Buffer, off: number): void;
+}
+export declare class BufferType implements IGetToken<Buffer> {
+ len: number;
+ constructor(len: number);
+ get(buf: Buffer, off: number): Buffer;
+}
+/**
+ * Consume a fixed number of bytes from the stream and return a string with a specified encoding.
+ */
+export declare class StringType implements IGetToken<string> {
+ len: number;
+ encoding: BufferEncoding;
+ constructor(len: number, encoding: BufferEncoding);
+ get(buf: Buffer, off: number): string;
+}
+/**
+ * ANSI Latin 1 String
+ * Using windows-1252 / ISO 8859-1 decoding
+ */
+export declare class AnsiStringType implements IGetToken<string> {
+ len: number;
+ private static windows1252;
+ private static decode;
+ private static inRange;
+ private static codePointToString;
+ private static singleByteDecoder;
+ constructor(len: number);
+ get(buf: Buffer, off?: number): string;
+}
+/**
+ * Best effort approach to write 64 but signed integer, little endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+export declare function writeIntLE(buf: Buffer, value: number, offset: number, byteLength: number): number;
+/**
+ * Best effort approach to read up to 64 bit unsigned integer, big endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+export declare function readUIntBE(buf: Buffer, offset: number, byteLength: number): number;
+/**
+ * Best effort approach to write up to 64 bit unsigned integer, big endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+export declare function writeUIntBE(buf: Buffer, value: number, offset: number, byteLength: number): number;
+/**
+ * Best effort approach to read 64 but signed integer, big endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+export declare function readIntBE(buf: Buffer, offset: number, byteLength: number): number;
+/**
+ * Best effort approach to write 64 but signed integer, big endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+export declare function writeIntBE(buf: Buffer, value: number, offset: number, byteLength: number): number;
diff --git a/node_modules/token-types/lib/index.js b/node_modules/token-types/lib/index.js
new file mode 100644
index 0000000..38df2fb
--- /dev/null
+++ b/node_modules/token-types/lib/index.js
@@ -0,0 +1,549 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.writeIntBE = exports.readIntBE = exports.writeUIntBE = exports.readUIntBE = exports.writeIntLE = exports.AnsiStringType = exports.StringType = exports.BufferType = exports.IgnoreType = exports.Float80_LE = exports.Float80_BE = exports.Float64_LE = exports.Float64_BE = exports.Float32_LE = exports.Float32_BE = exports.Float16_LE = exports.Float16_BE = exports.INT64_BE = exports.UINT64_BE = exports.INT64_LE = exports.UINT64_LE = exports.INT32_LE = exports.INT32_BE = exports.INT24_BE = exports.INT24_LE = exports.INT16_LE = exports.INT16_BE = exports.INT8 = exports.UINT32_BE = exports.UINT32_LE = exports.UINT24_BE = exports.UINT24_LE = exports.UINT16_BE = exports.UINT16_LE = exports.UINT8 = void 0;
+const ieee754 = require("ieee754");
+// Primitive types
+/**
+ * 8-bit unsigned integer
+ */
+exports.UINT8 = {
+ len: 1,
+ get(buf, off) {
+ return buf.readUInt8(off);
+ },
+ put(buf, off, v) {
+ return buf.writeUInt8(v, off);
+ }
+};
+/**
+ * 16-bit unsigned integer, Little Endian byte order
+ */
+exports.UINT16_LE = {
+ len: 2,
+ get(buf, off) {
+ return buf.readUInt16LE(off);
+ },
+ put(buf, off, v) {
+ return buf.writeUInt16LE(v, off);
+ }
+};
+/**
+ * 16-bit unsigned integer, Big Endian byte order
+ */
+exports.UINT16_BE = {
+ len: 2,
+ get(buf, off) {
+ return buf.readUInt16BE(off);
+ },
+ put(buf, off, v) {
+ return buf.writeUInt16BE(v, off);
+ }
+};
+/**
+ * 24-bit unsigned integer, Little Endian byte order
+ */
+exports.UINT24_LE = {
+ len: 3,
+ get(buf, off) {
+ return buf.readUIntLE(off, 3);
+ },
+ put(buf, off, v) {
+ return buf.writeUIntLE(v, off, 3);
+ }
+};
+/**
+ * 24-bit unsigned integer, Big Endian byte order
+ */
+exports.UINT24_BE = {
+ len: 3,
+ get(buf, off) {
+ return buf.readUIntBE(off, 3);
+ },
+ put(buf, off, v) {
+ return buf.writeUIntBE(v, off, 3);
+ }
+};
+/**
+ * 32-bit unsigned integer, Little Endian byte order
+ */
+exports.UINT32_LE = {
+ len: 4,
+ get(buf, off) {
+ return buf.readUInt32LE(off);
+ },
+ put(b, o, v) {
+ return b.writeUInt32LE(v, o);
+ }
+};
+/**
+ * 32-bit unsigned integer, Big Endian byte order
+ */
+exports.UINT32_BE = {
+ len: 4,
+ get(buf, off) {
+ return buf.readUInt32BE(off);
+ },
+ put(buf, off, v) {
+ return buf.writeUInt32BE(v, off);
+ }
+};
+/**
+ * 8-bit signed integer
+ */
+exports.INT8 = {
+ len: 1,
+ get(buf, off) {
+ return buf.readInt8(off);
+ },
+ put(buf, off, v) {
+ return buf.writeInt8(v, off);
+ }
+};
+/**
+ * 16-bit signed integer, Big Endian byte order
+ */
+exports.INT16_BE = {
+ len: 2,
+ get(buf, off) {
+ return buf.readInt16BE(off);
+ },
+ put(b, o, v) {
+ return b.writeInt16BE(v, o);
+ }
+};
+/**
+ * 16-bit signed integer, Little Endian byte order
+ */
+exports.INT16_LE = {
+ len: 2,
+ get(buf, off) {
+ return buf.readInt16LE(off);
+ },
+ put(b, o, v) {
+ return b.writeInt16LE(v, o);
+ }
+};
+/**
+ * 24-bit signed integer, Little Endian byte order
+ */
+exports.INT24_LE = {
+ len: 3,
+ get(buf, off) {
+ return buf.readIntLE(off, 3);
+ },
+ put(b, o, v) {
+ return b.writeIntLE(v, o, 3);
+ }
+};
+/**
+ * 24-bit signed integer, Big Endian byte order
+ */
+exports.INT24_BE = {
+ len: 3,
+ get(buf, off) {
+ return buf.readIntBE(off, 3);
+ },
+ put(b, o, v) {
+ return b.writeIntBE(v, o, 3);
+ }
+};
+/**
+ * 32-bit signed integer, Big Endian byte order
+ */
+exports.INT32_BE = {
+ len: 4,
+ get(buf, off) {
+ return buf.readInt32BE(off);
+ },
+ put(b, o, v) {
+ return b.writeInt32BE(v, o);
+ }
+};
+/**
+ * 32-bit signed integer, Big Endian byte order
+ */
+exports.INT32_LE = {
+ len: 4,
+ get(buf, off) {
+ return buf.readInt32LE(off);
+ },
+ put(b, o, v) {
+ return b.writeInt32LE(v, o);
+ }
+};
+/**
+ * 64-bit unsigned integer, Little Endian byte order
+ */
+exports.UINT64_LE = {
+ len: 8,
+ get(buf, off) {
+ return readUIntLE(buf, off, this.len);
+ },
+ put(b, o, v) {
+ return writeUIntLE(b, v, o, this.len);
+ }
+};
+/**
+ * 64-bit signed integer, Little Endian byte order
+ */
+exports.INT64_LE = {
+ len: 8,
+ get(buf, off) {
+ return readIntLE(buf, off, this.len);
+ },
+ put(b, off, v) {
+ return writeIntLE(b, v, off, this.len);
+ }
+};
+/**
+ * 64-bit unsigned integer, Big Endian byte order
+ */
+exports.UINT64_BE = {
+ len: 8,
+ get(b, off) {
+ return readUIntBE(b, off, this.len);
+ },
+ put(b, o, v) {
+ return writeUIntBE(b, v, o, this.len);
+ }
+};
+/**
+ * 64-bit signed integer, Big Endian byte order
+ */
+exports.INT64_BE = {
+ len: 8,
+ get(b, off) {
+ return readIntBE(b, off, this.len);
+ },
+ put(b, off, v) {
+ return writeIntBE(b, v, off, this.len);
+ }
+};
+/**
+ * IEEE 754 16-bit (half precision) float, big endian
+ */
+exports.Float16_BE = {
+ len: 2,
+ get(b, off) {
+ return ieee754.read(b, off, false, 10, this.len);
+ },
+ put(b, off, v) {
+ ieee754.write(b, v, off, false, 10, this.len);
+ return off + this.len;
+ }
+};
+/**
+ * IEEE 754 16-bit (half precision) float, little endian
+ */
+exports.Float16_LE = {
+ len: 2,
+ get(b, off) {
+ return ieee754.read(b, off, true, 10, this.len);
+ },
+ put(b, off, v) {
+ ieee754.write(b, v, off, true, 10, this.len);
+ return off + this.len;
+ }
+};
+/**
+ * IEEE 754 32-bit (single precision) float, big endian
+ */
+exports.Float32_BE = {
+ len: 4,
+ get(b, off) {
+ return b.readFloatBE(off);
+ },
+ put(b, off, v) {
+ return b.writeFloatBE(v, off);
+ }
+};
+/**
+ * IEEE 754 32-bit (single precision) float, little endian
+ */
+exports.Float32_LE = {
+ len: 4,
+ get(b, off) {
+ return b.readFloatLE(off);
+ },
+ put(b, off, v) {
+ return b.writeFloatLE(v, off);
+ }
+};
+/**
+ * IEEE 754 64-bit (double precision) float, big endian
+ */
+exports.Float64_BE = {
+ len: 8,
+ get(b, off) {
+ return b.readDoubleBE(off);
+ },
+ put(b, off, v) {
+ return b.writeDoubleBE(v, off);
+ }
+};
+/**
+ * IEEE 754 64-bit (double precision) float, little endian
+ */
+exports.Float64_LE = {
+ len: 8,
+ get(b, off) {
+ return b.readDoubleLE(off);
+ },
+ put(b, off, v) {
+ return b.writeDoubleLE(v, off);
+ }
+};
+/**
+ * IEEE 754 80-bit (extended precision) float, big endian
+ */
+exports.Float80_BE = {
+ len: 10,
+ get(b, off) {
+ return ieee754.read(b, off, false, 63, this.len);
+ },
+ put(b, off, v) {
+ ieee754.write(b, v, off, false, 63, this.len);
+ return off + this.len;
+ }
+};
+/**
+ * IEEE 754 80-bit (extended precision) float, little endian
+ */
+exports.Float80_LE = {
+ len: 10,
+ get(b, off) {
+ return ieee754.read(b, off, true, 63, this.len);
+ },
+ put(b, off, v) {
+ ieee754.write(b, v, off, true, 63, this.len);
+ return off + this.len;
+ }
+};
+/**
+ * Ignore a given number of bytes
+ */
+class IgnoreType {
+ /**
+ * @param len number of bytes to ignore
+ */
+ constructor(len) {
+ this.len = len;
+ }
+ // ToDo: don't read, but skip data
+ get(buf, off) {
+ }
+}
+exports.IgnoreType = IgnoreType;
+class BufferType {
+ constructor(len) {
+ this.len = len;
+ }
+ get(buf, off) {
+ return buf.slice(off, off + this.len);
+ }
+}
+exports.BufferType = BufferType;
+/**
+ * Consume a fixed number of bytes from the stream and return a string with a specified encoding.
+ */
+class StringType {
+ constructor(len, encoding) {
+ this.len = len;
+ this.encoding = encoding;
+ }
+ get(buf, off) {
+ return buf.toString(this.encoding, off, off + this.len);
+ }
+}
+exports.StringType = StringType;
+/**
+ * ANSI Latin 1 String
+ * Using windows-1252 / ISO 8859-1 decoding
+ */
+class AnsiStringType {
+ constructor(len) {
+ this.len = len;
+ }
+ static decode(buffer, off, until) {
+ let str = '';
+ for (let i = off; i < until; ++i) {
+ str += AnsiStringType.codePointToString(AnsiStringType.singleByteDecoder(buffer[i]));
+ }
+ return str;
+ }
+ static inRange(a, min, max) {
+ return min <= a && a <= max;
+ }
+ static codePointToString(cp) {
+ if (cp <= 0xFFFF) {
+ return String.fromCharCode(cp);
+ }
+ else {
+ cp -= 0x10000;
+ return String.fromCharCode((cp >> 10) + 0xD800, (cp & 0x3FF) + 0xDC00);
+ }
+ }
+ static singleByteDecoder(bite) {
+ if (AnsiStringType.inRange(bite, 0x00, 0x7F)) {
+ return bite;
+ }
+ const codePoint = AnsiStringType.windows1252[bite - 0x80];
+ if (codePoint === null) {
+ throw Error('invaliding encoding');
+ }
+ return codePoint;
+ }
+ get(buf, off = 0) {
+ return AnsiStringType.decode(buf, off, off + this.len);
+ }
+}
+exports.AnsiStringType = AnsiStringType;
+AnsiStringType.windows1252 = [8364, 129, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352,
+ 8249, 338, 141, 381, 143, 144, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732,
+ 8482, 353, 8250, 339, 157, 382, 376, 160, 161, 162, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255];
+/**
+ * Best effort approach to read up to 64 bit unsigned integer, little endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+function readUIntLE(buf, offset, byteLength) {
+ offset = offset >>> 0;
+ byteLength = byteLength >>> 0;
+ let val = buf[offset];
+ let mul = 1;
+ let i = 0;
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += buf[offset + i] * mul;
+ }
+ return val;
+}
+/**
+ * Best effort approach to write up to 64 bit unsigned integer, little endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+function writeUIntLE(buf, value, offset, byteLength) {
+ value = +value;
+ offset = offset >>> 0;
+ byteLength = byteLength >>> 0;
+ let mul = 1;
+ let i = 0;
+ buf[offset] = value & 0xFF;
+ while (++i < byteLength && (mul *= 0x100)) {
+ buf[offset + i] = (value / mul) & 0xFF;
+ }
+ return offset + byteLength;
+}
+/**
+ * Best effort approach to read 64 but signed integer, little endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+function readIntLE(buf, offset, byteLength) {
+ offset = offset >>> 0;
+ byteLength = byteLength >>> 0;
+ let val = buf[offset];
+ let mul = 1;
+ let i = 0;
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += buf[offset + i] * mul;
+ }
+ mul *= 0x80;
+ if (val >= mul)
+ val -= Math.pow(2, 8 * byteLength);
+ return val;
+}
+/**
+ * Best effort approach to write 64 but signed integer, little endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+function writeIntLE(buf, value, offset, byteLength) {
+ value = +value;
+ offset = offset >>> 0;
+ let i = 0;
+ let mul = 1;
+ let sub = 0;
+ buf[offset] = value & 0xFF;
+ while (++i < byteLength && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && buf[offset + i - 1] !== 0) {
+ sub = 1;
+ }
+ buf[offset + i] = ((value / mul) >> 0) - sub & 0xFF;
+ }
+ return offset + byteLength;
+}
+exports.writeIntLE = writeIntLE;
+/**
+ * Best effort approach to read up to 64 bit unsigned integer, big endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+function readUIntBE(buf, offset, byteLength) {
+ offset = offset >>> 0;
+ byteLength = byteLength >>> 0;
+ let val = buf[offset + --byteLength];
+ let mul = 1;
+ while (byteLength > 0 && (mul *= 0x100)) {
+ val += buf[offset + --byteLength] * mul;
+ }
+ return val;
+}
+exports.readUIntBE = readUIntBE;
+/**
+ * Best effort approach to write up to 64 bit unsigned integer, big endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+function writeUIntBE(buf, value, offset, byteLength) {
+ value = +value;
+ offset = offset >>> 0;
+ byteLength = byteLength >>> 0;
+ let i = byteLength - 1;
+ let mul = 1;
+ buf[offset + i] = value & 0xFF;
+ while (--i >= 0 && (mul *= 0x100)) {
+ buf[offset + i] = (value / mul) & 0xFF;
+ }
+ return offset + byteLength;
+}
+exports.writeUIntBE = writeUIntBE;
+/**
+ * Best effort approach to read 64 but signed integer, big endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+function readIntBE(buf, offset, byteLength) {
+ offset = offset >>> 0;
+ byteLength = byteLength >>> 0;
+ let i = byteLength;
+ let mul = 1;
+ let val = buf[offset + --i];
+ while (i > 0 && (mul *= 0x100)) {
+ val += buf[offset + --i] * mul;
+ }
+ mul *= 0x80;
+ if (val >= mul)
+ val -= Math.pow(2, 8 * byteLength);
+ return val;
+}
+exports.readIntBE = readIntBE;
+/**
+ * Best effort approach to write 64 but signed integer, big endian.
+ * Note that JavasScript is limited to 2^53 - 1 bit.
+ */
+function writeIntBE(buf, value, offset, byteLength) {
+ value = +value;
+ offset = offset >>> 0;
+ let i = byteLength - 1;
+ let mul = 1;
+ let sub = 0;
+ buf[offset + i] = value & 0xFF;
+ while (--i >= 0 && (mul *= 0x100)) {
+ if (value < 0 && sub === 0 && buf[offset + i + 1] !== 0) {
+ sub = 1;
+ }
+ buf[offset + i] = ((value / mul) >> 0) - sub & 0xFF;
+ }
+ return offset + byteLength;
+}
+exports.writeIntBE = writeIntBE;
diff --git a/node_modules/token-types/node_modules/ieee754/LICENSE b/node_modules/token-types/node_modules/ieee754/LICENSE
new file mode 100644
index 0000000..5aac82c
--- /dev/null
+++ b/node_modules/token-types/node_modules/ieee754/LICENSE
@@ -0,0 +1,11 @@
+Copyright 2008 Fair Oaks Labs, Inc.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/token-types/node_modules/ieee754/README.md b/node_modules/token-types/node_modules/ieee754/README.md
new file mode 100644
index 0000000..cb7527b
--- /dev/null
+++ b/node_modules/token-types/node_modules/ieee754/README.md
@@ -0,0 +1,51 @@
+# ieee754 [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/ieee754/master.svg
+[travis-url]: https://travis-ci.org/feross/ieee754
+[npm-image]: https://img.shields.io/npm/v/ieee754.svg
+[npm-url]: https://npmjs.org/package/ieee754
+[downloads-image]: https://img.shields.io/npm/dm/ieee754.svg
+[downloads-url]: https://npmjs.org/package/ieee754
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+[![saucelabs][saucelabs-image]][saucelabs-url]
+
+[saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg
+[saucelabs-url]: https://saucelabs.com/u/ieee754
+
+### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object.
+
+## install
+
+```
+npm install ieee754
+```
+
+## methods
+
+`var ieee754 = require('ieee754')`
+
+The `ieee754` object has the following functions:
+
+```
+ieee754.read = function (buffer, offset, isLE, mLen, nBytes)
+ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes)
+```
+
+The arguments mean the following:
+
+- buffer = the buffer
+- offset = offset into the buffer
+- value = value to set (only for `write`)
+- isLe = is little endian?
+- mLen = mantissa length
+- nBytes = number of bytes
+
+## what is ieee754?
+
+The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point).
+
+## license
+
+BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc.
diff --git a/node_modules/token-types/node_modules/ieee754/index.d.ts b/node_modules/token-types/node_modules/ieee754/index.d.ts
new file mode 100644
index 0000000..f1e4354
--- /dev/null
+++ b/node_modules/token-types/node_modules/ieee754/index.d.ts
@@ -0,0 +1,10 @@
+declare namespace ieee754 {
+ export function read(
+ buffer: Uint8Array, offset: number, isLE: boolean, mLen: number,
+ nBytes: number): number;
+ export function write(
+ buffer: Uint8Array, value: number, offset: number, isLE: boolean,
+ mLen: number, nBytes: number): void;
+ }
+
+ export = ieee754; \ No newline at end of file
diff --git a/node_modules/token-types/node_modules/ieee754/index.js b/node_modules/token-types/node_modules/ieee754/index.js
new file mode 100644
index 0000000..81d26c3
--- /dev/null
+++ b/node_modules/token-types/node_modules/ieee754/index.js
@@ -0,0 +1,85 @@
+/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+ var e, m
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var nBits = -7
+ var i = isLE ? (nBytes - 1) : 0
+ var d = isLE ? -1 : 1
+ var s = buffer[offset + i]
+
+ i += d
+
+ e = s & ((1 << (-nBits)) - 1)
+ s >>= (-nBits)
+ nBits += eLen
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & ((1 << (-nBits)) - 1)
+ e >>= (-nBits)
+ nBits += mLen
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
+ } else {
+ m = m + Math.pow(2, mLen)
+ e = e - eBias
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+}
+
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c
+ var eLen = (nBytes * 8) - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+ var i = isLE ? 0 : (nBytes - 1)
+ var d = isLE ? 1 : -1
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+ value = Math.abs(value)
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0
+ e = eMax
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2)
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--
+ c *= 2
+ }
+ if (e + eBias >= 1) {
+ value += rt / c
+ } else {
+ value += rt * Math.pow(2, 1 - eBias)
+ }
+ if (value * c >= 2) {
+ e++
+ c /= 2
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0
+ e = eMax
+ } else if (e + eBias >= 1) {
+ m = ((value * c) - 1) * Math.pow(2, mLen)
+ e = e + eBias
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+ e = 0
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+ e = (e << mLen) | m
+ eLen += mLen
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+ buffer[offset + i - d] |= s * 128
+}
diff --git a/node_modules/token-types/node_modules/ieee754/package.json b/node_modules/token-types/node_modules/ieee754/package.json
new file mode 100644
index 0000000..7564124
--- /dev/null
+++ b/node_modules/token-types/node_modules/ieee754/package.json
@@ -0,0 +1,84 @@
+{
+ "_from": "ieee754@^1.2.1",
+ "_id": "ieee754@1.2.1",
+ "_inBundle": false,
+ "_integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "_location": "/token-types/ieee754",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "ieee754@^1.2.1",
+ "name": "ieee754",
+ "escapedName": "ieee754",
+ "rawSpec": "^1.2.1",
+ "saveSpec": null,
+ "fetchSpec": "^1.2.1"
+ },
+ "_requiredBy": [
+ "/token-types"
+ ],
+ "_resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "_shasum": "8eb7a10a63fff25d15a57b001586d177d1b0d352",
+ "_spec": "ieee754@^1.2.1",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/token-types",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "https://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/ieee754/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Romain Beauxis",
+ "email": "toots@rastageeks.org"
+ }
+ ],
+ "deprecated": false,
+ "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object",
+ "devDependencies": {
+ "airtap": "^3.0.0",
+ "standard": "*",
+ "tape": "^5.0.1"
+ },
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "homepage": "https://github.com/feross/ieee754#readme",
+ "keywords": [
+ "IEEE 754",
+ "buffer",
+ "convert",
+ "floating point",
+ "ieee754"
+ ],
+ "license": "BSD-3-Clause",
+ "main": "index.js",
+ "name": "ieee754",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/ieee754.git"
+ },
+ "scripts": {
+ "test": "standard && npm run test-node && npm run test-browser",
+ "test-browser": "airtap -- test/*.js",
+ "test-browser-local": "airtap --local -- test/*.js",
+ "test-node": "tape test/*.js"
+ },
+ "types": "index.d.ts",
+ "version": "1.2.1"
+}
diff --git a/node_modules/token-types/package.json b/node_modules/token-types/package.json
new file mode 100644
index 0000000..f069761
--- /dev/null
+++ b/node_modules/token-types/package.json
@@ -0,0 +1,120 @@
+{
+ "_from": "token-types@^2.0.0",
+ "_id": "token-types@2.1.1",
+ "_inBundle": false,
+ "_integrity": "sha512-wnQcqlreS6VjthyHO3Y/kpK/emflxDBNhlNUPfh7wE39KnuDdOituXomIbyI79vBtF0Ninpkh72mcuRHo+RG3Q==",
+ "_location": "/token-types",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "token-types@^2.0.0",
+ "name": "token-types",
+ "escapedName": "token-types",
+ "rawSpec": "^2.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.0"
+ },
+ "_requiredBy": [
+ "/file-type"
+ ],
+ "_resolved": "https://registry.npmjs.org/token-types/-/token-types-2.1.1.tgz",
+ "_shasum": "bd585d64902aaf720b8979d257b4b850b4d45c45",
+ "_spec": "token-types@^2.0.0",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/file-type",
+ "author": {
+ "name": "Borewit",
+ "url": "https://github.com/Borewit"
+ },
+ "bugs": {
+ "url": "https://github.com/Borewit/token-types/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "@tokenizer/token": "^0.1.1",
+ "ieee754": "^1.2.1"
+ },
+ "deprecated": false,
+ "description": "Common token types for decoding and encoding numeric and string values",
+ "devDependencies": {
+ "@types/chai": "^4.2.14",
+ "@types/mocha": "^8.2.0",
+ "@types/node": "^14.14.20",
+ "chai": "^4.2.0",
+ "coveralls": "^3.1.0",
+ "del-cli": "^3.0.1",
+ "mocha": "^7.2.0",
+ "nyc": "^15.1.0",
+ "remark-cli": "^9.0.0",
+ "remark-preset-lint-recommended": "^5.0.0",
+ "source-map-support": "^0.5.19",
+ "ts-node": "^9.1.1",
+ "tslint": "^6.1.3",
+ "typescript": "^4.1.3"
+ },
+ "engines": {
+ "node": ">=0.1.98"
+ },
+ "files": [
+ "lib/index.js",
+ "lib/index.d.ts"
+ ],
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Borewit"
+ },
+ "homepage": "https://github.com/Borewit/token-types#readme",
+ "keywords": [
+ "token",
+ "integer",
+ "unsigned",
+ "numeric",
+ "float",
+ "IEEE",
+ "754",
+ "strtok3"
+ ],
+ "license": "MIT",
+ "main": "lib/index.js",
+ "name": "token-types",
+ "nyc": {
+ "exclude": [
+ "test/**/*.ts",
+ "lib/**/*.*.js"
+ ],
+ "extension": [
+ ".ts"
+ ],
+ "sourceMap": true,
+ "instrument": true,
+ "reporter": [
+ "lcov",
+ "text"
+ ],
+ "report-dir": "coverage"
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-lint-recommended"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Borewit/token-types.git"
+ },
+ "scripts": {
+ "build": "npm run compile",
+ "clean": "del-cli lib/**/*.js lib/***.js.map *.d.ts test/**/*.d.ts test/**/*.js test/**/*.js.map .nyc_output",
+ "compile": "npm run compile-src && npm run compile-test",
+ "compile-src": "tsc --p lib",
+ "compile-test": "tsc --p test",
+ "coveralls": "npm run test-coverage && nyc report --reporter=text-lcov | coveralls",
+ "lint": "npm run lint-ts && npm run lint-md",
+ "lint-md": "remark -u preset-lint-recommended .",
+ "lint-ts": "tslint index.ts --exclude '*.d.ts' 'test/**/*.ts' --exclude 'test/**/*.d.ts'",
+ "test": "mocha --require ts-node/register --require source-map-support/register --full-trace --recursive test/test-*.ts",
+ "test-coverage": "nyc npm run test"
+ },
+ "types": "lib/index.d.ts",
+ "version": "2.1.1"
+}
diff --git a/node_modules/typedarray-to-buffer/.airtap.yml b/node_modules/typedarray-to-buffer/.airtap.yml
new file mode 100644
index 0000000..3417780
--- /dev/null
+++ b/node_modules/typedarray-to-buffer/.airtap.yml
@@ -0,0 +1,15 @@
+sauce_connect: true
+loopback: airtap.local
+browsers:
+ - name: chrome
+ version: latest
+ - name: firefox
+ version: latest
+ - name: safari
+ version: latest
+ - name: microsoftedge
+ version: latest
+ - name: ie
+ version: latest
+ - name: iphone
+ version: latest
diff --git a/node_modules/typedarray-to-buffer/.travis.yml b/node_modules/typedarray-to-buffer/.travis.yml
new file mode 100644
index 0000000..f25afbd
--- /dev/null
+++ b/node_modules/typedarray-to-buffer/.travis.yml
@@ -0,0 +1,11 @@
+language: node_js
+node_js:
+ - lts/*
+addons:
+ sauce_connect: true
+ hosts:
+ - airtap.local
+env:
+ global:
+ - secure: i51rE9rZGHbcZWlL58j3H1qtL23OIV2r0X4TcQKNI3pw2mubdHFJmfPNNO19ItfReu8wwQMxOehKamwaNvqMiKWyHfn/QcThFQysqzgGZ6AgnUbYx9od6XFNDeWd1sVBf7QBAL07y7KWlYGWCwFwWjabSVySzQhEBdisPcskfkI=
+ - secure: BKq6/5z9LK3KDkTjs7BGeBZ1KsWgz+MsAXZ4P64NSeVGFaBdXU45+ww1mwxXFt5l22/mhyOQZfebQl+kGVqRSZ+DEgQeCymkNZ6CD8c6w6cLuOJXiXwuu/cDM2DD0tfGeu2YZC7yEikP7BqEFwH3D324rRzSGLF2RSAAwkOI7bE=
diff --git a/node_modules/typedarray-to-buffer/LICENSE b/node_modules/typedarray-to-buffer/LICENSE
new file mode 100644
index 0000000..0c068ce
--- /dev/null
+++ b/node_modules/typedarray-to-buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/typedarray-to-buffer/README.md b/node_modules/typedarray-to-buffer/README.md
new file mode 100644
index 0000000..35761fb
--- /dev/null
+++ b/node_modules/typedarray-to-buffer/README.md
@@ -0,0 +1,85 @@
+# typedarray-to-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/typedarray-to-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/typedarray-to-buffer
+[npm-image]: https://img.shields.io/npm/v/typedarray-to-buffer.svg
+[npm-url]: https://npmjs.org/package/typedarray-to-buffer
+[downloads-image]: https://img.shields.io/npm/dm/typedarray-to-buffer.svg
+[downloads-url]: https://npmjs.org/package/typedarray-to-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Convert a typed array to a [Buffer](https://github.com/feross/buffer) without a copy.
+
+[![saucelabs][saucelabs-image]][saucelabs-url]
+
+[saucelabs-image]: https://saucelabs.com/browser-matrix/typedarray-to-buffer.svg
+[saucelabs-url]: https://saucelabs.com/u/typedarray-to-buffer
+
+Say you're using the ['buffer'](https://github.com/feross/buffer) module on npm, or
+[browserify](http://browserify.org/) and you're working with lots of binary data.
+
+Unfortunately, sometimes the browser or someone else's API gives you a typed array like
+`Uint8Array` to work with and you need to convert it to a `Buffer`. What do you do?
+
+Of course: `Buffer.from(uint8array)`
+
+But, alas, every time you do `Buffer.from(uint8array)` **the entire array gets copied**.
+The `Buffer` constructor does a copy; this is
+defined by the [node docs](http://nodejs.org/api/buffer.html) and the 'buffer' module
+matches the node API exactly.
+
+So, how can we avoid this expensive copy in
+[performance critical applications](https://github.com/feross/buffer/issues/22)?
+
+***Simply use this module, of course!***
+
+If you have an `ArrayBuffer`, you don't need this module, because
+`Buffer.from(arrayBuffer)`
+[is already efficient](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length).
+
+## install
+
+```bash
+npm install typedarray-to-buffer
+```
+
+## usage
+
+To convert a typed array to a `Buffer` **without a copy**, do this:
+
+```js
+var toBuffer = require('typedarray-to-buffer')
+
+var arr = new Uint8Array([1, 2, 3])
+arr = toBuffer(arr)
+
+// arr is a buffer now!
+
+arr.toString() // '\u0001\u0002\u0003'
+arr.readUInt16BE(0) // 258
+```
+
+## how it works
+
+If the browser supports typed arrays, then `toBuffer` will **augment the typed array** you
+pass in with the `Buffer` methods and return it. See [how does Buffer
+work?](https://github.com/feross/buffer#how-does-it-work) for more about how augmentation
+works.
+
+This module uses the typed array's underlying `ArrayBuffer` to back the new `Buffer`. This
+respects the "view" on the `ArrayBuffer`, i.e. `byteOffset` and `byteLength`. In other
+words, if you do `toBuffer(new Uint32Array([1, 2, 3]))`, then the new `Buffer` will
+contain `[1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0]`, **not** `[1, 2, 3]`. And it still doesn't
+require a copy.
+
+If the browser doesn't support typed arrays, then `toBuffer` will create a new `Buffer`
+object, copy the data into it, and return it. There's no simple performance optimization
+we can do for old browsers. Oh well.
+
+If this module is used in node, then it will just call `Buffer.from`. This is just for
+the convenience of modules that work in both node and the browser.
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org).
diff --git a/node_modules/typedarray-to-buffer/index.js b/node_modules/typedarray-to-buffer/index.js
new file mode 100644
index 0000000..5fa394d
--- /dev/null
+++ b/node_modules/typedarray-to-buffer/index.js
@@ -0,0 +1,25 @@
+/**
+ * Convert a typed array to a Buffer without a copy
+ *
+ * Author: Feross Aboukhadijeh <https://feross.org>
+ * License: MIT
+ *
+ * `npm install typedarray-to-buffer`
+ */
+
+var isTypedArray = require('is-typedarray').strict
+
+module.exports = function typedarrayToBuffer (arr) {
+ if (isTypedArray(arr)) {
+ // To avoid a copy, use the typed array's underlying ArrayBuffer to back new Buffer
+ var buf = Buffer.from(arr.buffer)
+ if (arr.byteLength !== arr.buffer.byteLength) {
+ // Respect the "view", i.e. byteOffset and byteLength, without doing a copy
+ buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength)
+ }
+ return buf
+ } else {
+ // Pass through all other types to `Buffer.from`
+ return Buffer.from(arr)
+ }
+}
diff --git a/node_modules/typedarray-to-buffer/package.json b/node_modules/typedarray-to-buffer/package.json
new file mode 100644
index 0000000..bac7683
--- /dev/null
+++ b/node_modules/typedarray-to-buffer/package.json
@@ -0,0 +1,75 @@
+{
+ "_from": "typedarray-to-buffer@^3.1.5",
+ "_id": "typedarray-to-buffer@3.1.5",
+ "_inBundle": false,
+ "_integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+ "_location": "/typedarray-to-buffer",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "typedarray-to-buffer@^3.1.5",
+ "name": "typedarray-to-buffer",
+ "escapedName": "typedarray-to-buffer",
+ "rawSpec": "^3.1.5",
+ "saveSpec": null,
+ "fetchSpec": "^3.1.5"
+ },
+ "_requiredBy": [
+ "/file-type"
+ ],
+ "_resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+ "_shasum": "a97ee7a9ff42691b9f783ff1bc5112fe3fca9080",
+ "_spec": "typedarray-to-buffer@^3.1.5",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/file-type",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "http://feross.org/"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/typedarray-to-buffer/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "is-typedarray": "^1.0.0"
+ },
+ "deprecated": false,
+ "description": "Convert a typed array to a Buffer without a copy",
+ "devDependencies": {
+ "airtap": "0.0.4",
+ "standard": "*",
+ "tape": "^4.0.0"
+ },
+ "homepage": "http://feross.org",
+ "keywords": [
+ "buffer",
+ "typed array",
+ "convert",
+ "no copy",
+ "uint8array",
+ "uint16array",
+ "uint32array",
+ "int16array",
+ "int32array",
+ "float32array",
+ "float64array",
+ "browser",
+ "arraybuffer",
+ "dataview"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "typedarray-to-buffer",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/typedarray-to-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && npm run test-node && npm run test-browser",
+ "test-browser": "airtap -- test/*.js",
+ "test-browser-local": "airtap --local -- test/*.js",
+ "test-node": "tape test/*.js"
+ },
+ "version": "3.1.5"
+}
diff --git a/node_modules/typedarray-to-buffer/test/basic.js b/node_modules/typedarray-to-buffer/test/basic.js
new file mode 100644
index 0000000..3521096
--- /dev/null
+++ b/node_modules/typedarray-to-buffer/test/basic.js
@@ -0,0 +1,50 @@
+var test = require('tape')
+var toBuffer = require('../')
+
+test('convert to buffer from Uint8Array', function (t) {
+ if (typeof Uint8Array !== 'undefined') {
+ var arr = new Uint8Array([1, 2, 3])
+ arr = toBuffer(arr)
+
+ t.deepEqual(arr, Buffer.from([1, 2, 3]), 'contents equal')
+ t.ok(Buffer.isBuffer(arr), 'is buffer')
+ t.equal(arr.readUInt8(0), 1)
+ t.equal(arr.readUInt8(1), 2)
+ t.equal(arr.readUInt8(2), 3)
+ } else {
+ t.pass('browser lacks Uint8Array support, skip test')
+ }
+ t.end()
+})
+
+test('convert to buffer from another arrayview type (Uint32Array)', function (t) {
+ if (typeof Uint32Array !== 'undefined' && Buffer.TYPED_ARRAY_SUPPORT !== false) {
+ var arr = new Uint32Array([1, 2, 3])
+ arr = toBuffer(arr)
+
+ t.deepEqual(arr, Buffer.from([1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0]), 'contents equal')
+ t.ok(Buffer.isBuffer(arr), 'is buffer')
+ t.equal(arr.readUInt32LE(0), 1)
+ t.equal(arr.readUInt32LE(4), 2)
+ t.equal(arr.readUInt32LE(8), 3)
+ t.equal(arr instanceof Uint8Array, true)
+ } else {
+ t.pass('browser lacks Uint32Array support, skip test')
+ }
+ t.end()
+})
+
+test('convert to buffer from ArrayBuffer', function (t) {
+ if (typeof Uint32Array !== 'undefined' && Buffer.TYPED_ARRAY_SUPPORT !== false) {
+ var arr = new Uint32Array([1, 2, 3]).subarray(1, 2)
+ arr = toBuffer(arr)
+
+ t.deepEqual(arr, Buffer.from([2, 0, 0, 0]), 'contents equal')
+ t.ok(Buffer.isBuffer(arr), 'is buffer')
+ t.equal(arr.readUInt32LE(0), 2)
+ t.equal(arr instanceof Uint8Array, true)
+ } else {
+ t.pass('browser lacks ArrayBuffer support, skip test')
+ }
+ t.end()
+})
diff --git a/node_modules/util-deprecate/History.md b/node_modules/util-deprecate/History.md
new file mode 100644
index 0000000..acc8675
--- /dev/null
+++ b/node_modules/util-deprecate/History.md
@@ -0,0 +1,16 @@
+
+1.0.2 / 2015-10-07
+==================
+
+ * use try/catch when checking `localStorage` (#3, @kumavis)
+
+1.0.1 / 2014-11-25
+==================
+
+ * browser: use `console.warn()` for deprecation calls
+ * browser: more jsdocs
+
+1.0.0 / 2014-04-30
+==================
+
+ * initial commit
diff --git a/node_modules/util-deprecate/LICENSE b/node_modules/util-deprecate/LICENSE
new file mode 100644
index 0000000..6a60e8c
--- /dev/null
+++ b/node_modules/util-deprecate/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+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:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/util-deprecate/README.md b/node_modules/util-deprecate/README.md
new file mode 100644
index 0000000..75622fa
--- /dev/null
+++ b/node_modules/util-deprecate/README.md
@@ -0,0 +1,53 @@
+util-deprecate
+==============
+### The Node.js `util.deprecate()` function with browser support
+
+In Node.js, this module simply re-exports the `util.deprecate()` function.
+
+In the web browser (i.e. via browserify), a browser-specific implementation
+of the `util.deprecate()` function is used.
+
+
+## API
+
+A `deprecate()` function is the only thing exposed by this module.
+
+``` javascript
+// setup:
+exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');
+
+
+// users see:
+foo();
+// foo() is deprecated, use bar() instead
+foo();
+foo();
+```
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+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:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/util-deprecate/browser.js b/node_modules/util-deprecate/browser.js
new file mode 100644
index 0000000..549ae2f
--- /dev/null
+++ b/node_modules/util-deprecate/browser.js
@@ -0,0 +1,67 @@
+
+/**
+ * Module exports.
+ */
+
+module.exports = deprecate;
+
+/**
+ * Mark that a method should not be used.
+ * Returns a modified function which warns once by default.
+ *
+ * If `localStorage.noDeprecation = true` is set, then it is a no-op.
+ *
+ * If `localStorage.throwDeprecation = true` is set, then deprecated functions
+ * will throw an Error when invoked.
+ *
+ * If `localStorage.traceDeprecation = true` is set, then deprecated functions
+ * will invoke `console.trace()` instead of `console.error()`.
+ *
+ * @param {Function} fn - the function to deprecate
+ * @param {String} msg - the string to print to the console when `fn` is invoked
+ * @returns {Function} a new "deprecated" version of `fn`
+ * @api public
+ */
+
+function deprecate (fn, msg) {
+ if (config('noDeprecation')) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (config('throwDeprecation')) {
+ throw new Error(msg);
+ } else if (config('traceDeprecation')) {
+ console.trace(msg);
+ } else {
+ console.warn(msg);
+ }
+ warned = true;
+ }
+ return fn.apply(this, arguments);
+ }
+
+ return deprecated;
+}
+
+/**
+ * Checks `localStorage` for boolean values for the given `name`.
+ *
+ * @param {String} name
+ * @returns {Boolean}
+ * @api private
+ */
+
+function config (name) {
+ // accessing global.localStorage can trigger a DOMException in sandboxed iframes
+ try {
+ if (!global.localStorage) return false;
+ } catch (_) {
+ return false;
+ }
+ var val = global.localStorage[name];
+ if (null == val) return false;
+ return String(val).toLowerCase() === 'true';
+}
diff --git a/node_modules/util-deprecate/node.js b/node_modules/util-deprecate/node.js
new file mode 100644
index 0000000..5e6fcff
--- /dev/null
+++ b/node_modules/util-deprecate/node.js
@@ -0,0 +1,6 @@
+
+/**
+ * For Node.js, simply re-export the core `util.deprecate` function.
+ */
+
+module.exports = require('util').deprecate;
diff --git a/node_modules/util-deprecate/package.json b/node_modules/util-deprecate/package.json
new file mode 100644
index 0000000..a18ccfb
--- /dev/null
+++ b/node_modules/util-deprecate/package.json
@@ -0,0 +1,59 @@
+{
+ "_args": [
+ [
+ "util-deprecate@1.0.2",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "util-deprecate@1.0.2",
+ "_id": "util-deprecate@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+ "_location": "/util-deprecate",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "util-deprecate@1.0.2",
+ "name": "util-deprecate",
+ "escapedName": "util-deprecate",
+ "rawSpec": "1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "1.0.2"
+ },
+ "_requiredBy": [
+ "/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "_spec": "1.0.2",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "browser": "browser.js",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/util-deprecate/issues"
+ },
+ "description": "The Node.js `util.deprecate()` function with browser support",
+ "homepage": "https://github.com/TooTallNate/util-deprecate",
+ "keywords": [
+ "util",
+ "deprecate",
+ "browserify",
+ "browser",
+ "node"
+ ],
+ "license": "MIT",
+ "main": "node.js",
+ "name": "util-deprecate",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/util-deprecate.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "1.0.2"
+}
diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md
new file mode 100644
index 0000000..bcefac2
--- /dev/null
+++ b/node_modules/uuid/CHANGELOG.md
@@ -0,0 +1,223 @@
+# Changelog
+
+All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04)
+
+### Bug Fixes
+
+- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375)
+
+## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27)
+
+### Features
+
+- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180)
+
+## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23)
+
+### Features
+
+- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5))
+- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437)
+- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659))
+
+### Bug Fixes
+
+- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8))
+
+## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20)
+
+### Features
+
+- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d))
+- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2))
+
+### Bug Fixes
+
+- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444)
+
+## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29)
+
+### ⚠ BREAKING CHANGES
+
+- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export.
+
+ ```diff
+ -import uuid from 'uuid';
+ -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869'
+ +import { v4 as uuidv4 } from 'uuid';
+ +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
+ ```
+
+- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported.
+
+ Instead use the named exports that this module exports.
+
+ For ECMAScript Modules (ESM):
+
+ ```diff
+ -import uuidv4 from 'uuid/v4';
+ +import { v4 as uuidv4 } from 'uuid';
+ uuidv4();
+ ```
+
+ For CommonJS:
+
+ ```diff
+ -const uuidv4 = require('uuid/v4');
+ +const { v4: uuidv4 } = require('uuid');
+ uuidv4();
+ ```
+
+### Features
+
+- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342)
+- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba))
+
+### Bug Fixes
+
+- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0))
+
+### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31)
+
+### Bug Fixes
+
+- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408)
+
+### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04)
+
+### Bug Fixes
+
+- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c))
+- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7))
+- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4))
+
+### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25)
+
+### Bug Fixes
+
+- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc))
+- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378)
+
+## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24)
+
+### ⚠ BREAKING CHANGES
+
+- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed.
+- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants.
+- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function.
+- Remove support for generating v3 and v5 UUIDs in Node.js<4.x
+- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers.
+
+### Features
+
+- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345)
+- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555))
+- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b))
+- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0))
+- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173)
+- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627))
+- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338)
+
+### Bug Fixes
+
+- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48))
+- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370)
+- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23))
+
+## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16)
+
+### Features
+
+- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338)
+
+## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19)
+
+### Bug Fixes
+
+- no longer run ci tests on node v4
+- upgrade dependencies
+
+## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
+
+### Bug Fixes
+
+- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877))
+
+## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28)
+
+### Bug Fixes
+
+- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2))
+
+# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22)
+
+### Bug Fixes
+
+- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc))
+- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4))
+- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331))
+- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c))
+
+### Features
+
+- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182))
+
+## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16)
+
+### Bug Fixes
+
+- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
+
+# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
+
+### Bug Fixes
+
+- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824))
+- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
+
+### Features
+
+- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726))
+
+# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
+
+### Bug Fixes
+
+- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183)
+- Fix typo (#178)
+- Simple typo fix (#165)
+
+### Features
+
+- v5 support in CLI (#197)
+- V5 support (#188)
+
+# 3.0.1 (2016-11-28)
+
+- split uuid versions into separate files
+
+# 3.0.0 (2016-11-17)
+
+- remove .parse and .unparse
+
+# 2.0.0
+
+- Removed uuid.BufferClass
+
+# 1.4.0
+
+- Improved module context detection
+- Removed public RNG functions
+
+# 1.3.2
+
+- Improve tests and handling of v1() options (Issue #24)
+- Expose RNG option to allow for perf testing with different generators
+
+# 1.3.0
+
+- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
+- Support for node.js crypto API
+- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
diff --git a/node_modules/uuid/CONTRIBUTING.md b/node_modules/uuid/CONTRIBUTING.md
new file mode 100644
index 0000000..4a4503d
--- /dev/null
+++ b/node_modules/uuid/CONTRIBUTING.md
@@ -0,0 +1,18 @@
+# Contributing
+
+Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library!
+
+## Testing
+
+```shell
+npm test
+```
+
+## Releasing
+
+Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version):
+
+```shell
+npm run release -- --dry-run # verify output manually
+npm run release # follow the instructions from the output of this command
+```
diff --git a/node_modules/uuid/LICENSE.md b/node_modules/uuid/LICENSE.md
new file mode 100644
index 0000000..3934168
--- /dev/null
+++ b/node_modules/uuid/LICENSE.md
@@ -0,0 +1,9 @@
+The MIT License (MIT)
+
+Copyright (c) 2010-2020 Robert Kieffer and other contributors
+
+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:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+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.
diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md
new file mode 100644
index 0000000..6cea039
--- /dev/null
+++ b/node_modules/uuid/README.md
@@ -0,0 +1,488 @@
+<!--
+ -- This file is auto-generated from README_js.md. Changes should be made there.
+ -->
+
+# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)
+
+For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs
+
+- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs
+- **Cross-platform** - Support for ...
+ - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
+ - Node 8, 10, 12, 14
+ - Chrome, Safari, Firefox, Edge, IE 11 browsers
+ - Webpack and rollup.js module bundlers
+ - [React Native / Expo](#react-native-expo)
+- **Secure** - Cryptographically-strong random values
+- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
+- **CLI** - Includes the [`uuid` command line](#command-line) utility
+
+**Upgrading from `uuid@3.x`?** Your code is probably okay, but check out [Upgrading From `uuid@3.x`](#upgrading-from-uuid3x) for details.
+
+## Quickstart
+
+To create a random UUID...
+
+**1. Install**
+
+```shell
+npm install uuid
+```
+
+**2. Create a UUID** (ES6 module syntax)
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
+```
+
+... or using CommonJS syntax:
+
+```javascript
+const { v4: uuidv4 } = require('uuid');
+uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
+```
+
+For timestamp UUIDs, namespace UUIDs, and other options read on ...
+
+## API Summary
+
+| | | |
+| --- | --- | --- |
+| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` |
+| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` |
+| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` |
+| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | |
+| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | |
+| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | |
+| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | |
+| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` |
+| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` |
+
+## API
+
+### uuid.NIL
+
+The nil UUID string (all zeros).
+
+Example:
+
+```javascript
+import { NIL as NIL_UUID } from 'uuid';
+
+NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000'
+```
+
+### uuid.parse(str)
+
+Convert UUID string to array of bytes
+
+| | |
+| --------- | ---------------------------------------- |
+| `str` | A valid UUID `String` |
+| _returns_ | `Uint8Array[16]` |
+| _throws_ | `TypeError` if `str` is not a valid UUID |
+
+Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left &Rarr; right order of hex-pairs in UUID strings. As shown in the example below.
+
+Example:
+
+```javascript
+import { parse as uuidParse } from 'uuid';
+
+// Parse a UUID
+const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b');
+
+// Convert to hex strings to show byte order (for documentation purposes)
+[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨
+ // [
+ // '6e', 'c0', 'bd', '7f',
+ // '11', 'c0', '43', 'da',
+ // '97', '5e', '2a', '8a',
+ // 'd9', 'eb', 'ae', '0b'
+ // ]
+```
+
+### uuid.stringify(arr[, offset])
+
+Convert array of bytes to UUID string
+
+| | |
+| -------------- | ---------------------------------------------------------------------------- |
+| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. |
+| [`offset` = 0] | `Number` Starting index in the Array |
+| _returns_ | `String` |
+| _throws_ | `TypeError` if a valid UUID string cannot be generated |
+
+Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left &Rarr; right order of hex-pairs in UUID strings. As shown in the example below.
+
+Example:
+
+```javascript
+import { stringify as uuidStringify } from 'uuid';
+
+const uuidBytes = [
+ 0x6e,
+ 0xc0,
+ 0xbd,
+ 0x7f,
+ 0x11,
+ 0xc0,
+ 0x43,
+ 0xda,
+ 0x97,
+ 0x5e,
+ 0x2a,
+ 0x8a,
+ 0xd9,
+ 0xeb,
+ 0xae,
+ 0x0b,
+];
+
+uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'
+```
+
+### uuid.v1([options[, buffer[, offset]]])
+
+Create an RFC version 1 (timestamp) UUID
+
+| | |
+| --- | --- |
+| [`options`] | `Object` with one or more of the following properties: |
+| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) |
+| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff |
+| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) |
+| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanseconds to add to `msecs`, should be 0-10,000) |
+| [`options.random`] | `Array` of 16 random bytes (0-255) |
+| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |
+| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
+| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
+| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
+| _throws_ | `Error` if more than 10M UUIDs/sec are requested |
+
+Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
+
+Note: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields.
+
+Example:
+
+```javascript
+import { v1 as uuidv1 } from 'uuid';
+
+uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d'
+```
+
+Example using `options`:
+
+```javascript
+import { v1 as uuidv1 } from 'uuid';
+
+const v1options = {
+ node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
+ clockseq: 0x1234,
+ msecs: new Date('2011-11-01').getTime(),
+ nsecs: 5678,
+};
+uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab'
+```
+
+### uuid.v3(name, namespace[, buffer[, offset]])
+
+Create an RFC version 3 (namespace w/ MD5) UUID
+
+API is identical to `v5()`, but uses "v3" instead.
+
+&#x26a0;&#xfe0f; Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_."
+
+### uuid.v4([options[, buffer[, offset]]])
+
+Create an RFC version 4 (random) UUID
+
+| | |
+| --- | --- |
+| [`options`] | `Object` with one or more of the following properties: |
+| [`options.random`] | `Array` of 16 random bytes (0-255) |
+| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |
+| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
+| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
+| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
+
+Example:
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+
+uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
+```
+
+Example using predefined `random` values:
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+
+const v4options = {
+ random: [
+ 0x10,
+ 0x91,
+ 0x56,
+ 0xbe,
+ 0xc4,
+ 0xfb,
+ 0xc1,
+ 0xea,
+ 0x71,
+ 0xb4,
+ 0xef,
+ 0xe1,
+ 0x67,
+ 0x1c,
+ 0x58,
+ 0x36,
+ ],
+};
+uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836'
+```
+
+### uuid.v5(name, namespace[, buffer[, offset]])
+
+Createa an RFC version 5 (namespace w/ SHA-1) UUID
+
+| | |
+| --- | --- |
+| `name` | `String \| Array` |
+| `namespace` | `String \| Array[16]` Namespace UUID |
+| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
+| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
+| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
+
+Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`.
+
+Example with custom namespace:
+
+```javascript
+import { v5 as uuidv5 } from 'uuid';
+
+// Define a custom namespace. Readers, create your own using something like
+// https://www.uuidgenerator.net/
+const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';
+
+uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681'
+```
+
+Example with RFC `URL` namespace:
+
+```javascript
+import { v5 as uuidv5 } from 'uuid';
+
+uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1'
+```
+
+### uuid.validate(str)
+
+Test a string to see if it is a valid UUID
+
+| | |
+| --------- | --------------------------------------------------- |
+| `str` | `String` to validate |
+| _returns_ | `true` if string is a valid UUID, `false` otherwise |
+
+Example:
+
+```javascript
+import { validate as uuidValidate } from 'uuid';
+
+uuidValidate('not a UUID'); // ⇨ false
+uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true
+```
+
+### uuid.version(str)
+
+Detect RFC version of a UUID
+
+| | |
+| --------- | ---------------------------------------- |
+| `str` | A valid UUID `String` |
+| _returns_ | `Number` The RFC version of the UUID |
+| _throws_ | `TypeError` if `str` is not a valid UUID |
+
+Example:
+
+```javascript
+import { version as uuidVersion } from 'uuid';
+
+uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1
+uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4
+```
+
+## Command Line
+
+UUIDs can be generated from the command line using `uuid`.
+
+```shell
+$ uuid
+ddeb27fb-d9a0-4624-be4d-4615062daed4
+```
+
+The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details:
+
+```shell
+$ uuid --help
+
+Usage:
+ uuid
+ uuid v1
+ uuid v3 <name> <namespace uuid>
+ uuid v4
+ uuid v5 <name> <namespace uuid>
+ uuid --help
+
+Note: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs
+defined by RFC4122
+```
+
+## ECMAScript Modules
+
+This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments).
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
+```
+
+To run the examples you must first create a dist build of this library in the module root:
+
+```shell
+npm run build
+```
+
+## CDN Builds
+
+### ECMAScript Modules
+
+To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/):
+
+```html
+<script type="module">
+ import { v4 as uuidv4 } from 'https://jspm.dev/uuid';
+ console.log(uuidv4()); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
+</script>
+```
+
+### UMD
+
+To load this module directly into older browsers you can use the [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds from any of the following CDNs:
+
+**Using [UNPKG](https://unpkg.com/uuid@latest/dist/umd/)**:
+
+```html
+<script src="https://unpkg.com/uuid@latest/dist/umd/uuidv4.min.js"></script>
+```
+
+**Using [jsDelivr](https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/)**:
+
+```html
+<script src="https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/uuidv4.min.js"></script>
+```
+
+**Using [cdnjs](https://cdnjs.com/libraries/uuid)**:
+
+```html
+<script src="https://cdnjs.cloudflare.com/ajax/libs/uuid/8.1.0/uuidv4.min.js"></script>
+```
+
+These CDNs all provide the same [`uuidv4()`](#uuidv4options-buffer-offset) method:
+
+```html
+<script>
+ uuidv4(); // ⇨ '55af1e37-0734-46d8-b070-a1e42e4fc392'
+</script>
+```
+
+Methods for the other algorithms ([`uuidv1()`](#uuidv1options-buffer-offset), [`uuidv3()`](#uuidv3name-namespace-buffer-offset) and [`uuidv5()`](#uuidv5name-namespace-buffer-offset)) are available from the files `uuidv1.min.js`, `uuidv3.min.js` and `uuidv5.min.js` respectively.
+
+## "getRandomValues() not supported"
+
+This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill:
+
+### React Native / Expo
+
+1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
+1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point:
+
+```javascript
+import 'react-native-get-random-values';
+import { v4 as uuidv4 } from 'uuid';
+```
+
+Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`.
+
+### Web Workers / Service Workers (Edge <= 18)
+
+[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please).
+
+## Upgrading From `uuid@7.x`
+
+### Only Named Exports Supported When Using with Node.js ESM
+
+`uuid@7.x` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports.
+
+Instead of doing:
+
+```javascript
+import uuid from 'uuid';
+uuid.v4();
+```
+
+you will now have to use the named exports:
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+uuidv4();
+```
+
+### Deep Requires No Longer Supported
+
+Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7.x`](#deep-requires-now-deprecated) are no longer supported.
+
+## Upgrading From `uuid@3.x`
+
+"_Wait... what happened to `uuid@4.x` - `uuid@6.x`?!?_"
+
+In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped.
+
+### Deep Requires Now Deprecated
+
+`uuid@3.x` encouraged the use of deep requires to minimize the bundle size of browser builds:
+
+```javascript
+const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED!
+uuidv4();
+```
+
+As of `uuid@7.x` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax:
+
+```javascript
+import { v4 as uuidv4 } from 'uuid';
+uuidv4();
+```
+
+... or for CommonJS:
+
+```javascript
+const { v4: uuidv4 } = require('uuid');
+uuidv4();
+```
+
+### Default Export Removed
+
+`uuid@3.x` was exporting the Version 4 UUID method as a default export:
+
+```javascript
+const uuid = require('uuid'); // <== REMOVED!
+```
+
+This usage pattern was already discouraged in `uuid@3.x` and has been removed in `uuid@7.x`.
+
+----
+Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file
diff --git a/node_modules/uuid/dist/bin/uuid b/node_modules/uuid/dist/bin/uuid
new file mode 100644
index 0000000..f38d2ee
--- /dev/null
+++ b/node_modules/uuid/dist/bin/uuid
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+require('../uuid-bin');
diff --git a/node_modules/uuid/dist/esm-browser/index.js b/node_modules/uuid/dist/esm-browser/index.js
new file mode 100644
index 0000000..1db6f6d
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/index.js
@@ -0,0 +1,9 @@
+export { default as v1 } from './v1.js';
+export { default as v3 } from './v3.js';
+export { default as v4 } from './v4.js';
+export { default as v5 } from './v5.js';
+export { default as NIL } from './nil.js';
+export { default as version } from './version.js';
+export { default as validate } from './validate.js';
+export { default as stringify } from './stringify.js';
+export { default as parse } from './parse.js'; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/md5.js b/node_modules/uuid/dist/esm-browser/md5.js
new file mode 100644
index 0000000..8b5d46a
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/md5.js
@@ -0,0 +1,215 @@
+/*
+ * Browser-compatible JavaScript MD5
+ *
+ * Modification of JavaScript MD5
+ * https://github.com/blueimp/JavaScript-MD5
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * https://opensource.org/licenses/MIT
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+function md5(bytes) {
+ if (typeof bytes === 'string') {
+ var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = new Uint8Array(msg.length);
+
+ for (var i = 0; i < msg.length; ++i) {
+ bytes[i] = msg.charCodeAt(i);
+ }
+ }
+
+ return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
+}
+/*
+ * Convert an array of little-endian words to an array of bytes
+ */
+
+
+function md5ToHexEncodedArray(input) {
+ var output = [];
+ var length32 = input.length * 32;
+ var hexTab = '0123456789abcdef';
+
+ for (var i = 0; i < length32; i += 8) {
+ var x = input[i >> 5] >>> i % 32 & 0xff;
+ var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
+ output.push(hex);
+ }
+
+ return output;
+}
+/**
+ * Calculate output length with padding and bit length
+ */
+
+
+function getOutputLength(inputLength8) {
+ return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
+}
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length.
+ */
+
+
+function wordsToMd5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << len % 32;
+ x[getOutputLength(len) - 1] = len;
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+
+ for (var i = 0; i < x.length; i += 16) {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
+ a = safeAdd(a, olda);
+ b = safeAdd(b, oldb);
+ c = safeAdd(c, oldc);
+ d = safeAdd(d, oldd);
+ }
+
+ return [a, b, c, d];
+}
+/*
+ * Convert an array bytes to an array of little-endian words
+ * Characters >255 have their high-byte silently ignored.
+ */
+
+
+function bytesToWords(input) {
+ if (input.length === 0) {
+ return [];
+ }
+
+ var length8 = input.length * 8;
+ var output = new Uint32Array(getOutputLength(length8));
+
+ for (var i = 0; i < length8; i += 8) {
+ output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
+ }
+
+ return output;
+}
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+
+
+function safeAdd(x, y) {
+ var lsw = (x & 0xffff) + (y & 0xffff);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return msw << 16 | lsw & 0xffff;
+}
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+
+
+function bitRotateLeft(num, cnt) {
+ return num << cnt | num >>> 32 - cnt;
+}
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+
+
+function md5cmn(q, a, b, x, s, t) {
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
+}
+
+function md5ff(a, b, c, d, x, s, t) {
+ return md5cmn(b & c | ~b & d, a, b, x, s, t);
+}
+
+function md5gg(a, b, c, d, x, s, t) {
+ return md5cmn(b & d | c & ~d, a, b, x, s, t);
+}
+
+function md5hh(a, b, c, d, x, s, t) {
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
+}
+
+function md5ii(a, b, c, d, x, s, t) {
+ return md5cmn(c ^ (b | ~d), a, b, x, s, t);
+}
+
+export default md5; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/nil.js b/node_modules/uuid/dist/esm-browser/nil.js
new file mode 100644
index 0000000..b36324c
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/nil.js
@@ -0,0 +1 @@
+export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/parse.js b/node_modules/uuid/dist/esm-browser/parse.js
new file mode 100644
index 0000000..7c5b1d5
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/parse.js
@@ -0,0 +1,35 @@
+import validate from './validate.js';
+
+function parse(uuid) {
+ if (!validate(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+
+ var v;
+ var arr = new Uint8Array(16); // Parse ########-....-....-....-............
+
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
+ arr[1] = v >>> 16 & 0xff;
+ arr[2] = v >>> 8 & 0xff;
+ arr[3] = v & 0xff; // Parse ........-####-....-....-............
+
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
+ arr[5] = v & 0xff; // Parse ........-....-####-....-............
+
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
+ arr[7] = v & 0xff; // Parse ........-....-....-####-............
+
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
+ arr[9] = v & 0xff; // Parse ........-....-....-....-############
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
+
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
+ arr[11] = v / 0x100000000 & 0xff;
+ arr[12] = v >>> 24 & 0xff;
+ arr[13] = v >>> 16 & 0xff;
+ arr[14] = v >>> 8 & 0xff;
+ arr[15] = v & 0xff;
+ return arr;
+}
+
+export default parse; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/regex.js b/node_modules/uuid/dist/esm-browser/regex.js
new file mode 100644
index 0000000..3da8673
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/regex.js
@@ -0,0 +1 @@
+export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/rng.js b/node_modules/uuid/dist/esm-browser/rng.js
new file mode 100644
index 0000000..a12aefa
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/rng.js
@@ -0,0 +1,14 @@
+// Unique ID creation requires a high quality random # generator. In the browser we therefore
+// require the crypto API and do not support built-in fallback to lower quality random number
+// generators (like Math.random()).
+// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
+// find the complete implementation of crypto (msCrypto) on IE11.
+var getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
+var rnds8 = new Uint8Array(16);
+export default function rng() {
+ if (!getRandomValues) {
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
+ }
+
+ return getRandomValues(rnds8);
+} \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/sha1.js b/node_modules/uuid/dist/esm-browser/sha1.js
new file mode 100644
index 0000000..940548b
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/sha1.js
@@ -0,0 +1,96 @@
+// Adapted from Chris Veness' SHA1 code at
+// http://www.movable-type.co.uk/scripts/sha1.html
+function f(s, x, y, z) {
+ switch (s) {
+ case 0:
+ return x & y ^ ~x & z;
+
+ case 1:
+ return x ^ y ^ z;
+
+ case 2:
+ return x & y ^ x & z ^ y & z;
+
+ case 3:
+ return x ^ y ^ z;
+ }
+}
+
+function ROTL(x, n) {
+ return x << n | x >>> 32 - n;
+}
+
+function sha1(bytes) {
+ var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
+ var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
+
+ if (typeof bytes === 'string') {
+ var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = [];
+
+ for (var i = 0; i < msg.length; ++i) {
+ bytes.push(msg.charCodeAt(i));
+ }
+ } else if (!Array.isArray(bytes)) {
+ // Convert Array-like to Array
+ bytes = Array.prototype.slice.call(bytes);
+ }
+
+ bytes.push(0x80);
+ var l = bytes.length / 4 + 2;
+ var N = Math.ceil(l / 16);
+ var M = new Array(N);
+
+ for (var _i = 0; _i < N; ++_i) {
+ var arr = new Uint32Array(16);
+
+ for (var j = 0; j < 16; ++j) {
+ arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];
+ }
+
+ M[_i] = arr;
+ }
+
+ M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
+ M[N - 1][14] = Math.floor(M[N - 1][14]);
+ M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
+
+ for (var _i2 = 0; _i2 < N; ++_i2) {
+ var W = new Uint32Array(80);
+
+ for (var t = 0; t < 16; ++t) {
+ W[t] = M[_i2][t];
+ }
+
+ for (var _t = 16; _t < 80; ++_t) {
+ W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);
+ }
+
+ var a = H[0];
+ var b = H[1];
+ var c = H[2];
+ var d = H[3];
+ var e = H[4];
+
+ for (var _t2 = 0; _t2 < 80; ++_t2) {
+ var s = Math.floor(_t2 / 20);
+ var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;
+ e = d;
+ d = c;
+ c = ROTL(b, 30) >>> 0;
+ b = a;
+ a = T;
+ }
+
+ H[0] = H[0] + a >>> 0;
+ H[1] = H[1] + b >>> 0;
+ H[2] = H[2] + c >>> 0;
+ H[3] = H[3] + d >>> 0;
+ H[4] = H[4] + e >>> 0;
+ }
+
+ return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
+}
+
+export default sha1; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/stringify.js b/node_modules/uuid/dist/esm-browser/stringify.js
new file mode 100644
index 0000000..3102111
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/stringify.js
@@ -0,0 +1,30 @@
+import validate from './validate.js';
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+
+var byteToHex = [];
+
+for (var i = 0; i < 256; ++i) {
+ byteToHex.push((i + 0x100).toString(16).substr(1));
+}
+
+function stringify(arr) {
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
+ // Note: Be careful editing this code! It's been tuned for performance
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
+ var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
+ // of the following:
+ // - One or more input array values don't map to a hex octet (leading to
+ // "undefined" in the uuid)
+ // - Invalid input values for the RFC `version` or `variant` fields
+
+ if (!validate(uuid)) {
+ throw TypeError('Stringified UUID is invalid');
+ }
+
+ return uuid;
+}
+
+export default stringify; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/v1.js b/node_modules/uuid/dist/esm-browser/v1.js
new file mode 100644
index 0000000..1a22591
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/v1.js
@@ -0,0 +1,95 @@
+import rng from './rng.js';
+import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+var _nodeId;
+
+var _clockseq; // Previous uuid creation time
+
+
+var _lastMSecs = 0;
+var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
+
+function v1(options, buf, offset) {
+ var i = buf && offset || 0;
+ var b = buf || new Array(16);
+ options = options || {};
+ var node = options.node || _nodeId;
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
+ // specified. We do this lazily to minimize issues related to insufficient
+ // system entropy. See #189
+
+ if (node == null || clockseq == null) {
+ var seedBytes = options.random || (options.rng || rng)();
+
+ if (node == null) {
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
+ node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
+ }
+
+ if (clockseq == null) {
+ // Per 4.2.2, randomize (14 bit) clockseq
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+ }
+ } // UUID timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+
+
+ var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
+
+ var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
+
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+
+
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ } // Per 4.2.1.2 Throw error if too many uuids are requested
+
+
+ if (nsecs >= 10000) {
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
+ }
+
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+
+ msecs += 12219292800000; // `time_low`
+
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff; // `time_mid`
+
+ var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff; // `time_high_and_version`
+
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+
+ b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+
+ b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
+
+ b[i++] = clockseq & 0xff; // `node`
+
+ for (var n = 0; n < 6; ++n) {
+ b[i + n] = node[n];
+ }
+
+ return buf || stringify(b);
+}
+
+export default v1; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/v3.js b/node_modules/uuid/dist/esm-browser/v3.js
new file mode 100644
index 0000000..c9ab9a4
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/v3.js
@@ -0,0 +1,4 @@
+import v35 from './v35.js';
+import md5 from './md5.js';
+var v3 = v35('v3', 0x30, md5);
+export default v3; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/v35.js b/node_modules/uuid/dist/esm-browser/v35.js
new file mode 100644
index 0000000..31dd8a1
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/v35.js
@@ -0,0 +1,64 @@
+import stringify from './stringify.js';
+import parse from './parse.js';
+
+function stringToBytes(str) {
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
+
+ var bytes = [];
+
+ for (var i = 0; i < str.length; ++i) {
+ bytes.push(str.charCodeAt(i));
+ }
+
+ return bytes;
+}
+
+export var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
+export var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
+export default function (name, version, hashfunc) {
+ function generateUUID(value, namespace, buf, offset) {
+ if (typeof value === 'string') {
+ value = stringToBytes(value);
+ }
+
+ if (typeof namespace === 'string') {
+ namespace = parse(namespace);
+ }
+
+ if (namespace.length !== 16) {
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
+ } // Compute hash of namespace and value, Per 4.3
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
+ // hashfunc([...namespace, ... value])`
+
+
+ var bytes = new Uint8Array(16 + value.length);
+ bytes.set(namespace);
+ bytes.set(value, namespace.length);
+ bytes = hashfunc(bytes);
+ bytes[6] = bytes[6] & 0x0f | version;
+ bytes[8] = bytes[8] & 0x3f | 0x80;
+
+ if (buf) {
+ offset = offset || 0;
+
+ for (var i = 0; i < 16; ++i) {
+ buf[offset + i] = bytes[i];
+ }
+
+ return buf;
+ }
+
+ return stringify(bytes);
+ } // Function#name is not settable on some platforms (#270)
+
+
+ try {
+ generateUUID.name = name; // eslint-disable-next-line no-empty
+ } catch (err) {} // For CommonJS default export support
+
+
+ generateUUID.DNS = DNS;
+ generateUUID.URL = URL;
+ return generateUUID;
+} \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/v4.js b/node_modules/uuid/dist/esm-browser/v4.js
new file mode 100644
index 0000000..404810a
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/v4.js
@@ -0,0 +1,24 @@
+import rng from './rng.js';
+import stringify from './stringify.js';
+
+function v4(options, buf, offset) {
+ options = options || {};
+ var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+
+ rnds[6] = rnds[6] & 0x0f | 0x40;
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
+
+ if (buf) {
+ offset = offset || 0;
+
+ for (var i = 0; i < 16; ++i) {
+ buf[offset + i] = rnds[i];
+ }
+
+ return buf;
+ }
+
+ return stringify(rnds);
+}
+
+export default v4; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/v5.js b/node_modules/uuid/dist/esm-browser/v5.js
new file mode 100644
index 0000000..c08d96b
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/v5.js
@@ -0,0 +1,4 @@
+import v35 from './v35.js';
+import sha1 from './sha1.js';
+var v5 = v35('v5', 0x50, sha1);
+export default v5; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/validate.js b/node_modules/uuid/dist/esm-browser/validate.js
new file mode 100644
index 0000000..f1cdc7a
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/validate.js
@@ -0,0 +1,7 @@
+import REGEX from './regex.js';
+
+function validate(uuid) {
+ return typeof uuid === 'string' && REGEX.test(uuid);
+}
+
+export default validate; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-browser/version.js b/node_modules/uuid/dist/esm-browser/version.js
new file mode 100644
index 0000000..77530e9
--- /dev/null
+++ b/node_modules/uuid/dist/esm-browser/version.js
@@ -0,0 +1,11 @@
+import validate from './validate.js';
+
+function version(uuid) {
+ if (!validate(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+
+ return parseInt(uuid.substr(14, 1), 16);
+}
+
+export default version; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/index.js b/node_modules/uuid/dist/esm-node/index.js
new file mode 100644
index 0000000..1db6f6d
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/index.js
@@ -0,0 +1,9 @@
+export { default as v1 } from './v1.js';
+export { default as v3 } from './v3.js';
+export { default as v4 } from './v4.js';
+export { default as v5 } from './v5.js';
+export { default as NIL } from './nil.js';
+export { default as version } from './version.js';
+export { default as validate } from './validate.js';
+export { default as stringify } from './stringify.js';
+export { default as parse } from './parse.js'; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/md5.js b/node_modules/uuid/dist/esm-node/md5.js
new file mode 100644
index 0000000..4d68b04
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/md5.js
@@ -0,0 +1,13 @@
+import crypto from 'crypto';
+
+function md5(bytes) {
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+
+ return crypto.createHash('md5').update(bytes).digest();
+}
+
+export default md5; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/nil.js b/node_modules/uuid/dist/esm-node/nil.js
new file mode 100644
index 0000000..b36324c
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/nil.js
@@ -0,0 +1 @@
+export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/parse.js b/node_modules/uuid/dist/esm-node/parse.js
new file mode 100644
index 0000000..6421c5d
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/parse.js
@@ -0,0 +1,35 @@
+import validate from './validate.js';
+
+function parse(uuid) {
+ if (!validate(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+
+ let v;
+ const arr = new Uint8Array(16); // Parse ########-....-....-....-............
+
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
+ arr[1] = v >>> 16 & 0xff;
+ arr[2] = v >>> 8 & 0xff;
+ arr[3] = v & 0xff; // Parse ........-####-....-....-............
+
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
+ arr[5] = v & 0xff; // Parse ........-....-####-....-............
+
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
+ arr[7] = v & 0xff; // Parse ........-....-....-####-............
+
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
+ arr[9] = v & 0xff; // Parse ........-....-....-....-############
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
+
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
+ arr[11] = v / 0x100000000 & 0xff;
+ arr[12] = v >>> 24 & 0xff;
+ arr[13] = v >>> 16 & 0xff;
+ arr[14] = v >>> 8 & 0xff;
+ arr[15] = v & 0xff;
+ return arr;
+}
+
+export default parse; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/regex.js b/node_modules/uuid/dist/esm-node/regex.js
new file mode 100644
index 0000000..3da8673
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/regex.js
@@ -0,0 +1 @@
+export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/rng.js b/node_modules/uuid/dist/esm-node/rng.js
new file mode 100644
index 0000000..8006244
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/rng.js
@@ -0,0 +1,12 @@
+import crypto from 'crypto';
+const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
+
+let poolPtr = rnds8Pool.length;
+export default function rng() {
+ if (poolPtr > rnds8Pool.length - 16) {
+ crypto.randomFillSync(rnds8Pool);
+ poolPtr = 0;
+ }
+
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
+} \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/sha1.js b/node_modules/uuid/dist/esm-node/sha1.js
new file mode 100644
index 0000000..e23850b
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/sha1.js
@@ -0,0 +1,13 @@
+import crypto from 'crypto';
+
+function sha1(bytes) {
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+
+ return crypto.createHash('sha1').update(bytes).digest();
+}
+
+export default sha1; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/stringify.js b/node_modules/uuid/dist/esm-node/stringify.js
new file mode 100644
index 0000000..f9bca12
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/stringify.js
@@ -0,0 +1,29 @@
+import validate from './validate.js';
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+
+const byteToHex = [];
+
+for (let i = 0; i < 256; ++i) {
+ byteToHex.push((i + 0x100).toString(16).substr(1));
+}
+
+function stringify(arr, offset = 0) {
+ // Note: Be careful editing this code! It's been tuned for performance
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
+ const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
+ // of the following:
+ // - One or more input array values don't map to a hex octet (leading to
+ // "undefined" in the uuid)
+ // - Invalid input values for the RFC `version` or `variant` fields
+
+ if (!validate(uuid)) {
+ throw TypeError('Stringified UUID is invalid');
+ }
+
+ return uuid;
+}
+
+export default stringify; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/v1.js b/node_modules/uuid/dist/esm-node/v1.js
new file mode 100644
index 0000000..ebf81ac
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/v1.js
@@ -0,0 +1,95 @@
+import rng from './rng.js';
+import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+let _nodeId;
+
+let _clockseq; // Previous uuid creation time
+
+
+let _lastMSecs = 0;
+let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
+
+function v1(options, buf, offset) {
+ let i = buf && offset || 0;
+ const b = buf || new Array(16);
+ options = options || {};
+ let node = options.node || _nodeId;
+ let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
+ // specified. We do this lazily to minimize issues related to insufficient
+ // system entropy. See #189
+
+ if (node == null || clockseq == null) {
+ const seedBytes = options.random || (options.rng || rng)();
+
+ if (node == null) {
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
+ node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
+ }
+
+ if (clockseq == null) {
+ // Per 4.2.2, randomize (14 bit) clockseq
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+ }
+ } // UUID timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+
+
+ let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+
+ let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
+
+ const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
+
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+
+
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ } // Per 4.2.1.2 Throw error if too many uuids are requested
+
+
+ if (nsecs >= 10000) {
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
+ }
+
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+
+ msecs += 12219292800000; // `time_low`
+
+ const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff; // `time_mid`
+
+ const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff; // `time_high_and_version`
+
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+
+ b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+
+ b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
+
+ b[i++] = clockseq & 0xff; // `node`
+
+ for (let n = 0; n < 6; ++n) {
+ b[i + n] = node[n];
+ }
+
+ return buf || stringify(b);
+}
+
+export default v1; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/v3.js b/node_modules/uuid/dist/esm-node/v3.js
new file mode 100644
index 0000000..09063b8
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/v3.js
@@ -0,0 +1,4 @@
+import v35 from './v35.js';
+import md5 from './md5.js';
+const v3 = v35('v3', 0x30, md5);
+export default v3; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/v35.js b/node_modules/uuid/dist/esm-node/v35.js
new file mode 100644
index 0000000..22f6a19
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/v35.js
@@ -0,0 +1,64 @@
+import stringify from './stringify.js';
+import parse from './parse.js';
+
+function stringToBytes(str) {
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
+
+ const bytes = [];
+
+ for (let i = 0; i < str.length; ++i) {
+ bytes.push(str.charCodeAt(i));
+ }
+
+ return bytes;
+}
+
+export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
+export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
+export default function (name, version, hashfunc) {
+ function generateUUID(value, namespace, buf, offset) {
+ if (typeof value === 'string') {
+ value = stringToBytes(value);
+ }
+
+ if (typeof namespace === 'string') {
+ namespace = parse(namespace);
+ }
+
+ if (namespace.length !== 16) {
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
+ } // Compute hash of namespace and value, Per 4.3
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
+ // hashfunc([...namespace, ... value])`
+
+
+ let bytes = new Uint8Array(16 + value.length);
+ bytes.set(namespace);
+ bytes.set(value, namespace.length);
+ bytes = hashfunc(bytes);
+ bytes[6] = bytes[6] & 0x0f | version;
+ bytes[8] = bytes[8] & 0x3f | 0x80;
+
+ if (buf) {
+ offset = offset || 0;
+
+ for (let i = 0; i < 16; ++i) {
+ buf[offset + i] = bytes[i];
+ }
+
+ return buf;
+ }
+
+ return stringify(bytes);
+ } // Function#name is not settable on some platforms (#270)
+
+
+ try {
+ generateUUID.name = name; // eslint-disable-next-line no-empty
+ } catch (err) {} // For CommonJS default export support
+
+
+ generateUUID.DNS = DNS;
+ generateUUID.URL = URL;
+ return generateUUID;
+} \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/v4.js b/node_modules/uuid/dist/esm-node/v4.js
new file mode 100644
index 0000000..efad926
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/v4.js
@@ -0,0 +1,24 @@
+import rng from './rng.js';
+import stringify from './stringify.js';
+
+function v4(options, buf, offset) {
+ options = options || {};
+ const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+
+ rnds[6] = rnds[6] & 0x0f | 0x40;
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
+
+ if (buf) {
+ offset = offset || 0;
+
+ for (let i = 0; i < 16; ++i) {
+ buf[offset + i] = rnds[i];
+ }
+
+ return buf;
+ }
+
+ return stringify(rnds);
+}
+
+export default v4; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/v5.js b/node_modules/uuid/dist/esm-node/v5.js
new file mode 100644
index 0000000..e87fe31
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/v5.js
@@ -0,0 +1,4 @@
+import v35 from './v35.js';
+import sha1 from './sha1.js';
+const v5 = v35('v5', 0x50, sha1);
+export default v5; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/validate.js b/node_modules/uuid/dist/esm-node/validate.js
new file mode 100644
index 0000000..f1cdc7a
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/validate.js
@@ -0,0 +1,7 @@
+import REGEX from './regex.js';
+
+function validate(uuid) {
+ return typeof uuid === 'string' && REGEX.test(uuid);
+}
+
+export default validate; \ No newline at end of file
diff --git a/node_modules/uuid/dist/esm-node/version.js b/node_modules/uuid/dist/esm-node/version.js
new file mode 100644
index 0000000..77530e9
--- /dev/null
+++ b/node_modules/uuid/dist/esm-node/version.js
@@ -0,0 +1,11 @@
+import validate from './validate.js';
+
+function version(uuid) {
+ if (!validate(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+
+ return parseInt(uuid.substr(14, 1), 16);
+}
+
+export default version; \ No newline at end of file
diff --git a/node_modules/uuid/dist/index.js b/node_modules/uuid/dist/index.js
new file mode 100644
index 0000000..bf13b10
--- /dev/null
+++ b/node_modules/uuid/dist/index.js
@@ -0,0 +1,79 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "v1", {
+ enumerable: true,
+ get: function () {
+ return _v.default;
+ }
+});
+Object.defineProperty(exports, "v3", {
+ enumerable: true,
+ get: function () {
+ return _v2.default;
+ }
+});
+Object.defineProperty(exports, "v4", {
+ enumerable: true,
+ get: function () {
+ return _v3.default;
+ }
+});
+Object.defineProperty(exports, "v5", {
+ enumerable: true,
+ get: function () {
+ return _v4.default;
+ }
+});
+Object.defineProperty(exports, "NIL", {
+ enumerable: true,
+ get: function () {
+ return _nil.default;
+ }
+});
+Object.defineProperty(exports, "version", {
+ enumerable: true,
+ get: function () {
+ return _version.default;
+ }
+});
+Object.defineProperty(exports, "validate", {
+ enumerable: true,
+ get: function () {
+ return _validate.default;
+ }
+});
+Object.defineProperty(exports, "stringify", {
+ enumerable: true,
+ get: function () {
+ return _stringify.default;
+ }
+});
+Object.defineProperty(exports, "parse", {
+ enumerable: true,
+ get: function () {
+ return _parse.default;
+ }
+});
+
+var _v = _interopRequireDefault(require("./v1.js"));
+
+var _v2 = _interopRequireDefault(require("./v3.js"));
+
+var _v3 = _interopRequireDefault(require("./v4.js"));
+
+var _v4 = _interopRequireDefault(require("./v5.js"));
+
+var _nil = _interopRequireDefault(require("./nil.js"));
+
+var _version = _interopRequireDefault(require("./version.js"));
+
+var _validate = _interopRequireDefault(require("./validate.js"));
+
+var _stringify = _interopRequireDefault(require("./stringify.js"));
+
+var _parse = _interopRequireDefault(require("./parse.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } \ No newline at end of file
diff --git a/node_modules/uuid/dist/md5-browser.js b/node_modules/uuid/dist/md5-browser.js
new file mode 100644
index 0000000..7a4582a
--- /dev/null
+++ b/node_modules/uuid/dist/md5-browser.js
@@ -0,0 +1,223 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+/*
+ * Browser-compatible JavaScript MD5
+ *
+ * Modification of JavaScript MD5
+ * https://github.com/blueimp/JavaScript-MD5
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * https://opensource.org/licenses/MIT
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+function md5(bytes) {
+ if (typeof bytes === 'string') {
+ const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = new Uint8Array(msg.length);
+
+ for (let i = 0; i < msg.length; ++i) {
+ bytes[i] = msg.charCodeAt(i);
+ }
+ }
+
+ return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
+}
+/*
+ * Convert an array of little-endian words to an array of bytes
+ */
+
+
+function md5ToHexEncodedArray(input) {
+ const output = [];
+ const length32 = input.length * 32;
+ const hexTab = '0123456789abcdef';
+
+ for (let i = 0; i < length32; i += 8) {
+ const x = input[i >> 5] >>> i % 32 & 0xff;
+ const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
+ output.push(hex);
+ }
+
+ return output;
+}
+/**
+ * Calculate output length with padding and bit length
+ */
+
+
+function getOutputLength(inputLength8) {
+ return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
+}
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length.
+ */
+
+
+function wordsToMd5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << len % 32;
+ x[getOutputLength(len) - 1] = len;
+ let a = 1732584193;
+ let b = -271733879;
+ let c = -1732584194;
+ let d = 271733878;
+
+ for (let i = 0; i < x.length; i += 16) {
+ const olda = a;
+ const oldb = b;
+ const oldc = c;
+ const oldd = d;
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
+ a = safeAdd(a, olda);
+ b = safeAdd(b, oldb);
+ c = safeAdd(c, oldc);
+ d = safeAdd(d, oldd);
+ }
+
+ return [a, b, c, d];
+}
+/*
+ * Convert an array bytes to an array of little-endian words
+ * Characters >255 have their high-byte silently ignored.
+ */
+
+
+function bytesToWords(input) {
+ if (input.length === 0) {
+ return [];
+ }
+
+ const length8 = input.length * 8;
+ const output = new Uint32Array(getOutputLength(length8));
+
+ for (let i = 0; i < length8; i += 8) {
+ output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
+ }
+
+ return output;
+}
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+
+
+function safeAdd(x, y) {
+ const lsw = (x & 0xffff) + (y & 0xffff);
+ const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return msw << 16 | lsw & 0xffff;
+}
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+
+
+function bitRotateLeft(num, cnt) {
+ return num << cnt | num >>> 32 - cnt;
+}
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+
+
+function md5cmn(q, a, b, x, s, t) {
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
+}
+
+function md5ff(a, b, c, d, x, s, t) {
+ return md5cmn(b & c | ~b & d, a, b, x, s, t);
+}
+
+function md5gg(a, b, c, d, x, s, t) {
+ return md5cmn(b & d | c & ~d, a, b, x, s, t);
+}
+
+function md5hh(a, b, c, d, x, s, t) {
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
+}
+
+function md5ii(a, b, c, d, x, s, t) {
+ return md5cmn(c ^ (b | ~d), a, b, x, s, t);
+}
+
+var _default = md5;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/md5.js b/node_modules/uuid/dist/md5.js
new file mode 100644
index 0000000..824d481
--- /dev/null
+++ b/node_modules/uuid/dist/md5.js
@@ -0,0 +1,23 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _crypto = _interopRequireDefault(require("crypto"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function md5(bytes) {
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+
+ return _crypto.default.createHash('md5').update(bytes).digest();
+}
+
+var _default = md5;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/nil.js b/node_modules/uuid/dist/nil.js
new file mode 100644
index 0000000..7ade577
--- /dev/null
+++ b/node_modules/uuid/dist/nil.js
@@ -0,0 +1,8 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = '00000000-0000-0000-0000-000000000000';
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/parse.js b/node_modules/uuid/dist/parse.js
new file mode 100644
index 0000000..4c69fc3
--- /dev/null
+++ b/node_modules/uuid/dist/parse.js
@@ -0,0 +1,45 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _validate = _interopRequireDefault(require("./validate.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function parse(uuid) {
+ if (!(0, _validate.default)(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+
+ let v;
+ const arr = new Uint8Array(16); // Parse ########-....-....-....-............
+
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
+ arr[1] = v >>> 16 & 0xff;
+ arr[2] = v >>> 8 & 0xff;
+ arr[3] = v & 0xff; // Parse ........-####-....-....-............
+
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
+ arr[5] = v & 0xff; // Parse ........-....-####-....-............
+
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
+ arr[7] = v & 0xff; // Parse ........-....-....-####-............
+
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
+ arr[9] = v & 0xff; // Parse ........-....-....-....-############
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
+
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
+ arr[11] = v / 0x100000000 & 0xff;
+ arr[12] = v >>> 24 & 0xff;
+ arr[13] = v >>> 16 & 0xff;
+ arr[14] = v >>> 8 & 0xff;
+ arr[15] = v & 0xff;
+ return arr;
+}
+
+var _default = parse;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/regex.js b/node_modules/uuid/dist/regex.js
new file mode 100644
index 0000000..1ef91d6
--- /dev/null
+++ b/node_modules/uuid/dist/regex.js
@@ -0,0 +1,8 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/rng-browser.js b/node_modules/uuid/dist/rng-browser.js
new file mode 100644
index 0000000..d3cc308
--- /dev/null
+++ b/node_modules/uuid/dist/rng-browser.js
@@ -0,0 +1,21 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = rng;
+// Unique ID creation requires a high quality random # generator. In the browser we therefore
+// require the crypto API and do not support built-in fallback to lower quality random number
+// generators (like Math.random()).
+// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
+// find the complete implementation of crypto (msCrypto) on IE11.
+const getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
+const rnds8 = new Uint8Array(16);
+
+function rng() {
+ if (!getRandomValues) {
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
+ }
+
+ return getRandomValues(rnds8);
+} \ No newline at end of file
diff --git a/node_modules/uuid/dist/rng.js b/node_modules/uuid/dist/rng.js
new file mode 100644
index 0000000..3507f93
--- /dev/null
+++ b/node_modules/uuid/dist/rng.js
@@ -0,0 +1,24 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = rng;
+
+var _crypto = _interopRequireDefault(require("crypto"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
+
+let poolPtr = rnds8Pool.length;
+
+function rng() {
+ if (poolPtr > rnds8Pool.length - 16) {
+ _crypto.default.randomFillSync(rnds8Pool);
+
+ poolPtr = 0;
+ }
+
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
+} \ No newline at end of file
diff --git a/node_modules/uuid/dist/sha1-browser.js b/node_modules/uuid/dist/sha1-browser.js
new file mode 100644
index 0000000..24cbced
--- /dev/null
+++ b/node_modules/uuid/dist/sha1-browser.js
@@ -0,0 +1,104 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+// Adapted from Chris Veness' SHA1 code at
+// http://www.movable-type.co.uk/scripts/sha1.html
+function f(s, x, y, z) {
+ switch (s) {
+ case 0:
+ return x & y ^ ~x & z;
+
+ case 1:
+ return x ^ y ^ z;
+
+ case 2:
+ return x & y ^ x & z ^ y & z;
+
+ case 3:
+ return x ^ y ^ z;
+ }
+}
+
+function ROTL(x, n) {
+ return x << n | x >>> 32 - n;
+}
+
+function sha1(bytes) {
+ const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
+ const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
+
+ if (typeof bytes === 'string') {
+ const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
+
+ bytes = [];
+
+ for (let i = 0; i < msg.length; ++i) {
+ bytes.push(msg.charCodeAt(i));
+ }
+ } else if (!Array.isArray(bytes)) {
+ // Convert Array-like to Array
+ bytes = Array.prototype.slice.call(bytes);
+ }
+
+ bytes.push(0x80);
+ const l = bytes.length / 4 + 2;
+ const N = Math.ceil(l / 16);
+ const M = new Array(N);
+
+ for (let i = 0; i < N; ++i) {
+ const arr = new Uint32Array(16);
+
+ for (let j = 0; j < 16; ++j) {
+ arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
+ }
+
+ M[i] = arr;
+ }
+
+ M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
+ M[N - 1][14] = Math.floor(M[N - 1][14]);
+ M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
+
+ for (let i = 0; i < N; ++i) {
+ const W = new Uint32Array(80);
+
+ for (let t = 0; t < 16; ++t) {
+ W[t] = M[i][t];
+ }
+
+ for (let t = 16; t < 80; ++t) {
+ W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
+ }
+
+ let a = H[0];
+ let b = H[1];
+ let c = H[2];
+ let d = H[3];
+ let e = H[4];
+
+ for (let t = 0; t < 80; ++t) {
+ const s = Math.floor(t / 20);
+ const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
+ e = d;
+ d = c;
+ c = ROTL(b, 30) >>> 0;
+ b = a;
+ a = T;
+ }
+
+ H[0] = H[0] + a >>> 0;
+ H[1] = H[1] + b >>> 0;
+ H[2] = H[2] + c >>> 0;
+ H[3] = H[3] + d >>> 0;
+ H[4] = H[4] + e >>> 0;
+ }
+
+ return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
+}
+
+var _default = sha1;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/sha1.js b/node_modules/uuid/dist/sha1.js
new file mode 100644
index 0000000..03bdd63
--- /dev/null
+++ b/node_modules/uuid/dist/sha1.js
@@ -0,0 +1,23 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _crypto = _interopRequireDefault(require("crypto"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function sha1(bytes) {
+ if (Array.isArray(bytes)) {
+ bytes = Buffer.from(bytes);
+ } else if (typeof bytes === 'string') {
+ bytes = Buffer.from(bytes, 'utf8');
+ }
+
+ return _crypto.default.createHash('sha1').update(bytes).digest();
+}
+
+var _default = sha1;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/stringify.js b/node_modules/uuid/dist/stringify.js
new file mode 100644
index 0000000..b8e7519
--- /dev/null
+++ b/node_modules/uuid/dist/stringify.js
@@ -0,0 +1,39 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _validate = _interopRequireDefault(require("./validate.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Convert array of 16 byte values to UUID string format of the form:
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+ */
+const byteToHex = [];
+
+for (let i = 0; i < 256; ++i) {
+ byteToHex.push((i + 0x100).toString(16).substr(1));
+}
+
+function stringify(arr, offset = 0) {
+ // Note: Be careful editing this code! It's been tuned for performance
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
+ const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
+ // of the following:
+ // - One or more input array values don't map to a hex octet (leading to
+ // "undefined" in the uuid)
+ // - Invalid input values for the RFC `version` or `variant` fields
+
+ if (!(0, _validate.default)(uuid)) {
+ throw TypeError('Stringified UUID is invalid');
+ }
+
+ return uuid;
+}
+
+var _default = stringify;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuid.min.js b/node_modules/uuid/dist/umd/uuid.min.js
new file mode 100644
index 0000000..9274595
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuid.min.js
@@ -0,0 +1 @@
+!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).uuid={})}(this,(function(r){"use strict";var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),n=new Uint8Array(16);function t(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(n)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function a(r){return"string"==typeof r&&o.test(r)}for(var i,u,f=[],s=0;s<256;++s)f.push((s+256).toString(16).substr(1));function c(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(f[r[e+0]]+f[r[e+1]]+f[r[e+2]]+f[r[e+3]]+"-"+f[r[e+4]]+f[r[e+5]]+"-"+f[r[e+6]]+f[r[e+7]]+"-"+f[r[e+8]]+f[r[e+9]]+"-"+f[r[e+10]]+f[r[e+11]]+f[r[e+12]]+f[r[e+13]]+f[r[e+14]]+f[r[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n}var l=0,d=0;function v(r){if(!a(r))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(r.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(r.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(r.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(r.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}function p(r,e,n){function t(r,t,o,a){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],n=0;n<r.length;++n)e.push(r.charCodeAt(n));return e}(r)),"string"==typeof t&&(t=v(t)),16!==t.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+r.length);if(i.set(t),i.set(r,t.length),(i=n(i))[6]=15&i[6]|e,i[8]=63&i[8]|128,o){a=a||0;for(var u=0;u<16;++u)o[a+u]=i[u];return o}return c(i)}try{t.name=r}catch(r){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function h(r){return 14+(r+64>>>9<<4)+1}function y(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function g(r,e,n,t,o,a){return y((i=y(y(e,r),y(t,a)))<<(u=o)|i>>>32-u,n);var i,u}function m(r,e,n,t,o,a,i){return g(e&n|~e&t,r,e,o,a,i)}function w(r,e,n,t,o,a,i){return g(e&t|n&~t,r,e,o,a,i)}function b(r,e,n,t,o,a,i){return g(e^n^t,r,e,o,a,i)}function A(r,e,n,t,o,a,i){return g(n^(e|~t),r,e,o,a,i)}var U=p("v3",48,(function(r){if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=new Uint8Array(e.length);for(var n=0;n<e.length;++n)r[n]=e.charCodeAt(n)}return function(r){for(var e=[],n=32*r.length,t="0123456789abcdef",o=0;o<n;o+=8){var a=r[o>>5]>>>o%32&255,i=parseInt(t.charAt(a>>>4&15)+t.charAt(15&a),16);e.push(i)}return e}(function(r,e){r[e>>5]|=128<<e%32,r[h(e)-1]=e;for(var n=1732584193,t=-271733879,o=-1732584194,a=271733878,i=0;i<r.length;i+=16){var u=n,f=t,s=o,c=a;n=m(n,t,o,a,r[i],7,-680876936),a=m(a,n,t,o,r[i+1],12,-389564586),o=m(o,a,n,t,r[i+2],17,606105819),t=m(t,o,a,n,r[i+3],22,-1044525330),n=m(n,t,o,a,r[i+4],7,-176418897),a=m(a,n,t,o,r[i+5],12,1200080426),o=m(o,a,n,t,r[i+6],17,-1473231341),t=m(t,o,a,n,r[i+7],22,-45705983),n=m(n,t,o,a,r[i+8],7,1770035416),a=m(a,n,t,o,r[i+9],12,-1958414417),o=m(o,a,n,t,r[i+10],17,-42063),t=m(t,o,a,n,r[i+11],22,-1990404162),n=m(n,t,o,a,r[i+12],7,1804603682),a=m(a,n,t,o,r[i+13],12,-40341101),o=m(o,a,n,t,r[i+14],17,-1502002290),n=w(n,t=m(t,o,a,n,r[i+15],22,1236535329),o,a,r[i+1],5,-165796510),a=w(a,n,t,o,r[i+6],9,-1069501632),o=w(o,a,n,t,r[i+11],14,643717713),t=w(t,o,a,n,r[i],20,-373897302),n=w(n,t,o,a,r[i+5],5,-701558691),a=w(a,n,t,o,r[i+10],9,38016083),o=w(o,a,n,t,r[i+15],14,-660478335),t=w(t,o,a,n,r[i+4],20,-405537848),n=w(n,t,o,a,r[i+9],5,568446438),a=w(a,n,t,o,r[i+14],9,-1019803690),o=w(o,a,n,t,r[i+3],14,-187363961),t=w(t,o,a,n,r[i+8],20,1163531501),n=w(n,t,o,a,r[i+13],5,-1444681467),a=w(a,n,t,o,r[i+2],9,-51403784),o=w(o,a,n,t,r[i+7],14,1735328473),n=b(n,t=w(t,o,a,n,r[i+12],20,-1926607734),o,a,r[i+5],4,-378558),a=b(a,n,t,o,r[i+8],11,-2022574463),o=b(o,a,n,t,r[i+11],16,1839030562),t=b(t,o,a,n,r[i+14],23,-35309556),n=b(n,t,o,a,r[i+1],4,-1530992060),a=b(a,n,t,o,r[i+4],11,1272893353),o=b(o,a,n,t,r[i+7],16,-155497632),t=b(t,o,a,n,r[i+10],23,-1094730640),n=b(n,t,o,a,r[i+13],4,681279174),a=b(a,n,t,o,r[i],11,-358537222),o=b(o,a,n,t,r[i+3],16,-722521979),t=b(t,o,a,n,r[i+6],23,76029189),n=b(n,t,o,a,r[i+9],4,-640364487),a=b(a,n,t,o,r[i+12],11,-421815835),o=b(o,a,n,t,r[i+15],16,530742520),n=A(n,t=b(t,o,a,n,r[i+2],23,-995338651),o,a,r[i],6,-198630844),a=A(a,n,t,o,r[i+7],10,1126891415),o=A(o,a,n,t,r[i+14],15,-1416354905),t=A(t,o,a,n,r[i+5],21,-57434055),n=A(n,t,o,a,r[i+12],6,1700485571),a=A(a,n,t,o,r[i+3],10,-1894986606),o=A(o,a,n,t,r[i+10],15,-1051523),t=A(t,o,a,n,r[i+1],21,-2054922799),n=A(n,t,o,a,r[i+8],6,1873313359),a=A(a,n,t,o,r[i+15],10,-30611744),o=A(o,a,n,t,r[i+6],15,-1560198380),t=A(t,o,a,n,r[i+13],21,1309151649),n=A(n,t,o,a,r[i+4],6,-145523070),a=A(a,n,t,o,r[i+11],10,-1120210379),o=A(o,a,n,t,r[i+2],15,718787259),t=A(t,o,a,n,r[i+9],21,-343485551),n=y(n,u),t=y(t,f),o=y(o,s),a=y(a,c)}return[n,t,o,a]}(function(r){if(0===r.length)return[];for(var e=8*r.length,n=new Uint32Array(h(e)),t=0;t<e;t+=8)n[t>>5]|=(255&r[t/8])<<t%32;return n}(r),8*r.length))}));function I(r,e,n,t){switch(r){case 0:return e&n^~e&t;case 1:return e^n^t;case 2:return e&n^e&t^n&t;case 3:return e^n^t}}function C(r,e){return r<<e|r>>>32-e}var R=p("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=[];for(var o=0;o<t.length;++o)r.push(t.charCodeAt(o))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);for(var a=r.length/4+2,i=Math.ceil(a/16),u=new Array(i),f=0;f<i;++f){for(var s=new Uint32Array(16),c=0;c<16;++c)s[c]=r[64*f+4*c]<<24|r[64*f+4*c+1]<<16|r[64*f+4*c+2]<<8|r[64*f+4*c+3];u[f]=s}u[i-1][14]=8*(r.length-1)/Math.pow(2,32),u[i-1][14]=Math.floor(u[i-1][14]),u[i-1][15]=8*(r.length-1)&4294967295;for(var l=0;l<i;++l){for(var d=new Uint32Array(80),v=0;v<16;++v)d[v]=u[l][v];for(var p=16;p<80;++p)d[p]=C(d[p-3]^d[p-8]^d[p-14]^d[p-16],1);for(var h=n[0],y=n[1],g=n[2],m=n[3],w=n[4],b=0;b<80;++b){var A=Math.floor(b/20),U=C(h,5)+I(A,y,g,m)+w+e[A]+d[b]>>>0;w=m,m=g,g=C(y,30)>>>0,y=h,h=U}n[0]=n[0]+h>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+w>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));r.NIL="00000000-0000-0000-0000-000000000000",r.parse=v,r.stringify=c,r.v1=function(r,e,n){var o=e&&n||0,a=e||new Array(16),f=(r=r||{}).node||i,s=void 0!==r.clockseq?r.clockseq:u;if(null==f||null==s){var v=r.random||(r.rng||t)();null==f&&(f=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==s&&(s=u=16383&(v[6]<<8|v[7]))}var p=void 0!==r.msecs?r.msecs:Date.now(),h=void 0!==r.nsecs?r.nsecs:d+1,y=p-l+(h-d)/1e4;if(y<0&&void 0===r.clockseq&&(s=s+1&16383),(y<0||p>l)&&void 0===r.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=p,d=h,u=s;var g=(1e4*(268435455&(p+=122192928e5))+h)%4294967296;a[o++]=g>>>24&255,a[o++]=g>>>16&255,a[o++]=g>>>8&255,a[o++]=255&g;var m=p/4294967296*1e4&268435455;a[o++]=m>>>8&255,a[o++]=255&m,a[o++]=m>>>24&15|16,a[o++]=m>>>16&255,a[o++]=s>>>8|128,a[o++]=255&s;for(var w=0;w<6;++w)a[o+w]=f[w];return e||c(a)},r.v3=U,r.v4=function(r,e,n){var o=(r=r||{}).random||(r.rng||t)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=o[a];return e}return c(o)},r.v5=R,r.validate=a,r.version=function(r){if(!a(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)},Object.defineProperty(r,"__esModule",{value:!0})})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuidNIL.min.js b/node_modules/uuid/dist/umd/uuidNIL.min.js
new file mode 100644
index 0000000..30b28a7
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuidNIL.min.js
@@ -0,0 +1 @@
+!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidNIL=n()}(this,(function(){"use strict";return"00000000-0000-0000-0000-000000000000"})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuidParse.min.js b/node_modules/uuid/dist/umd/uuidParse.min.js
new file mode 100644
index 0000000..d48ea6a
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuidParse.min.js
@@ -0,0 +1 @@
+!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidParse=n()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(n){if(!function(n){return"string"==typeof n&&e.test(n)}(n))throw TypeError("Invalid UUID");var t,i=new Uint8Array(16);return i[0]=(t=parseInt(n.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(n.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(n.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(n.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(n.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i}})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuidStringify.min.js b/node_modules/uuid/dist/umd/uuidStringify.min.js
new file mode 100644
index 0000000..fd39adc
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuidStringify.min.js
@@ -0,0 +1 @@
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidStringify=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function t(t){return"string"==typeof t&&e.test(t)}for(var i=[],n=0;n<256;++n)i.push((n+256).toString(16).substr(1));return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,f=(i[e[n+0]]+i[e[n+1]]+i[e[n+2]]+i[e[n+3]]+"-"+i[e[n+4]]+i[e[n+5]]+"-"+i[e[n+6]]+i[e[n+7]]+"-"+i[e[n+8]]+i[e[n+9]]+"-"+i[e[n+10]]+i[e[n+11]]+i[e[n+12]]+i[e[n+13]]+i[e[n+14]]+i[e[n+15]]).toLowerCase();if(!t(f))throw TypeError("Stringified UUID is invalid");return f}})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuidValidate.min.js b/node_modules/uuid/dist/umd/uuidValidate.min.js
new file mode 100644
index 0000000..378e5b9
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuidValidate.min.js
@@ -0,0 +1 @@
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidValidate=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){return"string"==typeof t&&e.test(t)}})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuidVersion.min.js b/node_modules/uuid/dist/umd/uuidVersion.min.js
new file mode 100644
index 0000000..274bb09
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuidVersion.min.js
@@ -0,0 +1 @@
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidVersion=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){if(!function(t){return"string"==typeof t&&e.test(t)}(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuidv1.min.js b/node_modules/uuid/dist/umd/uuidv1.min.js
new file mode 100644
index 0000000..b185d7c
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuidv1.min.js
@@ -0,0 +1 @@
+!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidv1=o()}(this,(function(){"use strict";var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function t(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(e){return"string"==typeof e&&n.test(e)}for(var i,u,s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var d=0,f=0;return function(e,o,n){var a=o&&n||0,c=o||new Array(16),l=(e=e||{}).node||i,p=void 0!==e.clockseq?e.clockseq:u;if(null==l||null==p){var v=e.random||(e.rng||t)();null==l&&(l=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==p&&(p=u=16383&(v[6]<<8|v[7]))}var y=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:f+1,g=y-d+(m-f)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||y>d)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=y,f=m,u=p;var h=(1e4*(268435455&(y+=122192928e5))+m)%4294967296;c[a++]=h>>>24&255,c[a++]=h>>>16&255,c[a++]=h>>>8&255,c[a++]=255&h;var w=y/4294967296*1e4&268435455;c[a++]=w>>>8&255,c[a++]=255&w,c[a++]=w>>>24&15|16,c[a++]=w>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var b=0;b<6;++b)c[a+b]=l[b];return o||function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(s[e[o+0]]+s[e[o+1]]+s[e[o+2]]+s[e[o+3]]+"-"+s[e[o+4]]+s[e[o+5]]+"-"+s[e[o+6]]+s[e[o+7]]+"-"+s[e[o+8]]+s[e[o+9]]+"-"+s[e[o+10]]+s[e[o+11]]+s[e[o+12]]+s[e[o+13]]+s[e[o+14]]+s[e[o+15]]).toLowerCase();if(!r(t))throw TypeError("Stringified UUID is invalid");return t}(c)}})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuidv3.min.js b/node_modules/uuid/dist/umd/uuidv3.min.js
new file mode 100644
index 0000000..8d37b62
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuidv3.min.js
@@ -0,0 +1 @@
+!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).uuidv3=r()}(this,(function(){"use strict";var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(r){return"string"==typeof r&&n.test(r)}for(var e=[],t=0;t<256;++t)e.push((t+256).toString(16).substr(1));function i(n){return 14+(n+64>>>9<<4)+1}function o(n,r){var e=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(e>>16)<<16|65535&e}function a(n,r,e,t,i,a){return o((f=o(o(r,n),o(t,a)))<<(u=i)|f>>>32-u,e);var f,u}function f(n,r,e,t,i,o,f){return a(r&e|~r&t,n,r,i,o,f)}function u(n,r,e,t,i,o,f){return a(r&t|e&~t,n,r,i,o,f)}function c(n,r,e,t,i,o,f){return a(r^e^t,n,r,i,o,f)}function s(n,r,e,t,i,o,f){return a(e^(r|~t),n,r,i,o,f)}return function(n,t,i){function o(n,o,a,f){if("string"==typeof n&&(n=function(n){n=unescape(encodeURIComponent(n));for(var r=[],e=0;e<n.length;++e)r.push(n.charCodeAt(e));return r}(n)),"string"==typeof o&&(o=function(n){if(!r(n))throw TypeError("Invalid UUID");var e,t=new Uint8Array(16);return t[0]=(e=parseInt(n.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=255&e,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=255&e,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=255&e,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=255&e,t}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+n.length);if(u.set(o),u.set(n,o.length),(u=i(u))[6]=15&u[6]|t,u[8]=63&u[8]|128,a){f=f||0;for(var c=0;c<16;++c)a[f+c]=u[c];return a}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(e[n[t+0]]+e[n[t+1]]+e[n[t+2]]+e[n[t+3]]+"-"+e[n[t+4]]+e[n[t+5]]+"-"+e[n[t+6]]+e[n[t+7]]+"-"+e[n[t+8]]+e[n[t+9]]+"-"+e[n[t+10]]+e[n[t+11]]+e[n[t+12]]+e[n[t+13]]+e[n[t+14]]+e[n[t+15]]).toLowerCase();if(!r(i))throw TypeError("Stringified UUID is invalid");return i}(u)}try{o.name=n}catch(n){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v3",48,(function(n){if("string"==typeof n){var r=unescape(encodeURIComponent(n));n=new Uint8Array(r.length);for(var e=0;e<r.length;++e)n[e]=r.charCodeAt(e)}return function(n){for(var r=[],e=32*n.length,t="0123456789abcdef",i=0;i<e;i+=8){var o=n[i>>5]>>>i%32&255,a=parseInt(t.charAt(o>>>4&15)+t.charAt(15&o),16);r.push(a)}return r}(function(n,r){n[r>>5]|=128<<r%32,n[i(r)-1]=r;for(var e=1732584193,t=-271733879,a=-1732584194,l=271733878,d=0;d<n.length;d+=16){var p=e,h=t,v=a,g=l;e=f(e,t,a,l,n[d],7,-680876936),l=f(l,e,t,a,n[d+1],12,-389564586),a=f(a,l,e,t,n[d+2],17,606105819),t=f(t,a,l,e,n[d+3],22,-1044525330),e=f(e,t,a,l,n[d+4],7,-176418897),l=f(l,e,t,a,n[d+5],12,1200080426),a=f(a,l,e,t,n[d+6],17,-1473231341),t=f(t,a,l,e,n[d+7],22,-45705983),e=f(e,t,a,l,n[d+8],7,1770035416),l=f(l,e,t,a,n[d+9],12,-1958414417),a=f(a,l,e,t,n[d+10],17,-42063),t=f(t,a,l,e,n[d+11],22,-1990404162),e=f(e,t,a,l,n[d+12],7,1804603682),l=f(l,e,t,a,n[d+13],12,-40341101),a=f(a,l,e,t,n[d+14],17,-1502002290),e=u(e,t=f(t,a,l,e,n[d+15],22,1236535329),a,l,n[d+1],5,-165796510),l=u(l,e,t,a,n[d+6],9,-1069501632),a=u(a,l,e,t,n[d+11],14,643717713),t=u(t,a,l,e,n[d],20,-373897302),e=u(e,t,a,l,n[d+5],5,-701558691),l=u(l,e,t,a,n[d+10],9,38016083),a=u(a,l,e,t,n[d+15],14,-660478335),t=u(t,a,l,e,n[d+4],20,-405537848),e=u(e,t,a,l,n[d+9],5,568446438),l=u(l,e,t,a,n[d+14],9,-1019803690),a=u(a,l,e,t,n[d+3],14,-187363961),t=u(t,a,l,e,n[d+8],20,1163531501),e=u(e,t,a,l,n[d+13],5,-1444681467),l=u(l,e,t,a,n[d+2],9,-51403784),a=u(a,l,e,t,n[d+7],14,1735328473),e=c(e,t=u(t,a,l,e,n[d+12],20,-1926607734),a,l,n[d+5],4,-378558),l=c(l,e,t,a,n[d+8],11,-2022574463),a=c(a,l,e,t,n[d+11],16,1839030562),t=c(t,a,l,e,n[d+14],23,-35309556),e=c(e,t,a,l,n[d+1],4,-1530992060),l=c(l,e,t,a,n[d+4],11,1272893353),a=c(a,l,e,t,n[d+7],16,-155497632),t=c(t,a,l,e,n[d+10],23,-1094730640),e=c(e,t,a,l,n[d+13],4,681279174),l=c(l,e,t,a,n[d],11,-358537222),a=c(a,l,e,t,n[d+3],16,-722521979),t=c(t,a,l,e,n[d+6],23,76029189),e=c(e,t,a,l,n[d+9],4,-640364487),l=c(l,e,t,a,n[d+12],11,-421815835),a=c(a,l,e,t,n[d+15],16,530742520),e=s(e,t=c(t,a,l,e,n[d+2],23,-995338651),a,l,n[d],6,-198630844),l=s(l,e,t,a,n[d+7],10,1126891415),a=s(a,l,e,t,n[d+14],15,-1416354905),t=s(t,a,l,e,n[d+5],21,-57434055),e=s(e,t,a,l,n[d+12],6,1700485571),l=s(l,e,t,a,n[d+3],10,-1894986606),a=s(a,l,e,t,n[d+10],15,-1051523),t=s(t,a,l,e,n[d+1],21,-2054922799),e=s(e,t,a,l,n[d+8],6,1873313359),l=s(l,e,t,a,n[d+15],10,-30611744),a=s(a,l,e,t,n[d+6],15,-1560198380),t=s(t,a,l,e,n[d+13],21,1309151649),e=s(e,t,a,l,n[d+4],6,-145523070),l=s(l,e,t,a,n[d+11],10,-1120210379),a=s(a,l,e,t,n[d+2],15,718787259),t=s(t,a,l,e,n[d+9],21,-343485551),e=o(e,p),t=o(t,h),a=o(a,v),l=o(l,g)}return[e,t,a,l]}(function(n){if(0===n.length)return[];for(var r=8*n.length,e=new Uint32Array(i(r)),t=0;t<r;t+=8)e[t>>5]|=(255&n[t/8])<<t%32;return e}(n),8*n.length))}))})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuidv4.min.js b/node_modules/uuid/dist/umd/uuidv4.min.js
new file mode 100644
index 0000000..9a38c98
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuidv4.min.js
@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).uuidv4=e()}(this,(function(){"use strict";var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function o(){if(!t)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(t){return"string"==typeof t&&n.test(t)}for(var i=[],u=0;u<256;++u)i.push((u+256).toString(16).substr(1));return function(t,e,n){var u=(t=t||{}).random||(t.rng||o)();if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,e){n=n||0;for(var f=0;f<16;++f)e[n+f]=u[f];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(i[t[e+0]]+i[t[e+1]]+i[t[e+2]]+i[t[e+3]]+"-"+i[t[e+4]]+i[t[e+5]]+"-"+i[t[e+6]]+i[t[e+7]]+"-"+i[t[e+8]]+i[t[e+9]]+"-"+i[t[e+10]]+i[t[e+11]]+i[t[e+12]]+i[t[e+13]]+i[t[e+14]]+i[t[e+15]]).toLowerCase();if(!r(o))throw TypeError("Stringified UUID is invalid");return o}(u)}})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/umd/uuidv5.min.js b/node_modules/uuid/dist/umd/uuidv5.min.js
new file mode 100644
index 0000000..ba6fc63
--- /dev/null
+++ b/node_modules/uuid/dist/umd/uuidv5.min.js
@@ -0,0 +1 @@
+!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).uuidv5=e()}(this,(function(){"use strict";var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function e(e){return"string"==typeof e&&r.test(e)}for(var t=[],n=0;n<256;++n)t.push((n+256).toString(16).substr(1));function a(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:return e^t^n;case 2:return e&t^e&n^t&n;case 3:return e^t^n}}function o(r,e){return r<<e|r>>>32-e}return function(r,n,a){function o(r,o,i,f){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}(r)),"string"==typeof o&&(o=function(r){if(!e(r))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(r.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(r.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(r.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(r.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+r.length);if(s.set(o),s.set(r,o.length),(s=a(s))[6]=15&s[6]|n,s[8]=63&s[8]|128,i){f=f||0;for(var u=0;u<16;++u)i[f+u]=s[u];return i}return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(t[r[n+0]]+t[r[n+1]]+t[r[n+2]]+t[r[n+3]]+"-"+t[r[n+4]]+t[r[n+5]]+"-"+t[r[n+6]]+t[r[n+7]]+"-"+t[r[n+8]]+t[r[n+9]]+"-"+t[r[n+10]]+t[r[n+11]]+t[r[n+12]]+t[r[n+13]]+t[r[n+14]]+t[r[n+15]]).toLowerCase();if(!e(a))throw TypeError("Stringified UUID is invalid");return a}(s)}try{o.name=r}catch(r){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=[];for(var i=0;i<n.length;++i)r.push(n.charCodeAt(i))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);for(var f=r.length/4+2,s=Math.ceil(f/16),u=new Array(s),c=0;c<s;++c){for(var l=new Uint32Array(16),p=0;p<16;++p)l[p]=r[64*c+4*p]<<24|r[64*c+4*p+1]<<16|r[64*c+4*p+2]<<8|r[64*c+4*p+3];u[c]=l}u[s-1][14]=8*(r.length-1)/Math.pow(2,32),u[s-1][14]=Math.floor(u[s-1][14]),u[s-1][15]=8*(r.length-1)&4294967295;for(var d=0;d<s;++d){for(var h=new Uint32Array(80),v=0;v<16;++v)h[v]=u[d][v];for(var y=16;y<80;++y)h[y]=o(h[y-3]^h[y-8]^h[y-14]^h[y-16],1);for(var g=t[0],b=t[1],w=t[2],U=t[3],A=t[4],I=0;I<80;++I){var m=Math.floor(I/20),C=o(g,5)+a(m,b,w,U)+A+e[m]+h[I]>>>0;A=U,U=w,w=o(b,30)>>>0,b=g,g=C}t[0]=t[0]+g>>>0,t[1]=t[1]+b>>>0,t[2]=t[2]+w>>>0,t[3]=t[3]+U>>>0,t[4]=t[4]+A>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]}))})); \ No newline at end of file
diff --git a/node_modules/uuid/dist/uuid-bin.js b/node_modules/uuid/dist/uuid-bin.js
new file mode 100644
index 0000000..50a7a9f
--- /dev/null
+++ b/node_modules/uuid/dist/uuid-bin.js
@@ -0,0 +1,85 @@
+"use strict";
+
+var _assert = _interopRequireDefault(require("assert"));
+
+var _v = _interopRequireDefault(require("./v1.js"));
+
+var _v2 = _interopRequireDefault(require("./v3.js"));
+
+var _v3 = _interopRequireDefault(require("./v4.js"));
+
+var _v4 = _interopRequireDefault(require("./v5.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function usage() {
+ console.log('Usage:');
+ console.log(' uuid');
+ console.log(' uuid v1');
+ console.log(' uuid v3 <name> <namespace uuid>');
+ console.log(' uuid v4');
+ console.log(' uuid v5 <name> <namespace uuid>');
+ console.log(' uuid --help');
+ console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122');
+}
+
+const args = process.argv.slice(2);
+
+if (args.indexOf('--help') >= 0) {
+ usage();
+ process.exit(0);
+}
+
+const version = args.shift() || 'v4';
+
+switch (version) {
+ case 'v1':
+ console.log((0, _v.default)());
+ break;
+
+ case 'v3':
+ {
+ const name = args.shift();
+ let namespace = args.shift();
+ (0, _assert.default)(name != null, 'v3 name not specified');
+ (0, _assert.default)(namespace != null, 'v3 namespace not specified');
+
+ if (namespace === 'URL') {
+ namespace = _v2.default.URL;
+ }
+
+ if (namespace === 'DNS') {
+ namespace = _v2.default.DNS;
+ }
+
+ console.log((0, _v2.default)(name, namespace));
+ break;
+ }
+
+ case 'v4':
+ console.log((0, _v3.default)());
+ break;
+
+ case 'v5':
+ {
+ const name = args.shift();
+ let namespace = args.shift();
+ (0, _assert.default)(name != null, 'v5 name not specified');
+ (0, _assert.default)(namespace != null, 'v5 namespace not specified');
+
+ if (namespace === 'URL') {
+ namespace = _v4.default.URL;
+ }
+
+ if (namespace === 'DNS') {
+ namespace = _v4.default.DNS;
+ }
+
+ console.log((0, _v4.default)(name, namespace));
+ break;
+ }
+
+ default:
+ usage();
+ process.exit(1);
+} \ No newline at end of file
diff --git a/node_modules/uuid/dist/v1.js b/node_modules/uuid/dist/v1.js
new file mode 100644
index 0000000..abb9b3d
--- /dev/null
+++ b/node_modules/uuid/dist/v1.js
@@ -0,0 +1,107 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _rng = _interopRequireDefault(require("./rng.js"));
+
+var _stringify = _interopRequireDefault(require("./stringify.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+let _nodeId;
+
+let _clockseq; // Previous uuid creation time
+
+
+let _lastMSecs = 0;
+let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
+
+function v1(options, buf, offset) {
+ let i = buf && offset || 0;
+ const b = buf || new Array(16);
+ options = options || {};
+ let node = options.node || _nodeId;
+ let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
+ // specified. We do this lazily to minimize issues related to insufficient
+ // system entropy. See #189
+
+ if (node == null || clockseq == null) {
+ const seedBytes = options.random || (options.rng || _rng.default)();
+
+ if (node == null) {
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
+ node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
+ }
+
+ if (clockseq == null) {
+ // Per 4.2.2, randomize (14 bit) clockseq
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
+ }
+ } // UUID timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+
+
+ let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+
+ let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
+
+ const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
+
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+
+
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ } // Per 4.2.1.2 Throw error if too many uuids are requested
+
+
+ if (nsecs >= 10000) {
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
+ }
+
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+
+ msecs += 12219292800000; // `time_low`
+
+ const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff; // `time_mid`
+
+ const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff; // `time_high_and_version`
+
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+
+ b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+
+ b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
+
+ b[i++] = clockseq & 0xff; // `node`
+
+ for (let n = 0; n < 6; ++n) {
+ b[i + n] = node[n];
+ }
+
+ return buf || (0, _stringify.default)(b);
+}
+
+var _default = v1;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/v3.js b/node_modules/uuid/dist/v3.js
new file mode 100644
index 0000000..6b47ff5
--- /dev/null
+++ b/node_modules/uuid/dist/v3.js
@@ -0,0 +1,16 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _v = _interopRequireDefault(require("./v35.js"));
+
+var _md = _interopRequireDefault(require("./md5.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const v3 = (0, _v.default)('v3', 0x30, _md.default);
+var _default = v3;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/v35.js b/node_modules/uuid/dist/v35.js
new file mode 100644
index 0000000..f784c63
--- /dev/null
+++ b/node_modules/uuid/dist/v35.js
@@ -0,0 +1,78 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+exports.URL = exports.DNS = void 0;
+
+var _stringify = _interopRequireDefault(require("./stringify.js"));
+
+var _parse = _interopRequireDefault(require("./parse.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function stringToBytes(str) {
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
+
+ const bytes = [];
+
+ for (let i = 0; i < str.length; ++i) {
+ bytes.push(str.charCodeAt(i));
+ }
+
+ return bytes;
+}
+
+const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
+exports.DNS = DNS;
+const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
+exports.URL = URL;
+
+function _default(name, version, hashfunc) {
+ function generateUUID(value, namespace, buf, offset) {
+ if (typeof value === 'string') {
+ value = stringToBytes(value);
+ }
+
+ if (typeof namespace === 'string') {
+ namespace = (0, _parse.default)(namespace);
+ }
+
+ if (namespace.length !== 16) {
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
+ } // Compute hash of namespace and value, Per 4.3
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
+ // hashfunc([...namespace, ... value])`
+
+
+ let bytes = new Uint8Array(16 + value.length);
+ bytes.set(namespace);
+ bytes.set(value, namespace.length);
+ bytes = hashfunc(bytes);
+ bytes[6] = bytes[6] & 0x0f | version;
+ bytes[8] = bytes[8] & 0x3f | 0x80;
+
+ if (buf) {
+ offset = offset || 0;
+
+ for (let i = 0; i < 16; ++i) {
+ buf[offset + i] = bytes[i];
+ }
+
+ return buf;
+ }
+
+ return (0, _stringify.default)(bytes);
+ } // Function#name is not settable on some platforms (#270)
+
+
+ try {
+ generateUUID.name = name; // eslint-disable-next-line no-empty
+ } catch (err) {} // For CommonJS default export support
+
+
+ generateUUID.DNS = DNS;
+ generateUUID.URL = URL;
+ return generateUUID;
+} \ No newline at end of file
diff --git a/node_modules/uuid/dist/v4.js b/node_modules/uuid/dist/v4.js
new file mode 100644
index 0000000..838ce0b
--- /dev/null
+++ b/node_modules/uuid/dist/v4.js
@@ -0,0 +1,37 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _rng = _interopRequireDefault(require("./rng.js"));
+
+var _stringify = _interopRequireDefault(require("./stringify.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function v4(options, buf, offset) {
+ options = options || {};
+
+ const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+
+
+ rnds[6] = rnds[6] & 0x0f | 0x40;
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
+
+ if (buf) {
+ offset = offset || 0;
+
+ for (let i = 0; i < 16; ++i) {
+ buf[offset + i] = rnds[i];
+ }
+
+ return buf;
+ }
+
+ return (0, _stringify.default)(rnds);
+}
+
+var _default = v4;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/v5.js b/node_modules/uuid/dist/v5.js
new file mode 100644
index 0000000..99d615e
--- /dev/null
+++ b/node_modules/uuid/dist/v5.js
@@ -0,0 +1,16 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _v = _interopRequireDefault(require("./v35.js"));
+
+var _sha = _interopRequireDefault(require("./sha1.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const v5 = (0, _v.default)('v5', 0x50, _sha.default);
+var _default = v5;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/validate.js b/node_modules/uuid/dist/validate.js
new file mode 100644
index 0000000..fd05215
--- /dev/null
+++ b/node_modules/uuid/dist/validate.js
@@ -0,0 +1,17 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _regex = _interopRequireDefault(require("./regex.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function validate(uuid) {
+ return typeof uuid === 'string' && _regex.default.test(uuid);
+}
+
+var _default = validate;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/dist/version.js b/node_modules/uuid/dist/version.js
new file mode 100644
index 0000000..b72949c
--- /dev/null
+++ b/node_modules/uuid/dist/version.js
@@ -0,0 +1,21 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _validate = _interopRequireDefault(require("./validate.js"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function version(uuid) {
+ if (!(0, _validate.default)(uuid)) {
+ throw TypeError('Invalid UUID');
+ }
+
+ return parseInt(uuid.substr(14, 1), 16);
+}
+
+var _default = version;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json
new file mode 100644
index 0000000..389e8a7
--- /dev/null
+++ b/node_modules/uuid/package.json
@@ -0,0 +1,167 @@
+{
+ "_args": [
+ [
+ "uuid@8.3.1",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "uuid@8.3.1",
+ "_id": "uuid@8.3.1",
+ "_inBundle": false,
+ "_integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==",
+ "_location": "/uuid",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "uuid@8.3.1",
+ "name": "uuid",
+ "escapedName": "uuid",
+ "rawSpec": "8.3.1",
+ "saveSpec": null,
+ "fetchSpec": "8.3.1"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz",
+ "_spec": "8.3.1",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ },
+ "browser": {
+ "./dist/md5.js": "./dist/md5-browser.js",
+ "./dist/rng.js": "./dist/rng-browser.js",
+ "./dist/sha1.js": "./dist/sha1-browser.js",
+ "./dist/esm-node/index.js": "./dist/esm-browser/index.js"
+ },
+ "bugs": {
+ "url": "https://github.com/uuidjs/uuid/issues"
+ },
+ "commitlint": {
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+ },
+ "description": "RFC4122 (v1, v4, and v5) UUIDs",
+ "devDependencies": {
+ "@babel/cli": "7.11.6",
+ "@babel/core": "7.11.6",
+ "@babel/preset-env": "7.11.5",
+ "@commitlint/cli": "11.0.0",
+ "@commitlint/config-conventional": "11.0.0",
+ "@rollup/plugin-node-resolve": "9.0.0",
+ "babel-eslint": "10.1.0",
+ "bundlewatch": "0.3.1",
+ "eslint": "7.10.0",
+ "eslint-config-prettier": "6.12.0",
+ "eslint-config-standard": "14.1.1",
+ "eslint-plugin-import": "2.22.1",
+ "eslint-plugin-node": "11.1.0",
+ "eslint-plugin-prettier": "3.1.4",
+ "eslint-plugin-promise": "4.2.1",
+ "eslint-plugin-standard": "4.0.1",
+ "husky": "4.3.0",
+ "jest": "25.5.4",
+ "lint-staged": "10.4.0",
+ "npm-run-all": "4.1.5",
+ "optional-dev-dependency": "2.0.1",
+ "prettier": "2.1.2",
+ "random-seed": "0.3.0",
+ "rollup": "2.28.2",
+ "rollup-plugin-terser": "7.0.2",
+ "runmd": "1.3.2",
+ "standard-version": "9.0.0"
+ },
+ "exports": {
+ ".": {
+ "node": {
+ "module": "./dist/esm-node/index.js",
+ "require": "./dist/index.js",
+ "import": "./wrapper.mjs"
+ },
+ "default": "./dist/esm-browser/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "files": [
+ "CHANGELOG.md",
+ "CONTRIBUTING.md",
+ "LICENSE.md",
+ "README.md",
+ "dist",
+ "wrapper.mjs"
+ ],
+ "homepage": "https://github.com/uuidjs/uuid#readme",
+ "husky": {
+ "hooks": {
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
+ "pre-commit": "lint-staged"
+ }
+ },
+ "keywords": [
+ "uuid",
+ "guid",
+ "rfc4122"
+ ],
+ "license": "MIT",
+ "lint-staged": {
+ "*.{js,jsx,json,md}": [
+ "prettier --write"
+ ],
+ "*.{js,jsx}": [
+ "eslint --fix"
+ ]
+ },
+ "main": "./dist/index.js",
+ "module": "./dist/esm-node/index.js",
+ "name": "uuid",
+ "optionalDevDependencies": {
+ "@wdio/browserstack-service": "6.4.0",
+ "@wdio/cli": "6.4.0",
+ "@wdio/jasmine-framework": "6.4.0",
+ "@wdio/local-runner": "6.4.0",
+ "@wdio/spec-reporter": "6.4.0",
+ "@wdio/static-server-service": "6.4.0",
+ "@wdio/sync": "6.4.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/uuidjs/uuid.git"
+ },
+ "scripts": {
+ "build": "./scripts/build.sh",
+ "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
+ "docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )",
+ "docs:diff": "npm run docs && git diff --quiet README.md",
+ "eslint:check": "eslint src/ test/ examples/ *.js",
+ "eslint:fix": "eslint --fix src/ test/ examples/ *.js",
+ "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build",
+ "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build",
+ "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test",
+ "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test",
+ "lint": "npm run eslint:check && npm run prettier:check",
+ "md": "runmd --watch --output=README.md README_js.md",
+ "prepack": "npm run build",
+ "pretest": "[ -n $CI ] || npm run build",
+ "pretest:benchmark": "npm run build",
+ "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**",
+ "pretest:node": "npm run build",
+ "prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'",
+ "prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'",
+ "release": "standard-version --no-verify",
+ "test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/",
+ "test:benchmark": "cd examples/benchmark && npm install && npm test",
+ "test:browser": "wdio run ./wdio.conf.js",
+ "test:node": "npm-run-all --parallel examples:node:**",
+ "test:pack": "./scripts/testpack.sh"
+ },
+ "sideEffects": false,
+ "standard-version": {
+ "scripts": {
+ "postchangelog": "prettier --write CHANGELOG.md"
+ }
+ },
+ "version": "8.3.1"
+}
diff --git a/node_modules/uuid/wrapper.mjs b/node_modules/uuid/wrapper.mjs
new file mode 100644
index 0000000..c31e9ce
--- /dev/null
+++ b/node_modules/uuid/wrapper.mjs
@@ -0,0 +1,10 @@
+import uuid from './dist/index.js';
+export const v1 = uuid.v1;
+export const v3 = uuid.v3;
+export const v4 = uuid.v4;
+export const v5 = uuid.v5;
+export const NIL = uuid.NIL;
+export const version = uuid.version;
+export const validate = uuid.validate;
+export const stringify = uuid.stringify;
+export const parse = uuid.parse;
diff --git a/node_modules/wcwidth/.npmignore b/node_modules/wcwidth/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/node_modules/wcwidth/.npmignore
@@ -0,0 +1 @@
+node_modules
diff --git a/node_modules/wcwidth/LICENSE b/node_modules/wcwidth/LICENSE
new file mode 100644
index 0000000..313ef1e
--- /dev/null
+++ b/node_modules/wcwidth/LICENSE
@@ -0,0 +1,30 @@
+wcwidth.js: JavaScript Portng of Markus Kuhn's wcwidth() Implementation
+=======================================================================
+
+Copyright (C) 2012 by Jun Woong.
+
+This package is a JavaScript porting of `wcwidth()` implementation
+[by Markus Kuhn](http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c).
+
+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:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/node_modules/wcwidth/Readme.md b/node_modules/wcwidth/Readme.md
new file mode 100644
index 0000000..0649a31
--- /dev/null
+++ b/node_modules/wcwidth/Readme.md
@@ -0,0 +1,33 @@
+# wcwidth
+
+Determine columns needed for a fixed-size wide-character string
+
+----
+
+wcwidth is a simple JavaScript port of [wcwidth](http://man7.org/linux/man-pages/man3/wcswidth.3.html) implemented in C by Markus Kuhn.
+
+JavaScript port [originally](https://github.com/mycoboco/wcwidth.js) written by Woong Jun <woong.jun@gmail.com> (http://code.woong.org/)
+
+## Example
+
+```js
+'한'.length // => 1
+wcwidth('한'); // => 2
+
+'한글'.length // => 2
+wcwidth('한글'); // => 4
+```
+
+`wcwidth()` and its string version, `wcswidth()` are defined by IEEE Std
+1002.1-2001, a.k.a. POSIX.1-2001, and return the number of columns used
+to represent the given wide character and string.
+
+Markus's implementation assumes the wide character given to those
+functions to be encoded in ISO 10646, which is almost true for
+JavaScript's characters.
+
+[Further explaination here](docs)
+
+## License
+
+MIT
diff --git a/node_modules/wcwidth/combining.js b/node_modules/wcwidth/combining.js
new file mode 100644
index 0000000..dac9789
--- /dev/null
+++ b/node_modules/wcwidth/combining.js
@@ -0,0 +1,50 @@
+module.exports = [
+ [ 0x0300, 0x036F ], [ 0x0483, 0x0486 ], [ 0x0488, 0x0489 ],
+ [ 0x0591, 0x05BD ], [ 0x05BF, 0x05BF ], [ 0x05C1, 0x05C2 ],
+ [ 0x05C4, 0x05C5 ], [ 0x05C7, 0x05C7 ], [ 0x0600, 0x0603 ],
+ [ 0x0610, 0x0615 ], [ 0x064B, 0x065E ], [ 0x0670, 0x0670 ],
+ [ 0x06D6, 0x06E4 ], [ 0x06E7, 0x06E8 ], [ 0x06EA, 0x06ED ],
+ [ 0x070F, 0x070F ], [ 0x0711, 0x0711 ], [ 0x0730, 0x074A ],
+ [ 0x07A6, 0x07B0 ], [ 0x07EB, 0x07F3 ], [ 0x0901, 0x0902 ],
+ [ 0x093C, 0x093C ], [ 0x0941, 0x0948 ], [ 0x094D, 0x094D ],
+ [ 0x0951, 0x0954 ], [ 0x0962, 0x0963 ], [ 0x0981, 0x0981 ],
+ [ 0x09BC, 0x09BC ], [ 0x09C1, 0x09C4 ], [ 0x09CD, 0x09CD ],
+ [ 0x09E2, 0x09E3 ], [ 0x0A01, 0x0A02 ], [ 0x0A3C, 0x0A3C ],
+ [ 0x0A41, 0x0A42 ], [ 0x0A47, 0x0A48 ], [ 0x0A4B, 0x0A4D ],
+ [ 0x0A70, 0x0A71 ], [ 0x0A81, 0x0A82 ], [ 0x0ABC, 0x0ABC ],
+ [ 0x0AC1, 0x0AC5 ], [ 0x0AC7, 0x0AC8 ], [ 0x0ACD, 0x0ACD ],
+ [ 0x0AE2, 0x0AE3 ], [ 0x0B01, 0x0B01 ], [ 0x0B3C, 0x0B3C ],
+ [ 0x0B3F, 0x0B3F ], [ 0x0B41, 0x0B43 ], [ 0x0B4D, 0x0B4D ],
+ [ 0x0B56, 0x0B56 ], [ 0x0B82, 0x0B82 ], [ 0x0BC0, 0x0BC0 ],
+ [ 0x0BCD, 0x0BCD ], [ 0x0C3E, 0x0C40 ], [ 0x0C46, 0x0C48 ],
+ [ 0x0C4A, 0x0C4D ], [ 0x0C55, 0x0C56 ], [ 0x0CBC, 0x0CBC ],
+ [ 0x0CBF, 0x0CBF ], [ 0x0CC6, 0x0CC6 ], [ 0x0CCC, 0x0CCD ],
+ [ 0x0CE2, 0x0CE3 ], [ 0x0D41, 0x0D43 ], [ 0x0D4D, 0x0D4D ],
+ [ 0x0DCA, 0x0DCA ], [ 0x0DD2, 0x0DD4 ], [ 0x0DD6, 0x0DD6 ],
+ [ 0x0E31, 0x0E31 ], [ 0x0E34, 0x0E3A ], [ 0x0E47, 0x0E4E ],
+ [ 0x0EB1, 0x0EB1 ], [ 0x0EB4, 0x0EB9 ], [ 0x0EBB, 0x0EBC ],
+ [ 0x0EC8, 0x0ECD ], [ 0x0F18, 0x0F19 ], [ 0x0F35, 0x0F35 ],
+ [ 0x0F37, 0x0F37 ], [ 0x0F39, 0x0F39 ], [ 0x0F71, 0x0F7E ],
+ [ 0x0F80, 0x0F84 ], [ 0x0F86, 0x0F87 ], [ 0x0F90, 0x0F97 ],
+ [ 0x0F99, 0x0FBC ], [ 0x0FC6, 0x0FC6 ], [ 0x102D, 0x1030 ],
+ [ 0x1032, 0x1032 ], [ 0x1036, 0x1037 ], [ 0x1039, 0x1039 ],
+ [ 0x1058, 0x1059 ], [ 0x1160, 0x11FF ], [ 0x135F, 0x135F ],
+ [ 0x1712, 0x1714 ], [ 0x1732, 0x1734 ], [ 0x1752, 0x1753 ],
+ [ 0x1772, 0x1773 ], [ 0x17B4, 0x17B5 ], [ 0x17B7, 0x17BD ],
+ [ 0x17C6, 0x17C6 ], [ 0x17C9, 0x17D3 ], [ 0x17DD, 0x17DD ],
+ [ 0x180B, 0x180D ], [ 0x18A9, 0x18A9 ], [ 0x1920, 0x1922 ],
+ [ 0x1927, 0x1928 ], [ 0x1932, 0x1932 ], [ 0x1939, 0x193B ],
+ [ 0x1A17, 0x1A18 ], [ 0x1B00, 0x1B03 ], [ 0x1B34, 0x1B34 ],
+ [ 0x1B36, 0x1B3A ], [ 0x1B3C, 0x1B3C ], [ 0x1B42, 0x1B42 ],
+ [ 0x1B6B, 0x1B73 ], [ 0x1DC0, 0x1DCA ], [ 0x1DFE, 0x1DFF ],
+ [ 0x200B, 0x200F ], [ 0x202A, 0x202E ], [ 0x2060, 0x2063 ],
+ [ 0x206A, 0x206F ], [ 0x20D0, 0x20EF ], [ 0x302A, 0x302F ],
+ [ 0x3099, 0x309A ], [ 0xA806, 0xA806 ], [ 0xA80B, 0xA80B ],
+ [ 0xA825, 0xA826 ], [ 0xFB1E, 0xFB1E ], [ 0xFE00, 0xFE0F ],
+ [ 0xFE20, 0xFE23 ], [ 0xFEFF, 0xFEFF ], [ 0xFFF9, 0xFFFB ],
+ [ 0x10A01, 0x10A03 ], [ 0x10A05, 0x10A06 ], [ 0x10A0C, 0x10A0F ],
+ [ 0x10A38, 0x10A3A ], [ 0x10A3F, 0x10A3F ], [ 0x1D167, 0x1D169 ],
+ [ 0x1D173, 0x1D182 ], [ 0x1D185, 0x1D18B ], [ 0x1D1AA, 0x1D1AD ],
+ [ 0x1D242, 0x1D244 ], [ 0xE0001, 0xE0001 ], [ 0xE0020, 0xE007F ],
+ [ 0xE0100, 0xE01EF ]
+]
diff --git a/node_modules/wcwidth/docs/index.md b/node_modules/wcwidth/docs/index.md
new file mode 100644
index 0000000..5c5126d
--- /dev/null
+++ b/node_modules/wcwidth/docs/index.md
@@ -0,0 +1,65 @@
+### Javascript porting of Markus Kuhn's wcwidth() implementation
+
+The following explanation comes from the original C implementation:
+
+This is an implementation of wcwidth() and wcswidth() (defined in
+IEEE Std 1002.1-2001) for Unicode.
+
+http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html
+http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html
+
+In fixed-width output devices, Latin characters all occupy a single
+"cell" position of equal width, whereas ideographic CJK characters
+occupy two such cells. Interoperability between terminal-line
+applications and (teletype-style) character terminals using the
+UTF-8 encoding requires agreement on which character should advance
+the cursor by how many cell positions. No established formal
+standards exist at present on which Unicode character shall occupy
+how many cell positions on character terminals. These routines are
+a first attempt of defining such behavior based on simple rules
+applied to data provided by the Unicode Consortium.
+
+For some graphical characters, the Unicode standard explicitly
+defines a character-cell width via the definition of the East Asian
+FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes.
+In all these cases, there is no ambiguity about which width a
+terminal shall use. For characters in the East Asian Ambiguous (A)
+class, the width choice depends purely on a preference of backward
+compatibility with either historic CJK or Western practice.
+Choosing single-width for these characters is easy to justify as
+the appropriate long-term solution, as the CJK practice of
+displaying these characters as double-width comes from historic
+implementation simplicity (8-bit encoded characters were displayed
+single-width and 16-bit ones double-width, even for Greek,
+Cyrillic, etc.) and not any typographic considerations.
+
+Much less clear is the choice of width for the Not East Asian
+(Neutral) class. Existing practice does not dictate a width for any
+of these characters. It would nevertheless make sense
+typographically to allocate two character cells to characters such
+as for instance EM SPACE or VOLUME INTEGRAL, which cannot be
+represented adequately with a single-width glyph. The following
+routines at present merely assign a single-cell width to all
+neutral characters, in the interest of simplicity. This is not
+entirely satisfactory and should be reconsidered before
+establishing a formal standard in this area. At the moment, the
+decision which Not East Asian (Neutral) characters should be
+represented by double-width glyphs cannot yet be answered by
+applying a simple rule from the Unicode database content. Setting
+up a proper standard for the behavior of UTF-8 character terminals
+will require a careful analysis not only of each Unicode character,
+but also of each presentation form, something the author of these
+routines has avoided to do so far.
+
+http://www.unicode.org/unicode/reports/tr11/
+
+Markus Kuhn -- 2007-05-26 (Unicode 5.0)
+
+Permission to use, copy, modify, and distribute this software
+for any purpose and without fee is hereby granted. The author
+disclaims all warranties with regard to this software.
+
+Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
+
+
+
diff --git a/node_modules/wcwidth/index.js b/node_modules/wcwidth/index.js
new file mode 100644
index 0000000..48cbb60
--- /dev/null
+++ b/node_modules/wcwidth/index.js
@@ -0,0 +1,99 @@
+"use strict"
+
+var defaults = require('defaults')
+var combining = require('./combining')
+
+var DEFAULTS = {
+ nul: 0,
+ control: 0
+}
+
+module.exports = function wcwidth(str) {
+ return wcswidth(str, DEFAULTS)
+}
+
+module.exports.config = function(opts) {
+ opts = defaults(opts || {}, DEFAULTS)
+ return function wcwidth(str) {
+ return wcswidth(str, opts)
+ }
+}
+
+/*
+ * The following functions define the column width of an ISO 10646
+ * character as follows:
+ * - The null character (U+0000) has a column width of 0.
+ * - Other C0/C1 control characters and DEL will lead to a return value
+ * of -1.
+ * - Non-spacing and enclosing combining characters (general category
+ * code Mn or Me in the
+ * Unicode database) have a column width of 0.
+ * - SOFT HYPHEN (U+00AD) has a column width of 1.
+ * - Other format characters (general category code Cf in the Unicode
+ * database) and ZERO WIDTH
+ * SPACE (U+200B) have a column width of 0.
+ * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)
+ * have a column width of 0.
+ * - Spacing characters in the East Asian Wide (W) or East Asian
+ * Full-width (F) category as
+ * defined in Unicode Technical Report #11 have a column width of 2.
+ * - All remaining characters (including all printable ISO 8859-1 and
+ * WGL4 characters, Unicode control characters, etc.) have a column
+ * width of 1.
+ * This implementation assumes that characters are encoded in ISO 10646.
+*/
+
+function wcswidth(str, opts) {
+ if (typeof str !== 'string') return wcwidth(str, opts)
+
+ var s = 0
+ for (var i = 0; i < str.length; i++) {
+ var n = wcwidth(str.charCodeAt(i), opts)
+ if (n < 0) return -1
+ s += n
+ }
+
+ return s
+}
+
+function wcwidth(ucs, opts) {
+ // test for 8-bit control characters
+ if (ucs === 0) return opts.nul
+ if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) return opts.control
+
+ // binary search in table of non-spacing characters
+ if (bisearch(ucs)) return 0
+
+ // if we arrive here, ucs is not a combining or C0/C1 control character
+ return 1 +
+ (ucs >= 0x1100 &&
+ (ucs <= 0x115f || // Hangul Jamo init. consonants
+ ucs == 0x2329 || ucs == 0x232a ||
+ (ucs >= 0x2e80 && ucs <= 0xa4cf &&
+ ucs != 0x303f) || // CJK ... Yi
+ (ucs >= 0xac00 && ucs <= 0xd7a3) || // Hangul Syllables
+ (ucs >= 0xf900 && ucs <= 0xfaff) || // CJK Compatibility Ideographs
+ (ucs >= 0xfe10 && ucs <= 0xfe19) || // Vertical forms
+ (ucs >= 0xfe30 && ucs <= 0xfe6f) || // CJK Compatibility Forms
+ (ucs >= 0xff00 && ucs <= 0xff60) || // Fullwidth Forms
+ (ucs >= 0xffe0 && ucs <= 0xffe6) ||
+ (ucs >= 0x20000 && ucs <= 0x2fffd) ||
+ (ucs >= 0x30000 && ucs <= 0x3fffd)));
+}
+
+function bisearch(ucs) {
+ var min = 0
+ var max = combining.length - 1
+ var mid
+
+ if (ucs < combining[0][0] || ucs > combining[max][1]) return false
+
+ while (max >= min) {
+ mid = Math.floor((min + max) / 2)
+ if (ucs > combining[mid][1]) min = mid + 1
+ else if (ucs < combining[mid][0]) max = mid - 1
+ else return true
+ }
+
+ return false
+}
diff --git a/node_modules/wcwidth/package.json b/node_modules/wcwidth/package.json
new file mode 100644
index 0000000..50bda2f
--- /dev/null
+++ b/node_modules/wcwidth/package.json
@@ -0,0 +1,76 @@
+{
+ "_args": [
+ [
+ "wcwidth@1.0.1",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "wcwidth@1.0.1",
+ "_id": "wcwidth@1.0.1",
+ "_inBundle": false,
+ "_integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
+ "_location": "/wcwidth",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "wcwidth@1.0.1",
+ "name": "wcwidth",
+ "escapedName": "wcwidth",
+ "rawSpec": "1.0.1",
+ "saveSpec": null,
+ "fetchSpec": "1.0.1"
+ },
+ "_requiredBy": [
+ "/ora"
+ ],
+ "_resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+ "_spec": "1.0.1",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Tim Oxley"
+ },
+ "bugs": {
+ "url": "https://github.com/timoxley/wcwidth/issues"
+ },
+ "contributors": [
+ {
+ "name": "Woong Jun",
+ "email": "woong.jun@gmail.com",
+ "url": "http://code.woong.org/"
+ }
+ ],
+ "dependencies": {
+ "defaults": "^1.0.3"
+ },
+ "description": "Port of C's wcwidth() and wcswidth()",
+ "devDependencies": {
+ "tape": "^4.5.1"
+ },
+ "directories": {
+ "doc": "docs",
+ "test": "test"
+ },
+ "homepage": "https://github.com/timoxley/wcwidth#readme",
+ "keywords": [
+ "wide character",
+ "wc",
+ "wide character string",
+ "wcs",
+ "terminal",
+ "width",
+ "wcwidth",
+ "wcswidth"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "wcwidth",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/timoxley/wcwidth.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "version": "1.0.1"
+}
diff --git a/node_modules/wcwidth/test/index.js b/node_modules/wcwidth/test/index.js
new file mode 100644
index 0000000..5180599
--- /dev/null
+++ b/node_modules/wcwidth/test/index.js
@@ -0,0 +1,64 @@
+"use strict"
+
+var wcwidth = require('../')
+var test = require('tape')
+
+test('handles regular strings', function(t) {
+ t.strictEqual(wcwidth('abc'), 3)
+ t.end()
+})
+
+test('handles multibyte strings', function(t) {
+ t.strictEqual(wcwidth('字的模块'), 8)
+ t.end()
+})
+
+test('handles multibyte characters mixed with regular characters', function(t) {
+ t.strictEqual(wcwidth('abc 字的模块'), 12)
+ t.end()
+})
+
+test('ignores control characters e.g. \\n', function(t) {
+ t.strictEqual(wcwidth('abc\n字的模块\ndef'), 14)
+ t.end()
+})
+
+test('ignores bad input', function(t) {
+ t.strictEqual(wcwidth(''), 0)
+ t.strictEqual(wcwidth(3), 0)
+ t.strictEqual(wcwidth({}), 0)
+ t.strictEqual(wcwidth([]), 0)
+ t.strictEqual(wcwidth(), 0)
+ t.end()
+})
+
+test('ignores nul (charcode 0)', function(t) {
+ t.strictEqual(wcwidth(String.fromCharCode(0)), 0)
+ t.end()
+})
+
+test('ignores nul mixed with chars', function(t) {
+ t.strictEqual(wcwidth('a' + String.fromCharCode(0) + '\n字的'), 5)
+ t.end()
+})
+
+test('can have custom value for nul', function(t) {
+ t.strictEqual(wcwidth.config({
+ nul: 10
+ })(String.fromCharCode(0) + 'a字的'), 15)
+ t.end()
+})
+
+test('can have custom control char value', function(t) {
+ t.strictEqual(wcwidth.config({
+ control: 1
+ })('abc\n字的模块\ndef'), 16)
+ t.end()
+})
+
+test('negative custom control chars == -1', function(t) {
+ t.strictEqual(wcwidth.config({
+ control: -1
+ })('abc\n字的模块\ndef'), -1)
+ t.end()
+})
diff --git a/node_modules/wrappy/LICENSE b/node_modules/wrappy/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/node_modules/wrappy/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/wrappy/README.md b/node_modules/wrappy/README.md
new file mode 100644
index 0000000..98eab25
--- /dev/null
+++ b/node_modules/wrappy/README.md
@@ -0,0 +1,36 @@
+# wrappy
+
+Callback wrapping utility
+
+## USAGE
+
+```javascript
+var wrappy = require("wrappy")
+
+// var wrapper = wrappy(wrapperFunction)
+
+// make sure a cb is called only once
+// See also: http://npm.im/once for this specific use case
+var once = wrappy(function (cb) {
+ var called = false
+ return function () {
+ if (called) return
+ called = true
+ return cb.apply(this, arguments)
+ }
+})
+
+function printBoo () {
+ console.log('boo')
+}
+// has some rando property
+printBoo.iAmBooPrinter = true
+
+var onlyPrintOnce = once(printBoo)
+
+onlyPrintOnce() // prints 'boo'
+onlyPrintOnce() // does nothing
+
+// random property is retained!
+assert.equal(onlyPrintOnce.iAmBooPrinter, true)
+```
diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json
new file mode 100644
index 0000000..5ce89a8
--- /dev/null
+++ b/node_modules/wrappy/package.json
@@ -0,0 +1,61 @@
+{
+ "_args": [
+ [
+ "wrappy@1.0.2",
+ "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode"
+ ]
+ ],
+ "_from": "wrappy@1.0.2",
+ "_id": "wrappy@1.0.2",
+ "_inBundle": false,
+ "_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "_location": "/wrappy",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "wrappy@1.0.2",
+ "name": "wrappy",
+ "escapedName": "wrappy",
+ "rawSpec": "1.0.2",
+ "saveSpec": null,
+ "fetchSpec": "1.0.2"
+ },
+ "_requiredBy": [
+ "/once"
+ ],
+ "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "_spec": "1.0.2",
+ "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/wrappy/issues"
+ },
+ "dependencies": {},
+ "description": "Callback wrapping utility",
+ "devDependencies": {
+ "tap": "^2.3.1"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "files": [
+ "wrappy.js"
+ ],
+ "homepage": "https://github.com/npm/wrappy",
+ "license": "ISC",
+ "main": "wrappy.js",
+ "name": "wrappy",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/wrappy.git"
+ },
+ "scripts": {
+ "test": "tap --coverage test/*.js"
+ },
+ "version": "1.0.2"
+}
diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js
new file mode 100644
index 0000000..bb7e7d6
--- /dev/null
+++ b/node_modules/wrappy/wrappy.js
@@ -0,0 +1,33 @@
+// Returns a wrapper function that returns a wrapped callback
+// The wrapper function should do some stuff, and return a
+// presumably different callback function.
+// This makes sure that own properties are retained, so that
+// decorations and such are not lost along the way.
+module.exports = wrappy
+function wrappy (fn, cb) {
+ if (fn && cb) return wrappy(fn)(cb)
+
+ if (typeof fn !== 'function')
+ throw new TypeError('need wrapper function')
+
+ Object.keys(fn).forEach(function (k) {
+ wrapper[k] = fn[k]
+ })
+
+ return wrapper
+
+ function wrapper() {
+ var args = new Array(arguments.length)
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+ var ret = fn.apply(this, args)
+ var cb = args[args.length-1]
+ if (typeof ret === 'function' && ret !== cb) {
+ Object.keys(cb).forEach(function (k) {
+ ret[k] = cb[k]
+ })
+ }
+ return ret
+ }
+}
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..d02799c
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,401 @@
+{
+ "name": "electrode",
+ "version": "1.0.1",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "@tokenizer/token": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz",
+ "integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w=="
+ },
+ "@types/debug": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz",
+ "integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ=="
+ },
+ "@types/node": {
+ "version": "14.14.31",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz",
+ "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g=="
+ },
+ "@types/readable-stream": {
+ "version": "2.3.9",
+ "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.9.tgz",
+ "integrity": "sha512-sqsgQqFT7HmQz/V5jH1O0fvQQnXAJO46Gg9LRO/JPfjmVmGUlcx831TZZO3Y3HtWhIkzf3kTsNT0Z0kzIhIvZw==",
+ "requires": {
+ "@types/node": "*",
+ "safe-buffer": "*"
+ }
+ },
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "base64-js": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
+ "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
+ },
+ "bl": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz",
+ "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==",
+ "requires": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "buffer": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
+ "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
+ "requires": {
+ "base64-js": "^1.0.2",
+ "ieee754": "^1.1.4"
+ }
+ },
+ "chalk": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+ "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "chownr": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
+ },
+ "cli-cursor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
+ "requires": {
+ "restore-cursor": "^3.1.0"
+ }
+ },
+ "cli-spinners": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz",
+ "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ=="
+ },
+ "clone": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4="
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "defaults": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
+ "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
+ "requires": {
+ "clone": "^1.0.2"
+ }
+ },
+ "end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "requires": {
+ "once": "^1.4.0"
+ }
+ },
+ "file-type": {
+ "version": "16.2.0",
+ "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.2.0.tgz",
+ "integrity": "sha512-1Wwww3mmZCMmLjBfslCluwt2mxH80GsAXYrvPnfQ42G1EGWag336kB1iyCgyn7UXiKY3cJrNykXPrCwA7xb5Ag==",
+ "requires": {
+ "readable-web-to-node-stream": "^3.0.0",
+ "strtok3": "^6.0.3",
+ "token-types": "^2.0.0",
+ "typedarray-to-buffer": "^3.1.5"
+ }
+ },
+ "formidable": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz",
+ "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q=="
+ },
+ "fs-constants": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
+ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+ },
+ "ieee754": {
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
+ "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "is-interactive": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
+ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w=="
+ },
+ "is-typedarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
+ },
+ "log-symbols": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz",
+ "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==",
+ "requires": {
+ "chalk": "^4.0.0"
+ }
+ },
+ "mime": {
+ "version": "2.4.6",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
+ "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA=="
+ },
+ "mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
+ },
+ "mkdirp-classic": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
+ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
+ },
+ "mute-stream": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
+ },
+ "ncp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz",
+ "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M="
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "requires": {
+ "mimic-fn": "^2.1.0"
+ }
+ },
+ "ora": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/ora/-/ora-5.1.0.tgz",
+ "integrity": "sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==",
+ "requires": {
+ "chalk": "^4.1.0",
+ "cli-cursor": "^3.1.0",
+ "cli-spinners": "^2.4.0",
+ "is-interactive": "^1.0.0",
+ "log-symbols": "^4.0.0",
+ "mute-stream": "0.0.8",
+ "strip-ansi": "^6.0.0",
+ "wcwidth": "^1.0.1"
+ }
+ },
+ "peek-readable": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-3.1.3.tgz",
+ "integrity": "sha512-mpAcysyRJxmICBcBa5IXH7SZPvWkcghm6Fk8RekoS3v+BpbSzlZzuWbMx+GXrlUwESi9qHar4nVEZNMKylIHvg=="
+ },
+ "progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="
+ },
+ "pump": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "requires": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ },
+ "readable-web-to-node-stream": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.1.tgz",
+ "integrity": "sha512-4zDC6CvjUyusN7V0QLsXVB7pJCD9+vtrM9bYDRv6uBQ+SKfx36rp5AFNPRgh9auKRul/a1iFZJYXcCbwRL+SaA==",
+ "requires": {
+ "@types/readable-stream": "^2.3.9",
+ "readable-stream": "^3.6.0"
+ }
+ },
+ "restore-cursor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
+ "requires": {
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
+ },
+ "signal-exit": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
+ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
+ },
+ "string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "requires": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ },
+ "strtok3": {
+ "version": "6.0.8",
+ "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.0.8.tgz",
+ "integrity": "sha512-QLgv+oiXwXgCgp2PdPPa+Jpp4D9imK9e/0BsyfeFMr6QL6wMVqoVn9+OXQ9I7MZbmUzN6lmitTJ09uwS2OmGcw==",
+ "requires": {
+ "@tokenizer/token": "^0.1.1",
+ "@types/debug": "^4.1.5",
+ "peek-readable": "^3.1.3"
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "tar-fs": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz",
+ "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==",
+ "requires": {
+ "chownr": "^1.1.1",
+ "mkdirp-classic": "^0.5.2",
+ "pump": "^3.0.0",
+ "tar-stream": "^2.0.0"
+ }
+ },
+ "tar-stream": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.4.tgz",
+ "integrity": "sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==",
+ "requires": {
+ "bl": "^4.0.3",
+ "end-of-stream": "^1.4.1",
+ "fs-constants": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.1"
+ }
+ },
+ "token-types": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/token-types/-/token-types-2.1.1.tgz",
+ "integrity": "sha512-wnQcqlreS6VjthyHO3Y/kpK/emflxDBNhlNUPfh7wE39KnuDdOituXomIbyI79vBtF0Ninpkh72mcuRHo+RG3Q==",
+ "requires": {
+ "@tokenizer/token": "^0.1.1",
+ "ieee754": "^1.2.1"
+ },
+ "dependencies": {
+ "ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
+ }
+ }
+ },
+ "typedarray-to-buffer": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+ "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+ "requires": {
+ "is-typedarray": "^1.0.0"
+ }
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ },
+ "uuid": {
+ "version": "8.3.1",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz",
+ "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg=="
+ },
+ "wcwidth": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+ "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
+ "requires": {
+ "defaults": "^1.0.3"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..953e7af
--- /dev/null
+++ b/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "electrode",
+ "version": "1.0.1",
+ "description": "A fast and rock solid webserver for FNS Neutron",
+ "main": "index.js",
+ "dependencies": {
+ "chalk": "^4.1.0",
+ "file-type": "^16.2.0",
+ "formidable": "^1.2.2",
+ "mime": "^2.4.6",
+ "ncp": "^2.0.0",
+ "ora": "^5.1.0",
+ "progress": "^2.0.3",
+ "tar-fs": "^2.1.0",
+ "uuid": "^8.3.1"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "test": "node index.js"
+ },
+ "author": "Minteck Projects",
+ "license": "GPL-3.0-or-later"
+}
diff --git a/php/cache.js b/php/cache.js
new file mode 100644
index 0000000..25c47be
--- /dev/null
+++ b/php/cache.js
@@ -0,0 +1,90 @@
+const uuid = require('uuid');
+const fs = require('fs');
+const url = require('url');
+const path = require('path');
+const os = require('os');
+
+function addPhpServerVariable(server, name, value) {
+ if (typeof value == "string") {
+ return server + "\n$_SERVER['" + name.split("'").join("\\'") + "'] = \"" + value.split("\"").join("\\\"") + "\";";
+ } else {
+ return server + "\n$_SERVER['" + name.split("'").join("\\'") + "'] = " + value + ";";
+ }
+}
+
+module.exports = (req, res, file, post, files) => {
+ cid = uuid.v4();
+ fid = "PHP_" + cid;
+ parsed = url.parse(req.url, true);
+
+ content = "<?php\n\n$_PHPID = \"" + cid + "\";\nrequire \"headers.php\";\n\n"
+ + "\n$oldsrv = $_SERVER; $_SERVER = [];";
+ + "\n$__electrode_version = \"" + version + "\"";
+ content = addPhpServerVariable(content, "PHP_SELF", path.resolve(file));
+ content = addPhpServerVariable(content, "GATEWAY_INTERFACE", "CGI/1.1");
+ content = addPhpServerVariable(content, "SERVER_ADDR", Object.values(require('os').networkInterfaces()).reduce((r, list) => r.concat(list.reduce((rr, i) => rr.concat(i.family==='IPv4' && !i.internal && i.address || []), [])), [])[0]);
+ content = addPhpServerVariable(content, "SERVER_NAME", os.hostname());
+ content = addPhpServerVariable(content, "SERVER_SOFTWARE", config.product.name);
+ content = addPhpServerVariable(content, "SERVER_PROTOCOL", "HTTP/" + req.httpVersion);
+ content = addPhpServerVariable(content, "REQUEST_METHOD", req.method);
+ content = addPhpServerVariable(content, "REQUEST_TIME", REQUEST_START);
+ content = addPhpServerVariable(content, "REQUEST_TIME_FLOAT", REQUEST_START_FLOAT);
+ content = addPhpServerVariable(content, "QUERY_STRING", parsed.search);
+ content = addPhpServerVariable(content, "DOCUMENT_ROOT", path.resolve("./public"));
+ if (typeof req.headers["accept"] != "undefined") {
+ content = addPhpServerVariable(content, "HTTP_ACCEPT", req.headers["accept"]);
+ }
+ if (typeof req.headers["accept-charset"] != "undefined") {
+ content = addPhpServerVariable(content, "HTTP_ACCEPT_CHARSET", req.headers["accept-charset"]);
+ }
+ if (typeof req.headers["accept-encoding"] != "undefined") {
+ content = addPhpServerVariable(content, "HTTP_ACCEPT_ENCODING", req.headers["accept-encoding"]);
+ }
+ if (typeof req.headers["accept-language"] != "undefined") {
+ content = addPhpServerVariable(content, "HTTP_ACCEPT_LANGUAGE", req.headers["accept-language"]);
+ }
+ if (typeof req.headers["connection"] != "undefined") {
+ content = addPhpServerVariable(content, "HTTP_CONNECTION", req.headers["connection"]);
+ }
+ if (typeof req.headers["host"] != "undefined") {
+ content = addPhpServerVariable(content, "HTTP_HOST", req.headers["host"]);
+ }
+ content = addPhpServerVariable(content, "HTTP_REFERER", req.url);
+ if (typeof req.headers["user-agent"] != "undefined") {
+ content = addPhpServerVariable(content, "HTTP_USER_AGENT", req.headers["user-agent"]);
+ }
+ content = addPhpServerVariable(content, "REMOTE_ADDR", req.connection.remoteAddress);
+ content = addPhpServerVariable(content, "REMOTE_PORT", req.connection.remotePort);
+ content = addPhpServerVariable(content, "SCRIPT_FILENAME", path.resolve(file));
+ content = addPhpServerVariable(content, "SERVER_ADMIN", config.network.admin);
+ content = addPhpServerVariable(content, "SERVER_PORT", config.network.port);
+ content = addPhpServerVariable(content, "SERVER_SIGNATURE", "<address>" + config.product.name + " version " + version + "</address>");
+ content = addPhpServerVariable(content, "PATH_TRANSLATED", path.resolve(file));
+ content = addPhpServerVariable(content, "SCRIPT_NAME", file.substr("./public/".length));
+ content = addPhpServerVariable(content, "REQUEST_URI", parsed.pathname);
+ content = content + "\n$_FILES = [];";
+ content = content + "\n$_POST = [];";
+ content = content + "\n$_GET = [];";
+ Object.keys(parsed.query).forEach((key) => {
+ content = content + "\n$_GET[\"" + key.split("\"").join("\\\"").split("$").join("\\\$") + "\"] = \"" + parsed.query[key].split("\"").join("\\\"").split("$").join("\\\$") + "\";"
+ })
+ Object.keys(post).forEach((key) => {
+ content = content + "\n$_POST[\"" + key.split("\"").join("\\\"").split("$").join("\\\$") + "\"] = \"" + post[key].split("\"").join("\\\"").split("$").join("\\\$") + "\";"
+ })
+ if (typeof files == "object") {
+ Object.keys(files).forEach((key) => {
+ content = content + "\n$_FILES[\"" + key.split("\"").join("\\\"").split("$").join("\\\$") + "\"] = ['name' => \"" + files[key]["name"].split("\"").join("\\\"") + "\",'type' => \"" + files[key]["type"].split("\"").join("\\\"") + "\",'tmp_name' => \"" + files[key]["path"].split("\"").join("\\\"").split("$").join("\\\$") + "\",'error' => 0,'size' => " + files[key]["size"] + "];"
+ })
+ }
+ cookies = core.cookies(req);
+ Object.keys(cookies).forEach((key) => {
+ content = content + "\n$_COOKIE[\"" + key.split("\"").join("\\\"").split("$").join("\\\$") + "\"] = \"" + cookies[key].split("\"").join("\\\"").split("$").join("\\\$") + "\";"
+ })
+ content = content + "\nrequire_once \"" + file.split("\"").join("\\\"") + "\";\n\n__electrode_end_hooks();";
+
+ fs.writeFileSync("./cache/" + fid + ".php", content);
+ return [
+ "./cache/" + fid + ".php",
+ cid
+ ];
+}
diff --git a/php/cleanup.js b/php/cleanup.js
new file mode 100644
index 0000000..a3f37ea
--- /dev/null
+++ b/php/cleanup.js
@@ -0,0 +1,15 @@
+const fs = require('fs');
+
+module.exports = () => {
+ fs.readdir("./cache", (error, files) => {
+ if (error) {
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.yellow("warn:") + " unable to cleanup cache: " + error.message);
+ } else {
+ files.forEach((file) => {
+ if (file.startsWith("PHP_")) {
+ fs.unlink("./cache/" + file, () => {});
+ }
+ })
+ }
+ })
+} \ No newline at end of file
diff --git a/php/headers.php b/php/headers.php
new file mode 100644
index 0000000..d8518de
--- /dev/null
+++ b/php/headers.php
@@ -0,0 +1,8 @@
+<?php
+
+function __electrode_end_hooks() {
+ global $_PHPID;
+ file_put_contents("./cache/HAD_$_PHPID.json", json_encode(xdebug_get_headers(), JSON_PRETTY_PRINT));
+}
+
+$__electrode = true;
diff --git a/php/runtime.js b/php/runtime.js
new file mode 100644
index 0000000..ce2629d
--- /dev/null
+++ b/php/runtime.js
@@ -0,0 +1,31 @@
+const child = require('child_process');
+const util = require('util');
+const chalk = require('chalk');
+const exec = util.promisify(child.exec);
+
+module.exports = async ([file, id]) => {
+ startd = new Date();
+ try {
+ error = undefined;
+ var { stdout, stderr } = await exec("php \"" + file.split("\"").join("\\\"") + "\"");
+ } catch (e) {
+ error = e;
+ }
+ stopd = new Date();
+ diff = stopd - startd;
+
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.blueBright("php:") + " total run time: " + diff + "ms");
+
+ returnobj = {error: null, content: null, stderr: null, id: id};
+
+ if (error) {
+ returnobj.error = error;
+ returnobj.stderr = stderr;
+ } else {
+ php.cleanup()
+ returnobj.content = stdout;
+ returnobj.stderr = stderr;
+ }
+
+ return returnobj;
+} \ No newline at end of file
diff --git a/runtime.js b/runtime.js
new file mode 100644
index 0000000..4cfb589
--- /dev/null
+++ b/runtime.js
@@ -0,0 +1,64 @@
+const http = require('http');
+const chalk = require('chalk');
+const qs = require('querystring');
+const formidable = require('formidable');
+
+global.core = {
+ 'finder': require('./core/finder.js'),
+ 'access': require('./core/access.js'),
+ 'request': require('./core/request.js'),
+ 'headClean': require('./core/headClean.js'),
+ 'cookies': require('./core/cookies.js'),
+}
+
+global.php = {
+ 'runtime': require('./php/runtime.js'),
+ 'cache': require('./php/cache.js'),
+ 'cleanup': require('./php/cleanup.js'),
+}
+
+global.version = require('./package.json').version;
+
+try {
+ global.config = {
+ 'network': require('./config/network.json'),
+ 'product': require('./config/product.json'),
+ }
+} catch (e) {
+ console.error(chalk.gray(cluster.worker.id + " ") + chalk.red("error:") + " invalid config: " + e.message);
+ process.exit(2);
+}
+
+var server = http.createServer(function (req, res) {
+ global.REQUEST_START = Math.floor(new Date() / 1000)
+ global.REQUEST_START_FLOAT = new Date() / 1000
+ try {
+ if (req.method == 'POST') {
+ var form = new formidable.IncomingForm();
+ form.parse(req, function (err, fields, files) {
+ if (err) {
+ res.writeHead(500, { 'Content-Type': 'text/html' });
+ res.write('<html><head><title>' + error.name + ' - Internal error</title></head><body><h1>' + error.name + '</h1><p>Unable to process received data</p><hr><address>' + config.product.name + ' version ' + version + '</address></body></html>');
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.red("error:") + " " + error.name + ": " + error.message);
+ console.log(error.stack);
+ res.end();
+ } else {
+ core.request(req, res, fields, files);
+ }
+ });
+ } else {
+ var post = {};
+ core.request(req, res, post);
+ }
+ } catch (error) {
+ res.writeHead(500, { 'Content-Type': 'text/html' });
+ res.write('<html><head><title>' + error.name + ' - Internal error</title></head><body><h1>' + error.name + '</h1><p>An internal server error ocurred while trying to give back the file</p><hr><address>' + config.product.name + ' version ' + version + '</address></body></html>');
+ console.log(chalk.gray(cluster.worker.id + " ") + chalk.red("error:") + " " + error.name + ": " + error.message);
+ console.log(error.stack);
+ res.end();
+ }
+});
+
+server.listen(config.network.port);
+
+console.log(chalk.gray(cluster.worker.id + " ") + chalk.blue("info:") + " server listening on port " + config.network.port) \ No newline at end of file
diff --git a/shared/bootstrap.js b/shared/bootstrap.js
new file mode 100644
index 0000000..566be3a
--- /dev/null
+++ b/shared/bootstrap.js
@@ -0,0 +1,10 @@
+const chalk = require('chalk');
+
+for (let i = 0; i < __CLUSTER_CPUSCOUNT; i++) {
+ cluster.fork();
+}
+
+cluster.on('exit', (worker, code, signal) => {
+ console.log(chalk.yellow("warn: ") + `worker #${worker.id} with pid ${worker.process.pid} died with code ${code}, signal ${signal}`);
+ cluster.fork();
+}); \ No newline at end of file
diff --git a/shared/updates.js b/shared/updates.js
new file mode 100644
index 0000000..b3ea281
--- /dev/null
+++ b/shared/updates.js
@@ -0,0 +1,153 @@
+const http = require('http');
+const https = require('https');
+const chalk = require('chalk');
+const fs = require('fs');
+const tar = require('tar-fs');
+const ProgressBar = require('progress');
+var ncp = require('ncp').ncp;
+
+ncp.limit = 4;
+
+function erase(dir) {
+ if (fs.existsSync("./public/" + dir)) {
+ try {
+ fs.rmdirSync("./public/" + dir, { recursive: true })
+ } catch (e) {
+ console.log(chalk.yellow("warn: ") + "unable to delete folder " + dir);
+ }
+ }
+}
+
+function erasef(file) {
+ if (fs.existsSync("./public/" + file)) {
+ try {
+ fs.unlinkSync("./public/" + file)
+ } catch (e) {
+ console.log(chalk.yellow("warn: ") + "unable to delete file " + file);
+ }
+ }
+}
+
+module.exports = () => {
+ console.log(chalk.green("verb: ") + "loading update config...");
+ conf = require('../config/updates.json');
+
+ if (conf.check.ssl) {
+ lib = https;
+ } else {
+ lib = http;
+ }
+
+ const options = {
+ hostname: conf.check.host,
+ port: conf.check.port,
+ path: conf.check.path,
+ method: 'GET'
+ }
+
+ data = "";
+
+ const req = lib.request(options, res => {
+ if (res.statusCode != 200) {
+ console.log(chalk.yellow("warn: ") + "unable to check for updates: code " + res.statusCode);
+ global.__RUNNING = true;
+ if (!__SRUNNING) { require('./bootstrap.js'); global.__SRUNNING = true; }
+ return;
+ }
+
+ res.on('data', d => {
+ data = data + d;
+ })
+
+ res.on('end', () => {
+ trimmed = data.trim().split("-")[0]
+ console.log(chalk.blue("info: ") + "latest version: " + trimmed);
+ if (fs.existsSync("./public/api/version")) {
+ current = fs.readFileSync("./public/api/version").toString().trim().split("-")[0];
+ console.log(chalk.blue("info: ") + "installed version: " + current);
+ } else {
+ console.log(chalk.yellow("warn: ") + "the Neutron stack doesn't appears to be installed");
+ current = "0";
+ }
+ if (current == trimmed) {
+ console.log(chalk.blue("info: ") + "up to date, starting webserver...");
+ global.__RUNNING = true;
+ if (!__SRUNNING) { require('./bootstrap.js'); global.__SRUNNING = true; }
+ return;
+ } else {
+ console.log(chalk.blue("info: ") + "updating to " + trimmed + "...");
+
+ if (conf.update.ssl) {
+ lib = https;
+ } else {
+ lib = http;
+ }
+
+ var req = lib.request({
+ host: conf.update.host,
+ port: conf.update.port,
+ path: conf.update.path
+ });
+ console.log(chalk.blue("info: ") + "starting download...");
+
+ file = fs.createWriteStream("./cache/download.tar.gz");
+
+ req.on('response', function(res){
+ res.pipe(file);
+
+ console.log();
+ console.log(chalk.blue("info: ") + "writing on disk...");
+
+ res.on('end', function () {
+ console.log("\n" + chalk.blue("info: ") + "verifying update...");
+ fs.mkdirSync("./download");
+ fs.createReadStream("./cache/download.tar").pipe(tar.extract("./download", {
+ finish: () => {
+ fdir = fs.readdirSync("./download")[0];
+ dfile = fs.readdirSync("./download/" + fdir);
+ dfile.forEach((f) => {
+ fs.renameSync("./download/" + fdir + "/" + f, "./download/" + f);
+ })
+ fs.rmdirSync("./download/" + fdir);
+ erase("/api");
+ erase("/cms-special");
+ erase("/widgets");
+ erase("/resources/css");
+ erase("/resources/fonts");
+ erase("/resources/i18n");
+ erase("/resources/image");
+ erase("/resources/js");
+ erase("/resources/lib");
+ erase("/resources/private");
+ erasef("/resources/.htaccess");
+ erasef("/index.php");
+ console.log(chalk.blue("info: ") + "installing update...");
+ ncp("./download", "./public", function (err) {
+ if (err) {
+ console.log(chalk.yellow("warn: ") + "unable to install update: " + err.message);
+ global.__RUNNING = true;
+ if (!__SRUNNING) { require('./bootstrap.js'); global.__SRUNNING = true; }
+ return;
+ }
+ console.log(chalk.blue("info: ") + "update installed, starting webserver...");
+ global.__RUNNING = true;
+ if (!__SRUNNING) { require('./bootstrap.js'); global.__SRUNNING = true; }
+ return;
+ });
+ }
+ }));
+ });
+ });
+ }
+ })
+ })
+
+ req.on('error', error => {
+ console.log(chalk.yellow("warn: ") + "unable to check for updates: " + error.message);
+ global.__RUNNING = true;
+ if (!__SRUNNING) { require('./bootstrap.js'); global.__SRUNNING = true; }
+ return;
+ })
+
+ req.end()
+}
diff --git a/shared/updates.sh b/shared/updates.sh
new file mode 100644
index 0000000..4291665
--- /dev/null
+++ b/shared/updates.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+
+echo "updater: Downloading update..."
+
+wget https://github.com/Minteck-Projects/Neutron-Core/archive/trunk.zip &>/dev/null
+code=$?
+if [[ $code -eq 0 ]]; then
+ echo "updater: Success"
+else
+ echo "updater: Failed with code $code"
+ echo "updater: Cleaning up..."
+ rm -dr trunk.zip*
+ exit $code
+fi
+
+echo "updater: Extracting..."
+
+unzip trunk.zip
+code=$?
+if [[ $code -eq 0 || $code -eq 2 ]]; then
+ echo "updater: Success"
+else
+ echo "updater: Failed with code $code"
+ echo "updater: Cleaning up..."
+ rm -dr trunk.zip*
+ exit $code
+fi
+
+echo "updater: Please wait while Updater prepare Neutron-Core to be installed..."
+
+rm -dr ./public/api
+rm -dr ./public/cms-special
+rm -dr ./public/widgets
+rm -dr ./public/resources/css
+rm -dr ./public/resources/image
+rm -dr ./public/resources/fonts
+rm -dr ./public/resources/i18n
+rm -dr ./public/resources/js
+rm -dr ./public/resources/lib
+rm -dr ./public/resources/private
+rm -dr ./public/index.php
+
+echo "updater: Installing..."
+
+cp -r Neutron-Core-trunk/* ./public/
+code=$?
+if [[ $code -eq 0 ]]; then
+ echo "updater: Success"
+else
+ echo "updater: Failed with code $code"
+ echo "updater: Cleaning up..."
+ rm -dr trunk.zip*
+ exit $code
+fi
+
+rm -dr Neutron-Core-trunk/
+code=$?
+if [[ $code -eq 0 ]]; then
+ echo "updater: Success"
+else
+ echo "updater: Failed with code $code"
+ echo "updater: Cleaning up..."
+ rm -dr trunk.zip*
+ exit $code
+fi
+
+echo "updater: Updating version..."
+date +%Y%m%d-#-electrode > ./public/api/version
+code=$?
+if [[ $code -eq 0 ]]; then
+ echo "updater: Success"
+else
+ echo "updater: Failed with code $code"
+ echo "updater: Cleaning up..."
+ rm -dr trunk.zip*
+ exit $code
+fi
+
+echo "updater: Cleaning up..."
+rm -dr trunk.zip*