@@ -5,10 +5,14 @@ import { dirname, join } from "path";
55import { fileURLToPath } from "url" ;
66
77import {
8+ DEFAULT_CLUSTER_ID ,
89 DEFAULT_NODE1_WS_PORT ,
910 DEFAULT_NODE2_WS_PORT ,
11+ DEFAULT_NWAKU_IMAGE ,
1012 NODE1_PEER_ID ,
11- NODE2_PEER_ID
13+ NODE2_PEER_ID ,
14+ POSTGRES_IMAGE ,
15+ STARTUP_WAIT_MS
1216} from "../src/constants.js" ;
1317import { getProjectName , printWakuConfig } from "../src/utils.js" ;
1418
@@ -38,8 +42,8 @@ const colors: Colors = {
3842} ;
3943
4044function checkAndPullImages ( ) : void {
41- const nwakuImage = process . env . NWAKU_IMAGE || "wakuorg/nwaku:v0.36.0" ;
42- const postgresImage = "postgres:15.4-alpine3.18" ;
45+ const nwakuImage = process . env . NWAKU_IMAGE || DEFAULT_NWAKU_IMAGE ;
46+ const postgresImage = POSTGRES_IMAGE ;
4347 const images = [
4448 { name : nwakuImage , label : "nwaku" } ,
4549 { name : postgresImage , label : "postgres" }
@@ -113,10 +117,10 @@ try {
113117 } ) ;
114118
115119 // Wait for nodes to be ready
116- await waitWithProgress ( 20000 ) ;
120+ await waitWithProgress ( STARTUP_WAIT_MS ) ;
117121
118122 // Get cluster config from env or defaults
119- const clusterId : string = process . env . CLUSTER_ID || "0" ;
123+ const clusterId : string = process . env . CLUSTER_ID || DEFAULT_CLUSTER_ID ;
120124 const node1Port : string = process . env . NODE1_WS_PORT || DEFAULT_NODE1_WS_PORT ;
121125 const node2Port : string = process . env . NODE2_WS_PORT || DEFAULT_NODE2_WS_PORT ;
122126
0 commit comments