@machhub-dev/node-red-nodes 1.0.5
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/LICENSE +373 -0
- package/dist/lib/config/machhub-env-loader.js +93 -0
- package/dist/lib/enums/data.enums.js +12 -0
- package/dist/lib/errors/errors.js +15 -0
- package/dist/lib/models/collections.model.js +2 -0
- package/dist/lib/models/machine.models.js +2 -0
- package/dist/lib/models/product.models.js +2 -0
- package/dist/lib/models/recordId.models.js +11 -0
- package/dist/lib/services/http.api.services.js +152 -0
- package/dist/lib/services/http.service.js +188 -0
- package/dist/lib/services/mqtt.service.js +234 -0
- package/dist/nodes/bulk-tag-write.html +91 -0
- package/dist/nodes/bulk-tag-write.js +118 -0
- package/dist/nodes/collections.html +508 -0
- package/dist/nodes/collections.js +241 -0
- package/dist/nodes/dbquery.html +131 -0
- package/dist/nodes/dbquery.js +83 -0
- package/dist/nodes/machhub-config.html +39 -0
- package/dist/nodes/machhub-config.js +15 -0
- package/dist/nodes/tag-read.html +194 -0
- package/dist/nodes/tag-read.js +133 -0
- package/dist/nodes/tag-write.html +162 -0
- package/dist/nodes/tag-write.js +110 -0
- package/node_modules/@babel/runtime/LICENSE +22 -0
- package/node_modules/@babel/runtime/README.md +19 -0
- package/node_modules/@babel/runtime/helpers/AwaitValue.js +4 -0
- package/node_modules/@babel/runtime/helpers/OverloadYield.js +4 -0
- package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +9 -0
- package/node_modules/@babel/runtime/helpers/applyDecs.js +236 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2203.js +184 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +191 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2301.js +222 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2305.js +133 -0
- package/node_modules/@babel/runtime/helpers/applyDecs2311.js +124 -0
- package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +6 -0
- package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +4 -0
- package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +5 -0
- package/node_modules/@babel/runtime/helpers/assertClassBrand.js +5 -0
- package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +5 -0
- package/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +24 -0
- package/node_modules/@babel/runtime/helpers/asyncIterator.js +45 -0
- package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +26 -0
- package/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +5 -0
- package/node_modules/@babel/runtime/helpers/callSuper.js +7 -0
- package/node_modules/@babel/runtime/helpers/checkInRHS.js +6 -0
- package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +4 -0
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +10 -0
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +4 -0
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classCallCheck.js +4 -0
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +5 -0
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +5 -0
- package/node_modules/@babel/runtime/helpers/classNameTDZError.js +4 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateGetter.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +5 -0
- package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +4 -0
- package/node_modules/@babel/runtime/helpers/classPrivateSetter.js +5 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +5 -0
- package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +4 -0
- package/node_modules/@babel/runtime/helpers/construct.js +10 -0
- package/node_modules/@babel/runtime/helpers/createClass.js +13 -0
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +50 -0
- package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +19 -0
- package/node_modules/@babel/runtime/helpers/createSuper.js +16 -0
- package/node_modules/@babel/runtime/helpers/decorate.js +250 -0
- package/node_modules/@babel/runtime/helpers/defaults.js +9 -0
- package/node_modules/@babel/runtime/helpers/defineAccessor.js +8 -0
- package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +12 -0
- package/node_modules/@babel/runtime/helpers/defineProperty.js +10 -0
- package/node_modules/@babel/runtime/helpers/dispose.js +28 -0
- package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +236 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +184 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +191 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +222 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +133 -0
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +124 -0
- package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +24 -0
- package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +45 -0
- package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +26 -0
- package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/callSuper.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/construct.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/createClass.js +13 -0
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +50 -0
- package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
- package/node_modules/@babel/runtime/helpers/esm/createSuper.js +16 -0
- package/node_modules/@babel/runtime/helpers/esm/decorate.js +250 -0
- package/node_modules/@babel/runtime/helpers/esm/defaults.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +12 -0
- package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/dispose.js +28 -0
- package/node_modules/@babel/runtime/helpers/esm/extends.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/get.js +11 -0
- package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/identity.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +27 -0
- package/node_modules/@babel/runtime/helpers/esm/inherits.js +14 -0
- package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +5 -0
- package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/instanceof.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +27 -0
- package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +28 -0
- package/node_modules/@babel/runtime/helpers/esm/jsx.js +22 -0
- package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +14 -0
- package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +23 -0
- package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +13 -0
- package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/package.json +3 -0
- package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +304 -0
- package/node_modules/@babel/runtime/helpers/esm/set.js +22 -0
- package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +12 -0
- package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/tdz.js +4 -0
- package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +6 -0
- package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +2 -0
- package/node_modules/@babel/runtime/helpers/esm/toArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +12 -0
- package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +7 -0
- package/node_modules/@babel/runtime/helpers/esm/toSetter.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/typeof.js +10 -0
- package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +9 -0
- package/node_modules/@babel/runtime/helpers/esm/using.js +12 -0
- package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +59 -0
- package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +69 -0
- package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +27 -0
- package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +51 -0
- package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +4 -0
- package/node_modules/@babel/runtime/helpers/extends.js +10 -0
- package/node_modules/@babel/runtime/helpers/get.js +11 -0
- package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +6 -0
- package/node_modules/@babel/runtime/helpers/identity.js +4 -0
- package/node_modules/@babel/runtime/helpers/importDeferProxy.js +27 -0
- package/node_modules/@babel/runtime/helpers/inherits.js +14 -0
- package/node_modules/@babel/runtime/helpers/inheritsLoose.js +5 -0
- package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +9 -0
- package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +4 -0
- package/node_modules/@babel/runtime/helpers/instanceof.js +4 -0
- package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +6 -0
- package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +27 -0
- package/node_modules/@babel/runtime/helpers/isNativeFunction.js +8 -0
- package/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +9 -0
- package/node_modules/@babel/runtime/helpers/iterableToArray.js +4 -0
- package/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +28 -0
- package/node_modules/@babel/runtime/helpers/jsx.js +22 -0
- package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +9 -0
- package/node_modules/@babel/runtime/helpers/newArrowCheck.js +4 -0
- package/node_modules/@babel/runtime/helpers/nonIterableRest.js +4 -0
- package/node_modules/@babel/runtime/helpers/nonIterableSpread.js +4 -0
- package/node_modules/@babel/runtime/helpers/nullishReceiverError.js +4 -0
- package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +4 -0
- package/node_modules/@babel/runtime/helpers/objectSpread.js +14 -0
- package/node_modules/@babel/runtime/helpers/objectSpread2.js +23 -0
- package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +13 -0
- package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +10 -0
- package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +8 -0
- package/node_modules/@babel/runtime/helpers/readOnlyError.js +4 -0
- package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +304 -0
- package/node_modules/@babel/runtime/helpers/set.js +22 -0
- package/node_modules/@babel/runtime/helpers/setFunctionName.js +12 -0
- package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +6 -0
- package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +7 -0
- package/node_modules/@babel/runtime/helpers/slicedToArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/superPropBase.js +6 -0
- package/node_modules/@babel/runtime/helpers/superPropGet.js +9 -0
- package/node_modules/@babel/runtime/helpers/superPropSet.js +6 -0
- package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +8 -0
- package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +4 -0
- package/node_modules/@babel/runtime/helpers/tdz.js +4 -0
- package/node_modules/@babel/runtime/helpers/temporalRef.js +6 -0
- package/node_modules/@babel/runtime/helpers/temporalUndefined.js +2 -0
- package/node_modules/@babel/runtime/helpers/toArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/toConsumableArray.js +8 -0
- package/node_modules/@babel/runtime/helpers/toPrimitive.js +12 -0
- package/node_modules/@babel/runtime/helpers/toPropertyKey.js +7 -0
- package/node_modules/@babel/runtime/helpers/toSetter.js +10 -0
- package/node_modules/@babel/runtime/helpers/typeof.js +10 -0
- package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +9 -0
- package/node_modules/@babel/runtime/helpers/using.js +12 -0
- package/node_modules/@babel/runtime/helpers/usingCtx.js +59 -0
- package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +69 -0
- package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +27 -0
- package/node_modules/@babel/runtime/helpers/wrapRegExp.js +51 -0
- package/node_modules/@babel/runtime/helpers/writeOnlyError.js +4 -0
- package/node_modules/@babel/runtime/package.json +1056 -0
- package/node_modules/@babel/runtime/regenerator/index.js +15 -0
- package/node_modules/@types/ace/LICENSE +21 -0
- package/node_modules/@types/ace/README.md +15 -0
- package/node_modules/@types/ace/index.d.ts +3135 -0
- package/node_modules/@types/ace/package.json +30 -0
- package/node_modules/@types/body-parser/LICENSE +21 -0
- package/node_modules/@types/body-parser/README.md +15 -0
- package/node_modules/@types/body-parser/index.d.ts +95 -0
- package/node_modules/@types/body-parser/package.json +58 -0
- package/node_modules/@types/connect/LICENSE +21 -0
- package/node_modules/@types/connect/README.md +15 -0
- package/node_modules/@types/connect/index.d.ts +91 -0
- package/node_modules/@types/connect/package.json +32 -0
- package/node_modules/@types/cors/LICENSE +21 -0
- package/node_modules/@types/cors/README.md +75 -0
- package/node_modules/@types/cors/index.d.ts +56 -0
- package/node_modules/@types/cors/package.json +32 -0
- package/node_modules/@types/express/LICENSE +21 -0
- package/node_modules/@types/express/README.md +15 -0
- package/node_modules/@types/express/index.d.ts +128 -0
- package/node_modules/@types/express/package.json +45 -0
- package/node_modules/@types/express-serve-static-core/LICENSE +21 -0
- package/node_modules/@types/express-serve-static-core/README.md +15 -0
- package/node_modules/@types/express-serve-static-core/index.d.ts +1295 -0
- package/node_modules/@types/express-serve-static-core/package.json +50 -0
- package/node_modules/@types/http-errors/LICENSE +21 -0
- package/node_modules/@types/http-errors/README.md +15 -0
- package/node_modules/@types/http-errors/index.d.ts +77 -0
- package/node_modules/@types/http-errors/package.json +30 -0
- package/node_modules/@types/jquery/JQuery.d.ts +13372 -0
- package/node_modules/@types/jquery/JQueryStatic.d.ts +13944 -0
- package/node_modules/@types/jquery/LICENSE +21 -0
- package/node_modules/@types/jquery/README.md +15 -0
- package/node_modules/@types/jquery/dist/jquery.slim.d.ts +3 -0
- package/node_modules/@types/jquery/index.d.ts +7 -0
- package/node_modules/@types/jquery/legacy.d.ts +204 -0
- package/node_modules/@types/jquery/misc.d.ts +7364 -0
- package/node_modules/@types/jquery/package.json +132 -0
- package/node_modules/@types/mime/LICENSE +21 -0
- package/node_modules/@types/mime/Mime.d.ts +10 -0
- package/node_modules/@types/mime/README.md +15 -0
- package/node_modules/@types/mime/index.d.ts +31 -0
- package/node_modules/@types/mime/lite.d.ts +7 -0
- package/node_modules/@types/mime/package.json +30 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/node/assert.d.ts +1040 -0
- package/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/node_modules/@types/node/buffer.d.ts +2293 -0
- package/node_modules/@types/node/child_process.d.ts +1544 -0
- package/node_modules/@types/node/cluster.d.ts +578 -0
- package/node_modules/@types/node/console.d.ts +452 -0
- package/node_modules/@types/node/constants.d.ts +19 -0
- package/node_modules/@types/node/crypto.d.ts +4451 -0
- package/node_modules/@types/node/dgram.d.ts +596 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/node_modules/@types/node/dns/promises.d.ts +476 -0
- package/node_modules/@types/node/dns.d.ts +865 -0
- package/node_modules/@types/node/dom-events.d.ts +124 -0
- package/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@types/node/events.d.ts +931 -0
- package/node_modules/@types/node/fs/promises.d.ts +1264 -0
- package/node_modules/@types/node/fs.d.ts +4390 -0
- package/node_modules/@types/node/globals.d.ts +510 -0
- package/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@types/node/http.d.ts +1921 -0
- package/node_modules/@types/node/http2.d.ts +2418 -0
- package/node_modules/@types/node/https.d.ts +550 -0
- package/node_modules/@types/node/index.d.ts +90 -0
- package/node_modules/@types/node/inspector.d.ts +2746 -0
- package/node_modules/@types/node/module.d.ts +301 -0
- package/node_modules/@types/node/net.d.ts +999 -0
- package/node_modules/@types/node/os.d.ts +495 -0
- package/node_modules/@types/node/package.json +217 -0
- package/node_modules/@types/node/path.d.ts +200 -0
- package/node_modules/@types/node/perf_hooks.d.ts +941 -0
- package/node_modules/@types/node/process.d.ts +1913 -0
- package/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/node/querystring.d.ts +153 -0
- package/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/node_modules/@types/node/readline.d.ts +540 -0
- package/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@types/node/sea.d.ts +153 -0
- package/node_modules/@types/node/sqlite.d.ts +213 -0
- package/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/node_modules/@types/node/stream/web.d.ts +367 -0
- package/node_modules/@types/node/stream.d.ts +1707 -0
- package/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/test.d.ts +2006 -0
- package/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/node_modules/@types/node/timers.d.ts +240 -0
- package/node_modules/@types/node/tls.d.ts +1220 -0
- package/node_modules/@types/node/trace_events.d.ts +197 -0
- package/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@types/node/url.d.ts +969 -0
- package/node_modules/@types/node/util.d.ts +2298 -0
- package/node_modules/@types/node/v8.d.ts +808 -0
- package/node_modules/@types/node/vm.d.ts +922 -0
- package/node_modules/@types/node/wasi.d.ts +181 -0
- package/node_modules/@types/node/worker_threads.d.ts +712 -0
- package/node_modules/@types/node/zlib.d.ts +539 -0
- package/node_modules/@types/node-red/LICENSE +21 -0
- package/node_modules/@types/node-red/README.md +15 -0
- package/node_modules/@types/node-red/index.d.ts +241 -0
- package/node_modules/@types/node-red/package.json +52 -0
- package/node_modules/@types/node-red__editor-api/LICENSE +21 -0
- package/node_modules/@types/node-red__editor-api/README.md +65 -0
- package/node_modules/@types/node-red__editor-api/index.d.ts +46 -0
- package/node_modules/@types/node-red__editor-api/package.json +33 -0
- package/node_modules/@types/node-red__editor-client/LICENSE +21 -0
- package/node_modules/@types/node-red__editor-client/README.md +15 -0
- package/node_modules/@types/node-red__editor-client/index.d.ts +1738 -0
- package/node_modules/@types/node-red__editor-client/package.json +36 -0
- package/node_modules/@types/node-red__registry/LICENSE +21 -0
- package/node_modules/@types/node-red__registry/README.md +15 -0
- package/node_modules/@types/node-red__registry/index.d.ts +452 -0
- package/node_modules/@types/node-red__registry/package.json +34 -0
- package/node_modules/@types/node-red__runtime/LICENSE +21 -0
- package/node_modules/@types/node-red__runtime/README.md +15 -0
- package/node_modules/@types/node-red__runtime/index.d.ts +1458 -0
- package/node_modules/@types/node-red__runtime/package.json +36 -0
- package/node_modules/@types/node-red__util/LICENSE +21 -0
- package/node_modules/@types/node-red__util/README.md +15 -0
- package/node_modules/@types/node-red__util/index.d.ts +557 -0
- package/node_modules/@types/node-red__util/package.json +34 -0
- package/node_modules/@types/passport/LICENSE +21 -0
- package/node_modules/@types/passport/README.md +15 -0
- package/node_modules/@types/passport/index.d.ts +921 -0
- package/node_modules/@types/passport/package.json +57 -0
- package/node_modules/@types/qs/LICENSE +21 -0
- package/node_modules/@types/qs/README.md +15 -0
- package/node_modules/@types/qs/index.d.ts +80 -0
- package/node_modules/@types/qs/package.json +65 -0
- package/node_modules/@types/range-parser/LICENSE +21 -0
- package/node_modules/@types/range-parser/README.md +53 -0
- package/node_modules/@types/range-parser/index.d.ts +34 -0
- package/node_modules/@types/range-parser/package.json +25 -0
- package/node_modules/@types/readable-stream/LICENSE +21 -0
- package/node_modules/@types/readable-stream/README.md +15 -0
- package/node_modules/@types/readable-stream/index.d.ts +677 -0
- package/node_modules/@types/readable-stream/package.json +38 -0
- package/node_modules/@types/send/LICENSE +21 -0
- package/node_modules/@types/send/README.md +15 -0
- package/node_modules/@types/send/index.d.ts +225 -0
- package/node_modules/@types/send/package.json +33 -0
- package/node_modules/@types/serve-static/LICENSE +21 -0
- package/node_modules/@types/serve-static/README.md +15 -0
- package/node_modules/@types/serve-static/index.d.ts +107 -0
- package/node_modules/@types/serve-static/package.json +39 -0
- package/node_modules/@types/sizzle/LICENSE +21 -0
- package/node_modules/@types/sizzle/README.md +15 -0
- package/node_modules/@types/sizzle/index.d.ts +91 -0
- package/node_modules/@types/sizzle/package.json +25 -0
- package/node_modules/@types/ws/LICENSE +21 -0
- package/node_modules/@types/ws/README.md +15 -0
- package/node_modules/@types/ws/index.d.mts +21 -0
- package/node_modules/@types/ws/index.d.ts +401 -0
- package/node_modules/@types/ws/package.json +71 -0
- package/node_modules/abort-controller/LICENSE +21 -0
- package/node_modules/abort-controller/README.md +98 -0
- package/node_modules/abort-controller/browser.js +13 -0
- package/node_modules/abort-controller/browser.mjs +11 -0
- package/node_modules/abort-controller/dist/abort-controller.d.ts +43 -0
- package/node_modules/abort-controller/dist/abort-controller.js +127 -0
- package/node_modules/abort-controller/dist/abort-controller.js.map +1 -0
- package/node_modules/abort-controller/dist/abort-controller.mjs +118 -0
- package/node_modules/abort-controller/dist/abort-controller.mjs.map +1 -0
- package/node_modules/abort-controller/dist/abort-controller.umd.js +5 -0
- package/node_modules/abort-controller/dist/abort-controller.umd.js.map +1 -0
- package/node_modules/abort-controller/package.json +97 -0
- package/node_modules/abort-controller/polyfill.js +21 -0
- package/node_modules/abort-controller/polyfill.mjs +19 -0
- package/node_modules/base64-js/LICENSE +21 -0
- package/node_modules/base64-js/README.md +34 -0
- package/node_modules/base64-js/base64js.min.js +1 -0
- package/node_modules/base64-js/index.d.ts +3 -0
- package/node_modules/base64-js/index.js +150 -0
- package/node_modules/base64-js/package.json +47 -0
- package/node_modules/bl/.github/dependabot.yml +16 -0
- package/node_modules/bl/.github/workflows/test-and-release.yml +61 -0
- package/node_modules/bl/BufferList.d.ts +418 -0
- package/node_modules/bl/BufferList.js +400 -0
- package/node_modules/bl/CHANGELOG.md +142 -0
- package/node_modules/bl/LICENSE.md +13 -0
- package/node_modules/bl/README.md +247 -0
- package/node_modules/bl/bl.js +84 -0
- package/node_modules/bl/index.d.ts +88 -0
- package/node_modules/bl/package.json +123 -0
- package/node_modules/bl/test/convert.js +21 -0
- package/node_modules/bl/test/indexOf.js +492 -0
- package/node_modules/bl/test/isBufferList.js +32 -0
- package/node_modules/bl/test/test.js +948 -0
- package/node_modules/buffer/AUTHORS.md +73 -0
- package/node_modules/buffer/LICENSE +21 -0
- package/node_modules/buffer/README.md +410 -0
- package/node_modules/buffer/index.d.ts +194 -0
- package/node_modules/buffer/index.js +2106 -0
- package/node_modules/buffer/package.json +93 -0
- package/node_modules/buffer-from/LICENSE +21 -0
- package/node_modules/buffer-from/index.js +72 -0
- package/node_modules/buffer-from/package.json +19 -0
- package/node_modules/buffer-from/readme.md +69 -0
- package/node_modules/commist/.github/workflows/ci.yml +27 -0
- package/node_modules/commist/LICENSE +21 -0
- package/node_modules/commist/README.md +113 -0
- package/node_modules/commist/example.js +26 -0
- package/node_modules/commist/index.js +155 -0
- package/node_modules/commist/leven.js +91 -0
- package/node_modules/commist/package.json +28 -0
- package/node_modules/commist/test.js +368 -0
- package/node_modules/concat-stream/LICENSE +24 -0
- package/node_modules/concat-stream/index.js +144 -0
- package/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/concat-stream/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/concat-stream/node_modules/readable-stream/README.md +106 -0
- package/node_modules/concat-stream/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/concat-stream/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/concat-stream/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js +190 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js +641 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/concat-stream/node_modules/readable-stream/package.json +68 -0
- package/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js +9 -0
- package/node_modules/concat-stream/node_modules/readable-stream/readable.js +16 -0
- package/node_modules/concat-stream/package.json +55 -0
- package/node_modules/concat-stream/readme.md +102 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +60 -0
- package/node_modules/debug/src/browser.js +271 -0
- package/node_modules/debug/src/common.js +274 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/event-target-shim/LICENSE +22 -0
- package/node_modules/event-target-shim/README.md +293 -0
- package/node_modules/event-target-shim/dist/event-target-shim.js +871 -0
- package/node_modules/event-target-shim/dist/event-target-shim.js.map +1 -0
- package/node_modules/event-target-shim/dist/event-target-shim.mjs +862 -0
- package/node_modules/event-target-shim/dist/event-target-shim.mjs.map +1 -0
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js +6 -0
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js.map +1 -0
- package/node_modules/event-target-shim/index.d.ts +399 -0
- package/node_modules/event-target-shim/package.json +82 -0
- package/node_modules/events/.airtap.yml +15 -0
- package/node_modules/events/.github/FUNDING.yml +12 -0
- package/node_modules/events/.travis.yml +18 -0
- package/node_modules/events/History.md +118 -0
- package/node_modules/events/LICENSE +22 -0
- package/node_modules/events/Readme.md +50 -0
- package/node_modules/events/events.js +497 -0
- package/node_modules/events/package.json +37 -0
- package/node_modules/events/security.md +10 -0
- package/node_modules/events/tests/add-listeners.js +111 -0
- package/node_modules/events/tests/check-listener-leaks.js +101 -0
- package/node_modules/events/tests/common.js +104 -0
- package/node_modules/events/tests/errors.js +13 -0
- package/node_modules/events/tests/events-list.js +28 -0
- package/node_modules/events/tests/events-once.js +234 -0
- package/node_modules/events/tests/index.js +64 -0
- package/node_modules/events/tests/legacy-compat.js +16 -0
- package/node_modules/events/tests/listener-count.js +37 -0
- package/node_modules/events/tests/listeners-side-effects.js +56 -0
- package/node_modules/events/tests/listeners.js +168 -0
- package/node_modules/events/tests/max-listeners.js +47 -0
- package/node_modules/events/tests/method-names.js +35 -0
- package/node_modules/events/tests/modify-in-emit.js +90 -0
- package/node_modules/events/tests/num-args.js +60 -0
- package/node_modules/events/tests/once.js +83 -0
- package/node_modules/events/tests/prepend.js +31 -0
- package/node_modules/events/tests/remove-all-listeners.js +133 -0
- package/node_modules/events/tests/remove-listeners.js +212 -0
- package/node_modules/events/tests/set-max-listeners-side-effects.js +31 -0
- package/node_modules/events/tests/special-event-names.js +45 -0
- package/node_modules/events/tests/subclass.js +66 -0
- package/node_modules/events/tests/symbols.js +25 -0
- package/node_modules/fast-unique-numbers/LICENSE +21 -0
- package/node_modules/fast-unique-numbers/README.md +51 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/add-unique-number.d.ts +3 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/add-unique-number.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/add-unique-number.js +8 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/add-unique-number.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/cache.d.ts +3 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/cache.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/cache.js +7 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/cache.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/generate-unique-number.d.ts +3 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/generate-unique-number.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/generate-unique-number.js +46 -0
- package/node_modules/fast-unique-numbers/build/es2019/factories/generate-unique-number.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/module.d.ts +5 -0
- package/node_modules/fast-unique-numbers/build/es2019/module.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/module.js +14 -0
- package/node_modules/fast-unique-numbers/build/es2019/module.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-factory.d.ts +4 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-factory.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-factory.js +2 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-factory.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-function.d.ts +2 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-function.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-function.js +2 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-function.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/cache-factory.d.ts +3 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/cache-factory.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/cache-factory.js +2 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/cache-factory.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/cache-function.d.ts +2 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/cache-function.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/cache-function.js +2 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/cache-function.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-factory.d.ts +4 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-factory.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-factory.js +2 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-factory.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-function.d.ts +2 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-function.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-function.js +2 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-function.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/index.d.ts +7 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/index.d.ts.map +1 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/index.js +7 -0
- package/node_modules/fast-unique-numbers/build/es2019/types/index.js.map +1 -0
- package/node_modules/fast-unique-numbers/build/es5/bundle.js +76 -0
- package/node_modules/fast-unique-numbers/build/node/factories/add-unique-number.js +14 -0
- package/node_modules/fast-unique-numbers/build/node/factories/cache.js +13 -0
- package/node_modules/fast-unique-numbers/build/node/factories/generate-unique-number.js +52 -0
- package/node_modules/fast-unique-numbers/build/node/module.js +34 -0
- package/node_modules/fast-unique-numbers/build/node/types/add-unique-number-factory.js +5 -0
- package/node_modules/fast-unique-numbers/build/node/types/add-unique-number-function.js +5 -0
- package/node_modules/fast-unique-numbers/build/node/types/cache-factory.js +5 -0
- package/node_modules/fast-unique-numbers/build/node/types/cache-function.js +5 -0
- package/node_modules/fast-unique-numbers/build/node/types/generate-unique-number-factory.js +5 -0
- package/node_modules/fast-unique-numbers/build/node/types/generate-unique-number-function.js +5 -0
- package/node_modules/fast-unique-numbers/build/node/types/index.js +71 -0
- package/node_modules/fast-unique-numbers/package.json +94 -0
- package/node_modules/fast-unique-numbers/src/factories/add-unique-number.ts +11 -0
- package/node_modules/fast-unique-numbers/src/factories/cache.ts +9 -0
- package/node_modules/fast-unique-numbers/src/factories/generate-unique-number.ts +55 -0
- package/node_modules/fast-unique-numbers/src/module.ts +17 -0
- package/node_modules/fast-unique-numbers/src/tsconfig.json +6 -0
- package/node_modules/fast-unique-numbers/src/types/add-unique-number-factory.ts +4 -0
- package/node_modules/fast-unique-numbers/src/types/add-unique-number-function.ts +1 -0
- package/node_modules/fast-unique-numbers/src/types/cache-factory.ts +3 -0
- package/node_modules/fast-unique-numbers/src/types/cache-function.ts +1 -0
- package/node_modules/fast-unique-numbers/src/types/generate-unique-number-factory.ts +7 -0
- package/node_modules/fast-unique-numbers/src/types/generate-unique-number-function.ts +1 -0
- package/node_modules/fast-unique-numbers/src/types/index.ts +6 -0
- package/node_modules/help-me/.github/workflows/ci.yml +28 -0
- package/node_modules/help-me/LICENSE +22 -0
- package/node_modules/help-me/README.md +66 -0
- package/node_modules/help-me/doc/hello.txt +1 -0
- package/node_modules/help-me/doc/help.txt +5 -0
- package/node_modules/help-me/example.js +18 -0
- package/node_modules/help-me/fixture/basic/hello.txt +1 -0
- package/node_modules/help-me/fixture/basic/help.txt +1 -0
- package/node_modules/help-me/fixture/dir/a/b.txt +0 -0
- package/node_modules/help-me/fixture/no-ext/hello +1 -0
- package/node_modules/help-me/fixture/sameprefix/hello world.txt +1 -0
- package/node_modules/help-me/fixture/sameprefix/hello.txt +1 -0
- package/node_modules/help-me/fixture/shortnames/abcde fghi lmno.txt +1 -0
- package/node_modules/help-me/fixture/shortnames/abcde hello.txt +1 -0
- package/node_modules/help-me/fixture/shortnames/hello world.txt +1 -0
- package/node_modules/help-me/help-me.js +134 -0
- package/node_modules/help-me/package.json +36 -0
- package/node_modules/help-me/test.js +316 -0
- package/node_modules/ieee754/LICENSE +11 -0
- package/node_modules/ieee754/README.md +51 -0
- package/node_modules/ieee754/index.d.ts +10 -0
- package/node_modules/ieee754/index.js +85 -0
- package/node_modules/ieee754/package.json +52 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/js-sdsl/CHANGELOG.md +211 -0
- package/node_modules/js-sdsl/LICENSE +21 -0
- package/node_modules/js-sdsl/README.md +296 -0
- package/node_modules/js-sdsl/README.zh-CN.md +298 -0
- package/node_modules/js-sdsl/dist/cjs/container/ContainerBase/index.d.ts +206 -0
- package/node_modules/js-sdsl/dist/cjs/container/ContainerBase/index.js +40 -0
- package/node_modules/js-sdsl/dist/cjs/container/ContainerBase/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/HashContainer/Base/index.d.ts +29 -0
- package/node_modules/js-sdsl/dist/cjs/container/HashContainer/Base/index.js +188 -0
- package/node_modules/js-sdsl/dist/cjs/container/HashContainer/Base/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashMap.d.ts +49 -0
- package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashMap.js +125 -0
- package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashMap.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashSet.d.ts +39 -0
- package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashSet.js +94 -0
- package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashSet.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/PriorityQueue.d.ts +79 -0
- package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/PriorityQueue.js +118 -0
- package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/PriorityQueue.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Queue.d.ts +22 -0
- package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Queue.js +52 -0
- package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Queue.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Stack.d.ts +22 -0
- package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Stack.js +42 -0
- package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Stack.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/RandomIterator.d.ts +9 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/RandomIterator.js +58 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/RandomIterator.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/index.d.ts +67 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/index.js +16 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Deque.d.ts +58 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Deque.js +338 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Deque.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/LinkList.d.ts +58 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/LinkList.js +330 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/LinkList.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Vector.d.ts +40 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Vector.js +158 -0
- package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Vector.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeIterator.d.ts +18 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeIterator.js +80 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeIterator.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeNode.d.ts +47 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeNode.js +115 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeNode.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/index.d.ts +58 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/index.js +514 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedMap.d.ts +62 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedMap.js +127 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedMap.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedSet.d.ts +54 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedSet.js +107 -0
- package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedSet.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/index.d.ts +21 -0
- package/node_modules/js-sdsl/dist/cjs/index.js +102 -0
- package/node_modules/js-sdsl/dist/cjs/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/utils/checkObject.d.ts +1 -0
- package/node_modules/js-sdsl/dist/cjs/utils/checkObject.js +13 -0
- package/node_modules/js-sdsl/dist/cjs/utils/checkObject.js.map +1 -0
- package/node_modules/js-sdsl/dist/cjs/utils/throwError.d.ts +1 -0
- package/node_modules/js-sdsl/dist/cjs/utils/throwError.js +12 -0
- package/node_modules/js-sdsl/dist/cjs/utils/throwError.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/ContainerBase/index.d.ts +206 -0
- package/node_modules/js-sdsl/dist/esm/container/ContainerBase/index.js +68 -0
- package/node_modules/js-sdsl/dist/esm/container/ContainerBase/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/HashContainer/Base/index.d.ts +29 -0
- package/node_modules/js-sdsl/dist/esm/container/HashContainer/Base/index.js +201 -0
- package/node_modules/js-sdsl/dist/esm/container/HashContainer/Base/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashMap.d.ts +49 -0
- package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashMap.js +248 -0
- package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashMap.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashSet.d.ts +39 -0
- package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashSet.js +223 -0
- package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashSet.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/OtherContainer/PriorityQueue.d.ts +79 -0
- package/node_modules/js-sdsl/dist/esm/container/OtherContainer/PriorityQueue.js +171 -0
- package/node_modules/js-sdsl/dist/esm/container/OtherContainer/PriorityQueue.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Queue.d.ts +22 -0
- package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Queue.js +69 -0
- package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Queue.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Stack.d.ts +22 -0
- package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Stack.js +59 -0
- package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Stack.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/RandomIterator.d.ts +9 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/RandomIterator.js +78 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/RandomIterator.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/index.d.ts +67 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/index.js +33 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Deque.d.ts +58 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Deque.js +498 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Deque.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/LinkList.d.ts +58 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/LinkList.js +456 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/LinkList.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Vector.d.ts +40 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Vector.js +323 -0
- package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Vector.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeIterator.d.ts +18 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeIterator.js +98 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeIterator.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeNode.d.ts +47 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeNode.js +132 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeNode.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/index.d.ts +58 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/index.js +600 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedMap.d.ts +62 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedMap.js +265 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedMap.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedSet.d.ts +54 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedSet.js +245 -0
- package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedSet.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/index.d.ts +21 -0
- package/node_modules/js-sdsl/dist/esm/index.js +20 -0
- package/node_modules/js-sdsl/dist/esm/index.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/utils/checkObject.d.ts +1 -0
- package/node_modules/js-sdsl/dist/esm/utils/checkObject.js +5 -0
- package/node_modules/js-sdsl/dist/esm/utils/checkObject.js.map +1 -0
- package/node_modules/js-sdsl/dist/esm/utils/throwError.d.ts +1 -0
- package/node_modules/js-sdsl/dist/esm/utils/throwError.js +4 -0
- package/node_modules/js-sdsl/dist/esm/utils/throwError.js.map +1 -0
- package/node_modules/js-sdsl/dist/umd/js-sdsl.js +3154 -0
- package/node_modules/js-sdsl/dist/umd/js-sdsl.min.js +8 -0
- package/node_modules/js-sdsl/dist/umd/js-sdsl.min.js.map +1 -0
- package/node_modules/js-sdsl/package.json +166 -0
- package/node_modules/jsonata/LICENSE +19 -0
- package/node_modules/jsonata/README.md +70 -0
- package/node_modules/jsonata/jsonata-es5.js +9867 -0
- package/node_modules/jsonata/jsonata-es5.min.js +1 -0
- package/node_modules/jsonata/jsonata.d.ts +53 -0
- package/node_modules/jsonata/jsonata.js +7541 -0
- package/node_modules/jsonata/jsonata.min.js +1 -0
- package/node_modules/jsonata/package.json +62 -0
- package/node_modules/lru-cache/LICENSE +15 -0
- package/node_modules/lru-cache/README.md +331 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts +1277 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
- package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts +1277 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/index.js +1542 -0
- package/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/lru-cache/package.json +116 -0
- package/node_modules/minimist/.eslintrc +29 -0
- package/node_modules/minimist/.github/FUNDING.yml +12 -0
- package/node_modules/minimist/.nycrc +14 -0
- package/node_modules/minimist/CHANGELOG.md +298 -0
- package/node_modules/minimist/LICENSE +18 -0
- package/node_modules/minimist/README.md +121 -0
- package/node_modules/minimist/example/parse.js +4 -0
- package/node_modules/minimist/index.js +263 -0
- package/node_modules/minimist/package.json +75 -0
- package/node_modules/minimist/test/all_bool.js +34 -0
- package/node_modules/minimist/test/bool.js +177 -0
- package/node_modules/minimist/test/dash.js +43 -0
- package/node_modules/minimist/test/default_bool.js +37 -0
- package/node_modules/minimist/test/dotted.js +24 -0
- package/node_modules/minimist/test/kv_short.js +32 -0
- package/node_modules/minimist/test/long.js +33 -0
- package/node_modules/minimist/test/num.js +38 -0
- package/node_modules/minimist/test/parse.js +209 -0
- package/node_modules/minimist/test/parse_modified.js +11 -0
- package/node_modules/minimist/test/proto.js +64 -0
- package/node_modules/minimist/test/short.js +69 -0
- package/node_modules/minimist/test/stop_early.js +17 -0
- package/node_modules/minimist/test/unknown.js +104 -0
- package/node_modules/minimist/test/whitespace.js +10 -0
- package/node_modules/mqtt/CONTRIBUTING.md +27 -0
- package/node_modules/mqtt/LICENSE.md +15 -0
- package/node_modules/mqtt/README.md +960 -0
- package/node_modules/mqtt/build/bin/mqtt.d.ts +2 -0
- package/node_modules/mqtt/build/bin/mqtt.js +30 -0
- package/node_modules/mqtt/build/bin/mqtt.js.map +1 -0
- package/node_modules/mqtt/build/bin/pub.d.ts +2 -0
- package/node_modules/mqtt/build/bin/pub.js +147 -0
- package/node_modules/mqtt/build/bin/pub.js.map +1 -0
- package/node_modules/mqtt/build/bin/sub.d.ts +2 -0
- package/node_modules/mqtt/build/bin/sub.js +121 -0
- package/node_modules/mqtt/build/bin/sub.js.map +1 -0
- package/node_modules/mqtt/build/index.d.ts +3 -0
- package/node_modules/mqtt/build/index.js +32 -0
- package/node_modules/mqtt/build/index.js.map +1 -0
- package/node_modules/mqtt/build/lib/BufferedDuplex.d.ts +20 -0
- package/node_modules/mqtt/build/lib/BufferedDuplex.js +78 -0
- package/node_modules/mqtt/build/lib/BufferedDuplex.js.map +1 -0
- package/node_modules/mqtt/build/lib/KeepaliveManager.d.ts +21 -0
- package/node_modules/mqtt/build/lib/KeepaliveManager.js +73 -0
- package/node_modules/mqtt/build/lib/KeepaliveManager.js.map +1 -0
- package/node_modules/mqtt/build/lib/TypedEmitter.d.ts +19 -0
- package/node_modules/mqtt/build/lib/TypedEmitter.js +13 -0
- package/node_modules/mqtt/build/lib/TypedEmitter.js.map +1 -0
- package/node_modules/mqtt/build/lib/client.d.ts +235 -0
- package/node_modules/mqtt/build/lib/client.js +1211 -0
- package/node_modules/mqtt/build/lib/client.js.map +1 -0
- package/node_modules/mqtt/build/lib/connect/ali.d.ts +3 -0
- package/node_modules/mqtt/build/lib/connect/ali.js +108 -0
- package/node_modules/mqtt/build/lib/connect/ali.js.map +1 -0
- package/node_modules/mqtt/build/lib/connect/index.d.ts +10 -0
- package/node_modules/mqtt/build/lib/connect/index.js +192 -0
- package/node_modules/mqtt/build/lib/connect/index.js.map +1 -0
- package/node_modules/mqtt/build/lib/connect/tcp.d.ts +3 -0
- package/node_modules/mqtt/build/lib/connect/tcp.js +18 -0
- package/node_modules/mqtt/build/lib/connect/tcp.js.map +1 -0
- package/node_modules/mqtt/build/lib/connect/tls.d.ts +3 -0
- package/node_modules/mqtt/build/lib/connect/tls.js +38 -0
- package/node_modules/mqtt/build/lib/connect/tls.js.map +1 -0
- package/node_modules/mqtt/build/lib/connect/ws.d.ts +4 -0
- package/node_modules/mqtt/build/lib/connect/ws.js +217 -0
- package/node_modules/mqtt/build/lib/connect/ws.js.map +1 -0
- package/node_modules/mqtt/build/lib/connect/wx.d.ts +6 -0
- package/node_modules/mqtt/build/lib/connect/wx.js +115 -0
- package/node_modules/mqtt/build/lib/connect/wx.js.map +1 -0
- package/node_modules/mqtt/build/lib/default-message-id-provider.d.ts +16 -0
- package/node_modules/mqtt/build/lib/default-message-id-provider.js +24 -0
- package/node_modules/mqtt/build/lib/default-message-id-provider.js.map +1 -0
- package/node_modules/mqtt/build/lib/get-timer.d.ts +8 -0
- package/node_modules/mqtt/build/lib/get-timer.js +53 -0
- package/node_modules/mqtt/build/lib/get-timer.js.map +1 -0
- package/node_modules/mqtt/build/lib/handlers/ack.d.ts +48 -0
- package/node_modules/mqtt/build/lib/handlers/ack.js +131 -0
- package/node_modules/mqtt/build/lib/handlers/ack.js.map +1 -0
- package/node_modules/mqtt/build/lib/handlers/auth.d.ts +3 -0
- package/node_modules/mqtt/build/lib/handlers/auth.js +30 -0
- package/node_modules/mqtt/build/lib/handlers/auth.js.map +1 -0
- package/node_modules/mqtt/build/lib/handlers/connack.d.ts +3 -0
- package/node_modules/mqtt/build/lib/handlers/connack.js +47 -0
- package/node_modules/mqtt/build/lib/handlers/connack.js.map +1 -0
- package/node_modules/mqtt/build/lib/handlers/index.d.ts +3 -0
- package/node_modules/mqtt/build/lib/handlers/index.js +68 -0
- package/node_modules/mqtt/build/lib/handlers/index.js.map +1 -0
- package/node_modules/mqtt/build/lib/handlers/publish.d.ts +3 -0
- package/node_modules/mqtt/build/lib/handlers/publish.js +106 -0
- package/node_modules/mqtt/build/lib/handlers/publish.js.map +1 -0
- package/node_modules/mqtt/build/lib/handlers/pubrel.d.ts +3 -0
- package/node_modules/mqtt/build/lib/handlers/pubrel.js +25 -0
- package/node_modules/mqtt/build/lib/handlers/pubrel.js.map +1 -0
- package/node_modules/mqtt/build/lib/is-browser.d.ts +4 -0
- package/node_modules/mqtt/build/lib/is-browser.js +27 -0
- package/node_modules/mqtt/build/lib/is-browser.js.map +1 -0
- package/node_modules/mqtt/build/lib/shared.d.ts +23 -0
- package/node_modules/mqtt/build/lib/shared.js +41 -0
- package/node_modules/mqtt/build/lib/shared.js.map +1 -0
- package/node_modules/mqtt/build/lib/store.d.ts +24 -0
- package/node_modules/mqtt/build/lib/store.js +80 -0
- package/node_modules/mqtt/build/lib/store.js.map +1 -0
- package/node_modules/mqtt/build/lib/topic-alias-recv.d.ts +9 -0
- package/node_modules/mqtt/build/lib/topic-alias-recv.js +24 -0
- package/node_modules/mqtt/build/lib/topic-alias-recv.js.map +1 -0
- package/node_modules/mqtt/build/lib/topic-alias-send.d.ts +13 -0
- package/node_modules/mqtt/build/lib/topic-alias-send.js +53 -0
- package/node_modules/mqtt/build/lib/topic-alias-send.js.map +1 -0
- package/node_modules/mqtt/build/lib/unique-message-id-provider.d.ts +11 -0
- package/node_modules/mqtt/build/lib/unique-message-id-provider.js +26 -0
- package/node_modules/mqtt/build/lib/unique-message-id-provider.js.map +1 -0
- package/node_modules/mqtt/build/lib/validations.d.ts +2 -0
- package/node_modules/mqtt/build/lib/validations.js +32 -0
- package/node_modules/mqtt/build/lib/validations.js.map +1 -0
- package/node_modules/mqtt/build/mqtt.d.ts +12 -0
- package/node_modules/mqtt/build/mqtt.js +51 -0
- package/node_modules/mqtt/build/mqtt.js.map +1 -0
- package/node_modules/mqtt/build/tsconfig.build.tsbuildinfo +1 -0
- package/node_modules/mqtt/dist/mqtt.esm.js +10 -0
- package/node_modules/mqtt/dist/mqtt.js +21678 -0
- package/node_modules/mqtt/dist/mqtt.min.js +10 -0
- package/node_modules/mqtt/help/help.txt +8 -0
- package/node_modules/mqtt/help/publish.txt +26 -0
- package/node_modules/mqtt/help/subscribe.txt +26 -0
- package/node_modules/mqtt/package.json +171 -0
- package/node_modules/mqtt/src/bin/mqtt.ts +39 -0
- package/node_modules/mqtt/src/bin/pub.ts +174 -0
- package/node_modules/mqtt/src/bin/sub.ts +146 -0
- package/node_modules/mqtt/src/index.ts +4 -0
- package/node_modules/mqtt/src/lib/BufferedDuplex.ts +115 -0
- package/node_modules/mqtt/src/lib/KeepaliveManager.ts +112 -0
- package/node_modules/mqtt/src/lib/TypedEmitter.ts +71 -0
- package/node_modules/mqtt/src/lib/client.ts +2371 -0
- package/node_modules/mqtt/src/lib/connect/ali.ts +127 -0
- package/node_modules/mqtt/src/lib/connect/index.ts +288 -0
- package/node_modules/mqtt/src/lib/connect/tcp.ts +22 -0
- package/node_modules/mqtt/src/lib/connect/tls.ts +54 -0
- package/node_modules/mqtt/src/lib/connect/ws.ts +303 -0
- package/node_modules/mqtt/src/lib/connect/wx.ts +142 -0
- package/node_modules/mqtt/src/lib/default-message-id-provider.ts +99 -0
- package/node_modules/mqtt/src/lib/get-timer.ts +40 -0
- package/node_modules/mqtt/src/lib/handlers/ack.ts +159 -0
- package/node_modules/mqtt/src/lib/handlers/auth.ts +44 -0
- package/node_modules/mqtt/src/lib/handlers/connack.ts +55 -0
- package/node_modules/mqtt/src/lib/handlers/index.ts +74 -0
- package/node_modules/mqtt/src/lib/handlers/publish.ts +183 -0
- package/node_modules/mqtt/src/lib/handlers/pubrel.ts +27 -0
- package/node_modules/mqtt/src/lib/is-browser.ts +46 -0
- package/node_modules/mqtt/src/lib/shared.ts +87 -0
- package/node_modules/mqtt/src/lib/store.ts +166 -0
- package/node_modules/mqtt/src/lib/topic-alias-recv.ts +48 -0
- package/node_modules/mqtt/src/lib/topic-alias-send.ts +96 -0
- package/node_modules/mqtt/src/lib/unique-message-id-provider.ts +64 -0
- package/node_modules/mqtt/src/lib/validations.ts +46 -0
- package/node_modules/mqtt/src/mqtt.ts +28 -0
- package/node_modules/mqtt-packet/.github/workflows/ci.yml +27 -0
- package/node_modules/mqtt-packet/CONTRIBUTING.md +27 -0
- package/node_modules/mqtt-packet/LICENSE.md +13 -0
- package/node_modules/mqtt-packet/README.md +491 -0
- package/node_modules/mqtt-packet/benchmarks/generate.js +26 -0
- package/node_modules/mqtt-packet/benchmarks/generateNet.js +50 -0
- package/node_modules/mqtt-packet/benchmarks/parse.js +19 -0
- package/node_modules/mqtt-packet/benchmarks/writeToStream.js +48 -0
- package/node_modules/mqtt-packet/constants.js +291 -0
- package/node_modules/mqtt-packet/generate.js +57 -0
- package/node_modules/mqtt-packet/mqtt.js +3 -0
- package/node_modules/mqtt-packet/numbers.js +59 -0
- package/node_modules/mqtt-packet/package.json +48 -0
- package/node_modules/mqtt-packet/packet.js +13 -0
- package/node_modules/mqtt-packet/parser.js +809 -0
- package/node_modules/mqtt-packet/test.js +3177 -0
- package/node_modules/mqtt-packet/testRandom.js +86 -0
- package/node_modules/mqtt-packet/types/index.d.ts +257 -0
- package/node_modules/mqtt-packet/writeToStream.js +1127 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +37 -0
- package/node_modules/ms/readme.md +60 -0
- package/node_modules/number-allocator/.github/workflows/nodejs.yml +33 -0
- package/node_modules/number-allocator/CHANGELOG.md +47 -0
- package/node_modules/number-allocator/LICENSE +21 -0
- package/node_modules/number-allocator/README.md +203 -0
- package/node_modules/number-allocator/index.js +7 -0
- package/node_modules/number-allocator/karma.conf.js +63 -0
- package/node_modules/number-allocator/lib/number-allocator.js +249 -0
- package/node_modules/number-allocator/package.json +69 -0
- package/node_modules/number-allocator/test/test.js +337 -0
- package/node_modules/number-allocator/test/typescript/test.ts +24 -0
- package/node_modules/number-allocator/test/typescript/tsconfig.json +14 -0
- package/node_modules/number-allocator/types/index.d.ts +1 -0
- package/node_modules/number-allocator/types/lib/number-allocator.d.ts +65 -0
- package/node_modules/process/.eslintrc +21 -0
- package/node_modules/process/LICENSE +22 -0
- package/node_modules/process/README.md +26 -0
- package/node_modules/process/browser.js +184 -0
- package/node_modules/process/index.js +2 -0
- package/node_modules/process/package.json +27 -0
- package/node_modules/process/test.js +199 -0
- package/node_modules/process-nextick-args/index.js +45 -0
- package/node_modules/process-nextick-args/license.md +19 -0
- package/node_modules/process-nextick-args/package.json +25 -0
- package/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +116 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +4 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +4 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +4 -0
- package/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
- package/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
- package/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
- package/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +284 -0
- package/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
- package/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
- package/node_modules/readable-stream/lib/internal/streams/legacy.js +89 -0
- package/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
- package/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
- package/node_modules/readable-stream/lib/internal/streams/readable.js +1288 -0
- package/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
- package/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
- package/node_modules/readable-stream/lib/internal/streams/utils.js +329 -0
- package/node_modules/readable-stream/lib/internal/streams/writable.js +817 -0
- package/node_modules/readable-stream/lib/internal/validators.js +530 -0
- package/node_modules/readable-stream/lib/ours/browser.js +35 -0
- package/node_modules/readable-stream/lib/ours/errors.js +341 -0
- package/node_modules/readable-stream/lib/ours/index.js +65 -0
- package/node_modules/readable-stream/lib/ours/primordials.js +107 -0
- package/node_modules/readable-stream/lib/ours/util.js +200 -0
- package/node_modules/readable-stream/lib/stream/promises.js +43 -0
- package/node_modules/readable-stream/lib/stream.js +141 -0
- package/node_modules/readable-stream/package.json +86 -0
- package/node_modules/regenerator-runtime/LICENSE +21 -0
- package/node_modules/regenerator-runtime/README.md +31 -0
- package/node_modules/regenerator-runtime/package.json +19 -0
- package/node_modules/regenerator-runtime/path.js +11 -0
- package/node_modules/regenerator-runtime/runtime.js +761 -0
- package/node_modules/reinterval/.npmignore +27 -0
- package/node_modules/reinterval/.travis.yml +20 -0
- package/node_modules/reinterval/LICENSE +22 -0
- package/node_modules/reinterval/README.md +60 -0
- package/node_modules/reinterval/index.js +57 -0
- package/node_modules/reinterval/package.json +32 -0
- package/node_modules/reinterval/tests/test.js +52 -0
- package/node_modules/rfdc/.github/workflows/ci.yml +21 -0
- package/node_modules/rfdc/LICENSE +15 -0
- package/node_modules/rfdc/default.js +3 -0
- package/node_modules/rfdc/index.d.ts +13 -0
- package/node_modules/rfdc/index.js +198 -0
- package/node_modules/rfdc/index.test-d.ts +13 -0
- package/node_modules/rfdc/package.json +73 -0
- package/node_modules/rfdc/readme.md +181 -0
- package/node_modules/rfdc/test/index.js +306 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +62 -0
- package/node_modules/safe-buffer/package.json +37 -0
- package/node_modules/split2/LICENSE +13 -0
- package/node_modules/split2/README.md +85 -0
- package/node_modules/split2/bench.js +27 -0
- package/node_modules/split2/index.js +141 -0
- package/node_modules/split2/package.json +39 -0
- package/node_modules/split2/test.js +409 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/string_decoder/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/string_decoder/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/string_decoder/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/string_decoder/package.json +34 -0
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +37 -0
- package/node_modules/tslib/modules/index.js +68 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +47 -0
- package/node_modules/tslib/tslib.d.ts +453 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +379 -0
- package/node_modules/tslib/tslib.es6.mjs +378 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +429 -0
- package/node_modules/typedarray/.travis.yml +4 -0
- package/node_modules/typedarray/LICENSE +35 -0
- package/node_modules/typedarray/example/tarray.js +4 -0
- package/node_modules/typedarray/index.js +630 -0
- package/node_modules/typedarray/package.json +55 -0
- package/node_modules/typedarray/readme.markdown +61 -0
- package/node_modules/typedarray/test/server/undef_globals.js +19 -0
- package/node_modules/typedarray/test/tarray.js +10 -0
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +108 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/node_modules/undici-types/dispatcher.d.ts +255 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/node_modules/undici-types/errors.d.ts +149 -0
- package/node_modules/undici-types/eventsource.d.ts +63 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +15 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +71 -0
- package/node_modules/undici-types/interceptors.d.ts +15 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +71 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +39 -0
- package/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/node_modules/undici-types/readable.d.ts +60 -0
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/webidl.d.ts +222 -0
- package/node_modules/undici-types/websocket.d.ts +152 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/worker-timers/LICENSE +21 -0
- package/node_modules/worker-timers/README.md +79 -0
- package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.d.ts +2 -0
- package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.d.ts.map +1 -0
- package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.js +15 -0
- package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.js.map +1 -0
- package/node_modules/worker-timers/build/es2019/module.d.ts +6 -0
- package/node_modules/worker-timers/build/es2019/module.d.ts.map +1 -0
- package/node_modules/worker-timers/build/es2019/module.js +9 -0
- package/node_modules/worker-timers/build/es2019/module.js.map +1 -0
- package/node_modules/worker-timers/build/es2019/worker/worker.d.ts +2 -0
- package/node_modules/worker-timers/build/es2019/worker/worker.d.ts.map +1 -0
- package/node_modules/worker-timers/build/es2019/worker/worker.js +3 -0
- package/node_modules/worker-timers/build/es2019/worker/worker.js.map +1 -0
- package/node_modules/worker-timers/build/es5/bundle.js +50 -0
- package/node_modules/worker-timers/package.json +106 -0
- package/node_modules/worker-timers/src/factories/load-or-return-broker.ts +19 -0
- package/node_modules/worker-timers/src/module.ts +13 -0
- package/node_modules/worker-timers/src/tsconfig.json +6 -0
- package/node_modules/worker-timers/src/worker/worker.ts +2 -0
- package/node_modules/worker-timers-broker/LICENSE +21 -0
- package/node_modules/worker-timers-broker/README.md +5 -0
- package/node_modules/worker-timers-broker/build/es2019/guards/call-notification.d.ts +3 -0
- package/node_modules/worker-timers-broker/build/es2019/guards/call-notification.d.ts.map +1 -0
- package/node_modules/worker-timers-broker/build/es2019/guards/call-notification.js +4 -0
- package/node_modules/worker-timers-broker/build/es2019/guards/call-notification.js.map +1 -0
- package/node_modules/worker-timers-broker/build/es2019/guards/clear-response.d.ts +3 -0
- package/node_modules/worker-timers-broker/build/es2019/guards/clear-response.d.ts.map +1 -0
- package/node_modules/worker-timers-broker/build/es2019/guards/clear-response.js +4 -0
- package/node_modules/worker-timers-broker/build/es2019/guards/clear-response.js.map +1 -0
- package/node_modules/worker-timers-broker/build/es2019/module.d.ts +7 -0
- package/node_modules/worker-timers-broker/build/es2019/module.d.ts.map +1 -0
- package/node_modules/worker-timers-broker/build/es2019/module.js +142 -0
- package/node_modules/worker-timers-broker/build/es2019/module.js.map +1 -0
- package/node_modules/worker-timers-broker/build/es5/bundle.js +162 -0
- package/node_modules/worker-timers-broker/package.json +84 -0
- package/node_modules/worker-timers-broker/src/guards/call-notification.ts +5 -0
- package/node_modules/worker-timers-broker/src/guards/clear-response.ts +5 -0
- package/node_modules/worker-timers-broker/src/module.ts +173 -0
- package/node_modules/worker-timers-broker/src/tsconfig.json +6 -0
- package/node_modules/worker-timers-worker/LICENSE +21 -0
- package/node_modules/worker-timers-worker/README.md +5 -0
- package/node_modules/worker-timers-worker/build/es2019/helpers/timer.d.ts +5 -0
- package/node_modules/worker-timers-worker/build/es2019/helpers/timer.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/helpers/timer.js +50 -0
- package/node_modules/worker-timers-worker/build/es2019/helpers/timer.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/broker-event.d.ts +5 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/broker-event.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/broker-event.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/broker-event.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/call-notification.d.ts +10 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/call-notification.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/call-notification.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/call-notification.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-request.d.ts +10 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-request.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-request.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-request.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-response.d.ts +5 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-response.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-response.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-response.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/error-notification.d.ts +8 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/error-notification.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/error-notification.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/error-notification.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/error-response.d.ts +8 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/error-response.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/error-response.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/error-response.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/index.d.ts +9 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/index.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/index.js +9 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/index.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/set-notification.d.ts +12 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/set-notification.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/set-notification.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/set-notification.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/worker-event.d.ts +5 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/worker-event.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/worker-event.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/interfaces/worker-event.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/module.d.ts +3 -0
- package/node_modules/worker-timers-worker/build/es2019/module.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/module.js +50 -0
- package/node_modules/worker-timers-worker/build/es2019/module.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/types/broker-message.d.ts +3 -0
- package/node_modules/worker-timers-worker/build/es2019/types/broker-message.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/types/broker-message.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/types/broker-message.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/types/index.d.ts +4 -0
- package/node_modules/worker-timers-worker/build/es2019/types/index.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/types/index.js +4 -0
- package/node_modules/worker-timers-worker/build/es2019/types/index.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/types/timer-type.d.ts +2 -0
- package/node_modules/worker-timers-worker/build/es2019/types/timer-type.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/types/timer-type.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/types/timer-type.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/types/worker-message.d.ts +3 -0
- package/node_modules/worker-timers-worker/build/es2019/types/worker-message.d.ts.map +1 -0
- package/node_modules/worker-timers-worker/build/es2019/types/worker-message.js +2 -0
- package/node_modules/worker-timers-worker/build/es2019/types/worker-message.js.map +1 -0
- package/node_modules/worker-timers-worker/build/es5/bundle.js +117 -0
- package/node_modules/worker-timers-worker/package.json +91 -0
- package/node_modules/worker-timers-worker/src/helpers/timer.ts +68 -0
- package/node_modules/worker-timers-worker/src/interfaces/broker-event.ts +5 -0
- package/node_modules/worker-timers-worker/src/interfaces/call-notification.ts +13 -0
- package/node_modules/worker-timers-worker/src/interfaces/clear-request.ts +13 -0
- package/node_modules/worker-timers-worker/src/interfaces/clear-response.ts +5 -0
- package/node_modules/worker-timers-worker/src/interfaces/error-notification.ts +9 -0
- package/node_modules/worker-timers-worker/src/interfaces/error-response.ts +9 -0
- package/node_modules/worker-timers-worker/src/interfaces/index.ts +8 -0
- package/node_modules/worker-timers-worker/src/interfaces/set-notification.ts +17 -0
- package/node_modules/worker-timers-worker/src/interfaces/worker-event.ts +5 -0
- package/node_modules/worker-timers-worker/src/module.ts +54 -0
- package/node_modules/worker-timers-worker/src/tsconfig.json +6 -0
- package/node_modules/worker-timers-worker/src/types/broker-message.ts +3 -0
- package/node_modules/worker-timers-worker/src/types/index.ts +3 -0
- package/node_modules/worker-timers-worker/src/types/timer-type.ts +1 -0
- package/node_modules/worker-timers-worker/src/types/worker-message.ts +3 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +13 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +18 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +514 -0
- package/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/ws/lib/sender.js +602 -0
- package/node_modules/ws/lib/stream.js +159 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +540 -0
- package/node_modules/ws/lib/websocket.js +1388 -0
- package/node_modules/ws/package.json +69 -0
- package/node_modules/ws/wrapper.mjs +8 -0
- package/package.json +51 -0
|
@@ -0,0 +1,948 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
'use strict'
|
|
3
|
+
|
|
4
|
+
const tape = require('tape')
|
|
5
|
+
const crypto = require('crypto')
|
|
6
|
+
const fs = require('fs')
|
|
7
|
+
const path = require('path')
|
|
8
|
+
const os = require('os')
|
|
9
|
+
const BufferListStream = require('../')
|
|
10
|
+
const { Buffer } = require('buffer')
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This typedef allows us to add _bufs to the API without declaring it publicly on types.
|
|
14
|
+
* @typedef { BufferListStream & { _bufs?: Buffer[] }} BufferListStreamWithPrivate
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Just for typechecking in js
|
|
19
|
+
* @type { NodeJS.Process & { browser?: boolean }}
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const process = globalThis.process
|
|
23
|
+
|
|
24
|
+
/** @type {BufferEncoding[]} */
|
|
25
|
+
const encodings = ['ascii', 'utf8', 'utf-8', 'hex', 'binary', 'base64']
|
|
26
|
+
|
|
27
|
+
if (process.browser) {
|
|
28
|
+
encodings.push(
|
|
29
|
+
'ucs2',
|
|
30
|
+
'ucs-2',
|
|
31
|
+
'utf16le',
|
|
32
|
+
/**
|
|
33
|
+
* This alias is not in typescript typings for BufferEncoding. Still have to fix
|
|
34
|
+
* @see https://nodejs.org/api/buffer.html#buffers-and-character-encodings
|
|
35
|
+
*/
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
'utf-16le'
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
require('./indexOf')
|
|
42
|
+
require('./isBufferList')
|
|
43
|
+
require('./convert')
|
|
44
|
+
|
|
45
|
+
tape('single bytes from single buffer', function (t) {
|
|
46
|
+
const bl = new BufferListStream()
|
|
47
|
+
|
|
48
|
+
bl.append(Buffer.from('abcd'))
|
|
49
|
+
|
|
50
|
+
t.equal(bl.length, 4)
|
|
51
|
+
t.equal(bl.get(-1), undefined)
|
|
52
|
+
t.equal(bl.get(0), 97)
|
|
53
|
+
t.equal(bl.get(1), 98)
|
|
54
|
+
t.equal(bl.get(2), 99)
|
|
55
|
+
t.equal(bl.get(3), 100)
|
|
56
|
+
t.equal(bl.get(4), undefined)
|
|
57
|
+
|
|
58
|
+
t.end()
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
tape('single bytes from multiple buffers', function (t) {
|
|
62
|
+
const bl = new BufferListStream()
|
|
63
|
+
|
|
64
|
+
bl.append(Buffer.from('abcd'))
|
|
65
|
+
bl.append(Buffer.from('efg'))
|
|
66
|
+
bl.append(Buffer.from('hi'))
|
|
67
|
+
bl.append(Buffer.from('j'))
|
|
68
|
+
|
|
69
|
+
t.equal(bl.length, 10)
|
|
70
|
+
|
|
71
|
+
t.equal(bl.get(0), 97)
|
|
72
|
+
t.equal(bl.get(1), 98)
|
|
73
|
+
t.equal(bl.get(2), 99)
|
|
74
|
+
t.equal(bl.get(3), 100)
|
|
75
|
+
t.equal(bl.get(4), 101)
|
|
76
|
+
t.equal(bl.get(5), 102)
|
|
77
|
+
t.equal(bl.get(6), 103)
|
|
78
|
+
t.equal(bl.get(7), 104)
|
|
79
|
+
t.equal(bl.get(8), 105)
|
|
80
|
+
t.equal(bl.get(9), 106)
|
|
81
|
+
|
|
82
|
+
t.end()
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
tape('multi bytes from single buffer', function (t) {
|
|
86
|
+
const bl = new BufferListStream()
|
|
87
|
+
|
|
88
|
+
bl.append(Buffer.from('abcd'))
|
|
89
|
+
|
|
90
|
+
t.equal(bl.length, 4)
|
|
91
|
+
|
|
92
|
+
t.equal(bl.slice(0, 4).toString('ascii'), 'abcd')
|
|
93
|
+
t.equal(bl.slice(0, 3).toString('ascii'), 'abc')
|
|
94
|
+
t.equal(bl.slice(1, 4).toString('ascii'), 'bcd')
|
|
95
|
+
t.equal(bl.slice(-4, -1).toString('ascii'), 'abc')
|
|
96
|
+
|
|
97
|
+
t.end()
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
tape('multi bytes from single buffer (negative indexes)', function (t) {
|
|
101
|
+
const bl = new BufferListStream()
|
|
102
|
+
|
|
103
|
+
bl.append(Buffer.from('buffer'))
|
|
104
|
+
|
|
105
|
+
t.equal(bl.length, 6)
|
|
106
|
+
|
|
107
|
+
t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe')
|
|
108
|
+
t.equal(bl.slice(-6, -2).toString('ascii'), 'buff')
|
|
109
|
+
t.equal(bl.slice(-5, -2).toString('ascii'), 'uff')
|
|
110
|
+
|
|
111
|
+
t.end()
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
tape('multiple bytes from multiple buffers', function (t) {
|
|
115
|
+
const bl = new BufferListStream()
|
|
116
|
+
|
|
117
|
+
bl.append(Buffer.from('abcd'))
|
|
118
|
+
bl.append(Buffer.from('efg'))
|
|
119
|
+
bl.append(Buffer.from('hi'))
|
|
120
|
+
bl.append(Buffer.from('j'))
|
|
121
|
+
|
|
122
|
+
t.equal(bl.length, 10)
|
|
123
|
+
|
|
124
|
+
t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
|
|
125
|
+
t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
|
|
126
|
+
t.equal(bl.slice(3, 6).toString('ascii'), 'def')
|
|
127
|
+
t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
|
|
128
|
+
t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
|
|
129
|
+
t.equal(bl.slice(-7, -4).toString('ascii'), 'def')
|
|
130
|
+
|
|
131
|
+
t.end()
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
tape('multiple bytes from multiple buffer lists', function (t) {
|
|
135
|
+
const bl = new BufferListStream()
|
|
136
|
+
|
|
137
|
+
bl.append(new BufferListStream([Buffer.from('abcd'), Buffer.from('efg')]))
|
|
138
|
+
bl.append(new BufferListStream([Buffer.from('hi'), Buffer.from('j')]))
|
|
139
|
+
|
|
140
|
+
t.equal(bl.length, 10)
|
|
141
|
+
|
|
142
|
+
t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
|
|
143
|
+
|
|
144
|
+
t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
|
|
145
|
+
t.equal(bl.slice(3, 6).toString('ascii'), 'def')
|
|
146
|
+
t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
|
|
147
|
+
t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
|
|
148
|
+
|
|
149
|
+
t.end()
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
// same data as previous test, just using nested constructors
|
|
153
|
+
tape('multiple bytes from crazy nested buffer lists', function (t) {
|
|
154
|
+
const bl = new BufferListStream()
|
|
155
|
+
|
|
156
|
+
bl.append(
|
|
157
|
+
new BufferListStream([
|
|
158
|
+
new BufferListStream([
|
|
159
|
+
new BufferListStream(Buffer.from('abc')),
|
|
160
|
+
Buffer.from('d'),
|
|
161
|
+
new BufferListStream(Buffer.from('efg'))
|
|
162
|
+
]),
|
|
163
|
+
new BufferListStream([Buffer.from('hi')]),
|
|
164
|
+
new BufferListStream(Buffer.from('j'))
|
|
165
|
+
])
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
t.equal(bl.length, 10)
|
|
169
|
+
|
|
170
|
+
t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
|
|
171
|
+
|
|
172
|
+
t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
|
|
173
|
+
t.equal(bl.slice(3, 6).toString('ascii'), 'def')
|
|
174
|
+
t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
|
|
175
|
+
t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
|
|
176
|
+
|
|
177
|
+
t.end()
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
tape('append accepts arrays of Buffers', function (t) {
|
|
181
|
+
const bl = new BufferListStream()
|
|
182
|
+
|
|
183
|
+
bl.append(Buffer.from('abc'))
|
|
184
|
+
bl.append([Buffer.from('def')])
|
|
185
|
+
bl.append([Buffer.from('ghi'), Buffer.from('jkl')])
|
|
186
|
+
bl.append([Buffer.from('mnop'), Buffer.from('qrstu'), Buffer.from('vwxyz')])
|
|
187
|
+
t.equal(bl.length, 26)
|
|
188
|
+
t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
|
|
189
|
+
|
|
190
|
+
t.end()
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
tape('append accepts arrays of Uint8Arrays', function (t) {
|
|
194
|
+
const bl = new BufferListStream()
|
|
195
|
+
|
|
196
|
+
bl.append(new Uint8Array([97, 98, 99]))
|
|
197
|
+
bl.append([Uint8Array.from([100, 101, 102])])
|
|
198
|
+
bl.append([new Uint8Array([103, 104, 105]), new Uint8Array([106, 107, 108])])
|
|
199
|
+
bl.append([new Uint8Array([109, 110, 111, 112]), new Uint8Array([113, 114, 115, 116, 117]), new Uint8Array([118, 119, 120, 121, 122])])
|
|
200
|
+
t.equal(bl.length, 26)
|
|
201
|
+
t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
|
|
202
|
+
|
|
203
|
+
t.end()
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
tape('append accepts arrays of BufferLists', function (t) {
|
|
207
|
+
const bl = new BufferListStream()
|
|
208
|
+
|
|
209
|
+
bl.append(Buffer.from('abc'))
|
|
210
|
+
bl.append([new BufferListStream('def')])
|
|
211
|
+
bl.append(
|
|
212
|
+
new BufferListStream([Buffer.from('ghi'), new BufferListStream('jkl')])
|
|
213
|
+
)
|
|
214
|
+
bl.append([
|
|
215
|
+
Buffer.from('mnop'),
|
|
216
|
+
new BufferListStream([Buffer.from('qrstu'), Buffer.from('vwxyz')])
|
|
217
|
+
])
|
|
218
|
+
t.equal(bl.length, 26)
|
|
219
|
+
t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
|
|
220
|
+
|
|
221
|
+
t.end()
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
tape('append chainable', function (t) {
|
|
225
|
+
const bl = new BufferListStream()
|
|
226
|
+
|
|
227
|
+
t.ok(bl.append(Buffer.from('abcd')) === bl)
|
|
228
|
+
t.ok(bl.append([Buffer.from('abcd')]) === bl)
|
|
229
|
+
t.ok(bl.append(new BufferListStream(Buffer.from('abcd'))) === bl)
|
|
230
|
+
t.ok(bl.append([new BufferListStream(Buffer.from('abcd'))]) === bl)
|
|
231
|
+
|
|
232
|
+
t.end()
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
tape('append chainable (test results)', function (t) {
|
|
236
|
+
const bl = new BufferListStream('abc')
|
|
237
|
+
.append([new BufferListStream('def')])
|
|
238
|
+
.append(
|
|
239
|
+
new BufferListStream([Buffer.from('ghi'), new BufferListStream('jkl')])
|
|
240
|
+
)
|
|
241
|
+
.append([
|
|
242
|
+
Buffer.from('mnop'),
|
|
243
|
+
new BufferListStream([Buffer.from('qrstu'), Buffer.from('vwxyz')])
|
|
244
|
+
])
|
|
245
|
+
|
|
246
|
+
t.equal(bl.length, 26)
|
|
247
|
+
t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
|
|
248
|
+
|
|
249
|
+
t.end()
|
|
250
|
+
})
|
|
251
|
+
|
|
252
|
+
tape('consuming from multiple buffers', function (t) {
|
|
253
|
+
const bl = new BufferListStream()
|
|
254
|
+
|
|
255
|
+
bl.append(Buffer.from('abcd'))
|
|
256
|
+
bl.append(Buffer.from('efg'))
|
|
257
|
+
bl.append(Buffer.from('hi'))
|
|
258
|
+
bl.append(Buffer.from('j'))
|
|
259
|
+
|
|
260
|
+
t.equal(bl.length, 10)
|
|
261
|
+
|
|
262
|
+
t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
|
|
263
|
+
|
|
264
|
+
bl.consume(3)
|
|
265
|
+
t.equal(bl.length, 7)
|
|
266
|
+
t.equal(bl.slice(0, 7).toString('ascii'), 'defghij')
|
|
267
|
+
|
|
268
|
+
bl.consume(2)
|
|
269
|
+
t.equal(bl.length, 5)
|
|
270
|
+
t.equal(bl.slice(0, 5).toString('ascii'), 'fghij')
|
|
271
|
+
|
|
272
|
+
bl.consume(1)
|
|
273
|
+
t.equal(bl.length, 4)
|
|
274
|
+
t.equal(bl.slice(0, 4).toString('ascii'), 'ghij')
|
|
275
|
+
|
|
276
|
+
bl.consume(1)
|
|
277
|
+
t.equal(bl.length, 3)
|
|
278
|
+
t.equal(bl.slice(0, 3).toString('ascii'), 'hij')
|
|
279
|
+
|
|
280
|
+
bl.consume(2)
|
|
281
|
+
t.equal(bl.length, 1)
|
|
282
|
+
t.equal(bl.slice(0, 1).toString('ascii'), 'j')
|
|
283
|
+
|
|
284
|
+
t.end()
|
|
285
|
+
})
|
|
286
|
+
|
|
287
|
+
tape('complete consumption', function (t) {
|
|
288
|
+
/** @type {BufferListStreamWithPrivate} */
|
|
289
|
+
const bl = new BufferListStream()
|
|
290
|
+
|
|
291
|
+
bl.append(Buffer.from('a'))
|
|
292
|
+
bl.append(Buffer.from('b'))
|
|
293
|
+
|
|
294
|
+
bl.consume(2)
|
|
295
|
+
|
|
296
|
+
t.equal(bl.length, 0)
|
|
297
|
+
t.equal(bl._bufs.length, 0)
|
|
298
|
+
|
|
299
|
+
t.end()
|
|
300
|
+
})
|
|
301
|
+
|
|
302
|
+
tape('test readUInt8 / readInt8', function (t) {
|
|
303
|
+
const buf1 = Buffer.alloc(1)
|
|
304
|
+
const buf2 = Buffer.alloc(3)
|
|
305
|
+
const buf3 = Buffer.alloc(3)
|
|
306
|
+
const bl = new BufferListStream()
|
|
307
|
+
|
|
308
|
+
buf1[0] = 0x1
|
|
309
|
+
buf2[1] = 0x3
|
|
310
|
+
buf2[2] = 0x4
|
|
311
|
+
buf3[0] = 0x23
|
|
312
|
+
buf3[1] = 0x42
|
|
313
|
+
|
|
314
|
+
bl.append(buf1)
|
|
315
|
+
bl.append(buf2)
|
|
316
|
+
bl.append(buf3)
|
|
317
|
+
|
|
318
|
+
t.equal(bl.readUInt8(), 0x1)
|
|
319
|
+
t.equal(bl.readUInt8(2), 0x3)
|
|
320
|
+
t.equal(bl.readInt8(2), 0x3)
|
|
321
|
+
t.equal(bl.readUInt8(3), 0x4)
|
|
322
|
+
t.equal(bl.readInt8(3), 0x4)
|
|
323
|
+
t.equal(bl.readUInt8(4), 0x23)
|
|
324
|
+
t.equal(bl.readInt8(4), 0x23)
|
|
325
|
+
t.equal(bl.readUInt8(5), 0x42)
|
|
326
|
+
t.equal(bl.readInt8(5), 0x42)
|
|
327
|
+
|
|
328
|
+
t.end()
|
|
329
|
+
})
|
|
330
|
+
|
|
331
|
+
tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) {
|
|
332
|
+
const buf1 = Buffer.alloc(1)
|
|
333
|
+
const buf2 = Buffer.alloc(3)
|
|
334
|
+
const buf3 = Buffer.alloc(3)
|
|
335
|
+
const bl = new BufferListStream()
|
|
336
|
+
|
|
337
|
+
buf1[0] = 0x1
|
|
338
|
+
buf2[1] = 0x3
|
|
339
|
+
buf2[2] = 0x4
|
|
340
|
+
buf3[0] = 0x23
|
|
341
|
+
buf3[1] = 0x42
|
|
342
|
+
|
|
343
|
+
bl.append(buf1)
|
|
344
|
+
bl.append(buf2)
|
|
345
|
+
bl.append(buf3)
|
|
346
|
+
|
|
347
|
+
t.equal(bl.readUInt16BE(), 0x0100)
|
|
348
|
+
t.equal(bl.readUInt16LE(), 0x0001)
|
|
349
|
+
t.equal(bl.readUInt16BE(2), 0x0304)
|
|
350
|
+
t.equal(bl.readUInt16LE(2), 0x0403)
|
|
351
|
+
t.equal(bl.readInt16BE(2), 0x0304)
|
|
352
|
+
t.equal(bl.readInt16LE(2), 0x0403)
|
|
353
|
+
t.equal(bl.readUInt16BE(3), 0x0423)
|
|
354
|
+
t.equal(bl.readUInt16LE(3), 0x2304)
|
|
355
|
+
t.equal(bl.readInt16BE(3), 0x0423)
|
|
356
|
+
t.equal(bl.readInt16LE(3), 0x2304)
|
|
357
|
+
t.equal(bl.readUInt16BE(4), 0x2342)
|
|
358
|
+
t.equal(bl.readUInt16LE(4), 0x4223)
|
|
359
|
+
t.equal(bl.readInt16BE(4), 0x2342)
|
|
360
|
+
t.equal(bl.readInt16LE(4), 0x4223)
|
|
361
|
+
|
|
362
|
+
t.end()
|
|
363
|
+
})
|
|
364
|
+
|
|
365
|
+
tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) {
|
|
366
|
+
const buf1 = Buffer.alloc(1)
|
|
367
|
+
const buf2 = Buffer.alloc(3)
|
|
368
|
+
const buf3 = Buffer.alloc(3)
|
|
369
|
+
const bl = new BufferListStream()
|
|
370
|
+
|
|
371
|
+
buf1[0] = 0x1
|
|
372
|
+
buf2[1] = 0x3
|
|
373
|
+
buf2[2] = 0x4
|
|
374
|
+
buf3[0] = 0x23
|
|
375
|
+
buf3[1] = 0x42
|
|
376
|
+
|
|
377
|
+
bl.append(buf1)
|
|
378
|
+
bl.append(buf2)
|
|
379
|
+
bl.append(buf3)
|
|
380
|
+
|
|
381
|
+
t.equal(bl.readUInt32BE(), 0x01000304)
|
|
382
|
+
t.equal(bl.readUInt32LE(), 0x04030001)
|
|
383
|
+
t.equal(bl.readUInt32BE(2), 0x03042342)
|
|
384
|
+
t.equal(bl.readUInt32LE(2), 0x42230403)
|
|
385
|
+
t.equal(bl.readInt32BE(2), 0x03042342)
|
|
386
|
+
t.equal(bl.readInt32LE(2), 0x42230403)
|
|
387
|
+
|
|
388
|
+
t.end()
|
|
389
|
+
})
|
|
390
|
+
|
|
391
|
+
tape('test readBigUInt64LE / readBigUInt64BE / readBigInt64LE / readBigInt64BE', function (t) {
|
|
392
|
+
const buf1 = Buffer.alloc(1)
|
|
393
|
+
const buf2 = Buffer.alloc(3)
|
|
394
|
+
const buf3 = Buffer.alloc(2)
|
|
395
|
+
const buf4 = Buffer.alloc(5)
|
|
396
|
+
const bl = new BufferListStream()
|
|
397
|
+
|
|
398
|
+
buf1[0] = 0x05
|
|
399
|
+
buf2[0] = 0x07
|
|
400
|
+
|
|
401
|
+
buf2[1] = 0x03
|
|
402
|
+
buf2[2] = 0x04
|
|
403
|
+
buf3[0] = 0x23
|
|
404
|
+
buf3[1] = 0x42
|
|
405
|
+
buf4[0] = 0x00
|
|
406
|
+
buf4[1] = 0x01
|
|
407
|
+
buf4[2] = 0x02
|
|
408
|
+
buf4[3] = 0x03
|
|
409
|
+
|
|
410
|
+
buf4[4] = 0x04
|
|
411
|
+
|
|
412
|
+
bl.append(buf1)
|
|
413
|
+
bl.append(buf2)
|
|
414
|
+
bl.append(buf3)
|
|
415
|
+
bl.append(buf4)
|
|
416
|
+
|
|
417
|
+
t.equal(bl.readBigUInt64BE(2), 0x0304234200010203n)
|
|
418
|
+
t.equal(bl.readBigUInt64LE(2), 0x0302010042230403n)
|
|
419
|
+
t.equal(bl.readBigInt64BE(2), 0x0304234200010203n)
|
|
420
|
+
t.equal(bl.readBigInt64LE(2), 0x0302010042230403n)
|
|
421
|
+
|
|
422
|
+
t.end()
|
|
423
|
+
})
|
|
424
|
+
|
|
425
|
+
tape('test readUIntLE / readUIntBE / readIntLE / readIntBE', function (t) {
|
|
426
|
+
const buf1 = Buffer.alloc(1)
|
|
427
|
+
const buf2 = Buffer.alloc(3)
|
|
428
|
+
const buf3 = Buffer.alloc(3)
|
|
429
|
+
const bl = new BufferListStream()
|
|
430
|
+
|
|
431
|
+
buf2[0] = 0x2
|
|
432
|
+
buf2[1] = 0x3
|
|
433
|
+
buf2[2] = 0x4
|
|
434
|
+
buf3[0] = 0x23
|
|
435
|
+
buf3[1] = 0x42
|
|
436
|
+
buf3[2] = 0x61
|
|
437
|
+
|
|
438
|
+
bl.append(buf1)
|
|
439
|
+
bl.append(buf2)
|
|
440
|
+
bl.append(buf3)
|
|
441
|
+
|
|
442
|
+
t.equal(bl.readUIntBE(1, 1), 0x02)
|
|
443
|
+
t.equal(bl.readUIntBE(1, 2), 0x0203)
|
|
444
|
+
t.equal(bl.readUIntBE(1, 3), 0x020304)
|
|
445
|
+
t.equal(bl.readUIntBE(1, 4), 0x02030423)
|
|
446
|
+
t.equal(bl.readUIntBE(1, 5), 0x0203042342)
|
|
447
|
+
t.equal(bl.readUIntBE(1, 6), 0x020304234261)
|
|
448
|
+
t.equal(bl.readUIntLE(1, 1), 0x02)
|
|
449
|
+
t.equal(bl.readUIntLE(1, 2), 0x0302)
|
|
450
|
+
t.equal(bl.readUIntLE(1, 3), 0x040302)
|
|
451
|
+
t.equal(bl.readUIntLE(1, 4), 0x23040302)
|
|
452
|
+
t.equal(bl.readUIntLE(1, 5), 0x4223040302)
|
|
453
|
+
t.equal(bl.readUIntLE(1, 6), 0x614223040302)
|
|
454
|
+
t.equal(bl.readIntBE(1, 1), 0x02)
|
|
455
|
+
t.equal(bl.readIntBE(1, 2), 0x0203)
|
|
456
|
+
t.equal(bl.readIntBE(1, 3), 0x020304)
|
|
457
|
+
t.equal(bl.readIntBE(1, 4), 0x02030423)
|
|
458
|
+
t.equal(bl.readIntBE(1, 5), 0x0203042342)
|
|
459
|
+
t.equal(bl.readIntBE(1, 6), 0x020304234261)
|
|
460
|
+
t.equal(bl.readIntLE(1, 1), 0x02)
|
|
461
|
+
t.equal(bl.readIntLE(1, 2), 0x0302)
|
|
462
|
+
t.equal(bl.readIntLE(1, 3), 0x040302)
|
|
463
|
+
t.equal(bl.readIntLE(1, 4), 0x23040302)
|
|
464
|
+
t.equal(bl.readIntLE(1, 5), 0x4223040302)
|
|
465
|
+
t.equal(bl.readIntLE(1, 6), 0x614223040302)
|
|
466
|
+
|
|
467
|
+
t.end()
|
|
468
|
+
})
|
|
469
|
+
|
|
470
|
+
tape('test readFloatLE / readFloatBE', function (t) {
|
|
471
|
+
const buf1 = Buffer.alloc(1)
|
|
472
|
+
const buf2 = Buffer.alloc(3)
|
|
473
|
+
const buf3 = Buffer.alloc(3)
|
|
474
|
+
const bl = new BufferListStream()
|
|
475
|
+
|
|
476
|
+
buf1[0] = 0x01
|
|
477
|
+
buf2[1] = 0x00
|
|
478
|
+
buf2[2] = 0x00
|
|
479
|
+
buf3[0] = 0x80
|
|
480
|
+
buf3[1] = 0x3f
|
|
481
|
+
|
|
482
|
+
bl.append(buf1)
|
|
483
|
+
bl.append(buf2)
|
|
484
|
+
bl.append(buf3)
|
|
485
|
+
|
|
486
|
+
const canonical = Buffer.concat([buf1, buf2, buf3])
|
|
487
|
+
t.equal(bl.readFloatLE(), canonical.readFloatLE())
|
|
488
|
+
t.equal(bl.readFloatBE(), canonical.readFloatBE())
|
|
489
|
+
t.equal(bl.readFloatLE(2), canonical.readFloatLE(2))
|
|
490
|
+
t.equal(bl.readFloatBE(2), canonical.readFloatBE(2))
|
|
491
|
+
|
|
492
|
+
t.end()
|
|
493
|
+
})
|
|
494
|
+
|
|
495
|
+
tape('test readDoubleLE / readDoubleBE', function (t) {
|
|
496
|
+
const buf1 = Buffer.alloc(1)
|
|
497
|
+
const buf2 = Buffer.alloc(3)
|
|
498
|
+
const buf3 = Buffer.alloc(10)
|
|
499
|
+
const bl = new BufferListStream()
|
|
500
|
+
|
|
501
|
+
buf1[0] = 0x01
|
|
502
|
+
buf2[1] = 0x55
|
|
503
|
+
buf2[2] = 0x55
|
|
504
|
+
buf3[0] = 0x55
|
|
505
|
+
buf3[1] = 0x55
|
|
506
|
+
buf3[2] = 0x55
|
|
507
|
+
buf3[3] = 0x55
|
|
508
|
+
buf3[4] = 0xd5
|
|
509
|
+
buf3[5] = 0x3f
|
|
510
|
+
|
|
511
|
+
bl.append(buf1)
|
|
512
|
+
bl.append(buf2)
|
|
513
|
+
bl.append(buf3)
|
|
514
|
+
|
|
515
|
+
const canonical = Buffer.concat([buf1, buf2, buf3])
|
|
516
|
+
t.equal(bl.readDoubleBE(), canonical.readDoubleBE())
|
|
517
|
+
t.equal(bl.readDoubleLE(), canonical.readDoubleLE())
|
|
518
|
+
t.equal(bl.readDoubleBE(2), canonical.readDoubleBE(2))
|
|
519
|
+
t.equal(bl.readDoubleLE(2), canonical.readDoubleLE(2))
|
|
520
|
+
|
|
521
|
+
t.end()
|
|
522
|
+
})
|
|
523
|
+
|
|
524
|
+
tape('test toString', function (t) {
|
|
525
|
+
const bl = new BufferListStream()
|
|
526
|
+
|
|
527
|
+
bl.append(Buffer.from('abcd'))
|
|
528
|
+
bl.append(Buffer.from('efg'))
|
|
529
|
+
bl.append(Buffer.from('hi'))
|
|
530
|
+
bl.append(Buffer.from('j'))
|
|
531
|
+
|
|
532
|
+
t.equal(bl.toString('ascii', 0, 10), 'abcdefghij')
|
|
533
|
+
t.equal(bl.toString('ascii', 3, 10), 'defghij')
|
|
534
|
+
t.equal(bl.toString('ascii', 3, 6), 'def')
|
|
535
|
+
t.equal(bl.toString('ascii', 3, 8), 'defgh')
|
|
536
|
+
t.equal(bl.toString('ascii', 5, 10), 'fghij')
|
|
537
|
+
|
|
538
|
+
t.end()
|
|
539
|
+
})
|
|
540
|
+
|
|
541
|
+
tape('test toString encoding', function (t) {
|
|
542
|
+
const bl = new BufferListStream()
|
|
543
|
+
const b = Buffer.from('abcdefghij\xff\x00')
|
|
544
|
+
|
|
545
|
+
bl.append(Buffer.from('abcd'))
|
|
546
|
+
bl.append(Buffer.from('efg'))
|
|
547
|
+
bl.append(Buffer.from('hi'))
|
|
548
|
+
bl.append(Buffer.from('j'))
|
|
549
|
+
bl.append(Buffer.from('\xff\x00'))
|
|
550
|
+
|
|
551
|
+
encodings.forEach(function (enc) {
|
|
552
|
+
t.equal(bl.toString(enc), b.toString(enc), enc)
|
|
553
|
+
})
|
|
554
|
+
|
|
555
|
+
t.end()
|
|
556
|
+
})
|
|
557
|
+
|
|
558
|
+
tape('uninitialized memory', function (t) {
|
|
559
|
+
const secret = crypto.randomBytes(256)
|
|
560
|
+
for (let i = 0; i < 1e6; i++) {
|
|
561
|
+
const clone = Buffer.from(secret)
|
|
562
|
+
const bl = new BufferListStream()
|
|
563
|
+
bl.append(Buffer.from('a'))
|
|
564
|
+
bl.consume(-1024)
|
|
565
|
+
const buf = bl.slice(1)
|
|
566
|
+
if (buf.indexOf(clone) !== -1) {
|
|
567
|
+
t.fail(`Match (at ${i})`)
|
|
568
|
+
break
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
t.end()
|
|
572
|
+
})
|
|
573
|
+
|
|
574
|
+
!process.browser && tape('test stream', function (t) {
|
|
575
|
+
const random = crypto.randomBytes(65534)
|
|
576
|
+
|
|
577
|
+
const bl = new BufferListStream((err, buf) => {
|
|
578
|
+
t.ok(Buffer.isBuffer(buf))
|
|
579
|
+
t.ok(err === null)
|
|
580
|
+
t.ok(random.equals(bl.slice()))
|
|
581
|
+
t.ok(random.equals(buf.slice()))
|
|
582
|
+
|
|
583
|
+
bl.pipe(fs.createWriteStream(path.join(os.tmpdir(), 'bl_test_rnd_out.dat')))
|
|
584
|
+
.on('close', function () {
|
|
585
|
+
const rndhash = crypto.createHash('md5').update(random).digest('hex')
|
|
586
|
+
const md5sum = crypto.createHash('md5')
|
|
587
|
+
const s = fs.createReadStream(path.join(os.tmpdir(), 'bl_test_rnd_out.dat'))
|
|
588
|
+
|
|
589
|
+
s.on('data', md5sum.update.bind(md5sum))
|
|
590
|
+
s.on('end', function () {
|
|
591
|
+
t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!')
|
|
592
|
+
t.end()
|
|
593
|
+
})
|
|
594
|
+
})
|
|
595
|
+
})
|
|
596
|
+
|
|
597
|
+
fs.writeFileSync(path.join(os.tmpdir(), 'bl_test_rnd.dat'), random)
|
|
598
|
+
fs.createReadStream(path.join(os.tmpdir(), 'bl_test_rnd.dat')).pipe(bl)
|
|
599
|
+
})
|
|
600
|
+
|
|
601
|
+
tape('instantiation with Buffer', function (t) {
|
|
602
|
+
const buf = crypto.randomBytes(1024)
|
|
603
|
+
const buf2 = crypto.randomBytes(1024)
|
|
604
|
+
let b = BufferListStream(buf)
|
|
605
|
+
|
|
606
|
+
t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer')
|
|
607
|
+
b = BufferListStream([buf, buf2])
|
|
608
|
+
t.equal(b.slice().toString('hex'), Buffer.concat([buf, buf2]).toString('hex'), 'same buffer')
|
|
609
|
+
|
|
610
|
+
t.end()
|
|
611
|
+
})
|
|
612
|
+
|
|
613
|
+
tape('test String appendage', function (t) {
|
|
614
|
+
const bl = new BufferListStream()
|
|
615
|
+
const b = Buffer.from('abcdefghij\xff\x00')
|
|
616
|
+
|
|
617
|
+
bl.append('abcd')
|
|
618
|
+
bl.append('efg')
|
|
619
|
+
bl.append('hi')
|
|
620
|
+
bl.append('j')
|
|
621
|
+
bl.append('\xff\x00')
|
|
622
|
+
|
|
623
|
+
encodings.forEach(function (enc) {
|
|
624
|
+
t.equal(bl.toString(enc), b.toString(enc))
|
|
625
|
+
})
|
|
626
|
+
|
|
627
|
+
t.end()
|
|
628
|
+
})
|
|
629
|
+
|
|
630
|
+
tape('test Number appendage', function (t) {
|
|
631
|
+
const bl = new BufferListStream()
|
|
632
|
+
const b = Buffer.from('1234567890')
|
|
633
|
+
|
|
634
|
+
bl.append(1234)
|
|
635
|
+
bl.append(567)
|
|
636
|
+
bl.append(89)
|
|
637
|
+
bl.append(0)
|
|
638
|
+
|
|
639
|
+
encodings.forEach(function (enc) {
|
|
640
|
+
t.equal(bl.toString(enc), b.toString(enc))
|
|
641
|
+
})
|
|
642
|
+
|
|
643
|
+
t.end()
|
|
644
|
+
})
|
|
645
|
+
|
|
646
|
+
tape('write nothing, should get empty buffer', function (t) {
|
|
647
|
+
t.plan(3)
|
|
648
|
+
BufferListStream(function (err, data) {
|
|
649
|
+
t.notOk(err, 'no error')
|
|
650
|
+
t.ok(Buffer.isBuffer(data), 'got a buffer')
|
|
651
|
+
t.equal(0, data.length, 'got a zero-length buffer')
|
|
652
|
+
t.end()
|
|
653
|
+
}).end()
|
|
654
|
+
})
|
|
655
|
+
|
|
656
|
+
tape('unicode string', function (t) {
|
|
657
|
+
t.plan(2)
|
|
658
|
+
|
|
659
|
+
const inp1 = '\u2600'
|
|
660
|
+
const inp2 = '\u2603'
|
|
661
|
+
const exp = inp1 + ' and ' + inp2
|
|
662
|
+
const bl = BufferListStream()
|
|
663
|
+
|
|
664
|
+
bl.write(inp1)
|
|
665
|
+
bl.write(' and ')
|
|
666
|
+
bl.write(inp2)
|
|
667
|
+
t.equal(exp, bl.toString())
|
|
668
|
+
t.equal(Buffer.from(exp).toString('hex'), bl.toString('hex'))
|
|
669
|
+
})
|
|
670
|
+
|
|
671
|
+
tape('should emit finish', function (t) {
|
|
672
|
+
const source = BufferListStream()
|
|
673
|
+
const dest = BufferListStream()
|
|
674
|
+
|
|
675
|
+
source.write('hello')
|
|
676
|
+
source.pipe(dest)
|
|
677
|
+
|
|
678
|
+
dest.on('finish', function () {
|
|
679
|
+
t.equal(dest.toString('utf8'), 'hello')
|
|
680
|
+
t.end()
|
|
681
|
+
})
|
|
682
|
+
})
|
|
683
|
+
|
|
684
|
+
tape('basic copy', function (t) {
|
|
685
|
+
const buf = crypto.randomBytes(1024)
|
|
686
|
+
const buf2 = Buffer.alloc(1024)
|
|
687
|
+
const b = BufferListStream(buf)
|
|
688
|
+
|
|
689
|
+
b.copy(buf2)
|
|
690
|
+
t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
|
|
691
|
+
|
|
692
|
+
t.end()
|
|
693
|
+
})
|
|
694
|
+
|
|
695
|
+
tape('copy after many appends', function (t) {
|
|
696
|
+
const buf = crypto.randomBytes(512)
|
|
697
|
+
const buf2 = Buffer.alloc(1024)
|
|
698
|
+
const b = BufferListStream(buf)
|
|
699
|
+
|
|
700
|
+
b.append(buf)
|
|
701
|
+
b.copy(buf2)
|
|
702
|
+
t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
|
|
703
|
+
|
|
704
|
+
t.end()
|
|
705
|
+
})
|
|
706
|
+
|
|
707
|
+
tape('copy at a precise position', function (t) {
|
|
708
|
+
const buf = crypto.randomBytes(1004)
|
|
709
|
+
const buf2 = Buffer.alloc(1024)
|
|
710
|
+
const b = BufferListStream(buf)
|
|
711
|
+
|
|
712
|
+
b.copy(buf2, 20)
|
|
713
|
+
t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer')
|
|
714
|
+
|
|
715
|
+
t.end()
|
|
716
|
+
})
|
|
717
|
+
|
|
718
|
+
tape('copy starting from a precise location', function (t) {
|
|
719
|
+
const buf = crypto.randomBytes(10)
|
|
720
|
+
const buf2 = Buffer.alloc(5)
|
|
721
|
+
const b = BufferListStream(buf)
|
|
722
|
+
|
|
723
|
+
b.copy(buf2, 0, 5)
|
|
724
|
+
t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer')
|
|
725
|
+
|
|
726
|
+
t.end()
|
|
727
|
+
})
|
|
728
|
+
|
|
729
|
+
tape('copy in an interval', function (t) {
|
|
730
|
+
const rnd = crypto.randomBytes(10)
|
|
731
|
+
const b = BufferListStream(rnd) // put the random bytes there
|
|
732
|
+
const actual = Buffer.alloc(3)
|
|
733
|
+
const expected = Buffer.alloc(3)
|
|
734
|
+
|
|
735
|
+
rnd.copy(expected, 0, 5, 8)
|
|
736
|
+
b.copy(actual, 0, 5, 8)
|
|
737
|
+
|
|
738
|
+
t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer')
|
|
739
|
+
|
|
740
|
+
t.end()
|
|
741
|
+
})
|
|
742
|
+
|
|
743
|
+
tape('copy an interval between two buffers', function (t) {
|
|
744
|
+
const buf = crypto.randomBytes(10)
|
|
745
|
+
const buf2 = Buffer.alloc(10)
|
|
746
|
+
const b = BufferListStream(buf)
|
|
747
|
+
|
|
748
|
+
b.append(buf)
|
|
749
|
+
b.copy(buf2, 0, 5, 15)
|
|
750
|
+
|
|
751
|
+
t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer')
|
|
752
|
+
|
|
753
|
+
t.end()
|
|
754
|
+
})
|
|
755
|
+
|
|
756
|
+
tape('shallow slice across buffer boundaries', function (t) {
|
|
757
|
+
const bl = new BufferListStream(['First', 'Second', 'Third'])
|
|
758
|
+
|
|
759
|
+
t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh')
|
|
760
|
+
|
|
761
|
+
t.end()
|
|
762
|
+
})
|
|
763
|
+
|
|
764
|
+
tape('shallow slice within single buffer', function (t) {
|
|
765
|
+
t.plan(2)
|
|
766
|
+
|
|
767
|
+
const bl = new BufferListStream(['First', 'Second', 'Third'])
|
|
768
|
+
|
|
769
|
+
t.equal(bl.shallowSlice(5, 10).toString(), 'Secon')
|
|
770
|
+
t.equal(bl.shallowSlice(7, 10).toString(), 'con')
|
|
771
|
+
|
|
772
|
+
t.end()
|
|
773
|
+
})
|
|
774
|
+
|
|
775
|
+
tape('shallow slice single buffer', function (t) {
|
|
776
|
+
t.plan(3)
|
|
777
|
+
|
|
778
|
+
const bl = new BufferListStream(['First', 'Second', 'Third'])
|
|
779
|
+
|
|
780
|
+
t.equal(bl.shallowSlice(0, 5).toString(), 'First')
|
|
781
|
+
t.equal(bl.shallowSlice(5, 11).toString(), 'Second')
|
|
782
|
+
t.equal(bl.shallowSlice(11, 16).toString(), 'Third')
|
|
783
|
+
})
|
|
784
|
+
|
|
785
|
+
tape('shallow slice with negative or omitted indices', function (t) {
|
|
786
|
+
t.plan(4)
|
|
787
|
+
|
|
788
|
+
const bl = new BufferListStream(['First', 'Second', 'Third'])
|
|
789
|
+
|
|
790
|
+
t.equal(bl.shallowSlice().toString(), 'FirstSecondThird')
|
|
791
|
+
t.equal(bl.shallowSlice(5).toString(), 'SecondThird')
|
|
792
|
+
t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh')
|
|
793
|
+
t.equal(bl.shallowSlice(-8).toString(), 'ondThird')
|
|
794
|
+
})
|
|
795
|
+
|
|
796
|
+
tape('shallow slice does not make a copy', function (t) {
|
|
797
|
+
t.plan(1)
|
|
798
|
+
|
|
799
|
+
const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
|
|
800
|
+
const bl = new BufferListStream(buffers).shallowSlice(5, -3)
|
|
801
|
+
|
|
802
|
+
buffers[1].fill('h')
|
|
803
|
+
buffers[2].fill('h')
|
|
804
|
+
|
|
805
|
+
t.equal(bl.toString(), 'hhhhhhhh')
|
|
806
|
+
})
|
|
807
|
+
|
|
808
|
+
tape('shallow slice with 0 length', function (t) {
|
|
809
|
+
t.plan(1)
|
|
810
|
+
|
|
811
|
+
const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
|
|
812
|
+
const bl = (new BufferListStream(buffers)).shallowSlice(0, 0)
|
|
813
|
+
|
|
814
|
+
t.equal(bl.length, 0)
|
|
815
|
+
})
|
|
816
|
+
|
|
817
|
+
tape('shallow slice with 0 length from middle', function (t) {
|
|
818
|
+
t.plan(1)
|
|
819
|
+
|
|
820
|
+
const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
|
|
821
|
+
const bl = (new BufferListStream(buffers)).shallowSlice(10, 10)
|
|
822
|
+
|
|
823
|
+
t.equal(bl.length, 0)
|
|
824
|
+
})
|
|
825
|
+
|
|
826
|
+
tape('duplicate', function (t) {
|
|
827
|
+
t.plan(2)
|
|
828
|
+
|
|
829
|
+
const bl = new BufferListStream('abcdefghij\xff\x00')
|
|
830
|
+
const dup = bl.duplicate()
|
|
831
|
+
|
|
832
|
+
t.equal(bl.prototype, dup.prototype)
|
|
833
|
+
t.equal(bl.toString('hex'), dup.toString('hex'))
|
|
834
|
+
})
|
|
835
|
+
|
|
836
|
+
tape('destroy no pipe', function (t) {
|
|
837
|
+
t.plan(2)
|
|
838
|
+
|
|
839
|
+
/** @type {BufferListStreamWithPrivate} */
|
|
840
|
+
const bl = new BufferListStream('alsdkfja;lsdkfja;lsdk')
|
|
841
|
+
|
|
842
|
+
bl.destroy()
|
|
843
|
+
|
|
844
|
+
t.equal(bl._bufs.length, 0)
|
|
845
|
+
t.equal(bl.length, 0)
|
|
846
|
+
})
|
|
847
|
+
|
|
848
|
+
tape('destroy with error', function (t) {
|
|
849
|
+
t.plan(3)
|
|
850
|
+
|
|
851
|
+
/** @type {BufferListStreamWithPrivate} */
|
|
852
|
+
const bl = new BufferListStream('alsdkfja;lsdkfja;lsdk')
|
|
853
|
+
const err = new Error('kaboom')
|
|
854
|
+
|
|
855
|
+
bl.destroy(err)
|
|
856
|
+
bl.on('error', function (_err) {
|
|
857
|
+
t.equal(_err, err)
|
|
858
|
+
})
|
|
859
|
+
|
|
860
|
+
t.equal(bl._bufs.length, 0)
|
|
861
|
+
t.equal(bl.length, 0)
|
|
862
|
+
})
|
|
863
|
+
|
|
864
|
+
!process.browser && tape('destroy with pipe before read end', function (t) {
|
|
865
|
+
t.plan(2)
|
|
866
|
+
|
|
867
|
+
/** @type {BufferListStreamWithPrivate} */
|
|
868
|
+
const bl = new BufferListStream()
|
|
869
|
+
fs.createReadStream(path.join(__dirname, '/test.js'))
|
|
870
|
+
.pipe(bl)
|
|
871
|
+
|
|
872
|
+
bl.destroy()
|
|
873
|
+
|
|
874
|
+
t.equal(bl._bufs.length, 0)
|
|
875
|
+
t.equal(bl.length, 0)
|
|
876
|
+
})
|
|
877
|
+
|
|
878
|
+
!process.browser && tape('destroy with pipe before read end with race', function (t) {
|
|
879
|
+
t.plan(2)
|
|
880
|
+
|
|
881
|
+
/** @type {BufferListStreamWithPrivate} */
|
|
882
|
+
const bl = new BufferListStream()
|
|
883
|
+
|
|
884
|
+
fs.createReadStream(path.join(__dirname, '/test.js'))
|
|
885
|
+
.pipe(bl)
|
|
886
|
+
|
|
887
|
+
setTimeout(function () {
|
|
888
|
+
bl.destroy()
|
|
889
|
+
setTimeout(function () {
|
|
890
|
+
t.equal(bl._bufs.length, 0)
|
|
891
|
+
t.equal(bl.length, 0)
|
|
892
|
+
}, 500)
|
|
893
|
+
}, 500)
|
|
894
|
+
})
|
|
895
|
+
|
|
896
|
+
!process.browser && tape('destroy with pipe after read end', function (t) {
|
|
897
|
+
t.plan(2)
|
|
898
|
+
|
|
899
|
+
/** @type {BufferListStreamWithPrivate} */
|
|
900
|
+
const bl = new BufferListStream()
|
|
901
|
+
fs.createReadStream(path.join(__dirname, '/test.js'))
|
|
902
|
+
.on('end', onEnd)
|
|
903
|
+
.pipe(bl)
|
|
904
|
+
|
|
905
|
+
function onEnd () {
|
|
906
|
+
bl.destroy()
|
|
907
|
+
|
|
908
|
+
t.equal(bl._bufs.length, 0)
|
|
909
|
+
t.equal(bl.length, 0)
|
|
910
|
+
}
|
|
911
|
+
})
|
|
912
|
+
|
|
913
|
+
!process.browser && tape('destroy with pipe while writing to a destination', function (t) {
|
|
914
|
+
t.plan(4)
|
|
915
|
+
|
|
916
|
+
/** @type {BufferListStreamWithPrivate} */
|
|
917
|
+
const bl = new BufferListStream()
|
|
918
|
+
const ds = new BufferListStream()
|
|
919
|
+
|
|
920
|
+
fs.createReadStream(path.join(__dirname, '/test.js'))
|
|
921
|
+
.on('end', onEnd)
|
|
922
|
+
.pipe(bl)
|
|
923
|
+
|
|
924
|
+
function onEnd () {
|
|
925
|
+
bl.pipe(ds)
|
|
926
|
+
|
|
927
|
+
setTimeout(function () {
|
|
928
|
+
bl.destroy()
|
|
929
|
+
|
|
930
|
+
t.equals(bl._bufs.length, 0)
|
|
931
|
+
t.equals(bl.length, 0)
|
|
932
|
+
|
|
933
|
+
ds.destroy()
|
|
934
|
+
|
|
935
|
+
t.equals(bl._bufs.length, 0)
|
|
936
|
+
t.equals(bl.length, 0)
|
|
937
|
+
}, 100)
|
|
938
|
+
}
|
|
939
|
+
})
|
|
940
|
+
|
|
941
|
+
!process.browser && tape('handle error', function (t) {
|
|
942
|
+
t.plan(2)
|
|
943
|
+
|
|
944
|
+
fs.createReadStream('/does/not/exist').pipe(BufferListStream(function (err, data) {
|
|
945
|
+
t.ok(err instanceof Error, 'has error')
|
|
946
|
+
t.notOk(data, 'no data')
|
|
947
|
+
}))
|
|
948
|
+
})
|