feat(curriculum): restore seed + solution to Chinese (#40683)

* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
This commit is contained in:
Oliver Eyton-Williams
2021-01-13 03:31:00 +01:00
committed by GitHub
parent 0095583028
commit ee1e8abd87
4163 changed files with 57505 additions and 10540 deletions

View File

@@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3c
title: 要求浏览器通过HTTPS访问您的站点仅限于使用helmet.hsts
challengeType: 2
forumTopicId: 301573
dashedName: ask-browsers-to-access-your-site-via-https-only-with-helmet-hsts
---
# --description--
@@ -53,3 +54,10 @@ HTTP 严格安全传输HSTS是一个能帮助我们抵御协议 [降级攻
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3a
title: 使用 helment.noSniff() 来避免推断响应的 MIME 类型
challengeType: 2
forumTopicId: 301574
dashedName: avoid-inferring-the-response-mime-type-with-helmet-nosniff
---
# --description--
@@ -30,3 +31,10 @@ forumTopicId: 301574
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8249367417b2b2512c40
title: 使用 helmet() 中间件来配置 Helmet
challengeType: 2
forumTopicId: 301575
dashedName: configure-helmet-using-the-parent-helmet-middleware
---
# --description--
@@ -40,3 +41,10 @@ assert(true);
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8249367417b2b2512c3e
title: 使用 helment.noCache() 禁用客户端缓存
challengeType: 2
forumTopicId: 301576
dashedName: disable-client-side-caching-with-helmet-nocache
---
# --description--
@@ -33,3 +34,10 @@ forumTopicId: 301576
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3d
title: 使用 helmet.dnsPrefetchControl() 禁用 DNS 预获取
challengeType: 2
forumTopicId: 301577
dashedName: disable-dns-prefetching-with-helmet-dnsprefetchcontrol
---
# --description--
@@ -30,3 +31,10 @@ forumTopicId: 301577
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 58a25bcff9fc0f352b528e7d
title: 哈希和异步比较密码
challengeType: 2
forumTopicId: 301578
dashedName: hash-and-compare-passwords-asynchronously
---
# --description--
@@ -71,3 +72,10 @@ bcrypt.hash('passw0rd!', 13, (err, hash) => {
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 58a25bcff9fc0f352b528e7e
title: 哈希和同步比较密码
challengeType: 2
forumTopicId: 301579
dashedName: hash-and-compare-passwords-synchronously
---
# --description--
@@ -56,3 +57,10 @@ var result = bcrypt.compareSync(myPlaintextPassword, hash);
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c37
title: 使用 helmet.hidePoweredBy() 隐藏潜在的危险信息
challengeType: 2
forumTopicId: 301580
dashedName: hide-potentially-dangerous-information-using-helmet-hidepoweredby
---
# --description--
@@ -30,3 +31,10 @@ forumTopicId: 301580
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c36
title: 安装和引入 Helmet
challengeType: 2
forumTopicId: 301581
dashedName: install-and-require-helmet
---
# --description--
@@ -34,3 +35,10 @@ Helmet 通过配置不同的 HTTP header 信息来使你的 Express 应用更加
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c38
title: 使用 helmet.frameguard() 降低点击劫持的风险
challengeType: 2
forumTopicId: 301582
dashedName: mitigate-the-risk-of-clickjacking-with-helmet-frameguard
---
# --description--
@@ -52,3 +53,10 @@ forumTopicId: 301582
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8247367417b2b2512c39
title: 使用 helmet.xssFilter() 降低跨站点脚本XSS攻击的风险
challengeType: 2
forumTopicId: 301583
dashedName: mitigate-the-risk-of-cross-site-scripting-xss-attacks-with-helmet-xssfilter
---
# --description--
@@ -38,3 +39,10 @@ HTTP header 的 X-XSS-Protection 字段就可以为我们提供最基本的保
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8248367417b2b2512c3b
title: 使用 helment.ieNoOpen() 防止 IE 打开不受信任的 HTML
challengeType: 2
forumTopicId: 301584
dashedName: prevent-ie-from-opening-untrusted-html-with-helmet-ienoopen
---
# --description--
@@ -30,3 +31,10 @@ forumTopicId: 301584
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 587d8249367417b2b2512c3f
title: 使用 helment.contentSecurityPolicy() 设置内容安全策略
challengeType: 2
forumTopicId: 301585
dashedName: set-a-content-security-policy-with-helmet-contentsecuritypolicy
---
# --description--
@@ -61,3 +62,10 @@ forumTopicId: 301585
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```

View File

@@ -3,6 +3,7 @@ id: 58a25bcef9fc0f352b528e7c
title: 了解 BCrypt 的哈希加密
challengeType: 2
forumTopicId: 301586
dashedName: understand-bcrypt-hashes
---
# --description--
@@ -60,3 +61,10 @@ BCrypt 的哈希结果会是这样 `$2a$13$ZyprE5MRw2Q3WpNOGZWGbeG7ADUre1Q8QO.uU
# --solutions--
```js
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/
```