@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,235 +0,0 @@
|
|
|
1
|
-
import { __exports as contentType } from '../../_virtual/index17.js';
|
|
2
|
-
|
|
3
|
-
/*!
|
|
4
|
-
* content-type
|
|
5
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
6
|
-
* MIT Licensed
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
var hasRequiredContentType;
|
|
10
|
-
|
|
11
|
-
function requireContentType () {
|
|
12
|
-
if (hasRequiredContentType) return contentType;
|
|
13
|
-
hasRequiredContentType = 1;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
|
|
17
|
-
*
|
|
18
|
-
* parameter = token "=" ( token / quoted-string )
|
|
19
|
-
* token = 1*tchar
|
|
20
|
-
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
|
|
21
|
-
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
|
|
22
|
-
* / DIGIT / ALPHA
|
|
23
|
-
* ; any VCHAR, except delimiters
|
|
24
|
-
* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
|
|
25
|
-
* qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
|
|
26
|
-
* obs-text = %x80-FF
|
|
27
|
-
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
28
|
-
*/
|
|
29
|
-
var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g; // eslint-disable-line no-control-regex
|
|
30
|
-
var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/; // eslint-disable-line no-control-regex
|
|
31
|
-
var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* RegExp to match quoted-pair in RFC 7230 sec 3.2.6
|
|
35
|
-
*
|
|
36
|
-
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
37
|
-
* obs-text = %x80-FF
|
|
38
|
-
*/
|
|
39
|
-
var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g; // eslint-disable-line no-control-regex
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6
|
|
43
|
-
*/
|
|
44
|
-
var QUOTE_REGEXP = /([\\"])/g;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* RegExp to match type in RFC 7231 sec 3.1.1.1
|
|
48
|
-
*
|
|
49
|
-
* media-type = type "/" subtype
|
|
50
|
-
* type = token
|
|
51
|
-
* subtype = token
|
|
52
|
-
*/
|
|
53
|
-
var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Module exports.
|
|
57
|
-
* @public
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
contentType.format = format;
|
|
61
|
-
contentType.parse = parse;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Format object to media type.
|
|
65
|
-
*
|
|
66
|
-
* @param {object} obj
|
|
67
|
-
* @return {string}
|
|
68
|
-
* @public
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
function format (obj) {
|
|
72
|
-
if (!obj || typeof obj !== 'object') {
|
|
73
|
-
throw new TypeError('argument obj is required')
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
var parameters = obj.parameters;
|
|
77
|
-
var type = obj.type;
|
|
78
|
-
|
|
79
|
-
if (!type || !TYPE_REGEXP.test(type)) {
|
|
80
|
-
throw new TypeError('invalid type')
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
var string = type;
|
|
84
|
-
|
|
85
|
-
// append parameters
|
|
86
|
-
if (parameters && typeof parameters === 'object') {
|
|
87
|
-
var param;
|
|
88
|
-
var params = Object.keys(parameters).sort();
|
|
89
|
-
|
|
90
|
-
for (var i = 0; i < params.length; i++) {
|
|
91
|
-
param = params[i];
|
|
92
|
-
|
|
93
|
-
if (!TOKEN_REGEXP.test(param)) {
|
|
94
|
-
throw new TypeError('invalid parameter name')
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
string += '; ' + param + '=' + qstring(parameters[param]);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return string
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Parse media type to object.
|
|
106
|
-
*
|
|
107
|
-
* @param {string|object} string
|
|
108
|
-
* @return {Object}
|
|
109
|
-
* @public
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
|
-
function parse (string) {
|
|
113
|
-
if (!string) {
|
|
114
|
-
throw new TypeError('argument string is required')
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// support req/res-like objects as argument
|
|
118
|
-
var header = typeof string === 'object'
|
|
119
|
-
? getcontenttype(string)
|
|
120
|
-
: string;
|
|
121
|
-
|
|
122
|
-
if (typeof header !== 'string') {
|
|
123
|
-
throw new TypeError('argument string is required to be a string')
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
var index = header.indexOf(';');
|
|
127
|
-
var type = index !== -1
|
|
128
|
-
? header.slice(0, index).trim()
|
|
129
|
-
: header.trim();
|
|
130
|
-
|
|
131
|
-
if (!TYPE_REGEXP.test(type)) {
|
|
132
|
-
throw new TypeError('invalid media type')
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
var obj = new ContentType(type.toLowerCase());
|
|
136
|
-
|
|
137
|
-
// parse parameters
|
|
138
|
-
if (index !== -1) {
|
|
139
|
-
var key;
|
|
140
|
-
var match;
|
|
141
|
-
var value;
|
|
142
|
-
|
|
143
|
-
PARAM_REGEXP.lastIndex = index;
|
|
144
|
-
|
|
145
|
-
while ((match = PARAM_REGEXP.exec(header))) {
|
|
146
|
-
if (match.index !== index) {
|
|
147
|
-
throw new TypeError('invalid parameter format')
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
index += match[0].length;
|
|
151
|
-
key = match[1].toLowerCase();
|
|
152
|
-
value = match[2];
|
|
153
|
-
|
|
154
|
-
if (value.charCodeAt(0) === 0x22 /* " */) {
|
|
155
|
-
// remove quotes
|
|
156
|
-
value = value.slice(1, -1);
|
|
157
|
-
|
|
158
|
-
// remove escapes
|
|
159
|
-
if (value.indexOf('\\') !== -1) {
|
|
160
|
-
value = value.replace(QESC_REGEXP, '$1');
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
obj.parameters[key] = value;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (index !== header.length) {
|
|
168
|
-
throw new TypeError('invalid parameter format')
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
return obj
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Get content-type from req/res objects.
|
|
177
|
-
*
|
|
178
|
-
* @param {object}
|
|
179
|
-
* @return {Object}
|
|
180
|
-
* @private
|
|
181
|
-
*/
|
|
182
|
-
|
|
183
|
-
function getcontenttype (obj) {
|
|
184
|
-
var header;
|
|
185
|
-
|
|
186
|
-
if (typeof obj.getHeader === 'function') {
|
|
187
|
-
// res-like
|
|
188
|
-
header = obj.getHeader('content-type');
|
|
189
|
-
} else if (typeof obj.headers === 'object') {
|
|
190
|
-
// req-like
|
|
191
|
-
header = obj.headers && obj.headers['content-type'];
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if (typeof header !== 'string') {
|
|
195
|
-
throw new TypeError('content-type header is missing from object')
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return header
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Quote a string if necessary.
|
|
203
|
-
*
|
|
204
|
-
* @param {string} val
|
|
205
|
-
* @return {string}
|
|
206
|
-
* @private
|
|
207
|
-
*/
|
|
208
|
-
|
|
209
|
-
function qstring (val) {
|
|
210
|
-
var str = String(val);
|
|
211
|
-
|
|
212
|
-
// no need to quote tokens
|
|
213
|
-
if (TOKEN_REGEXP.test(str)) {
|
|
214
|
-
return str
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (str.length > 0 && !TEXT_REGEXP.test(str)) {
|
|
218
|
-
throw new TypeError('invalid parameter value')
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"'
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Class to represent a content type.
|
|
226
|
-
* @private
|
|
227
|
-
*/
|
|
228
|
-
function ContentType (type) {
|
|
229
|
-
this.parameters = Object.create(null);
|
|
230
|
-
this.type = type;
|
|
231
|
-
}
|
|
232
|
-
return contentType;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export { requireContentType as __require };
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import { __exports as cookie } from '../../_virtual/index30.js';
|
|
2
|
-
|
|
3
|
-
/*!
|
|
4
|
-
* cookie
|
|
5
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
6
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
7
|
-
* MIT Licensed
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var hasRequiredCookie;
|
|
11
|
-
|
|
12
|
-
function requireCookie () {
|
|
13
|
-
if (hasRequiredCookie) return cookie;
|
|
14
|
-
hasRequiredCookie = 1;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Module exports.
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
cookie.parse = parse;
|
|
22
|
-
cookie.serialize = serialize;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Module variables.
|
|
26
|
-
* @private
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
var __toString = Object.prototype.toString;
|
|
30
|
-
var __hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
|
|
34
|
-
* This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
|
|
35
|
-
* which has been replaced by the token definition in RFC 7230 appendix B.
|
|
36
|
-
*
|
|
37
|
-
* cookie-name = token
|
|
38
|
-
* token = 1*tchar
|
|
39
|
-
* tchar = "!" / "#" / "$" / "%" / "&" / "'" /
|
|
40
|
-
* "*" / "+" / "-" / "." / "^" / "_" /
|
|
41
|
-
* "`" / "|" / "~" / DIGIT / ALPHA
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* RegExp to match cookie-value in RFC 6265 sec 4.1.1
|
|
48
|
-
*
|
|
49
|
-
* cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
|
|
50
|
-
* cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
|
|
51
|
-
* ; US-ASCII characters excluding CTLs,
|
|
52
|
-
* ; whitespace DQUOTE, comma, semicolon,
|
|
53
|
-
* ; and backslash
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* RegExp to match domain-value in RFC 6265 sec 4.1.1
|
|
60
|
-
*
|
|
61
|
-
* domain-value = <subdomain>
|
|
62
|
-
* ; defined in [RFC1034], Section 3.5, as
|
|
63
|
-
* ; enhanced by [RFC1123], Section 2.1
|
|
64
|
-
* <subdomain> = <label> | <subdomain> "." <label>
|
|
65
|
-
* <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]
|
|
66
|
-
* Labels must be 63 characters or less.
|
|
67
|
-
* 'let-dig' not 'letter' in the first char, per RFC1123
|
|
68
|
-
* <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>
|
|
69
|
-
* <let-dig-hyp> = <let-dig> | "-"
|
|
70
|
-
* <let-dig> = <letter> | <digit>
|
|
71
|
-
* <letter> = any one of the 52 alphabetic characters A through Z in
|
|
72
|
-
* upper case and a through z in lower case
|
|
73
|
-
* <digit> = any one of the ten digits 0 through 9
|
|
74
|
-
*
|
|
75
|
-
* Keep support for leading dot: https://github.com/jshttp/cookie/issues/173
|
|
76
|
-
*
|
|
77
|
-
* > (Note that a leading %x2E ("."), if present, is ignored even though that
|
|
78
|
-
* character is not permitted, but a trailing %x2E ("."), if present, will
|
|
79
|
-
* cause the user agent to ignore the attribute.)
|
|
80
|
-
*/
|
|
81
|
-
|
|
82
|
-
var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* RegExp to match path-value in RFC 6265 sec 4.1.1
|
|
86
|
-
*
|
|
87
|
-
* path-value = <any CHAR except CTLs or ";">
|
|
88
|
-
* CHAR = %x01-7F
|
|
89
|
-
* ; defined in RFC 5234 appendix B.1
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Parse a cookie header.
|
|
96
|
-
*
|
|
97
|
-
* Parse the given cookie header string into an object
|
|
98
|
-
* The object has the various cookies as keys(names) => values
|
|
99
|
-
*
|
|
100
|
-
* @param {string} str
|
|
101
|
-
* @param {object} [opt]
|
|
102
|
-
* @return {object}
|
|
103
|
-
* @public
|
|
104
|
-
*/
|
|
105
|
-
|
|
106
|
-
function parse(str, opt) {
|
|
107
|
-
if (typeof str !== 'string') {
|
|
108
|
-
throw new TypeError('argument str must be a string');
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
var obj = {};
|
|
112
|
-
var len = str.length;
|
|
113
|
-
// RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
|
|
114
|
-
if (len < 2) return obj;
|
|
115
|
-
|
|
116
|
-
var dec = (opt && opt.decode) || decode;
|
|
117
|
-
var index = 0;
|
|
118
|
-
var eqIdx = 0;
|
|
119
|
-
var endIdx = 0;
|
|
120
|
-
|
|
121
|
-
do {
|
|
122
|
-
eqIdx = str.indexOf('=', index);
|
|
123
|
-
if (eqIdx === -1) break; // No more cookie pairs.
|
|
124
|
-
|
|
125
|
-
endIdx = str.indexOf(';', index);
|
|
126
|
-
|
|
127
|
-
if (endIdx === -1) {
|
|
128
|
-
endIdx = len;
|
|
129
|
-
} else if (eqIdx > endIdx) {
|
|
130
|
-
// backtrack on prior semicolon
|
|
131
|
-
index = str.lastIndexOf(';', eqIdx - 1) + 1;
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
var keyStartIdx = startIndex(str, index, eqIdx);
|
|
136
|
-
var keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
|
|
137
|
-
var key = str.slice(keyStartIdx, keyEndIdx);
|
|
138
|
-
|
|
139
|
-
// only assign once
|
|
140
|
-
if (!__hasOwnProperty.call(obj, key)) {
|
|
141
|
-
var valStartIdx = startIndex(str, eqIdx + 1, endIdx);
|
|
142
|
-
var valEndIdx = endIndex(str, endIdx, valStartIdx);
|
|
143
|
-
|
|
144
|
-
if (str.charCodeAt(valStartIdx) === 0x22 /* " */ && str.charCodeAt(valEndIdx - 1) === 0x22 /* " */) {
|
|
145
|
-
valStartIdx++;
|
|
146
|
-
valEndIdx--;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
var val = str.slice(valStartIdx, valEndIdx);
|
|
150
|
-
obj[key] = tryDecode(val, dec);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
index = endIdx + 1;
|
|
154
|
-
} while (index < len);
|
|
155
|
-
|
|
156
|
-
return obj;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function startIndex(str, index, max) {
|
|
160
|
-
do {
|
|
161
|
-
var code = str.charCodeAt(index);
|
|
162
|
-
if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index;
|
|
163
|
-
} while (++index < max);
|
|
164
|
-
return max;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function endIndex(str, index, min) {
|
|
168
|
-
while (index > min) {
|
|
169
|
-
var code = str.charCodeAt(--index);
|
|
170
|
-
if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index + 1;
|
|
171
|
-
}
|
|
172
|
-
return min;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Serialize data into a cookie header.
|
|
177
|
-
*
|
|
178
|
-
* Serialize a name value pair into a cookie string suitable for
|
|
179
|
-
* http headers. An optional options object specifies cookie parameters.
|
|
180
|
-
*
|
|
181
|
-
* serialize('foo', 'bar', { httpOnly: true })
|
|
182
|
-
* => "foo=bar; httpOnly"
|
|
183
|
-
*
|
|
184
|
-
* @param {string} name
|
|
185
|
-
* @param {string} val
|
|
186
|
-
* @param {object} [opt]
|
|
187
|
-
* @return {string}
|
|
188
|
-
* @public
|
|
189
|
-
*/
|
|
190
|
-
|
|
191
|
-
function serialize(name, val, opt) {
|
|
192
|
-
var enc = (opt && opt.encode) || encodeURIComponent;
|
|
193
|
-
|
|
194
|
-
if (typeof enc !== 'function') {
|
|
195
|
-
throw new TypeError('option encode is invalid');
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (!cookieNameRegExp.test(name)) {
|
|
199
|
-
throw new TypeError('argument name is invalid');
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
var value = enc(val);
|
|
203
|
-
|
|
204
|
-
if (!cookieValueRegExp.test(value)) {
|
|
205
|
-
throw new TypeError('argument val is invalid');
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
var str = name + '=' + value;
|
|
209
|
-
if (!opt) return str;
|
|
210
|
-
|
|
211
|
-
if (null != opt.maxAge) {
|
|
212
|
-
var maxAge = Math.floor(opt.maxAge);
|
|
213
|
-
|
|
214
|
-
if (!isFinite(maxAge)) {
|
|
215
|
-
throw new TypeError('option maxAge is invalid')
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
str += '; Max-Age=' + maxAge;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (opt.domain) {
|
|
222
|
-
if (!domainValueRegExp.test(opt.domain)) {
|
|
223
|
-
throw new TypeError('option domain is invalid');
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
str += '; Domain=' + opt.domain;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (opt.path) {
|
|
230
|
-
if (!pathValueRegExp.test(opt.path)) {
|
|
231
|
-
throw new TypeError('option path is invalid');
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
str += '; Path=' + opt.path;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
if (opt.expires) {
|
|
238
|
-
var expires = opt.expires;
|
|
239
|
-
|
|
240
|
-
if (!isDate(expires) || isNaN(expires.valueOf())) {
|
|
241
|
-
throw new TypeError('option expires is invalid');
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
str += '; Expires=' + expires.toUTCString();
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
if (opt.httpOnly) {
|
|
248
|
-
str += '; HttpOnly';
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
if (opt.secure) {
|
|
252
|
-
str += '; Secure';
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
if (opt.partitioned) {
|
|
256
|
-
str += '; Partitioned';
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
if (opt.priority) {
|
|
260
|
-
var priority = typeof opt.priority === 'string'
|
|
261
|
-
? opt.priority.toLowerCase() : opt.priority;
|
|
262
|
-
|
|
263
|
-
switch (priority) {
|
|
264
|
-
case 'low':
|
|
265
|
-
str += '; Priority=Low';
|
|
266
|
-
break
|
|
267
|
-
case 'medium':
|
|
268
|
-
str += '; Priority=Medium';
|
|
269
|
-
break
|
|
270
|
-
case 'high':
|
|
271
|
-
str += '; Priority=High';
|
|
272
|
-
break
|
|
273
|
-
default:
|
|
274
|
-
throw new TypeError('option priority is invalid')
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
if (opt.sameSite) {
|
|
279
|
-
var sameSite = typeof opt.sameSite === 'string'
|
|
280
|
-
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
281
|
-
|
|
282
|
-
switch (sameSite) {
|
|
283
|
-
case true:
|
|
284
|
-
str += '; SameSite=Strict';
|
|
285
|
-
break;
|
|
286
|
-
case 'lax':
|
|
287
|
-
str += '; SameSite=Lax';
|
|
288
|
-
break;
|
|
289
|
-
case 'strict':
|
|
290
|
-
str += '; SameSite=Strict';
|
|
291
|
-
break;
|
|
292
|
-
case 'none':
|
|
293
|
-
str += '; SameSite=None';
|
|
294
|
-
break;
|
|
295
|
-
default:
|
|
296
|
-
throw new TypeError('option sameSite is invalid');
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
return str;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* URL-decode string value. Optimized to skip native call when no %.
|
|
305
|
-
*
|
|
306
|
-
* @param {string} str
|
|
307
|
-
* @returns {string}
|
|
308
|
-
*/
|
|
309
|
-
|
|
310
|
-
function decode (str) {
|
|
311
|
-
return str.indexOf('%') !== -1
|
|
312
|
-
? decodeURIComponent(str)
|
|
313
|
-
: str
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Determine if value is a Date.
|
|
318
|
-
*
|
|
319
|
-
* @param {*} val
|
|
320
|
-
* @private
|
|
321
|
-
*/
|
|
322
|
-
|
|
323
|
-
function isDate (val) {
|
|
324
|
-
return __toString.call(val) === '[object Date]';
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Try decoding a string using a decoding function.
|
|
329
|
-
*
|
|
330
|
-
* @param {string} str
|
|
331
|
-
* @param {function} decode
|
|
332
|
-
* @private
|
|
333
|
-
*/
|
|
334
|
-
|
|
335
|
-
function tryDecode(str, decode) {
|
|
336
|
-
try {
|
|
337
|
-
return decode(str);
|
|
338
|
-
} catch (e) {
|
|
339
|
-
return str;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
return cookie;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export { requireCookie as __require };
|