@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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAA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,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,uBAAuB,EACvB,aAAa,GACd,MAAM,SAAS,CAAC;AAGjB,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAIjE;AAaD,wBAAgB,KAAK,IAAI,OAAO,CAI/B;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIpD"}
@@ -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 (Web/Electron)
3
20
  *
@@ -8,10 +25,11 @@
8
25
  * Keygen tracks validation calls for usage analytics.
9
26
  */
10
27
  export { LicenseManager } from "./LicenseManager";
11
- export { useLicense, useFeatureAccess, useIsPro, useProAccess } from "./hooks";
28
+ export { useLicense, useFeatureAccess, useIsPro, useProAccess, useTier } from "./hooks";
12
29
  export type { ProAccessReason } from "./hooks";
30
+ export { ANONYMOUS_TIER_ENABLED } from "./config";
13
31
  export { isWeekendFreePro, useWeekendFreePro } from "./weekendPro";
14
- export type { LicenseState, LicenseEvent, LicenseListener, LicenseValidationResult, CachedLicense, } from "./types";
32
+ export type { BuoyTier, TierSource, LicenseState, LicenseEvent, LicenseListener, LicenseValidationResult, CachedLicense, } from "./types";
15
33
  export declare function setLicenseKey(key: string): Promise<boolean>;
16
34
  export declare function isPro(): boolean;
17
35
  export declare function hasEntitlement(code: string): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC/E,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGnE,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,uBAAuB,EACvB,aAAa,GACd,MAAM,SAAS,CAAC;AAGjB,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAIjE;AAGD,wBAAgB,KAAK,IAAI,OAAO,CAK/B;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKpD"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACxF,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGlD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGnE,YAAY,EACV,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,uBAAuB,EACvB,aAAa,GACd,MAAM,SAAS,CAAC;AAGjB,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAIjE;AAaD,wBAAgB,KAAK,IAAI,OAAO,CAI/B;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIpD"}
@@ -0,0 +1,55 @@
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: 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
+ */
17
+ import type { BuoyTier, KeygenLicense } from "./types";
18
+ /**
19
+ * Which tier a *validated* license grants.
20
+ *
21
+ * Only ever called with a license the server already accepted — an invalid or
22
+ * absent key never reaches here, it resolves to "anonymous" upstream.
23
+ *
24
+ * The policy is the primary signal because Keygen sets it on every
25
+ * create/upgrade/downgrade, and free↔paid is implemented as a policy swap that
26
+ * keeps the same key. `metadata.plan` is only a fallback for licenses created
27
+ * outside that flow.
28
+ *
29
+ * Unrecognized policies resolve to "pro" **on purpose**. A license hand-made in
30
+ * the Keygen dashboard (a comp, a support extension, a future plan whose ID
31
+ * predates this build) has no metadata and an unknown policy — and those are
32
+ * always paid. The opposite default would silently downgrade paying customers
33
+ * every time a policy is added before clients ship. The blast radius is small:
34
+ * reaching this branch at all requires already holding a key our license server
35
+ * validated, and free keys ARE recognized.
36
+ */
37
+ export declare function resolveTier(license: KeygenLicense): BuoyTier;
38
+ /**
39
+ * The tier to fall back to when validation returns a FATAL error.
40
+ *
41
+ * `EXPIRED` is treated as **free**, not anonymous. An expired key still proves
42
+ * an account exists, and it is not even a stable state: the website's
43
+ * `subscription_expired` webhook calls `downgradeLicenseToFree()`, which swaps
44
+ * that very key onto the Free policy with a null expiry. So free is the steady
45
+ * state, and anonymous is only the gap before the webhook lands (or before the
46
+ * `/api/licenses` self-heal runs). Dropping someone to the trial tier in that
47
+ * window would hit them at the exact moment they are deciding whether to
48
+ * re-subscribe.
49
+ *
50
+ * Every other fatal code means either "not our key" (`NOT_FOUND`,
51
+ * `PRODUCT_SCOPE_MISMATCH`) or a deliberate revocation (`SUSPENDED`, `BANNED`).
52
+ * Nothing about those proves an account, so they fall to anonymous.
53
+ */
54
+ export declare function tierAfterFatalError(code: string): BuoyTier;
55
+ //# sourceMappingURL=tier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tier.d.ts","sourceRoot":"","sources":["../../../src/tier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAgB5D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAE1D"}
@@ -3,6 +3,29 @@
3
3
  *
4
4
  * Simplified: No device/machine management - we trust our customers.
5
5
  */
6
+ /**
7
+ * The three access tiers.
8
+ *
9
+ * - "anonymous" — no credential, or one that failed validation. A trial tier:
10
+ * every tool is visible, with much smaller caps.
11
+ * - "free" — a validated key on the Free policy. Today's free tier.
12
+ * - "pro" — a validated key on the Solo or Business policy.
13
+ *
14
+ * Deliberately NOT a boolean: the free ceiling never moves, so anonymous is
15
+ * carved out *below* free rather than free being extended.
16
+ */
17
+ export type BuoyTier = "anonymous" | "free" | "pro";
18
+ /**
19
+ * What granted the current tier.
20
+ *
21
+ * - "key" — a Keygen license key (developers; build-time credential).
22
+ * - "session" — a logged-in Business seat (QA/support on distributed builds).
23
+ * NOT IMPLEMENTED YET; the type exists so every downstream layer
24
+ * reads `tier` instead of "does a key exist", which is what makes
25
+ * adding on-device login additive rather than a rewrite.
26
+ * - "none" — anonymous.
27
+ */
28
+ export type TierSource = "key" | "session" | "none";
6
29
  export interface LicenseValidationResult {
7
30
  valid: boolean;
8
31
  code: "VALID" | "NOT_FOUND" | "SUSPENDED" | "EXPIRED" | "OVERDUE" | "NO_MACHINE" | "NO_MACHINES" | "TOO_MANY_MACHINES" | "TOO_MANY_CORES" | "TOO_MANY_PROCESSES" | "FINGERPRINT_SCOPE_MISMATCH" | "HEARTBEAT_NOT_STARTED" | "HEARTBEAT_DEAD" | "PRODUCT_SCOPE_REQUIRED" | "PRODUCT_SCOPE_MISMATCH" | "POLICY_SCOPE_REQUIRED" | "POLICY_SCOPE_MISMATCH" | "MACHINE_SCOPE_REQUIRED" | "MACHINE_SCOPE_MISMATCH" | "ENTITLEMENTS_MISSING" | "ENTITLEMENTS_SCOPE_MISMATCH" | "BANNED";
@@ -132,6 +155,15 @@ export interface CachedLicense {
132
155
  licenseId: string;
133
156
  valid: boolean;
134
157
  isPro: boolean;
158
+ /**
159
+ * The tier this key resolved to. Covered by the cache checksum — without
160
+ * that, a blob could be hand-edited from "free" to "pro" and still verify.
161
+ *
162
+ * Optional for backward compatibility: a cache written before tiers existed
163
+ * has no `tier` and is read as "pro", because the only way to hold a
164
+ * validated cache back then was to have bought one.
165
+ */
166
+ tier?: BuoyTier;
135
167
  expiresAt: string | null;
136
168
  cachedAt: number;
137
169
  lastValidatedAt: number;
@@ -139,11 +171,23 @@ export interface CachedLicense {
139
171
  fingerprint?: string;
140
172
  /** Device name */
141
173
  deviceName?: string;
174
+ /**
175
+ * Tamper-evident checksum over the licensing fields (see cacheSignature.ts).
176
+ * A blob whose checksum is missing or doesn't match is not trusted for Pro.
177
+ * Deliberately excludes fingerprint/deviceName so completing device
178
+ * registration can update those without re-signing.
179
+ */
180
+ sig?: string;
142
181
  }
143
182
  export interface LicenseState {
144
183
  isInitialized: boolean;
145
184
  isValidating: boolean;
185
+ /** Convenience mirror of `tier === "pro"`. Kept so existing callers work. */
146
186
  isPro: boolean;
187
+ /** The access tier. This is the value gates and caps should read. */
188
+ tier: BuoyTier;
189
+ /** What granted `tier`. */
190
+ tierSource: TierSource;
147
191
  licenseKey: string | null;
148
192
  error: string | null;
149
193
  expiresAt: Date | null;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EACA,OAAO,GACP,WAAW,GACX,WAAW,GACX,SAAS,GACT,SAAS,GACT,YAAY,GACZ,aAAa,GACb,mBAAmB,GACnB,gBAAgB,GAChB,oBAAoB,GACpB,4BAA4B,GAC5B,uBAAuB,GACvB,gBAAgB,GAChB,wBAAwB,GACxB,wBAAwB,GACxB,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,GACxB,wBAAwB,GACxB,sBAAsB,GACtB,6BAA6B,GAC7B,QAAQ,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,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Aa,CAAC;AAElB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC"}
@@ -1,12 +1,19 @@
1
- /**
2
- * Weekend Pass — Pro is free for everyone on weekends.
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
- * A no-strings way to let people try Pro on their personal projects (most
5
- * folks don't work weekends, so it's great for side projects but not the
6
- * Mon–Fri day job). Evaluated in LOCAL time: active all of Saturday & Sunday.
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.
7
14
  *
8
- * This is intentionally tiny and dependency-free so it can be shared by every
9
- * `useIsPro()` gate without pulling in extra packages.
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.
10
17
  */
11
18
  /** Whether the Weekend Pass is active right now (local Saturday or Sunday). */
12
19
  export declare function isWeekendFreePro(now?: Date): boolean;
@@ -16,4 +23,20 @@ export declare function isWeekendFreePro(now?: Date): boolean;
16
23
  * midnight without a reload.
17
24
  */
18
25
  export declare function useWeekendFreePro(): boolean;
26
+ /**
27
+ * Whether the Weekend Pass applies to a given tier.
28
+ *
29
+ * The pass is free Pro every Saturday and Sunday — and it used to apply to
30
+ * everyone, including people with no key at all. That made the anonymous tier
31
+ * incoherent: two days in seven, having no account beat having one.
32
+ *
33
+ * Requiring a (free) key is the rare change that costs Pro nothing. It grants
34
+ * no new value — the pass already existed and was already given away — it only
35
+ * withdraws it from anonymous, which makes claiming a key worth something and
36
+ * leaves every paying customer exactly where they were.
37
+ *
38
+ * Takes the tier as an argument rather than reading it, so this module stays a
39
+ * pure calendar utility and `hooks.ts` can keep importing it without a cycle.
40
+ */
41
+ export declare function weekendPassAppliesTo(tier: "anonymous" | "free" | "pro", weekend: boolean): boolean;
19
42
  //# sourceMappingURL=weekendPro.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"weekendPro.d.ts","sourceRoot":"","sources":["../../../src/weekendPro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,IAAiB,GAAG,OAAO,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAY3C"}
1
+ {"version":3,"file":"weekendPro.d.ts","sourceRoot":"","sources":["../../../src/weekendPro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAiBH,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,IAAiB,GAAG,OAAO,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAY3C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,KAAK,EAClC,OAAO,EAAE,OAAO,GACf,OAAO,CAOT"}
@@ -1,11 +1,19 @@
1
- /**
2
- * LicenseManager - Singleton for managing React Buoy Pro licenses
1
+ /*!
2
+ * PROPRIETARY — Buoy Pro license enforcement. NOT open source.
3
3
  *
4
- * Simple license validation + device registration for visibility.
5
- * No limits enforced - we trust our customers.
6
- * Keygen tracks validation calls for usage analytics.
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;;;;;;GAMG;AAoKH,OAAO,KAAK,EAEV,YAAY,EAEZ,eAAe,EAChB,MAAM,SAAS,CAAC;AAE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I,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
- readonly productId: "1037431d-b2fe-48db-aca9-10c5e9c4d944";
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;;;;;CAMhB,CAAC;AAGX,eAAO,MAAM,sBAAsB,QAA2B,CAAC;AAI/D,eAAO,MAAM,6BAA6B,QAAsB,CAAC;AAIjE,eAAO,MAAM,mBAAmB,oBAAoB,CAAC"}
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
- * React hooks for license management
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
- * Simplified model: Just validate license, no device/session management.
5
- * We trust our customers.
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;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,SAAS,CAAC;AAE1D;;;;;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;;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,CAIlC;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,CAYA"}
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;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;A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EAAE,MAAM,GAAG,OAAO,CAIpD"}
@@ -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 (Web/Electron)
3
20
  *
@@ -8,10 +25,11 @@
8
25
  * Keygen tracks validation calls for usage analytics.
9
26
  */
10
27
  export { LicenseManager } from "./LicenseManager";
11
- export { useLicense, useFeatureAccess, useIsPro, useProAccess } from "./hooks";
28
+ export { useLicense, useFeatureAccess, useIsPro, useProAccess, useTier } from "./hooks";
12
29
  export type { ProAccessReason } from "./hooks";
30
+ export { ANONYMOUS_TIER_ENABLED } from "./config";
13
31
  export { isWeekendFreePro, useWeekendFreePro } from "./weekendPro";
14
- export type { LicenseState, LicenseEvent, LicenseListener, LicenseValidationResult, CachedLicense, } from "./types";
32
+ export type { BuoyTier, TierSource, LicenseState, LicenseEvent, LicenseListener, LicenseValidationResult, CachedLicense, } from "./types";
15
33
  export declare function setLicenseKey(key: string): Promise<boolean>;
16
34
  export declare function isPro(): boolean;
17
35
  export declare function hasEntitlement(code: string): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,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