Commit Graph

27 Commits

Author SHA1 Message Date
Renovate Bot
7c2a4aff6e chore(deps): update dependency jest to v27 2021-07-06 19:01:17 +05:30
Ahmad Abdolsaheb
b3f2c64de8 fix(client): remove algolia and hot keys modules from landing pages (#42394)
* fix(client): remove algolia and hot keys from landing pages

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-06-24 12:50:36 +03:00
Huyen Nguyen
2c16234853 chore: add jest global variables (#42573) 2021-06-20 09:14:42 +02:00
Nicholas Carrigan (he/him)
7857c3932b fix: signout redirect (#42538)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-06-17 23:54:18 +05:30
Oliver Eyton-Williams
a555e013a0 refactor: remove unused env vars (#42500) 2021-06-15 09:57:10 -07:00
gikf
bc9e8a69de fix(client): display legacy certs like current ones (#42038)
* fix: display legacy certs like the current ones

* fix: link projects in legacy certs to project pages

* fix: update tests to changed legacy cert display

* fix: update tests for removed legacy certs forms

* fix: display legacy certs like the current ones

* fix: submit projects for cert on projects pages

* fix: remove legacy certs form submitting handling

* fix: move claiming cert setup before both tests

* fix: remove legacy cert update props and actions

* fix: remove legacy cert updates from api

* fix: correct merge conflict
2021-06-11 17:06:46 +01:00
Oliver Eyton-Williams
3875c6e619 fix: use env.json in both client and server (#42359) 2021-06-08 13:12:44 +01:00
Oliver Eyton-Williams
7b65909522 feat: make api only return json (#42320)
* fix(api): return json for delete + reset-progress

* refactor(api): make .json calls explicit

These .send() calls had objects as arguments. Using .json() makes it
explicit without changing behaviour.

* fix: return json or redirectWithFlash

We should never be getting requests for plain text, but if we do they
should be redirected back to the client.

* fix: prioritize JSON responses

If accepted, respond with JSON.  If not, it's probably a bad request.
2021-06-05 13:20:40 +01:00
Oliver Eyton-Williams
802273cf8a refactor: remove sinon (#42337) 2021-06-02 21:03:05 +05:30
Mrugesh Mohapatra
83943de719 chore: rollback CSRF token generation (#42082)
This reverts commit e1c00138a9.
2021-05-11 00:27:08 +05:30
Oliver Eyton-Williams
e1c00138a9 fix: generate csrf tokens on server (#41968)
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2021-05-10 21:40:42 +05:30
renovate[bot]
21dd80c47a chore(deps): update dependency prettier to v2.3.0 (#42074)
* chore(deps): update dependency prettier to v2.3.0

* chore: apply formating per prettier

* fix: correctly disable import/no-unresolved

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Mrugesh Mohapatra <hi@mrugesh.dev>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-05-10 08:48:49 -07:00
Ahmad Abdolsaheb
27c8d564e4 fix(client): replace Stripe with PayPal (#41924)
* feat: remove stripe payment option from client

* feat: remove stripe completely

* fix: remove last Stripe remnants

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-05-03 11:45:23 +03:00
Mrugesh Mohapatra
341fe76f0f chore: roll back CSRF changes for the weekend
This reverts commit 00193858a0.
2021-04-30 23:57:28 +05:30
Oliver Eyton-Williams
00193858a0 fix: generate csrf tokens on server not client (#41908)
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2021-04-30 09:42:26 +03:00
Shaun Hamilton
d3f59e6d5d fix(dev): rename superBlock with v7 to certSlug (#41738)
* fix(dev): rename superBlock with v7 to slug

* improve name slug -> certSlug

* superBlockTitle -> superBlock

* correct teeny, tiny mistake

* fix: correct slug to certSlug in certLocation

* refactor currentCerts

* rename showCert cert -> certSlug and various
2021-04-23 22:29:17 +03:00
Oliver Eyton-Williams
5d46e2830a feat: add Docker build (#41187)
* feat(docker): build and use client and api images

* feat: always use .env

dotenv fails without throwing if the .env file is missing and never
overwrites variables if they already exist. As such, we can use it in
build pipelines.

* fix: remove quotes from env vars

dotenv normalises quoted and unquoted strings (X=x, X='x' and
X="x") all become the same .env object {X: 'x'}. However, Docker's
env_file does not (the three cases are distinct).  As a result, we
should use unquoted strings for consistency.

* fix: provide custom warning when .env is missing

* feat(docker): include client-config

* fix(docker): remove build packages from api image

* fix(docker): run script from correct dir

* fix(docker): correct permissions and dests

* fix(docker): consolidate run steps

This is standard practice, but did not have a noticable affect on the
image size

* fix(docker): clean the npm cache

Prior to this step the image was 1.11GB uncompressed and we got a modest
saving, 1.09GB after.

* refactor(docker): regexless COPY directives

* feat(docker): use alpine

This shrinks the image down to 259MB

* fix(docker): update build scripts

* fix: correct the server Dockerfile RUNs

* DEBUG: expose mysql port for seeding

* chore: update client Dockerfile's node versions

* fix: remove executable permissions from index.js

It's not a cli, so I don't think it needs to be executable.

* chore: update node and remove stale comments

* feat: use ENTRYPOINT + CMD to allow runtime config

* fix: add CURRICULUM_LOCALE arg

* feat: allow client port configuration

* feat: allow api port to be configured

* refactor: use unique variable names for ports

* fix: add default CLIENT_PORT

* refactor: clean up
2021-04-20 19:29:31 +05:30
Ahmad Abdolsaheb
d5d786049e feat(api): stripe checkout integration (#41666)
* feat: add api stripe checkout integration

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-04-02 15:33:34 +09:00
Mrugesh Mohapatra
ad9b1f89d8 fix(api, client): update Gatsby, webpack & related things (#41452)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-03-25 12:13:43 -07:00
Oliver Eyton-Williams
e9b1247688 test(api): suppress expected log (#41502) 2021-03-16 09:53:08 -06:00
Mrugesh Mohapatra
6c91f81b0e chore(deps): upgrade eslint, prettier & related packages 2021-03-11 12:19:42 +05:30
Mrugesh Mohapatra
cd40d47363 chore(api): remove unused code and endpoints (#41332) 2021-03-05 02:30:11 +05:30
Mrugesh Mohapatra
b5f4754e2a fix: re-revert the API decoupling (#41263)
* fix(api): decouple api from curriculum

This reverts commit 8f0e441644 and
introduces the implementations from #40703.

* fix(gitpod): add curriculum build to GitPod

This reverts commit 706d70f58d and
introduces implementations from #41234.

* docs: update DevOps manual for api change (#41259)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-02-25 12:02:35 -08:00
Mrugesh Mohapatra
8f0e441644 revert(api): decouple api from curriculum
This reverts commit c077ffe4b9
via PR #40703
2021-02-25 03:40:09 +05:30
Ahmad Abdolsaheb
3bf52faeaa fix: dry certification config (#40927)
* fix: move cert config to config

* fix: move gitHubUserAgent to misc

* feat: rename maps

* feat: relocate oldDataVizId

* fix: correct path for gitHubUserAgent

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-02-22 20:38:38 -08:00
Oliver Eyton-Williams
f8699a8d55 refactor: simplify challenge.block usage (#41185) 2021-02-23 09:52:48 +05:30
Oliver Eyton-Williams
c077ffe4b9 feat(api): decouple api from curriculum (#40703) 2021-02-22 12:23:59 +05:30