@buoy-gg/license 7.0.22 → 7.0.23
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/LICENSE +46 -0
- package/lib/commonjs/DeviceRegistrationModal.js +1 -189
- package/lib/commonjs/LicenseManager.js +14 -610
- package/lib/commonjs/api.js +1 -172
- package/lib/commonjs/cacheSignature.js +15 -0
- package/lib/commonjs/config.js +16 -28
- package/lib/commonjs/device-info.js +1 -93
- package/lib/commonjs/device-info.web.js +1 -227
- package/lib/commonjs/fingerprint.js +1 -30
- package/lib/commonjs/fingerprint.web.js +1 -30
- package/lib/commonjs/hooks.js +13 -120
- package/lib/commonjs/index.js +17 -106
- package/lib/commonjs/index.web.js +17 -98
- package/lib/commonjs/tier.js +16 -0
- package/lib/commonjs/types.js +1 -1
- package/lib/commonjs/weekendPro.js +15 -41
- package/lib/module/DeviceRegistrationModal.js +1 -185
- package/lib/module/LicenseManager.js +14 -607
- package/lib/module/api.js +1 -165
- package/lib/module/cacheSignature.js +15 -0
- package/lib/module/config.js +16 -24
- package/lib/module/device-info.js +1 -87
- package/lib/module/device-info.web.js +1 -220
- package/lib/module/fingerprint.js +1 -10
- package/lib/module/fingerprint.web.js +1 -10
- package/lib/module/hooks.js +13 -114
- package/lib/module/index.js +15 -54
- package/lib/module/index.web.js +15 -52
- package/lib/module/tier.js +16 -0
- package/lib/module/types.js +1 -1
- package/lib/module/weekendPro.js +15 -37
- package/lib/typescript/commonjs/LicenseManager.d.ts +31 -6
- package/lib/typescript/commonjs/LicenseManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/cacheSignature.d.ts +42 -0
- package/lib/typescript/commonjs/cacheSignature.d.ts.map +1 -0
- package/lib/typescript/commonjs/config.d.ts +62 -1
- package/lib/typescript/commonjs/config.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks.d.ts +27 -5
- package/lib/typescript/commonjs/hooks.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +20 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +20 -2
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/tier.d.ts +55 -0
- package/lib/typescript/commonjs/tier.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts +44 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/weekendPro.d.ts +30 -7
- package/lib/typescript/commonjs/weekendPro.d.ts.map +1 -1
- package/lib/typescript/module/LicenseManager.d.ts +31 -6
- package/lib/typescript/module/LicenseManager.d.ts.map +1 -1
- package/lib/typescript/module/cacheSignature.d.ts +42 -0
- package/lib/typescript/module/cacheSignature.d.ts.map +1 -0
- package/lib/typescript/module/config.d.ts +62 -1
- package/lib/typescript/module/config.d.ts.map +1 -1
- package/lib/typescript/module/hooks.d.ts +27 -5
- package/lib/typescript/module/hooks.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +20 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +20 -2
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/tier.d.ts +55 -0
- package/lib/typescript/module/tier.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +44 -0
- package/lib/typescript/module/types.d.ts.map +1 -1
- package/lib/typescript/module/weekendPro.d.ts +30 -7
- package/lib/typescript/module/weekendPro.d.ts.map +1 -1
- package/package.json +7 -4
package/lib/module/hooks.js
CHANGED
|
@@ -1,117 +1,16 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* React hooks for license management
|
|
1
|
+
"use strict";/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
5
3
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { useState, useEffect, useCallback } from "react";
|
|
11
|
-
import { LicenseManager } from "./LicenseManager.js";
|
|
12
|
-
import { useWeekendFreePro } from "./weekendPro.js";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Why the user currently has Pro access:
|
|
16
|
-
* - "licensed" → a real, validated license key
|
|
17
|
-
* - "weekend" → the free Weekend Pass (no license)
|
|
18
|
-
* - null → no access
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Hook to access the current license state
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
23
6
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
7
|
+
* This file is the technological measure that controls access to paid Buoy Pro
|
|
8
|
+
* features: `useIsPro()` here is the single gate every Buoy tool consults.
|
|
9
|
+
* Modifying, patching, aliasing, stubbing, or otherwise altering it so that Pro
|
|
10
|
+
* features unlock without a valid license is a breach of the EULA and, in the
|
|
11
|
+
* United States, circumvention of an access control under 17 U.S.C. § 1201 —
|
|
12
|
+
* which applies whether or not any code is copied.
|
|
28
13
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export function useLicense() {
|
|
36
|
-
const [state, setState] = useState(LicenseManager.getState());
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
// Subscribe to license changes first so we don't miss any events
|
|
39
|
-
const unsubscribe = LicenseManager.subscribe(event => {
|
|
40
|
-
setState(LicenseManager.getState());
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// Initialize and update state when ready
|
|
44
|
-
LicenseManager.initialize().then(() => {
|
|
45
|
-
setState(LicenseManager.getState());
|
|
46
|
-
});
|
|
47
|
-
return unsubscribe;
|
|
48
|
-
}, []);
|
|
49
|
-
const setLicenseKey = useCallback(async key => {
|
|
50
|
-
const result = await LicenseManager.setLicenseKey(key);
|
|
51
|
-
setState(LicenseManager.getState());
|
|
52
|
-
return result;
|
|
53
|
-
}, []);
|
|
54
|
-
const clearLicense = useCallback(async () => {
|
|
55
|
-
await LicenseManager.clearLicense();
|
|
56
|
-
setState(LicenseManager.getState());
|
|
57
|
-
}, []);
|
|
58
|
-
return {
|
|
59
|
-
...state,
|
|
60
|
-
setLicenseKey,
|
|
61
|
-
clearLicense
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Hook to check if a feature is available based on license
|
|
67
|
-
*/
|
|
68
|
-
export function useFeatureAccess(featureCode) {
|
|
69
|
-
const {
|
|
70
|
-
isPro,
|
|
71
|
-
isInitialized,
|
|
72
|
-
isValidating
|
|
73
|
-
} = useLicense();
|
|
74
|
-
const hasAccess = isPro;
|
|
75
|
-
const isLoading = !isInitialized || isValidating;
|
|
76
|
-
return {
|
|
77
|
-
hasAccess,
|
|
78
|
-
isPro,
|
|
79
|
-
isLoading
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Hook that returns true when the user has Pro access — either a validated
|
|
85
|
-
* license OR the free Weekend Pass (Pro is free for everyone on weekends).
|
|
86
|
-
*/
|
|
87
|
-
export function useIsPro() {
|
|
88
|
-
const {
|
|
89
|
-
isPro,
|
|
90
|
-
isInitialized
|
|
91
|
-
} = useLicense();
|
|
92
|
-
const weekendFree = useWeekendFreePro();
|
|
93
|
-
return isInitialized && isPro || weekendFree;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Like {@link useIsPro} but also reports WHY access is granted, so badges can
|
|
98
|
-
* show "PRO" for a real license vs the "Weekend Pass" badge for the free
|
|
99
|
-
* weekend unlock.
|
|
100
|
-
*/
|
|
101
|
-
export function useProAccess() {
|
|
102
|
-
const {
|
|
103
|
-
isPro,
|
|
104
|
-
isInitialized
|
|
105
|
-
} = useLicense();
|
|
106
|
-
const isLicensed = isInitialized && isPro;
|
|
107
|
-
// A real license outranks the Weekend Pass — a licensed user should never see
|
|
108
|
-
// the "WEEKEND" badge just because it happens to be Saturday.
|
|
109
|
-
const isWeekendFree = useWeekendFreePro() && !isLicensed;
|
|
110
|
-
const reason = isLicensed ? "licensed" : isWeekendFree ? "weekend" : null;
|
|
111
|
-
return {
|
|
112
|
-
isPro: isLicensed || isWeekendFree,
|
|
113
|
-
isLicensed,
|
|
114
|
-
isWeekendFree,
|
|
115
|
-
reason
|
|
116
|
-
};
|
|
117
|
-
}
|
|
14
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
15
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
16
|
+
*/import{useState as l,useEffect as d,useCallback as c}from"react";import{LicenseManager as n}from"./LicenseManager.js";import{useWeekendFreePro as a,weekendPassAppliesTo as u}from"./weekendPro.js";export function useLicense(){const[i,e]=l(n.getState());d(()=>{const s=n.subscribe(o=>{e(n.getState())});n.initialize().then(()=>{e(n.getState())});return s},[]);const r=c(async s=>{const o=await n.setLicenseKey(s);e(n.getState());return o},[]);const t=c(async()=>{await n.clearLicense();e(n.getState())},[]);return{...i,setLicenseKey:r,clearLicense:t}}export function useTier(){const{tier:i,isInitialized:e}=useLicense();return e?i:"anonymous"}export function useFeatureAccess(i){const{isPro:e,isInitialized:r,isValidating:t}=useLicense();const s=e;const o=!r||t;return{hasAccess:s,isPro:e,isLoading:o}}export function useIsPro(){const{isPro:i,isInitialized:e,tier:r}=useLicense();const t=u(r,a());return e&&i||t}export function useProAccess(){const{isPro:i,isInitialized:e,tier:r}=useLicense();const t=e&&i;const s=u(r,a())&&!t;const o=t?"licensed":s?"weekend":null;return{isPro:t||s,isLicensed:t,isWeekendFree:s,reason:o}}
|
package/lib/module/index.js
CHANGED
|
@@ -1,56 +1,17 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @buoy-gg/license
|
|
1
|
+
"use strict";/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
5
3
|
*
|
|
6
|
-
*
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export { useLicense, useFeatureAccess, useIsPro, useProAccess } from "./hooks.js";
|
|
20
|
-
// Weekend Pass — Pro is free for everyone on weekends
|
|
21
|
-
export { isWeekendFreePro, useWeekendFreePro } from "./weekendPro.js";
|
|
22
|
-
|
|
23
|
-
// Types
|
|
24
|
-
|
|
25
|
-
// Convenience function for setting license key
|
|
26
|
-
export async function setLicenseKey(key) {
|
|
27
|
-
const {
|
|
28
|
-
LicenseManager: LM
|
|
29
|
-
} = await import("./LicenseManager");
|
|
30
|
-
await LM.initialize();
|
|
31
|
-
return LM.setLicenseKey(key);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Convenience function for checking Pro status (honors the free Weekend Pass)
|
|
35
|
-
export function isPro() {
|
|
36
|
-
const {
|
|
37
|
-
isWeekendFreePro: isWeekend
|
|
38
|
-
} = require("./weekendPro");
|
|
39
|
-
if (isWeekend()) return true;
|
|
40
|
-
const {
|
|
41
|
-
LicenseManager: LM
|
|
42
|
-
} = require("./LicenseManager");
|
|
43
|
-
return LM.isPro();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Convenience function for checking entitlement (honors the free Weekend Pass)
|
|
47
|
-
export function hasEntitlement(code) {
|
|
48
|
-
const {
|
|
49
|
-
isWeekendFreePro: isWeekend
|
|
50
|
-
} = require("./weekendPro");
|
|
51
|
-
if (isWeekend()) return true;
|
|
52
|
-
const {
|
|
53
|
-
LicenseManager: LM
|
|
54
|
-
} = require("./LicenseManager");
|
|
55
|
-
return LM.hasEntitlement(code);
|
|
56
|
-
}
|
|
7
|
+
* This package is the technological measure that controls access to paid Buoy
|
|
8
|
+
* Pro features. Modifying, patching, aliasing, stubbing, or otherwise altering
|
|
9
|
+
* it — including replacing this module via a bundler alias, package override,
|
|
10
|
+
* or postinstall patch — so that Pro features unlock without a valid license is
|
|
11
|
+
* a breach of the EULA and, in the United States, circumvention of an access
|
|
12
|
+
* control under 17 U.S.C. § 1201, which applies whether or not any code is
|
|
13
|
+
* copied.
|
|
14
|
+
*
|
|
15
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
16
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
17
|
+
*/export{LicenseManager}from"./LicenseManager.js";export{DeviceRegistrationModal}from"./DeviceRegistrationModal.js";export{useLicense,useFeatureAccess,useIsPro,useProAccess,useTier}from"./hooks.js";export{ANONYMOUS_TIER_ENABLED}from"./config.js";export{isWeekendFreePro,useWeekendFreePro}from"./weekendPro.js";export async function setLicenseKey(e){const{LicenseManager:r}=await import("./LicenseManager");await r.initialize();return r.setLicenseKey(e)}function n(){const{isWeekendFreePro:e,weekendPassAppliesTo:r}=require("./weekendPro");const{LicenseManager:s}=require("./LicenseManager");return r(s.getTier(),e())}export function isPro(){const{LicenseManager:e}=require("./LicenseManager");if(e.isPro())return true;return n()}export function hasEntitlement(e){const{LicenseManager:r}=require("./LicenseManager");if(r.hasEntitlement(e))return true;return n()}
|
package/lib/module/index.web.js
CHANGED
|
@@ -1,54 +1,17 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @buoy-gg/license (Web/Electron)
|
|
1
|
+
"use strict";/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
5
3
|
*
|
|
6
|
-
*
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export { isWeekendFreePro, useWeekendFreePro } from "./weekendPro.js";
|
|
20
|
-
|
|
21
|
-
// Types
|
|
22
|
-
|
|
23
|
-
// Convenience function for setting license key
|
|
24
|
-
export async function setLicenseKey(key) {
|
|
25
|
-
const {
|
|
26
|
-
LicenseManager: LM
|
|
27
|
-
} = await import("./LicenseManager");
|
|
28
|
-
await LM.initialize();
|
|
29
|
-
return LM.setLicenseKey(key);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Convenience function for checking Pro status (honors the free Weekend Pass)
|
|
33
|
-
export function isPro() {
|
|
34
|
-
const {
|
|
35
|
-
isWeekendFreePro: isWeekend
|
|
36
|
-
} = require("./weekendPro");
|
|
37
|
-
if (isWeekend()) return true;
|
|
38
|
-
const {
|
|
39
|
-
LicenseManager: LM
|
|
40
|
-
} = require("./LicenseManager");
|
|
41
|
-
return LM.isPro();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Convenience function for checking entitlement (honors the free Weekend Pass)
|
|
45
|
-
export function hasEntitlement(code) {
|
|
46
|
-
const {
|
|
47
|
-
isWeekendFreePro: isWeekend
|
|
48
|
-
} = require("./weekendPro");
|
|
49
|
-
if (isWeekend()) return true;
|
|
50
|
-
const {
|
|
51
|
-
LicenseManager: LM
|
|
52
|
-
} = require("./LicenseManager");
|
|
53
|
-
return LM.hasEntitlement(code);
|
|
54
|
-
}
|
|
7
|
+
* This package is the technological measure that controls access to paid Buoy
|
|
8
|
+
* Pro features. Modifying, patching, aliasing, stubbing, or otherwise altering
|
|
9
|
+
* it — including replacing this module via a bundler alias, package override,
|
|
10
|
+
* or postinstall patch — so that Pro features unlock without a valid license is
|
|
11
|
+
* a breach of the EULA and, in the United States, circumvention of an access
|
|
12
|
+
* control under 17 U.S.C. § 1201, which applies whether or not any code is
|
|
13
|
+
* copied.
|
|
14
|
+
*
|
|
15
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
16
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
17
|
+
*/export{LicenseManager}from"./LicenseManager.js";export{useLicense,useFeatureAccess,useIsPro,useProAccess,useTier}from"./hooks.js";export{ANONYMOUS_TIER_ENABLED}from"./config.js";export{isWeekendFreePro,useWeekendFreePro}from"./weekendPro.js";export async function setLicenseKey(e){const{LicenseManager:r}=await import("./LicenseManager");await r.initialize();return r.setLicenseKey(e)}function n(){const{isWeekendFreePro:e,weekendPassAppliesTo:r}=require("./weekendPro");const{LicenseManager:s}=require("./LicenseManager");return r(s.getTier(),e())}export function isPro(){const{LicenseManager:e}=require("./LicenseManager");if(e.isPro())return true;return n()}export function hasEntitlement(e){const{LicenseManager:r}=require("./LicenseManager");if(r.hasEntitlement(e))return true;return n()}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
6
|
+
*
|
|
7
|
+
* This file is part of the technological measure that controls access to paid
|
|
8
|
+
* Buoy Pro features: it decides which tier a validated key grants. Modifying,
|
|
9
|
+
* patching, aliasing, stubbing, or otherwise altering it so that Pro features
|
|
10
|
+
* unlock without a valid license is a breach of the EULA and, in the United
|
|
11
|
+
* States, circumvention of an access control under 17 U.S.C. § 1201 — which
|
|
12
|
+
* applies whether or not any code is copied.
|
|
13
|
+
*
|
|
14
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
15
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
16
|
+
*/import{KEYGEN_POLICIES as t}from"./config.js";export function resolveTier(r){const e=r.relationships?.policy?.data?.id;if(e===t.free)return"free";if(e===t.solo||e===t.business){return"pro"}const o=r.attributes?.metadata?.plan;if(o==="free")return"free";return"pro"}export function tierAfterFatalError(r){return r==="EXPIRED"?"free":"anonymous"}
|
package/lib/module/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
package/lib/module/weekendPro.js
CHANGED
|
@@ -1,39 +1,17 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Weekend Pass — Pro is free for everyone on weekends.
|
|
1
|
+
"use strict";/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
5
3
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* Mon–Fri day job). Evaluated in LOCAL time: active all of Saturday & Sunday.
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
9
6
|
*
|
|
10
|
-
*
|
|
11
|
-
* `useIsPro()` gate
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Reactive Weekend Pass flag — re-renders the moment the weekend window opens
|
|
24
|
-
* or closes (re-checks every minute) so a long-running session flips at
|
|
25
|
-
* midnight without a reload.
|
|
26
|
-
*/
|
|
27
|
-
export function useWeekendFreePro() {
|
|
28
|
-
const [active, setActive] = useState(() => isWeekendFreePro());
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
const id = setInterval(() => {
|
|
31
|
-
const next = isWeekendFreePro();
|
|
32
|
-
// Functional update returns the same reference when unchanged, so React
|
|
33
|
-
// bails out of the re-render — the interval is effectively free.
|
|
34
|
-
setActive(prev => prev === next ? prev : next);
|
|
35
|
-
}, 60 * 1000);
|
|
36
|
-
return () => clearInterval(id);
|
|
37
|
-
}, []);
|
|
38
|
-
return active;
|
|
39
|
-
}
|
|
7
|
+
* Despite its small size, this file is a technological measure that controls
|
|
8
|
+
* access to paid Buoy Pro features: every `useIsPro()` gate in every Buoy tool
|
|
9
|
+
* unlocks when `isWeekendFreePro()` returns true. Modifying, patching,
|
|
10
|
+
* aliasing, stubbing, or otherwise altering it so that Pro features unlock
|
|
11
|
+
* without a valid license is a breach of the EULA and, in the United States,
|
|
12
|
+
* circumvention of an access control under 17 U.S.C. § 1201 — which applies
|
|
13
|
+
* whether or not any code is copied.
|
|
14
|
+
*
|
|
15
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
16
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
17
|
+
*/import{ANONYMOUS_TIER_ENABLED as s}from"./config.js";import{useEffect as u,useState as i}from"react";export function isWeekendFreePro(t=new Date){const e=t.getDay();return e===0||e===6}export function useWeekendFreePro(){const[t,e]=i(()=>isWeekendFreePro());u(()=>{const o=setInterval(()=>{const r=isWeekendFreePro();e(n=>n===r?n:r)},60*1e3);return()=>clearInterval(o)},[]);return t}export function weekendPassAppliesTo(t,e){if(!e)return false;if(!s)return true;return t!=="anonymous"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
6
|
+
*
|
|
7
|
+
* This file is the technological measure that controls access to paid Buoy Pro
|
|
8
|
+
* features. Modifying, patching, aliasing, stubbing, or otherwise altering it
|
|
9
|
+
* so that Pro features unlock without a valid license is a breach of the EULA
|
|
10
|
+
* and, in the United States, circumvention of an access control under
|
|
11
|
+
* 17 U.S.C. § 1201 — which applies whether or not any code is copied.
|
|
12
|
+
*
|
|
13
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
14
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
7
15
|
*/
|
|
8
|
-
import type { LicenseState, LicenseListener } from "./types";
|
|
16
|
+
import type { BuoyTier, LicenseState, LicenseListener } from "./types";
|
|
9
17
|
/** Info passed to device registration callback */
|
|
10
18
|
export interface DeviceRegistrationInfo {
|
|
11
19
|
fingerprint: string;
|
|
@@ -45,6 +53,17 @@ declare class LicenseManagerImpl {
|
|
|
45
53
|
* Clear the current license
|
|
46
54
|
*/
|
|
47
55
|
clearLicense(): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Set the tier and keep the derived fields in step.
|
|
58
|
+
*
|
|
59
|
+
* `isPro` is a mirror of `tier === "pro"` and must never be assigned
|
|
60
|
+
* directly — that is exactly how a free key would end up granting Pro.
|
|
61
|
+
*/
|
|
62
|
+
private applyTier;
|
|
63
|
+
/**
|
|
64
|
+
* The current access tier. This is what gates and caps should read.
|
|
65
|
+
*/
|
|
66
|
+
getTier(): BuoyTier;
|
|
48
67
|
/**
|
|
49
68
|
* Check if the user has Pro features
|
|
50
69
|
*/
|
|
@@ -75,6 +94,12 @@ declare class LicenseManagerImpl {
|
|
|
75
94
|
completeDeviceRegistration(deviceName: string): Promise<void>;
|
|
76
95
|
private emit;
|
|
77
96
|
private isCacheValid;
|
|
97
|
+
/**
|
|
98
|
+
* Write the cache with a fresh checksum. Every write goes through here so a
|
|
99
|
+
* blob can never land on disk unsigned — an unsigned blob is treated as
|
|
100
|
+
* untrusted on the next read, which would silently drop a paying customer.
|
|
101
|
+
*/
|
|
102
|
+
private persistCache;
|
|
78
103
|
private loadCachedLicense;
|
|
79
104
|
private clearCachedLicense;
|
|
80
105
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LicenseManager.d.ts","sourceRoot":"","sources":["../../../src/LicenseManager.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"LicenseManager.d.ts","sourceRoot":"","sources":["../../../src/LicenseManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA8KH,OAAO,KAAK,EACV,QAAQ,EAER,YAAY,EAEZ,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,kDAAkD;AAClD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,mDAAmD;AACnD,MAAM,MAAM,0BAA0B,GAAG,CAAC,IAAI,EAAE,sBAAsB,KAAK,IAAI,CAAC;AAsBhF,cAAM,kBAAkB;IACtB,OAAO,CAAC,KAAK,CASX;IAEF,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,iBAAiB,CAA+C;IACxE,OAAO,CAAC,aAAa,CAA8B;IAGnD,OAAO,CAAC,WAAW,CAA8B;IAGjD,OAAO,CAAC,0BAA0B,CAA2C;IAC7E,OAAO,CAAC,mBAAmB,CAAoC;IAE/D;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAUjC;;OAEG;YACW,aAAa;IA4C3B;;;;;;OAMG;IACG,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAgIzD;;OAEG;IACH,OAAO,CAAC,cAAc;IAkBtB;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAWnC;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAQjB;;OAEG;IACH,OAAO,IAAI,QAAQ;IAInB;;OAEG;IACH,KAAK,IAAI,OAAO;IAIhB;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAOrC;;OAEG;IACH,QAAQ,IAAI,QAAQ,CAAC,YAAY,CAAC;IAIlC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,IAAI;IAKhD;;;;;OAKG;IACH,0BAA0B,CAAC,QAAQ,EAAE,0BAA0B,GAAG,MAAM,IAAI;IAO5E;;;OAGG;IACG,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoCnE,OAAO,CAAC,IAAI;IAYZ,OAAO,CAAC,YAAY;IAkBpB;;;;OAIG;YACW,YAAY;YAOZ,iBAAiB;YAcjB,kBAAkB;IAWhC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,oBAAoB;IA+C5B,OAAO,CAAC,sBAAsB;IAmB9B;;OAEG;IACH,qBAAqB,IAAI,IAAI;IAO7B;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;CAOvC;AAGD,eAAO,MAAM,cAAc,oBAA2B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
6
|
+
*
|
|
7
|
+
* This file is part of the technological measure that controls access to paid
|
|
8
|
+
* Buoy Pro features. Modifying, patching, aliasing, stubbing, or otherwise
|
|
9
|
+
* altering it so that Pro features unlock without a valid license is a breach
|
|
10
|
+
* of the EULA and, in the United States, circumvention of an access control
|
|
11
|
+
* under 17 U.S.C. § 1201 — which applies whether or not any code is copied.
|
|
12
|
+
*
|
|
13
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
14
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
15
|
+
*/
|
|
16
|
+
/** The subset of the cache that the checksum covers. */
|
|
17
|
+
export interface SignableCache {
|
|
18
|
+
licenseKey: string;
|
|
19
|
+
licenseId: string;
|
|
20
|
+
isPro: boolean;
|
|
21
|
+
expiresAt: string | null;
|
|
22
|
+
cachedAt: number;
|
|
23
|
+
/** Signed since v2. Absent on v1 blobs, which are read as Pro. */
|
|
24
|
+
tier?: string;
|
|
25
|
+
/** The checksum itself — excluded from its own input. */
|
|
26
|
+
sig?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Compute the current-version checksum for a cache blob. */
|
|
29
|
+
export declare function cacheSignature(cache: SignableCache): string;
|
|
30
|
+
/** Return a copy of the cache with a current checksum attached. */
|
|
31
|
+
export declare function signCache<T extends SignableCache>(cache: T): T;
|
|
32
|
+
/**
|
|
33
|
+
* Whether a cache blob's checksum matches its contents.
|
|
34
|
+
*
|
|
35
|
+
* Returns false for a blob with no `sig` at all. That intentionally rejects
|
|
36
|
+
* caches written by versions before checksums existed: callers treat an
|
|
37
|
+
* unverified blob as "not Pro yet, but revalidate this key in the background",
|
|
38
|
+
* so a real customer is back to Pro as soon as the license server answers,
|
|
39
|
+
* while a hand-written blob never gets there.
|
|
40
|
+
*/
|
|
41
|
+
export declare function verifyCacheSignature(cache: SignableCache | null): boolean;
|
|
42
|
+
//# sourceMappingURL=cacheSignature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheSignature.d.ts","sourceRoot":"","sources":["../../../src/cacheSignature.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAmDH,wDAAwD;AACxD,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAiDD,6DAA6D;AAC7D,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE3D;AAED,mEAAmE;AACnE,wBAAgB,SAAS,CAAC,CAAC,SAAS,aAAa,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAE9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,GAAG,OAAO,CAgBzE"}
|
|
@@ -1,13 +1,74 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
6
|
+
*
|
|
7
|
+
* This file configures the technological measure that controls access to paid
|
|
8
|
+
* Buoy Pro features. Modifying, patching, aliasing, stubbing, or otherwise
|
|
9
|
+
* altering it — including repointing `apiUrl` at a stand-in license server — so
|
|
10
|
+
* that Pro features unlock without a valid license is a breach of the EULA and,
|
|
11
|
+
* in the United States, circumvention of an access control under 17 U.S.C.
|
|
12
|
+
* § 1201, which applies whether or not any code is copied.
|
|
13
|
+
*
|
|
14
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
15
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
16
|
+
*/
|
|
1
17
|
/**
|
|
2
18
|
* Keygen configuration for React Buoy
|
|
3
19
|
*/
|
|
4
20
|
export declare const KEYGEN_CONFIG: {
|
|
5
21
|
readonly accountId: "b0eba0e8-e904-4906-b644-38f9aab57bed";
|
|
6
|
-
|
|
22
|
+
/**
|
|
23
|
+
* The Keygen PRODUCT id. Currently unread — `api.ts` destructures only
|
|
24
|
+
* accountId/productToken/apiUrl — but kept correct so it can be trusted.
|
|
25
|
+
*
|
|
26
|
+
* Careful: this field previously held `1037431d-b2fe-48db-aca9-10c5e9c4d944`,
|
|
27
|
+
* which is not a product at all — it is the ID of the product TOKEN below.
|
|
28
|
+
* Verified against the Keygen dashboard (Aug 2026): the account has exactly
|
|
29
|
+
* one product, "Buoy", and this is its id.
|
|
30
|
+
*/
|
|
31
|
+
readonly productId: "bf67cb43-eeef-40ca-b308-e6e1b22c0eaa";
|
|
7
32
|
readonly productToken: "prod-4467c14b75b715e91884945cd3e69705846ccbce7dd5e380236a1ab3bc03139fv3";
|
|
8
33
|
readonly apiUrl: "https://api.keygen.sh/v1/accounts";
|
|
9
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Keygen policy IDs, which are what decide a key's tier.
|
|
37
|
+
*
|
|
38
|
+
* These are NOT secrets — a policy ID identifies a plan, it doesn't grant
|
|
39
|
+
* anything. The account ID and a read-only product token already ship in this
|
|
40
|
+
* same file. Tier is read from the policy rather than license metadata because
|
|
41
|
+
* the policy is set by Keygen itself on every create/upgrade/downgrade, while
|
|
42
|
+
* metadata can be absent on hand-made licenses.
|
|
43
|
+
*/
|
|
44
|
+
export declare const KEYGEN_POLICIES: {
|
|
45
|
+
/** Free tier — issued automatically on first dashboard visit. */
|
|
46
|
+
readonly free: "394e3351-1249-4f73-807a-703408604c0e";
|
|
47
|
+
/** Solo (sold as "Pro"; the id predates the Solo/Business split). */
|
|
48
|
+
readonly solo: "fa5d3c8f-5379-40f1-b63e-ab8a974b2f28";
|
|
49
|
+
/** Business — an exact clone of the Solo policy. */
|
|
50
|
+
readonly business: "690c2212-8e54-426f-b4b4-002ee1c0ae2b";
|
|
51
|
+
};
|
|
10
52
|
export declare const LICENSE_CACHE_DURATION: number;
|
|
11
53
|
export declare const LICENSE_REVALIDATION_INTERVAL: number;
|
|
12
54
|
export declare const LICENSE_STORAGE_KEY = "buoy-gg-license";
|
|
55
|
+
/**
|
|
56
|
+
* Master switch for the ANONYMOUS tier.
|
|
57
|
+
*
|
|
58
|
+
* Lives here — the lowest-level package — because two separate behaviors have
|
|
59
|
+
* to turn on together, and they sit in different packages:
|
|
60
|
+
*
|
|
61
|
+
* 1. the reduced anonymous limits (`TIER_LIMITS` in @buoy-gg/shared-ui), and
|
|
62
|
+
* 2. the Weekend Pass requiring a claimed key (`hooks.ts` in this package).
|
|
63
|
+
*
|
|
64
|
+
* Shipping either one alone would be incoherent: withdrawing free weekend Pro
|
|
65
|
+
* from people whose limits have not changed is a pure takeaway, and reducing
|
|
66
|
+
* limits while still handing out Pro two days a week undercuts the reason to
|
|
67
|
+
* claim a key at all.
|
|
68
|
+
*
|
|
69
|
+
* DO NOT flip until `npx buoy login` is PUBLISHED and documented. There is no
|
|
70
|
+
* grace period, so a user who wakes up with less needs a twenty-second way out
|
|
71
|
+
* — and the CLI only exists for them once @buoy-gg/core ships with its bin.
|
|
72
|
+
*/
|
|
73
|
+
export declare const ANONYMOUS_TIER_ENABLED = false;
|
|
13
74
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;GAEG;AAEH,eAAO,MAAM,aAAa;;IAExB;;;;;;;;OAQG;;;;CAMK,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;IAC1B,iEAAiE;;IAEjE,qEAAqE;;IAErE,oDAAoD;;CAE5C,CAAC;AAGX,eAAO,MAAM,sBAAsB,QAA2B,CAAC;AAI/D,eAAO,MAAM,6BAA6B,QAAsB,CAAC;AAIjE,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,QAAQ,CAAC"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
7
|
+
* This file is the technological measure that controls access to paid Buoy Pro
|
|
8
|
+
* features: `useIsPro()` here is the single gate every Buoy tool consults.
|
|
9
|
+
* Modifying, patching, aliasing, stubbing, or otherwise altering it so that Pro
|
|
10
|
+
* features unlock without a valid license is a breach of the EULA and, in the
|
|
11
|
+
* United States, circumvention of an access control under 17 U.S.C. § 1201 —
|
|
12
|
+
* which applies whether or not any code is copied.
|
|
13
|
+
*
|
|
14
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
15
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
6
16
|
*/
|
|
7
|
-
import type { LicenseState } from "./types";
|
|
17
|
+
import type { BuoyTier, LicenseState } from "./types";
|
|
8
18
|
/**
|
|
9
19
|
* Why the user currently has Pro access:
|
|
10
20
|
* - "licensed" → a real, validated license key
|
|
@@ -32,6 +42,18 @@ export declare function useLicense(): LicenseState & {
|
|
|
32
42
|
/** Clear the current license */
|
|
33
43
|
clearLicense: () => Promise<void>;
|
|
34
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* The current access tier: "anonymous" | "free" | "pro".
|
|
47
|
+
*
|
|
48
|
+
* This is the value tier-aware limits should read. It reports the tier the
|
|
49
|
+
* user's *credential* grants and deliberately ignores the Weekend Pass — a
|
|
50
|
+
* weekend unlock is temporary Pro *access*, not a change of tier, and callers
|
|
51
|
+
* that care about access should compose this with `useIsPro()`.
|
|
52
|
+
*
|
|
53
|
+
* Returns "anonymous" until the manager has finished initializing, which
|
|
54
|
+
* matches how `useIsPro()` reports false over the same window.
|
|
55
|
+
*/
|
|
56
|
+
export declare function useTier(): BuoyTier;
|
|
35
57
|
/**
|
|
36
58
|
* Hook to check if a feature is available based on license
|
|
37
59
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAYH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAgB,MAAM,SAAS,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;AAE5D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,IAAI,YAAY,GAAG;IAC3C,qCAAqC;IACrC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,gCAAgC;IAChC,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC,CAiCA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,IAAI,QAAQ,CAGlC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG;IACtD,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;CACpB,CAWA;AAED;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAKlC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI;IAC9B,sDAAsD;IACtD,KAAK,EAAE,OAAO,CAAC;IACf,+CAA+C;IAC/C,UAAU,EAAE,OAAO,CAAC;IACpB,2CAA2C;IAC3C,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;CACzB,CAaA"}
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
6
|
+
*
|
|
7
|
+
* This package is the technological measure that controls access to paid Buoy
|
|
8
|
+
* Pro features. Modifying, patching, aliasing, stubbing, or otherwise altering
|
|
9
|
+
* it — including replacing this module via a bundler alias, package override,
|
|
10
|
+
* or postinstall patch — so that Pro features unlock without a valid license is
|
|
11
|
+
* a breach of the EULA and, in the United States, circumvention of an access
|
|
12
|
+
* control under 17 U.S.C. § 1201, which applies whether or not any code is
|
|
13
|
+
* copied.
|
|
14
|
+
*
|
|
15
|
+
* Pro is $9/mo, and is free for everyone every weekend. Buy a key at
|
|
16
|
+
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
17
|
+
*/
|
|
1
18
|
/**
|
|
2
19
|
* @buoy-gg/license
|
|
3
20
|
*
|
|
@@ -10,10 +27,11 @@
|
|
|
10
27
|
export { LicenseManager } from "./LicenseManager";
|
|
11
28
|
export type { DeviceRegistrationInfo, DeviceRegistrationCallback, } from "./LicenseManager";
|
|
12
29
|
export { DeviceRegistrationModal } from "./DeviceRegistrationModal";
|
|
13
|
-
export { useLicense, useFeatureAccess, useIsPro, useProAccess } from "./hooks";
|
|
30
|
+
export { useLicense, useFeatureAccess, useIsPro, useProAccess, useTier } from "./hooks";
|
|
14
31
|
export type { ProAccessReason } from "./hooks";
|
|
32
|
+
export { ANONYMOUS_TIER_ENABLED } from "./config";
|
|
15
33
|
export { isWeekendFreePro, useWeekendFreePro } from "./weekendPro";
|
|
16
|
-
export type { LicenseState, LicenseEvent, LicenseListener, LicenseValidationResult, CachedLicense, } from "./types";
|
|
34
|
+
export type { BuoyTier, TierSource, LicenseState, LicenseEvent, LicenseListener, LicenseValidationResult, CachedLicense, } from "./types";
|
|
17
35
|
export declare function setLicenseKey(key: string): Promise<boolean>;
|
|
18
36
|
export declare function isPro(): boolean;
|
|
19
37
|
export declare function hasEntitlement(code: string): boolean;
|