plugin-data-source-mssql 2.0.0 → 2.0.2
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/README.md +31 -10
- package/dist/externalVersion.js +6 -6
- package/dist/node_modules/tedious/245.index.js +741 -0
- package/dist/node_modules/tedious/LICENSE +21 -0
- package/dist/node_modules/tedious/appveyor.yml +67 -0
- package/dist/node_modules/tedious/benchmarks/bulk-load/iterable.js +61 -0
- package/dist/node_modules/tedious/benchmarks/common.js +287 -0
- package/dist/node_modules/tedious/benchmarks/connection/open.js +26 -0
- package/dist/node_modules/tedious/benchmarks/package-lock.json +21173 -0
- package/dist/node_modules/tedious/benchmarks/package.json +11 -0
- package/dist/node_modules/tedious/benchmarks/query/call-tvp.js +105 -0
- package/dist/node_modules/tedious/benchmarks/query/insert-varbinary.js +46 -0
- package/dist/node_modules/tedious/benchmarks/query/select-many-rows.js +63 -0
- package/dist/node_modules/tedious/benchmarks/query/select-nvarchar.js +50 -0
- package/dist/node_modules/tedious/benchmarks/query/select-varbinary.js +50 -0
- package/dist/node_modules/tedious/benchmarks/request/rpcrequest-payload-tvp.js +45 -0
- package/dist/node_modules/tedious/benchmarks/request/rpcrequest-payload-varbinary.js +37 -0
- package/dist/node_modules/tedious/benchmarks/token-parser/colmetadata-token.js +27 -0
- package/dist/node_modules/tedious/benchmarks/token-parser/done-token.js +28 -0
- package/dist/node_modules/tedious/benchmarks/token-parser/simple-tokens.js +363 -0
- package/dist/node_modules/tedious/lib/all-headers.d.ts +2 -0
- package/dist/node_modules/tedious/lib/all-headers.js +24 -0
- package/dist/node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-algorithm.js +82 -0
- package/dist/node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-encryption-key.js +55 -0
- package/dist/node_modules/tedious/lib/always-encrypted/cek-entry.d.ts +11 -0
- package/dist/node_modules/tedious/lib/always-encrypted/cek-entry.js +42 -0
- package/dist/node_modules/tedious/lib/always-encrypted/get-parameter-encryption-metadata.js +90 -0
- package/dist/node_modules/tedious/lib/always-encrypted/key-crypto.js +94 -0
- package/dist/node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.d.ts +21 -0
- package/dist/node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.js +247 -0
- package/dist/node_modules/tedious/lib/always-encrypted/symmetric-key-cache.js +36 -0
- package/dist/node_modules/tedious/lib/always-encrypted/symmetric-key.js +25 -0
- package/dist/node_modules/tedious/lib/always-encrypted/types.d.ts +73 -0
- package/dist/node_modules/tedious/lib/always-encrypted/types.js +48 -0
- package/dist/node_modules/tedious/lib/always-encrypted/utils.js +23 -0
- package/dist/node_modules/tedious/lib/bulk-load-payload.d.ts +8 -0
- package/dist/node_modules/tedious/lib/bulk-load-payload.js +23 -0
- package/dist/node_modules/tedious/lib/bulk-load.d.ts +275 -0
- package/dist/node_modules/tedious/lib/bulk-load.js +516 -0
- package/dist/node_modules/tedious/lib/collation.d.ts +28 -0
- package/dist/node_modules/tedious/lib/collation.js +348 -0
- package/dist/node_modules/tedious/lib/connection.d.ts +1310 -0
- package/dist/node_modules/tedious/lib/connection.js +2730 -0
- package/dist/node_modules/tedious/lib/connector.d.ts +18 -0
- package/dist/node_modules/tedious/lib/connector.js +150 -0
- package/dist/node_modules/tedious/lib/data-type.d.ts +455 -0
- package/dist/node_modules/tedious/lib/data-type.js +428 -0
- package/dist/node_modules/tedious/lib/data-types/bigint.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/bigint.js +53 -0
- package/dist/node_modules/tedious/lib/data-types/binary.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/binary.js +67 -0
- package/dist/node_modules/tedious/lib/data-types/bit.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/bit.js +46 -0
- package/dist/node_modules/tedious/lib/data-types/bitn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/bitn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/char.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/char.js +86 -0
- package/dist/node_modules/tedious/lib/data-types/date.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/date.js +72 -0
- package/dist/node_modules/tedious/lib/data-types/datetime.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/datetime.js +93 -0
- package/dist/node_modules/tedious/lib/data-types/datetime2.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/datetime2.js +118 -0
- package/dist/node_modules/tedious/lib/data-types/datetimen.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/datetimen.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/datetimeoffset.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/datetimeoffset.js +111 -0
- package/dist/node_modules/tedious/lib/data-types/decimal.d.ts +6 -0
- package/dist/node_modules/tedious/lib/data-types/decimal.js +107 -0
- package/dist/node_modules/tedious/lib/data-types/decimaln.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/decimaln.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/float.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/float.js +47 -0
- package/dist/node_modules/tedious/lib/data-types/floatn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/floatn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/image.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/image.js +56 -0
- package/dist/node_modules/tedious/lib/data-types/int.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/int.js +53 -0
- package/dist/node_modules/tedious/lib/data-types/intn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/intn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/money.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/money.js +59 -0
- package/dist/node_modules/tedious/lib/data-types/moneyn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/moneyn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/nchar.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/nchar.js +100 -0
- package/dist/node_modules/tedious/lib/data-types/ntext.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/ntext.js +60 -0
- package/dist/node_modules/tedious/lib/data-types/null.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/null.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/numeric.d.ts +6 -0
- package/dist/node_modules/tedious/lib/data-types/numeric.js +106 -0
- package/dist/node_modules/tedious/lib/data-types/numericn.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/numericn.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/nvarchar.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/nvarchar.js +133 -0
- package/dist/node_modules/tedious/lib/data-types/real.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/real.js +48 -0
- package/dist/node_modules/tedious/lib/data-types/smalldatetime.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/smalldatetime.js +83 -0
- package/dist/node_modules/tedious/lib/data-types/smallint.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/smallint.js +53 -0
- package/dist/node_modules/tedious/lib/data-types/smallmoney.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/smallmoney.js +51 -0
- package/dist/node_modules/tedious/lib/data-types/sql-variant.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/sql-variant.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/text.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/text.js +69 -0
- package/dist/node_modules/tedious/lib/data-types/time.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/time.js +96 -0
- package/dist/node_modules/tedious/lib/data-types/tinyint.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/tinyint.js +53 -0
- package/dist/node_modules/tedious/lib/data-types/tvp.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/tvp.js +117 -0
- package/dist/node_modules/tedious/lib/data-types/udt.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/udt.js +29 -0
- package/dist/node_modules/tedious/lib/data-types/uniqueidentifier.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/uniqueidentifier.js +50 -0
- package/dist/node_modules/tedious/lib/data-types/varbinary.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/varbinary.js +119 -0
- package/dist/node_modules/tedious/lib/data-types/varchar.d.ts +5 -0
- package/dist/node_modules/tedious/lib/data-types/varchar.js +112 -0
- package/dist/node_modules/tedious/lib/data-types/xml.d.ts +3 -0
- package/dist/node_modules/tedious/lib/data-types/xml.js +29 -0
- package/dist/node_modules/tedious/lib/debug.d.ts +25 -0
- package/dist/node_modules/tedious/lib/debug.js +67 -0
- package/dist/node_modules/tedious/lib/errors/abort-error.d.ts +4 -0
- package/dist/node_modules/tedious/lib/errors/abort-error.js +15 -0
- package/dist/node_modules/tedious/lib/errors/timeout-error.d.ts +4 -0
- package/dist/node_modules/tedious/lib/errors/timeout-error.js +15 -0
- package/dist/node_modules/tedious/lib/errors.d.ts +17 -0
- package/dist/node_modules/tedious/lib/errors.js +23 -0
- package/dist/node_modules/tedious/lib/guid-parser.d.ts +3 -0
- package/dist/node_modules/tedious/lib/guid-parser.js +30 -0
- package/dist/node_modules/tedious/lib/incoming-message-stream.d.ts +19 -0
- package/dist/node_modules/tedious/lib/incoming-message-stream.js +97 -0
- package/dist/node_modules/tedious/lib/instance-lookup.d.ts +13 -0
- package/dist/node_modules/tedious/lib/instance-lookup.js +96 -0
- package/dist/node_modules/tedious/lib/library.d.ts +1 -0
- package/dist/node_modules/tedious/lib/library.js +8 -0
- package/dist/node_modules/tedious/lib/login7-payload.d.ts +51 -0
- package/dist/node_modules/tedious/lib/login7-payload.js +402 -0
- package/dist/node_modules/tedious/lib/message-io.d.ts +28 -0
- package/dist/node_modules/tedious/lib/message-io.js +153 -0
- package/dist/node_modules/tedious/lib/message.d.ts +11 -0
- package/dist/node_modules/tedious/lib/message.js +21 -0
- package/dist/node_modules/tedious/lib/metadata-parser.d.ts +48 -0
- package/dist/node_modules/tedious/lib/metadata-parser.js +380 -0
- package/dist/node_modules/tedious/lib/ntlm-payload.d.ts +23 -0
- package/dist/node_modules/tedious/lib/ntlm-payload.js +136 -0
- package/dist/node_modules/tedious/lib/ntlm.d.ts +4 -0
- package/dist/node_modules/tedious/lib/ntlm.js +72 -0
- package/dist/node_modules/tedious/lib/outgoing-message-stream.d.ts +15 -0
- package/dist/node_modules/tedious/lib/outgoing-message-stream.js +81 -0
- package/dist/node_modules/tedious/lib/packet.d.ts +33 -0
- package/dist/node_modules/tedious/lib/packet.js +191 -0
- package/dist/node_modules/tedious/lib/prelogin-payload.d.ts +61 -0
- package/dist/node_modules/tedious/lib/prelogin-payload.js +209 -0
- package/dist/node_modules/tedious/lib/request.d.ts +370 -0
- package/dist/node_modules/tedious/lib/request.js +387 -0
- package/dist/node_modules/tedious/lib/rpcrequest-payload.d.ts +16 -0
- package/dist/node_modules/tedious/lib/rpcrequest-payload.js +109 -0
- package/dist/node_modules/tedious/lib/sender.d.ts +5 -0
- package/dist/node_modules/tedious/lib/sender.js +83 -0
- package/dist/node_modules/tedious/lib/special-stored-procedure.d.ts +18 -0
- package/dist/node_modules/tedious/lib/special-stored-procedure.js +26 -0
- package/dist/node_modules/tedious/lib/sqlbatch-payload.d.ts +13 -0
- package/dist/node_modules/tedious/lib/sqlbatch-payload.js +34 -0
- package/dist/node_modules/tedious/lib/tds-versions.d.ts +6 -0
- package/dist/node_modules/tedious/lib/tds-versions.js +19 -0
- package/dist/node_modules/tedious/lib/tedious.d.ts +13 -0
- package/dist/node_modules/tedious/lib/tedious.js +249 -0
- package/dist/node_modules/tedious/lib/token/colmetadata-token-parser.d.ts +12 -0
- package/dist/node_modules/tedious/lib/token/colmetadata-token-parser.js +124 -0
- package/dist/node_modules/tedious/lib/token/done-token-parser.d.ts +6 -0
- package/dist/node_modules/tedious/lib/token/done-token-parser.js +76 -0
- package/dist/node_modules/tedious/lib/token/env-change-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/env-change-token-parser.js +190 -0
- package/dist/node_modules/tedious/lib/token/feature-ext-ack-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/feature-ext-ack-parser.js +52 -0
- package/dist/node_modules/tedious/lib/token/fedauth-info-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/fedauth-info-parser.js +62 -0
- package/dist/node_modules/tedious/lib/token/handler.d.ts +135 -0
- package/dist/node_modules/tedious/lib/token/handler.js +444 -0
- package/dist/node_modules/tedious/lib/token/helpers.d.ts +28 -0
- package/dist/node_modules/tedious/lib/token/helpers.js +205 -0
- package/dist/node_modules/tedious/lib/token/infoerror-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/infoerror-token-parser.js +80 -0
- package/dist/node_modules/tedious/lib/token/loginack-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/loginack-token-parser.js +75 -0
- package/dist/node_modules/tedious/lib/token/nbcrow-token-parser.d.ts +4 -0
- package/dist/node_modules/tedious/lib/token/nbcrow-token-parser.js +104 -0
- package/dist/node_modules/tedious/lib/token/order-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/order-token-parser.js +34 -0
- package/dist/node_modules/tedious/lib/token/returnstatus-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/returnstatus-token-parser.js +21 -0
- package/dist/node_modules/tedious/lib/token/returnvalue-token-parser.d.ts +4 -0
- package/dist/node_modules/tedious/lib/token/returnvalue-token-parser.js +94 -0
- package/dist/node_modules/tedious/lib/token/row-token-parser.d.ts +4 -0
- package/dist/node_modules/tedious/lib/token/row-token-parser.js +77 -0
- package/dist/node_modules/tedious/lib/token/sspi-token-parser.d.ts +5 -0
- package/dist/node_modules/tedious/lib/token/sspi-token-parser.js +42 -0
- package/dist/node_modules/tedious/lib/token/stream-parser.d.ts +34 -0
- package/dist/node_modules/tedious/lib/token/stream-parser.js +341 -0
- package/dist/node_modules/tedious/lib/token/token-stream-parser.d.ts +15 -0
- package/dist/node_modules/tedious/lib/token/token-stream-parser.js +36 -0
- package/dist/node_modules/tedious/lib/token/token.d.ts +312 -0
- package/dist/node_modules/tedious/lib/token/token.js +328 -0
- package/dist/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.d.ts +47 -0
- package/dist/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.js +249 -0
- package/dist/node_modules/tedious/lib/transaction.d.ts +39 -0
- package/dist/node_modules/tedious/lib/transaction.js +137 -0
- package/dist/node_modules/tedious/lib/transient-error-lookup.d.ts +3 -0
- package/dist/node_modules/tedious/lib/transient-error-lookup.js +19 -0
- package/dist/node_modules/tedious/lib/utils/with-timeout.d.ts +7 -0
- package/dist/node_modules/tedious/lib/utils/with-timeout.js +36 -0
- package/dist/node_modules/tedious/lib/value-parser.d.ts +7 -0
- package/dist/node_modules/tedious/lib/value-parser.js +813 -0
- package/dist/node_modules/tedious/node_modules/@types/node/assert/strict.d.ts +105 -0
- package/dist/node_modules/tedious/node_modules/@types/node/assert.d.ts +955 -0
- package/dist/node_modules/tedious/node_modules/@types/node/async_hooks.d.ts +623 -0
- package/dist/node_modules/tedious/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- package/dist/node_modules/tedious/node_modules/@types/node/buffer.d.ts +1810 -0
- package/dist/node_modules/tedious/node_modules/@types/node/child_process.d.ts +1428 -0
- package/dist/node_modules/tedious/node_modules/@types/node/cluster.d.ts +486 -0
- package/dist/node_modules/tedious/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/dist/node_modules/tedious/node_modules/@types/node/console.d.ts +151 -0
- package/dist/node_modules/tedious/node_modules/@types/node/constants.d.ts +20 -0
- package/dist/node_modules/tedious/node_modules/@types/node/crypto.d.ts +4065 -0
- package/dist/node_modules/tedious/node_modules/@types/node/dgram.d.ts +564 -0
- package/dist/node_modules/tedious/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- package/dist/node_modules/tedious/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/dist/node_modules/tedious/node_modules/@types/node/dns.d.ts +922 -0
- package/dist/node_modules/tedious/node_modules/@types/node/domain.d.ts +166 -0
- package/dist/node_modules/tedious/node_modules/@types/node/events.d.ts +1054 -0
- package/dist/node_modules/tedious/node_modules/@types/node/fs/promises.d.ts +1329 -0
- package/dist/node_modules/tedious/node_modules/@types/node/fs.d.ts +4676 -0
- package/dist/node_modules/tedious/node_modules/@types/node/globals.d.ts +150 -0
- package/dist/node_modules/tedious/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- package/dist/node_modules/tedious/node_modules/@types/node/http.d.ts +2167 -0
- package/dist/node_modules/tedious/node_modules/@types/node/http2.d.ts +2480 -0
- package/dist/node_modules/tedious/node_modules/@types/node/https.d.ts +405 -0
- package/dist/node_modules/tedious/node_modules/@types/node/index.d.ts +115 -0
- package/dist/node_modules/tedious/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/dist/node_modules/tedious/node_modules/@types/node/inspector.d.ts +224 -0
- package/dist/node_modules/tedious/node_modules/@types/node/inspector.generated.d.ts +4226 -0
- package/dist/node_modules/tedious/node_modules/@types/node/module.d.ts +819 -0
- package/dist/node_modules/tedious/node_modules/@types/node/net.d.ts +933 -0
- package/dist/node_modules/tedious/node_modules/@types/node/os.d.ts +507 -0
- package/dist/node_modules/tedious/node_modules/@types/node/package.json +155 -0
- package/dist/node_modules/tedious/node_modules/@types/node/path/posix.d.ts +8 -0
- package/dist/node_modules/tedious/node_modules/@types/node/path/win32.d.ts +8 -0
- package/dist/node_modules/tedious/node_modules/@types/node/path.d.ts +187 -0
- package/dist/node_modules/tedious/node_modules/@types/node/perf_hooks.d.ts +643 -0
- package/dist/node_modules/tedious/node_modules/@types/node/process.d.ts +2161 -0
- package/dist/node_modules/tedious/node_modules/@types/node/punycode.d.ts +117 -0
- package/dist/node_modules/tedious/node_modules/@types/node/querystring.d.ts +152 -0
- package/dist/node_modules/tedious/node_modules/@types/node/quic.d.ts +910 -0
- package/dist/node_modules/tedious/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/dist/node_modules/tedious/node_modules/@types/node/readline.d.ts +541 -0
- package/dist/node_modules/tedious/node_modules/@types/node/repl.d.ts +415 -0
- package/dist/node_modules/tedious/node_modules/@types/node/sea.d.ts +162 -0
- package/dist/node_modules/tedious/node_modules/@types/node/sqlite.d.ts +955 -0
- package/dist/node_modules/tedious/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/dist/node_modules/tedious/node_modules/@types/node/stream/promises.d.ts +211 -0
- package/dist/node_modules/tedious/node_modules/@types/node/stream/web.d.ts +296 -0
- package/dist/node_modules/tedious/node_modules/@types/node/stream.d.ts +1760 -0
- package/dist/node_modules/tedious/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/dist/node_modules/tedious/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/dist/node_modules/tedious/node_modules/@types/node/test.d.ts +2240 -0
- package/dist/node_modules/tedious/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/dist/node_modules/tedious/node_modules/@types/node/timers.d.ts +159 -0
- package/dist/node_modules/tedious/node_modules/@types/node/tls.d.ts +1198 -0
- package/dist/node_modules/tedious/node_modules/@types/node/trace_events.d.ts +197 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/index.d.ts +117 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/dist/node_modules/tedious/node_modules/@types/node/ts5.7/index.d.ts +117 -0
- package/dist/node_modules/tedious/node_modules/@types/node/tty.d.ts +250 -0
- package/dist/node_modules/tedious/node_modules/@types/node/url.d.ts +519 -0
- package/dist/node_modules/tedious/node_modules/@types/node/util/types.d.ts +558 -0
- package/dist/node_modules/tedious/node_modules/@types/node/util.d.ts +1662 -0
- package/dist/node_modules/tedious/node_modules/@types/node/v8.d.ts +983 -0
- package/dist/node_modules/tedious/node_modules/@types/node/vm.d.ts +1208 -0
- package/dist/node_modules/tedious/node_modules/@types/node/wasi.d.ts +202 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/events.d.ts +106 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/dist/node_modules/tedious/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/dist/node_modules/tedious/node_modules/@types/node/worker_threads.d.ts +717 -0
- package/dist/node_modules/tedious/node_modules/@types/node/zlib.d.ts +618 -0
- package/dist/node_modules/tedious/node_modules/bl/.github/dependabot.yml +16 -0
- package/dist/node_modules/tedious/node_modules/bl/.github/workflows/test-and-release.yml +61 -0
- package/dist/node_modules/tedious/node_modules/bl/BufferList.d.ts +431 -0
- package/dist/node_modules/tedious/node_modules/bl/BufferList.js +421 -0
- package/dist/node_modules/tedious/node_modules/bl/bl.js +84 -0
- package/dist/node_modules/tedious/node_modules/bl/index.d.ts +88 -0
- package/dist/node_modules/tedious/node_modules/bl/package.json +123 -0
- package/dist/node_modules/tedious/node_modules/bl/test/convert.js +21 -0
- package/dist/node_modules/tedious/node_modules/bl/test/indexOf.js +492 -0
- package/dist/node_modules/tedious/node_modules/bl/test/isBufferList.js +32 -0
- package/dist/node_modules/tedious/node_modules/bl/test/test.js +1032 -0
- package/dist/node_modules/tedious/node_modules/buffer/index.d.ts +194 -0
- package/dist/node_modules/tedious/node_modules/buffer/index.js +2106 -0
- package/dist/node_modules/tedious/node_modules/buffer/package.json +93 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_readable.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_transform.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_writable.js +4 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/legacy.js +89 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/validators.js +530 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/browser.js +35 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/errors.js +343 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/index.js +65 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/primordials.js +124 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/util.js +148 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/stream/promises.js +43 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/lib/stream.js +143 -0
- package/dist/node_modules/tedious/node_modules/readable-stream/package.json +88 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/dist/.gitattributes +4 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/dist/angular-sprintf.min.js +3 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/dist/sprintf.min.js +3 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/package.json +35 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/src/angular-sprintf.js +24 -0
- package/dist/node_modules/tedious/node_modules/sprintf-js/src/sprintf.js +231 -0
- package/dist/node_modules/tedious/node_modules/undici-types/agent.d.ts +32 -0
- package/dist/node_modules/tedious/node_modules/undici-types/api.d.ts +43 -0
- package/dist/node_modules/tedious/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/dist/node_modules/tedious/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/dist/node_modules/tedious/node_modules/undici-types/cache.d.ts +36 -0
- package/dist/node_modules/tedious/node_modules/undici-types/client-stats.d.ts +15 -0
- package/dist/node_modules/tedious/node_modules/undici-types/client.d.ts +108 -0
- package/dist/node_modules/tedious/node_modules/undici-types/connector.d.ts +34 -0
- package/dist/node_modules/tedious/node_modules/undici-types/content-type.d.ts +21 -0
- package/dist/node_modules/tedious/node_modules/undici-types/cookies.d.ts +30 -0
- package/dist/node_modules/tedious/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/dist/node_modules/tedious/node_modules/undici-types/dispatcher.d.ts +276 -0
- package/dist/node_modules/tedious/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/dist/node_modules/tedious/node_modules/undici-types/errors.d.ts +161 -0
- package/dist/node_modules/tedious/node_modules/undici-types/eventsource.d.ts +66 -0
- package/dist/node_modules/tedious/node_modules/undici-types/fetch.d.ts +211 -0
- package/dist/node_modules/tedious/node_modules/undici-types/formdata.d.ts +108 -0
- package/dist/node_modules/tedious/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/dist/node_modules/tedious/node_modules/undici-types/global-origin.d.ts +7 -0
- package/dist/node_modules/tedious/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/dist/node_modules/tedious/node_modules/undici-types/handlers.d.ts +15 -0
- package/dist/node_modules/tedious/node_modules/undici-types/header.d.ts +160 -0
- package/dist/node_modules/tedious/node_modules/undici-types/index.d.ts +80 -0
- package/dist/node_modules/tedious/node_modules/undici-types/interceptors.d.ts +39 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-client.d.ts +27 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/dist/node_modules/tedious/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/dist/node_modules/tedious/node_modules/undici-types/package.json +55 -0
- package/dist/node_modules/tedious/node_modules/undici-types/patch.d.ts +29 -0
- package/dist/node_modules/tedious/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/dist/node_modules/tedious/node_modules/undici-types/pool.d.ts +41 -0
- package/dist/node_modules/tedious/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/dist/node_modules/tedious/node_modules/undici-types/readable.d.ts +68 -0
- package/dist/node_modules/tedious/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/dist/node_modules/tedious/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/dist/node_modules/tedious/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/dist/node_modules/tedious/node_modules/undici-types/util.d.ts +18 -0
- package/dist/node_modules/tedious/node_modules/undici-types/utility.d.ts +7 -0
- package/dist/node_modules/tedious/node_modules/undici-types/webidl.d.ts +341 -0
- package/dist/node_modules/tedious/node_modules/undici-types/websocket.d.ts +186 -0
- package/dist/node_modules/tedious/package.json +1 -0
- package/dist/node_modules/tedious/tsconfig.build-types.json +15 -0
- package/dist/node_modules/tedious/tsconfig.json +29 -0
- package/dist/node_modules/tedious/types/js-md4.d.ts +7 -0
- package/dist/node_modules/tedious/types/native-duplexpair.d.ts +12 -0
- package/dist/server/data-source/MssqlExternalDataSource.js +23 -2
- package/package.json +1 -1
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const { Buffer } = require('buffer')
|
|
4
|
+
const symbol = Symbol.for('BufferList')
|
|
5
|
+
|
|
6
|
+
function BufferList (buf) {
|
|
7
|
+
if (!(this instanceof BufferList)) {
|
|
8
|
+
return new BufferList(buf)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
BufferList._init.call(this, buf)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
BufferList._init = function _init (buf) {
|
|
15
|
+
Object.defineProperty(this, symbol, { value: true })
|
|
16
|
+
|
|
17
|
+
this._bufs = []
|
|
18
|
+
this.length = 0
|
|
19
|
+
|
|
20
|
+
if (buf) {
|
|
21
|
+
this.append(buf)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
BufferList.prototype._new = function _new (buf) {
|
|
26
|
+
return new BufferList(buf)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
BufferList.prototype._offset = function _offset (offset) {
|
|
30
|
+
if (offset === 0) {
|
|
31
|
+
return [0, 0]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let tot = 0
|
|
35
|
+
|
|
36
|
+
for (let i = 0; i < this._bufs.length; i++) {
|
|
37
|
+
const _t = tot + this._bufs[i].length
|
|
38
|
+
if (offset < _t || i === this._bufs.length - 1) {
|
|
39
|
+
return [i, offset - tot]
|
|
40
|
+
}
|
|
41
|
+
tot = _t
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
BufferList.prototype._reverseOffset = function (blOffset) {
|
|
46
|
+
const bufferId = blOffset[0]
|
|
47
|
+
let offset = blOffset[1]
|
|
48
|
+
|
|
49
|
+
for (let i = 0; i < bufferId; i++) {
|
|
50
|
+
offset += this._bufs[i].length
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return offset
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
BufferList.prototype.getBuffers = function getBuffers () {
|
|
57
|
+
return this._bufs
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
BufferList.prototype.get = function get (index) {
|
|
61
|
+
if (index > this.length || index < 0) {
|
|
62
|
+
return undefined
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const offset = this._offset(index)
|
|
66
|
+
|
|
67
|
+
return this._bufs[offset[0]][offset[1]]
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
BufferList.prototype.slice = function slice (start, end) {
|
|
71
|
+
if (typeof start === 'number' && start < 0) {
|
|
72
|
+
start += this.length
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (typeof end === 'number' && end < 0) {
|
|
76
|
+
end += this.length
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return this.copy(null, 0, start, end)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
|
|
83
|
+
if (typeof srcStart !== 'number' || srcStart < 0) {
|
|
84
|
+
srcStart = 0
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (typeof srcEnd !== 'number' || srcEnd > this.length) {
|
|
88
|
+
srcEnd = this.length
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (srcStart >= this.length) {
|
|
92
|
+
return dst || Buffer.alloc(0)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (srcEnd <= 0) {
|
|
96
|
+
return dst || Buffer.alloc(0)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const copy = !!dst
|
|
100
|
+
const off = this._offset(srcStart)
|
|
101
|
+
const len = srcEnd - srcStart
|
|
102
|
+
let bytes = len
|
|
103
|
+
let bufoff = (copy && dstStart) || 0
|
|
104
|
+
let start = off[1]
|
|
105
|
+
|
|
106
|
+
// copy/slice everything
|
|
107
|
+
if (srcStart === 0 && srcEnd === this.length) {
|
|
108
|
+
if (!copy) {
|
|
109
|
+
// slice, but full concat if multiple buffers
|
|
110
|
+
return this._bufs.length === 1
|
|
111
|
+
? this._bufs[0]
|
|
112
|
+
: Buffer.concat(this._bufs, this.length)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// copy, need to copy individual buffers
|
|
116
|
+
for (let i = 0; i < this._bufs.length; i++) {
|
|
117
|
+
this._bufs[i].copy(dst, bufoff)
|
|
118
|
+
bufoff += this._bufs[i].length
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return dst
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// easy, cheap case where it's a subset of one of the buffers
|
|
125
|
+
if (bytes <= this._bufs[off[0]].length - start) {
|
|
126
|
+
return copy
|
|
127
|
+
? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)
|
|
128
|
+
: this._bufs[off[0]].slice(start, start + bytes)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (!copy) {
|
|
132
|
+
// a slice, we need something to copy in to
|
|
133
|
+
dst = Buffer.allocUnsafe(len)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
for (let i = off[0]; i < this._bufs.length; i++) {
|
|
137
|
+
const l = this._bufs[i].length - start
|
|
138
|
+
|
|
139
|
+
if (bytes > l) {
|
|
140
|
+
this._bufs[i].copy(dst, bufoff, start)
|
|
141
|
+
bufoff += l
|
|
142
|
+
} else {
|
|
143
|
+
this._bufs[i].copy(dst, bufoff, start, start + bytes)
|
|
144
|
+
bufoff += l
|
|
145
|
+
break
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
bytes -= l
|
|
149
|
+
|
|
150
|
+
if (start) {
|
|
151
|
+
start = 0
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// safeguard so that we don't return uninitialized memory
|
|
156
|
+
if (dst.length > bufoff) return dst.slice(0, bufoff)
|
|
157
|
+
|
|
158
|
+
return dst
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
BufferList.prototype.shallowSlice = function shallowSlice (start, end) {
|
|
162
|
+
start = start || 0
|
|
163
|
+
end = typeof end !== 'number' ? this.length : end
|
|
164
|
+
|
|
165
|
+
if (start < 0) {
|
|
166
|
+
start += this.length
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (end < 0) {
|
|
170
|
+
end += this.length
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (start === end) {
|
|
174
|
+
return this._new()
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const startOffset = this._offset(start)
|
|
178
|
+
const endOffset = this._offset(end)
|
|
179
|
+
const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)
|
|
180
|
+
|
|
181
|
+
if (endOffset[1] === 0) {
|
|
182
|
+
buffers.pop()
|
|
183
|
+
} else {
|
|
184
|
+
buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1])
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (startOffset[1] !== 0) {
|
|
188
|
+
buffers[0] = buffers[0].slice(startOffset[1])
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return this._new(buffers)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
BufferList.prototype.toString = function toString (encoding, start, end) {
|
|
195
|
+
return this.slice(start, end).toString(encoding)
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
BufferList.prototype.consume = function consume (bytes) {
|
|
199
|
+
// first, normalize the argument, in accordance with how Buffer does it
|
|
200
|
+
bytes = Math.trunc(bytes)
|
|
201
|
+
// do nothing if not a positive number
|
|
202
|
+
if (Number.isNaN(bytes) || bytes <= 0) return this
|
|
203
|
+
|
|
204
|
+
while (this._bufs.length) {
|
|
205
|
+
if (bytes >= this._bufs[0].length) {
|
|
206
|
+
bytes -= this._bufs[0].length
|
|
207
|
+
this.length -= this._bufs[0].length
|
|
208
|
+
this._bufs.shift()
|
|
209
|
+
} else {
|
|
210
|
+
this._bufs[0] = this._bufs[0].slice(bytes)
|
|
211
|
+
this.length -= bytes
|
|
212
|
+
break
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return this
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
BufferList.prototype.duplicate = function duplicate () {
|
|
220
|
+
const copy = this._new()
|
|
221
|
+
|
|
222
|
+
for (let i = 0; i < this._bufs.length; i++) {
|
|
223
|
+
copy.append(this._bufs[i])
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return copy
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
BufferList.prototype.append = function append (buf) {
|
|
230
|
+
return this._attach(buf, BufferList.prototype._appendBuffer)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
BufferList.prototype.prepend = function prepend (buf) {
|
|
234
|
+
return this._attach(buf, BufferList.prototype._prependBuffer, true)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
BufferList.prototype._attach = function _attach (buf, attacher, prepend) {
|
|
238
|
+
if (buf == null) {
|
|
239
|
+
return this
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (buf.buffer) {
|
|
243
|
+
// append/prepend a view of the underlying ArrayBuffer
|
|
244
|
+
attacher.call(this, Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength))
|
|
245
|
+
} else if (Array.isArray(buf)) {
|
|
246
|
+
const [starting, modifier] = prepend ? [buf.length - 1, -1] : [0, 1]
|
|
247
|
+
|
|
248
|
+
for (let i = starting; i >= 0 && i < buf.length; i += modifier) {
|
|
249
|
+
this._attach(buf[i], attacher, prepend)
|
|
250
|
+
}
|
|
251
|
+
} else if (this._isBufferList(buf)) {
|
|
252
|
+
// unwrap argument into individual BufferLists
|
|
253
|
+
const [starting, modifier] = prepend ? [buf._bufs.length - 1, -1] : [0, 1]
|
|
254
|
+
|
|
255
|
+
for (let i = starting; i >= 0 && i < buf._bufs.length; i += modifier) {
|
|
256
|
+
this._attach(buf._bufs[i], attacher, prepend)
|
|
257
|
+
}
|
|
258
|
+
} else {
|
|
259
|
+
// coerce number arguments to strings, since Buffer(number) does
|
|
260
|
+
// uninitialized memory allocation
|
|
261
|
+
if (typeof buf === 'number') {
|
|
262
|
+
buf = buf.toString()
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
attacher.call(this, Buffer.from(buf))
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return this
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
BufferList.prototype._appendBuffer = function appendBuffer (buf) {
|
|
272
|
+
this._bufs.push(buf)
|
|
273
|
+
this.length += buf.length
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
BufferList.prototype._prependBuffer = function prependBuffer (buf) {
|
|
277
|
+
this._bufs.unshift(buf)
|
|
278
|
+
this.length += buf.length
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
BufferList.prototype.indexOf = function (search, offset, encoding) {
|
|
282
|
+
if (encoding === undefined && typeof offset === 'string') {
|
|
283
|
+
encoding = offset
|
|
284
|
+
offset = undefined
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (typeof search === 'function' || Array.isArray(search)) {
|
|
288
|
+
throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.')
|
|
289
|
+
} else if (typeof search === 'number') {
|
|
290
|
+
search = Buffer.from([search])
|
|
291
|
+
} else if (typeof search === 'string') {
|
|
292
|
+
search = Buffer.from(search, encoding)
|
|
293
|
+
} else if (this._isBufferList(search)) {
|
|
294
|
+
search = search.slice()
|
|
295
|
+
} else if (Array.isArray(search.buffer)) {
|
|
296
|
+
search = Buffer.from(search.buffer, search.byteOffset, search.byteLength)
|
|
297
|
+
} else if (!Buffer.isBuffer(search)) {
|
|
298
|
+
search = Buffer.from(search)
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
offset = Number(offset || 0)
|
|
302
|
+
|
|
303
|
+
if (isNaN(offset)) {
|
|
304
|
+
offset = 0
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (offset < 0) {
|
|
308
|
+
offset = this.length + offset
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (offset < 0) {
|
|
312
|
+
offset = 0
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (search.length === 0) {
|
|
316
|
+
return offset > this.length ? this.length : offset
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
const blOffset = this._offset(offset)
|
|
320
|
+
let blIndex = blOffset[0] // index of which internal buffer we're working on
|
|
321
|
+
let buffOffset = blOffset[1] // offset of the internal buffer we're working on
|
|
322
|
+
|
|
323
|
+
// scan over each buffer
|
|
324
|
+
for (; blIndex < this._bufs.length; blIndex++) {
|
|
325
|
+
const buff = this._bufs[blIndex]
|
|
326
|
+
|
|
327
|
+
while (buffOffset < buff.length) {
|
|
328
|
+
const availableWindow = buff.length - buffOffset
|
|
329
|
+
|
|
330
|
+
if (availableWindow >= search.length) {
|
|
331
|
+
const nativeSearchResult = buff.indexOf(search, buffOffset)
|
|
332
|
+
|
|
333
|
+
if (nativeSearchResult !== -1) {
|
|
334
|
+
return this._reverseOffset([blIndex, nativeSearchResult])
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
buffOffset = buff.length - search.length + 1 // end of native search window
|
|
338
|
+
} else {
|
|
339
|
+
const revOffset = this._reverseOffset([blIndex, buffOffset])
|
|
340
|
+
|
|
341
|
+
if (this._match(revOffset, search)) {
|
|
342
|
+
return revOffset
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
buffOffset++
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
buffOffset = 0
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
return -1
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
BufferList.prototype._match = function (offset, search) {
|
|
356
|
+
if (this.length - offset < search.length) {
|
|
357
|
+
return false
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
for (let searchOffset = 0; searchOffset < search.length; searchOffset++) {
|
|
361
|
+
if (this.get(offset + searchOffset) !== search[searchOffset]) {
|
|
362
|
+
return false
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return true
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
;(function () {
|
|
369
|
+
const methods = {
|
|
370
|
+
readDoubleBE: 8,
|
|
371
|
+
readDoubleLE: 8,
|
|
372
|
+
readFloatBE: 4,
|
|
373
|
+
readFloatLE: 4,
|
|
374
|
+
readBigInt64BE: 8,
|
|
375
|
+
readBigInt64LE: 8,
|
|
376
|
+
readBigUInt64BE: 8,
|
|
377
|
+
readBigUInt64LE: 8,
|
|
378
|
+
readInt32BE: 4,
|
|
379
|
+
readInt32LE: 4,
|
|
380
|
+
readUInt32BE: 4,
|
|
381
|
+
readUInt32LE: 4,
|
|
382
|
+
readInt16BE: 2,
|
|
383
|
+
readInt16LE: 2,
|
|
384
|
+
readUInt16BE: 2,
|
|
385
|
+
readUInt16LE: 2,
|
|
386
|
+
readInt8: 1,
|
|
387
|
+
readUInt8: 1,
|
|
388
|
+
readIntBE: null,
|
|
389
|
+
readIntLE: null,
|
|
390
|
+
readUIntBE: null,
|
|
391
|
+
readUIntLE: null
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
for (const m in methods) {
|
|
395
|
+
(function (m) {
|
|
396
|
+
if (methods[m] === null) {
|
|
397
|
+
BufferList.prototype[m] = function (offset, byteLength) {
|
|
398
|
+
return this.slice(offset, offset + byteLength)[m](0, byteLength)
|
|
399
|
+
}
|
|
400
|
+
} else {
|
|
401
|
+
BufferList.prototype[m] = function (offset = 0) {
|
|
402
|
+
return this.slice(offset, offset + methods[m])[m](0)
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}(m))
|
|
406
|
+
}
|
|
407
|
+
}())
|
|
408
|
+
|
|
409
|
+
// Used internally by the class and also as an indicator of this object being
|
|
410
|
+
// a `BufferList`. It's not possible to use `instanceof BufferList` in a browser
|
|
411
|
+
// environment because there could be multiple different copies of the
|
|
412
|
+
// BufferList class and some `BufferList`s might be `BufferList`s.
|
|
413
|
+
BufferList.prototype._isBufferList = function _isBufferList (b) {
|
|
414
|
+
return b instanceof BufferList || BufferList.isBufferList(b)
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
BufferList.isBufferList = function isBufferList (b) {
|
|
418
|
+
return b != null && b[symbol]
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
module.exports = BufferList
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const DuplexStream = require('readable-stream').Duplex
|
|
4
|
+
const inherits = require('inherits')
|
|
5
|
+
const BufferList = require('./BufferList')
|
|
6
|
+
|
|
7
|
+
function BufferListStream (callback) {
|
|
8
|
+
if (!(this instanceof BufferListStream)) {
|
|
9
|
+
return new BufferListStream(callback)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (typeof callback === 'function') {
|
|
13
|
+
this._callback = callback
|
|
14
|
+
|
|
15
|
+
const piper = function piper (err) {
|
|
16
|
+
if (this._callback) {
|
|
17
|
+
this._callback(err)
|
|
18
|
+
this._callback = null
|
|
19
|
+
}
|
|
20
|
+
}.bind(this)
|
|
21
|
+
|
|
22
|
+
this.on('pipe', function onPipe (src) {
|
|
23
|
+
src.on('error', piper)
|
|
24
|
+
})
|
|
25
|
+
this.on('unpipe', function onUnpipe (src) {
|
|
26
|
+
src.removeListener('error', piper)
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
callback = null
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
BufferList._init.call(this, callback)
|
|
33
|
+
DuplexStream.call(this)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
inherits(BufferListStream, DuplexStream)
|
|
37
|
+
Object.assign(BufferListStream.prototype, BufferList.prototype)
|
|
38
|
+
|
|
39
|
+
BufferListStream.prototype._new = function _new (callback) {
|
|
40
|
+
return new BufferListStream(callback)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
BufferListStream.prototype._write = function _write (buf, encoding, callback) {
|
|
44
|
+
this._appendBuffer(buf)
|
|
45
|
+
|
|
46
|
+
if (typeof callback === 'function') {
|
|
47
|
+
callback()
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
BufferListStream.prototype._read = function _read (size) {
|
|
52
|
+
if (!this.length) {
|
|
53
|
+
return this.push(null)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
size = Math.min(size, this.length)
|
|
57
|
+
this.push(this.slice(0, size))
|
|
58
|
+
this.consume(size)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
BufferListStream.prototype.end = function end (chunk) {
|
|
62
|
+
DuplexStream.prototype.end.call(this, chunk)
|
|
63
|
+
|
|
64
|
+
if (this._callback) {
|
|
65
|
+
this._callback(null, this.slice())
|
|
66
|
+
this._callback = null
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
BufferListStream.prototype._destroy = function _destroy (err, cb) {
|
|
71
|
+
this._bufs.length = 0
|
|
72
|
+
this.length = 0
|
|
73
|
+
cb(err)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
BufferListStream.prototype._isBufferList = function _isBufferList (b) {
|
|
77
|
+
return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
BufferListStream.isBufferList = BufferList.isBufferList
|
|
81
|
+
|
|
82
|
+
module.exports = BufferListStream
|
|
83
|
+
module.exports.BufferListStream = BufferListStream
|
|
84
|
+
module.exports.BufferList = BufferList
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Duplex } from "readable-stream";
|
|
2
|
+
import {
|
|
3
|
+
BufferList as BL,
|
|
4
|
+
BufferListConstructor,
|
|
5
|
+
BufferListAcceptedTypes,
|
|
6
|
+
} from "./BufferList";
|
|
7
|
+
|
|
8
|
+
type BufferListStreamInit =
|
|
9
|
+
| ((err: Error, buffer: Buffer) => void)
|
|
10
|
+
| BufferListAcceptedTypes;
|
|
11
|
+
|
|
12
|
+
interface BufferListStreamConstructor {
|
|
13
|
+
new (initData?: BufferListStreamInit): BufferListStream;
|
|
14
|
+
(callback?: BufferListStreamInit): BufferListStream;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Determines if the passed object is a BufferList. It will return true
|
|
18
|
+
* if the passed object is an instance of BufferList or BufferListStream
|
|
19
|
+
* and false otherwise.
|
|
20
|
+
*
|
|
21
|
+
* N.B. this won't return true for BufferList or BufferListStream instances
|
|
22
|
+
* created by versions of this library before this static method was added.
|
|
23
|
+
*
|
|
24
|
+
* @param other
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
isBufferList(other: unknown): boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Rexporting BufferList and BufferListStream to fix
|
|
31
|
+
* issue with require/commonjs import and "export = " below.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
BufferList: BufferListConstructor;
|
|
35
|
+
BufferListStream: BufferListStreamConstructor;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface BufferListStream extends Duplex, BL {
|
|
39
|
+
prototype: BufferListStream & BL;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* BufferListStream is a Node Duplex Stream, so it can be read from
|
|
44
|
+
* and written to like a standard Node stream. You can also pipe()
|
|
45
|
+
* to and from a BufferListStream instance.
|
|
46
|
+
*
|
|
47
|
+
* The constructor takes an optional callback, if supplied, the
|
|
48
|
+
* callback will be called with an error argument followed by a
|
|
49
|
+
* reference to the bl instance, when bl.end() is called
|
|
50
|
+
* (i.e. from a piped stream).
|
|
51
|
+
*
|
|
52
|
+
* This is a convenient method of collecting the entire contents of
|
|
53
|
+
* a stream, particularly when the stream is chunky, such as a network
|
|
54
|
+
* stream.
|
|
55
|
+
*
|
|
56
|
+
* Normally, no arguments are required for the constructor, but you can
|
|
57
|
+
* initialise the list by passing in a single Buffer object or an array
|
|
58
|
+
* of Buffer object.
|
|
59
|
+
*
|
|
60
|
+
* `new` is not strictly required, if you don't instantiate a new object,
|
|
61
|
+
* it will be done automatically for you so you can create a new instance
|
|
62
|
+
* simply with:
|
|
63
|
+
*
|
|
64
|
+
* ```js
|
|
65
|
+
* const { BufferListStream } = require('bl');
|
|
66
|
+
* const bl = BufferListStream();
|
|
67
|
+
*
|
|
68
|
+
* // equivalent to:
|
|
69
|
+
*
|
|
70
|
+
* const { BufferListStream } = require('bl');
|
|
71
|
+
* const bl = new BufferListStream();
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* N.B. For backwards compatibility reasons, BufferListStream is the default
|
|
75
|
+
* export when you `require('bl')`:
|
|
76
|
+
*
|
|
77
|
+
* ```js
|
|
78
|
+
* const { BufferListStream } = require('bl')
|
|
79
|
+
*
|
|
80
|
+
* // equivalent to:
|
|
81
|
+
*
|
|
82
|
+
* const BufferListStream = require('bl')
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
declare const BufferListStream: BufferListStreamConstructor;
|
|
87
|
+
|
|
88
|
+
export = BufferListStream;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bl",
|
|
3
|
+
"version": "6.1.6",
|
|
4
|
+
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "bl.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"lint": "standard *.js test/*.js",
|
|
9
|
+
"test": "npm run lint && npm run test:types && node test/test.js | faucet",
|
|
10
|
+
"test:ci": "npm run lint && node test/test.js && npm run test:types",
|
|
11
|
+
"test:types": "tsc --target esnext --moduleResolution node --allowJs --noEmit --skipLibCheck test/test.js",
|
|
12
|
+
"build": "true"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/rvagg/bl.git"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/rvagg/bl",
|
|
19
|
+
"authors": [
|
|
20
|
+
"Rod Vagg <rod@vagg.org> (https://github.com/rvagg)",
|
|
21
|
+
"Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
|
|
22
|
+
"Jarett Cruger <jcrugzz@gmail.com> (https://github.com/jcrugzz)"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"buffer",
|
|
26
|
+
"buffers",
|
|
27
|
+
"stream",
|
|
28
|
+
"awesomesauce"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@types/readable-stream": "^4.0.0",
|
|
32
|
+
"buffer": "^6.0.3",
|
|
33
|
+
"inherits": "^2.0.4",
|
|
34
|
+
"readable-stream": "^4.2.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"faucet": "~0.0.1",
|
|
38
|
+
"standard": "^17.0.0",
|
|
39
|
+
"tape": "^5.2.2",
|
|
40
|
+
"typescript": "~5.9.2"
|
|
41
|
+
},
|
|
42
|
+
"release": {
|
|
43
|
+
"branches": [
|
|
44
|
+
"master"
|
|
45
|
+
],
|
|
46
|
+
"plugins": [
|
|
47
|
+
[
|
|
48
|
+
"@semantic-release/commit-analyzer",
|
|
49
|
+
{
|
|
50
|
+
"preset": "conventionalcommits",
|
|
51
|
+
"releaseRules": [
|
|
52
|
+
{
|
|
53
|
+
"breaking": true,
|
|
54
|
+
"release": "major"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"revert": true,
|
|
58
|
+
"release": "patch"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "feat",
|
|
62
|
+
"release": "minor"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "fix",
|
|
66
|
+
"release": "patch"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "chore",
|
|
70
|
+
"release": "patch"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "docs",
|
|
74
|
+
"release": "patch"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "test",
|
|
78
|
+
"release": "patch"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"scope": "no-release",
|
|
82
|
+
"release": false
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
"@semantic-release/release-notes-generator",
|
|
89
|
+
{
|
|
90
|
+
"preset": "conventionalcommits",
|
|
91
|
+
"presetConfig": {
|
|
92
|
+
"types": [
|
|
93
|
+
{
|
|
94
|
+
"type": "feat",
|
|
95
|
+
"section": "Features"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "fix",
|
|
99
|
+
"section": "Bug Fixes"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "chore",
|
|
103
|
+
"section": "Trivial Changes"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "docs",
|
|
107
|
+
"section": "Trivial Changes"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "test",
|
|
111
|
+
"section": "Tests"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"@semantic-release/changelog",
|
|
118
|
+
"@semantic-release/npm",
|
|
119
|
+
"@semantic-release/github",
|
|
120
|
+
"@semantic-release/git"
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|