@replayio/app-building 1.23.0 → 1.24.1

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.
Files changed (2) hide show
  1. package/dist/fly.js +4 -3
  2. package/package.json +1 -1
package/dist/fly.js CHANGED
@@ -90,6 +90,7 @@ export async function createMachine(app, token, image, env, name) {
90
90
  // Delete unattached volumes in parallel with creating the new machine.
91
91
  let cleanupDone;
92
92
  for (const region of regions) {
93
+ console.log(`Creating machine in region ${region}...`);
93
94
  const volumeId = await createVolume(app, token, volumeName, region, 50);
94
95
  // Start cleanup on first attempt only
95
96
  if (!cleanupDone) {
@@ -135,14 +136,14 @@ export async function createMachine(app, token, image, env, name) {
135
136
  catch (err) {
136
137
  await deleteVolume(app, token, volumeId).catch(() => { });
137
138
  const msg = err instanceof Error ? err.message : String(err);
138
- if (msg.includes("412")) {
139
+ if (msg.includes("412") || msg.includes("insufficient")) {
139
140
  console.log(`Insufficient resources in ${region}, trying next region...`);
140
141
  continue;
141
142
  }
142
- throw err;
143
+ throw new Error(`Failed to create machine in region ${region}: ${msg}`);
143
144
  }
144
145
  }
145
- throw new Error("Failed to create machine after exhausting retries");
146
+ throw new Error(`Failed to create machine in any region (tried ${regions.join(", ")}): insufficient resources`);
146
147
  }
147
148
  /**
148
149
  * Wait for a Fly Machine to reach the "started" state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayio/app-building",
3
- "version": "1.23.0",
3
+ "version": "1.24.1",
4
4
  "description": "Library for managing agentic app-building containers",
5
5
  "type": "module",
6
6
  "exports": {