rwsdk 1.0.0-beta.47 ā 1.0.0-beta.49
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/dist/lib/e2e/release.mjs +32 -16
- package/package.json +7 -7
package/dist/lib/e2e/release.mjs
CHANGED
|
@@ -297,6 +297,36 @@ export async function runRelease(cwd, projectDir, resourceUniqueKey) {
|
|
|
297
297
|
const MAX_RETRIES = 3;
|
|
298
298
|
let lastError = null;
|
|
299
299
|
let result = null;
|
|
300
|
+
const formatReleaseCommandFailure = (res) => {
|
|
301
|
+
let message = `Release command failed with exit code ${res.code}`;
|
|
302
|
+
const stdout = res.stdout?.trim() ? res.stdout : "";
|
|
303
|
+
const stderr = res.stderr?.trim() ? res.stderr : "";
|
|
304
|
+
if (stderr) {
|
|
305
|
+
const errorLines = stderr
|
|
306
|
+
.split("\n")
|
|
307
|
+
.filter((line) => line.includes("ERROR") ||
|
|
308
|
+
line.includes("error:") ||
|
|
309
|
+
line.includes("failed"))
|
|
310
|
+
.slice(0, 3)
|
|
311
|
+
.join("\n");
|
|
312
|
+
if (errorLines) {
|
|
313
|
+
message += `\nError details: ${errorLines}`;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (stdout) {
|
|
317
|
+
const stdoutTail = stdout.split("\n").slice(-40).join("\n").trim();
|
|
318
|
+
if (stdoutTail) {
|
|
319
|
+
message += `\n\nstdout (tail):\n${stdoutTail}`;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
if (stderr) {
|
|
323
|
+
const stderrTail = stderr.split("\n").slice(-40).join("\n").trim();
|
|
324
|
+
if (stderrTail) {
|
|
325
|
+
message += `\n\nstderr (tail):\n${stderrTail}`;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return message;
|
|
329
|
+
};
|
|
300
330
|
for (let i = 0; i < MAX_RETRIES; i++) {
|
|
301
331
|
try {
|
|
302
332
|
console.log(`\nš Deploying worker to Cloudflare (Attempt ${i + 1}/${MAX_RETRIES})...`);
|
|
@@ -323,7 +353,7 @@ export async function runRelease(cwd, projectDir, resourceUniqueKey) {
|
|
|
323
353
|
break; // Exit the loop on success
|
|
324
354
|
}
|
|
325
355
|
else {
|
|
326
|
-
throw new Error(
|
|
356
|
+
throw new Error(formatReleaseCommandFailure(result));
|
|
327
357
|
}
|
|
328
358
|
}
|
|
329
359
|
catch (error) {
|
|
@@ -342,21 +372,7 @@ export async function runRelease(cwd, projectDir, resourceUniqueKey) {
|
|
|
342
372
|
// Check exit code to ensure command succeeded
|
|
343
373
|
if (result.code !== 0) {
|
|
344
374
|
// Add more contextual information about the error
|
|
345
|
-
|
|
346
|
-
// Add stderr output to the error message if available
|
|
347
|
-
if (result.stderr && result.stderr.trim().length > 0) {
|
|
348
|
-
// Extract the most relevant part of the error message
|
|
349
|
-
const errorLines = result.stderr
|
|
350
|
-
.split("\n")
|
|
351
|
-
.filter((line) => line.includes("ERROR") ||
|
|
352
|
-
line.includes("error:") ||
|
|
353
|
-
line.includes("failed"))
|
|
354
|
-
.slice(0, 3) // Take just the first few error lines
|
|
355
|
-
.join("\n");
|
|
356
|
-
if (errorLines) {
|
|
357
|
-
errorMessage += `\nError details: ${errorLines}`;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
375
|
+
const errorMessage = formatReleaseCommandFailure(result);
|
|
360
376
|
log("ERROR: %s", errorMessage);
|
|
361
377
|
throw new Error(errorMessage);
|
|
362
378
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rwsdk",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.49",
|
|
4
4
|
"description": "Build fast, server-driven webapps on Cloudflare with SSR, RSC, and realtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -151,14 +151,14 @@
|
|
|
151
151
|
"license": "MIT",
|
|
152
152
|
"dependencies": {
|
|
153
153
|
"@ast-grep/napi": "~0.39.0",
|
|
154
|
-
"@cloudflare/workers-types": "~4.
|
|
154
|
+
"@cloudflare/workers-types": "~4.20260120.0",
|
|
155
155
|
"@mdx-js/mdx": "~3.1.1",
|
|
156
156
|
"@puppeteer/browsers": "~2.10.0",
|
|
157
157
|
"@types/decompress": "~4.2.7",
|
|
158
158
|
"@types/fs-extra": "~11.0.4",
|
|
159
159
|
"@types/glob": "^8.1.0",
|
|
160
|
-
"@types/react": "~19.
|
|
161
|
-
"@types/react-dom": "~19.
|
|
160
|
+
"@types/react": "~19.2.7",
|
|
161
|
+
"@types/react-dom": "~19.2.3",
|
|
162
162
|
"@types/react-is": "~19.0.0",
|
|
163
163
|
"@vitejs/plugin-react": "~5.0.0",
|
|
164
164
|
"chokidar": "~4.0.0",
|
|
@@ -200,16 +200,16 @@
|
|
|
200
200
|
},
|
|
201
201
|
"packageManager": "pnpm@10.0.0+sha512.b8fef5494bd3fe4cbd4edabd0745df2ee5be3e4b0b8b08fa643aa3e4c6702ccc0f00d68fa8a8c9858a735a0032485a44990ed2810526c875e416f001b17df12b",
|
|
202
202
|
"devDependencies": {
|
|
203
|
-
"@cloudflare/vite-plugin": "1.
|
|
203
|
+
"@cloudflare/vite-plugin": "1.21.1",
|
|
204
204
|
"capnweb": "~0.2.0",
|
|
205
205
|
"@types/debug": "~4.1.12",
|
|
206
206
|
"@types/js-beautify": "~1.14.3",
|
|
207
207
|
"@types/lodash": "~4.17.16",
|
|
208
|
-
"@types/node": "~24.
|
|
208
|
+
"@types/node": "~24.10.0",
|
|
209
209
|
"@types/proper-lockfile": "~4.1.4",
|
|
210
210
|
"js-beautify": "~1.15.4",
|
|
211
211
|
"semver": "~7.7.1",
|
|
212
|
-
"tsx": "~4.
|
|
212
|
+
"tsx": "~4.21.0",
|
|
213
213
|
"typescript": "~5.9.0",
|
|
214
214
|
"vite": "~7.3.0",
|
|
215
215
|
"vitest": "~3.2.0"
|