Skip to content

Commit 6e8b178

Browse files
Merge pull request #718 from freeCodeCamp/main
Create a new pull request by comparing changes across two branches
2 parents 9e26f74 + d82a01d commit 6e8b178

File tree

78 files changed

+2661
-6721
lines changed

Some content is hidden

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

78 files changed

+2661
-6721
lines changed

.github/workflows/crowdin-download.client-ui.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -238,30 +238,6 @@ jobs:
238238
# Uncomment below to debug
239239
# dryrun_action: true
240240

241-
##### Download Arabic #####
242-
- name: Crowdin Download Arabic Translations
243-
uses: crowdin/github-action@master
244-
# options: https://github.com/crowdin/github-action/blob/master/action.yml
245-
with:
246-
# uploads
247-
upload_sources: false
248-
upload_translations: false
249-
auto_approve_imported: false
250-
import_eq_suggestions: false
251-
# downloads
252-
download_translations: true
253-
download_language: ar
254-
skip_untranslated_files: false
255-
export_only_approved: true
256-
push_translations: false
257-
# pull-request
258-
create_pull_request: false
259-
# global options
260-
config: './crowdin-config.yml'
261-
base_url: ${{ secrets.CROWDIN_BASE_URL_FCC }}
262-
# Uncomment below to debug
263-
# dryrun_action: true
264-
265241
##### Download Swahili #####
266242
- name: Crowdin Download Swahili Translations
267243
uses: crowdin/github-action@master

.github/workflows/curriculum-i18n-submodule.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
- 'ukrainian'
2626
- 'japanese'
2727
- 'german'
28-
- 'arabic'
2928
- 'swahili'
3029

3130
steps:

api/src/app.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import {
3838
FCC_ENABLE_DEV_LOGIN_MODE,
3939
FCC_ENABLE_SWAGGER_UI,
4040
FCC_ENABLE_SHADOW_CAPTURE,
41-
FREECODECAMP_NODE_ENV
41+
FCC_ENABLE_EXAM_ENVIRONMENT
4242
} from './utils/env';
4343
import { isObjectID } from './utils/validation';
4444
import {
@@ -187,8 +187,7 @@ export const build = async (
187187
}
188188
});
189189

190-
// NOTE: Code behind the `FREECODECAMP_NODE_ENV` var is not ready to be deployed yet.
191-
if (FREECODECAMP_NODE_ENV !== 'production') {
190+
if (FCC_ENABLE_EXAM_ENVIRONMENT) {
192191
void fastify.register(function (fastify, _opts, done) {
193192
fastify.addHook('onRequest', fastify.authorizeExamEnvironmentToken);
194193

api/src/exam-environment/routes/exam-environment.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ import {
1212
import * as mock from '../../../__mocks__/env-exam';
1313
import { constructUserExam } from '../utils/exam';
1414

15+
jest.mock('../../utils/env', () => {
16+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
17+
return {
18+
...jest.requireActual('../../utils/env'),
19+
FCC_ENABLE_EXAM_ENVIRONMENT: 'true'
20+
};
21+
});
22+
1523
describe('/exam-environment/', () => {
1624
setupServer();
1725
describe('Authenticated user with exam environment authorization token', () => {

api/src/utils/env.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ assert.ok(process.env.MONGOHQ_URL);
5858
assert.ok(process.env.COOKIE_SECRET);
5959

6060
if (process.env.FREECODECAMP_NODE_ENV !== 'development') {
61+
assert.notEqual(
62+
process.env.FCC_ENABLE_EXAM_ENVIRONMENT,
63+
'true',
64+
'Exam environment is not ready for production.'
65+
);
6166
assert.ok(process.env.SES_ID);
6267
assert.ok(process.env.SES_SECRET);
6368
assert.notEqual(
@@ -127,6 +132,8 @@ export const FCC_ENABLE_DEV_LOGIN_MODE =
127132
process.env.FCC_ENABLE_DEV_LOGIN_MODE === 'true';
128133
export const FCC_ENABLE_SHADOW_CAPTURE =
129134
process.env.FCC_ENABLE_SHADOW_CAPTURE === 'true';
135+
export const FCC_ENABLE_EXAM_ENVIRONMENT =
136+
process.env.FCC_ENABLE_EXAM_ENVIRONMENT === 'true';
130137
export const SENTRY_DSN =
131138
process.env.SENTRY_DSN === 'dsn_from_sentry_dashboard'
132139
? ''

client/config/growthbook-features-default.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,37 @@
6262
"name": "stg show modal randomly"
6363
}
6464
]
65+
},
66+
"show-benefits": {
67+
"defaultValue": false,
68+
"rules": [
69+
{
70+
"coverage": 1,
71+
"hashAttribute": "id",
72+
"seed": "show-benefits",
73+
"hashVersion": 2,
74+
"variations": [
75+
false,
76+
true
77+
],
78+
"weights": [
79+
0.5,
80+
0.5
81+
],
82+
"key": "show-benefits",
83+
"meta": [
84+
{
85+
"key": "0",
86+
"name": "Control"
87+
},
88+
{
89+
"key": "1",
90+
"name": "Variation 1"
91+
}
92+
],
93+
"phase": "0",
94+
"name": "prod-show-benefits"
95+
}
96+
]
6597
}
6698
}

client/gatsby-node.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ exports.createPages = async function createPages({
7474
challenge {
7575
block
7676
blockType
77+
blockLayout
7778
certification
7879
challengeType
7980
dashedName
@@ -260,6 +261,7 @@ exports.createSchemaCustomization = ({ actions }) => {
260261
}
261262
type Challenge {
262263
blockType: String
264+
blockLayout: String
263265
challengeFiles: [FileContents]
264266
explanation: String
265267
notes: String

client/i18n/locales/arabic/intro.json

Lines changed: 0 additions & 3532 deletions
This file was deleted.

client/i18n/locales/arabic/links.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

client/i18n/locales/arabic/meta-tags.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)