@@ -6,9 +6,10 @@ import { getWorkingEngines } from "@/engines";
6
6
7
7
type Project = {
8
8
name : string ;
9
- nodeping_id : string ;
9
+ nodeping_id ?: string ;
10
+ workflow : string ;
10
11
source_url : string ;
11
- url : string ;
12
+ url ? : string ;
12
13
test_url ?: string ;
13
14
} ;
14
15
@@ -18,26 +19,25 @@ const non_engine_projects: Project[] = [
18
19
nodeping_id : "e6od3bui-a5wl-49ff-8698-0cbtjc52rqw1" ,
19
20
source_url : "https://github.com/regexplanet/regexplanet-next" ,
20
21
url : "https://www.regexplanet.com/" ,
22
+ workflow : "gcr-deploy" ,
21
23
} ,
22
24
{
23
25
name : "Regex Zone" ,
24
26
nodeping_id : "e6od3bui-a5wl-49ff-8698-0cbtjc52rqw1" ,
25
27
source_url : "https://github.com/regexplanet/regex-zone" ,
26
28
url : "https://www.regex.zone/" ,
29
+ workflow : "gcr-deploy" ,
27
30
} ,
28
31
] ;
29
32
30
33
const make_row = ( project : Project ) => {
31
- const name = `[${ project . name } ](${ project . url } )` ;
32
- let deploy = `[](${ project . source_url } /actions/workflows/gcr-deploy.yaml)` ;
33
- if ( project . test_url && project . test_url . indexOf ( "appspot.com" ) != - 1 ) {
34
- deploy = `[](${ project . source_url } /actions/workflows/appengine-deploy.yaml)` ;
35
- }
34
+ const name = project . url ? `[${ project . name } ](${ project . url } )` : project . name ;
35
+ const deploy = project . workflow ? `[](${ project . source_url } /actions/workflows/${ project . workflow } .yaml)` : 'n/a' ;
36
36
const repo = project . source_url . split ( "/" ) . slice ( - 1 ) [ 0 ] ;
37
37
const issues = `` ;
38
38
const prs = `` ;
39
- const status = `` ;
40
- const uptime = `` ;
39
+ const status = project . nodeping_id ? `` : 'n/a' ;
40
+ const uptime = project . nodeping_id ? `` : 'n/a' ;
41
41
const source = `[source](${ project . source_url } )` ;
42
42
43
43
return `| ${ name } | ${ deploy } | ${ issues } | ${ prs } | ${ status } | ${ uptime } | ${ source } |` ;
@@ -54,6 +54,7 @@ export async function GET() {
54
54
source_url : engine . source_url || "" ,
55
55
test_url : engine . test_url ,
56
56
url : `https://www.regexplanet.com/advanced/${ engine . handle } /index.html` ,
57
+ workflow : engine . test_url && engine . test_url . indexOf ( "appspot.com" ) != - 1 ? "appengine-deploy" : "gcr-deploy" ,
57
58
} ) ;
58
59
} ) ;
59
60
@@ -63,7 +64,18 @@ export async function GET() {
63
64
|---------|-------|--------|-----|--------|--------|--------|
64
65
${ non_engine_projects . map ( make_row ) . join ( "\n" ) }
65
66
${ engines . join ( "\n" ) }
66
- | Common library | n/a | n/a | n/a | [source](https://github.com/regexplanet/regexplanet-common) |
67
+ ${ make_row ( {
68
+ name : "Common library" ,
69
+ source_url : "regexplanet/regexplanet-common" ,
70
+ url : "https://jsr.io/@regexplanet/common" ,
71
+ workflow : "publish" ,
72
+ } ) }
73
+ ${ make_row ( {
74
+ name : "Javascript Template" ,
75
+ source_url : "regexplanet/regexplanet-template" ,
76
+ url : "https://jsr.io/@regexplanet/template" ,
77
+ workflow : "publish" ,
78
+ } ) }
67
79
` ;
68
80
69
81
return new Response ( readme , {
0 commit comments