create-puzzmo 1.0.7 → 1.0.9

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/package.json +1 -1
  2. package/src/index.js +4 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-puzzmo",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Create a Puzzmo game project",
5
5
  "type": "module",
6
6
  "bin": "./src/index.js",
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { execSync, spawnSync } from "node:child_process"
3
+ import { spawnSync } from "node:child_process"
4
4
 
5
5
  // Forward all args to `puzzmo game create`
6
6
  const args = process.argv.slice(2)
@@ -8,13 +8,9 @@ const args = process.argv.slice(2)
8
8
  // Detect the package manager that invoked this script
9
9
  const pm = detectPackageManager()
10
10
 
11
- // Check if puzzmo CLI is available
12
- try {
13
- execSync("puzzmo --help", { stdio: "ignore" })
14
- } catch {
15
- console.log("Installing @puzzmo/cli...")
16
- spawnSync("npm", ["install", "-g", "@puzzmo/cli"], { stdio: "inherit" })
17
- }
11
+ // Always ensure the latest puzzmo CLI is installed
12
+ console.log("Installing @puzzmo/cli@latest...")
13
+ spawnSync("npm", ["install", "-g", "@puzzmo/cli@latest"], { stdio: "inherit" })
18
14
 
19
15
  // Pass --pm so the CLI knows which package manager to use in generated files
20
16
  const extraArgs = args.includes("--pm") ? [] : ["--pm", pm]