File tree Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 11import { Env } from "handler/contribution" ;
22import { 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" ;
44import { getContributionURL } from "@dzcode.io/web/dist/utils/contribution" ;
55import { fsConfig } from "@dzcode.io/utils/dist/config" ;
66import { fetchV2Factory } from "@dzcode.io/utils/dist/fetch/factory" ;
77import { Endpoints } from "@dzcode.io/api/dist/app/endpoints" ;
8+ import { LanguageCode } from "@dzcode.io/utils/dist/language" ;
89
910function xmlEscape ( s : string ) {
1011 return s . replace (
@@ -20,9 +21,9 @@ export const onRequest: PagesFunction<Env> = async (context) => {
2021 stage = "development" ;
2122 }
2223 const fullstackConfig = fsConfig ( stage ) ;
23- const links : Array < { url : string ; lang : Language [ "code" ] } > = [ ] ;
24+ const links : Array < { url : string ; lang : LanguageCode } > = [ ] ;
2425
25- for ( const lang of Languages ) {
26+ for ( const lang of LANGUAGES ) {
2627 const fetchV2 = fetchV2Factory < Endpoints > ( fullstackConfig , lang . code ) ;
2728 const { contributions } = await fetchV2 ( "api:contributions/for-sitemap" , { } ) ;
2829
Original file line number Diff line number Diff line change 11import { Env } from "handler/contributor" ;
22import { 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" ;
44import { getContributorURL } from "@dzcode.io/web/dist/utils/contributor" ;
55import { fsConfig } from "@dzcode.io/utils/dist/config" ;
66import { fetchV2Factory } from "@dzcode.io/utils/dist/fetch/factory" ;
77import { Endpoints } from "@dzcode.io/api/dist/app/endpoints" ;
8+ import { LanguageCode } from "@dzcode.io/utils/dist/language" ;
89
910export const onRequest : PagesFunction < Env > = async ( context ) => {
1011 let stage = context . env . STAGE ;
@@ -13,8 +14,8 @@ export const onRequest: PagesFunction<Env> = async (context) => {
1314 stage = "development" ;
1415 }
1516 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 ) {
1819 const fetchV2 = fetchV2Factory < Endpoints > ( fullstackConfig , lang . code ) ;
1920 const { contributors } = await fetchV2 ( "api:contributors/for-sitemap" , { } ) ;
2021 for ( const contributor of contributors ) {
Original file line number Diff line number Diff line change 11import { Env } from "handler/project" ;
22import { environments } from "@dzcode.io/utils/dist/config/environment" ;
3- import { Language , Languages } from "@dzcode.io/models/dist/language" ;
43import { getProjectURL } from "@dzcode.io/web/dist/utils/project" ;
54import { fsConfig } from "@dzcode.io/utils/dist/config" ;
65import { fetchV2Factory } from "@dzcode.io/utils/dist/fetch/factory" ;
76import { 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" ;
89
910export const onRequest : PagesFunction < Env > = async ( context ) => {
1011 let stage = context . env . STAGE ;
@@ -13,8 +14,8 @@ export const onRequest: PagesFunction<Env> = async (context) => {
1314 stage = "development" ;
1415 }
1516 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 ) {
1819 const fetchV2 = fetchV2Factory < Endpoints > ( fullstackConfig , lang . code ) ;
1920 const { projects } = await fetchV2 ( "api:projects/for-sitemap" , { } ) ;
2021 for ( const project of projects ) {
Original file line number Diff line number Diff line change 1+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2+ // @ts -nocheck
3+
14import { writeFileSync } from "fs" ;
25
36// Get the environment passed as argument
You can’t perform that action at this time.
0 commit comments