Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 7f3cca1

Browse files
authored
Merge pull request #2944 from withspectrum/2.2.7
2.2.7
2 parents 1f14d80 + 3e75dbc commit 7f3cca1

File tree

105 files changed

+2466
-1167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+2466
-1167
lines changed

.circleci/config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ aliases:
3939
name: Setup and build
4040
command:
4141
|
42+
cp now-secrets.example.json now-secrets.json
4243
yarn run build:web
4344
yarn run build:api
4445

@@ -107,10 +108,10 @@ jobs:
107108
- run:
108109
name: Danger
109110
when: always
110-
command: test -z $DANGER_GITHUB_API_TOKEN && yarn run danger ci || echo "forks are not allowed to run danger"
111+
command: test $DANGER_GITHUB_API_TOKEN && yarn run danger ci || echo "forks are not allowed to run danger"
111112
- run:
112113
name: Run E2E Tests
113-
command: yarn run test:e2e
114+
command: test $CYPRESS_RECORD_KEY && yarn run test:e2e -- --record || yarn run test:e2e
114115

115116
# Run eslint, flow etc.
116117
test_static_js:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- mercury
1313
- hermes
1414
- chronos
15+
- pluto
1516
- mobile
1617

1718
**Run database migrations (delete if no migration was added)**

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ api/.env
3131
.expo
3232
mobile/.expo
3333
test-results.json
34+
public/uploads

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
flow-typed
2+
package.json

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5"
4+
}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ yarn run db:seed
190190
# ⚠️ To empty the database (e.g. if there's faulty data) run yarn run db:drop
191191
```
192192

193+
There's a shortcut for dropping, migrating and seeding the database too:
194+
```sh
195+
yarn run db:reset
196+
```
197+
193198
#### Getting the secrets
194199

195200
While the app will run without any secrets set up, you won't be able to sign in locally. To get that set up, copy the provided example secrets file to the real location:

admin/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@
4444
"subscriptions-transport-ws": "^0.9.5"
4545
},
4646
"scripts": {
47-
"start": "react-scripts start",
48-
"build": "react-scripts build",
49-
"test": "react-scripts test --env=jsdom",
50-
"eject": "react-scripts eject",
51-
"predeploy": "npm run build",
52-
"deploy": "now build"
47+
"start": "NODE_PATH=../ react-scripts start",
48+
"build": "NODE_PATH=../ react-scripts build",
49+
"test": "NODE_PATH=../ react-scripts test --env=jsdom"
5350
}
5451
}

api/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import express from 'express';
1111
import Raven from 'shared/raven';
1212
import { ApolloEngine } from 'apollo-engine';
1313
import toobusy from 'shared/middlewares/toobusy';
14+
import addSecurityMiddleware from 'shared/middlewares/security';
1415
import { init as initPassport } from './authentication.js';
1516
import type { DBUser } from 'shared/types';
1617

@@ -28,6 +29,9 @@ app.set('trust proxy', true);
2829
// Return the request if the server is too busy
2930
app.use(toobusy);
3031

32+
// Security middleware.
33+
addSecurityMiddleware(app);
34+
3135
// Send all responses as gzip
3236
app.use(compression());
3337

api/models/community.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22
const { db } = require('./db');
33
import { parseRange } from './utils';
4-
import { uploadImage } from '../utils/s3';
4+
import { uploadImage } from '../utils/file-storage';
55
import getRandomDefaultPhoto from '../utils/get-random-default-photo';
66
import {
77
sendNewCommunityWelcomeEmailQueue,

api/models/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22
const { db } = require('./db');
3-
import { uploadImage } from '../utils/s3';
3+
import { uploadImage } from '../utils/file-storage';
44
import { createNewUsersSettings } from './usersSettings';
55
import { sendNewUserWelcomeEmailQueue } from 'shared/bull/queues';
66
import type { PaginationOptions } from '../utils/paginate-arrays';

0 commit comments

Comments
 (0)