Skip to content

Commit

Permalink
Update Zotero; potentially fixes OOM issues
Browse files Browse the repository at this point in the history
Update zotero from upstream, hopefully
fixes memory exhaustion issues by
limiting response size and ignoring
unsupported content types (which can
be large, i.e. pdf, video)

Requires minor updates to citoid tests:
Ib2c1ae2da

Squashed commit of the following:

commit 3d11fc9
Author: Dan Stillman <[email protected]>
Date:   Mon Jan 14 15:32:29 2019 -0500

    More fixes for exporting minimal data without .creators or .tags

    Addresses zotero#75

commit 9339404
Author: Adomas Venčkauskas <[email protected]>
Date:   Mon Jan 14 17:18:36 2019 +0200

    Fix a json legacy export bug (regression e02ee7a). Closes zotero#75

commit 106c721
Author: Dan Stillman <[email protected]>
Date:   Thu Jan 10 21:38:10 2019 -0500

    Add test for Bibliontology RDF export

    Follow up to zotero#73

commit e02ee7a
Author: Adomas Venčkauskas <[email protected]>
Date:   Thu Jan 10 14:40:57 2019 +0200

    Fix pre 4.0.27 translator exports. Closes zotero#73

commit 158ebc6
Author: Martynas Bagdonas <[email protected]>
Date:   Wed Jan 9 22:11:35 2019 -0500

    Restore DOI from URL extraction (zotero#72)

commit 5848d9e
Author: Dan Stillman <[email protected]>
Date:   Mon Jan 7 03:19:36 2019 -0500

    Allow "pmid:" prefix in PMIDs

    Closes zotero#71

commit f8158ec
Author: Dan Stillman <[email protected]>
Date:   Mon Jan 7 02:57:40 2019 -0500

    Update translators submodule

commit 33e971d
Author: Dan Stillman <[email protected]>
Date:   Thu Jan 3 23:05:47 2019 -0500

    Update config file pattern in .gitignore

commit 8dc70dc
Author: Dan Stillman <[email protected]>
Date:   Thu Jan 3 23:04:26 2019 -0500

    Fix CORS via API Gateway

commit ef64844
Author: Dan Stillman <[email protected]>
Date:   Sat Dec 29 19:43:55 2018 -0500

    Add Travis config

commit 5cf698e
Author: Dan Stillman <[email protected]>
Date:   Sun Dec 23 02:37:48 2018 -0500

    Return 400 for missing or unsupported upstream content type

    Follow-up to zotero#69

commit 9f2c366
Author: Martynas Bagdonas <[email protected]>
Date:   Sun Dec 23 01:02:07 2018 -0600

    Limit response size (zotero#69)

commit 757e21c
Author: Dan Stillman <[email protected]>
Date:   Fri Dec 21 06:06:35 2018 -0500

    Make translators directory customizable via environment variable

    Set TRANSLATORS_DIR to override the location in the config. (This is
    useful for provo, where translation-server is a submodule, so a
    local.json would be sort of awkward, and we want to share a translators
    directory at the provo root.)

commit e1457a9
Author: Dan Stillman <[email protected]>
Date:   Fri Dec 21 02:41:55 2018 -0500

    Fix error when exporting notes as CSL-JSON

    (But don't export notes as CSL-JSON)

    Reported in zotero#67

commit 3207162
Author: Dan Stillman <[email protected]>
Date:   Fri Dec 21 02:24:17 2018 -0500

    Fix missing parentItem in child notes

    As shown in zotero#67

commit ff54ad6
Author: Martynas Bagdonas <[email protected]>
Date:   Mon Dec 17 09:37:05 2018 +0000

    Use JSDOM from NPM (zotero#64)

commit 9f70ccc
Author: Dan Stillman <[email protected]>
Date:   Sun Dec 16 22:20:15 2018 -0500

    Update translators

commit 2b2647d
Author: Dan Stillman <[email protected]>
Date:   Sun Dec 16 21:33:46 2018 -0500

    Fix COinS export and add Zotero RDF test

commit 0458529
Author: Dan Stillman <[email protected]>
Date:   Sun Dec 16 21:01:41 2018 -0500

    Update translators submodule

commit 57908ef
Author: Dan Stillman <[email protected]>
Date:   Fri Dec 14 22:59:06 2018 -0500

    Update package-lock.json (HTTP -> HTTPS)

commit cd8b177
Author: Martynas Bagdonas <[email protected]>
Date:   Fri Dec 14 22:38:26 2018 +0000

    Install precompiled JSDOM module to speed up installation from commit (zotero#62)

commit 3c80836
Author: Dan Stillman <[email protected]>
Date:   Thu Dec 13 16:14:47 2018 -0500

    Update package-lock.json

commit 88228e5
Author: Martynas Bagdonas <[email protected]>
Date:   Thu Dec 13 19:04:43 2018 +0000

    Remove the temporary JSDOM slowdown workaround and use the fixed JSDOM (zotero#61)

commit 8b8355a
Author: Dan Stillman <[email protected]>
Date:   Thu Dec 13 02:18:45 2018 -0500

    Add local.json to .gitignore

commit 517e264
Author: Dan Stillman <[email protected]>
Date:   Thu Dec 13 02:16:15 2018 -0500

    Fix CSL JSON export when there's an Extra value

    Fixes zotero/zotero#1604

commit 6160d86
Author: Dan Stillman <[email protected]>
Date:   Wed Dec 12 23:38:25 2018 -0500

    Fix text search test

    Fixes zotero#60

commit 802d3d8
Author: Dan Stillman <[email protected]>
Date:   Tue Dec 4 02:59:17 2018 -0700

    Update translators submodule

commit e763651
Author: Dan Stillman <[email protected]>
Date:   Tue Dec 4 02:55:32 2018 -0700

    Forward client Accept-Language header during web translation

    Addresses zotero#16

commit 6464497
Author: Dan Stillman <[email protected]>
Date:   Sat Nov 17 02:39:08 2018 -0500

    Fix CSL JSON export

    Not sure if this didn't work after d1bc532 or something changed since,
    but this seems to work now.

    Fixes zotero#56

commit e03e4f1
Author: Daniel Himmelstein <[email protected]>
Date:   Fri Nov 16 17:35:50 2018 -0500

    README installation: touch-up commands (zotero#55)

    Use long arguments so new users know what they are doing.

    git clone: default behavior is to clone into `translation-server` directory.

commit 653a767
Author: Dan Stillman <[email protected]>
Date:   Fri Nov 16 17:16:02 2018 -0500

    Document proxy support

    Closes zotero#54

commit aed6c83
Author: Martynas Bagdonas <[email protected]>
Date:   Fri Nov 16 17:56:12 2018 +0800

    Use version from install.rdf (zotero#53)

commit f3436f2
Author: Martynas Bagdonas <[email protected]>
Date:   Fri Nov 16 17:21:12 2018 +0800

    Fix gzip problem and missing package.json (zotero#52)

commit 286f65c
Author: Martynas Bagdonas <[email protected]>
Date:   Tue Nov 13 05:43:14 2018 +0800

    Translate doi.org URL instead of extracting DOI (zotero#50)

commit a185c5c
Author: Adomas Venčkauskas <[email protected]>
Date:   Fri Oct 26 16:33:16 2018 +0300

    Fix meta redirect bugs when meta tag is malformed

commit 9c15114
Author: Adomas Venčkauskas <[email protected]>
Date:   Fri Oct 19 13:50:41 2018 +0300

    Add translator tester

commit edfe9e5
Author: Martynas Bagdonas <[email protected]>
Date:   Sat Nov 3 01:53:24 2018 +0800

    A workaround for JSDOM slowdown for some websites (zotero#47)

commit 637ce02
Author: Dan Stillman <[email protected]>
Date:   Mon Oct 29 06:01:07 2018 -0400

    Disable text search with ?text=0

commit 29b515a
Author: Dan Stillman <[email protected]>
Date:   Sat Oct 27 02:53:53 2018 -0400

    Automatically prepend 'http://' for URL-ish strings for /web requests

commit 1d15419
Author: Dan Stillman <[email protected]>
Date:   Sat Oct 27 01:42:00 2018 -0400

    Return CORS headers on errors

    Koa normally strips headers on errors

commit f952cc4
Author: Dan Stillman <[email protected]>
Date:   Thu Oct 25 00:59:55 2018 -0400

    Remove debug lines

commit 21332ad
Author: Dan Stillman <[email protected]>
Date:   Tue Oct 23 02:50:11 2018 -0400

    Fix webpage fallback

commit 01aa1e4
Author: Dan Stillman <[email protected]>
Date:   Tue Oct 23 02:48:20 2018 -0400

    Update submodules

commit 1b5d429
Author: Martynas Bagdonas <[email protected]>
Date:   Tue Oct 23 06:59:17 2018 +0800

    Re-translate multi item URL if cached session is not found (zotero#46)

commit bc7a18e
Author: Dan Stillman <[email protected]>
Date:   Mon Oct 22 03:59:24 2018 -0400

    Support ?single=1 to force single-page saving

    Closes zotero#45

commit f170ad3
Author: Dan Stillman <[email protected]>
Date:   Sun Oct 21 03:19:44 2018 -0400

    Fix WebSession object name

commit cffd535
Author: Dan Stillman <[email protected]>
Date:   Mon Oct 8 01:09:37 2018 -0400

    Update package-lock.json

commit 15a2961
Author: Dan Stillman <[email protected]>
Date:   Mon Oct 8 01:09:00 2018 -0400

    Support allowedOrigins config option for CORS

commit ad454e0
Author: Dan Stillman <[email protected]>
Date:   Tue Oct 2 15:30:47 2018 -0400

    Add AWS SDK

    This is available by default on Lambda but without it Node installs
    break (even though they don't use it).

commit 19bd71a
Author: Dan Stillman <[email protected]>
Date:   Tue Oct 2 15:18:43 2018 -0400

    Add missing config variable

commit 73b99ff
Author: Dan Stillman <[email protected]>
Date:   Tue Oct 2 15:17:33 2018 -0400

    Fix "TLDS is not defined" error

commit 632ea8d
Author: Martynas Bagdonas <[email protected]>
Date:   Tue Oct 2 17:07:36 2018 +0800

    Invoke identifier-search Lambda function (zotero#42)

Bug: T121992
Bug: T211411
Change-Id: Ic420614133409cb43ec91c0a3024dc9ae0092893
  • Loading branch information
mvolz committed Jan 17, 2019
1 parent 994606b commit e06bba6
Show file tree
Hide file tree
Showing 22 changed files with 1,041 additions and 295 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ node_modules
config/production.json
config/dev.json
config/local.json
lambda_config-production.env
lambda_config-dev.env
lambda_config*.env

11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: node_js
node_js:
- "8"
cache: npm
git:
submodules: false
before_install:
- git submodule update --init modules/zotero
- git -C modules/zotero submodule update --init styles
- git -C modules/zotero submodule update --init chrome/content/zotero/locale/csl
- git submodule update --init modules/translators
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Zotero Translation Server v2

[![Build Status](https://travis-ci.com/zotero/translation-server.svg?branch=master)](https://travis-ci.com/zotero/translation-server)

The Zotero translation server lets you use [Zotero translators](https://www.zotero.org/support/translators) without the Zotero client.

## Installation
Expand Down
3 changes: 3 additions & 0 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"translatorsDirectory": "TRANSLATORS_DIR"
}
8 changes: 7 additions & 1 deletion lambda_template.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ Resources:
FunctionName: {{ identifier_search_function_name }}
Events:
# API Gateway
API:
PostAPI:
Type: Api
Properties:
# Proxy all POST requests to Lambda function
Path: /{proxy+}
Method: post
OptionsAPI:
Type: Api
Properties:
# Proxy all OPTIONS requests to Lambda function
Path: /{proxy+}
Method: options
Environment:
Variables:
NODE_ENV: {{ node_env }}
Expand Down
2 changes: 1 addition & 1 deletion modules/translators
2 changes: 1 addition & 1 deletion modules/zotero
Submodule zotero updated 66 files
+8 −1 chrome/content/zotero/bindings/zoterosearch.xml
+1 −1 chrome/content/zotero/locale/csl
+10 −11 chrome/content/zotero/xpcom/collectionTreeView.js
+27 −25 chrome/content/zotero/xpcom/data/collection.js
+3 −23 chrome/content/zotero/xpcom/data/items.js
+3 −0 chrome/content/zotero/xpcom/data/notes.js
+3 −15 chrome/content/zotero/xpcom/data/search.js
+16 −0 chrome/content/zotero/xpcom/data/searches.js
+9 −0 chrome/content/zotero/xpcom/db.js
+1 −1 chrome/content/zotero/xpcom/openurl.js
+18 −1 chrome/content/zotero/xpcom/translation/translate.js
+45 −4 chrome/content/zotero/xpcom/utilities_internal.js
+26 −1 chrome/content/zotero/zoteroPane.js
+1 −0 chrome/content/zotero/zoteroPane.xul
+1 −0 chrome/locale/af-ZA/zotero/zotero.properties
+2 −1 chrome/locale/ar/zotero/zotero.properties
+1 −0 chrome/locale/bg-BG/zotero/zotero.properties
+1 −0 chrome/locale/ca-AD/zotero/zotero.properties
+1 −0 chrome/locale/cs-CZ/zotero/zotero.properties
+1 −0 chrome/locale/da-DK/zotero/zotero.properties
+2 −1 chrome/locale/de/zotero/zotero.properties
+1 −0 chrome/locale/el-GR/zotero/zotero.properties
+1 −0 chrome/locale/en-US/zotero/zotero.properties
+2 −1 chrome/locale/es-ES/zotero/zotero.properties
+1 −0 chrome/locale/et-EE/zotero/zotero.properties
+1 −0 chrome/locale/eu-ES/zotero/zotero.properties
+1 −0 chrome/locale/fa/zotero/zotero.properties
+1 −0 chrome/locale/fi-FI/zotero/zotero.properties
+1 −0 chrome/locale/fr-FR/zotero/zotero.properties
+1 −0 chrome/locale/gl-ES/zotero/zotero.properties
+1 −0 chrome/locale/he-IL/zotero/zotero.properties
+1 −0 chrome/locale/hr-HR/zotero/zotero.properties
+1 −0 chrome/locale/hu-HU/zotero/zotero.properties
+1 −0 chrome/locale/id-ID/zotero/zotero.properties
+1 −0 chrome/locale/is-IS/zotero/zotero.properties
+1 −0 chrome/locale/it-IT/zotero/zotero.properties
+1 −0 chrome/locale/ja-JP/zotero/zotero.properties
+1 −0 chrome/locale/km/zotero/zotero.properties
+2 −1 chrome/locale/ko-KR/zotero/zotero.properties
+1 −0 chrome/locale/lt-LT/zotero/zotero.properties
+1 −0 chrome/locale/mn-MN/zotero/zotero.properties
+1 −0 chrome/locale/nb-NO/zotero/zotero.properties
+1 −0 chrome/locale/nl-NL/zotero/zotero.properties
+1 −0 chrome/locale/nn-NO/zotero/zotero.properties
+2 −1 chrome/locale/pl-PL/zotero/zotero.properties
+1 −0 chrome/locale/pt-BR/zotero/zotero.properties
+2 −1 chrome/locale/pt-PT/zotero/zotero.properties
+2 −1 chrome/locale/ro-RO/zotero/zotero.properties
+2 −1 chrome/locale/ru-RU/zotero/zotero.properties
+2 −1 chrome/locale/sk-SK/zotero/zotero.properties
+2 −1 chrome/locale/sl-SI/zotero/zotero.properties
+1 −0 chrome/locale/sr-RS/zotero/zotero.properties
+2 −1 chrome/locale/sv-SE/zotero/zotero.properties
+1 −0 chrome/locale/th-TH/zotero/zotero.properties
+2 −1 chrome/locale/tr-TR/zotero/zotero.properties
+1 −0 chrome/locale/uk-UA/zotero/zotero.properties
+1 −0 chrome/locale/vi-VN/zotero/zotero.properties
+2 −1 chrome/locale/zh-CN/zotero/zotero.properties
+6 −6 chrome/locale/zh-TW/zotero/preferences.dtd
+8 −8 chrome/locale/zh-TW/zotero/zotero.dtd
+11 −10 chrome/locale/zh-TW/zotero/zotero.properties
+1 −1 components/zotero-autocomplete.js
+1 −1 resource/schema/repotime.txt
+47 −0 test/tests/collectionTreeViewTest.js
+12 −0 test/tests/utilities_internalTest.js
+1 −1 translators
Loading

0 comments on commit e06bba6

Please sign in to comment.