sticky-note-cli 3.1.1 → 3.1.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/bin/cli.js +51 -8
- package/package.json +2 -2
package/bin/cli.js
CHANGED
|
@@ -653,18 +653,52 @@ async function cmdInit() {
|
|
|
653
653
|
}
|
|
654
654
|
|
|
655
655
|
// Cloud backend: provision inline if requested, or write existing STICKY_URL from env
|
|
656
|
-
if (wantsCloud) {
|
|
656
|
+
if (wantsCloud && !ciMode) {
|
|
657
657
|
print("\n Cloud Backend Setup...\n");
|
|
658
|
-
|
|
658
|
+
let cloudResult = provisionCloudBackend();
|
|
659
|
+
|
|
660
|
+
// wrangler not installed — install it and authenticate automatically
|
|
659
661
|
if (cloudResult === null) {
|
|
660
|
-
print("
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
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
|
+
}
|
|
673
|
+
|
|
674
|
+
if (!cloudResult) {
|
|
675
|
+
// installed — now authenticate (opens browser, runs interactively)
|
|
676
|
+
print("\n Authenticating with Cloudflare (this will open your browser)...\n");
|
|
677
|
+
try {
|
|
678
|
+
execSync("wrangler login", { stdio: "inherit" });
|
|
679
|
+
print("\n [OK] Logged in to Cloudflare");
|
|
680
|
+
} catch (err) {
|
|
681
|
+
print(" [ERR] wrangler login failed: " + (err.message || err));
|
|
682
|
+
print(" Run `wrangler login` manually, then `npx sticky-note deploy-backend`.\n");
|
|
683
|
+
cloudResult = { error: "wrangler login failed" };
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
if (!cloudResult) {
|
|
688
|
+
print("");
|
|
689
|
+
cloudResult = provisionCloudBackend();
|
|
690
|
+
if (cloudResult === null) {
|
|
691
|
+
print(" [ERR] wrangler still not found after install.");
|
|
692
|
+
print(" Run `npx sticky-note deploy-backend` in a new terminal.\n");
|
|
693
|
+
cloudResult = { error: "wrangler not found after install" };
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
if (cloudResult && cloudResult.error) {
|
|
665
699
|
print(" [WARN] Cloud setup failed: " + cloudResult.error);
|
|
666
700
|
print(" Run `npx sticky-note deploy-backend` to retry.\n");
|
|
667
|
-
} else {
|
|
701
|
+
} else if (cloudResult && !cloudResult.error) {
|
|
668
702
|
if (cloudResult.secretSet) {
|
|
669
703
|
print("\n Share STICKY_URL and STICKY_API_KEY with teammates securely.");
|
|
670
704
|
print(" (e.g. org secrets, 1Password — do not commit .env.sticky)\n");
|
|
@@ -673,6 +707,15 @@ async function cmdInit() {
|
|
|
673
707
|
print(" Run the manual command shown above, then share with your team.\n");
|
|
674
708
|
}
|
|
675
709
|
}
|
|
710
|
+
} else if (wantsCloud && ciMode) {
|
|
711
|
+
// CI mode: can't pause for wrangler install, just try and warn on failure
|
|
712
|
+
print("\n Cloud Backend Setup...\n");
|
|
713
|
+
const cloudResult = provisionCloudBackend();
|
|
714
|
+
if (!cloudResult) {
|
|
715
|
+
print(" [ERR] `wrangler` CLI not found. Skipping cloud setup in CI mode.\n");
|
|
716
|
+
} else if (cloudResult.error) {
|
|
717
|
+
print(" [WARN] Cloud setup failed: " + cloudResult.error + "\n");
|
|
718
|
+
}
|
|
676
719
|
} else if (process.env.STICKY_URL) {
|
|
677
720
|
// Write existing STICKY_URL from environment into .env.sticky
|
|
678
721
|
const envStickyPath = path.join(process.cwd(), ".env.sticky");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sticky-note-cli",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
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": "^
|
|
37
|
+
"sticky-note-cli": "^3.1.1"
|
|
38
38
|
}
|
|
39
39
|
}
|