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

View File

@@ -0,0 +1,9 @@
module.exports = function eachRecursive(obj, fn, path) {
path = path ? path + '.' : '';
for (var name in obj) {
if (typeof obj === "object" && obj !== null) {
eachRecursive(obj[name], fn, path + name);
}
fn(obj[name], path + name);
}
};

View File

@@ -0,0 +1,21 @@
var cp = require('child_process');
/**
* Returns the version string of the current working directory.
* It is the git short hash of the last commit that changed filePath
* If there are uncommitted changes to this filePath, this method will throw.
* @returns {string}
*/
module.exports = function getGitHashSync(filePath) {
var commandResult;
try {
cp.execSync('git diff-index --quiet HEAD -- ' + filePath, { encoding: 'utf-8' });
} catch (err) {
//throw new Error('Cannot resolve git hash of file ' + filePath + ': There are uncommitted changes to file ' + filePath);
}
commandResult = cp.execSync('git log -n1 --pretty=format:%h -- ' + filePath, { encoding: 'utf-8' });
if (!commandResult) {
throw new Error("Could not get hash: file " + filePath + " does not exist");
}
return commandResult;
};

View File

@@ -0,0 +1,22 @@
var getGitHashSync = require('./get-git-hash-sync');
var path = require('path');
module.exports = function(libName) {
var pkg;
var version;
if (libName == 'index') {
pkg = require('../package.json');
version = getGitHashSync(require.resolve('../index'));
} else if (libName == 'native') {
pkg = { name: 'JSON.stringify', url: 'n/a' };
version = 'native';
} else {
pkg = require(libName + '/package.json');
version = pkg.version;
}
return {
name: pkg.name,
url: pkg.url,
version: version
}
};

47
node_modules/fast-stable-stringify/util/object-path.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
/**
* Returns the element within root under the path given by pathSegments.
* @param {Object} root
* @param {string[]} pathSegments
* @param {boolean} [appendIfMissing=false] - all objects are created if they do not exist
* @returns {Object} - the object under the path. If appendIsMissing is false and the path does not exist, returns null
*/
module.exports.getObject = function getObject(root, pathSegments, appendIfMissing) {
var target = root;
var pathSeg;
var i;
for (i = 0; i < pathSegments.length; i++) {
pathSeg = pathSegments[i];
if (!target.hasOwnProperty(pathSeg)) {
if (appendIfMissing) {
target[pathSeg] = {};
} else {
return null;
}
}
target = target[pathSeg];
}
return target;
};
/**
* Writes the object to the path in root. Overwrites if an object exists.
* Note: root is edited in place!
* @param {Object} root
* @param {string[]} pathSegments
* @param {Object} obj
*/
module.exports.setObject = function setObject(root, pathSegments, obj) {
var target = root;
var pathSeg;
var i;
var max = pathSegments.length;
for (i = 0; i < max; i++) {
pathSeg = pathSegments[i];
if (i === max - 1) {
target[pathSeg] = obj;
} else if (!target.hasOwnProperty(pathSeg)) {
target[pathSeg] = {};
}
target = target[pathSeg];
}
};