License: Add new licensing mechanism#33206
Open
ajivanyandev wants to merge 51 commits intoDevExpress:26_1from
Open
License: Add new licensing mechanism#33206ajivanyandev wants to merge 51 commits intoDevExpress:26_1from
ajivanyandev wants to merge 51 commits intoDevExpress:26_1from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new DevExtreme licensing mechanism, adding a devextreme-license CLI and bundler plugin support to inject a generated license key into DevExtreme’s internal config during builds. It also adds a new LCP (product-only) key validation path and updates license warning/reporting behavior.
Changes:
- Add
devextreme-licenseCLI + supporting Node-side license key discovery/conversion utilities (LCX → LCP). - Add an
unplugin-based bundler plugin to replace a license-key placeholder inm_configat build time. - Add LCP key parsing/validation logic (product-kind bit flags, expiration checks) and update license warnings/tests.
Reviewed changes
Copilot reviewed 26 out of 28 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Locks unplugin@3.0.0 and related dependency snapshot updates. |
| packages/devextreme/package.json | Adds unplugin dependency and registers devextreme-license as an npm binary. |
| packages/devextreme/license/messages.js | Adds CLI/plugin message templates for licensing guidance. |
| packages/devextreme/license/dx-lcx-2-lcp.js | Implements LCX → LCP conversion + LCP parsing helpers (Node-side). |
| packages/devextreme/license/dx-get-lcx.js | Adds environment/file-based LCX key discovery logic (Node-side). |
| packages/devextreme/license/devextreme-license.js | Adds devextreme-license CLI for generating/printing an LCP key and updating .gitignore. |
| packages/devextreme/license/devextreme-license-plugin.js | Adds unplugin plugin to patch m_config license placeholder during bundling. |
| packages/devextreme/license/devextreme-license-plugin.d.ts | Type declaration for the bundler plugin export. |
| packages/devextreme/js/__internal/core/m_config.ts | Adds licenseKey default placeholder in global config. |
| packages/devextreme/js/__internal/core/license/types.ts | Extends token/error types and adds exported error token constants + warning metadata types. |
| packages/devextreme/js/__internal/core/license/rsa_bigint.ts | Refactors RSA bigint helpers to reuse bigIntFromBytes. |
| packages/devextreme/js/__internal/core/license/license_warnings.ts | Adds centralized console warning templates + logger for license warning types. |
| packages/devextreme/js/__internal/core/license/license_validation.ts | Switches parsing to LCP validation path and changes warning/logging behavior. |
| packages/devextreme/js/__internal/core/license/license_validation.test.ts | Updates tests to assert new warning behavior and adds placeholder coverage. |
| packages/devextreme/js/__internal/core/license/lcp_key_validation/utils.ts | Adds shared helpers for LCP parsing (RSA XML parsing, bit flags, tick conversion, signature verify). |
| packages/devextreme/js/__internal/core/license/lcp_key_validation/types.ts | Defines product-kind bit flags for DevExpress products. |
| packages/devextreme/js/__internal/core/license/lcp_key_validation/product_info.ts | Adds product info model helpers and bitwise product checks. |
| packages/devextreme/js/__internal/core/license/lcp_key_validation/license_payload.test.ts | Adds payload-level tests for product-kind / version behavior. |
| packages/devextreme/js/__internal/core/license/lcp_key_validation/license_info.ts | Adds license info helpers (validity, expiration, latest DevExtreme version). |
| packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validator.ts | Implements LCP parsing/verification into internal Token representation. |
| packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts | Adds LCP validator tests (including signature bypass harness). |
| packages/devextreme/js/__internal/core/license/lcp_key_validation/const.ts | Adds LCP constants (signature prefix, decode map, RSA key XML). |
| packages/devextreme/js/__internal/core/license/key.ts | Removes internal-usage ID constant (legacy/internal token behavior). |
| packages/devextreme/js/__internal/core/license/const.ts | Consolidates licensing constants (links, placeholder, formatting values). |
| packages/devextreme/js/__internal/core/license/byte_utils.ts | Adds bigIntFromBytes utility function. |
| packages/devextreme/eslint.config.mjs | Adds license/* to ignore list. |
| packages/devextreme/build/npm-bin/devextreme-license.js | Adds npm bin wrapper to execute the CLI from the distributed package. |
| packages/devextreme/build/gulp/npm.js | Ensures license/** is copied into the npm distribution. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
packages/devextreme/js/__internal/core/license/license_validation.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/core/license/lcp_key_validation/lcp_key_validation.test.ts
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Arman Jivanyan <arman.jivanyan@devexpress.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.