mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Centralize prettier configuration to root level (#30501)
* Merge all .prettierignore files into top-level config * Merge all .prettierrc files into top-level config * Replace service-specific glob patterns in package.json format scripts with `prettier .` * Add template files with Jinja2, Go template, envsubst, and Handlebars syntax to .prettierignore * Ignore GitHub templates * Ignore PUG templates to format them separately with `format:pug` * Encourage double quotes for YAML, YML files * Move prettier for PUG source format script to the root * Move prettier for styles source format script to the root * Remove prettier for jenkins files from web * Remove prettier source format script from all services * Make .prettierrc more readable * Update format scripts by file type * Organise `.prettierignore` * Add `--cache` flag to prettier scripts for faster runs * Format all files with prettier * Format all or format services * Remove `format`/`format:fix` scripts from services since now it runs from root `package.json` * Avoid conlficts with yamllint configuration * Remove `--cache` flag from prettier scripts * Update all service Makefiles to use root-level prettier configuration * Update all Jenkinsfile to use root-level prettier configuration * Ignore auto-generated files by build_scripts * Update package-lock.json * Update root Makefile format targets * Update SP Jenkinsfile format target * Update E2E Makefile format script * Udpate `format_js` to work in both local and CI env * Add docker-mailtrap to .prettierignore docker-mailtrap is a third-party git-ignored directory used for testing * Added Docker env detection to prevent nested Docker spawning * Ignore handlebars templates * Add cryptographic files and test output to `.prettierignore` * Add terraform modules to `.gitignore` * Remove prettier-plugin-groovy * Use npx directly instead of Docker for local formatting for faster formatting * Auto-generate Makefiles * Revert "Remove prettier-plugin-groovy" This reverts commit 194a33589a2e1e4d2225d10c67e9f025e4222025. * Mount monorepo root in RUN_LINT_FORMAT for prettier config access * Prettier ignores all `node_modules` by default regardless of location * Show only changed files in format output * Ignore LICENSE files * Enable prettier on rendered build_scripts outputs * Ignoring all the template folders by prettier * Remove the public/minjs entry since it does not exist * Remove all non-existent paths * Sync `.prettierignore` with ignored files by `.gitignore` and `.dockerignore` files * Revert "Auto-generate Makefiles" This reverts commit c0233e490de1bc95fe437219d65e0b66e0331ec9. * Revert "Use npx directly instead of Docker for local formatting for faster formatting" This reverts commit 1d2b2cf1a6c6974c76885852a90dd55e84167e41. * Ignore dashboard JSON files * Ignore files generated by bin/update_build_scripts * Remove unsupported file types from `.prettierignore` * Ignore test fixture generated files * Ignore README file types by prettier * Ignore generate snapshots by prettier * Allow to format generated bin/update_build_scripts by prettier * Ensure build script outputs prettier-compatible tsconfig.json * Fix build script output to match prettier formatting - Fix Jinja2 whitespace in docker-compose templates - Change YAML quotes from single to double * Don't read cryptographic files by prettier * Ignore google verification files by prettier * Revert npx prettier formatting * Ignore domain verification files * Show only changed files in format output * Make `.github` prettier * Allow all files to be formatted in jobs by prettier * Allow server-ce/server-pro files to be formatted by prettier * Ignore more folders in clsi, filestory, git-bridge by prettier * Update build script with `RUN_LINTING_CI_MONOREPO` * Ignore docker-mailtrap and downloads in server-ce by prettier * Restore prettier configs and prettierignore for V1 since it has its own prettier (an older version) * Source format GitOrigin-RevId: 637adc3cc422d1f20c86d6ebc8ec514d60758287
This commit is contained in:
@@ -4,7 +4,6 @@ about: Report a bug
|
|||||||
title: ''
|
title: ''
|
||||||
labels: type:bug
|
labels: type:bug
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@@ -18,11 +17,10 @@ Note: If you are using www.overleaf.com and have a problem,
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- BUG REPORT TEMPLATE -->
|
<!-- BUG REPORT TEMPLATE -->
|
||||||
|
|
||||||
## Steps to Reproduce
|
## Steps to Reproduce
|
||||||
|
|
||||||
<!-- Describe the steps leading up to when / where you found the bug. -->
|
<!-- Describe the steps leading up to when / where you found the bug. -->
|
||||||
<!-- Screenshots may be helpful here. -->
|
<!-- Screenshots may be helpful here. -->
|
||||||
|
|
||||||
@@ -31,23 +29,28 @@ Note: If you are using www.overleaf.com and have a problem,
|
|||||||
3.
|
3.
|
||||||
|
|
||||||
## Expected Behaviour
|
## Expected Behaviour
|
||||||
|
|
||||||
<!-- What should have happened when you completed the steps above? -->
|
<!-- What should have happened when you completed the steps above? -->
|
||||||
|
|
||||||
## Observed Behaviour
|
## Observed Behaviour
|
||||||
|
|
||||||
<!-- What actually happened when you completed the steps above? -->
|
<!-- What actually happened when you completed the steps above? -->
|
||||||
<!-- Screenshots may be helpful here. -->
|
<!-- Screenshots may be helpful here. -->
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
|
|
||||||
<!-- How has this issue affected you? What were you trying to accomplish? -->
|
<!-- How has this issue affected you? What were you trying to accomplish? -->
|
||||||
|
|
||||||
## Technical Info
|
## Technical Info
|
||||||
|
|
||||||
<!-- Provide any technical details that may be applicable (or N/A if not applicable). -->
|
<!-- Provide any technical details that may be applicable (or N/A if not applicable). -->
|
||||||
|
|
||||||
* URL:
|
- URL:
|
||||||
* Browser Name and version:
|
- Browser Name and version:
|
||||||
* Operating System and version (desktop or mobile):
|
- Operating System and version (desktop or mobile):
|
||||||
* Signed in as:
|
- Signed in as:
|
||||||
* Project and/or file:
|
- Project and/or file:
|
||||||
|
|
||||||
## Analysis
|
## Analysis
|
||||||
|
|
||||||
<!--- Optionally, document investigation of / suggest a fix for the bug, e.g. 'comes from this line / commit' -->
|
<!--- Optionally, document investigation of / suggest a fix for the bug, e.g. 'comes from this line / commit' -->
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
## Description
|
## Description
|
||||||
|
|
||||||
<!-- Goal of the pull request -->
|
<!-- Goal of the pull request -->
|
||||||
|
|
||||||
|
|
||||||
## Related issues / Pull Requests
|
## Related issues / Pull Requests
|
||||||
<!-- Fixes #xyz, Contributes to #xyz, Related to #xyz-->
|
|
||||||
|
|
||||||
|
<!-- Fixes #xyz, Contributes to #xyz, Related to #xyz-->
|
||||||
|
|
||||||
## Contributor Agreement
|
## Contributor Agreement
|
||||||
|
|
||||||
|
|||||||
+5
-10
@@ -1,11 +1,9 @@
|
|||||||
Contributing to Overleaf
|
# Contributing to Overleaf
|
||||||
==========================
|
|
||||||
|
|
||||||
Thank you for reading this! If you'd like to report a bug or join in the development
|
Thank you for reading this! If you'd like to report a bug or join in the development
|
||||||
of Overleaf, then here are some notes on how to do that.
|
of Overleaf, then here are some notes on how to do that.
|
||||||
|
|
||||||
Reporting bugs and opening issues
|
## Reporting bugs and opening issues
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
If you'd like to report a bug or open an issue, please **[check if there is an existing issue](https://github.com/overleaf/overleaf/issues).**
|
If you'd like to report a bug or open an issue, please **[check if there is an existing issue](https://github.com/overleaf/overleaf/issues).**
|
||||||
If there is then please add any more information that you have, or give it a 👍.
|
If there is then please add any more information that you have, or give it a 👍.
|
||||||
@@ -16,8 +14,7 @@ If you can include a screenshot for front end issues that is very helpful.
|
|||||||
|
|
||||||
**Note**: If you are using [www.overleaf.com](www.overleaf.com) and have a problem, or if you would like to request a new feature, please contact the Support team at support@overleaf.com. Raise an issue here only to report bugs in the Community Edition release of Overleaf.
|
**Note**: If you are using [www.overleaf.com](www.overleaf.com) and have a problem, or if you would like to request a new feature, please contact the Support team at support@overleaf.com. Raise an issue here only to report bugs in the Community Edition release of Overleaf.
|
||||||
|
|
||||||
Pull Requests
|
## Pull Requests
|
||||||
-------------
|
|
||||||
|
|
||||||
See [our wiki](https://github.com/overleaf/overleaf/wiki)
|
See [our wiki](https://github.com/overleaf/overleaf/wiki)
|
||||||
for how to manage the Overleaf development environment and for our developer guidelines.
|
for how to manage the Overleaf development environment and for our developer guidelines.
|
||||||
@@ -28,13 +25,11 @@ to get your changes merged into Overleaf.
|
|||||||
|
|
||||||
If you're looking for something to work on, have a look at the [open issues](https://github.com/overleaf/overleaf/issues).
|
If you're looking for something to work on, have a look at the [open issues](https://github.com/overleaf/overleaf/issues).
|
||||||
|
|
||||||
Security
|
## Security
|
||||||
--------
|
|
||||||
|
|
||||||
Please see [our security policy](https://github.com/overleaf/overleaf/security/policy) if you would like to report a potential security vulnerability.
|
Please see [our security policy](https://github.com/overleaf/overleaf/security/policy) if you would like to report a potential security vulnerability.
|
||||||
|
|
||||||
Contributor License Agreement
|
## Contributor License Agreement
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
Before we can accept any contributions of code, we need you to agree to our
|
Before we can accept any contributions of code, we need you to agree to our
|
||||||
[Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLSef79XH3mb7yIiMzZw-yALEegS-wyFetvjTiNBfZvf_IHD2KA/viewform?usp=sf_link).
|
[Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLSef79XH3mb7yIiMzZw-yALEegS-wyFetvjTiNBfZvf_IHD2KA/viewform?usp=sf_link).
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ in which to run the Overleaf services. Baseimage uses the `runit` service
|
|||||||
manager to manage services, and we add our init-scripts from the `server-ce/runit`
|
manager to manage services, and we add our init-scripts from the `server-ce/runit`
|
||||||
folder.
|
folder.
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Please see the [CONTRIBUTING](CONTRIBUTING.md) file for information on contributing to the development of Overleaf.
|
Please see the [CONTRIBUTING](CONTRIBUTING.md) file for information on contributing to the development of Overleaf.
|
||||||
|
|||||||
@@ -166,7 +166,8 @@ services:
|
|||||||
context: ..
|
context: ..
|
||||||
dockerfile: services/web/Dockerfile
|
dockerfile: services/web/Dockerfile
|
||||||
target: webpack
|
target: webpack
|
||||||
command: ["npx", "webpack", "serve", "--config", "webpack.config.dev-env.js"]
|
command:
|
||||||
|
["npx", "webpack", "serve", "--config", "webpack.config.dev-env.js"]
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:80:3808"
|
- "127.0.0.1:80:3808"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '2.2'
|
version: "2.2"
|
||||||
services:
|
services:
|
||||||
sharelatex:
|
sharelatex:
|
||||||
ports:
|
ports:
|
||||||
@@ -20,4 +20,4 @@ services:
|
|||||||
- 30070:30070
|
- 30070:30070
|
||||||
- 30400:30400
|
- 30400:30400
|
||||||
environment:
|
environment:
|
||||||
DEBUG_NODE: 'true'
|
DEBUG_NODE: "true"
|
||||||
|
|||||||
+9
-11
@@ -21,7 +21,6 @@ services:
|
|||||||
########################################################################
|
########################################################################
|
||||||
# - /var/run/docker.sock:/var/run/docker.sock
|
# - /var/run/docker.sock:/var/run/docker.sock
|
||||||
environment:
|
environment:
|
||||||
|
|
||||||
OVERLEAF_APP_NAME: Overleaf Community Edition
|
OVERLEAF_APP_NAME: Overleaf Community Edition
|
||||||
|
|
||||||
OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex
|
OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex
|
||||||
@@ -31,13 +30,13 @@ services:
|
|||||||
OVERLEAF_REDIS_HOST: redis
|
OVERLEAF_REDIS_HOST: redis
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
|
|
||||||
ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
|
ENABLED_LINKED_FILE_TYPES: "project_file,project_output_file"
|
||||||
|
|
||||||
# Enables Thumbnail generation using ImageMagick
|
# Enables Thumbnail generation using ImageMagick
|
||||||
ENABLE_CONVERSIONS: 'true'
|
ENABLE_CONVERSIONS: "true"
|
||||||
|
|
||||||
# Disables email confirmation requirement
|
# Disables email confirmation requirement
|
||||||
EMAIL_CONFIRMATION_DISABLED: 'true'
|
EMAIL_CONFIRMATION_DISABLED: "true"
|
||||||
|
|
||||||
## Set for SSL via nginx-proxy
|
## Set for SSL via nginx-proxy
|
||||||
#VIRTUAL_HOST: 103.112.212.22
|
#VIRTUAL_HOST: 103.112.212.22
|
||||||
@@ -77,14 +76,14 @@ services:
|
|||||||
## so the following environment variables must be commented out to avoid compile issues.
|
## so the following environment variables must be commented out to avoid compile issues.
|
||||||
##
|
##
|
||||||
## Sandboxed Compiles: https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/server-pro-only-configuration/sandboxed-compiles
|
## Sandboxed Compiles: https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/server-pro-only-configuration/sandboxed-compiles
|
||||||
SANDBOXED_COMPILES: 'true'
|
SANDBOXED_COMPILES: "true"
|
||||||
### Bind-mount source for /var/lib/overleaf/data/compiles inside the container.
|
### Bind-mount source for /var/lib/overleaf/data/compiles inside the container.
|
||||||
SANDBOXED_COMPILES_HOST_DIR_COMPILES: '/home/user/sharelatex_data/data/compiles'
|
SANDBOXED_COMPILES_HOST_DIR_COMPILES: "/home/user/sharelatex_data/data/compiles"
|
||||||
### Bind-mount source for /var/lib/overleaf/data/output inside the container.
|
### Bind-mount source for /var/lib/overleaf/data/output inside the container.
|
||||||
SANDBOXED_COMPILES_HOST_DIR_OUTPUT: '/home/user/sharelatex_data/data/output'
|
SANDBOXED_COMPILES_HOST_DIR_OUTPUT: "/home/user/sharelatex_data/data/output"
|
||||||
### Backwards compatibility (before Server Pro 5.5)
|
### Backwards compatibility (before Server Pro 5.5)
|
||||||
DOCKER_RUNNER: 'true'
|
DOCKER_RUNNER: "true"
|
||||||
SANDBOXED_COMPILES_SIBLING_CONTAINERS: 'true'
|
SANDBOXED_COMPILES_SIBLING_CONTAINERS: "true"
|
||||||
|
|
||||||
## Works with test LDAP server shown at bottom of docker compose
|
## Works with test LDAP server shown at bottom of docker compose
|
||||||
# OVERLEAF_LDAP_URL: 'ldap://ldap:389'
|
# OVERLEAF_LDAP_URL: 'ldap://ldap:389'
|
||||||
@@ -100,14 +99,13 @@ services:
|
|||||||
# OVERLEAF_TEMPLATES_USER_ID: "578773160210479700917ee5"
|
# OVERLEAF_TEMPLATES_USER_ID: "578773160210479700917ee5"
|
||||||
# OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS: '[ {"name":"All Templates","url":"/templates/all"}]'
|
# OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS: '[ {"name":"All Templates","url":"/templates/all"}]'
|
||||||
|
|
||||||
|
|
||||||
# OVERLEAF_PROXY_LEARN: "true"
|
# OVERLEAF_PROXY_LEARN: "true"
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
restart: always
|
restart: always
|
||||||
image: mongo:6.0
|
image: mongo:6.0
|
||||||
container_name: mongo
|
container_name: mongo
|
||||||
command: '--replSet overleaf'
|
command: "--replSet overleaf"
|
||||||
volumes:
|
volumes:
|
||||||
- ~/mongo_data:/data/db
|
- ~/mongo_data:/data/db
|
||||||
- ./bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
|
- ./bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
|
||||||
|
|||||||
@@ -4,11 +4,9 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js"]
|
||||||
"**/*.js",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,9 @@
|
|||||||
"description": "utilities for node-fetch",
|
"description": "utilities for node-fetch",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
## v3.1.1
|
## v3.1.1
|
||||||
|
|
||||||
* Handle malformed requests in the req serializer
|
- Handle malformed requests in the req serializer
|
||||||
|
|
||||||
## v3.0.0
|
## v3.0.0
|
||||||
|
|
||||||
* Improve logging in Google Cloud Platform. Set environment variable `GCP_LOGGING=true` to enable.
|
- Improve logging in Google Cloud Platform. Set environment variable `GCP_LOGGING=true` to enable.
|
||||||
|
|
||||||
This version of the metrics module only works with versions of the `@overleaf/metrics` module greater than v4.0.0
|
This version of the metrics module only works with versions of the `@overleaf/metrics` module greater than v4.0.0
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,7 @@
|
|||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
## v4.1.0
|
## v4.1.0
|
||||||
|
|
||||||
* Allows skipping the `sampleRate` argument.
|
- Allows skipping the `sampleRate` argument.
|
||||||
|
|
||||||
## v4.0.0
|
## v4.0.0
|
||||||
|
|
||||||
* Send unmodified request and response to logger.
|
- Send unmodified request and response to logger.
|
||||||
|
|
||||||
This version of the metrics module only works with versions of the `@overleaf/logger` module greater than v3.0.0
|
This version of the metrics module only works with versions of the `@overleaf/logger` module greater than v3.0.0
|
||||||
|
|||||||
@@ -35,9 +35,7 @@
|
|||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"test:acceptance": "mocha --recursive --exit --grep=$MOCHA_GREP test/acceptance",
|
"test:acceptance": "mocha --recursive --exit --grep=$MOCHA_GREP test/acceptance",
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,10 @@
|
|||||||
"description": "utilities to help working with mongo",
|
"description": "utilities to help working with mongo",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
+49
-35
@@ -16,23 +16,23 @@ Light-weight helpers for handling JavaScript Errors in node.js and the browser.
|
|||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
|
||||||
- [Long Stack Traces with `OError.tag`](#long-stack-traces-with-oerrortag)
|
- [Long Stack Traces with `OError.tag`](#long-stack-traces-with-oerrortag)
|
||||||
* [The Problem](#the-problem)
|
- [The Problem](#the-problem)
|
||||||
* [The Solution](#the-solution)
|
- [The Solution](#the-solution)
|
||||||
* [Adding More Info](#adding-more-info)
|
- [Adding More Info](#adding-more-info)
|
||||||
* [`async`/`await`](#asyncawait)
|
- [`async`/`await`](#asyncawait)
|
||||||
* [Better Async Stack Traces in Node 12+](#better-async-stack-traces-in-node-12)
|
- [Better Async Stack Traces in Node 12+](#better-async-stack-traces-in-node-12)
|
||||||
* [Caveat: Shared Error Instances](#caveat-shared-error-instances)
|
- [Caveat: Shared Error Instances](#caveat-shared-error-instances)
|
||||||
- [Create Custom Error Classes](#create-custom-error-classes)
|
- [Create Custom Error Classes](#create-custom-error-classes)
|
||||||
* [Attaching Extra Info](#attaching-extra-info)
|
- [Attaching Extra Info](#attaching-extra-info)
|
||||||
* [Wrapping an Internal Error](#wrapping-an-internal-error)
|
- [Wrapping an Internal Error](#wrapping-an-internal-error)
|
||||||
- [OError API Reference](#oerror-api-reference)
|
- [OError API Reference](#oerror-api-reference)
|
||||||
* [new OError(message, [info], [cause])](#new-oerrormessage-info-cause)
|
- [new OError(message, [info], [cause])](#new-oerrormessage-info-cause)
|
||||||
* [oError.withInfo(info) ⇒ this](#oerrorwithinfoinfo--this)
|
- [oError.withInfo(info) ⇒ this](#oerrorwithinfoinfo--this)
|
||||||
* [oError.withCause(cause) ⇒ this](#oerrorwithcausecause--this)
|
- [oError.withCause(cause) ⇒ this](#oerrorwithcausecause--this)
|
||||||
* [OError.maxTags : Number](#oerrormaxtags--number)
|
- [OError.maxTags : Number](#oerrormaxtags--number)
|
||||||
* [OError.tag(error, [message], [info]) ⇒ Error](#oerrortagerror-message-info--error)
|
- [OError.tag(error, [message], [info]) ⇒ Error](#oerrortagerror-message-info--error)
|
||||||
* [OError.getFullInfo(error) ⇒ Object](#oerrorgetfullinfoerror--object)
|
- [OError.getFullInfo(error) ⇒ Object](#oerrorgetfullinfoerror--object)
|
||||||
* [OError.getFullStack(error) ⇒ string](#oerrorgetfullstackerror--string)
|
- [OError.getFullStack(error) ⇒ string](#oerrorgetfullstackerror--string)
|
||||||
- [References](#references)
|
- [References](#references)
|
||||||
|
|
||||||
<!-- tocstop -->
|
<!-- tocstop -->
|
||||||
@@ -345,23 +345,24 @@ caused by:
|
|||||||
## OError API Reference
|
## OError API Reference
|
||||||
|
|
||||||
<a name="OError"></a>
|
<a name="OError"></a>
|
||||||
* [OError](#OError)
|
|
||||||
* [new OError(message, [info], [cause])](#new_OError_new)
|
- [OError](#OError)
|
||||||
* _instance_
|
- [new OError(message, [info], [cause])](#new_OError_new)
|
||||||
* [.withInfo(info)](#OError+withInfo) ⇒ <code>this</code>
|
- _instance_
|
||||||
* [.withCause(cause)](#OError+withCause) ⇒ <code>this</code>
|
- [.withInfo(info)](#OError+withInfo) ⇒ <code>this</code>
|
||||||
* _static_
|
- [.withCause(cause)](#OError+withCause) ⇒ <code>this</code>
|
||||||
* [.maxTags](#OError.maxTags) : <code>Number</code>
|
- _static_
|
||||||
* [.tag(error, [message], [info])](#OError.tag) ⇒ <code>Error</code>
|
- [.maxTags](#OError.maxTags) : <code>Number</code>
|
||||||
* [.getFullInfo(error)](#OError.getFullInfo) ⇒ <code>Object</code>
|
- [.tag(error, [message], [info])](#OError.tag) ⇒ <code>Error</code>
|
||||||
* [.getFullStack(error)](#OError.getFullStack) ⇒ <code>string</code>
|
- [.getFullInfo(error)](#OError.getFullInfo) ⇒ <code>Object</code>
|
||||||
|
- [.getFullStack(error)](#OError.getFullStack) ⇒ <code>string</code>
|
||||||
|
|
||||||
<a name="new_OError_new"></a>
|
<a name="new_OError_new"></a>
|
||||||
|
|
||||||
### new OError(message, [info], [cause])
|
### new OError(message, [info], [cause])
|
||||||
|
|
||||||
| Param | Type | Description |
|
| Param | Type | Description |
|
||||||
| --- | --- | --- |
|
| ------- | ------------------- | ----------------------------------------- |
|
||||||
| message | <code>string</code> | as for built-in Error |
|
| message | <code>string</code> | as for built-in Error |
|
||||||
| [info] | <code>Object</code> | extra data to attach to the error |
|
| [info] | <code>Object</code> | extra data to attach to the error |
|
||||||
| [cause] | <code>Error</code> | the internal error that caused this error |
|
| [cause] | <code>Error</code> | the internal error that caused this error |
|
||||||
@@ -369,28 +370,31 @@ caused by:
|
|||||||
<a name="OError+withInfo"></a>
|
<a name="OError+withInfo"></a>
|
||||||
|
|
||||||
### oError.withInfo(info) ⇒ <code>this</code>
|
### oError.withInfo(info) ⇒ <code>this</code>
|
||||||
|
|
||||||
Set the extra info object for this error.
|
Set the extra info object for this error.
|
||||||
|
|
||||||
**Kind**: instance method of [<code>OError</code>](#OError)
|
**Kind**: instance method of [<code>OError</code>](#OError)
|
||||||
|
|
||||||
| Param | Type | Description |
|
| Param | Type | Description |
|
||||||
| --- | --- | --- |
|
| ----- | ------------------- | --------------------------------- |
|
||||||
| info | <code>Object</code> | extra data to attach to the error |
|
| info | <code>Object</code> | extra data to attach to the error |
|
||||||
|
|
||||||
<a name="OError+withCause"></a>
|
<a name="OError+withCause"></a>
|
||||||
|
|
||||||
### oError.withCause(cause) ⇒ <code>this</code>
|
### oError.withCause(cause) ⇒ <code>this</code>
|
||||||
|
|
||||||
Wrap the given error, which caused this error.
|
Wrap the given error, which caused this error.
|
||||||
|
|
||||||
**Kind**: instance method of [<code>OError</code>](#OError)
|
**Kind**: instance method of [<code>OError</code>](#OError)
|
||||||
|
|
||||||
| Param | Type | Description |
|
| Param | Type | Description |
|
||||||
| --- | --- | --- |
|
| ----- | ------------------ | ----------------------------------------- |
|
||||||
| cause | <code>Error</code> | the internal error that caused this error |
|
| cause | <code>Error</code> | the internal error that caused this error |
|
||||||
|
|
||||||
<a name="OError.maxTags"></a>
|
<a name="OError.maxTags"></a>
|
||||||
|
|
||||||
### OError.maxTags : <code>Number</code>
|
### OError.maxTags : <code>Number</code>
|
||||||
|
|
||||||
Maximum number of tags to apply to any one error instance. This is to avoid
|
Maximum number of tags to apply to any one error instance. This is to avoid
|
||||||
a resource leak in the (hopefully unlikely) case that a singleton error
|
a resource leak in the (hopefully unlikely) case that a singleton error
|
||||||
instance is returned to many callbacks. If tags have been dropped, the full
|
instance is returned to many callbacks. If tags have been dropped, the full
|
||||||
@@ -402,6 +406,7 @@ Defaults to 100. Must be at least 1.
|
|||||||
<a name="OError.tag"></a>
|
<a name="OError.tag"></a>
|
||||||
|
|
||||||
### OError.tag(error, [message], [info]) ⇒ <code>Error</code>
|
### OError.tag(error, [message], [info]) ⇒ <code>Error</code>
|
||||||
|
|
||||||
Tag debugging information onto any error (whether an OError or not) and
|
Tag debugging information onto any error (whether an OError or not) and
|
||||||
return it.
|
return it.
|
||||||
|
|
||||||
@@ -409,12 +414,13 @@ return it.
|
|||||||
**Returns**: <code>Error</code> - the modified `error` argument
|
**Returns**: <code>Error</code> - the modified `error` argument
|
||||||
|
|
||||||
| Param | Type | Description |
|
| Param | Type | Description |
|
||||||
| --- | --- | --- |
|
| --------- | ------------------- | ----------------------------------- |
|
||||||
| error | <code>Error</code> | the error to tag |
|
| error | <code>Error</code> | the error to tag |
|
||||||
| [message] | <code>string</code> | message with which to tag `error` |
|
| [message] | <code>string</code> | message with which to tag `error` |
|
||||||
| [info] | <code>Object</code> | extra data with wich to tag `error` |
|
| [info] | <code>Object</code> | extra data with wich to tag `error` |
|
||||||
|
|
||||||
**Example** *(An error in a callback)*
|
**Example** _(An error in a callback)_
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function findUser(name, callback) {
|
function findUser(name, callback) {
|
||||||
fs.readFile('/etc/passwd', (err, data) => {
|
fs.readFile('/etc/passwd', (err, data) => {
|
||||||
@@ -423,13 +429,17 @@ function findUser(name, callback) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
**Example** *(A possible error in a callback)*
|
|
||||||
|
**Example** _(A possible error in a callback)_
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function cleanup(callback) {
|
function cleanup(callback) {
|
||||||
fs.unlink('/tmp/scratch', (err) => callback(err && OError.tag(err)))
|
fs.unlink('/tmp/scratch', err => callback(err && OError.tag(err)))
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
**Example** *(An error with async/await)*
|
|
||||||
|
**Example** _(An error with async/await)_
|
||||||
|
|
||||||
```js
|
```js
|
||||||
async function cleanup() {
|
async function cleanup() {
|
||||||
try {
|
try {
|
||||||
@@ -439,9 +449,11 @@ async function cleanup() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="OError.getFullInfo"></a>
|
<a name="OError.getFullInfo"></a>
|
||||||
|
|
||||||
### OError.getFullInfo(error) ⇒ <code>Object</code>
|
### OError.getFullInfo(error) ⇒ <code>Object</code>
|
||||||
|
|
||||||
The merged info from any `tag`s and causes on the given error.
|
The merged info from any `tag`s and causes on the given error.
|
||||||
|
|
||||||
If an info property is repeated, the last one wins.
|
If an info property is repeated, the last one wins.
|
||||||
@@ -449,20 +461,22 @@ If an info property is repeated, the last one wins.
|
|||||||
**Kind**: static method of [<code>OError</code>](#OError)
|
**Kind**: static method of [<code>OError</code>](#OError)
|
||||||
|
|
||||||
| Param | Type | Description |
|
| Param | Type | Description |
|
||||||
| --- | --- | --- |
|
| ----- | ----------------------------------------------------------------- | ----------------------------------------- |
|
||||||
| error | <code>Error</code> \| <code>null</code> \| <code>undefined</code> | any error (may or may not be an `OError`) |
|
| error | <code>Error</code> \| <code>null</code> \| <code>undefined</code> | any error (may or may not be an `OError`) |
|
||||||
|
|
||||||
<a name="OError.getFullStack"></a>
|
<a name="OError.getFullStack"></a>
|
||||||
|
|
||||||
### OError.getFullStack(error) ⇒ <code>string</code>
|
### OError.getFullStack(error) ⇒ <code>string</code>
|
||||||
|
|
||||||
Return the `stack` property from `error`, including the `stack`s for any
|
Return the `stack` property from `error`, including the `stack`s for any
|
||||||
tagged errors added with `OError.tag` and for any `cause`s.
|
tagged errors added with `OError.tag` and for any `cause`s.
|
||||||
|
|
||||||
**Kind**: static method of [<code>OError</code>](#OError)
|
**Kind**: static method of [<code>OError</code>](#OError)
|
||||||
|
|
||||||
| Param | Type | Description |
|
| Param | Type | Description |
|
||||||
| --- | --- | --- |
|
| ----- | ----------------------------------------------------------------- | ----------------------------------------- |
|
||||||
| error | <code>Error</code> \| <code>null</code> \| <code>undefined</code> | any error (may or may not be an `OError`) |
|
| error | <code>Error</code> \| <code>null</code> \| <code>undefined</code> | any error (may or may not be an `OError`) |
|
||||||
|
|
||||||
<!-- END API REFERENCE -->
|
<!-- END API REFERENCE -->
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|||||||
@@ -20,9 +20,7 @@
|
|||||||
"build": "npm run --silent test",
|
"build": "npm run --silent test",
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
node_modules
|
|
||||||
@@ -4,12 +4,10 @@
|
|||||||
"description": "Module for storing objects in multiple backends, with fallback on 404 to assist migration between them",
|
"description": "Module for storing objects in multiple backends, with fallback on 404 to assist migration between them",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,7 @@
|
|||||||
"description": "Library shared between the editor server and clients.",
|
"description": "Library shared between the editor server and clients.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,10 @@
|
|||||||
"description": "utilities to help working with promises",
|
"description": "utilities to help working with promises",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
@overleaf/settings
|
# @overleaf/settings
|
||||||
===================
|
|
||||||
|
|
||||||
A small module to allow global config settings to be set for all services
|
A small module to allow global config settings to be set for all services
|
||||||
within the Overleaf architecture.
|
within the Overleaf architecture.
|
||||||
|
|
||||||
Settings file location
|
## Settings file location
|
||||||
----------------------
|
|
||||||
|
|
||||||
You can specify a custom location for the settings file by setting the
|
You can specify a custom location for the settings file by setting the
|
||||||
`OVERLEAF_CONFIG` environment variable. E.g.
|
`OVERLEAF_CONFIG` environment variable. E.g.
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,10 @@
|
|||||||
"description": "stream handling utilities",
|
"description": "stream handling utilities",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
"test:unit": "mocha --exit test/**/*.{js,cjs}",
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,7 @@
|
|||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && npm run format && npm run types:check && npm run test:unit",
|
"test": "npm run lint && npm run types:check && npm run test:unit",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
|
|
||||||
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
"lint": "eslint --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
"lint:fix": "eslint --fix --ext .cjs,.js,.jsx,.mjs,.ts .",
|
||||||
"test:ci": "npm run test:unit",
|
"test:ci": "npm run test:unit",
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.backend.json",
|
"extends": "../../tsconfig.backend.json",
|
||||||
"include": [
|
"include": ["**/*.js", "**/*.cjs", "**/*.ts"]
|
||||||
"**/*.js",
|
|
||||||
"**/*.cjs",
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1
-1
@@ -40,6 +40,7 @@
|
|||||||
"patch-package": "^8.0.0"
|
"patch-package": "^8.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@prettier/plugin-pug": "^3.4.0",
|
||||||
"@types/chai": "^4.3.0",
|
"@types/chai": "^4.3.0",
|
||||||
"@types/chai-as-promised": "^7.1.8",
|
"@types/chai-as-promised": "^7.1.8",
|
||||||
"@types/mocha": "^10.0.6",
|
"@types/mocha": "^10.0.6",
|
||||||
@@ -58397,7 +58398,6 @@
|
|||||||
"@pollyjs/adapter-node-http": "^6.0.6",
|
"@pollyjs/adapter-node-http": "^6.0.6",
|
||||||
"@pollyjs/core": "^6.0.6",
|
"@pollyjs/core": "^6.0.6",
|
||||||
"@pollyjs/persister-fs": "^6.0.6",
|
"@pollyjs/persister-fs": "^6.0.6",
|
||||||
"@prettier/plugin-pug": "^3.4.0",
|
|
||||||
"@replit/codemirror-emacs": "overleaf/codemirror-emacs#4394c03858f27053f8768258e9493866e06e938e",
|
"@replit/codemirror-emacs": "overleaf/codemirror-emacs#4394c03858f27053f8768258e9493866e06e938e",
|
||||||
"@replit/codemirror-indentation-markers": "overleaf/codemirror-indentation-markers#371ce3b56f453a392eb0d3b85ab019c185c68e1f",
|
"@replit/codemirror-indentation-markers": "overleaf/codemirror-indentation-markers#371ce3b56f453a392eb0d3b85ab019c185c68e1f",
|
||||||
"@replit/codemirror-vim": "overleaf/codemirror-vim#1bef138382d948018f3f9b8a4d7a70ab61774e4b",
|
"@replit/codemirror-vim": "overleaf/codemirror-vim#1bef138382d948018f3f9b8a4d7a70ab61774e4b",
|
||||||
|
|||||||
+9
-4
@@ -5,6 +5,7 @@
|
|||||||
"patch-package": "^8.0.0"
|
"patch-package": "^8.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@prettier/plugin-pug": "^3.4.0",
|
||||||
"@types/chai": "^4.3.0",
|
"@types/chai": "^4.3.0",
|
||||||
"@types/chai-as-promised": "^7.1.8",
|
"@types/chai-as-promised": "^7.1.8",
|
||||||
"@types/mocha": "^10.0.6",
|
"@types/mocha": "^10.0.6",
|
||||||
@@ -41,10 +42,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.js'",
|
"format:fix": "prettier --write --list-different",
|
||||||
"format:jenkins": "prettier --list-different $PWD/'**/Jenkinsfile'",
|
"format:styles": "prettier --list-different '**/*.{css,scss}'",
|
||||||
"format:jenkins:fix": "prettier --write $PWD/'**/Jenkinsfile'",
|
"format:styles:fix": "prettier --write --list-different '**/*.{css,scss}'",
|
||||||
|
"format:pug": "prettier --list-different '**/*.pug'",
|
||||||
|
"format:pug:fix": "prettier --write --list-different '**/*.pug'",
|
||||||
|
"format:jenkins": "prettier --list-different '**/Jenkinsfile'",
|
||||||
|
"format:jenkins:fix": "prettier --write --list-different '**/Jenkinsfile'",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"postinstall": "patch-package"
|
"postinstall": "patch-package"
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- id: build_base
|
- id: build_base
|
||||||
name: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/cloud-builder
|
name: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/cloud-builder
|
||||||
dir: server-ce
|
dir: server-ce
|
||||||
args:
|
args:
|
||||||
- 'build-base'
|
- "build-base"
|
||||||
- id: tag_main_latest_base
|
- id: tag_main_latest_base
|
||||||
name: gcr.io/cloud-builders/docker
|
name: gcr.io/cloud-builders/docker
|
||||||
script: |
|
script: |
|
||||||
@@ -26,7 +25,7 @@ steps:
|
|||||||
exit 0
|
exit 0
|
||||||
automapSubstitutions: true
|
automapSubstitutions: true
|
||||||
waitFor:
|
waitFor:
|
||||||
- '-'
|
- "-"
|
||||||
- id: build_community
|
- id: build_community
|
||||||
name: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/cloud-builder
|
name: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/cloud-builder
|
||||||
dir: server-ce
|
dir: server-ce
|
||||||
@@ -51,27 +50,27 @@ timeout: 3600s
|
|||||||
options:
|
options:
|
||||||
machineType: E2_HIGHCPU_32
|
machineType: E2_HIGHCPU_32
|
||||||
env:
|
env:
|
||||||
- 'BRANCH_NAME=${BRANCH_NAME}'
|
- "BRANCH_NAME=${BRANCH_NAME}"
|
||||||
# docker build
|
# docker build
|
||||||
- 'OVERLEAF_BASE_BRANCH=${_IMAGE_BASE_BRANCH}'
|
- "OVERLEAF_BASE_BRANCH=${_IMAGE_BASE_BRANCH}"
|
||||||
- 'OVERLEAF_BASE_LATEST=${_IMAGE_BASE_LATEST}'
|
- "OVERLEAF_BASE_LATEST=${_IMAGE_BASE_LATEST}"
|
||||||
- 'OVERLEAF_BASE_TAG=${_IMAGE_BASE}'
|
- "OVERLEAF_BASE_TAG=${_IMAGE_BASE}"
|
||||||
- 'OVERLEAF_BRANCH=${_IMAGE_TAG_BRANCH}'
|
- "OVERLEAF_BRANCH=${_IMAGE_TAG_BRANCH}"
|
||||||
- 'OVERLEAF_LATEST=${_IMAGE_TAG_LATEST}'
|
- "OVERLEAF_LATEST=${_IMAGE_TAG_LATEST}"
|
||||||
- 'OVERLEAF_TAG=${_IMAGE_TAG}'
|
- "OVERLEAF_TAG=${_IMAGE_TAG}"
|
||||||
images:
|
images:
|
||||||
- '${_IMAGE_BASE}'
|
- "${_IMAGE_BASE}"
|
||||||
- '${_IMAGE_BASE_BRANCH}'
|
- "${_IMAGE_BASE_BRANCH}"
|
||||||
- '${_IMAGE_TAG}'
|
- "${_IMAGE_TAG}"
|
||||||
- '${_IMAGE_TAG_BRANCH}'
|
- "${_IMAGE_TAG_BRANCH}"
|
||||||
substitutions:
|
substitutions:
|
||||||
_IMAGE_BASE: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf-base:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}'
|
_IMAGE_BASE: "us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf-base:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}"
|
||||||
_IMAGE_BASE_BRANCH: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf-base:${BRANCH_NAME}'
|
_IMAGE_BASE_BRANCH: "us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf-base:${BRANCH_NAME}"
|
||||||
_IMAGE_BASE_LATEST: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf-base:latest'
|
_IMAGE_BASE_LATEST: "us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf-base:latest"
|
||||||
_IMAGE_TAG_BRANCH: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf:${BRANCH_NAME}'
|
_IMAGE_TAG_BRANCH: "us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf:${BRANCH_NAME}"
|
||||||
_IMAGE_TAG_LATEST: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf:latest'
|
_IMAGE_TAG_LATEST: "us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf:latest"
|
||||||
_IMAGE_TAG: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}'
|
_IMAGE_TAG: "us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}"
|
||||||
tags:
|
tags:
|
||||||
- 'overleaf-public'
|
- "overleaf-public"
|
||||||
- '${BRANCH_NAME}'
|
- "${BRANCH_NAME}"
|
||||||
- '${SHORT_SHA}'
|
- "${SHORT_SHA}"
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
version: '2.2'
|
version: "2.2"
|
||||||
services:
|
services:
|
||||||
sharelatex:
|
sharelatex:
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:80:80"
|
- "127.0.0.1:80:80"
|
||||||
environment:
|
environment:
|
||||||
OVERLEAF_SITE_URL: 'http://localhost'
|
OVERLEAF_SITE_URL: "http://localhost"
|
||||||
|
|
||||||
host-admin:
|
host-admin:
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8081:80"
|
- "127.0.0.1:8081:80"
|
||||||
environment:
|
environment:
|
||||||
NATIVE_CYPRESS: 'true'
|
NATIVE_CYPRESS: "true"
|
||||||
ACCESS_CONTROL_ALLOW_ORIGIN: 'http://localhost'
|
ACCESS_CONTROL_ALLOW_ORIGIN: "http://localhost"
|
||||||
|
|
||||||
saml:
|
saml:
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:8082:80
|
- 127.0.0.1:8082:80
|
||||||
environment:
|
environment:
|
||||||
SAML_BASE_URL_PATH: 'http://localhost:8082/simplesaml/'
|
SAML_BASE_URL_PATH: "http://localhost:8082/simplesaml/"
|
||||||
SAML_TEST_SP_LOCATION: 'http://localhost/saml/callback'
|
SAML_TEST_SP_LOCATION: "http://localhost/saml/callback"
|
||||||
|
|
||||||
mailtrap:
|
mailtrap:
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -10,18 +10,18 @@ services:
|
|||||||
mailtrap:
|
mailtrap:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
environment:
|
environment:
|
||||||
OVERLEAF_SITE_URL: 'http://sharelatex'
|
OVERLEAF_SITE_URL: "http://sharelatex"
|
||||||
OVERLEAF_APP_NAME: E2E test
|
OVERLEAF_APP_NAME: E2E test
|
||||||
OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex?directConnection=true
|
OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex?directConnection=true
|
||||||
OVERLEAF_REDIS_HOST: redis
|
OVERLEAF_REDIS_HOST: redis
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
OVERLEAF_EMAIL_FROM_ADDRESS: 'welcome@example.com'
|
OVERLEAF_EMAIL_FROM_ADDRESS: "welcome@example.com"
|
||||||
OVERLEAF_EMAIL_SMTP_HOST: 'mailtrap'
|
OVERLEAF_EMAIL_SMTP_HOST: "mailtrap"
|
||||||
OVERLEAF_EMAIL_SMTP_PORT: '25'
|
OVERLEAF_EMAIL_SMTP_PORT: "25"
|
||||||
OVERLEAF_EMAIL_SMTP_IGNORE_TLS: 'true'
|
OVERLEAF_EMAIL_SMTP_IGNORE_TLS: "true"
|
||||||
ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
|
ENABLED_LINKED_FILE_TYPES: "project_file,project_output_file"
|
||||||
ENABLE_CONVERSIONS: 'true'
|
ENABLE_CONVERSIONS: "true"
|
||||||
EMAIL_CONFIRMATION_DISABLED: 'true'
|
EMAIL_CONFIRMATION_DISABLED: "true"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: curl --fail http://localhost:3000/status
|
test: curl --fail http://localhost:3000/status
|
||||||
interval: 3s
|
interval: 3s
|
||||||
@@ -31,11 +31,11 @@ services:
|
|||||||
mailtrap:
|
mailtrap:
|
||||||
image: mailtrap
|
image: mailtrap
|
||||||
environment:
|
environment:
|
||||||
MAILTRAP_PASSWORD: 'password-for-mailtrap'
|
MAILTRAP_PASSWORD: "password-for-mailtrap"
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:8.0.11
|
image: mongo:8.0.11
|
||||||
command: '--replSet overleaf'
|
command: "--replSet overleaf"
|
||||||
volumes:
|
volumes:
|
||||||
- ../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
|
- ../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
|
||||||
- ../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
|
- ../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
|
||||||
@@ -129,9 +129,9 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
image: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/saml-test
|
image: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/saml-test
|
||||||
environment:
|
environment:
|
||||||
SAML_TEST_SP_ENTITY_ID: 'sharelatex-test-saml'
|
SAML_TEST_SP_ENTITY_ID: "sharelatex-test-saml"
|
||||||
SAML_BASE_URL_PATH: 'http://saml/simplesaml/'
|
SAML_BASE_URL_PATH: "http://saml/simplesaml/"
|
||||||
SAML_TEST_SP_LOCATION: 'http://sharelatex/saml/callback'
|
SAML_TEST_SP_LOCATION: "http://sharelatex/saml/callback"
|
||||||
|
|
||||||
ldap:
|
ldap:
|
||||||
restart: always
|
restart: always
|
||||||
@@ -140,6 +140,6 @@ services:
|
|||||||
# REF: https://github.com/moby/moby/issues/8231#issuecomment-63877553
|
# REF: https://github.com/moby/moby/issues/8231#issuecomment-63877553
|
||||||
# REF: https://github.com/moby/moby/issues/8231#issuecomment-63871343
|
# REF: https://github.com/moby/moby/issues/8231#issuecomment-63871343
|
||||||
command:
|
command:
|
||||||
- 'bash'
|
- "bash"
|
||||||
- '-c'
|
- "-c"
|
||||||
- 'ulimit -n 1024 && exec bash /run.sh'
|
- "ulimit -n 1024 && exec bash /run.sh"
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"cypress:open": "cypress open --e2e --browser chrome",
|
"cypress:open": "cypress open --e2e --browser chrome",
|
||||||
"cypress:run": "cypress run --e2e --browser chrome",
|
"cypress:run": "cypress run --e2e --browser chrome",
|
||||||
"format": "prettier --list-different $PWD/'**/*.{js,mjs,ts,tsx}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,mjs,ts,tsx}'",
|
|
||||||
"lint": "eslint --max-warnings 0 --format unix --ext .js,.jsx,.mjs,.ts,.tsx .",
|
"lint": "eslint --max-warnings 0 --format unix --ext .js,.jsx,.mjs,.ts,.tsx .",
|
||||||
"lint:fix": "eslint --fix --ext .js,.jsx,.mjs,.ts,.tsx ."
|
"lint:fix": "eslint --fix --ext .js,.jsx,.mjs,.ts,.tsx ."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -52,11 +52,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/chat/reports:/overleaf/services/chat/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/chat/reports:/overleaf/services/chat/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/chat/reports:/overleaf/services/chat/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -77,13 +76,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/chat
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/chat
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/chat
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
overleaf/chat
|
# overleaf/chat
|
||||||
===============
|
|
||||||
|
|
||||||
The backend API that powers the chat service in Overleaf
|
The backend API that powers the chat service in Overleaf
|
||||||
|
|
||||||
License
|
## License
|
||||||
-------
|
|
||||||
|
|
||||||
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
||||||
|
|
||||||
|
|||||||
+56
-56
@@ -3,12 +3,12 @@ x-stoplight:
|
|||||||
id: okoe8mh50pjec
|
id: okoe8mh50pjec
|
||||||
info:
|
info:
|
||||||
title: chat
|
title: chat
|
||||||
version: '1.0'
|
version: "1.0"
|
||||||
servers:
|
servers:
|
||||||
- url: 'http://chat:3010'
|
- url: "http://chat:3010"
|
||||||
x-exegesis-controller: messagesController
|
x-exegesis-controller: messagesController
|
||||||
paths:
|
paths:
|
||||||
'/project/{projectId}/messages':
|
"/project/{projectId}/messages":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -19,14 +19,14 @@ paths:
|
|||||||
summary: Get Global messages
|
summary: Get Global messages
|
||||||
tags: []
|
tags: []
|
||||||
responses:
|
responses:
|
||||||
'201':
|
"201":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Message'
|
$ref: "#/components/schemas/Message"
|
||||||
operationId: getGlobalMessages
|
operationId: getGlobalMessages
|
||||||
description: Get global messages for the project with Project ID provided
|
description: Get global messages for the project with Project ID provided
|
||||||
parameters:
|
parameters:
|
||||||
@@ -42,21 +42,21 @@ paths:
|
|||||||
summary: Send Global message
|
summary: Send Global message
|
||||||
operationId: sendGlobalMessage
|
operationId: sendGlobalMessage
|
||||||
responses:
|
responses:
|
||||||
'201':
|
"201":
|
||||||
description: OK
|
description: OK
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Message'
|
$ref: "#/components/schemas/Message"
|
||||||
examples:
|
examples:
|
||||||
example-1:
|
example-1:
|
||||||
value:
|
value:
|
||||||
user_id: string
|
user_id: string
|
||||||
content: string
|
content: string
|
||||||
description: 'UserID and Content of the message to be posted. '
|
description: "UserID and Content of the message to be posted. "
|
||||||
description: Send global message for the project with Project ID provided
|
description: Send global message for the project with Project ID provided
|
||||||
'/project/{projectId}/messages/{messageId}':
|
"/project/{projectId}/messages/{messageId}":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -72,13 +72,13 @@ paths:
|
|||||||
summary: Get single global message
|
summary: Get single global message
|
||||||
tags: []
|
tags: []
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Message'
|
$ref: "#/components/schemas/Message"
|
||||||
'404':
|
"404":
|
||||||
description: Message not found
|
description: Message not found
|
||||||
operationId: getGlobalMessage
|
operationId: getGlobalMessage
|
||||||
description: Get a single global message by message ID for the project with Project ID provided
|
description: Get a single global message by message ID for the project with Project ID provided
|
||||||
@@ -86,10 +86,10 @@ paths:
|
|||||||
summary: Delete global message
|
summary: Delete global message
|
||||||
operationId: deleteGlobalMessage
|
operationId: deleteGlobalMessage
|
||||||
responses:
|
responses:
|
||||||
'204':
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
description: 'Delete global message'
|
description: "Delete global message"
|
||||||
'/project/{projectId}/thread/{threadId}/messages':
|
"/project/{projectId}/thread/{threadId}/messages":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -105,19 +105,19 @@ paths:
|
|||||||
summary: Send message
|
summary: Send message
|
||||||
operationId: sendMessage
|
operationId: sendMessage
|
||||||
responses:
|
responses:
|
||||||
'201':
|
"201":
|
||||||
description: Created
|
description: Created
|
||||||
description: Add a message to the thread with thread ID provided from the Project with Project ID provided.
|
description: Add a message to the thread with thread ID provided from the Project with Project ID provided.
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Message'
|
$ref: "#/components/schemas/Message"
|
||||||
description: |-
|
description: |-
|
||||||
JSON object with :
|
JSON object with :
|
||||||
- user_id: Id of the user
|
- user_id: Id of the user
|
||||||
- content: Content of the message
|
- content: Content of the message
|
||||||
'/project/{projectId}/threads':
|
"/project/{projectId}/threads":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -128,20 +128,20 @@ paths:
|
|||||||
summary: Get Threads
|
summary: Get Threads
|
||||||
tags: []
|
tags: []
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Thread'
|
$ref: "#/components/schemas/Thread"
|
||||||
examples: {}
|
examples: {}
|
||||||
'404':
|
"404":
|
||||||
description: Not Found
|
description: Not Found
|
||||||
operationId: getThreads
|
operationId: getThreads
|
||||||
description: Get the list of threads for the project with Project ID provided
|
description: Get the list of threads for the project with Project ID provided
|
||||||
'/project/{projectId}/thread/{threadId}/messages/{messageId}/edit':
|
"/project/{projectId}/thread/{threadId}/messages/{messageId}/edit":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -162,9 +162,9 @@ paths:
|
|||||||
summary: Edit message
|
summary: Edit message
|
||||||
operationId: editMessage
|
operationId: editMessage
|
||||||
responses:
|
responses:
|
||||||
'204':
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
'404':
|
"404":
|
||||||
description: Not Found
|
description: Not Found
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
@@ -186,7 +186,7 @@ paths:
|
|||||||
- user_id: Id of the user (optional)
|
- user_id: Id of the user (optional)
|
||||||
description: |
|
description: |
|
||||||
Update message with Message ID provided from the Thread ID and Project ID provided
|
Update message with Message ID provided from the Thread ID and Project ID provided
|
||||||
'/project/{projectId}/messages/{messageId}/edit':
|
"/project/{projectId}/messages/{messageId}/edit":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -202,9 +202,9 @@ paths:
|
|||||||
summary: Edit global message
|
summary: Edit global message
|
||||||
operationId: editGlobalMessage
|
operationId: editGlobalMessage
|
||||||
responses:
|
responses:
|
||||||
'204':
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
'404':
|
"404":
|
||||||
description: Not Found
|
description: Not Found
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
@@ -226,7 +226,7 @@ paths:
|
|||||||
- user_id: Id of the user (optional)
|
- user_id: Id of the user (optional)
|
||||||
description: |
|
description: |
|
||||||
Update global message with Message ID provided from the Project ID provided
|
Update global message with Message ID provided from the Project ID provided
|
||||||
'/project/{projectId}/thread/{threadId}/messages/{messageId}':
|
"/project/{projectId}/thread/{threadId}/messages/{messageId}":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -247,13 +247,13 @@ paths:
|
|||||||
summary: Get thread message
|
summary: Get thread message
|
||||||
tags: []
|
tags: []
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Message'
|
$ref: "#/components/schemas/Message"
|
||||||
'404':
|
"404":
|
||||||
description: Message not found
|
description: Message not found
|
||||||
operationId: getThreadMessage
|
operationId: getThreadMessage
|
||||||
description: Get a specific message by message ID from the thread with Thread ID and Project ID provided
|
description: Get a specific message by message ID from the thread with Thread ID and Project ID provided
|
||||||
@@ -261,10 +261,10 @@ paths:
|
|||||||
summary: Delete message
|
summary: Delete message
|
||||||
operationId: deleteMessage
|
operationId: deleteMessage
|
||||||
responses:
|
responses:
|
||||||
'204':
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
description: 'Delete message with Message ID provided, from the Thread with ThreadID and ProjectID provided'
|
description: "Delete message with Message ID provided, from the Thread with ThreadID and ProjectID provided"
|
||||||
'/project/{projectId}/thread/{threadId}/user/{userId}/messages/{messageId}':
|
"/project/{projectId}/thread/{threadId}/user/{userId}/messages/{messageId}":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -290,9 +290,9 @@ paths:
|
|||||||
summary: Delete message written by a given user
|
summary: Delete message written by a given user
|
||||||
operationId: deleteUserMessage
|
operationId: deleteUserMessage
|
||||||
responses:
|
responses:
|
||||||
'204':
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
'/project/{projectId}/thread/{threadId}/resolve':
|
"/project/{projectId}/thread/{threadId}/resolve":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -308,7 +308,7 @@ paths:
|
|||||||
summary: Resolve Thread
|
summary: Resolve Thread
|
||||||
operationId: resolveThread
|
operationId: resolveThread
|
||||||
responses:
|
responses:
|
||||||
'204':
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
@@ -324,7 +324,7 @@ paths:
|
|||||||
JSON object with :
|
JSON object with :
|
||||||
- user_id: Id of the user.
|
- user_id: Id of the user.
|
||||||
description: Mark Thread with ThreadID and ProjectID provided owned by the user with UserID provided as resolved.
|
description: Mark Thread with ThreadID and ProjectID provided owned by the user with UserID provided as resolved.
|
||||||
'/project/{projectId}/thread/{threadId}/reopen':
|
"/project/{projectId}/thread/{threadId}/reopen":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -340,12 +340,12 @@ paths:
|
|||||||
summary: Reopen Thread
|
summary: Reopen Thread
|
||||||
operationId: reopenThread
|
operationId: reopenThread
|
||||||
responses:
|
responses:
|
||||||
'204':
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
description: |-
|
description: |-
|
||||||
Reopen Thread with ThreadID and ProjectID provided.
|
Reopen Thread with ThreadID and ProjectID provided.
|
||||||
i.e unmark it as resolved.
|
i.e unmark it as resolved.
|
||||||
'/project/{projectId}/thread/{threadId}':
|
"/project/{projectId}/thread/{threadId}":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -361,13 +361,13 @@ paths:
|
|||||||
summary: Get Thread
|
summary: Get Thread
|
||||||
tags: []
|
tags: []
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Thread'
|
$ref: "#/components/schemas/Thread"
|
||||||
'404':
|
"404":
|
||||||
description: Thread not found
|
description: Thread not found
|
||||||
operationId: getThread
|
operationId: getThread
|
||||||
description: Get a thread with ThreadID and ProjectID provided
|
description: Get a thread with ThreadID and ProjectID provided
|
||||||
@@ -375,10 +375,10 @@ paths:
|
|||||||
summary: Delete thread
|
summary: Delete thread
|
||||||
operationId: deleteThread
|
operationId: deleteThread
|
||||||
responses:
|
responses:
|
||||||
'204':
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
description: Delete thread with ThreadID and ProjectID provided
|
description: Delete thread with ThreadID and ProjectID provided
|
||||||
'/project/{projectId}/resolved-thread-ids':
|
"/project/{projectId}/resolved-thread-ids":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -389,9 +389,9 @@ paths:
|
|||||||
summary: Get resolved thread ids
|
summary: Get resolved thread ids
|
||||||
operationId: getResolvedThreadIds
|
operationId: getResolvedThreadIds
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: Resolved thread ids
|
description: Resolved thread ids
|
||||||
'/project/{projectId}':
|
"/project/{projectId}":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -402,15 +402,15 @@ paths:
|
|||||||
summary: Destroy project
|
summary: Destroy project
|
||||||
operationId: destroyProject
|
operationId: destroyProject
|
||||||
responses:
|
responses:
|
||||||
'204':
|
"204":
|
||||||
description: No Content
|
description: No Content
|
||||||
description: 'Delete all threads from Project with Project ID provided, and all messages in those threads.'
|
description: "Delete all threads from Project with Project ID provided, and all messages in those threads."
|
||||||
/status:
|
/status:
|
||||||
get:
|
get:
|
||||||
summary: Check status
|
summary: Check status
|
||||||
tags: []
|
tags: []
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@@ -423,7 +423,7 @@ paths:
|
|||||||
summary: Check status
|
summary: Check status
|
||||||
tags: []
|
tags: []
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@@ -432,7 +432,7 @@ paths:
|
|||||||
description: chat is alive
|
description: chat is alive
|
||||||
operationId: getStatus
|
operationId: getStatus
|
||||||
description: Check that the Chat service is alive
|
description: Check that the Chat service is alive
|
||||||
'/project/{projectId}/duplicate-comment-threads':
|
"/project/{projectId}/duplicate-comment-threads":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -453,7 +453,7 @@ paths:
|
|||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@@ -463,7 +463,7 @@ paths:
|
|||||||
type: object
|
type: object
|
||||||
description: Mapping of old thread ids to their duplicated thread ids
|
description: Mapping of old thread ids to their duplicated thread ids
|
||||||
description: Duplicate a list of comment threads
|
description: Duplicate a list of comment threads
|
||||||
'/project/{projectId}/generate-thread-data':
|
"/project/{projectId}/generate-thread-data":
|
||||||
parameters:
|
parameters:
|
||||||
- schema:
|
- schema:
|
||||||
type: string
|
type: string
|
||||||
@@ -484,7 +484,7 @@ paths:
|
|||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@@ -514,4 +514,4 @@ components:
|
|||||||
id: 0ppt3jw4h5bua
|
id: 0ppt3jw4h5bua
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Message'
|
$ref: "#/components/schemas/Message"
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ services:
|
|||||||
mongo:
|
mongo:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -41,7 +40,6 @@ services:
|
|||||||
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -49,6 +47,7 @@ services:
|
|||||||
- ./:/tmp/build/
|
- ./:/tmp/build/
|
||||||
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:8.0.11
|
image: mongo:8.0.11
|
||||||
command: --replSet overleaf --notablescan
|
command: --replSet overleaf --notablescan
|
||||||
|
|||||||
@@ -62,4 +62,3 @@ services:
|
|||||||
# replica set. This override is not needed when running the setup after
|
# replica set. This override is not needed when running the setup after
|
||||||
# starting up mongo.
|
# starting up mongo.
|
||||||
- mongo:127.0.0.1
|
- mongo:127.0.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
"test:acceptance:_run": "mocha --recursive --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:unit:_run": "mocha --recursive --exit $@ test/unit/js",
|
"test:unit:_run": "mocha --recursive --exit $@ test/unit/js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -52,11 +52,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/clsi/reports:/overleaf/services/clsi/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/clsi/reports:/overleaf/services/clsi/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/clsi/reports:/overleaf/services/clsi/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -77,13 +76,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/clsi
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/clsi
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/clsi
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ services:
|
|||||||
NODE_OPTIONS: "--unhandled-rejections=strict"
|
NODE_OPTIONS: "--unhandled-rejections=strict"
|
||||||
VITEST_NO_CACHE: true
|
VITEST_NO_CACHE: true
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -43,7 +42,6 @@ services:
|
|||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
|
|||||||
@@ -51,4 +51,3 @@ services:
|
|||||||
SANDBOXED_COMPILES_HOST_DIR_COMPILES: $PWD/compiles
|
SANDBOXED_COMPILES_HOST_DIR_COMPILES: $PWD/compiles
|
||||||
SANDBOXED_COMPILES_HOST_DIR_OUTPUT: $PWD/output
|
SANDBOXED_COMPILES_HOST_DIR_OUTPUT: $PWD/output
|
||||||
command: npm run --silent test:acceptance
|
command: npm run --silent test:acceptance
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
"test:unit": "npm run test:unit:_run",
|
"test:unit": "npm run test:unit:_run",
|
||||||
"nodemon": "node --watch app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -52,11 +52,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/contacts/reports:/overleaf/services/contacts/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/contacts/reports:/overleaf/services/contacts/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/contacts/reports:/overleaf/services/contacts/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -77,13 +76,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/contacts
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/contacts
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/contacts
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
overleaf/contacts
|
# overleaf/contacts
|
||||||
===================
|
|
||||||
|
|
||||||
An API for tracking contacts of a user
|
An API for tracking contacts of a user
|
||||||
|
|
||||||
License
|
## License
|
||||||
-------
|
|
||||||
|
|
||||||
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ services:
|
|||||||
mongo:
|
mongo:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -41,7 +40,6 @@ services:
|
|||||||
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -49,6 +47,7 @@ services:
|
|||||||
- ./:/tmp/build/
|
- ./:/tmp/build/
|
||||||
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:8.0.11
|
image: mongo:8.0.11
|
||||||
command: --replSet overleaf --notablescan
|
command: --replSet overleaf --notablescan
|
||||||
|
|||||||
@@ -62,4 +62,3 @@ services:
|
|||||||
# replica set. This override is not needed when running the setup after
|
# replica set. This override is not needed when running the setup after
|
||||||
# starting up mongo.
|
# starting up mongo.
|
||||||
- mongo:127.0.0.1
|
- mongo:127.0.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"nodemon": "node --watch app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -54,11 +54,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/docstore/reports:/overleaf/services/docstore/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/docstore/reports:/overleaf/services/docstore/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/docstore/reports:/overleaf/services/docstore/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -79,13 +78,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/docstore
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/docstore
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/docstore
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
overleaf/docstore
|
# overleaf/docstore
|
||||||
===================
|
|
||||||
|
|
||||||
A CRUD API for storing and updating text documents in projects
|
A CRUD API for storing and updating text documents in projects
|
||||||
|
|
||||||
License
|
## License
|
||||||
-------
|
|
||||||
|
|
||||||
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ services:
|
|||||||
mongo:
|
mongo:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -48,7 +47,6 @@ services:
|
|||||||
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -56,6 +54,7 @@ services:
|
|||||||
- ./:/tmp/build/
|
- ./:/tmp/build/
|
||||||
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:8.0.11
|
image: mongo:8.0.11
|
||||||
command: --replSet overleaf --notablescan
|
command: --replSet overleaf --notablescan
|
||||||
@@ -70,6 +69,7 @@ services:
|
|||||||
# replica set. This override is not needed when running the setup after
|
# replica set. This override is not needed when running the setup after
|
||||||
# starting up mongo.
|
# starting up mongo.
|
||||||
- mongo:127.0.0.1
|
- mongo:127.0.0.1
|
||||||
|
|
||||||
gcs:
|
gcs:
|
||||||
image: fsouza/fake-gcs-server:1.52.3
|
image: fsouza/fake-gcs-server:1.52.3
|
||||||
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
"test:unit": "npm run test:unit:_run",
|
"test:unit": "npm run test:unit:_run",
|
||||||
"nodemon": "node --watch app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -55,11 +55,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/document-updater/reports:/overleaf/services/document-updater/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/document-updater/reports:/overleaf/services/document-updater/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/document-updater/reports:/overleaf/services/document-updater/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -80,13 +79,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/document-updater
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/document-updater
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/document-updater
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
overleaf/document-updater
|
# overleaf/document-updater
|
||||||
===========================
|
|
||||||
|
|
||||||
An API for applying incoming updates to documents in real-time.
|
An API for applying incoming updates to documents in real-time.
|
||||||
|
|
||||||
License
|
## License
|
||||||
-------
|
|
||||||
|
|
||||||
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
||||||
|
|
||||||
Copyright (c) Overleaf, 2014-2019.
|
Copyright (c) Overleaf, 2014-2019.
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,3 @@ This folder contains a modified version of the ShareJS source code, forked from
|
|||||||
The original CoffeeScript code has been decaffeinated to JavaScript, and further modified. Some folders have been removed. See https://github.com/josephg/ShareJS/blob/v0.5.0/src/types/README.md for the original README.
|
The original CoffeeScript code has been decaffeinated to JavaScript, and further modified. Some folders have been removed. See https://github.com/josephg/ShareJS/blob/v0.5.0/src/types/README.md for the original README.
|
||||||
|
|
||||||
The original code, and the current modified code in this directory, are published under the MIT license.
|
The original code, and the current modified code in this directory, are published under the MIT license.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ This directory contains all the operational transform code. Each file defines a
|
|||||||
Most of the types in here are for testing or demonstration. The only types which are sent to the webclient
|
Most of the types in here are for testing or demonstration. The only types which are sent to the webclient
|
||||||
are `text` and `json`.
|
are `text` and `json`.
|
||||||
|
|
||||||
|
|
||||||
# An OT type
|
# An OT type
|
||||||
|
|
||||||
All OT types have the following fields:
|
All OT types have the following fields:
|
||||||
@@ -18,7 +17,6 @@ Given op1, op2, `apply(s, op2, transform(op1, op2, 'left')) == apply(s, op1, tra
|
|||||||
|
|
||||||
Transform and apply must never modify their arguments.
|
Transform and apply must never modify their arguments.
|
||||||
|
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
|
|
||||||
`tp2`: _(bool)_ True if the transform function supports TP2. This allows p2p architectures to work.
|
`tp2`: _(bool)_ True if the transform function supports TP2. This allows p2p architectures to work.
|
||||||
@@ -29,14 +27,12 @@ Optional properties:
|
|||||||
`normalize(op) -> op`: Fix up an op to make it valid. Eg, remove skips of size zero.
|
`normalize(op) -> op`: Fix up an op to make it valid. Eg, remove skips of size zero.
|
||||||
`api`: _(object)_ Set of helper methods which will be mixed in to the client document object for manipulating documents. See below.
|
`api`: _(object)_ Set of helper methods which will be mixed in to the client document object for manipulating documents. See below.
|
||||||
|
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
`count` and `simple` are two trivial OT type definitions if you want to take a look. JSON defines
|
`count` and `simple` are two trivial OT type definitions if you want to take a look. JSON defines
|
||||||
the ot-for-JSON type (see the wiki for documentation) and all the text types define different text
|
the ot-for-JSON type (see the wiki for documentation) and all the text types define different text
|
||||||
implementations. (I still have no idea which one I like the most, and they're fun to write!)
|
implementations. (I still have no idea which one I like the most, and they're fun to write!)
|
||||||
|
|
||||||
|
|
||||||
# API
|
# API
|
||||||
|
|
||||||
Types can also define API functions. These methods are mixed into the client's Doc object when a document is created.
|
Types can also define API functions. These methods are mixed into the client's Doc object when a document is created.
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ services:
|
|||||||
redis_test:
|
redis_test:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -55,7 +54,6 @@ services:
|
|||||||
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -63,6 +61,7 @@ services:
|
|||||||
- ./:/tmp/build/
|
- ./:/tmp/build/
|
||||||
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
redis_test:
|
redis_test:
|
||||||
image: redis:7.4.3
|
image: redis:7.4.3
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|||||||
@@ -83,4 +83,3 @@ services:
|
|||||||
# replica set. This override is not needed when running the setup after
|
# replica set. This override is not needed when running the setup after
|
||||||
# starting up mongo.
|
# starting up mongo.
|
||||||
- mongo:127.0.0.1
|
- mongo:127.0.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
"nodemon": "node --watch app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"benchmark:apply": "node benchmarks/apply",
|
"benchmark:apply": "node benchmarks/apply",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
node_modules
|
|
||||||
@@ -52,11 +52,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/filestore/reports:/overleaf/services/filestore/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/filestore/reports:/overleaf/services/filestore/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/filestore/reports:/overleaf/services/filestore/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -77,13 +76,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/filestore
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/filestore
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/filestore
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
overleaf/filestore
|
# overleaf/filestore
|
||||||
====================
|
|
||||||
|
|
||||||
An API for CRUD operations on binary files stored in S3
|
An API for CRUD operations on binary files stored in S3
|
||||||
|
|
||||||
filestore acts as a proxy between the CLSIs and (currently) Amazon S3 storage, presenting a RESTful HTTP interface to the CLSIs on port 3009 by default. Urls are mapped to node functions in https://github.com/overleaf/filestore/blob/master/app.coffee . URLs are of the form:
|
filestore acts as a proxy between the CLSIs and (currently) Amazon S3 storage, presenting a RESTful HTTP interface to the CLSIs on port 3009 by default. Urls are mapped to node functions in https://github.com/overleaf/filestore/blob/master/app.coffee . URLs are of the form:
|
||||||
|
|
||||||
* `/project/:project_id/file/:file_id`
|
- `/project/:project_id/file/:file_id`
|
||||||
* `/template/:template_id/v/:version/:format`
|
- `/template/:template_id/v/:version/:format`
|
||||||
* `/project/:project_id/public/:public_file_id`
|
- `/project/:project_id/public/:public_file_id`
|
||||||
* `/project/:project_id/size`
|
- `/project/:project_id/size`
|
||||||
* `/bucket/:bucket/key/*`
|
- `/bucket/:bucket/key/*`
|
||||||
* `/shutdown`
|
- `/shutdown`
|
||||||
* `/status` - returns HTTP 200 `filestore is up` or HTTP 503 when shutting down
|
- `/status` - returns HTTP 200 `filestore is up` or HTTP 503 when shutting down
|
||||||
* `/health_check`
|
- `/health_check`
|
||||||
|
|
||||||
License
|
## License
|
||||||
-------
|
|
||||||
|
|
||||||
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ services:
|
|||||||
NODE_OPTIONS: "--unhandled-rejections=strict"
|
NODE_OPTIONS: "--unhandled-rejections=strict"
|
||||||
VITEST_NO_CACHE: true
|
VITEST_NO_CACHE: true
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -29,7 +28,7 @@ services:
|
|||||||
MONGO_HOST: mongo
|
MONGO_HOST: mongo
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
AWS_S3_ENDPOINT: https://minio:9000
|
AWS_S3_ENDPOINT: https://minio:9000
|
||||||
AWS_S3_PATH_STYLE: 'true'
|
AWS_S3_PATH_STYLE: "true"
|
||||||
DELETE_OBJECTS_MD5_FALLBACK: true
|
DELETE_OBJECTS_MD5_FALLBACK: true
|
||||||
AWS_ACCESS_KEY_ID: OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
AWS_ACCESS_KEY_ID: OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
||||||
AWS_SECRET_ACCESS_KEY: OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY
|
AWS_SECRET_ACCESS_KEY: OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY
|
||||||
@@ -64,7 +63,6 @@ services:
|
|||||||
user: node
|
user: node
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -72,6 +70,7 @@ services:
|
|||||||
- ./:/tmp/build/
|
- ./:/tmp/build/
|
||||||
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
certs:
|
certs:
|
||||||
build:
|
build:
|
||||||
dockerfile_inline: |
|
dockerfile_inline: |
|
||||||
@@ -83,7 +82,7 @@ services:
|
|||||||
working_dir: /certs
|
working_dir: /certs
|
||||||
entrypoint: sh
|
entrypoint: sh
|
||||||
command:
|
command:
|
||||||
- '-cex'
|
- "-cex"
|
||||||
- |
|
- |
|
||||||
if [ ! -f private.key ] || [ ! -f public.crt ]; then
|
if [ ! -f private.key ] || [ ! -f public.crt ]; then
|
||||||
/certgen -host minio
|
/certgen -host minio
|
||||||
@@ -115,7 +114,7 @@ services:
|
|||||||
- minio-certs:/root/.mc/certs/CAs
|
- minio-certs:/root/.mc/certs/CAs
|
||||||
entrypoint: sh
|
entrypoint: sh
|
||||||
command:
|
command:
|
||||||
- '-cex'
|
- "-cex"
|
||||||
- |
|
- |
|
||||||
sleep 1
|
sleep 1
|
||||||
mc alias set s3 https://minio:9000 MINIO_ROOT_USER MINIO_ROOT_PASSWORD \
|
mc alias set s3 https://minio:9000 MINIO_ROOT_USER MINIO_ROOT_PASSWORD \
|
||||||
@@ -218,6 +217,7 @@ services:
|
|||||||
mc admin policy create s3 overleaf-filestore policy-filestore.json
|
mc admin policy create s3 overleaf-filestore policy-filestore.json
|
||||||
mc admin policy attach s3 overleaf-filestore \
|
mc admin policy attach s3 overleaf-filestore \
|
||||||
--user=OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
--user=OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
||||||
|
|
||||||
gcs:
|
gcs:
|
||||||
image: fsouza/fake-gcs-server:1.52.3
|
image: fsouza/fake-gcs-server:1.52.3
|
||||||
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ services:
|
|||||||
MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
|
MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
AWS_S3_ENDPOINT: https://minio:9000
|
AWS_S3_ENDPOINT: https://minio:9000
|
||||||
AWS_S3_PATH_STYLE: 'true'
|
AWS_S3_PATH_STYLE: "true"
|
||||||
DELETE_OBJECTS_MD5_FALLBACK: true
|
DELETE_OBJECTS_MD5_FALLBACK: true
|
||||||
AWS_ACCESS_KEY_ID: OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
AWS_ACCESS_KEY_ID: OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
||||||
AWS_SECRET_ACCESS_KEY: OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY
|
AWS_SECRET_ACCESS_KEY: OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY
|
||||||
@@ -85,7 +85,7 @@ services:
|
|||||||
working_dir: /certs
|
working_dir: /certs
|
||||||
entrypoint: sh
|
entrypoint: sh
|
||||||
command:
|
command:
|
||||||
- '-cex'
|
- "-cex"
|
||||||
- |
|
- |
|
||||||
if [ ! -f private.key ] || [ ! -f public.crt ]; then
|
if [ ! -f private.key ] || [ ! -f public.crt ]; then
|
||||||
/certgen -host minio
|
/certgen -host minio
|
||||||
@@ -117,7 +117,7 @@ services:
|
|||||||
- minio-certs:/root/.mc/certs/CAs
|
- minio-certs:/root/.mc/certs/CAs
|
||||||
entrypoint: sh
|
entrypoint: sh
|
||||||
command:
|
command:
|
||||||
- '-cex'
|
- "-cex"
|
||||||
- |
|
- |
|
||||||
sleep 1
|
sleep 1
|
||||||
mc alias set s3 https://minio:9000 MINIO_ROOT_USER MINIO_ROOT_PASSWORD \
|
mc alias set s3 https://minio:9000 MINIO_ROOT_USER MINIO_ROOT_PASSWORD \
|
||||||
@@ -220,6 +220,7 @@ services:
|
|||||||
mc admin policy create s3 overleaf-filestore policy-filestore.json
|
mc admin policy create s3 overleaf-filestore policy-filestore.json
|
||||||
mc admin policy attach s3 overleaf-filestore \
|
mc admin policy attach s3 overleaf-filestore \
|
||||||
--user=OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
--user=OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID
|
||||||
|
|
||||||
gcs:
|
gcs:
|
||||||
image: fsouza/fake-gcs-server:1.52.3
|
image: fsouza/fake-gcs-server:1.52.3
|
||||||
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
"nodemon": "node --watch app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"test:acceptance:_run": "mocha --recursive --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:unit:_run": "vitest --config ./vitest.config.unit.cjs",
|
"test:unit:_run": "vitest --config ./vitest.config.unit.cjs",
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ docker run -v `pwd`/conf/local.json:/conf/runtime.json writelatex-git-bridge
|
|||||||
|
|
||||||
### Required packages
|
### Required packages
|
||||||
|
|
||||||
* `maven` (for building, running tests and packaging)
|
- `maven` (for building, running tests and packaging)
|
||||||
* `jdk-8` (for compiling and running)
|
- `jdk-8` (for compiling and running)
|
||||||
|
|
||||||
### Commands
|
### Commands
|
||||||
|
|
||||||
@@ -114,7 +114,6 @@ The configuration file is in `.json` format.
|
|||||||
|
|
||||||
You have to restart the server for configuration changes to take effect.
|
You have to restart the server for configuration changes to take effect.
|
||||||
|
|
||||||
|
|
||||||
## Creating OAuth app
|
## Creating OAuth app
|
||||||
|
|
||||||
In dev-env, run the following command in mongo to create the oauth application
|
In dev-env, run the following command in mongo to create the oauth application
|
||||||
|
|||||||
@@ -57,11 +57,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/history-v1/reports:/overleaf/services/history-v1/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/history-v1/reports:/overleaf/services/history-v1/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/history-v1/reports:/overleaf/services/history-v1/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -82,13 +81,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/history-v1
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/history-v1
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/history-v1
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
The history service uses knex to manage PostgreSQL migrations.
|
The history service uses knex to manage PostgreSQL migrations.
|
||||||
|
|
||||||
To create a new migrations, run:
|
To create a new migrations, run:
|
||||||
|
|
||||||
```
|
```
|
||||||
npx knex migrate:make migration_name
|
npx knex migrate:make migration_name
|
||||||
```
|
```
|
||||||
|
|
||||||
To apply migrations, run:
|
To apply migrations, run:
|
||||||
|
|
||||||
```
|
```
|
||||||
npx knex migrate:latest
|
npx knex migrate:latest
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ services:
|
|||||||
redis_test:
|
redis_test:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -44,7 +43,7 @@ services:
|
|||||||
MONGO_HOST: mongo
|
MONGO_HOST: mongo
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
AWS_S3_ENDPOINT: https://minio:9000
|
AWS_S3_ENDPOINT: https://minio:9000
|
||||||
AWS_S3_PATH_STYLE: 'true'
|
AWS_S3_PATH_STYLE: "true"
|
||||||
DELETE_OBJECTS_MD5_FALLBACK: true
|
DELETE_OBJECTS_MD5_FALLBACK: true
|
||||||
AWS_ACCESS_KEY_ID: OVERLEAF_HISTORY_S3_ACCESS_KEY_ID
|
AWS_ACCESS_KEY_ID: OVERLEAF_HISTORY_S3_ACCESS_KEY_ID
|
||||||
AWS_SECRET_ACCESS_KEY: OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY
|
AWS_SECRET_ACCESS_KEY: OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY
|
||||||
@@ -79,7 +78,6 @@ services:
|
|||||||
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -87,6 +85,7 @@ services:
|
|||||||
- ./:/tmp/build/
|
- ./:/tmp/build/
|
||||||
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
redis_test:
|
redis_test:
|
||||||
image: redis:7.4.3
|
image: redis:7.4.3
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -108,6 +107,7 @@ services:
|
|||||||
# replica set. This override is not needed when running the setup after
|
# replica set. This override is not needed when running the setup after
|
||||||
# starting up mongo.
|
# starting up mongo.
|
||||||
- mongo:127.0.0.1
|
- mongo:127.0.0.1
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:10
|
image: postgres:10
|
||||||
environment:
|
environment:
|
||||||
@@ -132,7 +132,7 @@ services:
|
|||||||
working_dir: /certs
|
working_dir: /certs
|
||||||
entrypoint: sh
|
entrypoint: sh
|
||||||
command:
|
command:
|
||||||
- '-cex'
|
- "-cex"
|
||||||
- |
|
- |
|
||||||
if [ ! -f private.key ] || [ ! -f public.crt ]; then
|
if [ ! -f private.key ] || [ ! -f public.crt ]; then
|
||||||
/certgen -host minio
|
/certgen -host minio
|
||||||
@@ -164,7 +164,7 @@ services:
|
|||||||
- minio-certs:/root/.mc/certs/CAs
|
- minio-certs:/root/.mc/certs/CAs
|
||||||
entrypoint: sh
|
entrypoint: sh
|
||||||
command:
|
command:
|
||||||
- '-cex'
|
- "-cex"
|
||||||
- |
|
- |
|
||||||
sleep 1
|
sleep 1
|
||||||
mc alias set s3 https://minio:9000 MINIO_ROOT_USER MINIO_ROOT_PASSWORD \
|
mc alias set s3 https://minio:9000 MINIO_ROOT_USER MINIO_ROOT_PASSWORD \
|
||||||
@@ -267,6 +267,7 @@ services:
|
|||||||
mc admin policy create s3 overleaf-history policy-history.json
|
mc admin policy create s3 overleaf-history policy-history.json
|
||||||
mc admin policy attach s3 overleaf-history \
|
mc admin policy attach s3 overleaf-history \
|
||||||
--user=OVERLEAF_HISTORY_S3_ACCESS_KEY_ID
|
--user=OVERLEAF_HISTORY_S3_ACCESS_KEY_ID
|
||||||
|
|
||||||
gcs:
|
gcs:
|
||||||
image: fsouza/fake-gcs-server:1.52.3
|
image: fsouza/fake-gcs-server:1.52.3
|
||||||
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ services:
|
|||||||
MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
|
MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
AWS_S3_ENDPOINT: https://minio:9000
|
AWS_S3_ENDPOINT: https://minio:9000
|
||||||
AWS_S3_PATH_STYLE: 'true'
|
AWS_S3_PATH_STYLE: "true"
|
||||||
DELETE_OBJECTS_MD5_FALLBACK: true
|
DELETE_OBJECTS_MD5_FALLBACK: true
|
||||||
AWS_ACCESS_KEY_ID: OVERLEAF_HISTORY_S3_ACCESS_KEY_ID
|
AWS_ACCESS_KEY_ID: OVERLEAF_HISTORY_S3_ACCESS_KEY_ID
|
||||||
AWS_SECRET_ACCESS_KEY: OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY
|
AWS_SECRET_ACCESS_KEY: OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY
|
||||||
@@ -138,7 +138,7 @@ services:
|
|||||||
working_dir: /certs
|
working_dir: /certs
|
||||||
entrypoint: sh
|
entrypoint: sh
|
||||||
command:
|
command:
|
||||||
- '-cex'
|
- "-cex"
|
||||||
- |
|
- |
|
||||||
if [ ! -f private.key ] || [ ! -f public.crt ]; then
|
if [ ! -f private.key ] || [ ! -f public.crt ]; then
|
||||||
/certgen -host minio
|
/certgen -host minio
|
||||||
@@ -170,7 +170,7 @@ services:
|
|||||||
- minio-certs:/root/.mc/certs/CAs
|
- minio-certs:/root/.mc/certs/CAs
|
||||||
entrypoint: sh
|
entrypoint: sh
|
||||||
command:
|
command:
|
||||||
- '-cex'
|
- "-cex"
|
||||||
- |
|
- |
|
||||||
sleep 1
|
sleep 1
|
||||||
mc alias set s3 https://minio:9000 MINIO_ROOT_USER MINIO_ROOT_PASSWORD \
|
mc alias set s3 https://minio:9000 MINIO_ROOT_USER MINIO_ROOT_PASSWORD \
|
||||||
@@ -273,6 +273,7 @@ services:
|
|||||||
mc admin policy create s3 overleaf-history policy-history.json
|
mc admin policy create s3 overleaf-history policy-history.json
|
||||||
mc admin policy attach s3 overleaf-history \
|
mc admin policy attach s3 overleaf-history \
|
||||||
--user=OVERLEAF_HISTORY_S3_ACCESS_KEY_ID
|
--user=OVERLEAF_HISTORY_S3_ACCESS_KEY_ID
|
||||||
|
|
||||||
gcs:
|
gcs:
|
||||||
image: fsouza/fake-gcs-server:1.52.3
|
image: fsouza/fake-gcs-server:1.52.3
|
||||||
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
command: ["--port=9090", "--scheme=http", "--external-url=http://gcs:9090"]
|
||||||
|
|||||||
@@ -64,8 +64,6 @@
|
|||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"format": "prettier --list-different $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "mocha --recursive --exit $@ test/unit/js",
|
"test:unit:_run": "mocha --recursive --exit $@ test/unit/js",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
Scripts in this directory were used when we cleaned up the global blobs table,
|
Scripts in this directory were used when we cleaned up the global blobs table,
|
||||||
ensuring that it only contained global blobs. The scripts are meant to be run in this order:
|
ensuring that it only contained global blobs. The scripts are meant to be run in this order:
|
||||||
|
|
||||||
* `01-create-blob-hashes-table.sql`
|
- `01-create-blob-hashes-table.sql`
|
||||||
* `02-set-global-flag.sql`
|
- `02-set-global-flag.sql`
|
||||||
* `03-create-global-blobs-table.sql`
|
- `03-create-global-blobs-table.sql`
|
||||||
* `04-swap-global-blob-tables.sql`
|
- `04-swap-global-blob-tables.sql`
|
||||||
|
|
||||||
The `rollback.sql` can be run to reverse the effect of `03-swap-global-blob-tables.sql`.
|
The `rollback.sql` can be run to reverse the effect of `03-swap-global-blob-tables.sql`.
|
||||||
|
|||||||
@@ -53,11 +53,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/notifications/reports:/overleaf/services/notifications/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/notifications/reports:/overleaf/services/notifications/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/notifications/reports:/overleaf/services/notifications/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -78,13 +77,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/notifications
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/notifications
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/notifications
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
overleaf/notifications
|
# overleaf/notifications
|
||||||
===============
|
|
||||||
|
|
||||||
An API for managing user notifications in Overleaf
|
An API for managing user notifications in Overleaf
|
||||||
|
|
||||||
|
# database indexes
|
||||||
database indexes
|
|
||||||
================
|
|
||||||
|
|
||||||
For notification expiry to work, a TTL index on `notifications.expires` must be created:
|
For notification expiry to work, a TTL index on `notifications.expires` must be created:
|
||||||
|
|
||||||
@@ -13,8 +10,8 @@ For notification expiry to work, a TTL index on `notifications.expires` must be
|
|||||||
db.notifications.createIndex({ expires: 1 }, { expireAfterSeconds: 10 })
|
db.notifications.createIndex({ expires: 1 }, { expireAfterSeconds: 10 })
|
||||||
```
|
```
|
||||||
|
|
||||||
License
|
# License
|
||||||
=======
|
|
||||||
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3.
|
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3.
|
||||||
|
|
||||||
Copyright (c) Overleaf, 2016–2019.
|
Copyright (c) Overleaf, 2016–2019.
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ services:
|
|||||||
mongo:
|
mongo:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -44,7 +43,6 @@ services:
|
|||||||
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -52,6 +50,7 @@ services:
|
|||||||
- ./:/tmp/build/
|
- ./:/tmp/build/
|
||||||
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:8.0.11
|
image: mongo:8.0.11
|
||||||
command: --replSet overleaf --notablescan
|
command: --replSet overleaf --notablescan
|
||||||
|
|||||||
@@ -64,4 +64,3 @@ services:
|
|||||||
# replica set. This override is not needed when running the setup after
|
# replica set. This override is not needed when running the setup after
|
||||||
# starting up mongo.
|
# starting up mongo.
|
||||||
- mongo:127.0.0.1
|
- mongo:127.0.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
"test:unit:_run": "vitest --config ./vitest.config.unit.cjs",
|
"test:unit:_run": "vitest --config ./vitest.config.unit.cjs",
|
||||||
"test:unit": "npm run test:unit:_run",
|
"test:unit": "npm run test:unit:_run",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"types:check": "tsc --noEmit",
|
"types:check": "tsc --noEmit",
|
||||||
"nodemon": "node --watch app.ts"
|
"nodemon": "node --watch app.ts"
|
||||||
|
|||||||
@@ -56,11 +56,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/document-updater/app/js/types.ts:/overleaf/services/document-updater/app/js/types.ts --volume $(MONOREPO)/services/project-history/reports:/overleaf/services/project-history/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/document-updater/app/js/types.ts:/overleaf/services/document-updater/app/js/types.ts --volume $(MONOREPO)/services/project-history/reports:/overleaf/services/project-history/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/document-updater/app/js/types.ts:/overleaf/services/document-updater/app/js/types.ts --volume $(MONOREPO)/services/project-history/reports:/overleaf/services/project-history/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -81,13 +80,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/project-history
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/project-history
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/project-history
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
@overleaf/project-history
|
# @overleaf/project-history
|
||||||
==========================
|
|
||||||
|
|
||||||
An API for converting raw editor updates into a compressed and browseable history.
|
An API for converting raw editor updates into a compressed and browseable history.
|
||||||
|
|
||||||
Running project-history
|
## Running project-history
|
||||||
-----------------------
|
|
||||||
|
|
||||||
The app runs natively using npm and Node on the local system:
|
The app runs natively using npm and Node on the local system:
|
||||||
|
|
||||||
@@ -13,8 +11,7 @@ npm install
|
|||||||
npm run start
|
npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
Unit Tests
|
## Unit Tests
|
||||||
----------
|
|
||||||
|
|
||||||
The test suites run in Docker.
|
The test suites run in Docker.
|
||||||
|
|
||||||
@@ -33,8 +30,7 @@ During development it is often useful to only run a subset of tests, which can b
|
|||||||
make test_unit MOCHA_ARGS='--grep=AuthorizationManager'
|
make test_unit MOCHA_ARGS='--grep=AuthorizationManager'
|
||||||
```
|
```
|
||||||
|
|
||||||
Acceptance Tests
|
## Acceptance Tests
|
||||||
----------------
|
|
||||||
|
|
||||||
Acceptance tests are run against a live service, which runs in the `acceptance_test` container defined in `docker-compose.tests.yml`.
|
Acceptance tests are run against a live service, which runs in the `acceptance_test` container defined in `docker-compose.tests.yml`.
|
||||||
|
|
||||||
@@ -61,8 +57,7 @@ During development it is often useful to only run a subset of tests, which can b
|
|||||||
make test_acceptance_run MOCHA_ARGS='--grep=AuthorizationManager'
|
make test_acceptance_run MOCHA_ARGS='--grep=AuthorizationManager'
|
||||||
```
|
```
|
||||||
|
|
||||||
Makefile and npm scripts
|
## Makefile and npm scripts
|
||||||
------------------------
|
|
||||||
|
|
||||||
The commands used to compile the app and tests, to run the mocha tests, and to run the app are all in `package.json`. These commands call out to `coffee`, `mocha`, etc which are available to `npm` in the local `node_modules/.bin` directory, using the local versions. Normally, these commands should not be run directly, but instead run in docker via make.
|
The commands used to compile the app and tests, to run the mocha tests, and to run the app are all in `package.json`. These commands call out to `coffee`, `mocha`, etc which are available to `npm` in the local `node_modules/.bin` directory, using the local versions. Normally, these commands should not be run directly, but instead run in docker via make.
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ services:
|
|||||||
redis_test:
|
redis_test:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -55,7 +54,6 @@ services:
|
|||||||
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
build: .
|
build: .
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
@@ -63,6 +61,7 @@ services:
|
|||||||
- ./:/tmp/build/
|
- ./:/tmp/build/
|
||||||
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
redis_test:
|
redis_test:
|
||||||
image: redis:7.4.3
|
image: redis:7.4.3
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|||||||
@@ -83,4 +83,3 @@ services:
|
|||||||
# replica set. This override is not needed when running the setup after
|
# replica set. This override is not needed when running the setup after
|
||||||
# starting up mongo.
|
# starting up mongo.
|
||||||
- mongo:127.0.0.1
|
- mongo:127.0.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
"test:acceptance:_run": "mocha --loader=esmock --recursive --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --loader=esmock --recursive --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:unit:_run": "mocha --loader=esmock --recursive --exit $@ test/unit/js",
|
"test:unit:_run": "mocha --loader=esmock --recursive --exit $@ test/unit/js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"format:fix": "prettier --write $PWD/'**/{*.*js,*.ts}'",
|
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"types:check": "tsc --noEmit"
|
"types:check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,17 +21,11 @@
|
|||||||
"operations": [
|
"operations": [
|
||||||
{
|
{
|
||||||
"pathname": "main.tex",
|
"pathname": "main.tex",
|
||||||
"textOperation": [
|
"textOperation": [1912, "Hello world", 18726]
|
||||||
1912,
|
|
||||||
"Hello world",
|
|
||||||
18726
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timestamp": "2017-12-04T10:23:35.633Z",
|
"timestamp": "2017-12-04T10:23:35.633Z",
|
||||||
"authors": [
|
"authors": [31]
|
||||||
31
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"operations": [
|
"operations": [
|
||||||
@@ -41,24 +35,17 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timestamp": "2017-12-04T10:27:26.874Z",
|
"timestamp": "2017-12-04T10:27:26.874Z",
|
||||||
"authors": [
|
"authors": [31]
|
||||||
31
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"operations": [
|
"operations": [
|
||||||
{
|
{
|
||||||
"pathname": "foo.tex",
|
"pathname": "foo.tex",
|
||||||
"textOperation": [
|
"textOperation": [26, "\n\nFour five six"]
|
||||||
26,
|
|
||||||
"\n\nFour five six"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timestamp": "2017-12-04T10:28:33.724Z",
|
"timestamp": "2017-12-04T10:28:33.724Z",
|
||||||
"authors": [
|
"authors": [31]
|
||||||
31
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,32 +21,21 @@
|
|||||||
"operations": [
|
"operations": [
|
||||||
{
|
{
|
||||||
"pathname": "foo.tex",
|
"pathname": "foo.tex",
|
||||||
"textOperation": [
|
"textOperation": [41, "\n\nSeven eight nince"]
|
||||||
41,
|
|
||||||
"\n\nSeven eight nince"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timestamp": "2017-12-04T10:29:17.786Z",
|
"timestamp": "2017-12-04T10:29:17.786Z",
|
||||||
"authors": [
|
"authors": [31]
|
||||||
31
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"operations": [
|
"operations": [
|
||||||
{
|
{
|
||||||
"pathname": "foo.tex",
|
"pathname": "foo.tex",
|
||||||
"textOperation": [
|
"textOperation": [58, -1, 1]
|
||||||
58,
|
|
||||||
-1,
|
|
||||||
1
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timestamp": "2017-12-04T10:29:22.905Z",
|
"timestamp": "2017-12-04T10:29:22.905Z",
|
||||||
"authors": [
|
"authors": [31]
|
||||||
31
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"operations": [
|
"operations": [
|
||||||
@@ -56,9 +45,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timestamp": "2017-12-04T10:29:26.120Z",
|
"timestamp": "2017-12-04T10:29:26.120Z",
|
||||||
"authors": [
|
"authors": [31]
|
||||||
31
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,33 +21,21 @@
|
|||||||
"operations": [
|
"operations": [
|
||||||
{
|
{
|
||||||
"pathname": "main.tex",
|
"pathname": "main.tex",
|
||||||
"textOperation": [
|
"textOperation": [1923, " also updated", 18726]
|
||||||
1923,
|
|
||||||
" also updated",
|
|
||||||
18726
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timestamp": "2017-12-04T10:32:47.277Z",
|
"timestamp": "2017-12-04T10:32:47.277Z",
|
||||||
"authors": [
|
"authors": [31]
|
||||||
31
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"operations": [
|
"operations": [
|
||||||
{
|
{
|
||||||
"pathname": "bar.tex",
|
"pathname": "bar.tex",
|
||||||
"textOperation": [
|
"textOperation": [28, -15, 16]
|
||||||
28,
|
|
||||||
-15,
|
|
||||||
16
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timestamp": "2017-12-04T10:32:52.877Z",
|
"timestamp": "2017-12-04T10:32:52.877Z",
|
||||||
"v2Authors": [
|
"v2Authors": ["5a5637efdac84e81b71014c4"]
|
||||||
"5a5637efdac84e81b71014c4"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -51,11 +51,10 @@ clean:
|
|||||||
# Run the linting commands in the scope of the monorepo.
|
# Run the linting commands in the scope of the monorepo.
|
||||||
# Eslint and prettier (plus some configs) are on the root.
|
# Eslint and prettier (plus some configs) are on the root.
|
||||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:24.13.0 npm run --silent
|
||||||
|
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
||||||
|
|
||||||
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/real-time/reports:/overleaf/services/real-time/reports $(IMAGE_CI) npm run --silent
|
RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/real-time/reports:/overleaf/services/real-time/reports $(IMAGE_CI) npm run --silent
|
||||||
|
RUN_LINTING_CI_MONOREPO = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/real-time/reports:/overleaf/services/real-time/reports -w /overleaf $(IMAGE_CI) npm run --silent
|
||||||
# Same but from the top of the monorepo
|
|
||||||
RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:24.13.0 npm run --silent
|
|
||||||
|
|
||||||
SHELLCHECK_OPTS = \
|
SHELLCHECK_OPTS = \
|
||||||
--shell=bash \
|
--shell=bash \
|
||||||
@@ -76,13 +75,13 @@ shellcheck_fix:
|
|||||||
done
|
done
|
||||||
|
|
||||||
format:
|
format:
|
||||||
$(RUN_LINTING) format
|
$(RUN_LINTING_MONOREPO) format -- services/real-time
|
||||||
|
|
||||||
format_ci:
|
format_ci:
|
||||||
$(RUN_LINTING_CI) format
|
$(RUN_LINTING_CI_MONOREPO) format -- services/real-time
|
||||||
|
|
||||||
format_fix:
|
format_fix:
|
||||||
$(RUN_LINTING) format:fix
|
$(RUN_LINTING_MONOREPO) format:fix -- services/real-time
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(RUN_LINTING) lint
|
$(RUN_LINTING) lint
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user