diff --git a/develop/docker-compose.dev.yml b/develop/docker-compose.dev.yml index ae283b6b42..90ca30c7ca 100644 --- a/develop/docker-compose.dev.yml +++ b/develop/docker-compose.dev.yml @@ -1,8 +1,8 @@ services: clsi: - command: ["npm", "run", "nodemon"] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9230:9229" volumes: @@ -11,9 +11,9 @@ services: - ../services/clsi/config:/overleaf/services/clsi/config chat: - command: ["npm", "run", "nodemon"] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9231:9229" volumes: @@ -22,9 +22,9 @@ services: - ../services/chat/config:/overleaf/services/chat/config contacts: - command: ["npm", "run", "nodemon"] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9232:9229" volumes: @@ -33,9 +33,9 @@ services: - ../services/contacts/config:/overleaf/services/contacts/config docstore: - command: ["npm", "run", "nodemon"] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9233:9229" volumes: @@ -44,9 +44,9 @@ services: - ../services/docstore/config:/overleaf/services/docstore/config document-updater: - command: ["npm", "run", "nodemon"] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9234:9229" volumes: @@ -55,9 +55,9 @@ services: - ../services/document-updater/config:/overleaf/services/document-updater/config filestore: - command: ["npm", "run", "nodemon"] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9235:9229" volumes: @@ -66,9 +66,9 @@ services: - ../services/filestore/config:/overleaf/services/filestore/config history-v1: - command: [ "npm", "run", "nodemon" ] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9239:9229" volumes: @@ -80,9 +80,9 @@ services: - ../services/history-v1/migrations:/overleaf/services/history-v1/migrations notifications: - command: ["npm", "run", "nodemon"] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9236:9229" volumes: @@ -91,9 +91,9 @@ services: - ../services/notifications/config:/overleaf/services/notifications/config project-history: - command: [ "npm", "run", "nodemon" ] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9240:9229" volumes: @@ -102,9 +102,9 @@ services: - ../services/project-history/config:/overleaf/services/project-history/config real-time: - command: ["npm", "run", "nodemon"] + command: ["node", "--watch", "app.js"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9237:9229" volumes: @@ -113,9 +113,9 @@ services: - ../services/real-time/config:/overleaf/services/real-time/config web: - command: ["npm", "run", "nodemon"] + command: ["node", "--watch", "app.js", "--watch-locales"] environment: - - NODE_APP_OPTIONS=--inspect=0.0.0.0:9229 + - NODE_OPTIONS=--inspect=0.0.0.0:9229 ports: - "127.0.0.1:9229:9229" volumes: diff --git a/libraries/access-token-encryptor/buildscript.txt b/libraries/access-token-encryptor/buildscript.txt index 3d50b8074b..cb43c020a1 100644 --- a/libraries/access-token-encryptor/buildscript.txt +++ b/libraries/access-token-encryptor/buildscript.txt @@ -7,4 +7,4 @@ access-token-encryptor --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/fetch-utils/buildscript.txt b/libraries/fetch-utils/buildscript.txt index fd9cfb51ed..7372565deb 100644 --- a/libraries/fetch-utils/buildscript.txt +++ b/libraries/fetch-utils/buildscript.txt @@ -7,4 +7,4 @@ fetch-utils --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/logger/buildscript.txt b/libraries/logger/buildscript.txt index 960b859bac..b17f20c121 100644 --- a/libraries/logger/buildscript.txt +++ b/libraries/logger/buildscript.txt @@ -7,4 +7,4 @@ logger --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/metrics/buildscript.txt b/libraries/metrics/buildscript.txt index cb2df44189..449aa3b088 100644 --- a/libraries/metrics/buildscript.txt +++ b/libraries/metrics/buildscript.txt @@ -7,4 +7,4 @@ metrics --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/o-error/buildscript.txt b/libraries/o-error/buildscript.txt index 6d79c8f006..1a65c311f1 100644 --- a/libraries/o-error/buildscript.txt +++ b/libraries/o-error/buildscript.txt @@ -7,4 +7,4 @@ o-error --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/object-persistor/buildscript.txt b/libraries/object-persistor/buildscript.txt index 71848b82a6..f8fe69acb1 100644 --- a/libraries/object-persistor/buildscript.txt +++ b/libraries/object-persistor/buildscript.txt @@ -7,4 +7,4 @@ object-persistor --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/overleaf-editor-core/buildscript.txt b/libraries/overleaf-editor-core/buildscript.txt index d1879e8fec..740a91329c 100644 --- a/libraries/overleaf-editor-core/buildscript.txt +++ b/libraries/overleaf-editor-core/buildscript.txt @@ -7,4 +7,4 @@ overleaf-editor-core --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/promise-utils/buildscript.txt b/libraries/promise-utils/buildscript.txt index 2b2bbc3db6..c7d4c7d9f8 100644 --- a/libraries/promise-utils/buildscript.txt +++ b/libraries/promise-utils/buildscript.txt @@ -7,4 +7,4 @@ promise-utils --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/ranges-tracker/buildscript.txt b/libraries/ranges-tracker/buildscript.txt index 5d3f722d97..b5ffbadfef 100644 --- a/libraries/ranges-tracker/buildscript.txt +++ b/libraries/ranges-tracker/buildscript.txt @@ -7,4 +7,4 @@ ranges-tracker --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/redis-wrapper/buildscript.txt b/libraries/redis-wrapper/buildscript.txt index aa4ab4014d..d49cc41009 100644 --- a/libraries/redis-wrapper/buildscript.txt +++ b/libraries/redis-wrapper/buildscript.txt @@ -7,4 +7,4 @@ redis-wrapper --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/settings/buildscript.txt b/libraries/settings/buildscript.txt index b9c4a9b1ec..c5d3620cc7 100644 --- a/libraries/settings/buildscript.txt +++ b/libraries/settings/buildscript.txt @@ -7,4 +7,4 @@ settings --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/libraries/stream-utils/buildscript.txt b/libraries/stream-utils/buildscript.txt index 6db72ce06b..7cb5655bb3 100644 --- a/libraries/stream-utils/buildscript.txt +++ b/libraries/stream-utils/buildscript.txt @@ -7,4 +7,4 @@ stream-utils --is-library=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/chat/buildscript.txt b/services/chat/buildscript.txt index 4e50f224df..38f0aef369 100644 --- a/services/chat/buildscript.txt +++ b/services/chat/buildscript.txt @@ -6,4 +6,4 @@ chat --esmock-loader=False --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/chat/package.json b/services/chat/package.json index adb8535d22..2b4a3ab14f 100644 --- a/services/chat/package.json +++ b/services/chat/package.json @@ -5,10 +5,10 @@ "main": "app.js", "type": "module", "scripts": { - "start": "node $NODE_APP_OPTIONS app.js", + "start": "node app.js", "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "nodemon": "node --watch app.js", "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js", "lint": "eslint --max-warnings 0 --format unix .", diff --git a/services/clsi/buildscript.txt b/services/clsi/buildscript.txt index 09856a8f4b..b5a67efc95 100644 --- a/services/clsi/buildscript.txt +++ b/services/clsi/buildscript.txt @@ -8,4 +8,4 @@ clsi --has-custom-cloudbuild=True --node-version=18.18.2 --public-repo=True ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/clsi/package.json b/services/clsi/package.json index b78357be1c..448229cc48 100644 --- a/services/clsi/package.json +++ b/services/clsi/package.json @@ -4,12 +4,12 @@ "private": true, "main": "app.js", "scripts": { - "start": "node $NODE_APP_OPTIONS app.js", + "start": "node app.js", "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "nodemon": "node --watch app.js", "lint": "eslint --max-warnings 0 --format unix .", "format": "prettier --list-different $PWD/'**/*.js'", "format:fix": "prettier --write $PWD/'**/*.js'", diff --git a/services/contacts/buildscript.txt b/services/contacts/buildscript.txt index c4ed3cead2..6cdc24dec6 100644 --- a/services/contacts/buildscript.txt +++ b/services/contacts/buildscript.txt @@ -6,4 +6,4 @@ contacts --esmock-loader=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/contacts/package.json b/services/contacts/package.json index 618ec9b59c..c158776cef 100644 --- a/services/contacts/package.json +++ b/services/contacts/package.json @@ -5,12 +5,12 @@ "type": "module", "main": "app.js", "scripts": { - "start": "node $NODE_APP_OPTIONS app.js", + "start": "node app.js", "test:acceptance:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec $@ test/unit/js", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "nodemon": "node --watch app.js", "lint": "eslint --max-warnings 0 --format unix .", "format": "prettier --list-different $PWD/'**/*.js'", "format:fix": "prettier --write $PWD/'**/*.js'", diff --git a/services/docstore/buildscript.txt b/services/docstore/buildscript.txt index 9ad2ba5eed..2275d15917 100644 --- a/services/docstore/buildscript.txt +++ b/services/docstore/buildscript.txt @@ -6,4 +6,4 @@ docstore --esmock-loader=False --node-version=18.18.2 --public-repo=True ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/docstore/package.json b/services/docstore/package.json index c52f7f13eb..030baf0fdd 100644 --- a/services/docstore/package.json +++ b/services/docstore/package.json @@ -4,12 +4,12 @@ "private": true, "main": "app.js", "scripts": { - "start": "node $NODE_APP_OPTIONS app.js", + "start": "node app.js", "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "nodemon": "node --watch app.js", "lint": "eslint --max-warnings 0 --format unix .", "format": "prettier --list-different $PWD/'**/*.js'", "format:fix": "prettier --write $PWD/'**/*.js'", diff --git a/services/document-updater/app.js b/services/document-updater/app.js index 6d21490b98..901a4eea8e 100644 --- a/services/document-updater/app.js +++ b/services/document-updater/app.js @@ -217,7 +217,7 @@ const shutdownCleanly = signal => () => { setTimeout(() => { logger.info({ signal }, 'shutting down') process.exit() - }, 10000) + }, Settings.delayShutdownMs) } const watchForEvent = eventName => { diff --git a/services/document-updater/buildscript.txt b/services/document-updater/buildscript.txt index a296eafcbe..924ba94229 100644 --- a/services/document-updater/buildscript.txt +++ b/services/document-updater/buildscript.txt @@ -6,4 +6,4 @@ document-updater --esmock-loader=False --node-version=18.18.2 --public-repo=True ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/document-updater/config/settings.defaults.js b/services/document-updater/config/settings.defaults.js index 0bcd90ab28..27857821f8 100755 --- a/services/document-updater/config/settings.defaults.js +++ b/services/document-updater/config/settings.defaults.js @@ -166,4 +166,5 @@ module.exports = { continuousBackgroundFlush: process.env.CONTINUOUS_BACKGROUND_FLUSH === 'true', smoothingOffset: process.env.SMOOTHING_OFFSET || 1000, // milliseconds + delayShutdownMs: parseInt(process.env.DELAY_SHUTDOWN_MS || '10000', 10), } diff --git a/services/document-updater/package.json b/services/document-updater/package.json index 751b9bc114..f1c86b2897 100644 --- a/services/document-updater/package.json +++ b/services/document-updater/package.json @@ -4,13 +4,13 @@ "private": true, "main": "app.js", "scripts": { - "start": "node $NODE_APP_OPTIONS app.js", + "start": "node app.js", "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", + "nodemon": "node --watch app.js", "benchmark:apply": "node benchmarks/apply", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", "lint": "eslint --max-warnings 0 --format unix .", "format": "prettier --list-different $PWD/'**/*.js'", "format:fix": "prettier --write $PWD/'**/*.js'", diff --git a/services/filestore/buildscript.txt b/services/filestore/buildscript.txt index a240e963e9..3e1f4160a2 100644 --- a/services/filestore/buildscript.txt +++ b/services/filestore/buildscript.txt @@ -7,4 +7,4 @@ filestore --esmock-loader=False --node-version=18.18.2 --public-repo=True ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/filestore/package.json b/services/filestore/package.json index 25e8837a02..525329b8a5 100644 --- a/services/filestore/package.json +++ b/services/filestore/package.json @@ -8,8 +8,8 @@ "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit:run": "mocha --recursive --reporter spec $@ test/unit/js", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", - "start": "node $NODE_APP_OPTIONS app.js", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "start": "node app.js", + "nodemon": "node --watch app.js", "lint": "eslint --max-warnings 0 --format unix .", "format": "prettier --list-different $PWD/'**/*.js'", "format:fix": "prettier --write $PWD/'**/*.js'", diff --git a/services/history-v1/buildscript.txt b/services/history-v1/buildscript.txt index c52b676609..06c854c869 100644 --- a/services/history-v1/buildscript.txt +++ b/services/history-v1/buildscript.txt @@ -6,4 +6,4 @@ history-v1 --esmock-loader=False --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/history-v1/package.json b/services/history-v1/package.json index 6e4ceac239..2abf0e4246 100644 --- a/services/history-v1/package.json +++ b/services/history-v1/package.json @@ -49,7 +49,7 @@ "yauzl": "^2.9.1" }, "scripts": { - "start": "node $NODE_APP_OPTIONS app.js", + "start": "node app.js", "lint": "eslint --max-warnings 0 --format unix .", "lint:fix": "eslint --fix .", "format": "prettier --list-different $PWD/'**/*.js'", @@ -58,7 +58,7 @@ "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js", "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "nodemon": "node --watch app.js", "migrate": "knex migrate:latest", "delete_old_chunks": "node storage/tasks/delete_old_chunks.js", "fix_duplicate_versions": "node storage/tasks/fix_duplicate_versions.js", diff --git a/services/notifications/buildscript.txt b/services/notifications/buildscript.txt index e526a98cbb..bc5001321d 100644 --- a/services/notifications/buildscript.txt +++ b/services/notifications/buildscript.txt @@ -6,4 +6,4 @@ notifications --esmock-loader=False --node-version=18.18.2 --public-repo=True ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/notifications/package.json b/services/notifications/package.json index a088d306a4..9d2b7e1d74 100644 --- a/services/notifications/package.json +++ b/services/notifications/package.json @@ -4,12 +4,12 @@ "private": true, "main": "app.js", "scripts": { - "start": "node $NODE_APP_OPTIONS app.js", + "start": "node app.js", "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "nodemon": "node --watch app.js", "lint": "eslint --max-warnings 0 --format unix .", "format": "prettier --list-different $PWD/'**/*.js'", "format:fix": "prettier --write $PWD/'**/*.js'", diff --git a/services/project-history/buildscript.txt b/services/project-history/buildscript.txt index b7ce994c47..fbefb06425 100644 --- a/services/project-history/buildscript.txt +++ b/services/project-history/buildscript.txt @@ -6,4 +6,4 @@ project-history --esmock-loader=True --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/project-history/package.json b/services/project-history/package.json index 960891738c..9584a3bd2f 100644 --- a/services/project-history/package.json +++ b/services/project-history/package.json @@ -7,8 +7,8 @@ "scripts": { "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", - "start": "node $NODE_APP_OPTIONS app.js", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "start": "node app.js", + "nodemon": "node --watch app.js", "test:acceptance:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:unit:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec $@ test/unit/js", "lint": "eslint --max-warnings 0 --format unix .", diff --git a/services/real-time/buildscript.txt b/services/real-time/buildscript.txt index 1f1f9bca29..d72cf150da 100644 --- a/services/real-time/buildscript.txt +++ b/services/real-time/buildscript.txt @@ -6,4 +6,4 @@ real-time --esmock-loader=False --node-version=18.18.2 --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/real-time/package.json b/services/real-time/package.json index 067749ad87..f538680268 100644 --- a/services/real-time/package.json +++ b/services/real-time/package.json @@ -4,12 +4,12 @@ "private": true, "main": "app.js", "scripts": { - "start": "node $NODE_APP_OPTIONS app.js", + "start": "node app.js", "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js", "test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "nodemon": "node --watch app.js", "lint": "eslint --max-warnings 0 --format unix .", "format": "prettier --list-different $PWD/'**/*.js'", "format:fix": "prettier --write $PWD/'**/*.js'", diff --git a/services/spelling/app.js b/services/spelling/app.js index 239f2151e4..dba0a0a1e0 100644 --- a/services/spelling/app.js +++ b/services/spelling/app.js @@ -5,6 +5,7 @@ import Settings from '@overleaf/settings' import logger from '@overleaf/logger' import { app } from './app/js/server.js' import * as ASpell from './app/js/ASpell.js' +import Metrics from '@overleaf/metrics' const { host = 'localhost', port = 3005 } = Settings.internal?.spelling ?? {} @@ -21,5 +22,6 @@ process.on('SIGTERM', () => { ASpell.stopCacheDump() server.close(() => { logger.info({ host, port }, 'spelling HTTP server closed') + Metrics.close() }) }) diff --git a/services/spelling/buildscript.txt b/services/spelling/buildscript.txt index 53197b099b..0d1f048af8 100644 --- a/services/spelling/buildscript.txt +++ b/services/spelling/buildscript.txt @@ -7,4 +7,4 @@ spelling --esmock-loader=True --node-version=18.18.2-buster --public-repo=False ---script-version=4.4.0 +--script-version=4.5.0 diff --git a/services/spelling/package.json b/services/spelling/package.json index a99d9733af..c6b69ddd1c 100644 --- a/services/spelling/package.json +++ b/services/spelling/package.json @@ -6,7 +6,7 @@ "type": "module", "scripts": { "compile:app": "([ -e app/coffee ] && coffee -m $COFFEE_OPTIONS -o app/js -c app/coffee || echo 'No CoffeeScript folder to compile') && ( [ -e app.coffee ] && coffee -m $COFFEE_OPTIONS -c app.coffee || echo 'No CoffeeScript app to compile')", - "start": "node $NODE_APP_OPTIONS app.js", + "start": "node app.js", "test:acceptance:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP", "test:unit:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec $@ test/unit/js", @@ -14,7 +14,7 @@ "compile:unit_tests": "[ ! -e test/unit/coffee ] && echo 'No unit tests to compile' || coffee -o test/unit/js -c test/unit/coffee", "compile:acceptance_tests": "[ ! -e test/acceptance/coffee ] && echo 'No acceptance tests to compile' || coffee -o test/acceptance/js -c test/acceptance/coffee", "compile:all": "npm run compile:app && npm run compile:unit_tests && npm run compile:acceptance_tests && npm run compile:smoke_tests", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js", + "nodemon": "node --watch app.js", "compile:smoke_tests": "[ ! -e test/smoke/coffee ] && echo 'No smoke tests to compile' || coffee -o test/smoke/js -c test/smoke/coffee", "lint": "eslint --max-warnings 0 --format unix .", "format": "prettier --list-different $PWD/'**/*.js'", diff --git a/services/web/package.json b/services/web/package.json index 89d2a4ad57..1777a9f5e8 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -15,8 +15,8 @@ "test:unit:app": "npm run test:unit:run_dir -- test/unit/src", "test:frontend": "NODE_ENV=test TZ=GMT mocha --recursive --timeout 5000 --exit --extension js,jsx,mjs,ts,tsx --grep=$MOCHA_GREP --require test/frontend/bootstrap.js --ignore '**/*.spec.{js,jsx,ts,tsx}' test/frontend modules/*/test/frontend", "test:frontend:coverage": "c8 --all --include 'frontend/js' --include 'modules/*/frontend/js' --exclude 'frontend/js/vendor' --reporter=lcov --reporter=text-summary npm run test:frontend", - "start": "node $NODE_APP_OPTIONS app.js", - "nodemon": "node --watch $NODE_APP_OPTIONS app.js --watch-locales", + "start": "node app.js", + "nodemon": "node --watch app.js --watch-locales", "webpack": "webpack serve --config webpack.config.dev.js", "webpack:production": "webpack --config webpack.config.prod.js", "webpack:profile": "webpack --config webpack.config.prod.js --profile --json > stats.json",