mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-08 08:39:03 +02:00
3312d97a6b
* Create tests on find_malformed_filetrees and fix_malformed_filetrees
* Remove lines that are making fix_malformed_filetree fail
These lines are causing errors such as
```
Missing file hash: 586846800000000000000000/5891271c0000000000000000 (rootFolder.0.folders.2.fileRefs.7.hash)
SaaS: likely needs filestore restore
Server Pro: please reach out to support
```
* Add snapshots of projects after fix_malformed_filetree
* Set `WRITE_SNAPSHOT` as false
* Make `deleteProjectsRecordId0` constant
* Ignore duplicated ID errors in CreateMalformedFileTrees.mjs
* Move snapshots to directory folder
* Remove unnecessary code
* Update tests to cover use cases from the scripts
* Fix: Use `new ObjectId(projectId)` instead of the string in mongo queries
* Fix: Query `rootFolder: []` to fix more than `rootFolder: { $size: 0 }`
* Remove/rename files from first draft
* Remove empty strings from expects in unrelated tests, now that `filterOutput` removes them
* Add missing `expectFixStdout` to tests
* misc: rename test util to strId
* Add "well formed filetrees" to test cases
* Use `wellFormed` variable to remove some duplication
* Update tests:
- check Missing file hash path
- remove test on string/numbers as array items
* Add test "bug: shifted arrays in filetree"
* Rename `wellFormedFile` to `wellFormedFolder`
* Fix name of the root folder to `'rootFolder'`, not `'untitled'`
GitOrigin-RevId: dc098bb7ad3ca441fe2bb72b5f5f0e3bcedbdf67
12 lines
314 B
JavaScript
12 lines
314 B
JavaScript
export function filterOutput(line) {
|
|
return (
|
|
!!line &&
|
|
!line.startsWith('Using settings from ') &&
|
|
!line.startsWith('Using default settings from ') &&
|
|
!line.startsWith('CoffeeScript settings file') &&
|
|
!line.includes('mongoose default connection open')
|
|
)
|
|
}
|
|
|
|
export default { filterOutput }
|