FRE-600: Fix code review blockers

- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-25 00:08:01 -04:00
parent 65b552bb08
commit 7c684a42cc
48450 changed files with 5679671 additions and 383 deletions

10
node_modules/level-concat-iterator/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,10 @@
sudo: false
language: node_js
node_js:
- 6
- 8
- 10
after_success: npm run coverage

45
node_modules/level-concat-iterator/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,45 @@
# Changelog
## [Unreleased][unreleased]
## [2.0.1] - 2019-04-01
### Changed
- Upgrade `standard` devDependency from `^11.0.1` to `^12.0.1` ([`6b957cf`](https://github.com/Level/concat-iterator/commit/6b957cf)) ([**@vweevers**](https://github.com/vweevers))
- Apply common project tweaks ([#12](https://github.com/Level/concat-iterator/issues/12), [#13](https://github.com/Level/concat-iterator/issues/13), [`0c1d4e0`](https://github.com/Level/concat-iterator/commit/0c1d4e0)) ([**@vweevers**](https://github.com/vweevers))
### Added
- Add `nyc` and `coveralls` ([#11](https://github.com/Level/concat-iterator/issues/11), [`a3e312a`](https://github.com/Level/concat-iterator/commit/a3e312a)) ([**@ralphtheninja**](https://github.com/ralphtheninja), [**@vweevers**](https://github.com/vweevers))
### Removed
- Remove node 9 from travis ([`0347b82`](https://github.com/Level/concat-iterator/commit/0347b82)) ([**@ralphtheninja**](https://github.com/ralphtheninja))
## [2.0.0] - 2018-06-27
### Changed
- Detect end by checking key and value ([**@vweevers**](https://github.com/vweevers))
- Use `level` in example instead of `leveldown` ([**@ralphtheninja**](https://github.com/ralphtheninja))
- End iterator if next errors ([**@ralphtheninja**](https://github.com/ralphtheninja))
### Removed
- Remove custom `nextTick` parameter ([**@ralphtheninja**](https://github.com/ralphtheninja))
### Added
- Add `homepage` and `repository` to `package.json` ([**@ralphtheninja**](https://github.com/ralphtheninja))
- Add `UPGRADING.md` ([**@ralphtheninja**](https://github.com/ralphtheninja))
## 1.0.0 - 2018-06-24
:seedling: Initial release.
[unreleased]: https://github.com/Level/concat-iterator/compare/v2.0.1...HEAD
[2.0.1]: https://github.com/Level/concat-iterator/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/Level/concat-iterator/compare/v1.0.0...v2.0.0

6
node_modules/level-concat-iterator/CONTRIBUTORS.md generated vendored Normal file
View File

@@ -0,0 +1,6 @@
# Contributors
| Name | GitHub | Social |
| :------------------- | :----------------------------------------------------- | :--------------------------------------------------------- |
| **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) |
| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) |

21
node_modules/level-concat-iterator/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,21 @@
# The MIT License (MIT)
**Copyright © 2018-present [Contributors](CONTRIBUTORS.md).**
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

62
node_modules/level-concat-iterator/README.md generated vendored Normal file
View File

@@ -0,0 +1,62 @@
# level-concat-iterator
> Concatenate items from an iterator into an array.
[![level badge][level-badge]](https://github.com/Level/awesome)
[![npm](https://img.shields.io/npm/v/level-concat-iterator.svg?label=&logo=npm)](https://www.npmjs.com/package/level-concat-iterator)
[![Node version](https://img.shields.io/node/v/level-concat-iterator.svg)](https://www.npmjs.com/package/level-concat-iterator)
[![Travis](https://img.shields.io/travis/Level/concat-iterator.svg?logo=travis&label=)](https://travis-ci.org/Level/concat-iterator)
[![Coverage Status](https://coveralls.io/repos/github/Level/concat-iterator/badge.svg)](https://coveralls.io/github/Level/concat-iterator)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![npm](https://img.shields.io/npm/dm/level-concat-iterator.svg?label=dl)](https://www.npmjs.com/package/level-concat-iterator)
[![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/level/sponsors/badge.svg?color=orange)](#sponsors)
## Usage
```js
var concat = require('level-concat-iterator')
var level = require('level')
level('DB', function (err, db) {
db.put('foo', 'bar', function (err) {
concat(db.iterator(), function (err, data) {
console.log(data)
})
})
})
```
**If you are upgrading:** please see [`UPGRADING.md`](UPGRADING.md).
## API
### `concat(iterator, cb)`
Takes an `abstract-leveldown` compatible `iterator` as first parameter and calls back with an array of keys and values. Calls back with an error if `iterator.next(cb)` or `iterator.end(cb)` errors.
## Contributing
[`Level/concat-iterator`](https://github.com/Level/concat-iterator) is an **OPEN Open Source Project**. This means that:
> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the [Contribution Guide](https://github.com/Level/community/blob/master/CONTRIBUTING.md) for more details.
## Donate
To sustain [`Level`](https://github.com/Level) and its activities, become a backer or sponsor on [Open Collective](https://opencollective.com/level). Your logo or avatar will be displayed on our 28+ [GitHub repositories](https://github.com/Level), [npm](https://www.npmjs.com/) packages and (soon) [our website](http://leveldb.org). 💖
### Backers
[![Open Collective backers](https://opencollective.com/level/backers.svg?width=890)](https://opencollective.com/level)
### Sponsors
[![Open Collective sponsors](https://opencollective.com/level/sponsors.svg?width=890)](https://opencollective.com/level)
## License
[MIT](LICENSE.md) © 2018-present [Contributors](CONTRIBUTORS.md).
[level-badge]: http://leveldb.org/img/badge.svg

7
node_modules/level-concat-iterator/UPGRADING.md generated vendored Normal file
View File

@@ -0,0 +1,7 @@
# Upgrade Guide
This document describes breaking changes and how to upgrade. For a complete list of changes including minor and patch releases, please refer to the [changelog](CHANGELOG.md).
## v2
The `nextTick` parameter was removed.

13
node_modules/level-concat-iterator/example.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
var level = require('level')
var concat = require('.')
level('DB', function (err, db) {
if (err) throw err
db.put('foo', 'bar', function (err) {
if (err) throw err
concat(db.iterator(), function (err, data) {
if (err) throw err
console.log(data)
})
})
})

15
node_modules/level-concat-iterator/index.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
module.exports = function (iterator, cb) {
var data = []
var next = function () {
iterator.next(function (err, key, value) {
if (err || (key === undefined && value === undefined)) {
return iterator.end(function (err2) {
cb(err || err2, data)
})
}
data.push({ key: key, value: value })
next()
})
}
next()
}

41
node_modules/level-concat-iterator/package.json generated vendored Normal file
View File

@@ -0,0 +1,41 @@
{
"name": "level-concat-iterator",
"version": "2.0.1",
"description": "Concatenate items from an iterator into an array.",
"author": "Lars-Magnus Skog <ralphtheninja@riseup.net>",
"license": "MIT",
"main": "index.js",
"scripts": {
"test": "standard && hallmark && nyc node test",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"hallmark": "hallmark --fix",
"dependency-check": "dependency-check . test.js",
"prepublishOnly": "npm run dependency-check"
},
"devDependencies": {
"coveralls": "^3.0.2",
"dependency-check": "^3.3.0",
"hallmark": "^0.1.0",
"level-community": "^3.0.0",
"nyc": "^13.3.0",
"standard": "^12.0.1",
"tape": "^4.9.1"
},
"hallmark": {
"community": "level-community"
},
"repository": {
"type": "git",
"url": "https://github.com/Level/concat-iterator.git"
},
"homepage": "https://github.com/Level/concat-iterator",
"keywords": [
"level",
"concatenate",
"iterator",
"array"
],
"engines": {
"node": ">=6"
}
}

114
node_modules/level-concat-iterator/test.js generated vendored Normal file
View File

@@ -0,0 +1,114 @@
var test = require('tape')
var collect = require('.')
test('calls back with error if iterator.next errors', function (t) {
t.plan(3)
var iterator = {
next: function (cb) {
t.pass('iterator.next called')
process.nextTick(cb, new Error('iterator.next'))
},
end: function (cb) {
t.pass('iterator.end called')
process.nextTick(cb)
}
}
collect(iterator, function (err) {
t.is(err.message, 'iterator.next', 'correct error')
})
})
test('happy path calls back with an array', function (t) {
t.plan(6)
var i = 0
var data = [
{ key: 'key1', value: 'value1' },
{ key: 'key2', value: 'value2' }
]
var iterator = {
next: function (cb) {
t.pass('iterator.next called')
if (i < data.length) {
process.nextTick(cb, null, data[i].key, data[i].value)
++i
} else {
process.nextTick(cb)
}
},
end: function (cb) {
t.pass('iterator.end called')
process.nextTick(cb)
}
}
collect(iterator, function (err, result) {
t.error(err, 'no error')
t.same(result, data)
})
})
test('calls back with error and data if iterator.end errors', function (t) {
t.plan(6)
var i = 0
var data = [
{ key: 'key1', value: 'value1' },
{ key: 'key2', value: 'value2' }
]
var iterator = {
next: function (cb) {
t.pass('iterator.next called')
if (i < data.length) {
process.nextTick(cb, null, data[i].key, data[i].value)
++i
} else {
process.nextTick(cb)
}
},
end: function (cb) {
t.pass('iterator.end called')
process.nextTick(cb, new Error('iterator.end'))
}
}
collect(iterator, function (err, result) {
t.is(err.message, 'iterator.end', 'correct error')
t.same(result, data)
})
})
test('calls back with error and partial data if iterator.end errors', function (t) {
t.plan(5)
var i = 0
var data = [
{ key: 'key1', value: 'value1' },
{ key: 'key2', value: 'value2' }
]
var iterator = {
next: function (cb) {
t.pass('iterator.next called')
if (i === 0) {
process.nextTick(cb, null, data[i].key, data[i].value)
i++
} else {
process.nextTick(cb)
}
},
end: function (cb) {
t.pass('iterator.end called')
process.nextTick(cb, new Error('foo'))
}
}
collect(iterator, function (err, result) {
t.is(err.message, 'foo', 'correct error')
t.same(result, [].concat(data[0]))
})
})