@wabot-dev/framework 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/channels/cmd/@cmd.js +1 -1
- package/dist/src/channels/cmd/CmdChannel.js +1 -1
- package/dist/src/channels/telegram/@telegram.js +1 -1
- package/dist/src/channels/telegram/TelegramChannel.js +1 -1
- package/dist/src/channels/whatsapp/@whatsapp.js +1 -1
- package/dist/src/channels/whatsapp/WhatsAppChannel.js +1 -1
- package/dist/src/channels/whatsapp/WhatsAppConnection.js +1 -1
- package/dist/src/channels/whatsapp/WhatsAppDevConnection.js +2 -2
- package/dist/src/channels/whatsapp/WhatsAppProdConnection.js +1 -1
- package/dist/src/controller/socket.io/SocketIO.js +1 -1
- package/dist/src/logger/Logger.js +1 -1
- package/dist/src/server/runChannel.js +1 -1
- package/dist/src/server/runServer.js +4 -4
- package/package.json +2 -1
- package/dist/src/_virtual/XMLHttpRequest.js +0 -7
- package/dist/src/_virtual/_commonjsHelpers.js +0 -32
- package/dist/src/_virtual/base64id.js +0 -3
- package/dist/src/_virtual/binary.js +0 -3
- package/dist/src/_virtual/bom-handling.js +0 -3
- package/dist/src/_virtual/broadcast-operator.js +0 -3
- package/dist/src/_virtual/browser.js +0 -3
- package/dist/src/_virtual/browser2.js +0 -3
- package/dist/src/_virtual/browser3.js +0 -3
- package/dist/src/_virtual/browser4.js +0 -3
- package/dist/src/_virtual/browser5.js +0 -3
- package/dist/src/_virtual/buffer-util.js +0 -3
- package/dist/src/_virtual/buffer-util2.js +0 -3
- package/dist/src/_virtual/buffer-util3.js +0 -3
- package/dist/src/_virtual/charset.js +0 -3
- package/dist/src/_virtual/charset2.js +0 -3
- package/dist/src/_virtual/client.js +0 -3
- package/dist/src/_virtual/cluster-adapter.js +0 -3
- package/dist/src/_virtual/commons.js +0 -3
- package/dist/src/_virtual/dbcs-codec.js +0 -3
- package/dist/src/_virtual/decodePacket.js +0 -3
- package/dist/src/_virtual/encodePacket.js +0 -3
- package/dist/src/_virtual/encoding.js +0 -3
- package/dist/src/_virtual/encoding2.js +0 -3
- package/dist/src/_virtual/engine.io.js +0 -3
- package/dist/src/_virtual/in-memory-adapter.js +0 -3
- package/dist/src/_virtual/index.js +0 -7
- package/dist/src/_virtual/index10.js +0 -3
- package/dist/src/_virtual/index11.js +0 -3
- package/dist/src/_virtual/index12.js +0 -3
- package/dist/src/_virtual/index13.js +0 -3
- package/dist/src/_virtual/index14.js +0 -3
- package/dist/src/_virtual/index15.js +0 -3
- package/dist/src/_virtual/index16.js +0 -3
- package/dist/src/_virtual/index17.js +0 -3
- package/dist/src/_virtual/index18.js +0 -3
- package/dist/src/_virtual/index19.js +0 -3
- package/dist/src/_virtual/index2.js +0 -7
- package/dist/src/_virtual/index20.js +0 -3
- package/dist/src/_virtual/index21.js +0 -3
- package/dist/src/_virtual/index22.js +0 -3
- package/dist/src/_virtual/index23.js +0 -3
- package/dist/src/_virtual/index24.js +0 -3
- package/dist/src/_virtual/index25.js +0 -3
- package/dist/src/_virtual/index26.js +0 -3
- package/dist/src/_virtual/index27.js +0 -3
- package/dist/src/_virtual/index28.js +0 -3
- package/dist/src/_virtual/index29.js +0 -3
- package/dist/src/_virtual/index3.js +0 -7
- package/dist/src/_virtual/index30.js +0 -3
- package/dist/src/_virtual/index31.js +0 -3
- package/dist/src/_virtual/index32.js +0 -3
- package/dist/src/_virtual/index33.js +0 -3
- package/dist/src/_virtual/index4.js +0 -3
- package/dist/src/_virtual/index5.js +0 -3
- package/dist/src/_virtual/index6.js +0 -3
- package/dist/src/_virtual/index7.js +0 -3
- package/dist/src/_virtual/index8.js +0 -6
- package/dist/src/_virtual/index9.js +0 -3
- package/dist/src/_virtual/inherits.js +0 -3
- package/dist/src/_virtual/inherits_browser.js +0 -3
- package/dist/src/_virtual/is-binary.js +0 -3
- package/dist/src/_virtual/language.js +0 -3
- package/dist/src/_virtual/language2.js +0 -3
- package/dist/src/_virtual/mediaType.js +0 -3
- package/dist/src/_virtual/mediaType2.js +0 -3
- package/dist/src/_virtual/namespace.js +0 -3
- package/dist/src/_virtual/node.js +0 -3
- package/dist/src/_virtual/node2.js +0 -3
- package/dist/src/_virtual/node3.js +0 -3
- package/dist/src/_virtual/node4.js +0 -3
- package/dist/src/_virtual/node5.js +0 -3
- package/dist/src/_virtual/parent-namespace.js +0 -3
- package/dist/src/_virtual/polling-jsonp.js +0 -3
- package/dist/src/_virtual/polling.js +0 -3
- package/dist/src/_virtual/polling2.js +0 -3
- package/dist/src/_virtual/receiver.js +0 -3
- package/dist/src/_virtual/sbcs-codec.js +0 -3
- package/dist/src/_virtual/sender.js +0 -3
- package/dist/src/_virtual/server.js +0 -3
- package/dist/src/_virtual/socket-types.js +0 -3
- package/dist/src/_virtual/socket.js +0 -3
- package/dist/src/_virtual/socket2.js +0 -3
- package/dist/src/_virtual/stream.js +0 -3
- package/dist/src/_virtual/transport.js +0 -3
- package/dist/src/_virtual/typed-events.js +0 -3
- package/dist/src/_virtual/userver.js +0 -3
- package/dist/src/_virtual/utf16.js +0 -3
- package/dist/src/_virtual/utf32.js +0 -3
- package/dist/src/_virtual/utf7.js +0 -3
- package/dist/src/_virtual/uws.js +0 -3
- package/dist/src/_virtual/validation.js +0 -3
- package/dist/src/_virtual/validation2.js +0 -3
- package/dist/src/_virtual/validation3.js +0 -3
- package/dist/src/_virtual/websocket-server.js +0 -3
- package/dist/src/_virtual/websocket.js +0 -7
- package/dist/src/_virtual/websocket2.js +0 -3
- package/dist/src/_virtual/websocket3.js +0 -3
- package/dist/src/_virtual/webtransport.js +0 -3
- package/dist/src/_virtual/yeast.js +0 -3
- package/dist/src/node_modules/@socket.io/component-emitter/lib/esm/index.js +0 -171
- package/dist/src/node_modules/base64id/lib/base64id.js +0 -117
- package/dist/src/node_modules/body-parser/index.js +0 -96
- package/dist/src/node_modules/body-parser/lib/read.js +0 -225
- package/dist/src/node_modules/body-parser/lib/types/json.js +0 -222
- package/dist/src/node_modules/body-parser/lib/types/raw.js +0 -90
- package/dist/src/node_modules/body-parser/lib/types/text.js +0 -95
- package/dist/src/node_modules/body-parser/lib/types/urlencoded.js +0 -194
- package/dist/src/node_modules/body-parser/lib/utils.js +0 -96
- package/dist/src/node_modules/bytes/index.js +0 -180
- package/dist/src/node_modules/call-bind-apply-helpers/actualApply.js +0 -24
- package/dist/src/node_modules/call-bind-apply-helpers/functionApply.js +0 -13
- package/dist/src/node_modules/call-bind-apply-helpers/functionCall.js +0 -13
- package/dist/src/node_modules/call-bind-apply-helpers/index.js +0 -29
- package/dist/src/node_modules/call-bind-apply-helpers/reflectApply.js +0 -13
- package/dist/src/node_modules/call-bound/index.js +0 -31
- package/dist/src/node_modules/content-type/index.js +0 -235
- package/dist/src/node_modules/cookie/index.js +0 -345
- package/dist/src/node_modules/cors/lib/index.js +0 -249
- package/dist/src/node_modules/debug/src/browser.js +0 -286
- package/dist/src/node_modules/debug/src/common.js +0 -303
- package/dist/src/node_modules/debug/src/index.js +0 -23
- package/dist/src/node_modules/debug/src/node.js +0 -279
- package/dist/src/node_modules/depd/index.js +0 -550
- package/dist/src/node_modules/dunder-proto/get.js +0 -42
- package/dist/src/node_modules/ee-first/index.js +0 -104
- package/dist/src/node_modules/engine.io/build/engine.io.js +0 -73
- package/dist/src/node_modules/engine.io/build/parser-v3/index.js +0 -429
- package/dist/src/node_modules/engine.io/build/parser-v3/utf8.js +0 -198
- package/dist/src/node_modules/engine.io/build/server.js +0 -808
- package/dist/src/node_modules/engine.io/build/socket.js +0 -469
- package/dist/src/node_modules/engine.io/build/transport.js +0 -131
- package/dist/src/node_modules/engine.io/build/transports/index.js +0 -37
- package/dist/src/node_modules/engine.io/build/transports/polling-jsonp.js +0 -53
- package/dist/src/node_modules/engine.io/build/transports/polling.js +0 -346
- package/dist/src/node_modules/engine.io/build/transports/websocket.js +0 -106
- package/dist/src/node_modules/engine.io/build/transports/webtransport.js +0 -76
- package/dist/src/node_modules/engine.io/build/transports-uws/index.js +0 -20
- package/dist/src/node_modules/engine.io/build/transports-uws/polling.js +0 -378
- package/dist/src/node_modules/engine.io/build/transports-uws/websocket.js +0 -85
- package/dist/src/node_modules/engine.io/build/userver.js +0 -292
- package/dist/src/node_modules/engine.io/node_modules/accepts/index.js +0 -250
- package/dist/src/node_modules/engine.io/node_modules/debug/src/browser.js +0 -285
- package/dist/src/node_modules/engine.io/node_modules/debug/src/common.js +0 -285
- package/dist/src/node_modules/engine.io/node_modules/debug/src/index.js +0 -23
- package/dist/src/node_modules/engine.io/node_modules/debug/src/node.js +0 -279
- package/dist/src/node_modules/engine.io/node_modules/mime-db/db.json.js +0 -10704
- package/dist/src/node_modules/engine.io/node_modules/mime-db/index.js +0 -24
- package/dist/src/node_modules/engine.io/node_modules/mime-types/index.js +0 -202
- package/dist/src/node_modules/engine.io/node_modules/negotiator/index.js +0 -96
- package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/charset.js +0 -179
- package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/encoding.js +0 -193
- package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/language.js +0 -188
- package/dist/src/node_modules/engine.io/node_modules/negotiator/lib/mediaType.js +0 -304
- package/dist/src/node_modules/engine.io/node_modules/ws/index.js +0 -28
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/buffer-util.js +0 -142
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/constants.js +0 -21
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/event-target.js +0 -303
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/extension.js +0 -214
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/limiter.js +0 -64
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/permessage-deflate.js +0 -528
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/receiver.js +0 -719
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/sender.js +0 -513
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/stream.js +0 -170
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/subprotocol.js +0 -73
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/validation.js +0 -141
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/websocket-server.js +0 -559
- package/dist/src/node_modules/engine.io/node_modules/ws/lib/websocket.js +0 -1363
- package/dist/src/node_modules/engine.io-client/build/esm/contrib/has-cors.js +0 -13
- package/dist/src/node_modules/engine.io-client/build/esm/contrib/parseqs.js +0 -36
- package/dist/src/node_modules/engine.io-client/build/esm/contrib/parseuri.js +0 -66
- package/dist/src/node_modules/engine.io-client/build/esm/globals.node.js +0 -92
- package/dist/src/node_modules/engine.io-client/build/esm/index.js +0 -17
- package/dist/src/node_modules/engine.io-client/build/esm/socket.js +0 -728
- package/dist/src/node_modules/engine.io-client/build/esm/transport.js +0 -143
- package/dist/src/node_modules/engine.io-client/build/esm/transports/index.js +0 -11
- package/dist/src/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +0 -256
- package/dist/src/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js +0 -21
- package/dist/src/node_modules/engine.io-client/build/esm/transports/polling.js +0 -146
- package/dist/src/node_modules/engine.io-client/build/esm/transports/websocket.js +0 -107
- package/dist/src/node_modules/engine.io-client/build/esm/transports/websocket.node.js +0 -48
- package/dist/src/node_modules/engine.io-client/build/esm/transports/webtransport.js +0 -83
- package/dist/src/node_modules/engine.io-client/build/esm/util.js +0 -62
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js +0 -142
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/constants.js +0 -21
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/event-target.js +0 -303
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/extension.js +0 -214
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/limiter.js +0 -64
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/permessage-deflate.js +0 -528
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/receiver.js +0 -719
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/sender.js +0 -513
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/stream.js +0 -170
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/subprotocol.js +0 -73
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/validation.js +0 -141
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/websocket-server.js +0 -559
- package/dist/src/node_modules/engine.io-client/node_modules/ws/lib/websocket.js +0 -1363
- package/dist/src/node_modules/engine.io-parser/build/cjs/commons.js +0 -29
- package/dist/src/node_modules/engine.io-parser/build/cjs/decodePacket.js +0 -70
- package/dist/src/node_modules/engine.io-parser/build/cjs/encodePacket.js +0 -51
- package/dist/src/node_modules/engine.io-parser/build/cjs/index.js +0 -179
- package/dist/src/node_modules/engine.io-parser/build/esm/commons.js +0 -15
- package/dist/src/node_modules/engine.io-parser/build/esm/decodePacket.js +0 -58
- package/dist/src/node_modules/engine.io-parser/build/esm/encodePacket.js +0 -36
- package/dist/src/node_modules/engine.io-parser/build/esm/index.js +0 -158
- package/dist/src/node_modules/es-define-property/index.js +0 -23
- package/dist/src/node_modules/es-errors/eval.js +0 -13
- package/dist/src/node_modules/es-errors/index.js +0 -13
- package/dist/src/node_modules/es-errors/range.js +0 -13
- package/dist/src/node_modules/es-errors/ref.js +0 -13
- package/dist/src/node_modules/es-errors/syntax.js +0 -13
- package/dist/src/node_modules/es-errors/type.js +0 -13
- package/dist/src/node_modules/es-errors/uri.js +0 -13
- package/dist/src/node_modules/es-object-atoms/index.js +0 -13
- package/dist/src/node_modules/function-bind/implementation.js +0 -93
- package/dist/src/node_modules/function-bind/index.js +0 -16
- package/dist/src/node_modules/get-intrinsic/index.js +0 -413
- package/dist/src/node_modules/get-proto/Object.getPrototypeOf.js +0 -17
- package/dist/src/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -13
- package/dist/src/node_modules/get-proto/index.js +0 -40
- package/dist/src/node_modules/gopd/gOPD.js +0 -13
- package/dist/src/node_modules/gopd/index.js +0 -26
- package/dist/src/node_modules/has-symbols/index.js +0 -25
- package/dist/src/node_modules/has-symbols/shams.js +0 -54
- package/dist/src/node_modules/hasown/index.js +0 -19
- package/dist/src/node_modules/http-errors/index.js +0 -306
- package/dist/src/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -598
- package/dist/src/node_modules/iconv-lite/encodings/dbcs-data.js +0 -206
- package/dist/src/node_modules/iconv-lite/encodings/index.js +0 -44
- package/dist/src/node_modules/iconv-lite/encodings/internal.js +0 -210
- package/dist/src/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -83
- package/dist/src/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -460
- package/dist/src/node_modules/iconv-lite/encodings/sbcs-data.js +0 -187
- package/dist/src/node_modules/iconv-lite/encodings/tables/big5-added.json.js +0 -506
- package/dist/src/node_modules/iconv-lite/encodings/tables/cp936.json.js +0 -2621
- package/dist/src/node_modules/iconv-lite/encodings/tables/cp949.json.js +0 -2380
- package/dist/src/node_modules/iconv-lite/encodings/tables/cp950.json.js +0 -729
- package/dist/src/node_modules/iconv-lite/encodings/tables/eucjp.json.js +0 -822
- package/dist/src/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json.js +0 -424
- package/dist/src/node_modules/iconv-lite/encodings/tables/gbk-added.json.js +0 -264
- package/dist/src/node_modules/iconv-lite/encodings/tables/shiftjis.json.js +0 -548
- package/dist/src/node_modules/iconv-lite/encodings/utf16.js +0 -206
- package/dist/src/node_modules/iconv-lite/encodings/utf32.js +0 -329
- package/dist/src/node_modules/iconv-lite/encodings/utf7.js +0 -297
- package/dist/src/node_modules/iconv-lite/lib/bom-handling.js +0 -61
- package/dist/src/node_modules/iconv-lite/lib/index.js +0 -192
- package/dist/src/node_modules/iconv-lite/lib/streams.js +0 -120
- package/dist/src/node_modules/inherits/inherits.js +0 -21
- package/dist/src/node_modules/inherits/inherits_browser.js +0 -38
- package/dist/src/node_modules/math-intrinsics/abs.js +0 -13
- package/dist/src/node_modules/math-intrinsics/floor.js +0 -13
- package/dist/src/node_modules/math-intrinsics/isNaN.js +0 -15
- package/dist/src/node_modules/math-intrinsics/max.js +0 -13
- package/dist/src/node_modules/math-intrinsics/min.js +0 -13
- package/dist/src/node_modules/math-intrinsics/pow.js +0 -13
- package/dist/src/node_modules/math-intrinsics/round.js +0 -13
- package/dist/src/node_modules/math-intrinsics/sign.js +0 -22
- package/dist/src/node_modules/media-typer/index.js +0 -153
- package/dist/src/node_modules/mime-db/db.json.js +0 -11656
- package/dist/src/node_modules/mime-db/index.js +0 -24
- package/dist/src/node_modules/mime-types/index.js +0 -226
- package/dist/src/node_modules/mime-types/mimeScore.js +0 -62
- package/dist/src/node_modules/ms/index.js +0 -172
- package/dist/src/node_modules/object-assign/index.js +0 -99
- package/dist/src/node_modules/object-inspect/index.js +0 -557
- package/dist/src/node_modules/object-inspect/util.inspect.js +0 -13
- package/dist/src/node_modules/on-finished/index.js +0 -245
- package/dist/src/node_modules/qs/lib/formats.js +0 -32
- package/dist/src/node_modules/qs/lib/index.js +0 -24
- package/dist/src/node_modules/qs/lib/parse.js +0 -339
- package/dist/src/node_modules/qs/lib/stringify.js +0 -369
- package/dist/src/node_modules/qs/lib/utils.js +0 -279
- package/dist/src/node_modules/raw-body/index.js +0 -351
- package/dist/src/node_modules/safer-buffer/safer.js +0 -88
- package/dist/src/node_modules/setprototypeof/index.js +0 -26
- package/dist/src/node_modules/side-channel/index.js +0 -58
- package/dist/src/node_modules/side-channel-list/index.js +0 -125
- package/dist/src/node_modules/side-channel-map/index.js +0 -82
- package/dist/src/node_modules/side-channel-weakmap/index.js +0 -99
- package/dist/src/node_modules/socket.io/dist/broadcast-operator.js +0 -448
- package/dist/src/node_modules/socket.io/dist/client.js +0 -281
- package/dist/src/node_modules/socket.io/dist/index.js +0 -837
- package/dist/src/node_modules/socket.io/dist/namespace.js +0 -597
- package/dist/src/node_modules/socket.io/dist/parent-namespace.js +0 -101
- package/dist/src/node_modules/socket.io/dist/socket-types.js +0 -21
- package/dist/src/node_modules/socket.io/dist/socket.js +0 -993
- package/dist/src/node_modules/socket.io/dist/typed-events.js +0 -92
- package/dist/src/node_modules/socket.io/dist/uws.js +0 -149
- package/dist/src/node_modules/socket.io/node_modules/accepts/index.js +0 -250
- package/dist/src/node_modules/socket.io/node_modules/debug/src/browser.js +0 -285
- package/dist/src/node_modules/socket.io/node_modules/debug/src/common.js +0 -285
- package/dist/src/node_modules/socket.io/node_modules/debug/src/index.js +0 -23
- package/dist/src/node_modules/socket.io/node_modules/debug/src/node.js +0 -279
- package/dist/src/node_modules/socket.io/node_modules/mime-db/db.json.js +0 -10704
- package/dist/src/node_modules/socket.io/node_modules/mime-db/index.js +0 -24
- package/dist/src/node_modules/socket.io/node_modules/mime-types/index.js +0 -202
- package/dist/src/node_modules/socket.io/node_modules/negotiator/index.js +0 -96
- package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/charset.js +0 -179
- package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/encoding.js +0 -193
- package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/language.js +0 -188
- package/dist/src/node_modules/socket.io/node_modules/negotiator/lib/mediaType.js +0 -304
- package/dist/src/node_modules/socket.io/package.json.js +0 -5
- package/dist/src/node_modules/socket.io/wrapper.js +0 -5
- package/dist/src/node_modules/socket.io-adapter/dist/cluster-adapter.js +0 -689
- package/dist/src/node_modules/socket.io-adapter/dist/contrib/yeast.js +0 -64
- package/dist/src/node_modules/socket.io-adapter/dist/in-memory-adapter.js +0 -407
- package/dist/src/node_modules/socket.io-adapter/dist/index.js +0 -24
- package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/browser.js +0 -285
- package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/common.js +0 -285
- package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/index.js +0 -23
- package/dist/src/node_modules/socket.io-adapter/node_modules/debug/src/node.js +0 -279
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/index.js +0 -28
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/buffer-util.js +0 -142
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/constants.js +0 -21
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/event-target.js +0 -303
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/extension.js +0 -214
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/limiter.js +0 -64
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/permessage-deflate.js +0 -528
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/receiver.js +0 -719
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/sender.js +0 -513
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/stream.js +0 -170
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/subprotocol.js +0 -73
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/validation.js +0 -141
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/websocket-server.js +0 -559
- package/dist/src/node_modules/socket.io-adapter/node_modules/ws/lib/websocket.js +0 -1363
- package/dist/src/node_modules/socket.io-client/build/esm/contrib/backo2.js +0 -68
- package/dist/src/node_modules/socket.io-client/build/esm/index.js +0 -50
- package/dist/src/node_modules/socket.io-client/build/esm/manager.js +0 -373
- package/dist/src/node_modules/socket.io-client/build/esm/on.js +0 -8
- package/dist/src/node_modules/socket.io-client/build/esm/socket.js +0 -884
- package/dist/src/node_modules/socket.io-client/build/esm/url.js +0 -63
- package/dist/src/node_modules/socket.io-parser/build/cjs/binary.js +0 -99
- package/dist/src/node_modules/socket.io-parser/build/cjs/index.js +0 -337
- package/dist/src/node_modules/socket.io-parser/build/cjs/is-binary.js +0 -65
- package/dist/src/node_modules/socket.io-parser/build/esm/binary.js +0 -86
- package/dist/src/node_modules/socket.io-parser/build/esm/index.js +0 -314
- package/dist/src/node_modules/socket.io-parser/build/esm/is-binary.js +0 -52
- package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/browser.js +0 -285
- package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/common.js +0 -285
- package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/index.js +0 -23
- package/dist/src/node_modules/socket.io-parser/node_modules/debug/src/node.js +0 -279
- package/dist/src/node_modules/statuses/codes.json.js +0 -67
- package/dist/src/node_modules/statuses/index.js +0 -157
- package/dist/src/node_modules/toidentifier/index.js +0 -41
- package/dist/src/node_modules/type-is/index.js +0 -263
- package/dist/src/node_modules/unpipe/index.js +0 -78
- package/dist/src/node_modules/vary/index.js +0 -159
- package/dist/src/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js +0 -702
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { __require as requireHttpErrors } from '../../http-errors/index.js';
|
|
2
|
-
import { __require as requireRawBody } from '../../raw-body/index.js';
|
|
3
|
-
import { __require as requireLib } from '../../iconv-lite/lib/index.js';
|
|
4
|
-
import { __require as requireOnFinished } from '../../on-finished/index.js';
|
|
5
|
-
import require$$4 from 'node:zlib';
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
* body-parser
|
|
9
|
-
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
10
|
-
* MIT Licensed
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
var read_1;
|
|
14
|
-
var hasRequiredRead;
|
|
15
|
-
|
|
16
|
-
function requireRead () {
|
|
17
|
-
if (hasRequiredRead) return read_1;
|
|
18
|
-
hasRequiredRead = 1;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Module dependencies.
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
var createError = requireHttpErrors();
|
|
26
|
-
var getBody = requireRawBody();
|
|
27
|
-
var iconv = requireLib();
|
|
28
|
-
var onFinished = requireOnFinished();
|
|
29
|
-
var zlib = require$$4;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Module exports.
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
read_1 = read;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Read a request into a buffer and parse.
|
|
39
|
-
*
|
|
40
|
-
* @param {object} req
|
|
41
|
-
* @param {object} res
|
|
42
|
-
* @param {function} next
|
|
43
|
-
* @param {function} parse
|
|
44
|
-
* @param {function} debug
|
|
45
|
-
* @param {object} options
|
|
46
|
-
* @private
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
function read (req, res, next, parse, debug, options) {
|
|
50
|
-
var length;
|
|
51
|
-
var opts = options;
|
|
52
|
-
var stream;
|
|
53
|
-
|
|
54
|
-
// read options
|
|
55
|
-
var encoding = opts.encoding !== null
|
|
56
|
-
? opts.encoding
|
|
57
|
-
: null;
|
|
58
|
-
var verify = opts.verify;
|
|
59
|
-
|
|
60
|
-
try {
|
|
61
|
-
// get the content stream
|
|
62
|
-
stream = contentstream(req, debug, opts.inflate);
|
|
63
|
-
length = stream.length;
|
|
64
|
-
stream.length = undefined;
|
|
65
|
-
} catch (err) {
|
|
66
|
-
return next(err)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// set raw-body options
|
|
70
|
-
opts.length = length;
|
|
71
|
-
opts.encoding = verify
|
|
72
|
-
? null
|
|
73
|
-
: encoding;
|
|
74
|
-
|
|
75
|
-
// assert charset is supported
|
|
76
|
-
if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) {
|
|
77
|
-
return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
|
|
78
|
-
charset: encoding.toLowerCase(),
|
|
79
|
-
type: 'charset.unsupported'
|
|
80
|
-
}))
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// read body
|
|
84
|
-
debug('read body');
|
|
85
|
-
getBody(stream, opts, function (error, body) {
|
|
86
|
-
if (error) {
|
|
87
|
-
var _error;
|
|
88
|
-
|
|
89
|
-
if (error.type === 'encoding.unsupported') {
|
|
90
|
-
// echo back charset
|
|
91
|
-
_error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
|
|
92
|
-
charset: encoding.toLowerCase(),
|
|
93
|
-
type: 'charset.unsupported'
|
|
94
|
-
});
|
|
95
|
-
} else {
|
|
96
|
-
// set status code on error
|
|
97
|
-
_error = createError(400, error);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// unpipe from stream and destroy
|
|
101
|
-
if (stream !== req) {
|
|
102
|
-
req.unpipe();
|
|
103
|
-
stream.destroy();
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// read off entire request
|
|
107
|
-
dump(req, function onfinished () {
|
|
108
|
-
next(createError(400, _error));
|
|
109
|
-
});
|
|
110
|
-
return
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// verify
|
|
114
|
-
if (verify) {
|
|
115
|
-
try {
|
|
116
|
-
debug('verify body');
|
|
117
|
-
verify(req, res, body, encoding);
|
|
118
|
-
} catch (err) {
|
|
119
|
-
next(createError(403, err, {
|
|
120
|
-
body: body,
|
|
121
|
-
type: err.type || 'entity.verify.failed'
|
|
122
|
-
}));
|
|
123
|
-
return
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// parse
|
|
128
|
-
var str = body;
|
|
129
|
-
try {
|
|
130
|
-
debug('parse body');
|
|
131
|
-
str = typeof body !== 'string' && encoding !== null
|
|
132
|
-
? iconv.decode(body, encoding)
|
|
133
|
-
: body;
|
|
134
|
-
req.body = parse(str, encoding);
|
|
135
|
-
} catch (err) {
|
|
136
|
-
next(createError(400, err, {
|
|
137
|
-
body: str,
|
|
138
|
-
type: err.type || 'entity.parse.failed'
|
|
139
|
-
}));
|
|
140
|
-
return
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
next();
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Get the content stream of the request.
|
|
149
|
-
*
|
|
150
|
-
* @param {object} req
|
|
151
|
-
* @param {function} debug
|
|
152
|
-
* @param {boolean} [inflate=true]
|
|
153
|
-
* @return {object}
|
|
154
|
-
* @api private
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
function contentstream (req, debug, inflate) {
|
|
158
|
-
var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase();
|
|
159
|
-
var length = req.headers['content-length'];
|
|
160
|
-
|
|
161
|
-
debug('content-encoding "%s"', encoding);
|
|
162
|
-
|
|
163
|
-
if (inflate === false && encoding !== 'identity') {
|
|
164
|
-
throw createError(415, 'content encoding unsupported', {
|
|
165
|
-
encoding: encoding,
|
|
166
|
-
type: 'encoding.unsupported'
|
|
167
|
-
})
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
if (encoding === 'identity') {
|
|
171
|
-
req.length = length;
|
|
172
|
-
return req
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
var stream = createDecompressionStream(encoding, debug);
|
|
176
|
-
req.pipe(stream);
|
|
177
|
-
return stream
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Create a decompression stream for the given encoding.
|
|
182
|
-
* @param {string} encoding
|
|
183
|
-
* @param {function} debug
|
|
184
|
-
* @return {object}
|
|
185
|
-
* @api private
|
|
186
|
-
*/
|
|
187
|
-
function createDecompressionStream (encoding, debug) {
|
|
188
|
-
switch (encoding) {
|
|
189
|
-
case 'deflate':
|
|
190
|
-
debug('inflate body');
|
|
191
|
-
return zlib.createInflate()
|
|
192
|
-
case 'gzip':
|
|
193
|
-
debug('gunzip body');
|
|
194
|
-
return zlib.createGunzip()
|
|
195
|
-
case 'br':
|
|
196
|
-
debug('brotli decompress body');
|
|
197
|
-
return zlib.createBrotliDecompress()
|
|
198
|
-
default:
|
|
199
|
-
throw createError(415, 'unsupported content encoding "' + encoding + '"', {
|
|
200
|
-
encoding: encoding,
|
|
201
|
-
type: 'encoding.unsupported'
|
|
202
|
-
})
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Dump the contents of a request.
|
|
208
|
-
*
|
|
209
|
-
* @param {object} req
|
|
210
|
-
* @param {function} callback
|
|
211
|
-
* @api private
|
|
212
|
-
*/
|
|
213
|
-
|
|
214
|
-
function dump (req, callback) {
|
|
215
|
-
if (onFinished.isFinished(req)) {
|
|
216
|
-
callback(null);
|
|
217
|
-
} else {
|
|
218
|
-
onFinished(req, callback);
|
|
219
|
-
req.resume();
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return read_1;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export { requireRead as __require };
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { __require as requireHttpErrors } from '../../../http-errors/index.js';
|
|
2
|
-
import { __require as requireSrc } from '../../../debug/src/index.js';
|
|
3
|
-
import { __require as requireOnFinished } from '../../../on-finished/index.js';
|
|
4
|
-
import { __require as requireRead } from '../read.js';
|
|
5
|
-
import { __require as requireTypeIs } from '../../../type-is/index.js';
|
|
6
|
-
import { __require as requireUtils } from '../utils.js';
|
|
7
|
-
|
|
8
|
-
/*!
|
|
9
|
-
* body-parser
|
|
10
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
11
|
-
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
12
|
-
* MIT Licensed
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
var json_1;
|
|
16
|
-
var hasRequiredJson;
|
|
17
|
-
|
|
18
|
-
function requireJson () {
|
|
19
|
-
if (hasRequiredJson) return json_1;
|
|
20
|
-
hasRequiredJson = 1;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Module dependencies.
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
var createError = requireHttpErrors();
|
|
28
|
-
var debug = requireSrc()('body-parser:json');
|
|
29
|
-
var isFinished = requireOnFinished().isFinished;
|
|
30
|
-
var read = requireRead();
|
|
31
|
-
var typeis = requireTypeIs();
|
|
32
|
-
var { getCharset, normalizeOptions } = requireUtils();
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Module exports.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
json_1 = json;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* RegExp to match the first non-space in a string.
|
|
42
|
-
*
|
|
43
|
-
* Allowed whitespace is defined in RFC 7159:
|
|
44
|
-
*
|
|
45
|
-
* ws = *(
|
|
46
|
-
* %x20 / ; Space
|
|
47
|
-
* %x09 / ; Horizontal tab
|
|
48
|
-
* %x0A / ; Line feed or New line
|
|
49
|
-
* %x0D ) ; Carriage return
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/; // eslint-disable-line no-control-regex
|
|
53
|
-
|
|
54
|
-
var JSON_SYNTAX_CHAR = '#';
|
|
55
|
-
var JSON_SYNTAX_REGEXP = /#+/g;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Create a middleware to parse JSON bodies.
|
|
59
|
-
*
|
|
60
|
-
* @param {object} [options]
|
|
61
|
-
* @return {function}
|
|
62
|
-
* @public
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
function json (options) {
|
|
66
|
-
var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'application/json');
|
|
67
|
-
|
|
68
|
-
var reviver = options?.reviver;
|
|
69
|
-
var strict = options?.strict !== false;
|
|
70
|
-
|
|
71
|
-
function parse (body) {
|
|
72
|
-
if (body.length === 0) {
|
|
73
|
-
// special-case empty json body, as it's a common client-side mistake
|
|
74
|
-
// TODO: maybe make this configurable or part of "strict" option
|
|
75
|
-
return {}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (strict) {
|
|
79
|
-
var first = firstchar(body);
|
|
80
|
-
|
|
81
|
-
if (first !== '{' && first !== '[') {
|
|
82
|
-
debug('strict violation');
|
|
83
|
-
throw createStrictSyntaxError(body, first)
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
try {
|
|
88
|
-
debug('parse json');
|
|
89
|
-
return JSON.parse(body, reviver)
|
|
90
|
-
} catch (e) {
|
|
91
|
-
throw normalizeJsonSyntaxError(e, {
|
|
92
|
-
message: e.message,
|
|
93
|
-
stack: e.stack
|
|
94
|
-
})
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return function jsonParser (req, res, next) {
|
|
99
|
-
if (isFinished(req)) {
|
|
100
|
-
debug('body already parsed');
|
|
101
|
-
next();
|
|
102
|
-
return
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (!('body' in req)) {
|
|
106
|
-
req.body = undefined;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// skip requests without bodies
|
|
110
|
-
if (!typeis.hasBody(req)) {
|
|
111
|
-
debug('skip empty body');
|
|
112
|
-
next();
|
|
113
|
-
return
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
debug('content-type %j', req.headers['content-type']);
|
|
117
|
-
|
|
118
|
-
// determine if request should be parsed
|
|
119
|
-
if (!shouldParse(req)) {
|
|
120
|
-
debug('skip parsing');
|
|
121
|
-
next();
|
|
122
|
-
return
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// assert charset per RFC 7159 sec 8.1
|
|
126
|
-
var charset = getCharset(req) || 'utf-8';
|
|
127
|
-
if (charset.slice(0, 4) !== 'utf-') {
|
|
128
|
-
debug('invalid charset');
|
|
129
|
-
next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', {
|
|
130
|
-
charset: charset,
|
|
131
|
-
type: 'charset.unsupported'
|
|
132
|
-
}));
|
|
133
|
-
return
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// read
|
|
137
|
-
read(req, res, next, parse, debug, {
|
|
138
|
-
encoding: charset,
|
|
139
|
-
inflate,
|
|
140
|
-
limit,
|
|
141
|
-
verify
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Create strict violation syntax error matching native error.
|
|
148
|
-
*
|
|
149
|
-
* @param {string} str
|
|
150
|
-
* @param {string} char
|
|
151
|
-
* @return {Error}
|
|
152
|
-
* @private
|
|
153
|
-
*/
|
|
154
|
-
|
|
155
|
-
function createStrictSyntaxError (str, char) {
|
|
156
|
-
var index = str.indexOf(char);
|
|
157
|
-
var partial = '';
|
|
158
|
-
|
|
159
|
-
if (index !== -1) {
|
|
160
|
-
partial = str.substring(0, index) + JSON_SYNTAX_CHAR;
|
|
161
|
-
|
|
162
|
-
for (var i = index + 1; i < str.length; i++) {
|
|
163
|
-
partial += JSON_SYNTAX_CHAR;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
try {
|
|
168
|
-
JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation')
|
|
169
|
-
} catch (e) {
|
|
170
|
-
return normalizeJsonSyntaxError(e, {
|
|
171
|
-
message: e.message.replace(JSON_SYNTAX_REGEXP, function (placeholder) {
|
|
172
|
-
return str.substring(index, index + placeholder.length)
|
|
173
|
-
}),
|
|
174
|
-
stack: e.stack
|
|
175
|
-
})
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Get the first non-whitespace character in a string.
|
|
181
|
-
*
|
|
182
|
-
* @param {string} str
|
|
183
|
-
* @return {function}
|
|
184
|
-
* @private
|
|
185
|
-
*/
|
|
186
|
-
|
|
187
|
-
function firstchar (str) {
|
|
188
|
-
var match = FIRST_CHAR_REGEXP.exec(str);
|
|
189
|
-
|
|
190
|
-
return match
|
|
191
|
-
? match[1]
|
|
192
|
-
: undefined
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Normalize a SyntaxError for JSON.parse.
|
|
197
|
-
*
|
|
198
|
-
* @param {SyntaxError} error
|
|
199
|
-
* @param {object} obj
|
|
200
|
-
* @return {SyntaxError}
|
|
201
|
-
*/
|
|
202
|
-
|
|
203
|
-
function normalizeJsonSyntaxError (error, obj) {
|
|
204
|
-
var keys = Object.getOwnPropertyNames(error);
|
|
205
|
-
|
|
206
|
-
for (var i = 0; i < keys.length; i++) {
|
|
207
|
-
var key = keys[i];
|
|
208
|
-
if (key !== 'stack' && key !== 'message') {
|
|
209
|
-
delete error[key];
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// replace stack before message for Node.js 0.10 and below
|
|
214
|
-
error.stack = obj.stack.replace(error.message, obj.message);
|
|
215
|
-
error.message = obj.message;
|
|
216
|
-
|
|
217
|
-
return error
|
|
218
|
-
}
|
|
219
|
-
return json_1;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export { requireJson as __require };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { __require as requireSrc } from '../../../debug/src/index.js';
|
|
2
|
-
import { __require as requireOnFinished } from '../../../on-finished/index.js';
|
|
3
|
-
import { __require as requireRead } from '../read.js';
|
|
4
|
-
import { __require as requireTypeIs } from '../../../type-is/index.js';
|
|
5
|
-
import { __require as requireUtils } from '../utils.js';
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
* body-parser
|
|
9
|
-
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
10
|
-
* MIT Licensed
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
var raw_1;
|
|
14
|
-
var hasRequiredRaw;
|
|
15
|
-
|
|
16
|
-
function requireRaw () {
|
|
17
|
-
if (hasRequiredRaw) return raw_1;
|
|
18
|
-
hasRequiredRaw = 1;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Module dependencies.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
var debug = requireSrc()('body-parser:raw');
|
|
25
|
-
var isFinished = requireOnFinished().isFinished;
|
|
26
|
-
var read = requireRead();
|
|
27
|
-
var typeis = requireTypeIs();
|
|
28
|
-
var { normalizeOptions } = requireUtils();
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Module exports.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
raw_1 = raw;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Create a middleware to parse raw bodies.
|
|
38
|
-
*
|
|
39
|
-
* @param {object} [options]
|
|
40
|
-
* @return {function}
|
|
41
|
-
* @api public
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
function raw (options) {
|
|
45
|
-
var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'application/octet-stream');
|
|
46
|
-
|
|
47
|
-
function parse (buf) {
|
|
48
|
-
return buf
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return function rawParser (req, res, next) {
|
|
52
|
-
if (isFinished(req)) {
|
|
53
|
-
debug('body already parsed');
|
|
54
|
-
next();
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (!('body' in req)) {
|
|
59
|
-
req.body = undefined;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// skip requests without bodies
|
|
63
|
-
if (!typeis.hasBody(req)) {
|
|
64
|
-
debug('skip empty body');
|
|
65
|
-
next();
|
|
66
|
-
return
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
debug('content-type %j', req.headers['content-type']);
|
|
70
|
-
|
|
71
|
-
// determine if request should be parsed
|
|
72
|
-
if (!shouldParse(req)) {
|
|
73
|
-
debug('skip parsing');
|
|
74
|
-
next();
|
|
75
|
-
return
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// read
|
|
79
|
-
read(req, res, next, parse, debug, {
|
|
80
|
-
encoding: null,
|
|
81
|
-
inflate,
|
|
82
|
-
limit,
|
|
83
|
-
verify
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return raw_1;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export { requireRaw as __require };
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { __require as requireSrc } from '../../../debug/src/index.js';
|
|
2
|
-
import { __require as requireOnFinished } from '../../../on-finished/index.js';
|
|
3
|
-
import { __require as requireRead } from '../read.js';
|
|
4
|
-
import { __require as requireTypeIs } from '../../../type-is/index.js';
|
|
5
|
-
import { __require as requireUtils } from '../utils.js';
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
* body-parser
|
|
9
|
-
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
10
|
-
* MIT Licensed
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
var text_1;
|
|
14
|
-
var hasRequiredText;
|
|
15
|
-
|
|
16
|
-
function requireText () {
|
|
17
|
-
if (hasRequiredText) return text_1;
|
|
18
|
-
hasRequiredText = 1;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Module dependencies.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
var debug = requireSrc()('body-parser:text');
|
|
25
|
-
var isFinished = requireOnFinished().isFinished;
|
|
26
|
-
var read = requireRead();
|
|
27
|
-
var typeis = requireTypeIs();
|
|
28
|
-
var { getCharset, normalizeOptions } = requireUtils();
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Module exports.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
text_1 = text;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Create a middleware to parse text bodies.
|
|
38
|
-
*
|
|
39
|
-
* @param {object} [options]
|
|
40
|
-
* @return {function}
|
|
41
|
-
* @api public
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
function text (options) {
|
|
45
|
-
var { inflate, limit, verify, shouldParse } = normalizeOptions(options, 'text/plain');
|
|
46
|
-
|
|
47
|
-
var defaultCharset = options?.defaultCharset || 'utf-8';
|
|
48
|
-
|
|
49
|
-
function parse (buf) {
|
|
50
|
-
return buf
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return function textParser (req, res, next) {
|
|
54
|
-
if (isFinished(req)) {
|
|
55
|
-
debug('body already parsed');
|
|
56
|
-
next();
|
|
57
|
-
return
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (!('body' in req)) {
|
|
61
|
-
req.body = undefined;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// skip requests without bodies
|
|
65
|
-
if (!typeis.hasBody(req)) {
|
|
66
|
-
debug('skip empty body');
|
|
67
|
-
next();
|
|
68
|
-
return
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
debug('content-type %j', req.headers['content-type']);
|
|
72
|
-
|
|
73
|
-
// determine if request should be parsed
|
|
74
|
-
if (!shouldParse(req)) {
|
|
75
|
-
debug('skip parsing');
|
|
76
|
-
next();
|
|
77
|
-
return
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// get charset
|
|
81
|
-
var charset = getCharset(req) || defaultCharset;
|
|
82
|
-
|
|
83
|
-
// read
|
|
84
|
-
read(req, res, next, parse, debug, {
|
|
85
|
-
encoding: charset,
|
|
86
|
-
inflate,
|
|
87
|
-
limit,
|
|
88
|
-
verify
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return text_1;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export { requireText as __require };
|