create-mn-app 0.3.16 → 0.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mn-app",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "description": "Create Midnight Network applications with zero configuration",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -2,7 +2,8 @@ services:
2
2
  proof-server:
3
3
  image: midnightntwrk/proof-server:7.0.0
4
4
  platform: linux/amd64
5
- command: proof-server -v
5
+ environment:
6
+ - PORT=6300
6
7
  ports:
7
8
  - "6300:6300"
8
9
  restart: unless-stopped
@@ -48,12 +48,20 @@ const CONFIG = {
48
48
  async function waitForProofServer(maxAttempts = 30, delayMs = 2000): Promise<boolean> {
49
49
  for (let attempt = 1; attempt <= maxAttempts; attempt++) {
50
50
  try {
51
- const response = await fetch(`${CONFIG.proofServer}/health`, {
51
+ // Try a simple GET - any response (even 404) means server is up
52
+ const response = await fetch(CONFIG.proofServer, {
52
53
  method: 'GET',
53
54
  signal: AbortSignal.timeout(3000),
54
55
  });
55
- if (response.ok) return true;
56
- } catch {
56
+ // Any response means the server is running
57
+ return true;
58
+ } catch (err: any) {
59
+ // Check if it's a connection refused vs other error
60
+ const errMsg = err?.cause?.code || err?.code || '';
61
+ if (errMsg !== 'ECONNREFUSED' && errMsg !== 'UND_ERR_CONNECT_TIMEOUT') {
62
+ // Got some other error - server might be up but returning errors
63
+ return true;
64
+ }
57
65
  // Server not ready yet
58
66
  }
59
67
  if (attempt < maxAttempts) {