...
 
Commits (2)
......@@ -32,7 +32,6 @@ const getTeamByType = (teams, type) => teams && teams.find(t => t.role === type)
/* eslint-disable-next-line arrow-body-style */
const mapProps = args => {
console.log(args)
return {
authorArticles: get(
args.getDashboardArticlesQuery,
......
......@@ -124,6 +124,7 @@
"identity-obj-proxy": "^3.0.0",
"jest": "^23.1.0",
"lint-staged": "^7.2.0",
"nodemon": "^1.19.1",
"prettier": "^1.13.2",
"standard-version": "5.0.1",
"string-replace-loader": "^2.1.1",
......@@ -147,12 +148,12 @@
"lint": "eslint '**/*.js' && stylelint '**/*.js'",
"precommit": "lint-staged",
"release": "standard-version",
"resetdb": "node ./scripts/reset.js && pubsweet setupdb --clobber && npm run seed",
"seed": "node ./scripts/seedTeams.js",
"resetdb": "sh ./scripts/resetDb.sh",
"seed:demo": "node ./scripts/seedDemoData.js",
"server": "pubsweet server",
"server:dev": "nodemon --exec 'pubsweet server' --watch server",
"server:production": "./scripts/runProductionServer.sh",
"setupdb": "pubsweet setupdb && npm run seed",
"setupdb": "sh ./scripts/setupDb.sh",
"test": "jest --maxWorkers=1 --config=.jest.config.js",
"testcafe": "source ./config/test.env && testcafe chromium e2e/"
},
......
#! /bin/sh
# Reset tables
node ./scripts/reset.js
CLOBBER=true
echo $CLOBBER
source ./scripts/setupDb.sh
#! usr/bin/env node
const logger = require('@pubsweet/logger')
// const { User } = require('pubsweet-server/src/models')
const { model: User } = require('@pubsweet/model-user')
const { User } = require('@pubsweet/models')
const users = [
{
......
#!/usr/bin/env node
const logger = require('@pubsweet/logger')
// const { Team } = require('pubsweet-server/src/models')
// const { model: Team } = require('@pubsweet/model-team')
const { Team } = require('@pubsweet/models')
const makeTeam = async type => {
......
#! /bin/sh
# Check that pubsweet is installed
if [ -f "./node_modules/.bin/pubsweet" ]
then
PUBSWEET='./node_modules/.bin/pubsweet'
else
echo 'Pubsweet is not installed. Make sure you have installed the application dependencies.'
exit 1
fi
# Default to development environment
NODE_ENV=${NODE_ENV:-development}
echo "environment is set as $NODE_ENV"
# Load environment variables
if [ -f "./config/$NODE_ENV.env" ]
then
echo "loading $NODE_ENV.env file"
source ./config/$NODE_ENV.env
fi
# Build setupdb options
[[ -v CLOBBER ]] && CL="--clobber"
[[ -v ADMIN_USERNAME ]] && AU="--username $ADMIN_USERNAME"
[[ -v ADMIN_PASSWORD ]] && AP="--password $ADMIN_PASSWORD"
[[ -v ADMIN_EMAIL ]] && AE="--email $ADMIN_EMAIL"
$PUBSWEET setupdb $CL $AU $AP $AE
node ./scripts/seedTeams.js
......@@ -11,9 +11,7 @@ const email = require('../services/email')
// const { model: Manuscript } = require('../src')
const { dbCleaner /* api */ } = require('pubsweet-server/test')
// const { User, Team } = require('pubsweet-server')
const { model: Team } = require('@pubsweet/model-team')
const { model: User } = require('@pubsweet/model-user')
const { Team, User } = require('@pubsweet/models')
const fixtures = require('pubsweet-server/test/fixtures/fixtures')
// const authentication = require('pubsweet-server/src/authentication')
......
const union = require('lodash/union')
const without = require('lodash/without')
// const { Team, User } = require('pubsweet-server')
const { model: Team } = require('@pubsweet/model-team')
const { model: User } = require('@pubsweet/model-user')
const { Team, User } = require('@pubsweet/models')
const { model: ExternalTeam } = require('../../models/externalTeam')
const { model: ExternalUser } = require('../../models/externalUser')
......
const clone = require('lodash/clone')
// const { Team } = require('pubsweet-server')
const { model: Team } = require('@pubsweet/model-team')
const { Team } = require('@pubsweet/models')
const Manuscript = require('../../manuscript/src/manuscript')
const ExternalTeam = require('../../models/externalTeam/externalTeam')
......
/* eslint-disable import/prefer-default-export */
const without = require('lodash/without')
// const { Team } = require('pubsweet-server/src/models')
// const { model: Team } = require('@pubsweet/model-team')
const { Team } = require('@pubsweet/models')
/*
......
// const { Team } = require('pubsweet-server')
const { model: Team } = require('@pubsweet/model-team')
const { Team } = require('@pubsweet/models')
const resolver = async (_, vars, ctx) => {
const { id } = vars
......
const BaseModel = require('@pubsweet/base-model')
// const { Team } = require('pubsweet-server')
const { model: Team } = require('@pubsweet/model-team')
const { Team } = require('@pubsweet/models')
class Manuscript extends BaseModel {
static get tableName() {
......
......@@ -4,9 +4,6 @@ const isEqual = require('lodash/isEqual')
const merge = require('lodash/merge')
const union = require('lodash/union')
// const { model: Team } = require('@pubsweet/model-team')
// const { model: User } = require('@pubsweet/model-user')
// const { Team, User } = require('pubsweet-server')
const { Team, User } = require('@pubsweet/models')
const Manuscript = require('./manuscript')
......
// const config = require('config')
const union = require('lodash/union')
// const { Team } = require('pubsweet-server')
const { model: Team } = require('@pubsweet/model-team')
const { Team } = require('@pubsweet/models')
const Review = require('./review')
const notify = require('../../services/notify')
......
const BaseModel = require('@pubsweet/base-model')
// const { Team } = require('pubsweet-server')
const { model: Team } = require('@pubsweet/model-team')
const { Team } = require('@pubsweet/models')
class Review extends BaseModel {
static get tableName() {
......
......@@ -17,9 +17,7 @@ jest.mock('../../../config/authsome.js', () => () => true)
const Review = require('../src/review')
const Manuscript = require('../../manuscript/src/manuscript')
const { dbCleaner, api } = require('pubsweet-server/test')
// const { User, Team } = require('pubsweet-server')
const { model: Team } = require('@pubsweet/model-team')
const { model: User } = require('@pubsweet/model-user')
const { Team, User } = require('@pubsweet/models')
const fixtures = require('pubsweet-server/test/fixtures/fixtures')
const authentication = require('pubsweet-server/src/authentication')
......
......@@ -3,10 +3,7 @@ const cheerio = require('cheerio')
const without = require('lodash/without')
const mailer = require('@pubsweet/component-send-email')
// const User = require('pubsweet-server/src/models/User')
// const Team = require('pubsweet-server/src/models/Team')
const { model: Team } = require('@pubsweet/model-team')
const { model: User } = require('@pubsweet/model-user')
const { Team, User } = require('@pubsweet/models')
const { model: ExternalUser } = require('../models/externalUser')
const Manuscript = require('../manuscript/src/manuscript')
......
// const Review = require('../server/review/src/review')
const Manuscript = require('../server/manuscript/src/manuscript')
const { dbCleaner, api } = require('pubsweet-server/test')
// const { User, Team } = require('pubsweet-server')
const { model: Team } = require('@pubsweet/model-team')
const { model: User } = require('@pubsweet/model-user')
const { Team, User } = require('@pubsweet/models')
const fixtures = require('pubsweet-server/test/fixtures/fixtures')
const authentication = require('pubsweet-server/src/authentication')
......
This diff is collapsed.