@nice2dev/licensing 1.1.7 → 1.1.10
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 +146 -0
- package/dist/index.cjs +74 -71
- package/dist/index.mjs +33 -30
- package/dist/{FeatureGate-9rvyns7j.cjs → marks-KVqpGsfU.cjs} +55 -0
- package/dist/{FeatureGate-cIgJ8Gq2.js → marks-KzIFNheE.js} +63 -8
- package/dist/react.cjs +20 -21
- package/dist/react.mjs +11 -12
- package/package.json +3 -5
- package/dist/FeatureGate-9rvyns7j.cjs.map +0 -1
- package/dist/FeatureGate-Cs1zphXs.cjs +0 -1405
- package/dist/FeatureGate-Cs1zphXs.cjs.map +0 -1
- package/dist/FeatureGate-Da7fCJA5.js +0 -1406
- package/dist/FeatureGate-Da7fCJA5.js.map +0 -1
- package/dist/FeatureGate-cIgJ8Gq2.js.map +0 -1
- package/dist/__vite-browser-external-2Ng8QIWW.js.map +0 -1
- package/dist/__vite-browser-external-DES75WN9.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/react.cjs.map +0 -1
- package/dist/react.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,151 @@
|
|
|
1
1
|
# @nice2dev/licensing
|
|
2
2
|
|
|
3
|
+
## 1.1.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The package description on npm shows a dash instead of the mis-encoded "—".
|
|
8
|
+
- 1.1.10 — the additive part of OmniVerk's 1.2.0 list: ui-audio builds without optional packages, one
|
|
9
|
+
i18n context, dictionaries per language, data props optional. No breaking changes.
|
|
10
|
+
|
|
11
|
+
**`@nice2dev/ui-audio` no longer breaks the consumer's build.** It imported `react-bootstrap`,
|
|
12
|
+
`recharts`, `react-window`, `react-youtube` and `pitchy` statically while declaring none of them
|
|
13
|
+
(only optional entries in `peerDependenciesMeta`), so a Vite app without them failed with "failed to
|
|
14
|
+
resolve import". Loading them with `import()` is no way out: Vite 8 (Rolldown) resolves dynamic
|
|
15
|
+
imports at build time and fails the same way, which made `hls.js` and `phaser` mandatory too.
|
|
16
|
+
`react-bootstrap`, `recharts`, `react-window` and `phaser` are now gone from the code
|
|
17
|
+
(`NiceBarFillEditor` uses Nice controls, `NiceVocalPerformanceReport` uses `NiceChart` /
|
|
18
|
+
`NicePieChart`, the karaoke editor list uses `NiceVirtualScroller`, `NiceKaraokePhaserRenderer`
|
|
19
|
+
renders with the DOM and keeps its name); `pitchy`, `react-youtube` and `hls.js` are regular
|
|
20
|
+
`dependencies`. Found on the way: in live mode the vocal performance report subtracted UltraStar note
|
|
21
|
+
numbers from MIDI pitch, so every singer got thousands of cents of deviation and 0 % accuracy — it now
|
|
22
|
+
compares pitch within the octave, as the scoring does; `NiceBarFillEditor` put a colour into a
|
|
23
|
+
percentage slider.
|
|
24
|
+
|
|
25
|
+
**Every package declares what its bundle imports.** A new CI gate checks every `import`, `import()`
|
|
26
|
+
and `require()` in the published `dist` against `dependencies` and non-optional `peerDependencies`.
|
|
27
|
+
To reach zero: `@nice2dev/licensing` no longer has `require('webpack')` in its main bundle (the webpack
|
|
28
|
+
plugin uses `compiler.webpack`; webpack 4 gets a warning instead of feature flags) and `react` is a
|
|
29
|
+
required peer; `@nice2dev/erp-adapter` lists `@microsoft/signalr` in `dependencies` (still loaded on
|
|
30
|
+
first use); `@nice2dev/icons-cursor` declares its `react-dom` peer; `@nice2dev/ui-printing` treats
|
|
31
|
+
`@nice2dev/ui` as a required peer.
|
|
32
|
+
|
|
33
|
+
**One copy of each package, one i18n context.** `@nice2dev/ui` carried its own copy of
|
|
34
|
+
`@nice2dev/ui-core` and `@nice2dev/i18n`, and `ui-forms`, `ui-api`, `ui-bi`, `ui-designers`, `ui-math`
|
|
35
|
+
and `ui-video` each carried a copy of all of `@nice2dev/ui` (about 4.4 MB each). Every copy had its own
|
|
36
|
+
React contexts: a `NiceI18nProvider` imported from `@nice2dev/i18n` did not reach the controls of
|
|
37
|
+
`@nice2dev/ui`, which kept their English defaults and `lang` `'en'`, and the dictionaries ended up in
|
|
38
|
+
an app several times. These packages now import `@nice2dev/*` instead (`ui-forms` 4.4 MB → 82 kB).
|
|
39
|
+
Keep every `@nice2dev/*` package on the same version.
|
|
40
|
+
|
|
41
|
+
**Dictionaries per language.** `NiceI18nLazyProvider` takes the same props as `NiceI18nProvider`
|
|
42
|
+
(`t`, `lang`, `overrides`, plus `fallback` and `onError`) but loads only the active language's
|
|
43
|
+
dictionary, with `import()`; until it arrives the controls show their built-in English (or
|
|
44
|
+
`fallback`), and with `t` nothing is loaded at all. Also `loadNiceDictionary(lang)`, to start in a
|
|
45
|
+
language without a flash of English, and `getLoadedNiceDictionary(lang)`. Exported from
|
|
46
|
+
`@nice2dev/i18n`, `@nice2dev/ui-core` and `@nice2dev/ui`; in the `i18n` build every language is its own
|
|
47
|
+
file. `NiceI18nProvider` and `NICE_I18N_DICTIONARIES` are unchanged and still bring all 30 dictionaries.
|
|
48
|
+
`NiceTestWrapper` (ui-core) and `NiceShowcase` (ui) use the lazy provider now, so they no longer pull
|
|
49
|
+
every dictionary into the apps that bundle them.
|
|
50
|
+
|
|
51
|
+
**Data props are optional.** These controls threw a `TypeError` without data and now render empty:
|
|
52
|
+
`NiceTreeView.nodes`, `NiceAccordion.items`, `NiceCascadeSelect.options`, `NiceAutocomplete.options`,
|
|
53
|
+
`NiceAuditLog.entries`, `NiceDocumentVersionList.versions`, `NicePermissionMatrix.roles` / `actions`,
|
|
54
|
+
`WizardStep.content`, `NiceDiagramViewer.document`, `NiceOrgChartVisualizer.data`,
|
|
55
|
+
`NiceSpatialViewer.document`, and in `@nice2dev/events` the lists of `NiceGiftRegistry`,
|
|
56
|
+
`NiceParticipantList`, `NiceExpenseSplit`, `NiceSeatingChart`, `NiceMediaCollage` and `NiceEventMedia`.
|
|
57
|
+
`NiceMap` without `center` centres on its markers (the whole world without markers), `NiceCountdown`
|
|
58
|
+
without `targetDate` shows zero and never calls `onComplete`, `NiceChat` without `onSend` is read-only
|
|
59
|
+
(no input), and `NiceInvitationDesigner` gains `defaultTemplate`. A CI ratchet counts the required
|
|
60
|
+
array props that remain.
|
|
61
|
+
|
|
62
|
+
**Smaller fixes.** `NicePieChart` draws a 100 % slice as a full circle instead of nothing. In
|
|
63
|
+
development `NiceThemeProvider` warns when `--nice-primary` / `--nice-color-primary` (or another linked
|
|
64
|
+
pair) resolves to nothing on `:root` — usually an alias cycle in the app's CSS; the theming guides say
|
|
65
|
+
which side to set. `@nice2dev/game-engine` exports `createAnimationClip`, `AnimatorController` and
|
|
66
|
+
`createAnimatorController` (two modules exported each name, so `export *` dropped all three); the other
|
|
67
|
+
implementations are `StateMachineAnimatorController`, `createStateMachineAnimatorController`,
|
|
68
|
+
`createTimelineAnimationClip` and `createRetargetingAnimationClip`.
|
|
69
|
+
|
|
70
|
+
Nothing was renamed or removed.
|
|
71
|
+
|
|
72
|
+
## 1.1.9
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- 1.1.9 — themes reach the controls again, every control has a rendered demo, no breaking changes.
|
|
77
|
+
|
|
78
|
+
**Theming.** `NiceThemeProvider`, `applyTheme` and `NiceThemePreview` write the `--nice-*` tokens
|
|
79
|
+
again, so a theme recolours the controls and not only the app's own CSS — since 1.1.7 only
|
|
80
|
+
light/dark switched. The provider's scope wins over values set on `:root`, as it did before 1.1.7:
|
|
81
|
+
put a brand colour into the theme rather than on `<html>`. Alias tokens are computed in the theme
|
|
82
|
+
scope, not only on `:root`. About 1,600 places that used a text token as a background or border, or
|
|
83
|
+
a surface token as text colour, now use the token of the right role. `--nice-warning-light` and
|
|
84
|
+
`--nice-danger-light` are the light shade of the status colour, like `--nice-success-light`
|
|
85
|
+
(new: `--nice-color-warning-light`, `--nice-color-error-light`); backgrounds use `--nice-*-bg`.
|
|
86
|
+
|
|
87
|
+
**Styles that never shipped.** Six stylesheets in `@nice2dev/ui` were unreachable from its entry
|
|
88
|
+
point, so `NiceLiveDataGrid`, `NiceTaskInbox`, `NiceBPMNDesigner`, `NiceInstanceMonitor`,
|
|
89
|
+
`NiceIntegrationHub`, `NiceRulesEngine` and `NiceVideoEditor` rendered unstyled; eleven more
|
|
90
|
+
components had no stylesheet at all; `workflow.css` read its spacing scale as pixels; and
|
|
91
|
+
`NiceModuleGrid` was styled for a `<table>` it does not render.
|
|
92
|
+
|
|
93
|
+
**Language.** `useNiceTranslation()` returns `{ t, lang }` and dates are formatted in the interface
|
|
94
|
+
language rather than the browser's (`ui-presentations` adds `useNiceLang()`). `NiceInvoiceLineEditor`
|
|
95
|
+
takes its currency and units from the active language unless you pass them. `NiceAuditLog`,
|
|
96
|
+
`NiceRecordingPanel`, the four game-engine editors and `NiceTemplateEditor` are translated, the
|
|
97
|
+
game-engine dictionary is actually registered, and 136 ui-audio strings have English defaults
|
|
98
|
+
instead of rendering raw keys.
|
|
99
|
+
|
|
100
|
+
**Canvas and document colours.** Canvas never resolves `var()`: the QR and barcode generators drew a
|
|
101
|
+
black rectangle, the whiteboard lost its colours and light presets parsed to `NaN`. Data colours are
|
|
102
|
+
resolved first now. Colours stored in documents — slide templates, theme presets, brand kits,
|
|
103
|
+
exports — are literals, so a saved document looks the same in every theme.
|
|
104
|
+
|
|
105
|
+
**Fixes found by the new demos.** All 895 controls now have a rendered showcase demo, and roughly
|
|
106
|
+
every third new demo exposed a bug. `ui-platform`: the service worker re-registered on every
|
|
107
|
+
render, a screen permission prompt appeared on mount, reconnects and start-up tasks ran twice,
|
|
108
|
+
valid EAN-13 codes were rejected. `ui-ai`: `createProviderFromConfig` dropped the endpoint path —
|
|
109
|
+
OpenAI, Anthropic and Groq were called without `/v1` and Azure always threw — and the theme
|
|
110
|
+
generator failed on every request. `ui-communication`: the local participant appeared twice in a
|
|
111
|
+
conference and `activeConversationId` was ignored. `ui-buildings`: automation days were saved as
|
|
112
|
+
indices (both forms are read now), the row toggle changed the selected rule instead of the clicked
|
|
113
|
+
one, and floor-plan devices were drawn in the corner. `ui-mobile`: `NiceTouchTable` rendered invalid
|
|
114
|
+
table markup. `ui-diagrams`: arrowheads grew with the stroke width and transition clicks never fired.
|
|
115
|
+
`ui-3d`: opening a code editor before the 3D view broke the whole app. `ui-presentations`: the editor
|
|
116
|
+
clipped slides in columns narrower than 800 px.
|
|
117
|
+
|
|
118
|
+
**Additive API only.** `@nice2dev/ui-platform` now exports its hooks, provider aliases and Props / Ref
|
|
119
|
+
types. Nothing was renamed or removed.
|
|
120
|
+
|
|
121
|
+
## 1.1.8
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- 1.1.8 — old problems closed, no breaking changes.
|
|
126
|
+
|
|
127
|
+
**English-first UI.** Text that was hardcoded Polish now goes through `t()` with an English
|
|
128
|
+
default: the planning views, the whole of `@nice2dev/ui-printing`, smart home, backup, the
|
|
129
|
+
navigation and settings panels, `@nice2dev/ui-buildings` end to end, the photo editor and the
|
|
130
|
+
presentation Q&A panel. The dictionary gains 566 keys in en, pl, de, fr, es and uk, so an app
|
|
131
|
+
with `locale="pl"` reads as before. Three prop defaults changed with it:
|
|
132
|
+
`NiceInvoiceLineEditor` (`currencySymbol` `'zł'` → `'$'`, `units` → English) and
|
|
133
|
+
`NiceTimeoutFeedback`'s two messages.
|
|
134
|
+
|
|
135
|
+
**Icons.** No emoji, unicode glyphs or inline `<svg>` are used as icons any more — not in JSX,
|
|
136
|
+
not in `icon:` data fields, not on canvas. Ten icons in `icons-business` / `icons-education`
|
|
137
|
+
that drew their artwork as `<text>` use paths now, and the behaviour-tree palette names resolve
|
|
138
|
+
to real `NiceIcon` builtins (`shield` and `repeat` are new; 176 in total).
|
|
139
|
+
|
|
140
|
+
**Fixes.** The shadcn adapter reads the host's `--primary` / `--accent` again instead of
|
|
141
|
+
producing invalid `hsl(#hex)`; `ui-diagrams` ships the 21 translation keys its components were
|
|
142
|
+
already asking for; `--nice-font-size-2xl` is declared; `NiceScheduler` warns in development
|
|
143
|
+
when it ignores a `currentDate`, `view` or `events` change; `ui-buildings` typechecks clean and
|
|
144
|
+
`DeviceProtocol` accepts `'mqtt'`.
|
|
145
|
+
|
|
146
|
+
**Docs.** `doc.json` no longer lists CSS variables no component implements; eleven components
|
|
147
|
+
document the tokens their stylesheets really read.
|
|
148
|
+
|
|
3
149
|
## 1.1.7
|
|
4
150
|
|
|
5
151
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const marks = require("./marks-KVqpGsfU.cjs");
|
|
4
4
|
const jsxRuntime = require("react/jsx-runtime");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const HEARTBEAT_INTERVAL_MS = 5 * 60 * 1e3;
|
|
@@ -13,7 +13,7 @@ class SeatManager {
|
|
|
13
13
|
* Acquire a seat for the current user
|
|
14
14
|
*/
|
|
15
15
|
async acquireSeat(licenseKey, userId, displayName, email) {
|
|
16
|
-
const machineId = await
|
|
16
|
+
const machineId = await marks.generateMachineId();
|
|
17
17
|
try {
|
|
18
18
|
const response = await fetch(`${this.serverUrl}/seats/acquire`, {
|
|
19
19
|
method: "POST",
|
|
@@ -188,7 +188,7 @@ class FloatingLicenseManager {
|
|
|
188
188
|
* Acquire a floating license
|
|
189
189
|
*/
|
|
190
190
|
async acquireLease(licenseKey) {
|
|
191
|
-
const machineId = await
|
|
191
|
+
const machineId = await marks.generateMachineId();
|
|
192
192
|
try {
|
|
193
193
|
const response = await fetch(`${this.serverUrl}/floating/acquire`, {
|
|
194
194
|
method: "POST",
|
|
@@ -1814,8 +1814,8 @@ function useActivationWizard(config) {
|
|
|
1814
1814
|
}));
|
|
1815
1815
|
return;
|
|
1816
1816
|
}
|
|
1817
|
-
const fingerprintData = await
|
|
1818
|
-
const machineId = await
|
|
1817
|
+
const fingerprintData = await marks.generateFingerprint();
|
|
1818
|
+
const machineId = await marks.generateMachineId();
|
|
1819
1819
|
const machineName = state.machineName || await getDefaultMachineName();
|
|
1820
1820
|
setState((s) => ({
|
|
1821
1821
|
...s,
|
|
@@ -1890,7 +1890,7 @@ function useActivationWizard(config) {
|
|
|
1890
1890
|
return;
|
|
1891
1891
|
}
|
|
1892
1892
|
try {
|
|
1893
|
-
const machineId = state.machineId || await
|
|
1893
|
+
const machineId = state.machineId || await marks.generateMachineId();
|
|
1894
1894
|
const challenge = await service.getOfflineChallenge(state.licenseKey, machineId);
|
|
1895
1895
|
setState((s) => ({
|
|
1896
1896
|
...s,
|
|
@@ -1996,7 +1996,7 @@ const StepIndicator = ({ currentStep }) => {
|
|
|
1996
1996
|
"div",
|
|
1997
1997
|
{
|
|
1998
1998
|
className: `w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${index < currentIndex ? "bg-green-500 text-white" : index === currentIndex ? "bg-blue-500 text-white" : "bg-gray-200 text-gray-500"}`,
|
|
1999
|
-
children: index < currentIndex ? "
|
|
1999
|
+
children: index < currentIndex ? /* @__PURE__ */ jsxRuntime.jsx(marks.CheckMark, { style: { margin: "0 0 0.15em" } }) : index + 1
|
|
2000
2000
|
}
|
|
2001
2001
|
),
|
|
2002
2002
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs mt-1 text-gray-500", children: step.label })
|
|
@@ -2037,7 +2037,7 @@ const ActivationWizard = (props) => {
|
|
|
2037
2037
|
state.step !== "error" && /* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { currentStep: state.step }),
|
|
2038
2038
|
state.step === "error" && state.error && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2039
2039
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-red-50 border border-red-200 rounded-lg p-6 text-center", children: [
|
|
2040
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-red-500 text-4xl mb-3", children: "
|
|
2040
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-red-500 text-4xl mb-3 font-bold", "aria-hidden": "true", children: "!" }),
|
|
2041
2041
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-red-800", children: "Activation Failed" }),
|
|
2042
2042
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-red-600 mt-2", children: state.error.message }),
|
|
2043
2043
|
state.error.supportRequired && config.supportEmail && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-gray-600 mt-4", children: [
|
|
@@ -2213,7 +2213,7 @@ const ActivationWizard = (props) => {
|
|
|
2213
2213
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-500 mt-2", children: "Please wait while we activate your license" })
|
|
2214
2214
|
] }),
|
|
2215
2215
|
state.step === "success" && state.activatedLicense && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-6", children: [
|
|
2216
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-green-500 text-6xl", children:
|
|
2216
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-green-500 text-6xl", children: /* @__PURE__ */ jsxRuntime.jsx(marks.CheckMark, {}) }),
|
|
2217
2217
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2218
2218
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-gray-900", children: "License Activated!" }),
|
|
2219
2219
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600 mt-2", children: "Your license has been successfully activated on this machine." })
|
|
@@ -2640,15 +2640,12 @@ const LicenseTransfer = (props) => {
|
|
|
2640
2640
|
{
|
|
2641
2641
|
className: `mt-2 text-sm ${recipientValidation.valid ? "text-green-600" : "text-red-600"}`,
|
|
2642
2642
|
children: [
|
|
2643
|
-
recipientValidation.valid ? "
|
|
2643
|
+
recipientValidation.valid ? "Valid recipient" : "Invalid recipient",
|
|
2644
2644
|
recipientValidation.isExternal && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-orange-600", children: "(External organization)" })
|
|
2645
2645
|
]
|
|
2646
2646
|
}
|
|
2647
2647
|
),
|
|
2648
|
-
(_a = recipientValidation == null ? void 0 : recipientValidation.warnings) == null ? void 0 : _a.map((warning, i) => /* @__PURE__ */ jsxRuntime.
|
|
2649
|
-
"⚠ ",
|
|
2650
|
-
warning
|
|
2651
|
-
] }, i))
|
|
2648
|
+
(_a = recipientValidation == null ? void 0 : recipientValidation.warnings) == null ? void 0 : _a.map((warning, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-sm text-orange-600", children: warning }, i))
|
|
2652
2649
|
] }),
|
|
2653
2650
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2654
2651
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Recipient Name" }),
|
|
@@ -2734,7 +2731,7 @@ const LicenseTransfer = (props) => {
|
|
|
2734
2731
|
] })
|
|
2735
2732
|
] }),
|
|
2736
2733
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 bg-orange-50 border border-orange-200 rounded-lg", children: [
|
|
2737
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-orange-800 mb-2", children: "
|
|
2734
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-orange-800 mb-2", children: "Important" }),
|
|
2738
2735
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-orange-700", children: "Once the transfer is completed, this license will be deactivated from all your machines and the new owner will need to activate it." })
|
|
2739
2736
|
] }),
|
|
2740
2737
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-start gap-3 cursor-pointer", children: [
|
|
@@ -2775,7 +2772,7 @@ const LicenseTransfer = (props) => {
|
|
|
2775
2772
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-500", children: "Please wait while we process your transfer request" })
|
|
2776
2773
|
] }),
|
|
2777
2774
|
step === "complete" && transfer && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-6", children: [
|
|
2778
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-green-500 text-6xl", children:
|
|
2775
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-green-500 text-6xl", children: /* @__PURE__ */ jsxRuntime.jsx(marks.CheckMark, {}) }),
|
|
2779
2776
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2780
2777
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold", children: "Transfer Initiated" }),
|
|
2781
2778
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600 mt-2", children: transfer.approvalRequired ? "Your transfer request has been submitted for approval." : "An email has been sent to the recipient with instructions to accept the transfer." })
|
|
@@ -3331,7 +3328,7 @@ const UsageAnalyticsDashboard = (props) => {
|
|
|
3331
3328
|
onClick: () => refresh(),
|
|
3332
3329
|
className: "p-2 text-gray-500 hover:text-gray-700 rounded-lg hover:bg-gray-100",
|
|
3333
3330
|
title: "Refresh",
|
|
3334
|
-
children:
|
|
3331
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(marks.RefreshMark, {})
|
|
3335
3332
|
}
|
|
3336
3333
|
),
|
|
3337
3334
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3614,10 +3611,10 @@ class BuildLicenseValidator {
|
|
|
3614
3611
|
const prefix = "[nice2dev/license]";
|
|
3615
3612
|
switch (type) {
|
|
3616
3613
|
case "warn":
|
|
3617
|
-
console.warn(`${prefix}
|
|
3614
|
+
console.warn(`${prefix} warning: ${message}`);
|
|
3618
3615
|
break;
|
|
3619
3616
|
case "error":
|
|
3620
|
-
console.error(`${prefix}
|
|
3617
|
+
console.error(`${prefix} error: ${message}`);
|
|
3621
3618
|
break;
|
|
3622
3619
|
default:
|
|
3623
3620
|
console.log(`${prefix} ${message}`);
|
|
@@ -3712,12 +3709,12 @@ class BuildLicenseValidator {
|
|
|
3712
3709
|
this.validationResult = result;
|
|
3713
3710
|
return result;
|
|
3714
3711
|
}
|
|
3715
|
-
if (!
|
|
3712
|
+
if (!marks.validateKeyFormat(licenseKey)) {
|
|
3716
3713
|
result.errors.push("Invalid license key format.");
|
|
3717
3714
|
this.validationResult = result;
|
|
3718
3715
|
return result;
|
|
3719
3716
|
}
|
|
3720
|
-
const metadata =
|
|
3717
|
+
const metadata = marks.extractKeyMetadata(licenseKey);
|
|
3721
3718
|
result.licenseKey = licenseKey;
|
|
3722
3719
|
result.tier = metadata == null ? void 0 : metadata.tier;
|
|
3723
3720
|
let license = await this.validateOnline(licenseKey);
|
|
@@ -3731,7 +3728,7 @@ class BuildLicenseValidator {
|
|
|
3731
3728
|
this.log("Could not validate license online, using key metadata.", "warn");
|
|
3732
3729
|
result.warnings.push("License could not be validated online.");
|
|
3733
3730
|
if (this.config.requiredTier && (metadata == null ? void 0 : metadata.tier)) {
|
|
3734
|
-
if (!
|
|
3731
|
+
if (!marks.tierMeetsRequirement(metadata.tier, this.config.requiredTier)) {
|
|
3735
3732
|
result.errors.push(
|
|
3736
3733
|
`License tier "${metadata.tier}" does not meet required tier "${this.config.requiredTier}".`
|
|
3737
3734
|
);
|
|
@@ -3769,7 +3766,7 @@ class BuildLicenseValidator {
|
|
|
3769
3766
|
}
|
|
3770
3767
|
}
|
|
3771
3768
|
if (this.config.requiredTier) {
|
|
3772
|
-
if (!
|
|
3769
|
+
if (!marks.tierMeetsRequirement(license.tier, this.config.requiredTier)) {
|
|
3773
3770
|
result.errors.push(
|
|
3774
3771
|
`License tier "${license.tier}" does not meet required tier "${this.config.requiredTier}".`
|
|
3775
3772
|
);
|
|
@@ -3807,7 +3804,7 @@ class BuildLicenseValidator {
|
|
|
3807
3804
|
}
|
|
3808
3805
|
/** Check if tier meets requirement */
|
|
3809
3806
|
meetsTier(requiredTier) {
|
|
3810
|
-
return this.licenseInfo ?
|
|
3807
|
+
return this.licenseInfo ? marks.tierMeetsRequirement(this.licenseInfo.tier, requiredTier) : false;
|
|
3811
3808
|
}
|
|
3812
3809
|
}
|
|
3813
3810
|
class Nice2DevLicenseWebpackPlugin {
|
|
@@ -3823,15 +3820,21 @@ class Nice2DevLicenseWebpackPlugin {
|
|
|
3823
3820
|
}
|
|
3824
3821
|
const result = await this.validator.validate();
|
|
3825
3822
|
this.validated = true;
|
|
3826
|
-
result.warnings.forEach((w) => console.warn(`[nice2dev]
|
|
3823
|
+
result.warnings.forEach((w) => console.warn(`[nice2dev] warning: ${w}`));
|
|
3827
3824
|
if (result.errors.length > 0 && this.options.failOnInvalid !== false) {
|
|
3828
|
-
result.errors.forEach((e) => console.error(`[nice2dev]
|
|
3825
|
+
result.errors.forEach((e) => console.error(`[nice2dev] error: ${e}`));
|
|
3829
3826
|
throw new Error("License validation failed");
|
|
3830
3827
|
}
|
|
3831
3828
|
});
|
|
3832
3829
|
compiler.hooks.compilation.tap("Nice2DevLicensePlugin", (_compilation) => {
|
|
3833
3830
|
var _a, _b;
|
|
3834
|
-
const DefinePlugin = (
|
|
3831
|
+
const DefinePlugin = (_a = compiler.webpack) == null ? void 0 : _a.DefinePlugin;
|
|
3832
|
+
if (!DefinePlugin) {
|
|
3833
|
+
console.warn(
|
|
3834
|
+
"[Nice2DevLicensePlugin] compiler.webpack is missing (webpack < 5): license feature flags are not defined."
|
|
3835
|
+
);
|
|
3836
|
+
return;
|
|
3837
|
+
}
|
|
3835
3838
|
const license = this.validator.getLicenseInfo();
|
|
3836
3839
|
new DefinePlugin({
|
|
3837
3840
|
"process.env.NICE2DEV_LICENSE_VALID": JSON.stringify(
|
|
@@ -3941,7 +3944,7 @@ class CIOutputFormatter {
|
|
|
3941
3944
|
if (this.outputFormat === "json") {
|
|
3942
3945
|
return;
|
|
3943
3946
|
}
|
|
3944
|
-
console.log(
|
|
3947
|
+
console.log(`info: ${message}`);
|
|
3945
3948
|
}
|
|
3946
3949
|
success(message) {
|
|
3947
3950
|
if (this.outputFormat === "json") {
|
|
@@ -3955,7 +3958,7 @@ class CIOutputFormatter {
|
|
|
3955
3958
|
console.log(`##[section]${message}`);
|
|
3956
3959
|
break;
|
|
3957
3960
|
default:
|
|
3958
|
-
console.log(
|
|
3961
|
+
console.log(`ok: ${message}`);
|
|
3959
3962
|
}
|
|
3960
3963
|
}
|
|
3961
3964
|
warning(message) {
|
|
@@ -3973,7 +3976,7 @@ class CIOutputFormatter {
|
|
|
3973
3976
|
console.warn(`\x1B[33mWarning: ${message}\x1B[0m`);
|
|
3974
3977
|
break;
|
|
3975
3978
|
default:
|
|
3976
|
-
console.warn(
|
|
3979
|
+
console.warn(`warning: ${message}`);
|
|
3977
3980
|
}
|
|
3978
3981
|
}
|
|
3979
3982
|
error(message) {
|
|
@@ -3991,7 +3994,7 @@ class CIOutputFormatter {
|
|
|
3991
3994
|
console.error(`\x1B[31mError: ${message}\x1B[0m`);
|
|
3992
3995
|
break;
|
|
3993
3996
|
default:
|
|
3994
|
-
console.error(
|
|
3997
|
+
console.error(`error: ${message}`);
|
|
3995
3998
|
}
|
|
3996
3999
|
}
|
|
3997
4000
|
setOutput(name, value) {
|
|
@@ -4091,7 +4094,7 @@ async function runCILicenseCheck(options = {}) {
|
|
|
4091
4094
|
return result;
|
|
4092
4095
|
}
|
|
4093
4096
|
formatter.info(`Validating license: ${licenseKey.substring(0, 12)}...`);
|
|
4094
|
-
if (!
|
|
4097
|
+
if (!marks.validateKeyFormat(licenseKey)) {
|
|
4095
4098
|
const error = "Invalid license key format";
|
|
4096
4099
|
formatter.error(error);
|
|
4097
4100
|
result.errors.push(error);
|
|
@@ -4099,7 +4102,7 @@ async function runCILicenseCheck(options = {}) {
|
|
|
4099
4102
|
result.exitCode = 1;
|
|
4100
4103
|
return result;
|
|
4101
4104
|
}
|
|
4102
|
-
const metadata =
|
|
4105
|
+
const metadata = marks.extractKeyMetadata(licenseKey);
|
|
4103
4106
|
const license = {
|
|
4104
4107
|
key: licenseKey,
|
|
4105
4108
|
tier: (metadata == null ? void 0 : metadata.tier) || "trial",
|
|
@@ -4152,7 +4155,7 @@ async function runCILicenseCheck(options = {}) {
|
|
|
4152
4155
|
}
|
|
4153
4156
|
}
|
|
4154
4157
|
if (options.requiredTier) {
|
|
4155
|
-
if (!
|
|
4158
|
+
if (!marks.tierMeetsRequirement(license.tier, options.requiredTier)) {
|
|
4156
4159
|
const error = `License tier "${license.tier}" does not meet required tier "${options.requiredTier}"`;
|
|
4157
4160
|
formatter.error(error);
|
|
4158
4161
|
result.errors.push(error);
|
|
@@ -4254,43 +4257,43 @@ license-check:
|
|
|
4254
4257
|
`;
|
|
4255
4258
|
}
|
|
4256
4259
|
const VERSION = "1.1.0";
|
|
4257
|
-
exports.LicenseValidator =
|
|
4258
|
-
exports.checkFeatureAccess =
|
|
4259
|
-
exports.collectFingerprintData =
|
|
4260
|
-
exports.compareFingerprintsData =
|
|
4261
|
-
exports.compareTiers =
|
|
4262
|
-
exports.extractKeyMetadata =
|
|
4263
|
-
exports.generateFingerprint =
|
|
4264
|
-
exports.generateLicenseInfo =
|
|
4265
|
-
exports.generateLicenseKey =
|
|
4266
|
-
exports.generateMachineId =
|
|
4267
|
-
exports.getAllFeatures =
|
|
4268
|
-
exports.getAllPlans =
|
|
4269
|
-
exports.getAvailableFeatures =
|
|
4270
|
-
exports.getDefaultFeatures =
|
|
4271
|
-
exports.getDefaultMachines =
|
|
4272
|
-
exports.getDefaultSeats =
|
|
4273
|
-
exports.getFeature =
|
|
4274
|
-
exports.getFeaturesByCategory =
|
|
4275
|
-
exports.getMissingFeatures =
|
|
4276
|
-
exports.getOrGenerateFingerprint =
|
|
4277
|
-
exports.getPlan =
|
|
4278
|
-
exports.getStoredFingerprint =
|
|
4279
|
-
exports.getValidator =
|
|
4280
|
-
exports.hasFeature =
|
|
4281
|
-
exports.hasTier =
|
|
4282
|
-
exports.initializeDefaults =
|
|
4283
|
-
exports.isFeatureLicensed =
|
|
4284
|
-
exports.maskLicenseKey =
|
|
4285
|
-
exports.normalizeLicenseKey =
|
|
4286
|
-
exports.registerFeature =
|
|
4287
|
-
exports.registerFeatures =
|
|
4288
|
-
exports.registerPlan =
|
|
4289
|
-
exports.registerPlans =
|
|
4290
|
-
exports.storeFingerprint =
|
|
4291
|
-
exports.tierMeetsRequirement =
|
|
4292
|
-
exports.validateKeyFormat =
|
|
4293
|
-
exports.validateLicense =
|
|
4260
|
+
exports.LicenseValidator = marks.LicenseValidator;
|
|
4261
|
+
exports.checkFeatureAccess = marks.checkFeatureAccess;
|
|
4262
|
+
exports.collectFingerprintData = marks.collectFingerprintData;
|
|
4263
|
+
exports.compareFingerprintsData = marks.compareFingerprintsData;
|
|
4264
|
+
exports.compareTiers = marks.compareTiers;
|
|
4265
|
+
exports.extractKeyMetadata = marks.extractKeyMetadata;
|
|
4266
|
+
exports.generateFingerprint = marks.generateFingerprint;
|
|
4267
|
+
exports.generateLicenseInfo = marks.generateLicenseInfo;
|
|
4268
|
+
exports.generateLicenseKey = marks.generateLicenseKey;
|
|
4269
|
+
exports.generateMachineId = marks.generateMachineId;
|
|
4270
|
+
exports.getAllFeatures = marks.getAllFeatures;
|
|
4271
|
+
exports.getAllPlans = marks.getAllPlans;
|
|
4272
|
+
exports.getAvailableFeatures = marks.getAvailableFeatures;
|
|
4273
|
+
exports.getDefaultFeatures = marks.getDefaultFeatures;
|
|
4274
|
+
exports.getDefaultMachines = marks.getDefaultMachines;
|
|
4275
|
+
exports.getDefaultSeats = marks.getDefaultSeats;
|
|
4276
|
+
exports.getFeature = marks.getFeature;
|
|
4277
|
+
exports.getFeaturesByCategory = marks.getFeaturesByCategory;
|
|
4278
|
+
exports.getMissingFeatures = marks.getMissingFeatures;
|
|
4279
|
+
exports.getOrGenerateFingerprint = marks.getOrGenerateFingerprint;
|
|
4280
|
+
exports.getPlan = marks.getPlan;
|
|
4281
|
+
exports.getStoredFingerprint = marks.getStoredFingerprint;
|
|
4282
|
+
exports.getValidator = marks.getValidator;
|
|
4283
|
+
exports.hasFeature = marks.hasFeature;
|
|
4284
|
+
exports.hasTier = marks.hasTier;
|
|
4285
|
+
exports.initializeDefaults = marks.initializeDefaults;
|
|
4286
|
+
exports.isFeatureLicensed = marks.isFeatureLicensed;
|
|
4287
|
+
exports.maskLicenseKey = marks.maskLicenseKey;
|
|
4288
|
+
exports.normalizeLicenseKey = marks.normalizeLicenseKey;
|
|
4289
|
+
exports.registerFeature = marks.registerFeature;
|
|
4290
|
+
exports.registerFeatures = marks.registerFeatures;
|
|
4291
|
+
exports.registerPlan = marks.registerPlan;
|
|
4292
|
+
exports.registerPlans = marks.registerPlans;
|
|
4293
|
+
exports.storeFingerprint = marks.storeFingerprint;
|
|
4294
|
+
exports.tierMeetsRequirement = marks.tierMeetsRequirement;
|
|
4295
|
+
exports.validateKeyFormat = marks.validateKeyFormat;
|
|
4296
|
+
exports.validateLicense = marks.validateLicense;
|
|
4294
4297
|
exports.ActivationService = ActivationService;
|
|
4295
4298
|
exports.ActivationWizard = ActivationWizard;
|
|
4296
4299
|
exports.ApiRateLimiter = ApiRateLimiter;
|