wirejs-scripts 3.0.193 → 3.0.194

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 (3) hide show
  1. package/README.md +1 -1
  2. package/bin.js +5 -0
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -151,7 +151,7 @@ Because the browser bundle starts from the exported `onload()` entrypoint, you c
151
151
 
152
152
  ## SSG handling
153
153
 
154
- Files under `src/ssg/` are built and executed at build time. Each module's `generate()` output is written to `dist/` as a static artifact.
154
+ Files under `src/ssg/` are built and executed at build time. Each module's `generate()` output is written to `dist/` as a static artifact. Build fails if any SSG page cannot be generated, so deploys do not continue with missing static pages.
155
155
 
156
156
  ```ts
157
157
  // src/ssg/about.ts -> dist/about.html
package/bin.js CHANGED
@@ -409,6 +409,7 @@ async function compile(watch = false) {
409
409
  }
410
410
  }
411
411
 
412
+ const ssgErrors = [];
412
413
  await Promise.all(ssgFiles.map(async ssgFile => {
413
414
  // 3. Run ssg.js on each server-side bundle to produce final output.
414
415
  // Pass CWD/pre-dist as SRC_DIR so ssg.js strips the correct prefix
@@ -429,8 +430,12 @@ async function compile(watch = false) {
429
430
  await fs.promises.writeFile(outPath, output);
430
431
  } catch (err) {
431
432
  logger.error(`Could not generate SSG page ${compiledSsgFile}`, err);
433
+ ssgErrors.push(err);
432
434
  }
433
435
  }));
436
+ if (ssgErrors.length > 0) {
437
+ throw new Error(`Failed to generate ${ssgErrors.length} SSG page(s).`);
438
+ }
434
439
  }
435
440
 
436
441
  if (watch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wirejs-scripts",
3
- "version": "3.0.193",
3
+ "version": "3.0.194",
4
4
  "description": "Basic build and start commands for wirejs apps",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "node-cron": "^4.2.1",
29
29
  "rimraf": "^6.0.1",
30
30
  "wirejs-dom": "^1.0.44",
31
- "wirejs-hosting": "^0.1.195",
32
- "wirejs-resources": "^0.1.195"
31
+ "wirejs-hosting": "^0.1.196",
32
+ "wirejs-resources": "^0.1.196"
33
33
  }
34
34
  }