Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3 #470

Draft
wants to merge 182 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
e18d060
refactor(server): move most server code to be self-contained
ethanwu10 Aug 8, 2020
f45e55f
feat(client): add initial client webpack setup
ginkoid Aug 7, 2020
99eda61
chore: clean up lint & config
ethanwu10 Aug 8, 2020
7db6f0c
feat(client): initial storybook/jest setup
ethanwu10 Aug 9, 2020
1df715a
feat(client): storybook addons
ethanwu10 Aug 9, 2020
664c787
feat(client): finish setting up Jest
ethanwu10 Aug 9, 2020
474b680
chore(client): add test story + snapshot
ethanwu10 Aug 9, 2020
b9aa83b
refactor(server): switch to Jest for tests
ethanwu10 Aug 9, 2020
b116605
feat(client): add most mutation api hooks
ginkoid Aug 9, 2020
fff6b23
fix: clean up coverage / test configuration
ethanwu10 Aug 9, 2020
8b37554
fix: fix CI jobs + cleanup package.json
ethanwu10 Aug 9, 2020
e174530
fix: fix CI jobs harder
ethanwu10 Aug 9, 2020
6f1df1b
fix: fix CI jobs harderer
ethanwu10 Aug 9, 2020
2ae2d84
test: cleanup users after tests are run
ginkoid Aug 9, 2020
d49195d
Merge branch 'next' of https://github.com/redpwn/rctf into next
ginkoid Aug 9, 2020
c75672f
test: remove labels on afterAll calls
ginkoid Aug 9, 2020
5e02035
fix: fix CI jobs hardererer
ethanwu10 Aug 9, 2020
e949f32
ci: enable jest color
ethanwu10 Aug 9, 2020
0032e9a
test(server): 5to6 test code
ethanwu10 Aug 9, 2020
55f5aaf
refactor: clean up typescript config
ethanwu10 Aug 9, 2020
7e398c0
refactor(server): modularize config loading
ethanwu10 Aug 9, 2020
87ed1ab
refactor(client): make fetcher types stricter
ethanwu10 Aug 10, 2020
b210dbe
feat(client): add basic navbar components
ethanwu10 Aug 10, 2020
90b1456
fix(client): switch snapshot renderer
ethanwu10 Aug 10, 2020
65a3f69
ci: fix CI jobs harderererer
ethanwu10 Aug 10, 2020
7e3f39a
chore: improve Jest config
ethanwu10 Aug 10, 2020
23c36eb
test(server): improve config mocking
ethanwu10 Aug 10, 2020
16bc62c
test(server): add auth token unit tests
ethanwu10 Aug 10, 2020
2980861
fix: fix watch:ts script
ginkoid Aug 10, 2020
eb77872
build(deps-dev): upgrade Jest and @types/react
ethanwu10 Aug 10, 2020
83a7ce5
feat(client): add TextInput component
ethanwu10 Aug 11, 2020
e067e5f
build(deps-dev): update @prefresh/webpack
ethanwu10 Aug 11, 2020
2bfff94
fix(client): improve TextInput typing
ethanwu10 Aug 11, 2020
457e43b
test(client): add tests for TextInput
ethanwu10 Aug 11, 2020
a81e70d
test(client): improve TextInput tests + lint rules
ethanwu10 Aug 11, 2020
b33c821
feat(client): improve TextInput
ethanwu10 Aug 11, 2020
1610960
feat(client): add disabled state to TextInput
ethanwu10 Aug 11, 2020
6cd54ad
fix(client): remove will-change
ethanwu10 Aug 11, 2020
71d6bd2
fix(client): speed up TextInput animations
ethanwu10 Aug 11, 2020
df58df8
feat(client): support placeholder in TextInput
ethanwu10 Aug 11, 2020
b44a247
feat(client): add Button component
ethanwu10 Aug 11, 2020
e3a9a60
feat(client): add outline Button
ethanwu10 Aug 11, 2020
24b90a9
chore: run Jest pre-commit hook in CI mode
ethanwu10 Aug 11, 2020
e3b4a24
feat(server): add postmark email provider
ginkoid Aug 11, 2020
27e04b9
feat(server): remove unused postmark type
ginkoid Aug 11, 2020
e85d3f3
docs: add env config docs
ginkoid Aug 11, 2020
ce2d5ba
refactor(client): update stories to Args/Controls format
ethanwu10 Aug 11, 2020
1a24905
feat(server): prioritize env vars for provider config
ginkoid Aug 11, 2020
c74913b
Merge branch 'next' into feature/http-mail-provider
ginkoid Aug 11, 2020
7bd5af1
Merge pull request #483 from redpwn/feature/http-mail-provider
ginkoid Aug 12, 2020
1c299a9
fix: remove commented out config
ethanwu10 Aug 12, 2020
9520783
chore: fix package.json details
ethanwu10 Aug 12, 2020
3bf1e24
docs: use mkdocs-awesome-pages-plugin over nav config
ginkoid Aug 16, 2020
7b3316e
feat(client): allow config of favicon
ginkoid Aug 16, 2020
aedff6d
test(server): create challenges during tests
ginkoid Aug 16, 2020
7099384
refactor: use lerna / yarn workspaces
ethanwu10 Aug 16, 2020
66ebeb7
fix: fix dev scripts
ethanwu10 Aug 16, 2020
02bb0da
Merge branch 'next' into refactor/lerna
ethanwu10 Aug 16, 2020
6b6d870
ci: fix migrate script
ethanwu10 Aug 16, 2020
6513503
refactor(server): rename conf.d to rctf.d
ginkoid Aug 16, 2020
45b0cbb
fix(build): fix Dockerfile
ethanwu10 Aug 16, 2020
4c45b3c
fix(build): improve Docker build
ethanwu10 Aug 16, 2020
63f0bd7
ci: run Docker build (but don't push) on all CI runs
ethanwu10 Aug 16, 2020
64f6b71
fix(deps-dev): clean up root devDeps
ethanwu10 Aug 16, 2020
29fc9ce
build(client): centralize Babel config
ethanwu10 Aug 17, 2020
e710a02
build: add script for creating migrations
ethanwu10 Aug 17, 2020
6571b22
fix(client): fix missing react-dom alias
ethanwu10 Aug 17, 2020
874fc3a
feat(server): remove packages from run stage
ginkoid Aug 17, 2020
918efce
Merge pull request #487 from redpwn/refactor/lerna
ethanwu10 Aug 17, 2020
0dce9f7
refactor(server): support server restarts for local upload provider
ginkoid Aug 17, 2020
64acb2f
Merge branch 'master' into next
ginkoid Aug 17, 2020
5254025
refactor(server): remove fastify-helmet
ginkoid Aug 17, 2020
f29c931
fix(client): fix @types/history hoist-blocking dep
ethanwu10 Aug 17, 2020
78643eb
feat(client): add Card component
ethanwu10 Aug 17, 2020
84bb072
feat(client): add bg prop to TextInput
ethanwu10 Aug 17, 2020
0989e42
Merge pull request #495 from redpwn/feature/card
ethanwu10 Aug 17, 2020
ac2b981
feat(client): login card
chen-robert Aug 17, 2020
3f1f216
feat(client): add form handling to login card
ethanwu10 Aug 17, 2020
673e400
fix(client): improve LoginCard styling
ethanwu10 Aug 17, 2020
864e7ce
refactor(client): clean up LoginCard styling
ethanwu10 Aug 18, 2020
47c62aa
feat(client): improve base theme styles
ethanwu10 Aug 18, 2020
7303a3d
fix(client): prevent layout shift with showError on TextInput
ethanwu10 Aug 18, 2020
6472557
fix(client): add pre-commit hook to check snapshots
ethanwu10 Aug 19, 2020
2622ec0
refactor(server): refactor all cache and leaderboard to use TS
ginkoid Aug 19, 2020
dbdf0fa
refactor(server): remove emitter type assertion
ginkoid Aug 19, 2020
8fcf458
refactor(server): remove unnecessary import
ginkoid Aug 19, 2020
3328c1d
ci: trigger builds on next explicitly
ethanwu10 Aug 19, 2020
a83ad67
refactor(server): split leaderboard calculation into function
ginkoid Aug 19, 2020
ca479c9
Merge branch 'refactor/ts-leaderboard' of https://github.com/redpwn/r…
ginkoid Aug 19, 2020
218cc5e
refactor: update shellcheck path for install script
ginkoid Aug 19, 2020
ad13e16
refactor(server): add better types for cache
ginkoid Aug 19, 2020
7bb882f
test(server): add E2E leaderboard snapshot test
ethanwu10 Aug 20, 2020
e373240
refactor(server): improve types on cache functions
ginkoid Aug 20, 2020
2ab5425
Merge branch 'refactor/ts-leaderboard' of https://github.com/redpwn/r…
ginkoid Aug 20, 2020
efe9a32
refactor(client): rename files to kebab-case
ginkoid Aug 20, 2020
cd573a3
Merge branch 'next' into feat/login-card
ginkoid Aug 20, 2020
d253c67
Merge pull request #496 from redpwn/feat/login-card
ethanwu10 Aug 20, 2020
5aa1596
fix(server): misc cleanup + const enum support
ethanwu10 Aug 20, 2020
22e1dc8
Merge branch 'next' into refactor/ts-leaderboard
ethanwu10 Aug 20, 2020
1158945
Merge pull request #500 from redpwn/refactor/ts-leaderboard
ethanwu10 Aug 20, 2020
b7248bf
chore: enable standard ts & jsx rules, fix violations
ethanwu10 Aug 19, 2020
5a1c111
chore: add and enforce Prettier
ethanwu10 Aug 19, 2020
fd8b2ba
chore: revert Prettier formatting on HTML
ethanwu10 Aug 19, 2020
2ce782b
ci: add Prettier job
ethanwu10 Aug 19, 2020
1608e9c
Merge pull request #499 from redpwn/chore/formatting-overhaul
ethanwu10 Sep 9, 2020
2a49693
build(deps): update dependencies
ethanwu10 Sep 10, 2020
17d89ec
docs: fix markdown syntax
ethanwu10 Sep 10, 2020
aa642f5
ci: enforce commit message conventions on PRs
ethanwu10 Sep 10, 2020
01cce9f
docs: update branch naming conventions
ethanwu10 Sep 10, 2020
725e859
fix(ci): fix refs for commit check job
ethanwu10 Sep 10, 2020
72127ff
docs: add docs for sponsors cards
pr0PM Sep 9, 2020
b6fe3a2
Merge pull request #522 from redpwn/ci/commit-check
ethanwu10 Sep 11, 2020
d14e66e
Merge pull request #523 from redpwn/docs/sponsor-card
ethanwu10 Sep 11, 2020
ac4da21
ci: update node to 14
ethanwu10 Sep 16, 2020
8b44d87
Merge pull request #528 from redpwn/ci/update-node
ethanwu10 Sep 17, 2020
5d5b8b5
fix(server): fix type on cache leaderboard.getRange
ethanwu10 Nov 6, 2020
6b3fd01
test(server): switch to inline snapshots
ethanwu10 Nov 9, 2020
7b5f0a3
ci: add node 15 (latest) to test matrix
ethanwu10 Nov 9, 2020
4dcffb9
test(server): add some restrict test cases
ethanwu10 Nov 25, 2020
5e11701
fix(server): fix type on leaderboard cache args
ethanwu10 Nov 6, 2020
c9b564f
fix(server): correct nullability on some argument types
ethanwu10 Jan 15, 2021
65ec330
fix(server): allow partial object when updating challenge
ethanwu10 Jan 16, 2021
e660662
build(types): set up api-type builder
ethanwu10 Sep 28, 2020
7aa257a
feat(server): implement route handler helpers
ethanwu10 Nov 6, 2020
5f1d5d9
feat(server): add route configuration and a few definitions
ethanwu10 Jan 16, 2021
70b6c2f
feat(server): autogenerate responses and routes
ethanwu10 Nov 9, 2020
c0a086b
refactor(server): migrate route handlers + write schemas
ethanwu10 Jan 16, 2021
bdff9a2
refactor(server): finalize migration
ethanwu10 Jan 15, 2021
7273fb5
feat(server): allow for overriding of route schemas
ethanwu10 Jan 16, 2021
13e9e8a
fix(server): add back config-based parameter constraints
ethanwu10 Jan 16, 2021
5c5100d
chore(server): remove unused eslint directive
ethanwu10 Jan 17, 2021
4c26f5d
fix(server): add periods to all response messages
ethanwu10 Jan 19, 2021
46b5074
fix(server): ensure failure responses are in schemas
ethanwu10 Jan 19, 2021
6dbf4f5
feat(server): send reason on request validation fail
ethanwu10 Jan 19, 2021
3e73b55
Merge pull request #544 from redpwn/refactor/api-types
ethanwu10 Jan 20, 2021
c80d1c9
fix(api-types): support windows path sep
ginkoid Jan 21, 2021
7e02306
refactor(server): clean up getting array element types
ethanwu10 Jan 21, 2021
c04a945
Merge pull request #552 from redpwn/refactor/array-index
chen-robert Mar 28, 2021
e665e4d
build(deps): batch dependency upgrade (incomplete)
ethanwu10 Mar 26, 2021
1aceeba
build(client): webpack config improvements
ethanwu10 Mar 27, 2021
1e4ec09
build(client): add size-plugin
ethanwu10 Mar 27, 2021
a6a0611
fix(client): fix jest config for new jsx runtime
ethanwu10 Mar 27, 2021
9100cd1
build(client): initial sb6.2/builder-webpack5 migration
ethanwu10 Mar 28, 2021
b3aedfc
build(client): fix SB emotion conflicts
ethanwu10 Mar 28, 2021
3ec9d47
fix(client): update Card for theme-ui 0.6
ethanwu10 Mar 28, 2021
ff6c56f
test(client): remove storyshots due to bad output
ethanwu10 Mar 28, 2021
c9c6ea1
build(deps): remove unnecessary @types/history
ethanwu10 Mar 28, 2021
60be0ed
build(deps): remove unused top-level devdeps
ethanwu10 Mar 28, 2021
eb667ce
fix(api-types): make sure schemas are not modified by compiler
ethanwu10 Mar 28, 2021
0e66f7e
fix(deps): add missing dep from server to @rctf/api-types
ethanwu10 Mar 29, 2021
4594c42
Merge pull request #559 from redpwn/dependencies/batch
ethanwu10 Mar 29, 2021
66e57e1
build(deps): upgrade to yarn 2
ethanwu10 May 9, 2021
72a1577
build(deps): upgrade most deps
ethanwu10 May 9, 2021
e67f2e6
test(client): update deprecated theme-ui key
ethanwu10 May 9, 2021
c348869
build: update tooling for yarn 2
ethanwu10 May 10, 2021
b4eaf41
chore: update git config for yarn 2
ethanwu10 May 10, 2021
4682e1e
fix(server): sync request serializer with upstream
ethanwu10 May 10, 2021
f2623b1
test(client): use `screen` queries
ethanwu10 May 10, 2021
a8318fc
test(client): use getBy* when target is expected to exist
ethanwu10 May 10, 2021
4e693ba
build: remove cross-env
ethanwu10 May 10, 2021
35c8258
build(deps): upgrade to husky 6
ethanwu10 May 10, 2021
de549a1
build(deps): update to AJV 8
ethanwu10 May 10, 2021
1c9b6f2
ci: cache yarn cache between actions runs
ethanwu10 May 10, 2021
f5e28fe
build(docker): docker build bugfixes
ethanwu10 May 10, 2021
b0c5d50
refactor(server): derive handler type off of FastifyInstance
ethanwu10 May 10, 2021
d5b7219
Merge pull request #566 from redpwn/dependencies/yarn-2-batch
ethanwu10 May 10, 2021
1a144b1
fix(docs): small error
0xflotus Feb 8, 2021
bd66c14
docs: add support discord link
ginkoid Oct 3, 2020
105c1f7
docs: clarify rcds in readme
ginkoid Sep 6, 2020
ee7433c
docs: fix restricted divisions example
dwang May 12, 2021
6ea38c0
feat(server): rank users with only tiebreakEligible: false
ethanwu10 May 27, 2021
459e651
refactor(server): hide leaderboard intermediate info
ethanwu10 May 27, 2021
edd3fda
refactor(server): leverage narrowing on cache typing
ethanwu10 May 27, 2021
f07ce6f
Merge pull request #572 from redpwn/chore/cherrypick-master
chen-robert Jun 3, 2021
0340e71
Merge branch 'next' into chore/backport-543
chen-robert Jun 3, 2021
c7177be
Merge branch 'next' into refactor/improve-cache-typing
chen-robert Jun 3, 2021
a0db61c
Merge pull request #574 from redpwn/refactor/improve-cache-typing
chen-robert Jun 3, 2021
7073b67
fix(server): sort edge case
chen-robert Jun 3, 2021
8f9a369
Merge branch 'next' into chore/backport-543
chen-robert Jun 3, 2021
57cfb66
Merge pull request #573 from redpwn/chore/backport-543
chen-robert Jun 3, 2021
d2bcc01
refactor(server): remove cast for now-fixed fastify bug
ethanwu10 Jun 16, 2021
eedd1e8
test(server): fix test config endTime being in past
ethanwu10 Oct 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 29 additions & 19 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# yarn 2 (zero-install ignore list to take advantage of host cache)
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

/node_modules
**/npm-debug.log*
**/yarn-debug.log*
**/yarn-error.log*
**/lerna-debug.log*

/dist
**/node_modules

# Packed packages
/packages/*/package.tgz

**/dist
/.env
/data
/conf.d/*
!/conf.d/.keep
/rctf.d/*
!/rctf.d/.keep
/docs/site

# Upload provider dir
/uploads

.DS_Store
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN
**/.DS_Store
**/Thumbs.db
**/ehthumbs.db
**/Desktop.ini
**/$RECYCLE.BIN
/package-lock.json
/.git

*.swp

# nyc test runner
/.nyc_output
/coverage
**/*.swp

# preact-cli build size plugin
size-plugin.json
# coverage
**/coverage
25 changes: 22 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Include dotfiles
!.*

# Re-add default ignore patterns
node_modules/
.git/

# Ignore yarn 2 stuff
.yarn/

# Ignore build folders
/dist
dist

# Ignore coverage reports
coverage/

# Ignore built docs
/docs/site

# Ignore bundled analytics
/client/src/static/analytics/*
# Duplicate api-types ignore rules here because otherwise their paths get
# broken when eslint is run from the monorepo root
/packages/api-types/*.js
/packages/api-types/*.mjs
/packages/api-types/*.d.ts
80 changes: 60 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,69 @@
module.exports = {
root: true,
env: {
es6: true
es6: true,
},
extends: [
'standard'
],
extends: ['standard', 'plugin:prettier/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
},
ecmaFeatures: {},
ecmaVersion: 2018,
sourceType: 'module'
sourceType: 'module',
},
plugins: [
],
plugins: [],
rules: {
'no-multiple-empty-lines': ['error', {
max: 1,
maxEOF: 0,
maxBOF: 0
}],
'padding-line-between-statements': ['error',
{ blankLine: 'always', prev: 'block-like', next: 'export' }
'no-multiple-empty-lines': [
'error',
{
max: 1,
maxEOF: 0,
maxBOF: 0,
},
],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'block-like', next: 'export' },
],
'no-void': [
'error',
{
allowAsStatement: true,
},
],
'no-void': ['error', {
allowAsStatement: true
}]
}
},
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'standard-with-typescript',
'prettier',
],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{ checksVoidReturn: false },
],
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'allow',
},
],
'@typescript-eslint/array-type': ['error', { default: 'array' }],
'@typescript-eslint/return-await': ['error', 'in-try-catch'],
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
{
files: ['**/.eslintrc.js'],
parser: 'espree',
},
],
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.yarn/releases/** -diff -merge
.yarn/plugins/** -diff -merge
yarn.lock -diff
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,8 +24,9 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- Distribution: [e.g. Debian]
- Version Information:

- Distribution: [e.g. Debian]
- Version Information:

**Additional context**
Add any other context about the problem here.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
Loading