@portosaur/cli 0.6.2 → 0.6.3

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": "@portosaur/cli",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "CLI for Portosaur - The static Personal portfolio site generator.",
5
5
  "license": "GPL-3.0-only",
6
6
  "author": "soymadip",
@@ -26,9 +26,9 @@
26
26
  },
27
27
  "types": "./src/index.d.ts",
28
28
  "dependencies": {
29
- "@portosaur/core": "^0.6.2",
30
- "@portosaur/logger": "^0.6.2",
31
- "@portosaur/wizard": "^0.6.2",
29
+ "@portosaur/core": "^0.6.3",
30
+ "@portosaur/logger": "^0.6.3",
31
+ "@portosaur/wizard": "^0.6.3",
32
32
  "commander": "^13.1.0",
33
33
  "js-yaml": "^4.1.1"
34
34
  }
@@ -2,6 +2,7 @@ import fs from "fs";
2
2
  import path from "path";
3
3
  import { spawn } from "child_process";
4
4
  import { createRequire } from "module";
5
+ import { hasCommand } from "@portosaur/core";
5
6
 
6
7
  /**
7
8
  * Generates a static Docusaurus config file by evaluating the Portosaur config
@@ -174,7 +175,11 @@ export async function runDocusaurus(
174
175
  args.push(...extraArgs);
175
176
 
176
177
  // Use bun when available for faster builds, fall back to node.
177
- const runtime = typeof Bun !== "undefined" ? "bun" : "node";
178
+ // If node isn't installed, fallback to bun gracefully.
179
+ let runtime = "node";
180
+ if (typeof Bun !== "undefined" || !hasCommand("node")) {
181
+ runtime = "bun";
182
+ }
178
183
 
179
184
  // Skip actual execution in test mode
180
185
  if (process.env.PORTO_TEST_MODE === "true") {
@@ -186,10 +191,6 @@ export async function runDocusaurus(
186
191
 
187
192
  const childEnv = { ...process.env, FORCE_COLOR: "true" };
188
193
 
189
- if (command === "build") {
190
- childEnv.CI = "true";
191
- }
192
-
193
194
  const child = spawn(runtime, args, {
194
195
  stdio: "inherit",
195
196
  cwd: UserRoot,