Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cokoapps/server
  • jgutix/server
2 results
Show changes
Commits on Source (7)
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.2.0](https://gitlab.coko.foundation/cokoapps/server/compare/v1.1.0...v1.2.0) (2020-05-28)
### Features
* **server:** export BaseModel ([82e7cd5](https://gitlab.coko.foundation/cokoapps/server/commit/82e7cd5c4de4d0b9e0017c24a52fee0cb36bdc62))
* **server:** export logger ([a3dfd2b](https://gitlab.coko.foundation/cokoapps/server/commit/a3dfd2b0df720cbb96c71c5c95977625058f97dc))
## [1.1.0](https://gitlab.coko.foundation/cokoapps/server/compare/v1.0.0...v1.1.0) (2020-05-20) ## [1.1.0](https://gitlab.coko.foundation/cokoapps/server/compare/v1.0.0...v1.1.0) (2020-05-20)
......
...@@ -7,7 +7,10 @@ It is also meant to bundle as many server-side pubsweet dependencies as possible ...@@ -7,7 +7,10 @@ It is also meant to bundle as many server-side pubsweet dependencies as possible
Install package and remove the dependencies it is meant to replace. Install package and remove the dependencies it is meant to replace.
```sh ```sh
yarn remove pubsweet pubsweet-server # if migrating from an existing project ## if migrating from an existing project
yarn remove pubsweet pubsweet-server @pubsweet/logger @pubsweet/base-model
##
yarn add @coko/server yarn add @coko/server
``` ```
...@@ -128,7 +131,26 @@ If you run your client on a different host/port than the server, you might run i ...@@ -128,7 +131,26 @@ If you run your client on a different host/port than the server, you might run i
### Other exports from included packages ### Other exports from included packages
- `createJWT` is an export of a function in `pubsweet-server` that does just that. Useful if you have custom login resolvers. ##### Logger
Returns pubsweet's logger
```js
const { logger } = require('@coko/server')
```
##### Base Model
Returns pubsweet's base model
```js
const { BaseModel } = require('@coko/server')
```
##### createJWT
`createJWT` is an export of a function in `pubsweet-server` that does just that.
Useful if you have custom login resolvers.
### Future features ### Future features
......
{ {
"name": "@coko/server", "name": "@coko/server",
"version": "1.1.0", "version": "1.2.0",
"description": "A tweaked version of pubsweet-server for use by Coko's projects", "description": "A tweaked version of pubsweet-server for use by Coko's projects",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
"access": "public" "access": "public"
}, },
"dependencies": { "dependencies": {
"@pubsweet/base-model": "^3.6.5",
"@pubsweet/errors": "^2.0.32", "@pubsweet/errors": "^2.0.32",
"@pubsweet/logger": "^0.2.42", "@pubsweet/logger": "^0.2.42",
"@pubsweet/models": "^0.3.7", "@pubsweet/models": "^0.3.7",
......
const cron = require('node-cron') const cron = require('node-cron')
const BaseModel = require('@pubsweet/base-model')
const authentication = require('pubsweet-server/src/authentication') const authentication = require('pubsweet-server/src/authentication')
const logger = require('@pubsweet/logger')
const app = require('./app') const app = require('./app')
...@@ -10,4 +12,6 @@ module.exports = { ...@@ -10,4 +12,6 @@ module.exports = {
app, app,
cron, cron,
createJWT, createJWT,
logger,
BaseModel,
} }
...@@ -411,6 +411,34 @@ ...@@ -411,6 +411,34 @@
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=
"@pubsweet/base-model@^3.6.5":
version "3.6.5"
resolved "https://registry.yarnpkg.com/@pubsweet/base-model/-/base-model-3.6.5.tgz#a2a6dd9be999b8360abbb0a4a1a22cb9b6b7aa37"
integrity sha512-zhqh8cQL+0rE1U0PbeKUy+Vr7BvF4D/AoW57pI6JnGBZ8iaLtes49Vbzgj4aykQZKgzxraXyJssFHAn1E74TSQ==
dependencies:
"@pubsweet/db-manager" "^3.1.10"
"@pubsweet/errors" "^2.0.35"
"@pubsweet/logger" "^0.2.45"
knex "^0.16.3"
lodash "^4.17.11"
objection "^1.5.3"
uuid "^3.3.2"
"@pubsweet/db-manager@^3.1.10":
version "3.1.10"
resolved "https://registry.yarnpkg.com/@pubsweet/db-manager/-/db-manager-3.1.10.tgz#a4165be9199fc2d04150ad746d9d328d9ab91c46"
integrity sha512-h9jW/IIYlMgV5exqZZdpmgp6L8Ef8+aVHI7c6nNQT2jaJIVR3ZhmgrjNNWnT9faptInoU/VoF6JUz5/vZKIBAg==
dependencies:
"@hapi/joi" "^14.3.0"
"@pubsweet/logger" "^0.2.45"
fs-extra "^8.1.0"
knex "^0.16.3"
lodash "^4.17.11"
objection "^1.5.3"
pg "^7.8.0"
tmp-promise "^2.0.0"
umzug "^2.1.0"
"@pubsweet/db-manager@^3.1.7": "@pubsweet/db-manager@^3.1.7":
version "3.1.7" version "3.1.7"
resolved "https://registry.yarnpkg.com/@pubsweet/db-manager/-/db-manager-3.1.7.tgz#504b78f036240d3b2e2144caff424fcf38beb72a" resolved "https://registry.yarnpkg.com/@pubsweet/db-manager/-/db-manager-3.1.7.tgz#504b78f036240d3b2e2144caff424fcf38beb72a"
...@@ -433,6 +461,13 @@ ...@@ -433,6 +461,13 @@
dependencies: dependencies:
http-status-codes "^1.3.0" http-status-codes "^1.3.0"
"@pubsweet/errors@^2.0.35":
version "2.0.35"
resolved "https://registry.yarnpkg.com/@pubsweet/errors/-/errors-2.0.35.tgz#40a0c231cf5a7ab4aeafd6d20835a092fd55fcec"
integrity sha512-u3eR2lFDydyIVZkxkfXUHhfw0i7usOSVlPmBlcr547qGADPJ8HB4lMTSFoq20Ks7Vij3xeW1Vu6r2Mfqo3uRhQ==
dependencies:
http-status-codes "^1.3.0"
"@pubsweet/logger@^0.2.42": "@pubsweet/logger@^0.2.42":
version "0.2.42" version "0.2.42"
resolved "https://registry.yarnpkg.com/@pubsweet/logger/-/logger-0.2.42.tgz#e2fa0e053441868d090bcfff36333ffabda550ee" resolved "https://registry.yarnpkg.com/@pubsweet/logger/-/logger-0.2.42.tgz#e2fa0e053441868d090bcfff36333ffabda550ee"
...@@ -441,6 +476,14 @@ ...@@ -441,6 +476,14 @@
"@hapi/joi" "^14.5.0" "@hapi/joi" "^14.5.0"
config "^3.0.1" config "^3.0.1"
"@pubsweet/logger@^0.2.45":
version "0.2.45"
resolved "https://registry.yarnpkg.com/@pubsweet/logger/-/logger-0.2.45.tgz#dbf176a5816e4c5fbc4ba0fed5c996fa2e24c288"
integrity sha512-9s4cb+3vgPGQT6JUbDaiX3Q0KSU2vFDB+jMAj96RlIn88PUVa6dHBJBb1V7SMlPQ493S9dfOJ3lFJQhh+HNA5Q==
dependencies:
"@hapi/joi" "^14.5.0"
config "^3.0.1"
"@pubsweet/models@^0.3.7": "@pubsweet/models@^0.3.7":
version "0.3.7" version "0.3.7"
resolved "https://registry.yarnpkg.com/@pubsweet/models/-/models-0.3.7.tgz#b19bf7b615329e2fdeab6acb64a892d2663c3569" resolved "https://registry.yarnpkg.com/@pubsweet/models/-/models-0.3.7.tgz#b19bf7b615329e2fdeab6acb64a892d2663c3569"
......