sticky-note-cli 3.1.1 → 3.1.2
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 +33 -8
- package/package.json +2 -2
package/bin/cli.js
CHANGED
|
@@ -653,18 +653,34 @@ 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 — guide the user through it inline
|
|
659
661
|
if (cloudResult === null) {
|
|
660
|
-
print("
|
|
661
|
-
print("
|
|
662
|
-
print("
|
|
663
|
-
print("
|
|
664
|
-
|
|
662
|
+
print(" wrangler CLI is not installed. Let's set it up.\n");
|
|
663
|
+
print(" Run these two commands in another terminal:\n");
|
|
664
|
+
print(" npm install -g wrangler");
|
|
665
|
+
print(" wrangler login\n");
|
|
666
|
+
|
|
667
|
+
const rl2 = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
668
|
+
await ask(rl2, "Press Enter once wrangler is installed and you've logged in", "");
|
|
669
|
+
rl2.close();
|
|
670
|
+
|
|
671
|
+
print("");
|
|
672
|
+
cloudResult = provisionCloudBackend();
|
|
673
|
+
|
|
674
|
+
if (cloudResult === null) {
|
|
675
|
+
print(" [ERR] wrangler still not found in PATH.");
|
|
676
|
+
print(" Run `npx sticky-note deploy-backend` once it's installed.\n");
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
if (cloudResult && cloudResult.error) {
|
|
665
681
|
print(" [WARN] Cloud setup failed: " + cloudResult.error);
|
|
666
682
|
print(" Run `npx sticky-note deploy-backend` to retry.\n");
|
|
667
|
-
} else {
|
|
683
|
+
} else if (cloudResult && !cloudResult.error) {
|
|
668
684
|
if (cloudResult.secretSet) {
|
|
669
685
|
print("\n Share STICKY_URL and STICKY_API_KEY with teammates securely.");
|
|
670
686
|
print(" (e.g. org secrets, 1Password — do not commit .env.sticky)\n");
|
|
@@ -673,6 +689,15 @@ async function cmdInit() {
|
|
|
673
689
|
print(" Run the manual command shown above, then share with your team.\n");
|
|
674
690
|
}
|
|
675
691
|
}
|
|
692
|
+
} else if (wantsCloud && ciMode) {
|
|
693
|
+
// CI mode: can't pause for wrangler install, just try and warn on failure
|
|
694
|
+
print("\n Cloud Backend Setup...\n");
|
|
695
|
+
const cloudResult = provisionCloudBackend();
|
|
696
|
+
if (!cloudResult) {
|
|
697
|
+
print(" [ERR] `wrangler` CLI not found. Skipping cloud setup in CI mode.\n");
|
|
698
|
+
} else if (cloudResult.error) {
|
|
699
|
+
print(" [WARN] Cloud setup failed: " + cloudResult.error + "\n");
|
|
700
|
+
}
|
|
676
701
|
} else if (process.env.STICKY_URL) {
|
|
677
702
|
// Write existing STICKY_URL from environment into .env.sticky
|
|
678
703
|
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.2",
|
|
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
|
}
|