@buoy-gg/core 7.0.50 → 7.0.52
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/buoy.js +12 -11
- package/lib/commonjs/floatingMenu/BuoySignIn.js +1 -0
- package/lib/commonjs/floatingMenu/FloatingDevTools.js +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/floatingMenu/BuoySignIn.js +1 -0
- package/lib/module/floatingMenu/FloatingDevTools.js +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/floatingMenu/BuoySignIn.d.ts +4 -0
- package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts +14 -1
- package/lib/typescript/commonjs/version.d.ts +1 -1
- package/lib/typescript/module/floatingMenu/BuoySignIn.d.ts +4 -0
- package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts +14 -1
- package/lib/typescript/module/version.d.ts +1 -1
- package/package.json +5 -5
package/bin/buoy.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";const http=require("node:http");const fs=require("node:fs");const path=require("node:path");const crypto=require("node:crypto");const{spawn}=require("node:child_process");const SITE=process.env.BUOY_SITE_URL||"https://buoy.gg";const LOGIN_TIMEOUT_MS=5*60*1e3;const ESC="\x1B[";const color=e=>n=>`${ESC}${e}m${n}${ESC}0m`;const cyan=color(36);const green=color(32);const red=color(31);const dim=color(2);const bold=color(1);function log(e){process.stdout.write(`${e}
|
|
3
3
|
`)}function fail(e){process.stderr.write(`${red("x")} ${e}
|
|
4
|
-
`);process.exit(1)}function openBrowser(e){const n=process.platform==="darwin"?"open":process.platform==="win32"?"cmd":"xdg-open";const
|
|
5
|
-
`}fs.writeFileSync(s,
|
|
4
|
+
`);process.exit(1)}function openBrowser(e){const n=process.platform==="darwin"?"open":process.platform==="win32"?"cmd":"xdg-open";const o=process.platform==="win32"?["/c","start","",e]:[e];try{spawn(n,o,{stdio:"ignore",detached:true}).unref()}catch{}}function detectEnvVarName(e){let n=null;try{const o=path.join(e,"package.json");if(fs.existsSync(o)){const s=JSON.parse(fs.readFileSync(o,"utf8"));const t=Object.assign({},s.dependencies,s.devDependencies);if(t.expo)return"EXPO_PUBLIC_BUOY_KEY";if(t.next)n="NEXT_PUBLIC_BUOY_KEY";else if(t.vite)n="VITE_BUOY_KEY"}if(fs.existsSync(path.join(e,"app.config.js"))||fs.existsSync(path.join(e,"app.config.ts"))){return"EXPO_PUBLIC_BUOY_KEY"}const i=path.join(e,"app.json");if(fs.existsSync(i)){const s=JSON.parse(fs.readFileSync(i,"utf8"));if(s&&s.expo)return"EXPO_PUBLIC_BUOY_KEY"}}catch{}return n||"BUOY_KEY"}function envFileFor(e,n){if(!["EXPO_PUBLIC_BUOY_KEY","VITE_BUOY_KEY","NEXT_PUBLIC_BUOY_KEY"].includes(e))return".env.local";return n==="pro"||n==="business"?".env.local":".env.development.local"}function removeEnvVar(e,n,o){const i=path.join(e,o);let s;try{s=fs.readFileSync(i,"utf8")}catch{return false}const t=new RegExp("^"+n+"=.*\\n?","m");if(!t.test(s))return false;fs.writeFileSync(i,s.replace(t,""),{mode:384});return true}function writeEnvVar(e,n,o,i=".env.local"){const s=path.join(e,i);let t="";try{t=fs.readFileSync(s,"utf8")}catch{}const a=`${n}=${o}`;const r=new RegExp("^"+n+"=.*$","m");if(r.test(t)){t=t.replace(r,a)}else{if(t&&!t.endsWith("\n"))t+="\n";t+=`${a}
|
|
5
|
+
`}fs.writeFileSync(s,t,{mode:384});return s}function ensureGitignored(e,n=".env.local"){const o=path.join(e,".gitignore");let i="";try{i=fs.readFileSync(o,"utf8")}catch{return false}const s=new RegExp("^"+n.replace(/\./g,"\\.")+"$","m");if(s.test(i)||/^\.env\*|^\*\.local$|^\.env\*\.local$/m.test(i))return false;if(i&&!i.endsWith("\n"))i+="\n";i+=`
|
|
6
6
|
# Buoy license key (per developer - do not commit)
|
|
7
7
|
${n}
|
|
8
|
-
`;fs.writeFileSync(
|
|
9
|
-
${n}`));openBrowser(n)}})}async function signInAndGetDevToken(){const e=loadSessionClient();if(!e)return null;const n=cliSession(e);if(!await n.isAvailable())return null;await n.signIn();const
|
|
10
|
-
No env file was changed.`);return}const
|
|
8
|
+
`;fs.writeFileSync(o,i);return true}function awaitKeyFromBrowser(){return new Promise((e,n)=>{const o=crypto.randomBytes(16).toString("hex");const i=http.createServer((s,t)=>{if(s.headers.origin===SITE){t.setHeader("Access-Control-Allow-Origin",SITE);t.setHeader("Access-Control-Allow-Headers","Content-Type");t.setHeader("Access-Control-Allow-Methods","POST, OPTIONS");t.setHeader("Access-Control-Allow-Private-Network","true")}if(s.method==="OPTIONS"){t.writeHead(204).end();return}if(s.method!=="POST"){t.writeHead(405).end();return}let a="";s.on("data",r=>{a+=r;if(a.length>4096)s.destroy()});s.on("end",()=>{let r={};try{r=JSON.parse(a)}catch{}if(r.state!==o||typeof r.key!=="string"||!r.key){t.writeHead(400).end();return}t.writeHead(200,{"Content-Type":"application/json"});t.end('{"ok":true}');i.close();e({key:r.key.trim(),tier:r.tier||"free",email:r.email||""})})});i.on("error",n);i.listen(0,"127.0.0.1",()=>{const{port:s}=i.address();const t=`${SITE}/cli/login?port=${s}&state=${o}`;log("");log(` Opening ${cyan(t)}`);log(dim(" If your browser did not open, paste that URL into a browser on this computer."));log("");log(dim(" Waiting for you to finish signing in..."));openBrowser(t)});setTimeout(()=>{i.close();n(new Error("Timed out waiting for the browser (5 minutes)."))},LOGIN_TIMEOUT_MS).unref()})}function loadSessionClient(){try{const e=require("@buoy-gg/license/headless");if(typeof e.createNodeSession!=="function")return null;return e}catch{return null}}function cliSession(e){return e.createNodeSession({audience:e.CLI_AUDIENCE,signinOrigin:SITE,openBrowser:n=>{log(`${cyan(">")} Opening ${dim(n.split("?")[0])} to sign in...`);log(dim(` If nothing opens, visit:
|
|
9
|
+
${n}`));openBrowser(n)}})}async function signInAndGetDevToken(){const e=loadSessionClient();if(!e)return null;const n=cliSession(e);if(!await n.isAvailable())return null;await n.signIn();const o=await n.devToken();if(!o.ok){throw new Error(`This computer is signed in to Buoy, but no dev token was made: ${o.detail}`)}return{key:o.token,tier:o.tier,email:"",devToken:true}}async function login(){const e=process.cwd();let n;try{n=await signInAndGetDevToken()||await awaitKeyFromBrowser()}catch(c){fail(`${c.message}
|
|
10
|
+
No env file was changed.`);return}const o=detectEnvVarName(e);const i=envFileFor(o,n.devToken?"free":n.tier);const s=writeEnvVar(e,o,n.key,i);const t=i!==".env.local"&&removeEnvVar(e,o,".env.local");const a=ensureGitignored(e,i);const r=path.relative(e,s)||i;log("");log(`${green("OK")} Signed in${n.email?" as "+bold(n.email):""} - ${bold(n.tier)} tier`);log(` Wrote ${cyan(o)} to ${cyan(r)}`);if(n.devToken){log(dim(" It is a dev token: it works in dev builds and sims for 30 days. Then run npx buoy login again."));log(dim(" This computer is signed in to Buoy too. The MCP uses it. Sign out: npx buoy logout"))}if(t)log(dim(` Removed the old ${o} line from .env.local`));if(i===".env.development.local"){log(dim(" This file is loaded in development, keeping the key out of production builds."))}if(a)log(dim(` Added ${i} to .gitignore`));log("");log(" Use it in your app:");log("");if(o==="VITE_BUOY_KEY"){log(cyan(" <FloatingDevTools modules={modules} licenseKey={import.meta.env.VITE_BUOY_KEY} />"));log("");log(dim(" Keep your existing tool modules and providers, then reload the web app."))}else if(o==="NEXT_PUBLIC_BUOY_KEY"){log(cyan(" <FloatingDevTools modules={modules} licenseKey={process.env.NEXT_PUBLIC_BUOY_KEY} />"));log("");log(dim(" Restart next dev so it picks up the new variable."))}else{log(cyan(` Buoy.init({ licenseKey: ${o} });`));log("");log(dim(" Swift: pass the key through BuoyConfig.licenseKey in your development build."));log(dim(" Bare React Native does not load .env.local automatically; wire your existing env loader."))}log("")}async function logout(){const e=loadSessionClient();if(!e)fail("This version of Buoy cannot sign in or out. Update @buoy-gg/core.");const n=cliSession(e);const o=await n.load();await n.signOut();log(o.state==="active"?`${green("OK")} Signed out of Buoy on this computer.`:"This computer was not signed in.");log(dim(" Keys in your env files are not changed."))}async function whoami(){const e=loadSessionClient();if(!e)fail("This version of Buoy cannot sign in. Update @buoy-gg/core.");const n=await cliSession(e).load();if(n.state!=="active"){log("Not signed in. Run: npx buoy login");return}log(`${green("Signed in")} - ${bold(n.claims.tier)} plan${n.grace?dim(" (offline, using the grace period)"):""}`)}function help(){log(`
|
|
11
11
|
${bold("buoy")} - React Buoy CLI
|
|
12
12
|
|
|
13
13
|
${bold("Usage")}
|
|
@@ -16,17 +16,18 @@ ${n}
|
|
|
16
16
|
${dim("(if npx picks the wrong one)")}
|
|
17
17
|
|
|
18
18
|
${bold("Commands")}
|
|
19
|
-
login Sign in and write
|
|
19
|
+
login Sign in and write a dev token to an env file
|
|
20
20
|
logout Sign this computer out of Buoy
|
|
21
21
|
whoami Show whether this computer is signed in
|
|
22
22
|
help Show this message
|
|
23
23
|
|
|
24
24
|
${bold("Notes")}
|
|
25
|
-
Run login from your app directory
|
|
26
|
-
|
|
27
|
-
and Next.js uses
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
Run login from your app directory and click Allow in the browser. You get
|
|
26
|
+
a dev token that works in dev builds for 30 days. Expo uses
|
|
27
|
+
EXPO_PUBLIC_BUOY_KEY, Vite uses VITE_BUOY_KEY and Next.js uses
|
|
28
|
+
NEXT_PUBLIC_BUOY_KEY, all in .env.development.local. Other projects get
|
|
29
|
+
BUOY_KEY in .env.local and must pass it in with their own env loader.
|
|
30
|
+
For test and store builds, use Sign in with Buoy or a key instead.
|
|
30
31
|
This command does not install tools or verify a Desktop connection.
|
|
31
32
|
|
|
32
33
|
Docs: ${SITE}/buoy/latest/docs/installation
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.BuoySignIn=BuoySignIn;var _react=require("react");var _reactNative=require("react-native");var license=_interopRequireWildcard(require("@buoy-gg/license"));var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(r,t){if("function"==typeof WeakMap)var n=new WeakMap,o=new WeakMap;return(_interopRequireWildcard=function(e,a){if(!a&&e&&e.__esModule)return e;var i,s,c={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return c;if(i=a?o:n){if(i.has(e))return i.get(e);i.set(e,c)}for(const l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(s.get||s.set)?i(c,l,s):c[l]=e[l]);return c})(r,t)}function getSession(){try{return license.SessionManager}catch{return void 0}}const shortUrl=r=>r.replace(/^https?:\/\//,"");function useSessionState(){const[r,t]=(0,_react.useState)(()=>getSession()?.getStatus().state??"signed_out");(0,_react.useEffect)(()=>{const n=getSession();if(!n)return;const o=()=>t(n.getStatus().state);o();return n.subscribe(o)},[]);return r}function BuoySignIn({needsPlan:r=false}){const[t,n]=(0,_react.useState)(false);const o=useSessionState();return(0,_jsxRuntime.jsxs)(_reactNative.View,{pointerEvents:"box-none",style:styles.root,children:[(0,_jsxRuntime.jsx)(_sharedUi.AccountSetupButton,{expanded:t,onPress:()=>n(true)}),t?(0,_jsxRuntime.jsx)(_reactNative.Modal,{visible:true,transparent:true,animationType:"fade",onRequestClose:()=>n(false),children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.overlay,accessibilityViewIsModal:true,children:[(0,_jsxRuntime.jsx)(_reactNative.Pressable,{style:_reactNative.StyleSheet.absoluteFill,onPress:()=>n(false),accessible:false}),r&&o==="active"?(0,_jsxRuntime.jsx)(NeedsPlanCard,{onClose:()=>n(false)}):(0,_jsxRuntime.jsx)(CodeCard,{onClose:()=>n(false)})]})}):null]})}function Header({onClose:r}){return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.header,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.brand,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.brandDot}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.wordmark,children:"BUOY"})]}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",accessibilityLabel:"Close sign-in",onPress:r,style:styles.close,testID:"buoy-signin-close",children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.closeText,children:"\u2715"})})]})}function CodeCard({onClose:r}){const[t,n]=(0,_react.useState)({kind:"starting"});const o=(0,_react.useRef)(null);const e=(0,_react.useCallback)(()=>{o.current?.abort();const a=getSession();if(!a?.signInWithCode){n({kind:"error",message:"This version of @buoy-gg/license can't sign in with a code. Update it."});return}const i=new AbortController;o.current=i;n({kind:"starting"});a.signInWithCode(s=>n({kind:"waiting",prompt:s}),{signal:i.signal}).then(()=>{if(!i.signal.aborted)r()}).catch(s=>{if(i.signal.aborted)return;n({kind:"error",message:s instanceof Error?s.message:"Sign-in did not work. Try again."})})},[r]);(0,_react.useEffect)(()=>{e();return()=>o.current?.abort()},[e]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.card,testID:"buoy-code-signin",children:[(0,_jsxRuntime.jsx)(Header,{onClose:r}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.title,children:"Sign in to Buoy"}),t.kind==="starting"?(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.center,children:(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{color:_sharedUi.night.color.accent})}):null,t.kind==="waiting"?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.body,children:"Scan this with your phone's camera."}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.qr,testID:"buoy-signin-qr",children:(0,_jsxRuntime.jsx)(_sharedUi.QrCodeView,{value:t.prompt.verificationUriComplete,size:196})}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.body,children:["Or go to ",(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.strong,children:shortUrl(t.prompt.verificationUri)})," and type:"]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.code,selectable:true,testID:"buoy-signin-code",children:t.prompt.userCode}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.waiting,children:[(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"small",color:_sharedUi.night.color.textSecondary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.muted,children:"Waiting for you to allow it\u2026"})]})]}):null,t.kind==="error"?(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.body,testID:"buoy-signin-error",children:t.message}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",onPress:e,style:({pressed:a})=>[styles.primary,a&&styles.primaryPressed],testID:"buoy-signin-retry",children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.primaryText,children:"Get a new code"})})]}):null]})}function NeedsPlanCard({onClose:r}){return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.card,testID:"buoy-signin-needs-plan",children:[(0,_jsxRuntime.jsx)(Header,{onClose:r}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.title,children:"You're signed in"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.body,children:"Buoy in this build needs a Pro or Business plan."}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{accessibilityRole:"button",onPress:()=>void getSession()?.signOut(),style:({pressed:t})=>[styles.primary,t&&styles.primaryPressed],testID:"buoy-signout",children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.primaryText,children:"Sign out"})})]})}const styles=_reactNative.StyleSheet.create({root:{position:"absolute",bottom:30,right:16,zIndex:99999},overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.65)",alignItems:"center",justifyContent:"center",padding:20},card:{width:"100%",maxWidth:368,backgroundColor:"#111315",borderColor:"#303437",borderWidth:1,borderRadius:20,paddingHorizontal:24,paddingTop:18,paddingBottom:24},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:16},brand:{flexDirection:"row",alignItems:"center",gap:8},brandDot:{width:6,height:6,borderRadius:3,backgroundColor:_sharedUi.night.color.accent},wordmark:{color:_sharedUi.night.color.text,fontSize:11,fontWeight:"800",letterSpacing:1.4,lineHeight:16},close:{width:28,height:28,borderRadius:8,alignItems:"center",justifyContent:"center"},closeText:{color:_sharedUi.night.color.textSecondary,fontSize:14},title:{color:_sharedUi.night.color.text,fontSize:20,fontWeight:"700",marginBottom:8},body:{color:_sharedUi.night.color.textSecondary,fontSize:14,lineHeight:20,marginTop:8},strong:{color:_sharedUi.night.color.text,fontWeight:"600"},muted:{color:_sharedUi.night.color.textSecondary,fontSize:13},center:{paddingVertical:32,alignItems:"center"},qr:{alignSelf:"center",marginTop:16,marginBottom:8,borderRadius:12,overflow:"hidden"},code:{color:_sharedUi.night.color.text,fontFamily:_sharedUi.monoFont,fontSize:30,fontWeight:"700",letterSpacing:4,textAlign:"center",marginTop:12},waiting:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,marginTop:16},primary:{marginTop:20,minHeight:44,borderRadius:12,backgroundColor:_sharedUi.night.color.accent,alignItems:"center",justifyContent:"center"},primaryPressed:{backgroundColor:_sharedUi.night.color.accentPressed},primaryText:{color:_sharedUi.night.color.onAccent,fontSize:15,fontWeight:"600"}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.FloatingDevTools=void 0;var _sharedUi=require("@buoy-gg/shared-ui");var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _AppHost=require("./AppHost");var _FloatingMenu=require("./FloatingMenu.js");var _ToolOpenerBridge=require("./ToolOpenerBridge.js");var _autoDiscoverPresets=require("./autoDiscoverPresets.js");var _installPing=require("../telemetry/installPing.js");var _Buoy=require("../Buoy.js");var _AppIcon=require("./AppIcon");var _DevToolsVisibilityContext=require("./DevToolsVisibilityContext.js");var _optionalRequire=require("./optionalRequire.js");var _MinimizedToolsContext=require("./MinimizedToolsContext.js");var _defaultConfig=require("./defaultConfig.js");var _DefaultConfigContext=require("./DefaultConfigContext.js");var _license=require("@buoy-gg/license");var _autoExternalSync=require("./autoExternalSync.js");var _externalSyncGate=require("./externalSyncGate.js");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(n
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.FloatingDevTools=void 0;var _sharedUi=require("@buoy-gg/shared-ui");var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _AppHost=require("./AppHost");var _FloatingMenu=require("./FloatingMenu.js");var _ToolOpenerBridge=require("./ToolOpenerBridge.js");var _autoDiscoverPresets=require("./autoDiscoverPresets.js");var _installPing=require("../telemetry/installPing.js");var _Buoy=require("../Buoy.js");var _AppIcon=require("./AppIcon");var _DevToolsVisibilityContext=require("./DevToolsVisibilityContext.js");var _optionalRequire=require("./optionalRequire.js");var _MinimizedToolsContext=require("./MinimizedToolsContext.js");var _defaultConfig=require("./defaultConfig.js");var _DefaultConfigContext=require("./DefaultConfigContext.js");var _license=_interopRequireWildcard(require("@buoy-gg/license"));var licenseModule=_license;var _BuoySignIn=require("./BuoySignIn");var _autoExternalSync=require("./autoExternalSync.js");var _externalSyncGate=require("./externalSyncGate.js");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(t,n){if("function"==typeof WeakMap)var s=new WeakMap,a=new WeakMap;return(_interopRequireWildcard=function(r,x){if(!x&&r&&r.__esModule)return r;var l,u,g={__proto__:null,default:r};if(null===r||"object"!=typeof r&&"function"!=typeof r)return g;if(l=x?a:s){if(l.has(r))return l.get(r);l.set(r,g)}for(const i in r)"default"!==i&&{}.hasOwnProperty.call(r,i)&&((u=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(r,i))&&(u.get||u.set)?l(g,i,u):g[i]=r[i]);return g})(t,n)}let warnedReleaseTransport=null;function warnReleaseTransportOnce(t){if(!t||t===warnedReleaseTransport)return;warnedReleaseTransport=t;console.warn(t)}function resolveSignInAppId(t){if(t&&typeof t==="object"&&t.appId)return t.appId;try{const{Platform:n}=require("react-native");const s=require("expo-constants");const a=(s?.default??s)?.expoConfig;const r=n.OS==="android"?a?.android?.package:a?.ios?.bundleIdentifier;if(typeof r==="string"&&r)return r}catch{}try{const n=require("expo-application");const s=(n?.default??n)?.applicationId;if(typeof s==="string"&&s)return s}catch{}return null}const FloatingDevTools=({apps:t,requiredEnvVars:n,requiredStorageKeys:s,askBuoy:a,children:r,disableHints:x=false,defaultFloatingTools:l,defaultDialTools:u,requireLicense:g,licenseKey:i,zustandStores:q,environment:U,externalSync:b=true,headless:O=false,signIn:j,...D})=>{const N=U??(0,_sharedUi.normalizeEnvironment)(process.env.NODE_ENV??"dev");const{isLicensed:h}=(0,_license.useProAccess)();const{licenseKey:_,isInitialized:C,tier:m,access:c}=(0,_license.useLicense)();const G=i===void 0||(0,_license.sameLicenseKey)(i,_);const E=G&&c.status==="admitted";(0,_react.useEffect)(()=>{if(!C||c.status==="initializing")return;void(0,_installPing.sendInstallPing)({tier:c.status==="admitted"?m:"locked",enabled:(0,_Buoy.isTelemetryEnabled)()})},[C,c.status,m]);const R=j?resolveSignInAppId(j):null;(0,_react.useEffect)(()=>{if(!R)return;const e=licenseModule.SessionManager;if(!e)return;e.configure({audience:`app:${R}`});void e.load().catch(()=>{})},[R]);(0,_react.useEffect)(()=>{void _license.LicenseManager.configure(i).catch(()=>{})},[i]);(0,_react.useEffect)(()=>{if(E)(0,_sharedUi.startSettingsSync)()},[E]);(0,_react.useEffect)(()=>{if(!q||c.status==="locked")return;try{const{watchStores:e}=require("@buoy-gg/zustand");return e(q)}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/zustand",e)}},[q,c.status]);const J=(0,_react.useMemo)(()=>{if(u){return(0,_defaultConfig.validateDialConfig)(u)}return u},[u]);const M=(0,_react.useMemo)(()=>{const e=[];if(n&&n.length>0){try{const{createEnvTool:o,createEnvVarConfig:P}=require("@buoy-gg/env");e.push(o({requiredEnvVars:P(n)}))}catch(o){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/env",o)}}if(s&&s.length>0){try{const{createStorageTool:o}=require("@buoy-gg/storage");e.push(o({requiredStorageKeys:s}))}catch(o){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/storage",o)}}if(a){try{const{createAskBuoyTool:o}=require("@buoy-gg/ask-buoy");e.push(o(a))}catch(o){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/ask-buoy",o)}}return e},[n,s,a]);const T=(0,_react.useMemo)(()=>{if(!t&&M.length===0)return void 0;return[...t||[],...M]},[t,M]);const f=(0,_react.useMemo)(()=>T?(0,_autoDiscoverPresets.autoDiscoverPresetsWithCustom)(T):(0,_autoDiscoverPresets.autoDiscoverPresets)(),[T]);const A=(0,_react.useMemo)(()=>f.filter(e=>e.sync),[f]);const k=(0,_react.useMemo)(()=>{try{const{DebugBordersStandaloneOverlay:e}=require("@buoy-gg/debug-borders");return e}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/debug-borders",e);return null}},[]);const F=(0,_react.useMemo)(()=>{try{const{HighlightUpdatesOverlay:e}=require("@buoy-gg/highlight-updates");return e}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/highlight-updates",e);return null}},[]);const w=(0,_react.useMemo)(()=>{try{const{ImageOverlayStandalone:e}=require("@buoy-gg/image-overlay");return e}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/image-overlay",e);return null}},[]);const z=(0,_react.useMemo)(()=>{try{const{PerfMonitorOverlay:e}=require("@buoy-gg/perf-monitor");return e}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/perf-monitor",e);return null}},[]);const B=(0,_react.useMemo)(()=>{try{const{JsTopHudOverlay:e}=require("@buoy-gg/js-top");return e}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/js-top",e);return null}},[]);const p=(0,_react.useMemo)(()=>{try{const{RouteTracker:e}=require("@buoy-gg/route-events");return e}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/route-events",e);return null}},[]);const y=(0,_react.useMemo)(()=>{try{const{ReactQueryTracker:e}=require("@buoy-gg/react-query");return e}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/react-query",e);return null}},[]);const H=(0,_react.useMemo)(()=>{try{const{ImpersonateOverlay:e}=require("@buoy-gg/impersonate");return e}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/impersonate",e);return null}},[]);const L=(0,_react.useMemo)(()=>{try{const{ScenariosOverlay:e}=require("@buoy-gg/scenarios");return e}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/scenarios",e);return null}},[]);const d=(0,_react.useMemo)(()=>{try{const{ReduxAutoInstrument:e}=require("@buoy-gg/redux");return e??null}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/redux",e);return null}},[]);const v=(0,_react.useMemo)(()=>{try{const{ConsoleRoot:e}=require("@buoy-gg/console");return e??null}catch(e){(0,_optionalRequire.reportOptionalRequireError)("@buoy-gg/console",e);return null}},[]);const Q=(0,_react.useCallback)(e=>{const o=f.find(P=>P.id===e);if(!o)return null;return(0,_AppIcon.renderAppIcon)(o.icon,{slot:"dial",size:20,color:o.color})},[f]);const S=typeof __DEV__!=="undefined"&&__DEV__;if(!S&&!h){return j&&!O?(0,_jsxRuntime.jsx)(_BuoySignIn.BuoySignIn,{needsPlan:true}):null}const V=(0,_externalSyncGate.shouldMountExternalSync)({isDevelopment:S,isLicensed:h,externalSync:b,isAvailable:(0,_autoExternalSync.isExternalSyncAvailable)()});const I=(0,_externalSyncGate.externalSyncOptions)(b);if(!S&&I?.enableInRelease){warnReleaseTransportOnce((0,_externalSyncGate.releaseTransportProblem)(I.socketURL,I))}const W=(0,_jsxRuntime.jsx)(_autoExternalSync.ToolRegistryPublisher,{requiredEnvVars:n,customApps:A});if(!E){return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[c.status==="initializing"&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[d&&(0,_jsxRuntime.jsx)(d,{}),v&&(0,_jsxRuntime.jsx)(v,{}),p&&(0,_jsxRuntime.jsx)(p,{}),y&&(0,_jsxRuntime.jsx)(y,{})]}),!O&&(j?(0,_jsxRuntime.jsx)(_BuoySignIn.BuoySignIn,{}):(0,_jsxRuntime.jsx)(_sharedUi.AccountSetup,{}))]})}if(O){return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[d&&(0,_jsxRuntime.jsx)(d,{}),v&&(0,_jsxRuntime.jsx)(v,{}),p&&(0,_jsxRuntime.jsx)(p,{}),y&&(0,_jsxRuntime.jsx)(y,{}),W,V&&(0,_jsxRuntime.jsx)(_autoExternalSync.AutoExternalSync,{options:(0,_externalSyncGate.externalSyncOptions)(b),requiredEnvVars:n,isPro:h,tier:m,licenseKey:_,customApps:A})]})}return(0,_jsxRuntime.jsx)(_DefaultConfigContext.DefaultConfigProvider,{defaultFloatingTools:l,defaultDialTools:J,children:(0,_jsxRuntime.jsx)(_sharedUi.HintsProvider,{disableHints:x,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,pointerEvents:"box-none",__buoyDevToolsRoot:true,children:(0,_jsxRuntime.jsxs)(_DevToolsVisibilityContext.DevToolsVisibilityProvider,{children:[w&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:_reactNative.StyleSheet.absoluteFill,pointerEvents:"box-none",collapsable:false,children:(0,_jsxRuntime.jsx)(w,{})}),(0,_jsxRuntime.jsx)(_AppHost.AppHostProvider,{children:(0,_jsxRuntime.jsxs)(_MinimizedToolsContext.MinimizedToolsProvider,{getToolIcon:Q,children:[(0,_jsxRuntime.jsx)(_FloatingMenu.FloatingMenu,{...D,apps:f,environment:N}),D.hidden?null:(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_AppHost.AppOverlay,{}),(0,_jsxRuntime.jsx)(_sharedUi.FloatingToolHost,{})]}),(0,_jsxRuntime.jsx)(_ToolOpenerBridge.ToolOpenerBridge,{})]})}),r,k&&(0,_jsxRuntime.jsx)(k,{}),F&&(0,_jsxRuntime.jsx)(F,{}),z&&(0,_jsxRuntime.jsx)(z,{}),B&&(0,_jsxRuntime.jsx)(B,{}),H&&(0,_jsxRuntime.jsx)(H,{}),L&&(0,_jsxRuntime.jsx)(L,{}),d&&(0,_jsxRuntime.jsx)(d,{}),v&&(0,_jsxRuntime.jsx)(v,{}),p&&(0,_jsxRuntime.jsx)(p,{}),y&&(0,_jsxRuntime.jsx)(y,{}),W,V&&(0,_jsxRuntime.jsx)(_autoExternalSync.AutoExternalSync,{options:(0,_externalSyncGate.externalSyncOptions)(b),requiredEnvVars:n,isPro:h,tier:m,licenseKey:_,customApps:A})]})})})})};exports.FloatingDevTools=FloatingDevTools;const styles=_reactNative.StyleSheet.create({container:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:9999}});
|
package/lib/commonjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;const SDK_VERSION=exports.SDK_VERSION="7.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;const SDK_VERSION=exports.SDK_VERSION="7.0.52";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useCallback as w,useEffect as f,useRef as I,useState as b}from"react";import{ActivityIndicator as p,Modal as k,Pressable as y,StyleSheet as S,Text as i,View as l}from"react-native";import*as T from"@buoy-gg/license";import{AccountSetupButton as D,QrCodeView as P,monoFont as v,night as s}from"@buoy-gg/shared-ui";import{jsx as e,jsxs as a,Fragment as x}from"react/jsx-runtime";function h(){try{return T.SessionManager}catch{return void 0}}const z=o=>o.replace(/^https?:\/\//,"");function B(){const[o,n]=b(()=>h()?.getStatus().state??"signed_out");f(()=>{const r=h();if(!r)return;const c=()=>n(r.getStatus().state);c();return r.subscribe(c)},[]);return o}export function BuoySignIn({needsPlan:o=false}){const[n,r]=b(false);const c=B();return a(l,{pointerEvents:"box-none",style:t.root,children:[e(D,{expanded:n,onPress:()=>r(true)}),n?e(k,{visible:true,transparent:true,animationType:"fade",onRequestClose:()=>r(false),children:a(l,{style:t.overlay,accessibilityViewIsModal:true,children:[e(y,{style:S.absoluteFill,onPress:()=>r(false),accessible:false}),o&&c==="active"?e(W,{onClose:()=>r(false)}):e(R,{onClose:()=>r(false)})]})}):null]})}function C({onClose:o}){return a(l,{style:t.header,children:[a(l,{style:t.brand,children:[e(l,{style:t.brandDot}),e(i,{style:t.wordmark,children:"BUOY"})]}),e(y,{accessibilityRole:"button",accessibilityLabel:"Close sign-in",onPress:o,style:t.close,testID:"buoy-signin-close",children:e(i,{style:t.closeText,children:"\u2715"})})]})}function R({onClose:o}){const[n,r]=b({kind:"starting"});const c=I(null);const m=w(()=>{c.current?.abort();const d=h();if(!d?.signInWithCode){r({kind:"error",message:"This version of @buoy-gg/license can't sign in with a code. Update it."});return}const u=new AbortController;c.current=u;r({kind:"starting"});d.signInWithCode(g=>r({kind:"waiting",prompt:g}),{signal:u.signal}).then(()=>{if(!u.signal.aborted)o()}).catch(g=>{if(u.signal.aborted)return;r({kind:"error",message:g instanceof Error?g.message:"Sign-in did not work. Try again."})})},[o]);f(()=>{m();return()=>c.current?.abort()},[m]);return a(l,{style:t.card,testID:"buoy-code-signin",children:[e(C,{onClose:o}),e(i,{style:t.title,children:"Sign in to Buoy"}),n.kind==="starting"?e(l,{style:t.center,children:e(p,{color:s.color.accent})}):null,n.kind==="waiting"?a(x,{children:[e(i,{style:t.body,children:"Scan this with your phone's camera."}),e(l,{style:t.qr,testID:"buoy-signin-qr",children:e(P,{value:n.prompt.verificationUriComplete,size:196})}),a(i,{style:t.body,children:["Or go to ",e(i,{style:t.strong,children:z(n.prompt.verificationUri)})," and type:"]}),e(i,{style:t.code,selectable:true,testID:"buoy-signin-code",children:n.prompt.userCode}),a(l,{style:t.waiting,children:[e(p,{size:"small",color:s.color.textSecondary}),e(i,{style:t.muted,children:"Waiting for you to allow it\u2026"})]})]}):null,n.kind==="error"?a(x,{children:[e(i,{style:t.body,testID:"buoy-signin-error",children:n.message}),e(y,{accessibilityRole:"button",onPress:m,style:({pressed:d})=>[t.primary,d&&t.primaryPressed],testID:"buoy-signin-retry",children:e(i,{style:t.primaryText,children:"Get a new code"})})]}):null]})}function W({onClose:o}){return a(l,{style:t.card,testID:"buoy-signin-needs-plan",children:[e(C,{onClose:o}),e(i,{style:t.title,children:"You're signed in"}),e(i,{style:t.body,children:"Buoy in this build needs a Pro or Business plan."}),e(y,{accessibilityRole:"button",onPress:()=>void h()?.signOut(),style:({pressed:n})=>[t.primary,n&&t.primaryPressed],testID:"buoy-signout",children:e(i,{style:t.primaryText,children:"Sign out"})})]})}const t=S.create({root:{position:"absolute",bottom:30,right:16,zIndex:99999},overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.65)",alignItems:"center",justifyContent:"center",padding:20},card:{width:"100%",maxWidth:368,backgroundColor:"#111315",borderColor:"#303437",borderWidth:1,borderRadius:20,paddingHorizontal:24,paddingTop:18,paddingBottom:24},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:16},brand:{flexDirection:"row",alignItems:"center",gap:8},brandDot:{width:6,height:6,borderRadius:3,backgroundColor:s.color.accent},wordmark:{color:s.color.text,fontSize:11,fontWeight:"800",letterSpacing:1.4,lineHeight:16},close:{width:28,height:28,borderRadius:8,alignItems:"center",justifyContent:"center"},closeText:{color:s.color.textSecondary,fontSize:14},title:{color:s.color.text,fontSize:20,fontWeight:"700",marginBottom:8},body:{color:s.color.textSecondary,fontSize:14,lineHeight:20,marginTop:8},strong:{color:s.color.text,fontWeight:"600"},muted:{color:s.color.textSecondary,fontSize:13},center:{paddingVertical:32,alignItems:"center"},qr:{alignSelf:"center",marginTop:16,marginBottom:8,borderRadius:12,overflow:"hidden"},code:{color:s.color.text,fontFamily:v,fontSize:30,fontWeight:"700",letterSpacing:4,textAlign:"center",marginTop:12},waiting:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,marginTop:16},primary:{marginTop:20,minHeight:44,borderRadius:12,backgroundColor:s.color.accent,alignItems:"center",justifyContent:"center"},primaryPressed:{backgroundColor:s.color.accentPressed},primaryText:{color:s.color.onAccent,fontSize:15,fontWeight:"600"}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{FloatingToolHost as
|
|
1
|
+
"use strict";import{FloatingToolHost as se}from"@buoy-gg/shared-ui";import{AccountSetup as ce,startSettingsSync as ue}from"@buoy-gg/shared-ui";import Ve,{useMemo as t,useCallback as ae,useEffect as v}from"react";import{View as $,StyleSheet as G}from"react-native";import{AppHostProvider as le}from"./AppHost";import{FloatingMenu as ge}from"./FloatingMenu.js";import{AppOverlay as ye}from"./AppHost";import{ToolOpenerBridge as pe}from"./ToolOpenerBridge.js";import{autoDiscoverPresets as de,autoDiscoverPresetsWithCustom as me}from"./autoDiscoverPresets.js";import{sendInstallPing as fe}from"../telemetry/installPing.js";import{isTelemetryEnabled as ve}from"../Buoy.js";import{renderAppIcon as be}from"./AppIcon";import{DevToolsVisibilityProvider as he}from"./DevToolsVisibilityContext.js";import{reportOptionalRequireError as n}from"./optionalRequire.js";import{HintsProvider as Oe,normalizeEnvironment as Te}from"@buoy-gg/shared-ui";import{MinimizedToolsProvider as Ae}from"./MinimizedToolsContext.js";import{validateDialConfig as qe}from"./defaultConfig.js";import{DefaultConfigProvider as Re}from"./DefaultConfigContext.js";import{LicenseManager as Ie,useProAccess as xe,useLicense as Ee,sameLicenseKey as _e}from"@buoy-gg/license";import*as Pe from"@buoy-gg/license";import{BuoySignIn as X}from"./BuoySignIn";import{AutoExternalSync as Y,ToolRegistryPublisher as ke,isExternalSyncAvailable as De}from"./autoExternalSync.js";import{externalSyncOptions as j,releaseTransportProblem as Se,shouldMountExternalSync as Me}from"./externalSyncGate.js";import{jsx as r,Fragment as R,jsxs as d}from"react/jsx-runtime";let Z=null;function ze(i){if(!i||i===Z)return;Z=i;console.warn(i)}function Ce(i){if(i&&typeof i==="object"&&i.appId)return i.appId;try{const{Platform:s}=require("react-native");const c=require("expo-constants");const a=(c?.default??c)?.expoConfig;const m=s.OS==="android"?a?.android?.package:a?.ios?.bundleIdentifier;if(typeof m==="string"&&m)return m}catch{}try{const s=require("expo-application");const c=(s?.default??s)?.applicationId;if(typeof c==="string"&&c)return c}catch{}return null}export const FloatingDevTools=({apps:i,requiredEnvVars:s,requiredStorageKeys:c,askBuoy:a,children:m,disableHints:K=false,defaultFloatingTools:ee,defaultDialTools:b,requireLicense:Fe,licenseKey:h,zustandStores:I,environment:re,externalSync:O=true,headless:x=false,signIn:T,...F})=>{const te=re??Te(process.env.NODE_ENV??"dev");const{isLicensed:A}=xe();const{licenseKey:E,isInitialized:H,tier:q,access:u}=Ee();const oe=h===void 0||_e(h,E);const _=oe&&u.status==="admitted";v(()=>{if(!H||u.status==="initializing")return;void fe({tier:u.status==="admitted"?q:"locked",enabled:ve()})},[H,u.status,q]);const P=T?Ce(T):null;v(()=>{if(!P)return;const e=Pe.SessionManager;if(!e)return;e.configure({audience:`app:${P}`});void e.load().catch(()=>{})},[P]);v(()=>{void Ie.configure(h).catch(()=>{})},[h]);v(()=>{if(_)ue()},[_]);v(()=>{if(!I||u.status==="locked")return;try{const{watchStores:e}=require("@buoy-gg/zustand");return e(I)}catch(e){n("@buoy-gg/zustand",e)}},[I,u.status]);const ne=t(()=>{if(b){return qe(b)}return b},[b]);const k=t(()=>{const e=[];if(s&&s.length>0){try{const{createEnvTool:o,createEnvVarConfig:C}=require("@buoy-gg/env");e.push(o({requiredEnvVars:C(s)}))}catch(o){n("@buoy-gg/env",o)}}if(c&&c.length>0){try{const{createStorageTool:o}=require("@buoy-gg/storage");e.push(o({requiredStorageKeys:c}))}catch(o){n("@buoy-gg/storage",o)}}if(a){try{const{createAskBuoyTool:o}=require("@buoy-gg/ask-buoy");e.push(o(a))}catch(o){n("@buoy-gg/ask-buoy",o)}}return e},[s,c,a]);const D=t(()=>{if(!i&&k.length===0)return void 0;return[...i||[],...k]},[i,k]);const f=t(()=>D?me(D):de(),[D]);const S=t(()=>f.filter(e=>e.sync),[f]);const L=t(()=>{try{const{DebugBordersStandaloneOverlay:e}=require("@buoy-gg/debug-borders");return e}catch(e){n("@buoy-gg/debug-borders",e);return null}},[]);const w=t(()=>{try{const{HighlightUpdatesOverlay:e}=require("@buoy-gg/highlight-updates");return e}catch(e){n("@buoy-gg/highlight-updates",e);return null}},[]);const V=t(()=>{try{const{ImageOverlayStandalone:e}=require("@buoy-gg/image-overlay");return e}catch(e){n("@buoy-gg/image-overlay",e);return null}},[]);const B=t(()=>{try{const{PerfMonitorOverlay:e}=require("@buoy-gg/perf-monitor");return e}catch(e){n("@buoy-gg/perf-monitor",e);return null}},[]);const U=t(()=>{try{const{JsTopHudOverlay:e}=require("@buoy-gg/js-top");return e}catch(e){n("@buoy-gg/js-top",e);return null}},[]);const l=t(()=>{try{const{RouteTracker:e}=require("@buoy-gg/route-events");return e}catch(e){n("@buoy-gg/route-events",e);return null}},[]);const g=t(()=>{try{const{ReactQueryTracker:e}=require("@buoy-gg/react-query");return e}catch(e){n("@buoy-gg/react-query",e);return null}},[]);const J=t(()=>{try{const{ImpersonateOverlay:e}=require("@buoy-gg/impersonate");return e}catch(e){n("@buoy-gg/impersonate",e);return null}},[]);const N=t(()=>{try{const{ScenariosOverlay:e}=require("@buoy-gg/scenarios");return e}catch(e){n("@buoy-gg/scenarios",e);return null}},[]);const y=t(()=>{try{const{ReduxAutoInstrument:e}=require("@buoy-gg/redux");return e??null}catch(e){n("@buoy-gg/redux",e);return null}},[]);const p=t(()=>{try{const{ConsoleRoot:e}=require("@buoy-gg/console");return e??null}catch(e){n("@buoy-gg/console",e);return null}},[]);const ie=ae(e=>{const o=f.find(C=>C.id===e);if(!o)return null;return be(o.icon,{slot:"dial",size:20,color:o.color})},[f]);const M=typeof __DEV__!=="undefined"&&__DEV__;if(!M&&!A){return T&&!x?r(X,{needsPlan:true}):null}const Q=Me({isDevelopment:M,isLicensed:A,externalSync:O,isAvailable:De()});const z=j(O);if(!M&&z?.enableInRelease){ze(Se(z.socketURL,z))}const W=r(ke,{requiredEnvVars:s,customApps:S});if(!_){return d(R,{children:[u.status==="initializing"&&d(R,{children:[y&&r(y,{}),p&&r(p,{}),l&&r(l,{}),g&&r(g,{})]}),!x&&(T?r(X,{}):r(ce,{}))]})}if(x){return d(R,{children:[y&&r(y,{}),p&&r(p,{}),l&&r(l,{}),g&&r(g,{}),W,Q&&r(Y,{options:j(O),requiredEnvVars:s,isPro:A,tier:q,licenseKey:E,customApps:S})]})}return r(Re,{defaultFloatingTools:ee,defaultDialTools:ne,children:r(Oe,{disableHints:K,children:r($,{style:je.container,pointerEvents:"box-none",__buoyDevToolsRoot:true,children:d(he,{children:[V&&r($,{style:G.absoluteFill,pointerEvents:"box-none",collapsable:false,children:r(V,{})}),r(le,{children:d(Ae,{getToolIcon:ie,children:[r(ge,{...F,apps:f,environment:te}),F.hidden?null:d(R,{children:[r(ye,{}),r(se,{})]}),r(pe,{})]})}),m,L&&r(L,{}),w&&r(w,{}),B&&r(B,{}),U&&r(U,{}),J&&r(J,{}),N&&r(N,{}),y&&r(y,{}),p&&r(p,{}),l&&r(l,{}),g&&r(g,{}),W,Q&&r(Y,{options:j(O),requiredEnvVars:s,isPro:A,tier:q,licenseKey:E,customApps:S})]})})})})};const je=G.create({container:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:9999}});
|
package/lib/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export const SDK_VERSION="7.0.
|
|
1
|
+
"use strict";export const SDK_VERSION="7.0.52";
|
|
@@ -303,6 +303,19 @@ export interface FloatingDevToolsProps extends Omit<FloatingMenuProps, "apps"> {
|
|
|
303
303
|
* @default false
|
|
304
304
|
*/
|
|
305
305
|
headless?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Show "Sign in to Buoy" when Buoy isn't open: a QR code and a short code
|
|
308
|
+
* for buoy.gg/activate. Someone signed in to buoy.gg allows it there. Use it
|
|
309
|
+
* for test and live builds, where no key is in the app.
|
|
310
|
+
*
|
|
311
|
+
* The app id comes from your Expo config (iOS bundle id or Android package),
|
|
312
|
+
* or pass it: `signIn={{ appId: "com.acme.shop" }}`. Add `app:` plus that id
|
|
313
|
+
* at buoy.gg/dashboard/sites. Only render FloatingDevTools for your own
|
|
314
|
+
* admins and testers.
|
|
315
|
+
*/
|
|
316
|
+
signIn?: boolean | {
|
|
317
|
+
appId?: string;
|
|
318
|
+
};
|
|
306
319
|
}
|
|
307
320
|
/**
|
|
308
321
|
* Unified floating development tools component with automatic preset discovery.
|
|
@@ -358,5 +371,5 @@ export interface FloatingDevToolsProps extends Omit<FloatingMenuProps, "apps"> {
|
|
|
358
371
|
*
|
|
359
372
|
* @param props - FloatingDevTools props
|
|
360
373
|
*/
|
|
361
|
-
export declare const FloatingDevTools: ({ apps, requiredEnvVars, requiredStorageKeys, askBuoy, children, disableHints, defaultFloatingTools, defaultDialTools, requireLicense: _requireLicense, licenseKey: licenseKeyProp, zustandStores, environment, externalSync, headless, ...props }: FloatingDevToolsProps) => React.JSX.Element | null;
|
|
374
|
+
export declare const FloatingDevTools: ({ apps, requiredEnvVars, requiredStorageKeys, askBuoy, children, disableHints, defaultFloatingTools, defaultDialTools, requireLicense: _requireLicense, licenseKey: licenseKeyProp, zustandStores, environment, externalSync, headless, signIn, ...props }: FloatingDevToolsProps) => React.JSX.Element | null;
|
|
362
375
|
//# sourceMappingURL=FloatingDevTools.d.ts.map
|
|
@@ -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.
|
|
12
|
+
export declare const SDK_VERSION = "7.0.52";
|
|
13
13
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -303,6 +303,19 @@ export interface FloatingDevToolsProps extends Omit<FloatingMenuProps, "apps"> {
|
|
|
303
303
|
* @default false
|
|
304
304
|
*/
|
|
305
305
|
headless?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Show "Sign in to Buoy" when Buoy isn't open: a QR code and a short code
|
|
308
|
+
* for buoy.gg/activate. Someone signed in to buoy.gg allows it there. Use it
|
|
309
|
+
* for test and live builds, where no key is in the app.
|
|
310
|
+
*
|
|
311
|
+
* The app id comes from your Expo config (iOS bundle id or Android package),
|
|
312
|
+
* or pass it: `signIn={{ appId: "com.acme.shop" }}`. Add `app:` plus that id
|
|
313
|
+
* at buoy.gg/dashboard/sites. Only render FloatingDevTools for your own
|
|
314
|
+
* admins and testers.
|
|
315
|
+
*/
|
|
316
|
+
signIn?: boolean | {
|
|
317
|
+
appId?: string;
|
|
318
|
+
};
|
|
306
319
|
}
|
|
307
320
|
/**
|
|
308
321
|
* Unified floating development tools component with automatic preset discovery.
|
|
@@ -358,5 +371,5 @@ export interface FloatingDevToolsProps extends Omit<FloatingMenuProps, "apps"> {
|
|
|
358
371
|
*
|
|
359
372
|
* @param props - FloatingDevTools props
|
|
360
373
|
*/
|
|
361
|
-
export declare const FloatingDevTools: ({ apps, requiredEnvVars, requiredStorageKeys, askBuoy, children, disableHints, defaultFloatingTools, defaultDialTools, requireLicense: _requireLicense, licenseKey: licenseKeyProp, zustandStores, environment, externalSync, headless, ...props }: FloatingDevToolsProps) => React.JSX.Element | null;
|
|
374
|
+
export declare const FloatingDevTools: ({ apps, requiredEnvVars, requiredStorageKeys, askBuoy, children, disableHints, defaultFloatingTools, defaultDialTools, requireLicense: _requireLicense, licenseKey: licenseKeyProp, zustandStores, environment, externalSync, headless, signIn, ...props }: FloatingDevToolsProps) => React.JSX.Element | null;
|
|
362
375
|
//# sourceMappingURL=FloatingDevTools.d.ts.map
|
|
@@ -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.
|
|
12
|
+
export declare const SDK_VERSION = "7.0.52";
|
|
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.
|
|
3
|
+
"version": "7.0.52",
|
|
4
4
|
"description": "Floating developer menu and account setup for React Native. Add tool packages and configure Desktop or MCP connections separately.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"react-devtools-core": "6.1.5",
|
|
64
|
-
"@buoy-gg/floating-tools-core": "^7.0.
|
|
65
|
-
"@buoy-gg/license": "^7.0.
|
|
66
|
-
"@buoy-gg/floating-tools-react": "^7.0.
|
|
67
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
64
|
+
"@buoy-gg/floating-tools-core": "^7.0.52",
|
|
65
|
+
"@buoy-gg/license": "^7.0.52",
|
|
66
|
+
"@buoy-gg/floating-tools-react": "^7.0.52",
|
|
67
|
+
"@buoy-gg/shared-ui": "^7.0.52"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "*"
|