Socket
Socket
Sign inDemoInstall

@mui/x-license-pro

Package Overview
Dependencies
Maintainers
9
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mui/x-license-pro - npm Package Compare versions

Comparing version 6.9.0 to 6.10.0

4

generateLicense/generateLicense.d.ts

@@ -6,5 +6,5 @@ import { LicenseScope } from '../utils/licenseScope';

expiryDate: Date;
scope?: LicenseScope;
licensingModel?: LicensingModel;
scope: LicenseScope;
licensingModel: LicensingModel;
}
export declare function generateLicense(details: LicenseDetails): string;

@@ -7,3 +7,2 @@ import { md5 } from '../encoding/md5';

function getClearLicenseString(details) {
var _details$scope, _details$licensingMod;
if (details.scope && !LICENSE_SCOPES.includes(details.scope)) {

@@ -13,5 +12,5 @@ throw new Error('MUI: Invalid scope');

if (details.licensingModel && !LICENSING_MODELS.includes(details.licensingModel)) {
throw new Error('MUI: Invalid sales model');
throw new Error('MUI: Invalid licensing model');
}
return `O=${details.orderNumber},E=${details.expiryDate.getTime()},S=${(_details$scope = details.scope) != null ? _details$scope : 'pro'},LM=${(_details$licensingMod = details.licensingModel) != null ? _details$licensingMod : 'perpetual'},KV=${licenseVersion}`;
return `O=${details.orderNumber},E=${details.expiryDate.getTime()},S=${details.scope},LM=${details.licensingModel},KV=${licenseVersion}`;
}

@@ -18,0 +17,0 @@ export function generateLicense(details) {

/**
* @mui/x-license-pro v6.9.0
* @mui/x-license-pro v6.10.0
*

@@ -4,0 +4,0 @@ * @license MUI X Commercial

@@ -7,3 +7,2 @@ import { md5 } from '../encoding/md5';

function getClearLicenseString(details) {
var _details$scope, _details$licensingMod;
if (details.scope && !LICENSE_SCOPES.includes(details.scope)) {

@@ -13,5 +12,5 @@ throw new Error('MUI: Invalid scope');

if (details.licensingModel && !LICENSING_MODELS.includes(details.licensingModel)) {
throw new Error('MUI: Invalid sales model');
throw new Error('MUI: Invalid licensing model');
}
return "O=".concat(details.orderNumber, ",E=").concat(details.expiryDate.getTime(), ",S=").concat((_details$scope = details.scope) != null ? _details$scope : 'pro', ",LM=").concat((_details$licensingMod = details.licensingModel) != null ? _details$licensingMod : 'perpetual', ",KV=").concat(licenseVersion);
return "O=".concat(details.orderNumber, ",E=").concat(details.expiryDate.getTime(), ",S=").concat(details.scope, ",LM=").concat(details.licensingModel, ",KV=").concat(licenseVersion);
}

@@ -18,0 +17,0 @@ export function generateLicense(details) {

/**
* @mui/x-license-pro v6.9.0
* @mui/x-license-pro v6.10.0
*

@@ -4,0 +4,0 @@ * @license MUI X Commercial

@@ -11,2 +11,6 @@ export var LICENSING_MODELS = [

*/
'annual',
/**
* TODO 2025 remove, legacy name of annual.
*/
'subscription'];

@@ -105,3 +105,3 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";

if (license.licensingModel == null || !LICENSING_MODELS.includes(license.licensingModel)) {
console.error('Error checking license. Sales model not found or invalid!');
console.error('Error checking license. Licensing model not found or invalid!');
return LicenseStatus.Invalid;

@@ -121,3 +121,3 @@ }

}
} else if (license.licensingModel === 'subscription') {
} else if (license.licensingModel === 'subscription' || license.licensingModel === 'annual') {
if (license.expiryTimestamp < new Date().getTime()) {

@@ -124,0 +124,0 @@ return LicenseStatus.ExpiredAnnual;

@@ -11,5 +11,5 @@ import { md5 } from '../encoding/md5';

if (details.licensingModel && !LICENSING_MODELS.includes(details.licensingModel)) {
throw new Error('MUI: Invalid sales model');
throw new Error('MUI: Invalid licensing model');
}
return `O=${details.orderNumber},E=${details.expiryDate.getTime()},S=${details.scope ?? 'pro'},LM=${details.licensingModel ?? 'perpetual'},KV=${licenseVersion}`;
return `O=${details.orderNumber},E=${details.expiryDate.getTime()},S=${details.scope},LM=${details.licensingModel},KV=${licenseVersion}`;
}

@@ -16,0 +16,0 @@ export function generateLicense(details) {

/**
* @mui/x-license-pro v6.9.0
* @mui/x-license-pro v6.10.0
*

@@ -4,0 +4,0 @@ * @license MUI X Commercial

@@ -11,2 +11,6 @@ export const LICENSING_MODELS = [

*/
'annual',
/**
* TODO 2025 remove, legacy name of annual.
*/
'subscription'];

@@ -97,3 +97,3 @@ import { base64Decode, base64Encode } from '../encoding/base64';

if (license.licensingModel == null || !LICENSING_MODELS.includes(license.licensingModel)) {
console.error('Error checking license. Sales model not found or invalid!');
console.error('Error checking license. Licensing model not found or invalid!');
return LicenseStatus.Invalid;

@@ -113,3 +113,3 @@ }

}
} else if (license.licensingModel === 'subscription') {
} else if (license.licensingModel === 'subscription' || license.licensingModel === 'annual') {
if (license.expiryTimestamp < new Date().getTime()) {

@@ -116,0 +116,0 @@ return LicenseStatus.ExpiredAnnual;

@@ -17,5 +17,5 @@ "use strict";

if (details.licensingModel && !_licensingModel.LICENSING_MODELS.includes(details.licensingModel)) {
throw new Error('MUI: Invalid sales model');
throw new Error('MUI: Invalid licensing model');
}
return `O=${details.orderNumber},E=${details.expiryDate.getTime()},S=${details.scope ?? 'pro'},LM=${details.licensingModel ?? 'perpetual'},KV=${licenseVersion}`;
return `O=${details.orderNumber},E=${details.expiryDate.getTime()},S=${details.scope},LM=${details.licensingModel},KV=${licenseVersion}`;
}

@@ -22,0 +22,0 @@ function generateLicense(details) {

/**
* @mui/x-license-pro v6.9.0
* @mui/x-license-pro v6.10.0
*

@@ -4,0 +4,0 @@ * @license MUI X Commercial

@@ -17,3 +17,7 @@ "use strict";

*/
'annual',
/**
* TODO 2025 remove, legacy name of annual.
*/
'subscription'];
exports.LICENSING_MODELS = LICENSING_MODELS;

@@ -104,3 +104,3 @@ "use strict";

if (license.licensingModel == null || !_licensingModel.LICENSING_MODELS.includes(license.licensingModel)) {
console.error('Error checking license. Sales model not found or invalid!');
console.error('Error checking license. Licensing model not found or invalid!');
return _licenseStatus.LicenseStatus.Invalid;

@@ -120,3 +120,3 @@ }

}
} else if (license.licensingModel === 'subscription') {
} else if (license.licensingModel === 'subscription' || license.licensingModel === 'annual') {
if (license.expiryTimestamp < new Date().getTime()) {

@@ -123,0 +123,0 @@ return _licenseStatus.LicenseStatus.ExpiredAnnual;

{
"name": "@mui/x-license-pro",
"version": "6.9.0",
"version": "6.10.0",
"description": "MUI X License verification",

@@ -28,3 +28,3 @@ "author": "MUI Team",

"@babel/runtime": "^7.22.5",
"@mui/utils": "^5.13.1"
"@mui/utils": "^5.13.6"
},

@@ -31,0 +31,0 @@ "peerDependencies": {

@@ -1,2 +0,2 @@

export declare const LICENSING_MODELS: readonly ["perpetual", "subscription"];
export declare const LICENSING_MODELS: readonly ["perpetual", "annual", "subscription"];
export type LicensingModel = (typeof LICENSING_MODELS)[number];

@@ -11,2 +11,6 @@ export const LICENSING_MODELS = [

*/
'annual',
/**
* TODO 2025 remove, legacy name of annual.
*/
'subscription'];

@@ -97,3 +97,3 @@ import { base64Decode, base64Encode } from '../encoding/base64';

if (license.licensingModel == null || !LICENSING_MODELS.includes(license.licensingModel)) {
console.error('Error checking license. Sales model not found or invalid!');
console.error('Error checking license. Licensing model not found or invalid!');
return LicenseStatus.Invalid;

@@ -113,3 +113,3 @@ }

}
} else if (license.licensingModel === 'subscription') {
} else if (license.licensingModel === 'subscription' || license.licensingModel === 'annual') {
if (license.expiryTimestamp < new Date().getTime()) {

@@ -116,0 +116,0 @@ return LicenseStatus.ExpiredAnnual;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc