Commit Graph

477 Commits (ff28ea0d132c2980f6022ca1a62987866cf8ede3)

Author SHA1 Message Date
Oliver Eyton-Williams 112c485b12
feat: show upcoming certifications (#51198) 2023-08-14 19:19:10 +02:00
Oliver Eyton-Williams a12930c95c
feat: return certSlug on /certificate/showCert (#51209) 2023-08-14 15:52:40 +05:30
Oliver Eyton-Williams 019d7f0d97
refactor(api): remove extraneous lookup (#51210)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-08-11 14:18:34 +03:00
Rene Pot df49297de2
feat(api): improve performance with profanity filter replacement (#51112)
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
2023-08-08 15:27:41 -07:00
Oliver Eyton-Williams ada027798e
chore(api): remove unused legacyProjectData file (#51179) 2023-08-07 21:59:25 +07:00
Tom 80dba8fd30
feat(api): create endpoints for exams (#51062)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-08-03 09:34:47 -05:00
Oliver Eyton-Williams 984208f2a5
feat(api): check ms trophy urls exist (#51016)
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2023-08-02 14:10:25 -05:00
Oliver Eyton-Williams 5f475cefa6
refactor: use process.env in node environments (#51110) 2023-07-31 17:25:24 +02:00
Sem Bauke a7acb619a8
fix: remove Sentry debug endpoints (#51007) 2023-07-20 11:00:50 +04:00
Oliver Eyton-Williams e9bc3e5968
fix(api): require fcc repos for coderoad submissions (#50995) 2023-07-18 15:48:19 +02:00
Shaun Hamilton 414987ae2c
Merge pull request from GHSA-6c37-r62q-7xf4 2023-07-18 15:57:45 +05:30
Oliver Eyton-Williams 7fd74c8f5c
fix(tools): manage PM2 globally 2023-07-17 16:45:37 +05:30
Oliver Eyton-Williams e46386ddca
chore: remove old babel-core + plugins (#50671) 2023-06-14 13:14:46 +02:00
Oliver Eyton-Williams 9bb1cc56f1
fix: stop returning donationEmails (#50623) 2023-06-07 19:08:04 +04:00
Muhammed Mustafa e368410c89
feat(api): deprecate get account endpoint (#50419) 2023-06-02 08:09:54 +02:00
Oliver Eyton-Williams f3eb1eccb5
refactor: remove unused parts of api-server (#50513)
* refactor: remove unused parts of api-server
2023-05-30 22:54:19 +07:00
Oliver Eyton-Williams 404d3f1726
refactor(api): stop returning sessionMeta (#50482) 2023-05-30 10:18:47 +02:00
Oliver Eyton-Williams 1fc0bccb6f
refactor(api): stop returning streak (#50502)
The client does not use them. It calculates streaks from the calendar
property.
2023-05-24 19:16:29 +03:00
Muhammed Mustafa 4c5363bff0
fix(api-server): a typo in the info message for resubscribe (#50496) 2023-05-24 16:27:26 +02:00
Tom 4dfca3c560
feat: add exam environment (#50356)
* feat: add exam environment

* fix: cypress

* fix: lint-ts

* fix: lint-js

* fix: codefactor

* fix: don't translate comments from new JS spreadsheet

* fix: more tests

* fix: challenge schema

* fix: external curriculum test?

* fix: add more comments
2023-05-18 13:33:43 +02:00
Shaun Hamilton 5eb91a9043
chore(api-server): remove unused `is*` fields (#50346) 2023-05-10 11:59:40 +02:00
Shaun Hamilton e30e6d9f55
fix(api-server): check type of email to prevent throw (#50259) 2023-05-03 14:53:28 +02:00
Mrugesh Mohapatra b8dc4d5393
chore: update error message for Crash Dumps (#50213) 2023-04-28 17:17:55 -07:00
Shaun Hamilton 8300ccb7f0
fix(api-server): return usable flash type to client (#50082) 2023-04-17 23:18:18 +05:30
Muhammed Mustafa f08fe482d1
feat(api-server): show unique messages from api (#49781)
Show specific messages for API calls
2023-04-17 14:21:25 +01:00
Mrugesh Mohapatra e5590e56d7
chore: use pnpm v8 for deps (#49892)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-03-29 20:18:49 +05:30
Tom 605fdf220a
feat(curriculum): make college algebra with python live (#49695) 2023-03-23 21:57:32 +00:00
Shaun Hamilton 7d01522c0d
refactor(api): remove rx from `boot/challenge.js` (#49387)
* refactor(api): remove rx from `boot/challenge.js`

* fix: pass error to express

* refactor: do not use updated user

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

---------

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-03-16 20:39:28 +05:30
Shaun Hamilton c030757f03
refactor(api): remove rx from `boot/user.js` (#49386)
* refactor(api): remove rx from `boot/user.js`

* fix: handle async session user error

* fix lint: do not make changes without npm ci
2023-03-16 20:38:53 +05:30
Oliver Eyton-Williams 0cd3f7671a
chore(deps): add missing dependencies (#49703)
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
2023-03-14 17:25:15 +05:30
Tom b950070f80
feat(curriculum): add college algebra cert as upcoming change (#43605)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-03-10 10:55:50 +00:00
Oliver Eyton-Williams 16dec4ef86
feat: use pnpm to manage pm2 (#49574)
* fix(api): use pnpm to manage pm2

This means that pm2 will get the correct NODE_PATH environment variable.
Also, if we use pnpm to manage node, this ensure that pm2 will use that
node version.

* docs(devops): update api install and update docs

* feat: set node version via npmrc

This means that all scripts (pnpm run ...) will use this node version.
The only way to get other node versions is to invoke `node` directly.

* fix(docs): update api docs for pnpm installation

* feat: use pm2 from root

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-03-07 14:54:31 -08:00
Oliver Eyton-Williams d7848ae01a
feat: migrate to pnpm for better workspace DX (#49293)
* feat: npm -> pnpm 

This resolves the issues with the gatsby client (gatsby-plugin-pnpm
deals with the fact that gatsby is relying on its own dependencies
being de-duped)
and challenge-editor (which doesn't seem to want to automatically install
codemirror and needed its own eslint config)

* fix: correct mocha path for curriculum tests

* fix: use select workspace with -F not -w

* fix: reorganise packages and restrict hoisting

pnpm works best if the workspaces keep their own dependencies, since
dependencies are not flattened and then what node resolves from a
require is predictable.

@types seem to be a special case and more care is required to prevent
them getting smushed together in the root (hence the .npmrc)

* fix: add types for tools + root

* fix: decouple challenge-auditor from client

* fix: add ui-components types

* fix(client): use the latest types for react 16

* fix: prettify

* fix: prettierignore pnpm-lock

* fix: relax hoisting

Turns out pnpm works just fine with types. I don't know what was going
wrong before, but there are no-longer any type conflicts.

* fix: add @redux-saga/core to fix eslint issue

It seems to only be redux-saga that import/named can't cope with, so it
is probably okay to work around this one.

* chore: add chai to tools/scripts/build

* fix: add store to root for cypress

* fix: allow cypress to download binaries

If we want to keep preventing cypress from downloading binaries, we can
figure out a workaround, but I'm allowing it to ease the transition to
pnpm.

My guess about why this is happening is that npm triggers Cypress's
postinstall script, but pnpm does not (because pnpm install only
installs if necessary, perferring to link)

* chore: re-enable pre/post scripts

* fix: update build scripts for client

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* chore: update engines to use pnpm


* fix: enable choice of (super)block for tests

Only 'nix machines for now.

* chore: pin pnpm to version 7

* chore: remove last npms

Except web + curriculum-server. I'll update them when I start work on
them again.

* fix: lockfile check to catch any package-locks

* fix(action): install pnpm for upcoming tests

* chore: add nodemon to new api

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-03-02 18:17:44 +00:00
Tom 8f63733236
refactor(api): user token db query (#49406) 2023-02-23 17:50:04 +05:30
Mrugesh Mohapatra c252a84c4d
fix(sentry): disable sentry temporarily (#49443) 2023-02-20 17:17:28 +02:00
Mrugesh Mohapatra 537ef39a8d
feat(tools): sentry apm and other telemetry (#49385)
* feat(tools): sentry apm and other telemetry

* fix: use middleware json to remove duplication

---------

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-02-17 18:23:18 +05:30
Mrugesh Mohapatra 96a821a2ac
revert(tools): sentry apm and other telemetry (#49383)
Revert "feat(tools): sentry apm and other telemetry (#49230)"

This reverts commit b4fa56be3e.
2023-02-14 20:20:01 +05:30
Mrugesh Mohapatra b4fa56be3e
feat(tools): sentry apm and other telemetry (#49230) 2023-02-13 14:32:49 +00:00
Mrugesh Mohapatra ffc97f15d1
fix(api): update mobile-auth ratelimit config (#49194)
* fix(api): use proper name for collection

* fix(api): use the x-forwarded-for ip address
2023-02-10 13:13:54 +00:00
Mrugesh Mohapatra 9b6042e44d
feat: enable mobile auth endpoints (#49298
Reverts #49212
2023-02-09 14:01:13 +05:30
Mrugesh Mohapatra c3103bae3d
revert: mobile auth for unblocking deployments (#49212) 2023-01-31 22:06:17 +05:30
Niraj Nandish 96fc70db1d
feat: mobile auth (#48591)
Co-authored-by: sembauke <semboot699@gmail.com>
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2023-01-27 13:35:48 +05:30
Naomi Carrigan 193e03d286
feat: restrict update flag endpoint (#46314)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Sem Bauke <semboot699@gmail.com>
2023-01-19 16:16:17 +03:00
Ahmad Abdolsaheb bff61255f9
feat(donation): simplify donation client (#46379)
* feat: unify post payment actions

* feat: handle stripe card error and add donation after auth

* feat: add donation saga stripe test

* feat: add more coverage to stripe tests

* feat: add initial stripe card saga test

* feat: finalize initial stripe card saga test

* feat: add patreon test saga

* feat: test clean up

* feat: do not show processing for Patreon

* feat: normalize donation settings

* feat: turn payment provider/contex to enum

* feat: remove donation-settings.js

* fix: git ignore generated config

* fix: ignore the generate config from everything

* fix: remove types.js

* fix: update linting to include types.js

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2022-12-20 18:03:06 +05:30
Shaun Hamilton ec3ee856ec
feat(tools): ignore no-unused-vars on underscore (#48386) 2022-11-04 10:43:46 +05:30
Mrugesh Mohapatra b393d88b9e
refactor: s/all-langs/i18n/g (#48258) 2022-10-26 10:08:27 -07:00
Shaun Hamilton 326e00fab8
fix(server): default to log `fcc` namespaces, unless env set (#48143) 2022-10-21 22:53:04 +05:30
Mrugesh Mohapatra 092d7d04d6
feat(api): add redirect for users blocked by okta (#47992)
* feat(api): add redirect for users blocked by okta

* fix: redirect blocked users immediately

* fix: return early if no userInfo

We can't proceed without it, so we have to ask the user to try again.

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-10-12 20:28:21 +05:30
SADIK KUZU 3522ce6f34
fix(api): write variable names in correct manner (#47883) 2022-10-11 17:25:56 +02:00
Shaun Hamilton 3a4640b678
fix(api): reorder certificate early returns (#47656) 2022-09-29 11:42:34 -07:00