@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.
- package/CHANGELOG.md +591 -3
- package/{esm/Unstable_LicenseInfoProvider/LicenseInfoProvider.d.ts → Unstable_LicenseInfoProvider/LicenseInfoProvider.d.mts} +1 -1
- package/{esm/Unstable_LicenseInfoProvider/LicenseInfoProvider.js → Unstable_LicenseInfoProvider/LicenseInfoProvider.mjs} +1 -1
- package/{esm/Unstable_LicenseInfoProvider/MuiLicenseInfoContext.d.ts → Unstable_LicenseInfoProvider/MuiLicenseInfoContext.d.mts} +1 -1
- package/{esm/Unstable_LicenseInfoProvider/index.d.ts → Unstable_LicenseInfoProvider/index.d.mts} +2 -2
- package/{esm/Unstable_LicenseInfoProvider/index.js → Unstable_LicenseInfoProvider/index.mjs} +1 -1
- package/{esm/Watermark/Watermark.d.ts → Watermark/Watermark.d.mts} +1 -1
- package/Watermark/Watermark.js +3 -1
- package/{esm/Watermark/Watermark.js → Watermark/Watermark.mjs} +4 -3
- package/Watermark/index.d.mts +1 -0
- package/Watermark/index.mjs +1 -0
- package/encoding/base64.js +3 -1
- package/{esm/encoding/base64.js → encoding/base64.mjs} +2 -1
- package/encoding/index.d.mts +2 -0
- package/encoding/index.mjs +2 -0
- package/index.d.mts +4 -0
- package/index.d.ts +3 -6
- package/index.js +14 -75
- package/index.mjs +10 -0
- package/license-env.d.mts +6 -0
- package/license-env.d.ts +6 -0
- package/package.json +107 -16
- package/test-keys.d.mts +92 -0
- package/test-keys.d.ts +92 -0
- package/test-keys.js +135 -0
- package/test-keys.mjs +129 -0
- package/{esm/useLicenseVerifier/index.d.ts → useLicenseVerifier/index.d.mts} +1 -1
- package/{esm/useLicenseVerifier/index.js → useLicenseVerifier/index.mjs} +1 -1
- package/{esm/useLicenseVerifier/useLicenseVerifier.d.ts → useLicenseVerifier/useLicenseVerifier.d.mts} +2 -2
- package/useLicenseVerifier/useLicenseVerifier.js +2 -1
- package/{esm/useLicenseVerifier/useLicenseVerifier.js → useLicenseVerifier/useLicenseVerifier.mjs} +7 -6
- package/{esm/utils/commercialPackages.d.ts → utils/commercialPackages.d.mts} +1 -1
- package/utils/commercialPackages.d.ts +1 -1
- package/utils/index.d.mts +8 -0
- package/utils/index.d.ts +3 -1
- package/utils/index.mjs +4 -0
- package/utils/licenseAppType.d.mts +8 -0
- package/utils/licenseAppType.d.ts +8 -0
- package/utils/licenseAppType.js +16 -0
- package/utils/licenseAppType.mjs +10 -0
- package/utils/licenseDetails.d.mts +60 -0
- package/utils/licenseDetails.d.ts +60 -0
- package/utils/licenseDetails.js +5 -0
- package/utils/licenseDetails.mjs +1 -0
- package/utils/licenseErrorMessageUtils.js +15 -1
- package/{esm/utils/licenseErrorMessageUtils.js → utils/licenseErrorMessageUtils.mjs} +14 -1
- package/{esm/utils/plan.d.ts → utils/licensePlan.d.mts} +1 -1
- package/utils/{plan.d.ts → licensePlan.d.ts} +1 -1
- package/utils/{plan.js → licensePlan.js} +1 -1
- package/utils/licensePlan.mjs +2 -0
- package/verifyLicense/index.d.mts +1 -0
- package/verifyLicense/index.mjs +1 -0
- package/verifyLicense/verifyLicense.d.mts +32 -0
- package/verifyLicense/verifyLicense.d.ts +18 -1
- package/verifyLicense/verifyLicense.js +86 -36
- package/{esm/verifyLicense/verifyLicense.js → verifyLicense/verifyLicense.mjs} +85 -39
- package/esm/Watermark/index.d.ts +0 -1
- package/esm/Watermark/index.js +0 -1
- package/esm/encoding/index.d.ts +0 -2
- package/esm/encoding/index.js +0 -2
- package/esm/generateLicense/generateLicense.d.ts +0 -10
- package/esm/generateLicense/generateLicense.js +0 -19
- package/esm/generateLicense/index.d.ts +0 -1
- package/esm/generateLicense/index.js +0 -1
- package/esm/index.d.ts +0 -7
- package/esm/index.js +0 -14
- package/esm/package.json +0 -1
- package/esm/utils/index.d.ts +0 -6
- package/esm/utils/index.js +0 -4
- package/esm/utils/plan.js +0 -2
- package/esm/verifyLicense/index.d.ts +0 -1
- package/esm/verifyLicense/index.js +0 -1
- package/esm/verifyLicense/verifyLicense.d.ts +0 -15
- package/generateLicense/generateLicense.d.ts +0 -10
- package/generateLicense/generateLicense.js +0 -25
- package/generateLicense/index.d.ts +0 -1
- package/generateLicense/index.js +0 -16
- /package/{esm/Unstable_LicenseInfoProvider/MuiLicenseInfoContext.js → Unstable_LicenseInfoProvider/MuiLicenseInfoContext.mjs} +0 -0
- /package/{esm/encoding/base64.d.ts → encoding/base64.d.mts} +0 -0
- /package/{esm/encoding/md5.d.ts → encoding/md5.d.mts} +0 -0
- /package/{esm/encoding/md5.js → encoding/md5.mjs} +0 -0
- /package/{esm/utils/commercialPackages.js → utils/commercialPackages.mjs} +0 -0
- /package/{esm/utils/licenseErrorMessageUtils.d.ts → utils/licenseErrorMessageUtils.d.mts} +0 -0
- /package/{esm/utils/licenseInfo.d.ts → utils/licenseInfo.d.mts} +0 -0
- /package/{esm/utils/licenseInfo.js → utils/licenseInfo.mjs} +0 -0
- /package/{esm/utils/licenseModel.d.ts → utils/licenseModel.d.mts} +0 -0
- /package/{esm/utils/licenseModel.js → utils/licenseModel.mjs} +0 -0
- /package/{esm/utils/licenseStatus.d.ts → utils/licenseStatus.d.mts} +0 -0
- /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.
|
|
3
|
-
import { LICENSE_STATUS } from "../utils/licenseStatus.
|
|
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('
|
|
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";
|
package/encoding/base64.js
CHANGED
|
@@ -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
|
|
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
|
|
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;
|
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
|
|
2
|
-
export
|
|
3
|
-
export
|
|
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
|
|
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
|
-
|
|
14
|
-
muiXTelemetrySettings: true
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "muiXTelemetrySettings", {
|
|
13
|
+
Object.defineProperty(exports, "LicenseInfo", {
|
|
17
14
|
enumerable: true,
|
|
18
15
|
get: function () {
|
|
19
|
-
return
|
|
16
|
+
return _utils.LicenseInfo;
|
|
20
17
|
}
|
|
21
18
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
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';
|
package/license-env.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-license",
|
|
3
|
-
"version": "
|
|
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.
|
|
25
|
-
"@mui/utils": "^7.3.
|
|
26
|
-
"@mui/x-internals": "
|
|
27
|
-
"@mui/x-telemetry": "
|
|
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": "./
|
|
47
|
-
"default": "./
|
|
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": "
|
|
53
|
-
"default": "
|
|
128
|
+
"types": "./Unstable_LicenseInfoProvider/index.d.ts",
|
|
129
|
+
"default": "./Unstable_LicenseInfoProvider/index.js"
|
|
54
130
|
},
|
|
55
131
|
"default": {
|
|
56
|
-
"types": "./
|
|
57
|
-
"default": "./
|
|
132
|
+
"types": "./Unstable_LicenseInfoProvider/index.d.mts",
|
|
133
|
+
"default": "./Unstable_LicenseInfoProvider/index.mjs"
|
|
58
134
|
}
|
|
59
135
|
},
|
|
60
|
-
"./
|
|
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
|
}
|
package/test-keys.d.mts
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==";
|
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==";
|