@buoy-gg/core 7.0.23 → 7.0.25

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/README.md CHANGED
@@ -68,7 +68,7 @@ Every tool runs inside your app's process. The phone, the desktop, and your agen
68
68
 
69
69
  ## Free vs Pro
70
70
 
71
- Every tool is **free** — no key, no signup, no time limit.
71
+ Every tool is **free** on every tier — only how much history each keeps changes. A free key (`npx buoy login`, no card) restores the full free tier.
72
72
 
73
73
  **Pro** unlocks production builds, the MCP server, and unlimited capture. Activate with one prop:
74
74
 
@@ -76,7 +76,7 @@ Every tool is **free** — no key, no signup, no time limit.
76
76
  <FloatingDevTools licenseKey="YOUR_LICENSE_KEY" />
77
77
  ```
78
78
 
79
- **Weekend Pass:** every Saturday and Sunday, every Pro feature unlocks free for everyone — built into the product, not a promo. Details at [buoy.gg/pricing](https://buoy.gg/pricing).
79
+ **Weekend Pass:** every Saturday and Sunday, every Pro feature unlocks free for anyone holding a key — including a free one. Built into the product, not a promo. Details at [buoy.gg/pricing](https://buoy.gg/pricing).
80
80
 
81
81
  ## Safe in production
82
82
 
package/bin/buoy.js CHANGED
@@ -254,7 +254,8 @@ async function login() {
254
254
  log('');
255
255
  log(cyan(` Buoy.init({ licenseKey: process.env.${varName} });`));
256
256
  log('');
257
- log(dim(' Restart your bundler for the new env var to take effect.'));
257
+ log(dim(' Restart your bundler with its cache cleared to pick this up:'));
258
+ log(dim(' npx expo start --clear (Expo inlines EXPO_PUBLIC_* at build time)'));
258
259
  log('');
259
260
  }
260
261
 
@@ -264,6 +265,7 @@ function help() {
264
265
 
265
266
  ${bold('Usage')}
266
267
  npx buoy <command>
268
+ npx --package=@buoy-gg/core buoy <command> ${dim('(if npx picks the wrong one)')}
267
269
 
268
270
  ${bold('Commands')}
269
271
  login Sign in and write your license key to .env.local
@@ -273,7 +275,7 @@ function help() {
273
275
  A free key takes about thirty seconds and needs no card. Paid keys use the
274
276
  same command - it writes whichever key your account already holds.
275
277
 
276
- Docs: ${SITE}/docs/installation
278
+ Docs: ${SITE}/buoy/latest/docs/installation
277
279
  `);
278
280
  }
279
281
 
@@ -70,7 +70,7 @@ async function readState() {
70
70
  * One line, the first time, saying exactly what leaves and how to stop it.
71
71
  */
72
72
  function announceOnce() {
73
- console.log("[Buoy] Anonymous usage ping enabled: a random install id, the Buoy " + "version, your platform, and your license tier — no project, app, or " + "tool data, and only in development. Opt out with " + "Buoy.init({ telemetry: false }). Details: https://buoy.gg/docs/telemetry");
73
+ console.log("[Buoy] Anonymous usage ping enabled: a random install id, the Buoy " + "version, your platform, and your license tier — no project, app, or " + "tool data, and only in development. Opt out with " + "Buoy.init({ telemetry: false }). Details: https://buoy.gg/buoy/latest/docs/telemetry");
74
74
  }
75
75
  let sentThisSession = false;
76
76
 
@@ -15,4 +15,4 @@ exports.SDK_VERSION = void 0;
15
15
  * Drift is prevented by a test that fails when this disagrees with
16
16
  * package.json, so a version bump that forgets this file cannot ship.
17
17
  */
18
- const SDK_VERSION = exports.SDK_VERSION = "7.0.22";
18
+ const SDK_VERSION = exports.SDK_VERSION = "7.0.25";
@@ -66,7 +66,7 @@ async function readState() {
66
66
  * One line, the first time, saying exactly what leaves and how to stop it.
67
67
  */
68
68
  function announceOnce() {
69
- console.log("[Buoy] Anonymous usage ping enabled: a random install id, the Buoy " + "version, your platform, and your license tier — no project, app, or " + "tool data, and only in development. Opt out with " + "Buoy.init({ telemetry: false }). Details: https://buoy.gg/docs/telemetry");
69
+ console.log("[Buoy] Anonymous usage ping enabled: a random install id, the Buoy " + "version, your platform, and your license tier — no project, app, or " + "tool data, and only in development. Opt out with " + "Buoy.init({ telemetry: false }). Details: https://buoy.gg/buoy/latest/docs/telemetry");
70
70
  }
71
71
  let sentThisSession = false;
72
72
 
@@ -11,4 +11,4 @@
11
11
  * Drift is prevented by a test that fails when this disagrees with
12
12
  * package.json, so a version bump that forgets this file cannot ship.
13
13
  */
14
- export const SDK_VERSION = "7.0.22";
14
+ export const SDK_VERSION = "7.0.25";
@@ -28,7 +28,7 @@ export interface BuoyConfig {
28
28
  * installs never claim an account; it is the only way to measure that,
29
29
  * since a license server can only ever see keys that already exist.
30
30
  *
31
- * Details: https://buoy.gg/docs/telemetry
31
+ * Details: https://buoy.gg/buoy/latest/docs/telemetry
32
32
  */
33
33
  telemetry?: boolean;
34
34
  }
@@ -9,5 +9,5 @@
9
9
  * Drift is prevented by a test that fails when this disagrees with
10
10
  * package.json, so a version bump that forgets this file cannot ship.
11
11
  */
12
- export declare const SDK_VERSION = "7.0.22";
12
+ export declare const SDK_VERSION = "7.0.25";
13
13
  //# sourceMappingURL=version.d.ts.map
@@ -28,7 +28,7 @@ export interface BuoyConfig {
28
28
  * installs never claim an account; it is the only way to measure that,
29
29
  * since a license server can only ever see keys that already exist.
30
30
  *
31
- * Details: https://buoy.gg/docs/telemetry
31
+ * Details: https://buoy.gg/buoy/latest/docs/telemetry
32
32
  */
33
33
  telemetry?: boolean;
34
34
  }
@@ -9,5 +9,5 @@
9
9
  * Drift is prevented by a test that fails when this disagrees with
10
10
  * package.json, so a version bump that forgets this file cannot ship.
11
11
  */
12
- export declare const SDK_VERSION = "7.0.22";
12
+ export declare const SDK_VERSION = "7.0.25";
13
13
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/core",
3
- "version": "7.0.23",
3
+ "version": "7.0.25",
4
4
  "description": "Buoy devtools for React Native — a floating in-app dev menu; every tool streams live to your phone, desktop, and AI agent.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -37,10 +37,10 @@
37
37
  ],
38
38
  "sideEffects": false,
39
39
  "dependencies": {
40
- "@buoy-gg/shared-ui": "^7.0.23",
41
- "@buoy-gg/license": "^7.0.23",
42
- "@buoy-gg/floating-tools-core": "^7.0.23",
43
- "@buoy-gg/floating-tools-react": "^7.0.23"
40
+ "@buoy-gg/shared-ui": "^7.0.25",
41
+ "@buoy-gg/license": "^7.0.25",
42
+ "@buoy-gg/floating-tools-core": "^7.0.25",
43
+ "@buoy-gg/floating-tools-react": "^7.0.25"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": "*",
@@ -1,131 +0,0 @@
1
- /**
2
- * The CLI writes into someone else's repo, so the failure modes that matter are
3
- * "silently wrote the wrong variable name" and "clobbered a file I cared about".
4
- */
5
- import { afterEach, beforeEach, describe, expect, it } from "vitest";
6
- import { mkdtempSync, rmSync, writeFileSync, readFileSync, mkdirSync } from "node:fs";
7
- import { tmpdir } from "node:os";
8
- import { join } from "node:path";
9
- import { createRequire } from "node:module";
10
-
11
- const require_ = createRequire(import.meta.url);
12
- const cli = require_("../buoy.js") as {
13
- detectEnvVarName: (root: string) => string;
14
- writeEnvVar: (root: string, name: string, value: string) => string;
15
- ensureGitignored: (root: string) => boolean;
16
- };
17
-
18
- let root: string;
19
-
20
- beforeEach(() => {
21
- root = mkdtempSync(join(tmpdir(), "buoy-cli-"));
22
- });
23
- afterEach(() => {
24
- rmSync(root, { recursive: true, force: true });
25
- });
26
-
27
- const write = (rel: string, body: string) => {
28
- mkdirSync(join(root, rel, ".."), { recursive: true });
29
- writeFileSync(join(root, rel), body);
30
- };
31
- const read = (rel: string) => readFileSync(join(root, rel), "utf8");
32
-
33
- describe("detectEnvVarName", () => {
34
- it("uses the EXPO_PUBLIC_ prefix for Expo projects", () => {
35
- // Expo only inlines EXPO_PUBLIC_* into the bundle. Writing a bare BUOY_KEY
36
- // there produces a file that looks right and does nothing at runtime.
37
- write("package.json", JSON.stringify({ dependencies: { expo: "^52.0.0" } }));
38
- expect(cli.detectEnvVarName(root)).toBe("EXPO_PUBLIC_BUOY_KEY");
39
- });
40
-
41
- it("detects Expo from app.config.js even without the dependency listed", () => {
42
- write("package.json", JSON.stringify({}));
43
- write("app.config.js", "module.exports = {};");
44
- expect(cli.detectEnvVarName(root)).toBe("EXPO_PUBLIC_BUOY_KEY");
45
- });
46
-
47
- it("detects Expo from an app.json with an expo block", () => {
48
- write("package.json", JSON.stringify({}));
49
- write("app.json", JSON.stringify({ expo: { name: "demo" } }));
50
- expect(cli.detectEnvVarName(root)).toBe("EXPO_PUBLIC_BUOY_KEY");
51
- });
52
-
53
- it("falls back to BUOY_KEY for bare React Native", () => {
54
- write("package.json", JSON.stringify({ dependencies: { "react-native": "0.76.0" } }));
55
- expect(cli.detectEnvVarName(root)).toBe("BUOY_KEY");
56
- });
57
-
58
- it("survives an unreadable or malformed package.json", () => {
59
- write("package.json", "{ not json");
60
- expect(cli.detectEnvVarName(root)).toBe("BUOY_KEY");
61
- });
62
- });
63
-
64
- describe("writeEnvVar", () => {
65
- it("creates .env.local when there isn't one", () => {
66
- cli.writeEnvVar(root, "BUOY_KEY", "ABC-123");
67
- expect(read(".env.local")).toBe("BUOY_KEY=ABC-123\n");
68
- });
69
-
70
- it("keeps every other variable intact", () => {
71
- write(".env.local", "API_URL=https://example.test\nDEBUG=1\n");
72
- cli.writeEnvVar(root, "BUOY_KEY", "ABC-123");
73
- const out = read(".env.local");
74
- expect(out).toContain("API_URL=https://example.test");
75
- expect(out).toContain("DEBUG=1");
76
- expect(out).toContain("BUOY_KEY=ABC-123");
77
- });
78
-
79
- it("replaces an existing key instead of appending a duplicate", () => {
80
- // Running `buoy login` twice must not leave two BUOY_KEY lines, where which
81
- // one wins depends on the dotenv parser.
82
- write(".env.local", "BUOY_KEY=OLD-KEY\nOTHER=1\n");
83
- cli.writeEnvVar(root, "BUOY_KEY", "NEW-KEY");
84
- const out = read(".env.local");
85
- expect(out).toContain("BUOY_KEY=NEW-KEY");
86
- expect(out).not.toContain("OLD-KEY");
87
- expect(out.match(/BUOY_KEY=/g)).toHaveLength(1);
88
- expect(out).toContain("OTHER=1");
89
- });
90
-
91
- it("does not glue the new line onto a file with no trailing newline", () => {
92
- write(".env.local", "OTHER=1");
93
- cli.writeEnvVar(root, "BUOY_KEY", "ABC");
94
- expect(read(".env.local")).toBe("OTHER=1\nBUOY_KEY=ABC\n");
95
- });
96
-
97
- it("does not confuse a similarly named variable", () => {
98
- write(".env.local", "EXPO_PUBLIC_BUOY_KEY=EXPO-ONE\n");
99
- cli.writeEnvVar(root, "BUOY_KEY", "BARE-ONE");
100
- const out = read(".env.local");
101
- expect(out).toContain("EXPO_PUBLIC_BUOY_KEY=EXPO-ONE");
102
- expect(out).toContain("\nBUOY_KEY=BARE-ONE");
103
- });
104
- });
105
-
106
- describe("ensureGitignored", () => {
107
- it("adds .env.local when it isn't ignored", () => {
108
- write(".gitignore", "node_modules\n");
109
- expect(cli.ensureGitignored(root)).toBe(true);
110
- expect(read(".gitignore")).toContain(".env.local");
111
- });
112
-
113
- it("leaves an already-ignored file alone", () => {
114
- write(".gitignore", "node_modules\n.env.local\n");
115
- expect(cli.ensureGitignored(root)).toBe(false);
116
- expect(read(".gitignore").match(/\.env\.local/g)).toHaveLength(1);
117
- });
118
-
119
- it("recognizes the .env* and *.local wildcards", () => {
120
- write(".gitignore", ".env*\n");
121
- expect(cli.ensureGitignored(root)).toBe(false);
122
-
123
- write(".gitignore", "*.local\n");
124
- expect(cli.ensureGitignored(root)).toBe(false);
125
- });
126
-
127
- it("does nothing when the project has no .gitignore", () => {
128
- // Creating one would be presumptuous in a repo that deliberately has none.
129
- expect(cli.ensureGitignored(root)).toBe(false);
130
- });
131
- });