...
 
Commits (3)
Subproject commit e110a92669f2dc9569e4bead385aa9970591847b
Subproject commit f99bce2d9d99bd5b68e88605a2adf933fa1eeb8a
......@@ -146,9 +146,9 @@
"integrity": "sha1-FcE0r9WCg1hFN3DVjatmABmvDfM="
},
"@types/body-parser": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
"integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.1.tgz",
"integrity": "sha512-RoX2EZjMiFMjZh9lmYrwgoP9RTpAjSHiJxdp4oidAQVO02T7HER3xj9UKue5534ULWeqVEkujhWcyvUce+d68w==",
"requires": {
"@types/connect": "*",
"@types/node": "*"
......@@ -163,9 +163,9 @@
}
},
"@types/express": {
"version": "4.17.0",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.0.tgz",
"integrity": "sha512-CjaMu57cjgjuZbh9DpkloeGxV45CnMGlVd+XpG7Gm9QgVrd7KFq+X4HY0vM+2v0bczS48Wg7bvnMY5TN+Xmcfw==",
"version": "4.17.1",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.1.tgz",
"integrity": "sha512-VfH/XCP0QbQk5B5puLqTLEeFgR8lfCJHZJKkInZ9mkYd+u8byX0kztXEQxEk4wZXJs8HI+7km2ALXjn4YKcX9w==",
"requires": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
......@@ -182,9 +182,9 @@
}
},
"@types/express-serve-static-core": {
"version": "4.16.7",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.7.tgz",
"integrity": "sha512-847KvL8Q1y3TtFLRTXcVakErLJQgdpFSaq+k043xefz9raEf0C7HalpSY7OW5PyjCnY8P7bPW5t/Co9qqp+USg==",
"version": "4.16.9",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.9.tgz",
"integrity": "sha512-GqpaVWR0DM8FnRUJYKlWgyARoBUAVfRIeVDZQKOttLFp5SmhhF9YFIYeTPwMd/AXfxlP7xVO2dj1fGu0Q+krKQ==",
"requires": {
"@types/node": "*",
"@types/range-parser": "*"
......@@ -204,9 +204,9 @@
"integrity": "sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw=="
},
"@types/node": {
"version": "12.6.8",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.8.tgz",
"integrity": "sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg=="
"version": "12.7.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.12.tgz",
"integrity": "sha512-KPYGmfD0/b1eXurQ59fXD1GBzhSQfz6/lKBxkaHX9dKTzjXbK68Zt7yGUxUsCS1jeTy/8aL+d9JEr+S54mpkWQ=="
},
"@types/range-parser": {
"version": "1.2.3",
......@@ -214,9 +214,9 @@
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA=="
},
"@types/serve-static": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz",
"integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
"version": "1.13.3",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.3.tgz",
"integrity": "sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g==",
"requires": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
......@@ -256,57 +256,6 @@
"vary": "~1.1.0"
}
},
"acl": {
"version": "0.4.11",
"resolved": "https://registry.npmjs.org/acl/-/acl-0.4.11.tgz",
"integrity": "sha1-ACzHZuvyXNqP5TK1bzZRvr2yWzo=",
"requires": {
"async": "^2.1.4",
"bluebird": "^3.0.2",
"lodash": "^4.17.3",
"mongodb": "^2.0.47",
"redis": "^2.2.5"
},
"dependencies": {
"mongodb": {
"version": "2.2.36",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.36.tgz",
"integrity": "sha512-P2SBLQ8Z0PVx71ngoXwo12+FiSfbNfGOClAao03/bant5DgLNkOPAck5IaJcEk4gKlQhDEURzfR3xuBG1/B+IA==",
"requires": {
"es6-promise": "3.2.1",
"mongodb-core": "2.1.20",
"readable-stream": "2.2.7"
}
},
"process-nextick-args": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
},
"readable-stream": {
"version": "2.2.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.7.tgz",
"integrity": "sha1-BwV6y+JGeyIELTb5jFrVBwVOlbE=",
"requires": {
"buffer-shims": "~1.0.0",
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "~1.0.0",
"process-nextick-args": "~1.0.6",
"string_decoder": "~1.0.0",
"util-deprecate": "~1.0.1"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"acorn": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.6.2.tgz",
......@@ -449,19 +398,9 @@
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"async": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
"integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
"requires": {
"lodash": "^4.17.14"
},
"dependencies": {
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
}
}
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
},
"async-limiter": {
"version": "1.0.0",
......@@ -744,11 +683,6 @@
"concat-map": "0.0.1"
}
},
"bson": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz",
"integrity": "sha512-IQX9/h7WdMBIW/q/++tGd+emQr0XMdeZ6icnT/74Xk9fnabWn+gZgpE+9V+gujL3hhJOoNrnDVY7tWdzc7NUTg=="
},
"buffer-crc32": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
......@@ -764,11 +698,6 @@
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz",
"integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ=="
},
"buffer-shims": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
"integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E="
},
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
......@@ -1342,11 +1271,6 @@
"resolved": "https://registry.npmjs.org/es6-error/-/es6-error-2.1.1.tgz",
"integrity": "sha1-kThDAexe0cmnJH0RKCRyFvA1R80="
},
"es6-promise": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz",
"integrity": "sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q="
},
"escape-regexp": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/escape-regexp/-/escape-regexp-0.0.1.tgz",
......@@ -1596,9 +1520,9 @@
"integrity": "sha1-YZegldX7a1folC9v1+qtY6CclFI="
},
"eventemitter3": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz",
"integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q=="
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz",
"integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg=="
},
"express-jwt": {
"version": "5.3.1",
......@@ -1609,13 +1533,6 @@
"express-unless": "^0.3.0",
"jsonwebtoken": "^8.1.0",
"lodash.set": "^4.0.0"
},
"dependencies": {
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
}
}
},
"express-unless": {
......@@ -1676,9 +1593,9 @@
"dev": true
},
"fast-safe-stringify": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
},
"fd-slicer": {
"version": "1.1.0",
......@@ -1758,9 +1675,9 @@
}
},
"forwarded-for": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/forwarded-for/-/forwarded-for-1.0.1.tgz",
"integrity": "sha1-59pIFAJRaP/AoQ0/954UFfRq9Gk="
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/forwarded-for/-/forwarded-for-1.1.0.tgz",
"integrity": "sha512-1Yam9ht7GyMXMBvuwJfUYqpdtLVodtT5ee5JMBzGiSwVVeh37ZN8LuOWkNHd6ho2zUxpSZCHuQrt1Vjl2AxDNA=="
},
"fresh": {
"version": "0.5.2",
......@@ -2278,9 +2195,9 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"semver": {
"version": "5.7.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA=="
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
}
}
},
......@@ -2585,23 +2502,24 @@
}
},
"mbjs-generic-api": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/mbjs-generic-api/-/mbjs-generic-api-1.2.3.tgz",
"integrity": "sha512-bvROTVvrJ8hewmEpAeEfKjz53oa+7fY0xgAltGsKkQHHYn5LrXihoFx6iyOEknkZJFgv+twsOiSJ+voLwesSUQ==",
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/mbjs-generic-api/-/mbjs-generic-api-1.3.3.tgz",
"integrity": "sha512-qdtQmNTA2O6YXAc+wMPJrnkutEgIp1hnwvwPRFd8l4moZP8zJ8xQY1/Qi+89j6/hF9TL6hAqXXO1DyGAZyZHjA==",
"requires": {
"@polka/send-type": "^0.4.0",
"acl": "^0.4.11",
"axios": "^0.18.0",
"body-parser": "^1.18.3",
"config": "^2.0.1",
"cors": "^2.8.4",
"cote": "^0.20.0",
"express-jwt": "^5.3.1",
"jwks-rsa": "^1.3.0",
"mbjs-persistence": "1.0.0",
"mbjs-persistence": "1.1.1",
"mbjs-utils": "0.0.5",
"memcached": "^2.2.2",
"mongodb": "^3.1.1",
"morgan": "^1.9.0",
"nedb": "^1.8.0",
"polka": "^0.4.0",
"primus": "^7.2.2",
"prom-client": "^11.1.1",
......@@ -2612,14 +2530,6 @@
"winston": "^3.0.0"
},
"dependencies": {
"mbjs-persistence": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/mbjs-persistence/-/mbjs-persistence-1.0.0.tgz",
"integrity": "sha512-Z+bmR8mCODYzbh5K6L2sAOBmwl/e1va/jeN5inhTmtVb4IrH0fe0l3jnRHnQRpXNJc9X+XLgorXH5pmb+kckHQ==",
"requires": {
"mbjs-utils": "0.0.5"
}
},
"mbjs-utils": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/mbjs-utils/-/mbjs-utils-0.0.5.tgz",
......@@ -2830,15 +2740,6 @@
}
}
},
"mongodb-core": {
"version": "2.1.20",
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.20.tgz",
"integrity": "sha512-IN57CX5/Q1bhDq6ShAR6gIv4koFsZP7L8WOK1S0lR0pVDQaScffSMV5jxubLsmZ7J+UdqmykKw4r9hG3XQEGgQ==",
"requires": {
"bson": "~1.0.4",
"require_optional": "~1.0.0"
}
},
"morgan": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz",
......@@ -2905,9 +2806,9 @@
}
},
"nanoid": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.0.3.tgz",
"integrity": "sha512-NbaoqdhIYmY6FXDRB4eYtDVC9Z9eCbn8TyaiC16LNKtpPv/aqa0tOPD8y6gNE4yUNnaZ7LLhYtXOev/6+cBtfw=="
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.3.tgz",
"integrity": "sha512-SbgVmGjEUAR/rYdAM0p0TCdKtJILZeYk3JavV2cmNVmIeR0SaKDudLRk58au6gpJqyFM9qz8ufEsS91D7RZyYA=="
},
"natural-compare": {
"version": "1.4.0",
......@@ -3210,19 +3111,19 @@
"dev": true
},
"primus": {
"version": "7.3.3",
"resolved": "https://registry.npmjs.org/primus/-/primus-7.3.3.tgz",
"integrity": "sha512-e/w6bY8I/7Y7gWV/yew9rodf682wNP0sGnHiXstf3WIndzMFBqOwKdbkr89w4MfdaUvZ3SkwwGGieDKuVVSPmQ==",
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/primus/-/primus-7.3.4.tgz",
"integrity": "sha512-ZLSEak5n0R2odJ609a3Dzlor1zPSDMYMYiAELfnhBumCa57WpvZsY3atjG4CxlPTcNYJ/OV18p+mRYyO1+DMww==",
"requires": {
"access-control": "~1.0.0",
"asyncemit": "~3.0.1",
"create-server": "~1.0.1",
"diagnostics": "~2.0.0",
"eventemitter3": "~3.1.0",
"forwarded-for": "~1.0.1",
"eventemitter3": "~4.0.0",
"forwarded-for": "~1.1.0",
"fusing": "~1.0.0",
"nanoid": "~2.0.0",
"setheader": "~1.0.0",
"nanoid": "~2.1.0",
"setheader": "~1.0.2",
"ultron": "~1.1.0"
}
},
......@@ -3612,9 +3513,9 @@
}
},
"setheader": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/setheader/-/setheader-1.0.1.tgz",
"integrity": "sha512-iNDik8ipRBZHfpbpdWlhfZxc0JM9Cg4NYo8jqBkjSRLPxvcgnrE9oiF3AhpFvypg2erVyWNS+QhykhQt0G9tpA==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/setheader/-/setheader-1.0.2.tgz",
"integrity": "sha512-A704nIwzqGed0CnJZIqDE+0udMPS839ocgf1R9OJ8aq8vw4U980HWeNaD9ec8VnmBni9lyGEWDedOWXT/C5kxA==",
"requires": {
"diagnostics": "1.x.x"
},
......@@ -3862,12 +3763,12 @@
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
},
"storage-engine": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/storage-engine/-/storage-engine-3.0.4.tgz",
"integrity": "sha512-hIKs+dCxOrsNrXkswZ3ptqqAfeDWwgQcFNXfBXZ9JTltclH8y+hLNnyYqH+UIJc0xVkTrB9J1mF/QzS/eREA0w==",
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/storage-engine/-/storage-engine-3.0.7.tgz",
"integrity": "sha512-V/jJykpPdsyDImLwu19syIAWn/Tb41tBDikQS+aQPH2h2OgqdLxwOg7wI9nPH3Y0Mh1ce566JZl2u+4eH1nAsg==",
"requires": {
"enabled": "^2.0.0",
"eventemitter3": "^3.1.0"
"eventemitter3": "^4.0.0"
},
"dependencies": {
"enabled": {
......@@ -4271,6 +4172,14 @@
"winston-transport": "^4.3.0"
},
"dependencies": {
"async": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
"integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
"requires": {
"lodash": "^4.17.14"
}
},
"diagnostics": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz",
......@@ -4281,6 +4190,11 @@
"kuler": "1.0.x"
}
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"readable-stream": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
......
......@@ -15,18 +15,22 @@ class PBA extends TinyEmitter {
}
async _performRequest (path) {
const result = await axios.get(`${config.pba.baseUrl}/${path}`, { auth: config.pba.credentials })
return result.data
if (config.pba.baseUrl) {
const result = await axios.get(`${config.pba.baseUrl}/${path}`, { auth: config.pba.credentials })
return result.data
}
}
async getPiecesHandler (req, res) {
const result = await this._performRequest('pieces')
this._response(req, res, result.pieces)
if (result) this._response(req, res, result.pieces)
else this._errorResponse({}, 503, 'PBA vocabularies not available')
}
async getTitlesForPieceHandler (req, res) {
const result = await this._performRequest(`titles/${req.params.piece_id}`)
this._response(req, res, result.titles)
if (result) this._response(req, res, result.titles)
else this._errorResponse({}, 503, 'PBA vocabularies not available')
}
_response (req, res, data = {}) {
......