@mui/x-license 8.26.0 → 9.0.0-alpha.2

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 (89) hide show
  1. package/CHANGELOG.md +591 -3
  2. package/{esm/Unstable_LicenseInfoProvider/LicenseInfoProvider.d.ts → Unstable_LicenseInfoProvider/LicenseInfoProvider.d.mts} +1 -1
  3. package/{esm/Unstable_LicenseInfoProvider/LicenseInfoProvider.js → Unstable_LicenseInfoProvider/LicenseInfoProvider.mjs} +1 -1
  4. package/{esm/Unstable_LicenseInfoProvider/MuiLicenseInfoContext.d.ts → Unstable_LicenseInfoProvider/MuiLicenseInfoContext.d.mts} +1 -1
  5. package/{esm/Unstable_LicenseInfoProvider/index.d.ts → Unstable_LicenseInfoProvider/index.d.mts} +2 -2
  6. package/{esm/Unstable_LicenseInfoProvider/index.js → Unstable_LicenseInfoProvider/index.mjs} +1 -1
  7. package/{esm/Watermark/Watermark.d.ts → Watermark/Watermark.d.mts} +1 -1
  8. package/Watermark/Watermark.js +3 -1
  9. package/{esm/Watermark/Watermark.js → Watermark/Watermark.mjs} +4 -3
  10. package/Watermark/index.d.mts +1 -0
  11. package/Watermark/index.mjs +1 -0
  12. package/encoding/base64.js +3 -1
  13. package/{esm/encoding/base64.js → encoding/base64.mjs} +2 -1
  14. package/encoding/index.d.mts +2 -0
  15. package/encoding/index.mjs +2 -0
  16. package/index.d.mts +4 -0
  17. package/index.d.ts +3 -6
  18. package/index.js +14 -75
  19. package/index.mjs +10 -0
  20. package/license-env.d.mts +6 -0
  21. package/license-env.d.ts +6 -0
  22. package/package.json +107 -16
  23. package/test-keys.d.mts +92 -0
  24. package/test-keys.d.ts +92 -0
  25. package/test-keys.js +135 -0
  26. package/test-keys.mjs +129 -0
  27. package/{esm/useLicenseVerifier/index.d.ts → useLicenseVerifier/index.d.mts} +1 -1
  28. package/{esm/useLicenseVerifier/index.js → useLicenseVerifier/index.mjs} +1 -1
  29. package/{esm/useLicenseVerifier/useLicenseVerifier.d.ts → useLicenseVerifier/useLicenseVerifier.d.mts} +2 -2
  30. package/useLicenseVerifier/useLicenseVerifier.js +2 -1
  31. package/{esm/useLicenseVerifier/useLicenseVerifier.js → useLicenseVerifier/useLicenseVerifier.mjs} +7 -6
  32. package/{esm/utils/commercialPackages.d.ts → utils/commercialPackages.d.mts} +1 -1
  33. package/utils/commercialPackages.d.ts +1 -1
  34. package/utils/index.d.mts +8 -0
  35. package/utils/index.d.ts +3 -1
  36. package/utils/index.mjs +4 -0
  37. package/utils/licenseAppType.d.mts +8 -0
  38. package/utils/licenseAppType.d.ts +8 -0
  39. package/utils/licenseAppType.js +16 -0
  40. package/utils/licenseAppType.mjs +10 -0
  41. package/utils/licenseDetails.d.mts +60 -0
  42. package/utils/licenseDetails.d.ts +60 -0
  43. package/utils/licenseDetails.js +5 -0
  44. package/utils/licenseDetails.mjs +1 -0
  45. package/utils/licenseErrorMessageUtils.js +15 -1
  46. package/{esm/utils/licenseErrorMessageUtils.js → utils/licenseErrorMessageUtils.mjs} +14 -1
  47. package/{esm/utils/plan.d.ts → utils/licensePlan.d.mts} +1 -1
  48. package/utils/{plan.d.ts → licensePlan.d.ts} +1 -1
  49. package/utils/{plan.js → licensePlan.js} +1 -1
  50. package/utils/licensePlan.mjs +2 -0
  51. package/verifyLicense/index.d.mts +1 -0
  52. package/verifyLicense/index.mjs +1 -0
  53. package/verifyLicense/verifyLicense.d.mts +32 -0
  54. package/verifyLicense/verifyLicense.d.ts +18 -1
  55. package/verifyLicense/verifyLicense.js +86 -36
  56. package/{esm/verifyLicense/verifyLicense.js → verifyLicense/verifyLicense.mjs} +85 -39
  57. package/esm/Watermark/index.d.ts +0 -1
  58. package/esm/Watermark/index.js +0 -1
  59. package/esm/encoding/index.d.ts +0 -2
  60. package/esm/encoding/index.js +0 -2
  61. package/esm/generateLicense/generateLicense.d.ts +0 -10
  62. package/esm/generateLicense/generateLicense.js +0 -19
  63. package/esm/generateLicense/index.d.ts +0 -1
  64. package/esm/generateLicense/index.js +0 -1
  65. package/esm/index.d.ts +0 -7
  66. package/esm/index.js +0 -14
  67. package/esm/package.json +0 -1
  68. package/esm/utils/index.d.ts +0 -6
  69. package/esm/utils/index.js +0 -4
  70. package/esm/utils/plan.js +0 -2
  71. package/esm/verifyLicense/index.d.ts +0 -1
  72. package/esm/verifyLicense/index.js +0 -1
  73. package/esm/verifyLicense/verifyLicense.d.ts +0 -15
  74. package/generateLicense/generateLicense.d.ts +0 -10
  75. package/generateLicense/generateLicense.js +0 -25
  76. package/generateLicense/index.d.ts +0 -1
  77. package/generateLicense/index.js +0 -16
  78. /package/{esm/Unstable_LicenseInfoProvider/MuiLicenseInfoContext.js → Unstable_LicenseInfoProvider/MuiLicenseInfoContext.mjs} +0 -0
  79. /package/{esm/encoding/base64.d.ts → encoding/base64.d.mts} +0 -0
  80. /package/{esm/encoding/md5.d.ts → encoding/md5.d.mts} +0 -0
  81. /package/{esm/encoding/md5.js → encoding/md5.mjs} +0 -0
  82. /package/{esm/utils/commercialPackages.js → utils/commercialPackages.mjs} +0 -0
  83. /package/{esm/utils/licenseErrorMessageUtils.d.ts → utils/licenseErrorMessageUtils.d.mts} +0 -0
  84. /package/{esm/utils/licenseInfo.d.ts → utils/licenseInfo.d.mts} +0 -0
  85. /package/{esm/utils/licenseInfo.js → utils/licenseInfo.mjs} +0 -0
  86. /package/{esm/utils/licenseModel.d.ts → utils/licenseModel.d.mts} +0 -0
  87. /package/{esm/utils/licenseModel.js → utils/licenseModel.mjs} +0 -0
  88. /package/{esm/utils/licenseStatus.d.ts → utils/licenseStatus.d.mts} +0 -0
  89. /package/{esm/utils/licenseStatus.js → utils/licenseStatus.mjs} +0 -0
@@ -1,6 +1,7 @@
1
+ import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
1
2
  import { fastMemo } from '@mui/x-internals/fastMemo';
2
- import { useLicenseVerifier } from "../useLicenseVerifier/index.js";
3
- import { LICENSE_STATUS } from "../utils/licenseStatus.js";
3
+ import { useLicenseVerifier } from "../useLicenseVerifier/index.mjs";
4
+ import { LICENSE_STATUS } from "../utils/licenseStatus.mjs";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  function getLicenseErrorMessage(licenseStatus) {
6
7
  switch (licenseStatus) {
@@ -18,7 +19,7 @@ function getLicenseErrorMessage(licenseStatus) {
18
19
  case LICENSE_STATUS.NotFound:
19
20
  return 'MUI X Missing license key';
20
21
  default:
21
- throw new Error('Unhandled MUI X license status.');
22
+ throw new Error(process.env.NODE_ENV !== "production" ? 'MUI X: Unhandled license status encountered in watermark display. ' + 'This is an internal error indicating an unknown license status. ' + 'Please report this issue if you encounter it.' : _formatErrorMessage(183));
22
23
  }
23
24
  }
24
25
  function Watermark(props) {
@@ -0,0 +1 @@
1
+ export * from "./Watermark.mjs";
@@ -0,0 +1 @@
1
+ export * from "./Watermark.mjs";
@@ -1,16 +1,18 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.base64Encode = exports.base64Decode = void 0;
8
+ var _formatErrorMessage2 = _interopRequireDefault(require("@mui/x-internals/formatErrorMessage"));
7
9
  /* eslint-disable */
8
10
  const _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
9
11
  function utf8Encode(str) {
10
12
  for (let n = 0; n < str.length; n++) {
11
13
  const c = str.charCodeAt(n);
12
14
  if (c >= 128) {
13
- throw new Error('ASCII only support');
15
+ throw new Error(process.env.NODE_ENV !== "production" ? 'MUI X: Only ASCII characters are supported in license encoding. ' + 'Non-ASCII characters cannot be encoded. ' + 'Ensure the input contains only ASCII characters.' : (0, _formatErrorMessage2.default)(186));
14
16
  }
15
17
  }
16
18
  return str;
@@ -1,10 +1,11 @@
1
+ import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
1
2
  /* eslint-disable */
2
3
  const _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
3
4
  function utf8Encode(str) {
4
5
  for (let n = 0; n < str.length; n++) {
5
6
  const c = str.charCodeAt(n);
6
7
  if (c >= 128) {
7
- throw new Error('ASCII only support');
8
+ throw new Error(process.env.NODE_ENV !== "production" ? 'MUI X: Only ASCII characters are supported in license encoding. ' + 'Non-ASCII characters cannot be encoded. ' + 'Ensure the input contains only ASCII characters.' : _formatErrorMessage(186));
8
9
  }
9
10
  }
10
11
  return str;
@@ -0,0 +1,2 @@
1
+ export * from "./base64.mjs";
2
+ export * from "./md5.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./base64.mjs";
2
+ export * from "./md5.mjs";
package/index.d.mts ADDED
@@ -0,0 +1,4 @@
1
+ export { Unstable_LicenseInfoProvider, type Unstable_LicenseInfoProviderProps } from "./Unstable_LicenseInfoProvider/index.mjs";
2
+ export { LicenseInfo } from "./utils/index.mjs";
3
+ export type { LicenseStatus, MuiLicenseInfo, AppType, KeyVersion, LicenseDetails, LicenseModel, PlanScope } from "./utils/index.mjs";
4
+ export { muiXTelemetrySettings } from '@mui/x-telemetry';
package/index.d.ts CHANGED
@@ -1,7 +1,4 @@
1
- export * from "./generateLicense/index.js";
2
- export * from "./utils/index.js";
3
- export * from "./verifyLicense/index.js";
4
- export * from "./useLicenseVerifier/index.js";
5
- export * from "./Watermark/index.js";
6
- export * from "./Unstable_LicenseInfoProvider/index.js";
1
+ export { Unstable_LicenseInfoProvider, type Unstable_LicenseInfoProviderProps } from "./Unstable_LicenseInfoProvider/index.js";
2
+ export { LicenseInfo } from "./utils/index.js";
3
+ export type { LicenseStatus, MuiLicenseInfo, AppType, KeyVersion, LicenseDetails, LicenseModel, PlanScope } from "./utils/index.js";
7
4
  export { muiXTelemetrySettings } from '@mui/x-telemetry';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-license v8.26.0
2
+ * @mui/x-license v9.0.0-alpha.2
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -10,85 +10,24 @@
10
10
  Object.defineProperty(exports, "__esModule", {
11
11
  value: true
12
12
  });
13
- var _exportNames = {
14
- muiXTelemetrySettings: true
15
- };
16
- Object.defineProperty(exports, "muiXTelemetrySettings", {
13
+ Object.defineProperty(exports, "LicenseInfo", {
17
14
  enumerable: true,
18
15
  get: function () {
19
- return _xTelemetry.muiXTelemetrySettings;
16
+ return _utils.LicenseInfo;
20
17
  }
21
18
  });
22
- var _generateLicense = require("./generateLicense");
23
- Object.keys(_generateLicense).forEach(function (key) {
24
- if (key === "default" || key === "__esModule") return;
25
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
26
- if (key in exports && exports[key] === _generateLicense[key]) return;
27
- Object.defineProperty(exports, key, {
28
- enumerable: true,
29
- get: function () {
30
- return _generateLicense[key];
31
- }
32
- });
33
- });
34
- var _utils = require("./utils");
35
- Object.keys(_utils).forEach(function (key) {
36
- if (key === "default" || key === "__esModule") return;
37
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
38
- if (key in exports && exports[key] === _utils[key]) return;
39
- Object.defineProperty(exports, key, {
40
- enumerable: true,
41
- get: function () {
42
- return _utils[key];
43
- }
44
- });
45
- });
46
- var _verifyLicense = require("./verifyLicense");
47
- Object.keys(_verifyLicense).forEach(function (key) {
48
- if (key === "default" || key === "__esModule") return;
49
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
50
- if (key in exports && exports[key] === _verifyLicense[key]) return;
51
- Object.defineProperty(exports, key, {
52
- enumerable: true,
53
- get: function () {
54
- return _verifyLicense[key];
55
- }
56
- });
57
- });
58
- var _useLicenseVerifier = require("./useLicenseVerifier");
59
- Object.keys(_useLicenseVerifier).forEach(function (key) {
60
- if (key === "default" || key === "__esModule") return;
61
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
62
- if (key in exports && exports[key] === _useLicenseVerifier[key]) return;
63
- Object.defineProperty(exports, key, {
64
- enumerable: true,
65
- get: function () {
66
- return _useLicenseVerifier[key];
67
- }
68
- });
19
+ Object.defineProperty(exports, "Unstable_LicenseInfoProvider", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _Unstable_LicenseInfoProvider.Unstable_LicenseInfoProvider;
23
+ }
69
24
  });
70
- var _Watermark = require("./Watermark");
71
- Object.keys(_Watermark).forEach(function (key) {
72
- if (key === "default" || key === "__esModule") return;
73
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
74
- if (key in exports && exports[key] === _Watermark[key]) return;
75
- Object.defineProperty(exports, key, {
76
- enumerable: true,
77
- get: function () {
78
- return _Watermark[key];
79
- }
80
- });
25
+ Object.defineProperty(exports, "muiXTelemetrySettings", {
26
+ enumerable: true,
27
+ get: function () {
28
+ return _xTelemetry.muiXTelemetrySettings;
29
+ }
81
30
  });
82
31
  var _Unstable_LicenseInfoProvider = require("./Unstable_LicenseInfoProvider");
83
- Object.keys(_Unstable_LicenseInfoProvider).forEach(function (key) {
84
- if (key === "default" || key === "__esModule") return;
85
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
86
- if (key in exports && exports[key] === _Unstable_LicenseInfoProvider[key]) return;
87
- Object.defineProperty(exports, key, {
88
- enumerable: true,
89
- get: function () {
90
- return _Unstable_LicenseInfoProvider[key];
91
- }
92
- });
93
- });
32
+ var _utils = require("./utils");
94
33
  var _xTelemetry = require("@mui/x-telemetry");
package/index.mjs ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @mui/x-license v9.0.0-alpha.2
3
+ *
4
+ * @license SEE LICENSE IN LICENSE
5
+ * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export { Unstable_LicenseInfoProvider } from "./Unstable_LicenseInfoProvider/index.mjs";
9
+ export { LicenseInfo } from "./utils/index.mjs";
10
+ export { muiXTelemetrySettings } from '@mui/x-telemetry';
@@ -0,0 +1,6 @@
1
+ export {};
2
+ declare global {
3
+ interface MUIEnv {
4
+ MUI_VERSION?: string;
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ export {};
2
+ declare global {
3
+ interface MUIEnv {
4
+ MUI_VERSION?: string;
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-license",
3
- "version": "8.26.0",
3
+ "version": "9.0.0-alpha.2",
4
4
  "author": "MUI Team",
5
5
  "description": "MUI X License verification.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -21,10 +21,10 @@
21
21
  "directory": "packages/x-license"
22
22
  },
23
23
  "dependencies": {
24
- "@babel/runtime": "^7.28.4",
25
- "@mui/utils": "^7.3.5",
26
- "@mui/x-internals": "8.26.0",
27
- "@mui/x-telemetry": "8.20.0"
24
+ "@babel/runtime": "^7.28.6",
25
+ "@mui/utils": "^7.3.7",
26
+ "@mui/x-internals": "9.0.0-alpha.2",
27
+ "@mui/x-telemetry": "9.0.0-alpha.2"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
@@ -33,30 +33,121 @@
33
33
  "node": ">=14.0.0"
34
34
  },
35
35
  "type": "commonjs",
36
- "main": "./index.js",
37
- "types": "./index.d.ts",
38
36
  "exports": {
39
37
  "./package.json": "./package.json",
40
38
  ".": {
39
+ "import": {
40
+ "types": "./index.d.mts",
41
+ "default": "./index.mjs"
42
+ },
41
43
  "require": {
42
44
  "types": "./index.d.ts",
43
45
  "default": "./index.js"
44
46
  },
45
47
  "default": {
46
- "types": "./esm/index.d.ts",
47
- "default": "./esm/index.js"
48
+ "types": "./index.d.mts",
49
+ "default": "./index.mjs"
50
+ }
51
+ },
52
+ "./Watermark": {
53
+ "import": {
54
+ "types": "./Watermark/index.d.mts",
55
+ "default": "./Watermark/index.mjs"
56
+ },
57
+ "require": {
58
+ "types": "./Watermark/index.d.ts",
59
+ "default": "./Watermark/index.js"
60
+ },
61
+ "default": {
62
+ "types": "./Watermark/index.d.mts",
63
+ "default": "./Watermark/index.mjs"
64
+ }
65
+ },
66
+ "./useLicenseVerifier": {
67
+ "import": {
68
+ "types": "./useLicenseVerifier/index.d.mts",
69
+ "default": "./useLicenseVerifier/index.mjs"
70
+ },
71
+ "require": {
72
+ "types": "./useLicenseVerifier/index.d.ts",
73
+ "default": "./useLicenseVerifier/index.js"
74
+ },
75
+ "default": {
76
+ "types": "./useLicenseVerifier/index.d.mts",
77
+ "default": "./useLicenseVerifier/index.mjs"
78
+ }
79
+ },
80
+ "./verifyLicense": {
81
+ "import": {
82
+ "types": "./verifyLicense/index.d.mts",
83
+ "default": "./verifyLicense/index.mjs"
84
+ },
85
+ "require": {
86
+ "types": "./verifyLicense/index.d.ts",
87
+ "default": "./verifyLicense/index.js"
88
+ },
89
+ "default": {
90
+ "types": "./verifyLicense/index.d.mts",
91
+ "default": "./verifyLicense/index.mjs"
48
92
  }
49
93
  },
50
- "./*": {
94
+ "./utils": {
95
+ "import": {
96
+ "types": "./utils/index.d.mts",
97
+ "default": "./utils/index.mjs"
98
+ },
99
+ "require": {
100
+ "types": "./utils/index.d.ts",
101
+ "default": "./utils/index.js"
102
+ },
103
+ "default": {
104
+ "types": "./utils/index.d.mts",
105
+ "default": "./utils/index.mjs"
106
+ }
107
+ },
108
+ "./test-keys": {
109
+ "import": {
110
+ "types": "./test-keys.d.mts",
111
+ "default": "./test-keys.mjs"
112
+ },
113
+ "require": {
114
+ "types": "./test-keys.d.ts",
115
+ "default": "./test-keys.js"
116
+ },
117
+ "default": {
118
+ "types": "./test-keys.d.mts",
119
+ "default": "./test-keys.mjs"
120
+ }
121
+ },
122
+ "./Unstable_LicenseInfoProvider": {
123
+ "import": {
124
+ "types": "./Unstable_LicenseInfoProvider/index.d.mts",
125
+ "default": "./Unstable_LicenseInfoProvider/index.mjs"
126
+ },
51
127
  "require": {
52
- "types": "./*/index.d.ts",
53
- "default": "./*/index.js"
128
+ "types": "./Unstable_LicenseInfoProvider/index.d.ts",
129
+ "default": "./Unstable_LicenseInfoProvider/index.js"
54
130
  },
55
131
  "default": {
56
- "types": "./esm/*/index.d.ts",
57
- "default": "./esm/*/index.js"
132
+ "types": "./Unstable_LicenseInfoProvider/index.d.mts",
133
+ "default": "./Unstable_LicenseInfoProvider/index.mjs"
58
134
  }
59
135
  },
60
- "./esm": null
61
- }
136
+ "./encoding": {
137
+ "import": {
138
+ "types": "./encoding/index.d.mts",
139
+ "default": "./encoding/index.mjs"
140
+ },
141
+ "require": {
142
+ "types": "./encoding/index.d.ts",
143
+ "default": "./encoding/index.js"
144
+ },
145
+ "default": {
146
+ "types": "./encoding/index.d.mts",
147
+ "default": "./encoding/index.mjs"
148
+ }
149
+ }
150
+ },
151
+ "main": "./index.js",
152
+ "types": "./index.d.ts"
62
153
  }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Test Premium license key.
3
+ * orderId: #123, scope: premium, licenseModel: annual, planVersion: Q3-2024
4
+ * keyVersion: 2, expiryDate: 2099-12-30T23:00:00.000Z
5
+ */
6
+ export declare const TEST_LICENSE_KEY_PREMIUM = "715a2f48d6140e8e6f2484e6c4b981aeTz0xMjMsRT00MTAyMzU0ODAwMDAwLFM9cHJlbWl1bSxMTT1hbm51YWwsUFY9UTMtMjAyNCxUPXRydWUsS1Y9Mg==";
7
+ /**
8
+ * Test Pro license key.
9
+ * orderId: #123, scope: pro, licenseModel: annual, planVersion: Q3-2024
10
+ * keyVersion: 2, expiryDate: 2099-12-30T23:00:00.000Z
11
+ */
12
+ export declare const TEST_LICENSE_KEY_PRO = "8d0500f3fe93ffea84445b2aed17c59cTz0xMjMsRT00MTAyMzU0ODAwMDAwLFM9cHJvLExNPWFubnVhbCxQVj1RMy0yMDI0LFQ9dHJ1ZSxLVj0y";
13
+ /**
14
+ * Key version 1 format (pro, perpetual, initial implied).
15
+ * orderId: #123, expiryDate: 2026-08-02
16
+ */
17
+ export declare const TEST_KEY_V1 = "8f5bd7d70e4d7aeecd1d5b9d0d1759bbT1JERVI6MTIzLEVYUElSWT0xNzg1ODc0MDEwNzA4LFQ9dHJ1ZSxLRVlWRVJTSU9OPTE=";
18
+ /**
19
+ * Pro subscription, initial, expiry = releaseDate + 1 day.
20
+ * orderId: #123, keyVersion: 2
21
+ */
22
+ export declare const TEST_KEY_PRO_SUBSCRIPTION = "b4cb282aa165b05f65f70a4caddadc81Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
23
+ /**
24
+ * Premium subscription, initial, expiry = releaseDate + 1 day.
25
+ * orderId: #123, keyVersion: 2
26
+ */
27
+ export declare const TEST_KEY_PREMIUM_SUBSCRIPTION = "22bd1051015e3c663f8ca5cba9ebe56aTz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxUPXRydWUsS1Y9Mg==";
28
+ /**
29
+ * Pro perpetual, initial, expiry = releaseDate + 1 day (valid).
30
+ * orderId: #123, keyVersion: 2
31
+ */
32
+ export declare const TEST_KEY_PRO_PERPETUAL = "f4221ac32d1b8b102c143dcf65080414Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJvLExNPXBlcnBldHVhbCxQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
33
+ /**
34
+ * Pro perpetual, initial, expiry = releaseDate - 1 day (expired before release).
35
+ * orderId: #123, keyVersion: 2
36
+ */
37
+ export declare const TEST_KEY_PRO_PERPETUAL_EXPIRED = "64245e2bb861fc92856e682b32dc8bf2Tz0xMjMsRT0xNTE0NTg4NDAwMDAwLFM9cHJvLExNPXBlcnBldHVhbCxQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
38
+ /**
39
+ * Pro annual, initial, expiry = releaseDate + 1 day.
40
+ * orderId: #123, keyVersion: 2
41
+ */
42
+ export declare const TEST_KEY_PRO_ANNUAL_INITIAL = "d82e3196c55fc5dc21a4145b796a77a7Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJvLExNPWFubnVhbCxQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
43
+ /**
44
+ * Premium annual, initial, expiry = releaseDate + 1 day.
45
+ * orderId: #123, keyVersion: 2
46
+ */
47
+ export declare const TEST_KEY_PREMIUM_ANNUAL_INITIAL = "8fc9fa79e1b5f30ce737ccec8f3e36f4Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJlbWl1bSxMTT1hbm51YWwsUFY9aW5pdGlhbCxUPXRydWUsS1Y9Mg==";
48
+ /**
49
+ * Pro subscription, initial, expiry = 2024-06-14 (fakeNow - 1 day, within grace period).
50
+ * orderId: #123, keyVersion: 2
51
+ */
52
+ export declare const TEST_KEY_EXPIRED_GRACE = "84dcbd1c5a6169c74e6c70ec23e0df55Tz0xMjMsRT0xNzE4MzIzMjAwMDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
53
+ /**
54
+ * Pro subscription, initial, expiry = 2024-05-16 (fakeNow - 30 days, past grace period).
55
+ * orderId: #123, keyVersion: 2
56
+ */
57
+ export declare const TEST_KEY_EXPIRED_30DAYS = "4081d3863dda2ca60be4a5b29f582117Tz0xMjMsRT0xNzE1ODE3NjAwMDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
58
+ /**
59
+ * Pro subscription, initial, expiry = 3001-01-01.
60
+ * orderId: #123, keyVersion: 2
61
+ */
62
+ export declare const TEST_KEY_PRO_SUBSCRIPTION_FUTURE = "e83a283135bbd911e4aa0fd55ceea3ebTz0xMjMsRT0zMjUzNTEyNjAwMDAwMCxTPXBybyxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxUPXRydWUsS1Y9Mg==";
63
+ /**
64
+ * Premium subscription, initial, expiry = 3001-01-01.
65
+ * orderId: #123, keyVersion: 2
66
+ */
67
+ export declare const TEST_KEY_PREMIUM_SUBSCRIPTION_FUTURE = "1c6ea00fadedfcb3f2ef393f1de32f29Tz0xMjMsRT0zMjUzNTEyNjAwMDAwMCxTPXByZW1pdW0sTE09c3Vic2NyaXB0aW9uLFBWPWluaXRpYWwsVD10cnVlLEtWPTI=";
68
+ /**
69
+ * Pro annual, Q3-2024, quantity: 5, appType: single.
70
+ * orderId: #123, keyVersion: 3, expiryDate: 2099-12-30T23:00:00.000Z
71
+ */
72
+ export declare const TEST_KEY_PRO_ANNUAL_V3 = "521a75b4cf0d0c5e8990ce070886e167Tz0xMjMsRT00MTAyMzU0ODAwMDAwLFM9cHJvLExNPWFubnVhbCxQVj1RMy0yMDI0LFE9NSxBVD1zaW5nbGUsVD10cnVlLEtWPTM=";
73
+ /**
74
+ * Pro annual, Q1-2026, quantity: 5, appType: single.
75
+ * orderId: #123, keyVersion: 3, expiryDate: 3001-01-01
76
+ */
77
+ export declare const TEST_KEY_PRO_ANNUAL_Q1_2026_V3 = "5f52871b5845f28ebdd0fabbe0b89695Tz0xMjMsRT0zMjUzNTEyNjAwMDAwMCxTPXBybyxMTT1hbm51YWwsUFY9UTEtMjAyNixRPTUsQVQ9c2luZ2xlLFQ9dHJ1ZSxLVj0z";
78
+ /**
79
+ * Premium annual, Q1-2026, quantity: 10, appType: single.
80
+ * orderId: #123, keyVersion: 3, expiryDate: 3001-01-01
81
+ */
82
+ export declare const TEST_KEY_PREMIUM_ANNUAL_Q1_2026_V3 = "450d9fc1b28e709fcb73969bd10e1c30Tz0xMjMsRT0zMjUzNTEyNjAwMDAwMCxTPXByZW1pdW0sTE09YW5udWFsLFBWPVExLTIwMjYsUT0xMCxBVD1zaW5nbGUsVD10cnVlLEtWPTM=";
83
+ /**
84
+ * Invalid key: hash does not match payload (tampered).
85
+ * Used to test that verifyLicense rejects tampered keys.
86
+ */
87
+ export declare const TEST_KEY_INVALID = "c0b3c1c31055976260628def9b697020TkFNRTpNYC1VSSBTQVMsREVWRUxPUEVSX0NPVU5UPTEwLEVYUElSWT0xNTkxNzIzMDY3MDQyLFZFUlNJT049MS4yLjMsVD10cnVl";
88
+ /**
89
+ * Valid hash but unknown key version (KV=99).
90
+ * Used to test that decodeLicense returns null for unrecognized versions.
91
+ */
92
+ export declare const TEST_KEY_UNKNOWN_VERSION = "64152474c774ae343484f08bbbc1a231Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJvLExNPWFubnVhbCxQVj1pbml0aWFsLFQ9dHJ1ZSxLVj05OQ==";
package/test-keys.d.ts ADDED
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Test Premium license key.
3
+ * orderId: #123, scope: premium, licenseModel: annual, planVersion: Q3-2024
4
+ * keyVersion: 2, expiryDate: 2099-12-30T23:00:00.000Z
5
+ */
6
+ export declare const TEST_LICENSE_KEY_PREMIUM = "715a2f48d6140e8e6f2484e6c4b981aeTz0xMjMsRT00MTAyMzU0ODAwMDAwLFM9cHJlbWl1bSxMTT1hbm51YWwsUFY9UTMtMjAyNCxUPXRydWUsS1Y9Mg==";
7
+ /**
8
+ * Test Pro license key.
9
+ * orderId: #123, scope: pro, licenseModel: annual, planVersion: Q3-2024
10
+ * keyVersion: 2, expiryDate: 2099-12-30T23:00:00.000Z
11
+ */
12
+ export declare const TEST_LICENSE_KEY_PRO = "8d0500f3fe93ffea84445b2aed17c59cTz0xMjMsRT00MTAyMzU0ODAwMDAwLFM9cHJvLExNPWFubnVhbCxQVj1RMy0yMDI0LFQ9dHJ1ZSxLVj0y";
13
+ /**
14
+ * Key version 1 format (pro, perpetual, initial implied).
15
+ * orderId: #123, expiryDate: 2026-08-02
16
+ */
17
+ export declare const TEST_KEY_V1 = "8f5bd7d70e4d7aeecd1d5b9d0d1759bbT1JERVI6MTIzLEVYUElSWT0xNzg1ODc0MDEwNzA4LFQ9dHJ1ZSxLRVlWRVJTSU9OPTE=";
18
+ /**
19
+ * Pro subscription, initial, expiry = releaseDate + 1 day.
20
+ * orderId: #123, keyVersion: 2
21
+ */
22
+ export declare const TEST_KEY_PRO_SUBSCRIPTION = "b4cb282aa165b05f65f70a4caddadc81Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
23
+ /**
24
+ * Premium subscription, initial, expiry = releaseDate + 1 day.
25
+ * orderId: #123, keyVersion: 2
26
+ */
27
+ export declare const TEST_KEY_PREMIUM_SUBSCRIPTION = "22bd1051015e3c663f8ca5cba9ebe56aTz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxUPXRydWUsS1Y9Mg==";
28
+ /**
29
+ * Pro perpetual, initial, expiry = releaseDate + 1 day (valid).
30
+ * orderId: #123, keyVersion: 2
31
+ */
32
+ export declare const TEST_KEY_PRO_PERPETUAL = "f4221ac32d1b8b102c143dcf65080414Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJvLExNPXBlcnBldHVhbCxQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
33
+ /**
34
+ * Pro perpetual, initial, expiry = releaseDate - 1 day (expired before release).
35
+ * orderId: #123, keyVersion: 2
36
+ */
37
+ export declare const TEST_KEY_PRO_PERPETUAL_EXPIRED = "64245e2bb861fc92856e682b32dc8bf2Tz0xMjMsRT0xNTE0NTg4NDAwMDAwLFM9cHJvLExNPXBlcnBldHVhbCxQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
38
+ /**
39
+ * Pro annual, initial, expiry = releaseDate + 1 day.
40
+ * orderId: #123, keyVersion: 2
41
+ */
42
+ export declare const TEST_KEY_PRO_ANNUAL_INITIAL = "d82e3196c55fc5dc21a4145b796a77a7Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJvLExNPWFubnVhbCxQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
43
+ /**
44
+ * Premium annual, initial, expiry = releaseDate + 1 day.
45
+ * orderId: #123, keyVersion: 2
46
+ */
47
+ export declare const TEST_KEY_PREMIUM_ANNUAL_INITIAL = "8fc9fa79e1b5f30ce737ccec8f3e36f4Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJlbWl1bSxMTT1hbm51YWwsUFY9aW5pdGlhbCxUPXRydWUsS1Y9Mg==";
48
+ /**
49
+ * Pro subscription, initial, expiry = 2024-06-14 (fakeNow - 1 day, within grace period).
50
+ * orderId: #123, keyVersion: 2
51
+ */
52
+ export declare const TEST_KEY_EXPIRED_GRACE = "84dcbd1c5a6169c74e6c70ec23e0df55Tz0xMjMsRT0xNzE4MzIzMjAwMDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
53
+ /**
54
+ * Pro subscription, initial, expiry = 2024-05-16 (fakeNow - 30 days, past grace period).
55
+ * orderId: #123, keyVersion: 2
56
+ */
57
+ export declare const TEST_KEY_EXPIRED_30DAYS = "4081d3863dda2ca60be4a5b29f582117Tz0xMjMsRT0xNzE1ODE3NjAwMDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1pbml0aWFsLFQ9dHJ1ZSxLVj0y";
58
+ /**
59
+ * Pro subscription, initial, expiry = 3001-01-01.
60
+ * orderId: #123, keyVersion: 2
61
+ */
62
+ export declare const TEST_KEY_PRO_SUBSCRIPTION_FUTURE = "e83a283135bbd911e4aa0fd55ceea3ebTz0xMjMsRT0zMjUzNTEyNjAwMDAwMCxTPXBybyxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxUPXRydWUsS1Y9Mg==";
63
+ /**
64
+ * Premium subscription, initial, expiry = 3001-01-01.
65
+ * orderId: #123, keyVersion: 2
66
+ */
67
+ export declare const TEST_KEY_PREMIUM_SUBSCRIPTION_FUTURE = "1c6ea00fadedfcb3f2ef393f1de32f29Tz0xMjMsRT0zMjUzNTEyNjAwMDAwMCxTPXByZW1pdW0sTE09c3Vic2NyaXB0aW9uLFBWPWluaXRpYWwsVD10cnVlLEtWPTI=";
68
+ /**
69
+ * Pro annual, Q3-2024, quantity: 5, appType: single.
70
+ * orderId: #123, keyVersion: 3, expiryDate: 2099-12-30T23:00:00.000Z
71
+ */
72
+ export declare const TEST_KEY_PRO_ANNUAL_V3 = "521a75b4cf0d0c5e8990ce070886e167Tz0xMjMsRT00MTAyMzU0ODAwMDAwLFM9cHJvLExNPWFubnVhbCxQVj1RMy0yMDI0LFE9NSxBVD1zaW5nbGUsVD10cnVlLEtWPTM=";
73
+ /**
74
+ * Pro annual, Q1-2026, quantity: 5, appType: single.
75
+ * orderId: #123, keyVersion: 3, expiryDate: 3001-01-01
76
+ */
77
+ export declare const TEST_KEY_PRO_ANNUAL_Q1_2026_V3 = "5f52871b5845f28ebdd0fabbe0b89695Tz0xMjMsRT0zMjUzNTEyNjAwMDAwMCxTPXBybyxMTT1hbm51YWwsUFY9UTEtMjAyNixRPTUsQVQ9c2luZ2xlLFQ9dHJ1ZSxLVj0z";
78
+ /**
79
+ * Premium annual, Q1-2026, quantity: 10, appType: single.
80
+ * orderId: #123, keyVersion: 3, expiryDate: 3001-01-01
81
+ */
82
+ export declare const TEST_KEY_PREMIUM_ANNUAL_Q1_2026_V3 = "450d9fc1b28e709fcb73969bd10e1c30Tz0xMjMsRT0zMjUzNTEyNjAwMDAwMCxTPXByZW1pdW0sTE09YW5udWFsLFBWPVExLTIwMjYsUT0xMCxBVD1zaW5nbGUsVD10cnVlLEtWPTM=";
83
+ /**
84
+ * Invalid key: hash does not match payload (tampered).
85
+ * Used to test that verifyLicense rejects tampered keys.
86
+ */
87
+ export declare const TEST_KEY_INVALID = "c0b3c1c31055976260628def9b697020TkFNRTpNYC1VSSBTQVMsREVWRUxPUEVSX0NPVU5UPTEwLEVYUElSWT0xNTkxNzIzMDY3MDQyLFZFUlNJT049MS4yLjMsVD10cnVl";
88
+ /**
89
+ * Valid hash but unknown key version (KV=99).
90
+ * Used to test that decodeLicense returns null for unrecognized versions.
91
+ */
92
+ export declare const TEST_KEY_UNKNOWN_VERSION = "64152474c774ae343484f08bbbc1a231Tz0xMjMsRT0xNTE0NzYxMjAwMDAwLFM9cHJvLExNPWFubnVhbCxQVj1pbml0aWFsLFQ9dHJ1ZSxLVj05OQ==";