overleaf/services
Antoine Clausse 36f0a3e01a [web] Promisify ProjectController (#18477)
* Create `promiseAuto` util to replace `async.auto`

* Promisify `BrandVariationsHandler.getBrandVariationById`

* Promisify `updateProjectSettings`

* Promisify `updateProjectAdminSettings`

* Promisify `newProject`

* Promisify `deleteProject`

* Promisify `loadEditor`

* Fix brandVariation loading in promise auto

* Promisify `_refreshFeatures`

* Promisify `_injectProjectUsers`

* Fix `no-inner-declarations`

* Promisify `cloneProject`

* Promisify `userProjectsJson`

* Promisify `projectEntitiesJson`

* Promisify `restoreProject`

* Promisify `renameProject`

* Additional warning fix

* Update unit tests

* Fixup `updateProjectSettings`: call jobs inside the Promise.all

* Use `expressify(...)` instead of manually call `next(err)`

https://github.com/overleaf/internal/pull/18477#discussion_r1613611987
https://github.com/overleaf/internal/pull/18477#discussion_r1613621146
https://github.com/overleaf/internal/pull/18477#discussion_r1613634000
...

* Replace Promise.all by sequencial awaits

https://github.com/overleaf/internal/pull/18477#discussion_r1613852746
https://github.com/overleaf/internal/pull/18477#discussion_r1613611987

* Remove manual throws of 500. Let the generic error handler catch them.

https://github.com/overleaf/internal/pull/18477#discussion_r1613623446
https://github.com/overleaf/internal/pull/18477#discussion_r1613628955

* Promisify `untrashProject`

https://github.com/overleaf/internal/pull/18477#discussion_r1613627783

* Promisify `expireDeletedProjectsAfterDuration`

* Promisify `archiveProject`

* Promisify `unarchiveProject`

* Promisify `trashProject`

* Promisify `expireDeletedProject`

* Use async `setTimeout` from `timers/promise`

https://github.com/overleaf/internal/pull/18477#discussion_r1613843085

* Remove unused `_injectProjectUsers`

https://github.com/overleaf/internal/pull/18477#discussion_r1613855766

* Add missing exec in queries (?)

Not sure if that makes a real difference but it's more consistent with the rest of the code

* Catch floating promises

https://github.com/overleaf/internal/pull/18477#discussion_r1613868876

* Replace custom `promiseAuto` by `p-props` from NPM

https://github.com/overleaf/internal/pull/18477#discussion_r1613393294

* Downgrade `p-props` to v4. Later versions require ESM

* Simplify code around `splitTestAssignments`

GitOrigin-RevId: 84d37f7aa9227b5b9acf9eeb5db1b78afc01b6ee
2024-05-30 08:04:36 +00:00
..
chat Merge pull request #18289 from overleaf/ac-ar-eslint-return-await 2024-05-27 10:22:49 +00:00
clsi Merge pull request #18537 from overleaf/jpa-cleanup-synctex 2024-05-29 08:03:57 +00:00
contacts Merge pull request #18289 from overleaf/ac-ar-eslint-return-await 2024-05-27 10:22:49 +00:00
docstore Merge pull request #18289 from overleaf/ac-ar-eslint-return-await 2024-05-27 10:22:49 +00:00
document-updater Merge pull request #17958 from overleaf/mj-web-revert-file 2024-05-29 08:04:16 +00:00
filestore Merge pull request #18289 from overleaf/ac-ar-eslint-return-await 2024-05-27 10:22:49 +00:00
git-bridge Merge pull request #18312 from overleaf/gs-git-bridge-bash 2024-05-17 08:05:19 +00:00
history-v1 Merge pull request #18088 from overleaf/ab-session-secret-rotation 2024-05-27 10:23:33 +00:00
notifications Merge pull request #18289 from overleaf/ac-ar-eslint-return-await 2024-05-27 10:22:49 +00:00
project-history Merge pull request #17958 from overleaf/mj-web-revert-file 2024-05-29 08:04:16 +00:00
real-time Merge pull request #18088 from overleaf/ab-session-secret-rotation 2024-05-27 10:23:33 +00:00
spelling Merge pull request #18289 from overleaf/ac-ar-eslint-return-await 2024-05-27 10:22:49 +00:00
web [web] Promisify ProjectController (#18477) 2024-05-30 08:04:36 +00:00