@wf-controls/license 0.0.0-stage → 1.0.0
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/dist/index.d.ts +73 -0
- package/dist/index.js +143 -0
- package/dist/index.js.map +1 -0
- package/package.json +25 -4
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/** Offline license verification (WebCrypto) and feature gating. Token format: AAIRA-<h>.<p>.<sig> (License Studio). */
|
|
2
|
+
export type Edition = "free" | "pro" | "enterprise";
|
|
3
|
+
export type Alg = "EdDSA" | "ES256" | "PS256";
|
|
4
|
+
export interface LicensePayload {
|
|
5
|
+
v: number;
|
|
6
|
+
id: string;
|
|
7
|
+
customer: string;
|
|
8
|
+
tier: string;
|
|
9
|
+
seats: number;
|
|
10
|
+
apps?: string[];
|
|
11
|
+
issued: string;
|
|
12
|
+
updatesUntil: string;
|
|
13
|
+
}
|
|
14
|
+
/** Feature id -> lowest edition that includes it. */
|
|
15
|
+
export declare const FEATURES: {
|
|
16
|
+
readonly "core.basic": "free";
|
|
17
|
+
readonly "styles.theme.modern": "free";
|
|
18
|
+
readonly "extras.dualList": "pro";
|
|
19
|
+
readonly "extras.sqlWhereBuilder": "pro";
|
|
20
|
+
readonly "adapters.account": "pro";
|
|
21
|
+
readonly "styles.themes.all": "pro";
|
|
22
|
+
readonly "validation.async": "pro";
|
|
23
|
+
readonly "security.rbac": "enterprise";
|
|
24
|
+
readonly "security.sso": "enterprise";
|
|
25
|
+
readonly "styles.themeBuilder": "enterprise";
|
|
26
|
+
readonly "migration.engine": "enterprise";
|
|
27
|
+
};
|
|
28
|
+
export type FeatureId = keyof typeof FEATURES;
|
|
29
|
+
export declare function editionForTier(tier: string): Edition;
|
|
30
|
+
export type Reason = "none" | "malformed" | "unsupported-algorithm" | "no-public-key" | "bad-signature" | "expired" | "wrong-application" | "release-not-covered";
|
|
31
|
+
export interface LicenseState {
|
|
32
|
+
valid: boolean;
|
|
33
|
+
edition: Edition;
|
|
34
|
+
reason: Reason;
|
|
35
|
+
license?: LicensePayload;
|
|
36
|
+
trial: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare class LicenseError extends Error {
|
|
39
|
+
readonly feature: string;
|
|
40
|
+
readonly required: Edition;
|
|
41
|
+
constructor(feature: string, required: Edition, current: Edition);
|
|
42
|
+
}
|
|
43
|
+
export interface ActivateOptions {
|
|
44
|
+
releaseDate?: string | Date;
|
|
45
|
+
appName?: string;
|
|
46
|
+
now?: Date;
|
|
47
|
+
}
|
|
48
|
+
/** Release date of this build; bump on each release. */
|
|
49
|
+
export declare const RELEASE_DATE = "2026-11-20";
|
|
50
|
+
export declare class LicenseManager {
|
|
51
|
+
private keys;
|
|
52
|
+
private state;
|
|
53
|
+
private warned;
|
|
54
|
+
configure(o: {
|
|
55
|
+
publicKeys: JsonWebKey[];
|
|
56
|
+
replace?: boolean;
|
|
57
|
+
}): void;
|
|
58
|
+
/** Never throws; failures leave the free edition active. */
|
|
59
|
+
activate(token: string, o?: ActivateOptions): Promise<LicenseState>;
|
|
60
|
+
reset(): void;
|
|
61
|
+
get current(): LicenseState;
|
|
62
|
+
get edition(): Edition;
|
|
63
|
+
has(f: FeatureId): boolean;
|
|
64
|
+
assert(f: FeatureId): void;
|
|
65
|
+
/** Soft gate: false when unlicensed; warns once per feature. */
|
|
66
|
+
require(f: FeatureId, onUnlicensed?: (e: LicenseError) => void): boolean;
|
|
67
|
+
verify(token: string, o?: ActivateOptions): Promise<LicenseState>;
|
|
68
|
+
}
|
|
69
|
+
/** Shared singleton for all paid packages. */
|
|
70
|
+
export declare const License: LicenseManager;
|
|
71
|
+
export declare const setLicenseKey: (t: string, o?: ActivateOptions) => Promise<LicenseState>;
|
|
72
|
+
export declare const requireFeature: (f: FeatureId, cb?: (e: LicenseError) => void) => boolean;
|
|
73
|
+
export declare const assertFeature: (f: FeatureId) => void;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/** Offline license verification (WebCrypto) and feature gating. Token format: AAIRA-<h>.<p>.<sig> (License Studio). */
|
|
2
|
+
/** Feature id -> lowest edition that includes it. */
|
|
3
|
+
export const FEATURES = {
|
|
4
|
+
"core.basic": "free",
|
|
5
|
+
"styles.theme.modern": "free",
|
|
6
|
+
"extras.dualList": "pro",
|
|
7
|
+
"extras.sqlWhereBuilder": "pro",
|
|
8
|
+
"adapters.account": "pro",
|
|
9
|
+
"styles.themes.all": "pro",
|
|
10
|
+
"validation.async": "pro",
|
|
11
|
+
"security.rbac": "enterprise",
|
|
12
|
+
"security.sso": "enterprise",
|
|
13
|
+
"styles.themeBuilder": "enterprise",
|
|
14
|
+
"migration.engine": "enterprise",
|
|
15
|
+
};
|
|
16
|
+
const RANK = { free: 0, pro: 1, enterprise: 2 };
|
|
17
|
+
export function editionForTier(tier) {
|
|
18
|
+
if (tier === "enterprise")
|
|
19
|
+
return "enterprise";
|
|
20
|
+
return tier === "professional" || tier === "application" || tier === "trial" ? "pro" : "free";
|
|
21
|
+
}
|
|
22
|
+
export class LicenseError extends Error {
|
|
23
|
+
feature;
|
|
24
|
+
required;
|
|
25
|
+
constructor(feature, required, current) {
|
|
26
|
+
super(`Feature "${feature}" requires the ${required} edition (current: ${current}). Call License.activate(token).`);
|
|
27
|
+
this.feature = feature;
|
|
28
|
+
this.required = required;
|
|
29
|
+
this.name = "LicenseError";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** Release date of this build; bump on each release. */
|
|
33
|
+
export const RELEASE_DATE = "2026-11-20";
|
|
34
|
+
const ALGS = {
|
|
35
|
+
EdDSA: { imp: { name: "Ed25519" }, verify: { name: "Ed25519" }, kty: "OKP" },
|
|
36
|
+
ES256: { imp: { name: "ECDSA", namedCurve: "P-256" }, verify: { name: "ECDSA", hash: "SHA-256" }, kty: "EC" },
|
|
37
|
+
PS256: { imp: { name: "RSA-PSS", hash: "SHA-256" }, verify: { name: "RSA-PSS", saltLength: 32 }, kty: "RSA" },
|
|
38
|
+
};
|
|
39
|
+
const b64uToBytes = (s) => {
|
|
40
|
+
const b = s.replace(/-/g, "+").replace(/_/g, "/");
|
|
41
|
+
const bin = atob(b + "=".repeat((4 - (b.length % 4)) % 4));
|
|
42
|
+
const out = new Uint8Array(new ArrayBuffer(bin.length));
|
|
43
|
+
for (let i = 0; i < bin.length; i++)
|
|
44
|
+
out[i] = bin.charCodeAt(i);
|
|
45
|
+
return out;
|
|
46
|
+
};
|
|
47
|
+
const day = (d) => (typeof d === "string" ? d : d.toISOString()).slice(0, 10);
|
|
48
|
+
const fail = (reason, license, trial = false) => ({ valid: false, edition: "free", reason, trial, ...(license ? { license } : {}) });
|
|
49
|
+
/** Production public key(s) (Studio "Public key (JWK)"). Paste here or call License.configure(). */
|
|
50
|
+
const EMBEDDED_PUBLIC_KEYS = [];
|
|
51
|
+
export class LicenseManager {
|
|
52
|
+
keys = [...EMBEDDED_PUBLIC_KEYS];
|
|
53
|
+
state = fail("none");
|
|
54
|
+
warned = new Set();
|
|
55
|
+
configure(o) {
|
|
56
|
+
this.keys = o.replace ? [...o.publicKeys] : [...this.keys, ...o.publicKeys];
|
|
57
|
+
}
|
|
58
|
+
/** Never throws; failures leave the free edition active. */
|
|
59
|
+
async activate(token, o = {}) {
|
|
60
|
+
this.warned.clear();
|
|
61
|
+
return (this.state = await this.verify(token, o));
|
|
62
|
+
}
|
|
63
|
+
reset() {
|
|
64
|
+
this.warned.clear();
|
|
65
|
+
this.state = fail("none");
|
|
66
|
+
}
|
|
67
|
+
get current() { return this.state; }
|
|
68
|
+
get edition() { return this.state.edition; }
|
|
69
|
+
has(f) { return RANK[this.state.edition] >= RANK[FEATURES[f]]; }
|
|
70
|
+
assert(f) {
|
|
71
|
+
if (!this.has(f))
|
|
72
|
+
throw new LicenseError(f, FEATURES[f], this.state.edition);
|
|
73
|
+
}
|
|
74
|
+
/** Soft gate: false when unlicensed; warns once per feature. */
|
|
75
|
+
require(f, onUnlicensed) {
|
|
76
|
+
if (this.has(f))
|
|
77
|
+
return true;
|
|
78
|
+
if (!this.warned.has(f)) {
|
|
79
|
+
this.warned.add(f);
|
|
80
|
+
const e = new LicenseError(f, FEATURES[f], this.state.edition);
|
|
81
|
+
if (onUnlicensed)
|
|
82
|
+
onUnlicensed(e);
|
|
83
|
+
else
|
|
84
|
+
console.warn(`[wf-controls] ${e.message}`);
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
async verify(token, o = {}) {
|
|
89
|
+
const parts = String(token).trim().replace(/\s+/g, "").replace(/^AAIRA-/, "").split(".");
|
|
90
|
+
if (!String(token).trim().startsWith("AAIRA-") || parts.length !== 3)
|
|
91
|
+
return fail("malformed");
|
|
92
|
+
const [h, p, s] = parts;
|
|
93
|
+
let alg, pl, sig;
|
|
94
|
+
try {
|
|
95
|
+
const dec = new TextDecoder();
|
|
96
|
+
alg = JSON.parse(dec.decode(b64uToBytes(h))).alg;
|
|
97
|
+
pl = JSON.parse(dec.decode(b64uToBytes(p)));
|
|
98
|
+
sig = b64uToBytes(s);
|
|
99
|
+
if (typeof alg !== "string" || typeof pl.tier !== "string" || typeof pl.updatesUntil !== "string")
|
|
100
|
+
return fail("malformed");
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
return fail("malformed");
|
|
104
|
+
}
|
|
105
|
+
const spec = ALGS[alg];
|
|
106
|
+
if (!spec)
|
|
107
|
+
return fail("unsupported-algorithm");
|
|
108
|
+
const subtle = globalThis.crypto?.subtle;
|
|
109
|
+
const keys = this.keys.filter((k) => k.kty === spec.kty);
|
|
110
|
+
if (!subtle || keys.length === 0)
|
|
111
|
+
return fail("no-public-key");
|
|
112
|
+
const data = new TextEncoder().encode(`${h}.${p}`);
|
|
113
|
+
let ok = false;
|
|
114
|
+
for (const jwk of keys) {
|
|
115
|
+
try {
|
|
116
|
+
const key = await subtle.importKey("jwk", jwk, spec.imp, false, ["verify"]);
|
|
117
|
+
if (await subtle.verify(spec.verify, key, sig, data)) {
|
|
118
|
+
ok = true;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
catch { /* next key */ }
|
|
123
|
+
}
|
|
124
|
+
if (!ok)
|
|
125
|
+
return fail("bad-signature");
|
|
126
|
+
const trial = pl.tier === "trial";
|
|
127
|
+
if (trial && day(o.now ?? new Date()) > pl.updatesUntil)
|
|
128
|
+
return fail("expired", pl, trial);
|
|
129
|
+
if (pl.apps?.length && o.appName && !pl.apps.some((a) => a.toLowerCase() === o.appName.toLowerCase())) {
|
|
130
|
+
return fail("wrong-application", pl, trial);
|
|
131
|
+
}
|
|
132
|
+
// Perpetual model: a lapsed key keeps older releases working, not newer ones.
|
|
133
|
+
if (!trial && day(o.releaseDate ?? RELEASE_DATE) > pl.updatesUntil)
|
|
134
|
+
return fail("release-not-covered", pl, trial);
|
|
135
|
+
return { valid: true, edition: editionForTier(pl.tier), reason: "none", license: pl, trial };
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/** Shared singleton for all paid packages. */
|
|
139
|
+
export const License = new LicenseManager();
|
|
140
|
+
export const setLicenseKey = (t, o) => License.activate(t, o);
|
|
141
|
+
export const requireFeature = (f, cb) => License.require(f, cb);
|
|
142
|
+
export const assertFeature = (f) => License.assert(f);
|
|
143
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uHAAuH;AAgBvH,qDAAqD;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,YAAY,EAAE,MAAM;IACpB,qBAAqB,EAAE,MAAM;IAC7B,iBAAiB,EAAE,KAAK;IACxB,wBAAwB,EAAE,KAAK;IAC/B,kBAAkB,EAAE,KAAK;IACzB,mBAAmB,EAAE,KAAK;IAC1B,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,YAAY;IAC7B,cAAc,EAA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,EAAE,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IAC/F,CAAC;CACF;AAED,8CAA8C;AAC9C,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,cAAc,EAAE,CAAC;AAC5C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAS,EAAE,CAAmB,EAAyB,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/G,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAY,EAAE,EAA8B,EAAW,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAChH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAY,EAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wf-controls/license",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Offline license-key verification and feature gating for WebForms-TS-Controls editions (Free, Pro, Enterprise)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/ahsan-wolf/webforms-ts-controls.git",
|
|
9
|
+
"directory": "packages/license"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc -p tsconfig.json",
|
|
22
|
+
"test": "npm run build && node --test test/*.test.mjs"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^6.0.2"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/README.md
DELETED