File tree 6 files changed +17
-9
lines changed
6 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 27
27
- run : npx lerna run bundle:alone --scope "@dzcode.io/web"
28
28
- run : npx lerna run generate:sitemap --scope "@dzcode.io/web"
29
29
- run : npx lerna run generate:htmls --scope "@dzcode.io/web"
30
+ - run : npm run --prefix web/cloudflare ts:check
Original file line number Diff line number Diff line change 1
1
import { Env } from "handler/contribution" ;
2
2
import { environments } from "@dzcode.io/utils/dist/config/environment" ;
3
- import { Language , Languages } from "@dzcode.io/models/dist/language" ;
3
+ import { LANGUAGES } from "@dzcode.io/models/dist/language" ;
4
4
import { getContributionURL } from "@dzcode.io/web/dist/utils/contribution" ;
5
5
import { fsConfig } from "@dzcode.io/utils/dist/config" ;
6
6
import { fetchV2Factory } from "@dzcode.io/utils/dist/fetch/factory" ;
7
7
import { Endpoints } from "@dzcode.io/api/dist/app/endpoints" ;
8
+ import { LanguageCode } from "@dzcode.io/utils/dist/language" ;
8
9
9
10
function xmlEscape ( s : string ) {
10
11
return s . replace (
@@ -20,9 +21,9 @@ export const onRequest: PagesFunction<Env> = async (context) => {
20
21
stage = "development" ;
21
22
}
22
23
const fullstackConfig = fsConfig ( stage ) ;
23
- const links : Array < { url : string ; lang : Language [ "code" ] } > = [ ] ;
24
+ const links : Array < { url : string ; lang : LanguageCode } > = [ ] ;
24
25
25
- for ( const lang of Languages ) {
26
+ for ( const lang of LANGUAGES ) {
26
27
const fetchV2 = fetchV2Factory < Endpoints > ( fullstackConfig , lang . code ) ;
27
28
const { contributions } = await fetchV2 ( "api:contributions/for-sitemap" , { } ) ;
28
29
Original file line number Diff line number Diff line change 1
1
import { Env } from "handler/contributor" ;
2
2
import { environments } from "@dzcode.io/utils/dist/config/environment" ;
3
- import { Language , Languages } from "@dzcode.io/models/dist/language" ;
3
+ import { LANGUAGES } from "@dzcode.io/models/dist/language" ;
4
4
import { getContributorURL } from "@dzcode.io/web/dist/utils/contributor" ;
5
5
import { fsConfig } from "@dzcode.io/utils/dist/config" ;
6
6
import { fetchV2Factory } from "@dzcode.io/utils/dist/fetch/factory" ;
7
7
import { Endpoints } from "@dzcode.io/api/dist/app/endpoints" ;
8
+ import { LanguageCode } from "@dzcode.io/utils/dist/language" ;
8
9
9
10
export const onRequest : PagesFunction < Env > = async ( context ) => {
10
11
let stage = context . env . STAGE ;
@@ -13,8 +14,8 @@ export const onRequest: PagesFunction<Env> = async (context) => {
13
14
stage = "development" ;
14
15
}
15
16
const fullstackConfig = fsConfig ( stage ) ;
16
- const links : Array < { url : string ; lang : Language [ "code" ] } > = [ ] ;
17
- for ( const lang of Languages ) {
17
+ const links : Array < { url : string ; lang : LanguageCode } > = [ ] ;
18
+ for ( const lang of LANGUAGES ) {
18
19
const fetchV2 = fetchV2Factory < Endpoints > ( fullstackConfig , lang . code ) ;
19
20
const { contributors } = await fetchV2 ( "api:contributors/for-sitemap" , { } ) ;
20
21
for ( const contributor of contributors ) {
Original file line number Diff line number Diff line change 1
1
import { Env } from "handler/project" ;
2
2
import { environments } from "@dzcode.io/utils/dist/config/environment" ;
3
- import { Language , Languages } from "@dzcode.io/models/dist/language" ;
4
3
import { getProjectURL } from "@dzcode.io/web/dist/utils/project" ;
5
4
import { fsConfig } from "@dzcode.io/utils/dist/config" ;
6
5
import { fetchV2Factory } from "@dzcode.io/utils/dist/fetch/factory" ;
7
6
import { Endpoints } from "@dzcode.io/api/dist/app/endpoints" ;
7
+ import { LANGUAGES } from "@dzcode.io/models/dist/language" ;
8
+ import { LanguageCode } from "@dzcode.io/utils/dist/language" ;
8
9
9
10
export const onRequest : PagesFunction < Env > = async ( context ) => {
10
11
let stage = context . env . STAGE ;
@@ -13,8 +14,8 @@ export const onRequest: PagesFunction<Env> = async (context) => {
13
14
stage = "development" ;
14
15
}
15
16
const fullstackConfig = fsConfig ( stage ) ;
16
- const links : Array < { url : string ; lang : Language [ "code" ] } > = [ ] ;
17
- for ( const lang of Languages ) {
17
+ const links : Array < { url : string ; lang : LanguageCode } > = [ ] ;
18
+ for ( const lang of LANGUAGES ) {
18
19
const fetchV2 = fetchV2Factory < Endpoints > ( fullstackConfig , lang . code ) ;
19
20
const { projects } = await fetchV2 ( "api:projects/for-sitemap" , { } ) ;
20
21
for ( const project of projects ) {
Original file line number Diff line number Diff line change 14
14
},
15
15
"private" : true ,
16
16
"scripts" : {
17
+ "ts:check" : " tsc --noEmit" ,
17
18
"build" :
" lerna run build:alone [email protected] /web --include-dependencies --stream" ,
18
19
"deploy:prd" : " npm run generate:config -- production && wrangler pages deploy --branch main" ,
19
20
"deploy:stg" : " npm run generate:config -- staging && wrangler pages deploy --branch main" ,
Original file line number Diff line number Diff line change
1
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
+ // @ts -nocheck
3
+
1
4
import { writeFileSync } from "fs" ;
2
5
3
6
// Get the environment passed as argument
You can’t perform that action at this time.
0 commit comments