@buoy-gg/license 7.0.22 → 7.0.24

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.
Files changed (68) hide show
  1. package/LICENSE +46 -0
  2. package/lib/commonjs/DeviceRegistrationModal.js +1 -189
  3. package/lib/commonjs/LicenseManager.js +14 -610
  4. package/lib/commonjs/api.js +1 -172
  5. package/lib/commonjs/cacheSignature.js +15 -0
  6. package/lib/commonjs/config.js +16 -28
  7. package/lib/commonjs/device-info.js +1 -93
  8. package/lib/commonjs/device-info.web.js +1 -227
  9. package/lib/commonjs/fingerprint.js +1 -30
  10. package/lib/commonjs/fingerprint.web.js +1 -30
  11. package/lib/commonjs/hooks.js +13 -120
  12. package/lib/commonjs/index.js +17 -106
  13. package/lib/commonjs/index.web.js +17 -98
  14. package/lib/commonjs/tier.js +16 -0
  15. package/lib/commonjs/types.js +1 -1
  16. package/lib/commonjs/weekendPro.js +15 -41
  17. package/lib/module/DeviceRegistrationModal.js +1 -185
  18. package/lib/module/LicenseManager.js +14 -607
  19. package/lib/module/api.js +1 -165
  20. package/lib/module/cacheSignature.js +15 -0
  21. package/lib/module/config.js +16 -24
  22. package/lib/module/device-info.js +1 -87
  23. package/lib/module/device-info.web.js +1 -220
  24. package/lib/module/fingerprint.js +1 -10
  25. package/lib/module/fingerprint.web.js +1 -10
  26. package/lib/module/hooks.js +13 -114
  27. package/lib/module/index.js +15 -54
  28. package/lib/module/index.web.js +15 -52
  29. package/lib/module/tier.js +16 -0
  30. package/lib/module/types.js +1 -1
  31. package/lib/module/weekendPro.js +15 -37
  32. package/lib/typescript/commonjs/LicenseManager.d.ts +31 -6
  33. package/lib/typescript/commonjs/LicenseManager.d.ts.map +1 -1
  34. package/lib/typescript/commonjs/cacheSignature.d.ts +42 -0
  35. package/lib/typescript/commonjs/cacheSignature.d.ts.map +1 -0
  36. package/lib/typescript/commonjs/config.d.ts +62 -1
  37. package/lib/typescript/commonjs/config.d.ts.map +1 -1
  38. package/lib/typescript/commonjs/hooks.d.ts +27 -5
  39. package/lib/typescript/commonjs/hooks.d.ts.map +1 -1
  40. package/lib/typescript/commonjs/index.d.ts +20 -2
  41. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  42. package/lib/typescript/commonjs/index.web.d.ts +20 -2
  43. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  44. package/lib/typescript/commonjs/tier.d.ts +55 -0
  45. package/lib/typescript/commonjs/tier.d.ts.map +1 -0
  46. package/lib/typescript/commonjs/types.d.ts +44 -0
  47. package/lib/typescript/commonjs/types.d.ts.map +1 -1
  48. package/lib/typescript/commonjs/weekendPro.d.ts +30 -7
  49. package/lib/typescript/commonjs/weekendPro.d.ts.map +1 -1
  50. package/lib/typescript/module/LicenseManager.d.ts +31 -6
  51. package/lib/typescript/module/LicenseManager.d.ts.map +1 -1
  52. package/lib/typescript/module/cacheSignature.d.ts +42 -0
  53. package/lib/typescript/module/cacheSignature.d.ts.map +1 -0
  54. package/lib/typescript/module/config.d.ts +62 -1
  55. package/lib/typescript/module/config.d.ts.map +1 -1
  56. package/lib/typescript/module/hooks.d.ts +27 -5
  57. package/lib/typescript/module/hooks.d.ts.map +1 -1
  58. package/lib/typescript/module/index.d.ts +20 -2
  59. package/lib/typescript/module/index.d.ts.map +1 -1
  60. package/lib/typescript/module/index.web.d.ts +20 -2
  61. package/lib/typescript/module/index.web.d.ts.map +1 -1
  62. package/lib/typescript/module/tier.d.ts +55 -0
  63. package/lib/typescript/module/tier.d.ts.map +1 -0
  64. package/lib/typescript/module/types.d.ts +44 -0
  65. package/lib/typescript/module/types.d.ts.map +1 -1
  66. package/lib/typescript/module/weekendPro.d.ts +30 -7
  67. package/lib/typescript/module/weekendPro.d.ts.map +1 -1
  68. package/package.json +7 -4
package/LICENSE ADDED
@@ -0,0 +1,46 @@
1
+ Buoy — Proprietary Software License
2
+ ===================================
3
+
4
+ Copyright (c) Buoy. All rights reserved.
5
+
6
+ This package is NOT open source. It is proprietary software, distributed only
7
+ under the Buoy End User License Agreement, available at https://buoy.gg/terms,
8
+ which is the authoritative and complete statement of the terms. This file is a
9
+ summary for readers who encounter the package in node_modules; where the two
10
+ differ, the EULA at https://buoy.gg/terms governs.
11
+
12
+ What this package is
13
+ --------------------
14
+
15
+ @buoy-gg/license implements license validation for Buoy Pro. It is the
16
+ technological measure that controls access to the paid features of Buoy's
17
+ developer tools.
18
+
19
+ Permitted use
20
+ -------------
21
+
22
+ Use of this package as distributed, as a dependency of an application, subject
23
+ to the EULA.
24
+
25
+ Not permitted
26
+ -------------
27
+
28
+ Modifying, patching, recompiling, aliasing, stubbing, replacing, or otherwise
29
+ altering this package — by any means, including postinstall patches, bundler
30
+ module aliases, package manager overrides, or edits to files in node_modules —
31
+ so that Buoy Pro features become available without a valid license.
32
+
33
+ Doing so is a breach of the EULA. In the United States it is also circumvention
34
+ of an access control measure under 17 U.S.C. § 1201, which applies whether or
35
+ not any code is copied or redistributed.
36
+
37
+ You do not need to do any of this
38
+ ---------------------------------
39
+
40
+ Buoy Pro is $9/month, and it is free for everyone every weekend — all of
41
+ Saturday and Sunday, no key, no account, no trial to start. If you want Pro
42
+ during the week, buy a key at https://buoy.gg. If you are evaluating Buoy, or
43
+ working on a side project, the Weekend Pass is meant for exactly that.
44
+
45
+ If cost is the obstacle, regional pricing is available, and you can email
46
+ support at https://buoy.gg rather than patching anything.
@@ -1,189 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DeviceRegistrationModal = DeviceRegistrationModal;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _LicenseManager = require("./LicenseManager.js");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
- /**
13
- * DeviceRegistrationModal - Prompts user to name their device during first registration
14
- *
15
- * Styled to match the Buoy brand design system.
16
- */
17
-
18
- // Buoy brand colors - matches shared/src/ui/gameUI/constants/gameUIColors.ts
19
- const buoyColors = {
20
- base: "#121212",
21
- card: "#1A1A1A",
22
- hover: "#242424",
23
- input: "#2A2A2A",
24
- border: "#333333",
25
- borderStrong: "#444444",
26
- text: "#E0E0E0",
27
- textSecondary: "#A0A0A0",
28
- textMuted: "#888888",
29
- primary: "#20C997",
30
- // Buoy teal
31
- success: "#20C997",
32
- warning: "#FFA94D",
33
- error: "#EF4444",
34
- info: "#00B8E6"
35
- };
36
- function DeviceRegistrationModal({
37
- title = "Name Your Device",
38
- description = "Give this device a name to help you identify it later.",
39
- buttonText = "Continue",
40
- onComplete
41
- }) {
42
- const [visible, setVisible] = (0, _react.useState)(false);
43
- const [deviceName, setDeviceName] = (0, _react.useState)("");
44
- const [defaultName, setDefaultName] = (0, _react.useState)("");
45
- const [isRegistering, setIsRegistering] = (0, _react.useState)(false);
46
- (0, _react.useEffect)(() => {
47
- // Subscribe to device registration requests
48
- const unsubscribe = _LicenseManager.LicenseManager.onDeviceRegistrationNeeded(info => {
49
- setDefaultName(info.defaultName);
50
- setDeviceName(info.defaultName);
51
- setVisible(true);
52
- });
53
- return unsubscribe;
54
- }, []);
55
- const handleSubmit = (0, _react.useCallback)(async () => {
56
- const name = deviceName.trim() || defaultName;
57
- setIsRegistering(true);
58
- try {
59
- await _LicenseManager.LicenseManager.completeDeviceRegistration(name);
60
- setVisible(false);
61
- onComplete?.(name);
62
- } catch (error) {
63
- console.warn("[Buoy] Device registration failed:", error);
64
- // Still close the modal - registration failure shouldn't block the user
65
- setVisible(false);
66
- } finally {
67
- setIsRegistering(false);
68
- }
69
- }, [deviceName, defaultName, onComplete]);
70
- if (!visible) return null;
71
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
72
- visible: visible,
73
- transparent: true,
74
- animationType: "fade",
75
- onRequestClose: () => {
76
- // Allow closing without naming - use default
77
- handleSubmit();
78
- },
79
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView, {
80
- behavior: _reactNative.Platform.OS === "ios" ? "padding" : "height",
81
- style: styles.overlay,
82
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
83
- style: styles.container,
84
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
85
- style: styles.accentBar
86
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
87
- style: styles.content,
88
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
89
- style: styles.title,
90
- children: title
91
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
92
- style: styles.description,
93
- children: description
94
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
95
- style: styles.input,
96
- value: deviceName,
97
- onChangeText: setDeviceName,
98
- placeholder: defaultName,
99
- placeholderTextColor: buoyColors.textMuted,
100
- autoFocus: true,
101
- returnKeyType: "done",
102
- onSubmitEditing: handleSubmit,
103
- editable: !isRegistering,
104
- selectionColor: buoyColors.primary
105
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
106
- style: [styles.button, isRegistering && styles.buttonDisabled],
107
- onPress: handleSubmit,
108
- disabled: isRegistering,
109
- activeOpacity: 0.8,
110
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
111
- style: styles.buttonText,
112
- children: isRegistering ? "Registering..." : buttonText
113
- })
114
- })]
115
- })]
116
- })
117
- })
118
- });
119
- }
120
- const styles = _reactNative.StyleSheet.create({
121
- overlay: {
122
- flex: 1,
123
- backgroundColor: "rgba(0, 0, 0, 0.75)",
124
- justifyContent: "center",
125
- alignItems: "center"
126
- },
127
- container: {
128
- backgroundColor: buoyColors.card,
129
- borderRadius: 12,
130
- width: "85%",
131
- maxWidth: 400,
132
- borderWidth: 1,
133
- borderColor: buoyColors.border,
134
- shadowColor: buoyColors.primary,
135
- shadowOffset: {
136
- width: 0,
137
- height: 0
138
- },
139
- shadowOpacity: 0.2,
140
- shadowRadius: 20,
141
- elevation: 20,
142
- overflow: "hidden"
143
- },
144
- accentBar: {
145
- height: 3,
146
- backgroundColor: buoyColors.primary
147
- },
148
- content: {
149
- padding: 24
150
- },
151
- title: {
152
- fontSize: 20,
153
- fontWeight: "600",
154
- color: buoyColors.text,
155
- marginBottom: 8,
156
- textAlign: "center"
157
- },
158
- description: {
159
- fontSize: 14,
160
- color: buoyColors.textSecondary,
161
- marginBottom: 24,
162
- textAlign: "center",
163
- lineHeight: 20
164
- },
165
- input: {
166
- borderWidth: 1,
167
- borderColor: buoyColors.border,
168
- borderRadius: 8,
169
- padding: 14,
170
- fontSize: 16,
171
- color: buoyColors.text,
172
- backgroundColor: buoyColors.input,
173
- marginBottom: 20
174
- },
175
- button: {
176
- backgroundColor: buoyColors.primary,
177
- borderRadius: 8,
178
- padding: 14,
179
- alignItems: "center"
180
- },
181
- buttonDisabled: {
182
- backgroundColor: buoyColors.textMuted
183
- },
184
- buttonText: {
185
- color: buoyColors.base,
186
- fontSize: 16,
187
- fontWeight: "600"
188
- }
189
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DeviceRegistrationModal=DeviceRegistrationModal;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _LicenseManager=require("./LicenseManager.js");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(d,u){if("function"==typeof WeakMap)var f=new WeakMap,a=new WeakMap;return(_interopRequireWildcard=function(e,n){if(!n&&e&&e.__esModule)return e;var t,o,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n?a:f){if(t.has(e))return t.get(e);t.set(e,r)}for(const i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((o=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(o.get||o.set)?t(r,i,o):r[i]=e[i]);return r})(d,u)}const buoyColors={base:"#121212",card:"#1A1A1A",hover:"#242424",input:"#2A2A2A",border:"#333333",borderStrong:"#444444",text:"#E0E0E0",textSecondary:"#A0A0A0",textMuted:"#888888",primary:"#20C997",success:"#20C997",warning:"#FFA94D",error:"#EF4444",info:"#00B8E6"};function DeviceRegistrationModal({title:d="Name Your Device",description:u="Give this device a name to help you identify it later.",buttonText:f="Continue",onComplete:a}){const[e,n]=(0,_react.useState)(false);const[t,o]=(0,_react.useState)("");const[r,i]=(0,_react.useState)("");const[s,b]=(0,_react.useState)(false);(0,_react.useEffect)(()=>{const c=_LicenseManager.LicenseManager.onDeviceRegistrationNeeded(l=>{i(l.defaultName);o(l.defaultName);n(true)});return c},[]);const g=(0,_react.useCallback)(async()=>{const c=t.trim()||r;b(true);try{await _LicenseManager.LicenseManager.completeDeviceRegistration(c);n(false);a?.(c)}catch(l){console.warn("[Buoy] Device registration failed:",l);n(false)}finally{b(false)}},[t,r,a]);if(!e)return null;return(0,_jsxRuntime.jsx)(_reactNative.Modal,{visible:e,transparent:true,animationType:"fade",onRequestClose:()=>{g()},children:(0,_jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView,{behavior:_reactNative.Platform.OS==="ios"?"padding":"height",style:styles.overlay,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.accentBar}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.content,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.title,children:d}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.description,children:u}),(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.input,value:t,onChangeText:o,placeholder:r,placeholderTextColor:buoyColors.textMuted,autoFocus:true,returnKeyType:"done",onSubmitEditing:g,editable:!s,selectionColor:buoyColors.primary}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.button,s&&styles.buttonDisabled],onPress:g,disabled:s,activeOpacity:.8,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.buttonText,children:s?"Registering...":f})})]})]})})})}const styles=_reactNative.StyleSheet.create({overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.75)",justifyContent:"center",alignItems:"center"},container:{backgroundColor:buoyColors.card,borderRadius:12,width:"85%",maxWidth:400,borderWidth:1,borderColor:buoyColors.border,shadowColor:buoyColors.primary,shadowOffset:{width:0,height:0},shadowOpacity:.2,shadowRadius:20,elevation:20,overflow:"hidden"},accentBar:{height:3,backgroundColor:buoyColors.primary},content:{padding:24},title:{fontSize:20,fontWeight:"600",color:buoyColors.text,marginBottom:8,textAlign:"center"},description:{fontSize:14,color:buoyColors.textSecondary,marginBottom:24,textAlign:"center",lineHeight:20},input:{borderWidth:1,borderColor:buoyColors.border,borderRadius:8,padding:14,fontSize:16,color:buoyColors.text,backgroundColor:buoyColors.input,marginBottom:20},button:{backgroundColor:buoyColors.primary,borderRadius:8,padding:14,alignItems:"center"},buttonDisabled:{backgroundColor:buoyColors.textMuted},buttonText:{color:buoyColors.base,fontSize:16,fontWeight:"600"}});