sticky-note-cli 3.1.2 → 3.1.4
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/bin/cli.js +40 -14
- package/package.json +2 -2
package/bin/cli.js
CHANGED
|
@@ -657,23 +657,49 @@ async function cmdInit() {
|
|
|
657
657
|
print("\n Cloud Backend Setup...\n");
|
|
658
658
|
let cloudResult = provisionCloudBackend();
|
|
659
659
|
|
|
660
|
-
// wrangler not installed —
|
|
660
|
+
// wrangler not installed — install it and authenticate automatically
|
|
661
661
|
if (cloudResult === null) {
|
|
662
|
-
print(" wrangler CLI
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
662
|
+
print(" wrangler CLI not found. Installing now...\n");
|
|
663
|
+
try {
|
|
664
|
+
execSync("npm install -g wrangler", { stdio: "inherit" });
|
|
665
|
+
print("\n [OK] wrangler installed");
|
|
666
|
+
} catch (err) {
|
|
667
|
+
print(" [ERR] Failed to install wrangler: " + (err.message || err));
|
|
668
|
+
print(" Try manually: npm install -g wrangler");
|
|
669
|
+
print(" Then run `npx sticky-note deploy-backend`.\n");
|
|
670
|
+
// skip remaining cloud setup and continue init
|
|
671
|
+
cloudResult = { error: "wrangler install failed" };
|
|
672
|
+
}
|
|
670
673
|
|
|
671
|
-
|
|
672
|
-
|
|
674
|
+
if (!cloudResult) {
|
|
675
|
+
// installed — now authenticate (opens browser, runs interactively)
|
|
676
|
+
// stdin is piped with "n\n" to auto-decline wrangler's post-login
|
|
677
|
+
// "install Cloudflare skills?" prompt, which can't be answered inside
|
|
678
|
+
// Claude Code's session. stdout/stderr are inherited so the browser
|
|
679
|
+
// URL and success message still appear in the terminal.
|
|
680
|
+
print("\n Authenticating with Cloudflare (this will open your browser)...\n");
|
|
681
|
+
try {
|
|
682
|
+
execSync("wrangler login", {
|
|
683
|
+
stdio: ["pipe", "inherit", "inherit"],
|
|
684
|
+
input: "n\n",
|
|
685
|
+
encoding: "utf-8",
|
|
686
|
+
});
|
|
687
|
+
print("\n [OK] Logged in to Cloudflare");
|
|
688
|
+
} catch (err) {
|
|
689
|
+
print(" [ERR] wrangler login failed: " + (err.message || err));
|
|
690
|
+
print(" Run `wrangler login` manually, then `npx sticky-note deploy-backend`.\n");
|
|
691
|
+
cloudResult = { error: "wrangler login failed" };
|
|
692
|
+
}
|
|
693
|
+
}
|
|
673
694
|
|
|
674
|
-
if (cloudResult
|
|
675
|
-
print("
|
|
676
|
-
|
|
695
|
+
if (!cloudResult) {
|
|
696
|
+
print("");
|
|
697
|
+
cloudResult = provisionCloudBackend();
|
|
698
|
+
if (cloudResult === null) {
|
|
699
|
+
print(" [ERR] wrangler still not found after install.");
|
|
700
|
+
print(" Run `npx sticky-note deploy-backend` in a new terminal.\n");
|
|
701
|
+
cloudResult = { error: "wrangler not found after install" };
|
|
702
|
+
}
|
|
677
703
|
}
|
|
678
704
|
}
|
|
679
705
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sticky-note-cli",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Human-to-human handoff for AI coding assistants. Git-backed shared memory for Claude Code and Copilot CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"test": "node test/smoke.test.js"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"sticky-note-cli": "^3.1.
|
|
37
|
+
"sticky-note-cli": "^3.1.3"
|
|
38
38
|
}
|
|
39
39
|
}
|