Merge pull request #6542 from overleaf/jpa-em-code-sharing-workspaces

[misc] npm workspaces

GitOrigin-RevId: 87aa72db6637fb238d7cd35b0a48ac3ed58ab3eb
This commit is contained in:
Jakob Ackermann 2022-02-07 11:46:51 +00:00 committed by Copybot
parent 42d78528ae
commit ae0c347f27
111 changed files with 80687 additions and 92611 deletions

View file

@ -4,6 +4,7 @@ access-token-encryptor
--env-add=
--env-pass-through=
--is-library=True
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

File diff suppressed because it is too large Load diff

View file

@ -5,10 +5,10 @@
"main": "index.js",
"scripts": {
"test": "mocha test/**/*.js",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"lint:fix": "../../node_modules/.bin/eslint --fix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"test:ci": "npm run test"
},
"author": "",
@ -19,11 +19,11 @@
},
"devDependencies": {
"bunyan": "^1.8.15",
"chai": "^4.3.4",
"chai": "^4.3.6",
"@overleaf/logger": "^2.2.0",
"mocha": "^6.2.2",
"mocha": "^8.4.0",
"nock": "0.15.2",
"sandboxed-module": "^2.0.3",
"sinon": "^7.5.0"
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
}
}

View file

@ -4,6 +4,7 @@ logger
--env-add=
--env-pass-through=
--is-library=True
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

File diff suppressed because it is too large Load diff

View file

@ -10,10 +10,10 @@
"version": "3.1.0",
"scripts": {
"test": "mocha --grep=$MOCHA_GREP test/**/*.js",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"lint:fix": "../../node_modules/.bin/eslint --fix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix .",
"test:ci": "npm run test"
},
"dependencies": {
@ -24,11 +24,11 @@
"yn": "^4.0.0"
},
"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.6",
"mocha": "^8.4.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.0.2",
"sinon-chai": "^3.5.0"
"sinon": "^9.2.4",
"sinon-chai": "^3.7.0"
},
"peerDependencies": {
"@overleaf/metrics": ">= 4.0.0"

View file

@ -4,6 +4,7 @@ metrics
--env-add=
--env-pass-through=
--is-library=True
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

File diff suppressed because it is too large Load diff

View file

@ -16,19 +16,19 @@
},
"devDependencies": {
"bunyan": "^1.0.0",
"chai": "^4.2.0",
"mocha": "^8.0.1",
"chai": "^4.3.6",
"mocha": "^8.4.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.0.2"
"sinon": "^9.2.4"
},
"scripts": {
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"lint:fix": "../../node_modules/.bin/eslint --fix .",
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix .",
"test:unit": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/unit",
"test:acceptance": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/acceptance",
"test": "npm run test:unit && npm run test:acceptance",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"test:ci": "npm run test"
},
"peerDependencies": {

View file

@ -4,6 +4,7 @@ o-error
--env-add=
--env-pass-through=
--is-library=True
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

File diff suppressed because it is too large Load diff

View file

@ -21,15 +21,15 @@
"build": "npm run --silent typecheck && npm run --silent test && npm run --silent declaration:build && npm run --silent update-readme",
"declaration:build": "rm -f index.d.ts && tsc --allowJs --declaration --emitDeclarationOnly --moduleResolution node --target ES6 index.js",
"declaration:check": "git diff --exit-code -- index.d.ts",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"lint:fix": "../../node_modules/.bin/eslint --fix .",
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix .",
"prepublishOnly": "npm run --silent declaration:build && npm run --silent declaration:check",
"test": "mocha",
"test:coverage": "nyc --reporter=lcov --reporter=text-summary npm run test",
"typecheck": "tsc --allowJs --checkJs --noEmit --moduleResolution node --strict --target ES6 *.js test/**/*.js",
"update-readme": "doc/update-readme.js",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"test:ci": "npm run typecheck && npm run test"
},
"author": "Overleaf (https://www.overleaf.com)",
@ -38,7 +38,7 @@
"devDependencies": {
"@types/chai": "^4.3.0",
"@types/node": "^14.18.1",
"chai": "^4.3.4",
"chai": "^4.3.6",
"jsdoc-to-markdown": "^7.1.0",
"markdown-toc": "^1.2.0",
"mocha": "^9.1.3",

View file

@ -4,6 +4,7 @@ object-persistor
--env-add=
--env-pass-through=
--is-library=True
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

File diff suppressed because it is too large Load diff

View file

@ -6,10 +6,10 @@
"scripts": {
"test": "npm run lint && npm run format && npm run test:unit",
"test:unit": "mocha",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"lint:fix": "../../node_modules/.bin/eslint --fix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"test:ci": "npm run test:unit"
},
"repository": {
@ -19,7 +19,7 @@
"author": "Overleaf (https://www.overleaf.com/)",
"license": "AGPL-3.0",
"dependencies": {
"@google-cloud/storage": "^5.1.2",
"@google-cloud/storage": "~5.1.2",
"@overleaf/o-error": "^3.4.0",
"aws-sdk": "^2.718.0",
"fast-crc32c": "^2.0.0",
@ -30,12 +30,12 @@
"tiny-async-pool": "^1.1.0"
},
"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^8.0.1",
"mocha": "^8.4.0",
"mongodb": "^3.5.9",
"sandboxed-module": "^2.0.4",
"sinon": "^9.0.2",
"sinon-chai": "^3.5.0"
"sinon": "^9.2.4",
"sinon-chai": "^3.7.0"
}
}

View file

@ -4,6 +4,7 @@ redis-wrapper
--env-add=
--env-pass-through=
--is-library=True
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

File diff suppressed because it is too large Load diff

View file

@ -11,10 +11,10 @@
"repository": "github:overleaf/redis-wrapper",
"license": "ISC",
"scripts": {
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"lint:fix": "../../node_modules/.bin/eslint --fix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"test": "mocha --recursive test/unit/src/",
"test:ci": "npm run test"
},
@ -26,9 +26,9 @@
},
"devDependencies": {
"@overleaf/o-error": "^3.4.0",
"chai": "^4.3.4",
"chai": "^4.3.6",
"@overleaf/logger": "^2.3.0",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
}

View file

@ -1,58 +1,41 @@
/* eslint-disable no-console */
let defaults, possibleConfigFiles, settingsExist
const fs = require('fs')
const path = require('path')
const env = (process.env.NODE_ENV || 'development').toLowerCase()
const Path = require('path')
const { merge } = require('./merge')
const defaultSettingsPath = path.join(
__dirname,
'../../../config/settings.defaults'
)
const CWD = process.cwd()
const NODE_ENV = (process.env.NODE_ENV || 'development').toLowerCase()
const SHARELATEX_CONFIG = process.env.SHARELATEX_CONFIG
if (fs.existsSync(`${defaultSettingsPath}.js`)) {
console.log(`Using default settings from ${defaultSettingsPath}.js`)
defaults = require(`${defaultSettingsPath}.js`)
let settings
let settingsExist = false
const defaultsPath = pathIfExists(Path.join(CWD, 'config/settings.defaults.js'))
if (defaultsPath) {
console.log(`Using default settings from ${defaultsPath}`)
settings = require(defaultsPath)
settingsExist = true
} else if (fs.existsSync(`${defaultSettingsPath}.coffee`)) {
// TODO: remove this in the next major version
throw new Error(
`CoffeeScript settings file ${defaultSettingsPath}.coffee is no longer supported, please convert to JavaScript`
)
} else {
defaults = {}
settingsExist = false
settings = {}
}
if (process.env.SHARELATEX_CONFIG) {
possibleConfigFiles = [process.env.SHARELATEX_CONFIG]
} else {
possibleConfigFiles = [
path.join(process.cwd(), `config/settings.${env}.js`),
path.join(__dirname, `../../../config/settings.${env}.js`),
// TODO: remove these in the next major version
path.join(process.cwd(), `config/settings.${env}.coffee`),
path.join(__dirname, `../../../config/settings.${env}.coffee`),
]
}
for (const file of possibleConfigFiles) {
if (fs.existsSync(file)) {
// TODO: remove this in the next major version
if (file.endsWith('.coffee')) {
throw new Error(
`CoffeeScript settings file ${file} is no longer supported, please convert to JavaScript`
)
}
console.log('Using settings from ' + file)
module.exports = merge(require(file), defaults)
const overridesPath =
pathIfExists(SHARELATEX_CONFIG) ||
pathIfExists(Path.join(CWD, `config/settings.${NODE_ENV}.js`))
if (overridesPath) {
console.log(`Using settings from ${overridesPath}`)
settings = merge(require(overridesPath), settings)
settingsExist = true
break
}
}
if (!settingsExist) {
console.warn("No settings or defaults found. I'm flying blind.")
}
module.exports = defaults
module.exports = settings
function pathIfExists(path) {
if (path && fs.existsSync(path)) {
return path
}
return null
}

View file

@ -4,6 +4,7 @@ settings
--env-add=
--env-pass-through=
--is-library=True
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

View file

@ -1,5 +0,0 @@
{
"name": "@overleaf/settings",
"version": "2.1.1",
"lockfileVersion": 1
}

View file

@ -1,13 +1,13 @@
{
"name": "@overleaf/settings",
"description": "A centralised settings system for Overleaf",
"version": "2.1.1",
"version": "3.0.0",
"repository": "overleaf/settings-module",
"scripts": {
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"lint:fix": "../../node_modules/.bin/eslint --fix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"test": "echo noop",
"test:ci": "echo noop"
}

80763
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -17,5 +17,30 @@
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint": "eslint --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix ."
}
},
"workspaces": [
"libraries/*",
"services/analytics",
"services/chat",
"services/clsi",
"services/clsi-perf",
"services/contacts",
"services/docstore",
"services/document-updater",
"services/filestore",
"services/github-sync",
"services/k8s-debugger",
"services/notifications",
"services/project-archiver",
"services/project-history",
"services/real-time",
"services/references",
"services/spelling",
"services/templates",
"services/third-party-datastore",
"services/third-party-references",
"services/tpdsworker",
"services/track-changes",
"services/web"
]
}

View file

@ -1,4 +1,3 @@
.DS_Store
.git/
libraries/
services/git-bridge

View file

@ -11,6 +11,8 @@ WORKDIR /overleaf
# -------------------------
ADD server-ce/genScript.js /overleaf/genScript.js
ADD server-ce/services.js /overleaf/services.js
ADD package.json package-lock.json /overleaf/
ADD libraries/ /overleaf/libraries/
ADD services/ /overleaf/services/
# Store the revision
@ -18,6 +20,10 @@ ADD services/ /overleaf/services/
ARG MONOREPO_REVISION
RUN echo "monorepo-server-ce,$MONOREPO_REVISION" > /var/www/revisions.txt
# Upgrade npm for workspaces support
# ----------------------------------
RUN npm install -g npm@7.24.2
# Install npm dependencies
# ------------------------
RUN node genScript install | bash

View file

@ -5,19 +5,8 @@ console.log('set -ex')
switch (process.argv.pop()) {
case 'install':
for (const service of services) {
console.log('pushd', `services/${service.name}`)
switch (service.name) {
case 'web':
console.log('npm ci')
break
default:
// TODO(das7pad): revert back to npm ci --only=production (https://github.com/overleaf/issues/issues/4544)
console.log('npm ci')
}
console.log('popd')
}
break
case 'compile':
for (const service of services) {
console.log('pushd', `services/${service.name}`)

View file

@ -2,17 +2,23 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/chat
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/chat/package*.json /overleaf/services/chat/
COPY package.json package-lock.json /overleaf/
COPY services/chat/package.json /overleaf/services/chat/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/chat /overleaf/services/chat
COPY services/chat/ /overleaf/services/chat/
FROM app
USER node

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -3,6 +3,7 @@ chat
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

View file

@ -6,9 +6,11 @@ version: "2.3"
services:
test_unit:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/chat
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/chat
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -18,9 +20,11 @@ services:
user: node
test_acceptance:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/chat
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/chat
environment:
ELASTIC_SEARCH_DSN: es:9200

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,8 @@
{
"name": "chat-sharelatex",
"version": "0.1.4",
"description": "The backend API that powers ShareLaTeX chat",
"repository": {
"type": "git",
"url": "https://github.com/sharelatex/chat-sharelatex.git"
},
"name": "@overleaf/chat",
"description": "The backend API that powers Overleaf chat",
"private": true,
"main": "app.js",
"scripts": {
"start": "node $NODE_APP_OPTIONS app.js",
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
@ -13,15 +10,15 @@
"nodemon": "nodemon --config nodemon.json",
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint:fix": "../../node_modules/.bin/eslint --fix ."
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
},
"dependencies": {
"@overleaf/logger": "^3.1.0",
"@overleaf/metrics": "^4.0.0",
"@overleaf/settings": "^2.1.1",
"@overleaf/settings": "^3.0.0",
"async": "^3.2.0",
"body-parser": "^1.19.0",
"express": "4.17.1",
@ -30,13 +27,13 @@
"devDependencies": {
"acorn": "^7.1.1",
"ajv": "^6.12.0",
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"nodemon": "^2.0.2",
"request": "^2.88.2",
"sandboxed-module": "^2.0.3",
"sinon": "^9.0.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4",
"timekeeper": "^2.2.0"
}
}

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/clsi
COPY services/clsi/install_deps.sh /overleaf/services/clsi/
@ -10,13 +10,19 @@ RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
COPY services/clsi/entrypoint.sh /
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/clsi/package*.json /overleaf/services/clsi/
COPY package.json package-lock.json /overleaf/
COPY services/clsi/package.json /overleaf/services/clsi/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/clsi /overleaf/services/clsi
COPY services/clsi/ /overleaf/services/clsi/
FROM app
RUN mkdir -p cache compiles output \

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -5,6 +5,7 @@ clsi
--env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true"
--env-pass-through=TEXLIVE_IMAGE
--has-custom-cloudbuild=True
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=True
--script-version=4.0.0
--script-version=4.1.0

View file

@ -12,6 +12,8 @@ services:
target: base
volumes:
- .:/overleaf/services/clsi
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/clsi
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -26,6 +28,8 @@ services:
target: base
volumes:
- .:/overleaf/services/clsi
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/clsi
extends:
file: docker-compose-config.yml

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,8 @@
{
"name": "node-clsi",
"name": "@overleaf/clsi",
"description": "A Node.js implementation of the CLSI LaTeX web-API",
"version": "0.1.4",
"repository": {
"type": "git",
"url": "https://github.com/sharelatex/clsi-sharelatex.git"
},
"private": true,
"main": "app.js",
"scripts": {
"start": "node $NODE_APP_OPTIONS app.js",
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
@ -13,16 +10,15 @@
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
"nodemon": "nodemon --config nodemon.json",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint:fix": "../../node_modules/.bin/eslint --fix ."
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
},
"author": "James Allen <james@sharelatex.com>",
"dependencies": {
"@overleaf/metrics": "^3.5.1",
"@overleaf/o-error": "^3.4.0",
"@overleaf/settings": "^2.1.1",
"@overleaf/settings": "^3.0.0",
"async": "3.2.0",
"body-parser": "^1.19.0",
"bunyan": "^1.8.15",
@ -34,17 +30,17 @@
"lodash": "^4.17.21",
"logger-sharelatex": "^2.2.0",
"p-limit": "^3.1.0",
"pdfjs-dist": "^2.7.570",
"pdfjs-dist": "~2.7.570",
"request": "^2.88.2",
"send": "^0.17.1",
"workerpool": "^6.1.5"
},
"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"nodemon": "^2.0.7",
"sandboxed-module": "^2.0.3",
"sandboxed-module": "^2.0.4",
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0",
"timekeeper": "2.2.0"

View file

@ -2,17 +2,23 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/contacts
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/contacts/package*.json /overleaf/services/contacts/
COPY package.json package-lock.json /overleaf/
COPY services/contacts/package.json /overleaf/services/contacts/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/contacts /overleaf/services/contacts
COPY services/contacts/ /overleaf/services/contacts/
FROM app
USER node

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -3,6 +3,7 @@ contacts
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

View file

@ -6,9 +6,11 @@ version: "2.3"
services:
test_unit:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/contacts
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/contacts
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -18,9 +20,11 @@ services:
user: node
test_acceptance:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/contacts
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/contacts
environment:
ELASTIC_SEARCH_DSN: es:9200

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,8 @@
{
"name": "contacts-sharelatex",
"version": "0.1.0",
"name": "@overleaf/contacts",
"description": "An API for tracking contacts of a user",
"author": "ShareLaTeX <team@sharelatex.com>",
"repository": {
"type": "git",
"url": "https://github.com/sharelatex/contacts-sharelatex.git"
},
"private": true,
"main": "app.js",
"scripts": {
"start": "node $NODE_APP_OPTIONS app.js",
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
@ -14,15 +10,15 @@
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
"nodemon": "nodemon --config nodemon.json",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint:fix": "../../node_modules/.bin/eslint --fix ."
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
},
"dependencies": {
"@overleaf/logger": "^3.1.0",
"@overleaf/metrics": "^4.0.0",
"@overleaf/settings": "^2.1.1",
"@overleaf/settings": "^3.0.0",
"async": "^2.6.3",
"body-parser": "^1.19.0",
"bunyan": "^1.8.15",
@ -32,9 +28,9 @@
"underscore": "~1.13.1"
},
"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"sandboxed-module": "~2.0.3",
"sinon": "~9.0.1",
"timekeeper": "2.2.0"

View file

@ -2,17 +2,23 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/docstore
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/docstore/package*.json /overleaf/services/docstore/
COPY package.json package-lock.json /overleaf/
COPY services/docstore/package.json /overleaf/services/docstore/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/docstore /overleaf/services/docstore
COPY services/docstore/ /overleaf/services/docstore/
FROM app
USER node

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -3,6 +3,7 @@ docstore
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=True
--script-version=4.0.0
--script-version=4.1.0

View file

@ -6,9 +6,11 @@ version: "2.3"
services:
test_unit:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/docstore
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/docstore
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -18,9 +20,11 @@ services:
user: node
test_acceptance:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/docstore
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/docstore
extends:
file: docker-compose-config.yml

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,8 @@
{
"name": "docstore-sharelatex",
"version": "0.1.2",
"name": "@overleaf/docstore",
"description": "A CRUD API for handling text documents in projects",
"author": "ShareLaTeX <team@sharelatex>",
"repository": {
"type": "git",
"url": "https://github.com/sharelatex/docstore-sharelatex.git"
},
"private": true,
"main": "app.js",
"scripts": {
"start": "node $NODE_APP_OPTIONS app.js",
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
@ -14,17 +10,17 @@
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
"nodemon": "nodemon --config nodemon.json",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint:fix": "../../node_modules/.bin/eslint --fix ."
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
},
"dependencies": {
"@overleaf/logger": "^3.1.0",
"@overleaf/metrics": "^4.0.0",
"@overleaf/o-error": "^3.4.0",
"@overleaf/object-persistor": "^1.0.1",
"@overleaf/settings": "^2.1.1",
"@overleaf/settings": "^3.0.0",
"async": "^2.6.3",
"body-parser": "^1.19.0",
"bunyan": "^1.8.15",
@ -38,14 +34,11 @@
},
"devDependencies": {
"@google-cloud/storage": "^5.1.2",
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"sandboxed-module": "~2.0.4",
"sinon": "~9.0.2",
"sinon-chai": "^3.5.0"
},
"engines": {
"node": "~6.14.1"
"sinon-chai": "^3.7.0"
}
}

View file

@ -2,17 +2,23 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/document-updater
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/document-updater/package*.json /overleaf/services/document-updater/
COPY package.json package-lock.json /overleaf/
COPY services/document-updater/package.json /overleaf/services/document-updater/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/document-updater /overleaf/services/document-updater
COPY services/document-updater/ /overleaf/services/document-updater/
FROM app
USER node

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -3,6 +3,7 @@ document-updater
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=True
--script-version=4.0.0
--script-version=4.1.0

View file

@ -6,9 +6,11 @@ version: "2.3"
services:
test_unit:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/document-updater
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/document-updater
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -18,9 +20,11 @@ services:
user: node
test_acceptance:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/document-updater
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/document-updater
environment:
ELASTIC_SEARCH_DSN: es:9200

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,8 @@
{
"name": "document-updater-sharelatex",
"version": "0.1.4",
"name": "@overleaf/document-updater",
"description": "An API for applying incoming updates to documents in real-time",
"repository": {
"type": "git",
"url": "https://github.com/sharelatex/document-updater-sharelatex.git"
},
"private": true,
"main": "app.js",
"scripts": {
"start": "node $NODE_APP_OPTIONS app.js",
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
@ -13,17 +10,17 @@
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
"nodemon": "nodemon --config nodemon.json",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint:fix": "../../node_modules/.bin/eslint --fix ."
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
},
"dependencies": {
"@overleaf/logger": "^3.1.0",
"@overleaf/metrics": "^4.0.0",
"@overleaf/o-error": "^3.4.0",
"@overleaf/redis-wrapper": "^2.0.1",
"@overleaf/settings": "^2.1.1",
"@overleaf/settings": "^3.0.0",
"async": "^2.5.0",
"body-parser": "^1.19.0",
"bunyan": "^1.8.15",
@ -35,12 +32,12 @@
"requestretry": "^4.1.2"
},
"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"cluster-key-slot": "^1.0.5",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.0.2",
"sinon": "^9.2.4",
"timekeeper": "^2.0.0"
}
}

View file

@ -2,19 +2,25 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/filestore
COPY services/filestore/install_deps.sh /overleaf/services/filestore/
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/filestore/package*.json /overleaf/services/filestore/
COPY package.json package-lock.json /overleaf/
COPY services/filestore/package.json /overleaf/services/filestore/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/filestore /overleaf/services/filestore
COPY services/filestore/ /overleaf/services/filestore/
FROM app
RUN mkdir -p uploads user_files template_files \

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -4,6 +4,7 @@ filestore
--docker-repos=gcr.io/overleaf-ops
--env-add=ENABLE_CONVERSIONS="true",USE_PROM_METRICS="true",AWS_S3_USER_FILES_BUCKET_NAME=fake_user_files,AWS_S3_TEMPLATE_FILES_BUCKET_NAME=fake_template_files,AWS_S3_PUBLIC_FILES_BUCKET_NAME=fake_public_files,GCS_USER_FILES_BUCKET_NAME=fake_userfiles,GCS_TEMPLATE_FILES_BUCKET_NAME=fake_templatefiles,GCS_PUBLIC_FILES_BUCKET_NAME=fake_publicfiles
--env-pass-through=
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=True
--script-version=4.0.0
--script-version=4.1.0

View file

@ -12,6 +12,8 @@ services:
target: base
volumes:
- .:/overleaf/services/filestore
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/filestore
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -27,6 +29,8 @@ services:
target: base
volumes:
- .:/overleaf/services/filestore
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/filestore
environment:
ELASTIC_SEARCH_DSN: es:9200

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,8 @@
{
"name": "filestore-sharelatex",
"version": "0.1.4",
"name": "@overleaf/filestore",
"description": "An API for CRUD operations on binary files stored in S3",
"repository": {
"type": "git",
"url": "https://github.com/sharelatex/filestore-sharelatex.git"
},
"private": true,
"main": "app.js",
"scripts": {
"test:acceptance:run": "mocha --recursive --reporter spec --timeout 15000 $@ test/acceptance/js",
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
@ -13,19 +10,19 @@
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
"start": "node $NODE_APP_OPTIONS app.js",
"nodemon": "nodemon --config nodemon.json",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.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:fix": "../../node_modules/.bin/eslint --fix ."
"lint:fix": "eslint --fix ."
},
"dependencies": {
"@overleaf/logger": "^3.1.0",
"@overleaf/metrics": "^4.0.0",
"@overleaf/o-error": "^3.0.0",
"@overleaf/object-persistor": "^1.0.1",
"@overleaf/settings": "^2.1.1",
"@overleaf/settings": "^3.0.0",
"body-parser": "^1.19.0",
"bunyan": "^1.8.15",
"express": "^4.17.1",
@ -42,14 +39,14 @@
"devDependencies": {
"@google-cloud/storage": "^5.1.2",
"aws-sdk": "^2.718.0",
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"disrequire": "^1.1.0",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"mongodb": "^3.5.9",
"sandboxed-module": "2.0.4",
"sinon": "9.0.2",
"sinon-chai": "^3.5.0",
"sinon-chai": "^3.7.0",
"streamifier": "^0.1.1",
"timekeeper": "^2.2.0"
}

View file

@ -2,17 +2,23 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/notifications
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/notifications/package*.json /overleaf/services/notifications/
COPY package.json package-lock.json /overleaf/
COPY services/notifications/package.json /overleaf/services/notifications/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/notifications /overleaf/services/notifications
COPY services/notifications/ /overleaf/services/notifications/
FROM app
USER node

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -3,6 +3,7 @@ notifications
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=True
--script-version=4.0.0
--script-version=4.1.0

View file

@ -6,9 +6,11 @@ version: "2.3"
services:
test_unit:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/notifications
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/notifications
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -18,9 +20,11 @@ services:
user: node
test_acceptance:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/notifications
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/notifications
environment:
ELASTIC_SEARCH_DSN: es:9200

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{
"name": "notifications-sharelatex",
"version": "0.0.1",
"name": "@overleaf/notifications",
"description": "An API to handle user notifications",
"private": true,
"main": "app.js",
"scripts": {
"start": "node $NODE_APP_OPTIONS app.js",
@ -10,17 +10,17 @@
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
"nodemon": "nodemon --config nodemon.json",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint:fix": "../../node_modules/.bin/eslint --fix ."
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
},
"author": "",
"license": "ISC",
"dependencies": {
"@overleaf/logger": "^3.1.0",
"@overleaf/metrics": "^4.0.0",
"@overleaf/settings": "^2.1.1",
"@overleaf/settings": "^3.0.0",
"async": "^2.6.3",
"body-parser": "^1.19.0",
"bunyan": "^1.8.15",
@ -31,10 +31,10 @@
"underscore": "1.13.1"
},
"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^8.3.2",
"sandboxed-module": "^2.0.3",
"sinon": "^9.0.1"
"mocha": "^8.4.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
}
}

View file

@ -2,17 +2,23 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/real-time
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/real-time/package*.json /overleaf/services/real-time/
COPY package.json package-lock.json /overleaf/
COPY services/real-time/package.json /overleaf/services/real-time/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/real-time /overleaf/services/real-time
COPY services/real-time/ /overleaf/services/real-time/
FROM app
USER node

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -3,6 +3,7 @@ real-time
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=True
--script-version=4.0.0
--script-version=4.1.0

View file

@ -6,9 +6,11 @@ version: "2.3"
services:
test_unit:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/real-time
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/real-time
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -18,9 +20,11 @@ services:
user: node
test_acceptance:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/real-time
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/real-time
environment:
ELASTIC_SEARCH_DSN: es:9200

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,14 +1,8 @@
{
"name": "real-time-sharelatex",
"version": "0.1.4",
"description": "The socket.io layer of ShareLaTeX for real-time editor interactions",
"author": "ShareLaTeX <team@sharelatex.com>",
"license": "AGPL-3.0-only",
"name": "@overleaf/real-time",
"description": "The socket.io layer of Overleaf for real-time editor interactions",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/sharelatex/real-time-sharelatex.git"
},
"main": "app.js",
"scripts": {
"start": "node $NODE_APP_OPTIONS app.js",
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
@ -16,10 +10,10 @@
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
"nodemon": "nodemon --config nodemon.json",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint:fix": "../../node_modules/.bin/eslint --fix ."
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
},
"dependencies": {
"@hapi/joi": "^17.1.1",
@ -27,7 +21,7 @@
"@overleaf/metrics": "^4.0.0",
"@overleaf/o-error": "^3.4.0",
"@overleaf/redis-wrapper": "^2.0.0",
"@overleaf/settings": "^2.1.1",
"@overleaf/settings": "^3.0.0",
"async": "^0.9.0",
"base64id": "0.1.0",
"body-parser": "^1.19.0",
@ -43,10 +37,10 @@
"underscore": "1.13.1"
},
"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"cookie-signature": "^1.1.0",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"sandboxed-module": "~0.3.0",
"sinon": "^9.2.4",
"timekeeper": "0.0.4",

View file

@ -2,19 +2,25 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/spelling
COPY services/spelling/install_deps.sh /overleaf/services/spelling/
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/spelling/package*.json /overleaf/services/spelling/
COPY package.json package-lock.json /overleaf/
COPY services/spelling/package.json /overleaf/services/spelling/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/spelling /overleaf/services/spelling
COPY services/spelling/ /overleaf/services/spelling/
FROM app
RUN mkdir -p cache \

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -4,6 +4,7 @@ spelling
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=False
--script-version=4.0.0
--script-version=4.1.0

View file

@ -12,6 +12,8 @@ services:
target: base
volumes:
- .:/overleaf/services/spelling
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/spelling
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -27,6 +29,8 @@ services:
target: base
volumes:
- .:/overleaf/services/spelling
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/spelling
environment:
ELASTIC_SEARCH_DSN: es:9200

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,8 @@
{
"name": "spelling-sharelatex",
"author": "ShareLaTeX <team@sharelatex.com>",
"name": "@overleaf/spelling",
"description": "A JSON API wrapper around aspell",
"repository": {
"type": "git",
"url": "https://github.com/sharelatex/spelling-sharelatex.git"
},
"private": true,
"main": "app.js",
"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",
@ -18,17 +15,17 @@
"compile:all": "npm run compile:app && npm run compile:unit_tests && npm run compile:acceptance_tests && npm run compile:smoke_tests",
"nodemon": "nodemon --config nodemon.json",
"compile:smoke_tests": "[ ! -e test/smoke/coffee ] && echo 'No smoke tests to compile' || coffee -o test/smoke/js -c test/smoke/coffee",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint:fix": "../../node_modules/.bin/eslint --fix ."
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
},
"version": "0.1.4",
"dependencies": {
"@overleaf/logger": "^3.1.0",
"@overleaf/metrics": "^4.0.0",
"@overleaf/o-error": "^3.4.0",
"@overleaf/settings": "^2.1.1",
"@overleaf/settings": "^3.0.0",
"async": "^2.6.3",
"body-parser": "^1.19.0",
"bunyan": "^1.8.15",
@ -39,10 +36,10 @@
"underscore": "1.13.1"
},
"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"sandboxed-module": "2.0.4",
"sinon": "^9.0.1"
"sinon": "^9.2.4"
}
}

View file

@ -2,17 +2,23 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/track-changes
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
FROM base as app
COPY services/track-changes/package*.json /overleaf/services/track-changes/
COPY package.json package-lock.json /overleaf/
COPY services/track-changes/package.json /overleaf/services/track-changes/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
COPY services/track-changes /overleaf/services/track-changes
COPY services/track-changes/ /overleaf/services/track-changes/
FROM app
USER node

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
format:
$(RUN_LINTING) format

View file

@ -3,6 +3,7 @@ track-changes
--docker-repos=gcr.io/overleaf-ops
--env-add=AWS_BUCKET=bucket
--env-pass-through=
--node-image=gcr.io/overleaf-ops/node
--node-version=14.18.3
--public-repo=True
--script-version=4.0.0
--script-version=4.1.0

View file

@ -6,9 +6,11 @@ version: "2.3"
services:
test_unit:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/track-changes
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/track-changes
environment:
MOCHA_GREP: ${MOCHA_GREP}
@ -18,9 +20,11 @@ services:
user: node
test_acceptance:
image: node:14.18.3
image: gcr.io/overleaf-ops/node:14.18.3
volumes:
- .:/overleaf/services/track-changes
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/track-changes
environment:
ELASTIC_SEARCH_DSN: es:9200

View file

@ -11,7 +11,8 @@
"watch": [
"app/js/",
"app.js",
"config/"
"config/",
"../../libraries/"
],
"ext": "js"
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,8 @@
{
"name": "history-sharelatex",
"version": "0.1.4",
"name": "@overleaf/track-changes",
"description": "An API for saving and compressing individual document updates into a browsable history",
"repository": {
"type": "git",
"url": "https://github.com/sharelatex/track-changes-sharelatex.git"
},
"private": true,
"main": "app.js",
"scripts": {
"start": "node $NODE_APP_OPTIONS app.js",
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
@ -13,18 +10,17 @@
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
"nodemon": "nodemon --config nodemon.json",
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
"lint:fix": "../../node_modules/.bin/eslint --fix ."
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
},
"dependencies": {
"@overleaf/logger": "^3.1.0",
"@overleaf/metrics": "^4.0.0",
"@overleaf/o-error": "^3.4.0",
"@overleaf/redis-wrapper": "^2.0.0",
"@overleaf/settings": "^2.1.1",
"JSONStream": "^1.3.5",
"@overleaf/settings": "^3.0.0",
"async": "^2.6.3",
"aws-sdk": "^2.643.0",
"body-parser": "^1.19.0",
@ -33,6 +29,7 @@
"byline": "^5.0.0",
"express": "4.17.1",
"heap": "^0.2.6",
"JSONStream": "^1.3.5",
"line-reader": "^0.4.0",
"mongo-uri": "^0.1.2",
"mongodb": "^3.6.0",
@ -44,11 +41,11 @@
"yazl": "^2.5.1"
},
"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"cli": "^1.0.1",
"memorystream": "0.3.1",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"sandboxed-module": "~2.0.3",
"sinon": "~9.0.1",
"timekeeper": "2.2.0"

View file

@ -113,7 +113,6 @@
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"standard-jsx",
"standard-react",
"prettier"
],
"globals": {
@ -129,6 +128,20 @@
"ExposedSettings": true
},
"rules": {
// TODO: remove once https://github.com/standard/eslint-config-standard-react/issues/68 (support eslint@8) is fixed.
// START: inline standard-react rules
// "react/jsx-no-bind": ["error", {
// "allowArrowFunctions": true,
// "allowBind": false,
// "ignoreRefs": true
// },],
"react/no-did-update-set-state": "error",
"react/no-unknown-property": "error",
"react/no-unused-prop-types": "error",
"react/prop-types": "error",
// "react/react-in-jsx-scope": "error",
// END: inline standard-react rules
"react/jsx-no-target-blank": ["error", {
"allowReferrer": true
}],

View file

@ -1,21 +1,24 @@
# the base image is suitable for running web with /overleaf/services/web bind
# mounted
FROM node:14.18.3 as base
FROM gcr.io/overleaf-ops/node:14.18.3 as base
WORKDIR /overleaf/services/web
# install_deps changes app files and installs npm packages
# as such it has to run at a later stage
RUN mkdir /overleaf/services/web/node_modules \
&& chown node:node /overleaf/services/web/node_modules
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
RUN mkdir /home/node/.config && chown node:node /home/node/.config
# the deps image is used for caching npm ci
FROM base as deps
COPY services/web/package.json services/web/package-lock.json /overleaf/services/web/
COPY package.json package-lock.json /overleaf/
COPY services/web/package.json /overleaf/services/web/
COPY libraries/ /overleaf/libraries/
RUN npm ci --quiet
RUN cd /overleaf && npm ci --quiet
# the dev is suitable for running tests

View file

@ -1,4 +1,4 @@
FROM node:14.18.3
FROM gcr.io/overleaf-ops/node:14.18.3
# Install Google Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -

Some files were not shown because too many files have changed in this diff Show more