@blueprintit/shop-os-install 0.5.3 → 0.5.5

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.
@@ -119,8 +119,17 @@ function getClaudeRoot() {
119
119
  }
120
120
 
121
121
  function checkClaudeCode() {
122
- const root = getClaudeRoot();
123
- if (!existsSync(root)) {
122
+ // Detect by binary on PATH, not by the ~/.claude directory: when Claude Code
123
+ // is installed via `npm install -g @anthropic-ai/claude-code` (which the
124
+ // setup scripts now do), the .claude directory isn't created until the user
125
+ // launches `claude` for the first time. A binary check correctly identifies
126
+ // installs from npm, the official .ps1/.sh installer, or the desktop app.
127
+ const probe = spawnSync(
128
+ process.platform === "win32" ? "where" : "which",
129
+ ["claude"],
130
+ { stdio: "ignore", shell: false },
131
+ );
132
+ if (probe.status !== 0) {
124
133
  print("");
125
134
  print(red("Claude Code is not installed."));
126
135
  print("");
@@ -131,6 +140,12 @@ function checkClaudeCode() {
131
140
  print("re-run this installer.");
132
141
  exit(1);
133
142
  }
143
+ // Stage ~/.claude so downstream marketplace and plugin writes succeed even
144
+ // if the user hasn't launched `claude` yet to seed the dir themselves.
145
+ const root = getClaudeRoot();
146
+ if (!existsSync(root)) {
147
+ mkdirSync(root, { recursive: true });
148
+ }
134
149
  return root;
135
150
  }
136
151
 
@@ -719,13 +734,16 @@ async function main() {
719
734
  rl.close();
720
735
  fail(`No folder found at: ${vaultPath}\nMake sure the path is correct and the folder exists.`);
721
736
  }
722
- warn(`No folder found at: ${vaultPath}`);
723
- const createIt = args.yes
724
- ? true
725
- : await confirm(rl, "Create it now and continue?", { default: false });
726
- if (!createIt) {
727
- rl.close();
728
- fail("Create the folder in Finder / File Explorer first, then re-run this installer.");
737
+ // Vault folder doesn't exist yet — that's expected for a new install.
738
+ // In --yes mode (setup scripts), proceed silently; the "[3/N] Creating
739
+ // vault at ..." step below prints its own status. In interactive mode,
740
+ // confirm with the user before creating.
741
+ if (!args.yes) {
742
+ const createIt = await confirm(rl, `Create new vault at ${cyan(vaultPath)}?`, { default: true });
743
+ if (!createIt) {
744
+ rl.close();
745
+ fail("Create the folder in Finder / File Explorer first, then re-run this installer.");
746
+ }
729
747
  }
730
748
  }
731
749
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueprintit/shop-os-install",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "One-command installer for Shop OS — Blueprint IT's AI Operating System for small businesses.",
5
5
  "type": "module",
6
6
  "bin": {