@moonbase.sh/licensing 3.5.0 → 3.5.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/README.md +5 -0
- package/dist/index.cjs +44 -8
- package/dist/index.d.cts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +44 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -526,6 +526,11 @@ What runs in the background:
|
|
|
526
526
|
before locking. An add-on that runs out changes the state, and so does a day going by on a countdown.
|
|
527
527
|
- **Online checks** are at most every `checkInterval` (5 minutes), and instances sharing the license file take turns,
|
|
528
528
|
so a later one picks up the license an earlier one just refreshed.
|
|
529
|
+
- **A revoked license is removed.** When an online check hears that the license was revoked (by hand, or with a
|
|
530
|
+
refund) or that this device's activation was, the app locks as `invalid` and the stored license is deleted, so a
|
|
531
|
+
later launch without a connection can't fall back to it within the grace period. Other instances sharing the file
|
|
532
|
+
lock as `deactivated`. Any other refusal leaves the file for the next launch to check: a lapsed subscription
|
|
533
|
+
(`expired`) unlocks again once it is renewed.
|
|
529
534
|
|
|
530
535
|
Every result is gated by a generation counter: a cancel, a new activation or a deactivation supersedes whatever was
|
|
531
536
|
in flight, so a slow response never overwrites a newer state or writes back a license the customer just removed.
|
package/dist/index.cjs
CHANGED
|
@@ -63,7 +63,7 @@ __export(index_exports, {
|
|
|
63
63
|
hasSubProduct: () => hasSubProduct,
|
|
64
64
|
identitySource: () => identitySource,
|
|
65
65
|
isNewerVersion: () => isNewerVersion,
|
|
66
|
-
licensingVersion: () =>
|
|
66
|
+
licensingVersion: () => licensingVersion,
|
|
67
67
|
parseAppVersion: () => parseAppVersion,
|
|
68
68
|
parseDeviceIdStamp: () => parseDeviceIdStamp,
|
|
69
69
|
parseIoregPlatformUuid: () => parseIoregPlatformUuid,
|
|
@@ -75,7 +75,7 @@ __export(index_exports, {
|
|
|
75
75
|
module.exports = __toCommonJS(index_exports);
|
|
76
76
|
|
|
77
77
|
// package.json
|
|
78
|
-
var version = "3.5.
|
|
78
|
+
var version = "3.5.2";
|
|
79
79
|
|
|
80
80
|
// src/activation/controller.ts
|
|
81
81
|
var import_promises4 = __toESM(require("fs/promises"), 1);
|
|
@@ -1863,6 +1863,9 @@ function isLicenseInvalid(error) {
|
|
|
1863
1863
|
function isLicenseRejection(error) {
|
|
1864
1864
|
return isLicenseInvalid(error) || error instanceof MoonbaseError && (error.type === "LicenseExpired" /* LicenseExpired */ || error.type === "NoEligibleLicense" /* NoEligibleLicense */);
|
|
1865
1865
|
}
|
|
1866
|
+
function isRevocation(error) {
|
|
1867
|
+
return isType(error, "LicenseRevoked" /* LicenseRevoked */) || isType(error, "LicenseActivationRevoked" /* LicenseActivationRevoked */);
|
|
1868
|
+
}
|
|
1866
1869
|
function isType(error, type) {
|
|
1867
1870
|
return error instanceof MoonbaseError && error.type === type;
|
|
1868
1871
|
}
|
|
@@ -2163,7 +2166,10 @@ var ActivationController = class {
|
|
|
2163
2166
|
setLicense(license) {
|
|
2164
2167
|
this.setStanding({ kind: "licensed", license });
|
|
2165
2168
|
}
|
|
2166
|
-
/**
|
|
2169
|
+
/**
|
|
2170
|
+
* Drop the license and say why. The file stays, so the next launch checks it
|
|
2171
|
+
* again, unless Moonbase revoked it (see {@link forgetRevoked}).
|
|
2172
|
+
*/
|
|
2167
2173
|
lock(reason) {
|
|
2168
2174
|
this.setStanding({ kind: "unlicensed", reason });
|
|
2169
2175
|
}
|
|
@@ -2250,6 +2256,25 @@ var ActivationController = class {
|
|
|
2250
2256
|
}
|
|
2251
2257
|
this.fileStamp = kept ? null : await this.stampFile();
|
|
2252
2258
|
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Delete the stored license when Moonbase answered that it, or this device's
|
|
2261
|
+
* activation, was revoked. Left on disk, it would unlock every launch that can't
|
|
2262
|
+
* reach Moonbase until the grace period ran out, since a refusal stores nothing
|
|
2263
|
+
* newer to measure that from. Call under the store's lock: `shouldPersist` says
|
|
2264
|
+
* whether the file still holds the activation that was refused, so a license
|
|
2265
|
+
* another instance stored in its place is kept.
|
|
2266
|
+
*/
|
|
2267
|
+
async forgetRevoked(error, shouldPersist) {
|
|
2268
|
+
if (!isRevocation(error) || !await shouldPersist())
|
|
2269
|
+
return;
|
|
2270
|
+
this.log.info(`moonbase: Moonbase revoked the stored license; removing it: ${errorText(error)}`);
|
|
2271
|
+
try {
|
|
2272
|
+
await this.store.deleteLocalLicense();
|
|
2273
|
+
} catch (err) {
|
|
2274
|
+
this.log.warn(`moonbase: couldn't delete the revoked license: ${errorText(err)}`);
|
|
2275
|
+
}
|
|
2276
|
+
this.fileStamp = await this.stampFile();
|
|
2277
|
+
}
|
|
2253
2278
|
/** In-process turns for a re-check and an add-on call, so their answers land in the order they reached the store. */
|
|
2254
2279
|
onlineTurn(action) {
|
|
2255
2280
|
const run = this.onlineQueue.then(action, action);
|
|
@@ -2335,8 +2360,10 @@ var ActivationController = class {
|
|
|
2335
2360
|
await this.store.storeLocalLicense(err.license).catch(noop);
|
|
2336
2361
|
throw err;
|
|
2337
2362
|
}
|
|
2338
|
-
if (isLicenseRejection(err))
|
|
2363
|
+
if (isLicenseRejection(err)) {
|
|
2364
|
+
await this.forgetRevoked(err, shouldPersist);
|
|
2339
2365
|
throw err;
|
|
2366
|
+
}
|
|
2340
2367
|
if (since <= this.gracePeriod) {
|
|
2341
2368
|
this.log.debug(`moonbase: couldn't reach Moonbase, the license is within its grace period: ${errorText(err)}`);
|
|
2342
2369
|
this.ensureCoversAppVersion(freshest);
|
|
@@ -2437,10 +2464,15 @@ var ActivationController = class {
|
|
|
2437
2464
|
try {
|
|
2438
2465
|
if (peek.expiresAt && peek.expiresAt <= /* @__PURE__ */ new Date()) {
|
|
2439
2466
|
const refreshed = await this.withStoreLock(async () => {
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
await
|
|
2443
|
-
|
|
2467
|
+
try {
|
|
2468
|
+
const answer = await this.licensing.client.validateLicense(peek);
|
|
2469
|
+
if (await stillCurrent())
|
|
2470
|
+
await this.store.storeLocalLicense(answer).catch(noop);
|
|
2471
|
+
return answer;
|
|
2472
|
+
} catch (err) {
|
|
2473
|
+
await this.forgetRevoked(err, stillCurrent);
|
|
2474
|
+
throw err;
|
|
2475
|
+
}
|
|
2444
2476
|
});
|
|
2445
2477
|
return { license: refreshed, reason: null };
|
|
2446
2478
|
}
|
|
@@ -2611,6 +2643,7 @@ var ActivationController = class {
|
|
|
2611
2643
|
} catch (err2) {
|
|
2612
2644
|
if (err2 instanceof ReleaseNotCoveredError && err2.license && await stillCurrent())
|
|
2613
2645
|
await this.store.storeLocalLicense(err2.license).catch(noop);
|
|
2646
|
+
await this.forgetRevoked(err2, stillCurrent);
|
|
2614
2647
|
return { error: err2 };
|
|
2615
2648
|
}
|
|
2616
2649
|
});
|
|
@@ -3363,6 +3396,9 @@ var ActivationController = class {
|
|
|
3363
3396
|
this.emit();
|
|
3364
3397
|
}
|
|
3365
3398
|
};
|
|
3399
|
+
|
|
3400
|
+
// src/index.ts
|
|
3401
|
+
var licensingVersion = version;
|
|
3366
3402
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3367
3403
|
0 && (module.exports = {
|
|
3368
3404
|
ActivationController,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
-
var version = "3.5.0";
|
|
5
|
-
|
|
6
4
|
/**
|
|
7
5
|
* Reference implementation of the Moonbase device fingerprint spec (v2). The
|
|
8
6
|
* authoritative, language-neutral definition lives in FINGERPRINT_SPEC.md, and
|
|
@@ -2243,7 +2241,10 @@ declare class ActivationController {
|
|
|
2243
2241
|
private resetAddOns;
|
|
2244
2242
|
private setStanding;
|
|
2245
2243
|
private setLicense;
|
|
2246
|
-
/**
|
|
2244
|
+
/**
|
|
2245
|
+
* Drop the license and say why. The file stays, so the next launch checks it
|
|
2246
|
+
* again, unless Moonbase revoked it (see {@link forgetRevoked}).
|
|
2247
|
+
*/
|
|
2247
2248
|
private lock;
|
|
2248
2249
|
private showTrialExpired;
|
|
2249
2250
|
/** Lock like an ended trial, but keep the license stored: it still covers the versions it did. */
|
|
@@ -2269,6 +2270,15 @@ declare class ActivationController {
|
|
|
2269
2270
|
* license it picks out: another instance may have stored a new one since.
|
|
2270
2271
|
*/
|
|
2271
2272
|
private deleteStored;
|
|
2273
|
+
/**
|
|
2274
|
+
* Delete the stored license when Moonbase answered that it, or this device's
|
|
2275
|
+
* activation, was revoked. Left on disk, it would unlock every launch that can't
|
|
2276
|
+
* reach Moonbase until the grace period ran out, since a refusal stores nothing
|
|
2277
|
+
* newer to measure that from. Call under the store's lock: `shouldPersist` says
|
|
2278
|
+
* whether the file still holds the activation that was refused, so a license
|
|
2279
|
+
* another instance stored in its place is kept.
|
|
2280
|
+
*/
|
|
2281
|
+
private forgetRevoked;
|
|
2272
2282
|
/** In-process turns for a re-check and an add-on call, so their answers land in the order they reached the store. */
|
|
2273
2283
|
private onlineTurn;
|
|
2274
2284
|
private ensureCoversAppVersion;
|
|
@@ -2583,4 +2593,7 @@ declare function hasSubProduct(license: License, subProductId: string): boolean;
|
|
|
2583
2593
|
*/
|
|
2584
2594
|
declare function isNewerVersion(current: string, latest: string): boolean;
|
|
2585
2595
|
|
|
2586
|
-
|
|
2596
|
+
/** This SDK's version, as it names itself to Moonbase. */
|
|
2597
|
+
declare const licensingVersion: string;
|
|
2598
|
+
|
|
2599
|
+
export { ActivationController, type ActivationControllerOptions, ActivationError, type ActivationErrorKind, type ActivationFailure, type ActivationLogger, ActivationMethod, type ActivationRequestResponse, type ActivationScreen, type ActivationState, type ActivationStatus, type ActivationStrings, type ActivationUiOptions, type AddOnsPhase, type AddOnsState, type AppVersion, DEVICE_ID_SOURCE_TAGS, type DeviceIdDescription, type DeviceIdSource, type DeviceIdStamp, type DeviceIdentity, type DeviceIdentityReader, type DeviceInfo, type DeviceToken, type DownloadTarget, ErrorType, FINGERPRINT_PREFIX, FINGERPRINT_VERSION, FileLicenseStore, type FingerprintParam, IDENTIFYING_PARAM_NAMES, type IDescribableDeviceIdResolver, type IDeviceIdResolver, type ILicenseClient, type ILicenseStore, type ILicenseValidator, type IMigratingDeviceIdResolver, InMemoryLicenseStore, InsufficientDeviceIdentityError, InventoryClient, LegacyDeviceIdResolver, type License, LicenseClient, type LicenseValidationOptions, LicenseValidator, type LicenseView, type LockReason, MAX_VALUE_LENGTH, type Metadata, MigratingDeviceIdResolver, type MoonbaseConfiguration, MoonbaseDeviceIdResolver, type MoonbaseDeviceIdResolverOptions, MoonbaseError, MoonbaseLicensing, type NotCoveredView, type PendingActivation, type Platform, type PlatformTag, type Product, type ReleaseAccess, type ReleaseInfo, type ReleaseNotCoveredDetails, ReleaseNotCoveredError, type SubProduct, type SubProductCatalog, type SubProductCatalogEntry, type TrialFeature, type UpdateHint, type UpdateInfo, type User, buildFingerprintMaterial, canDownload, canonicalizeParams, canonicalizeValue, coversVersion, defaultDeviceIdentityReader, filenameFromDownloadUrl, fingerprintDeviceId, fingerprintDigest, hasSubProduct, identitySource, isNewerVersion, licensingVersion, parseAppVersion, parseDeviceIdStamp, parseIoregPlatformUuid, parseSmbiosParams, platformTag, selectMachineId, stampDeviceId };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
-
var version = "3.5.0";
|
|
5
|
-
|
|
6
4
|
/**
|
|
7
5
|
* Reference implementation of the Moonbase device fingerprint spec (v2). The
|
|
8
6
|
* authoritative, language-neutral definition lives in FINGERPRINT_SPEC.md, and
|
|
@@ -2243,7 +2241,10 @@ declare class ActivationController {
|
|
|
2243
2241
|
private resetAddOns;
|
|
2244
2242
|
private setStanding;
|
|
2245
2243
|
private setLicense;
|
|
2246
|
-
/**
|
|
2244
|
+
/**
|
|
2245
|
+
* Drop the license and say why. The file stays, so the next launch checks it
|
|
2246
|
+
* again, unless Moonbase revoked it (see {@link forgetRevoked}).
|
|
2247
|
+
*/
|
|
2247
2248
|
private lock;
|
|
2248
2249
|
private showTrialExpired;
|
|
2249
2250
|
/** Lock like an ended trial, but keep the license stored: it still covers the versions it did. */
|
|
@@ -2269,6 +2270,15 @@ declare class ActivationController {
|
|
|
2269
2270
|
* license it picks out: another instance may have stored a new one since.
|
|
2270
2271
|
*/
|
|
2271
2272
|
private deleteStored;
|
|
2273
|
+
/**
|
|
2274
|
+
* Delete the stored license when Moonbase answered that it, or this device's
|
|
2275
|
+
* activation, was revoked. Left on disk, it would unlock every launch that can't
|
|
2276
|
+
* reach Moonbase until the grace period ran out, since a refusal stores nothing
|
|
2277
|
+
* newer to measure that from. Call under the store's lock: `shouldPersist` says
|
|
2278
|
+
* whether the file still holds the activation that was refused, so a license
|
|
2279
|
+
* another instance stored in its place is kept.
|
|
2280
|
+
*/
|
|
2281
|
+
private forgetRevoked;
|
|
2272
2282
|
/** In-process turns for a re-check and an add-on call, so their answers land in the order they reached the store. */
|
|
2273
2283
|
private onlineTurn;
|
|
2274
2284
|
private ensureCoversAppVersion;
|
|
@@ -2583,4 +2593,7 @@ declare function hasSubProduct(license: License, subProductId: string): boolean;
|
|
|
2583
2593
|
*/
|
|
2584
2594
|
declare function isNewerVersion(current: string, latest: string): boolean;
|
|
2585
2595
|
|
|
2586
|
-
|
|
2596
|
+
/** This SDK's version, as it names itself to Moonbase. */
|
|
2597
|
+
declare const licensingVersion: string;
|
|
2598
|
+
|
|
2599
|
+
export { ActivationController, type ActivationControllerOptions, ActivationError, type ActivationErrorKind, type ActivationFailure, type ActivationLogger, ActivationMethod, type ActivationRequestResponse, type ActivationScreen, type ActivationState, type ActivationStatus, type ActivationStrings, type ActivationUiOptions, type AddOnsPhase, type AddOnsState, type AppVersion, DEVICE_ID_SOURCE_TAGS, type DeviceIdDescription, type DeviceIdSource, type DeviceIdStamp, type DeviceIdentity, type DeviceIdentityReader, type DeviceInfo, type DeviceToken, type DownloadTarget, ErrorType, FINGERPRINT_PREFIX, FINGERPRINT_VERSION, FileLicenseStore, type FingerprintParam, IDENTIFYING_PARAM_NAMES, type IDescribableDeviceIdResolver, type IDeviceIdResolver, type ILicenseClient, type ILicenseStore, type ILicenseValidator, type IMigratingDeviceIdResolver, InMemoryLicenseStore, InsufficientDeviceIdentityError, InventoryClient, LegacyDeviceIdResolver, type License, LicenseClient, type LicenseValidationOptions, LicenseValidator, type LicenseView, type LockReason, MAX_VALUE_LENGTH, type Metadata, MigratingDeviceIdResolver, type MoonbaseConfiguration, MoonbaseDeviceIdResolver, type MoonbaseDeviceIdResolverOptions, MoonbaseError, MoonbaseLicensing, type NotCoveredView, type PendingActivation, type Platform, type PlatformTag, type Product, type ReleaseAccess, type ReleaseInfo, type ReleaseNotCoveredDetails, ReleaseNotCoveredError, type SubProduct, type SubProductCatalog, type SubProductCatalogEntry, type TrialFeature, type UpdateHint, type UpdateInfo, type User, buildFingerprintMaterial, canDownload, canonicalizeParams, canonicalizeValue, coversVersion, defaultDeviceIdentityReader, filenameFromDownloadUrl, fingerprintDeviceId, fingerprintDigest, hasSubProduct, identitySource, isNewerVersion, licensingVersion, parseAppVersion, parseDeviceIdStamp, parseIoregPlatformUuid, parseSmbiosParams, platformTag, selectMachineId, stampDeviceId };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "3.5.
|
|
2
|
+
var version = "3.5.2";
|
|
3
3
|
|
|
4
4
|
// src/activation/controller.ts
|
|
5
5
|
import fs4 from "fs/promises";
|
|
@@ -1787,6 +1787,9 @@ function isLicenseInvalid(error) {
|
|
|
1787
1787
|
function isLicenseRejection(error) {
|
|
1788
1788
|
return isLicenseInvalid(error) || error instanceof MoonbaseError && (error.type === "LicenseExpired" /* LicenseExpired */ || error.type === "NoEligibleLicense" /* NoEligibleLicense */);
|
|
1789
1789
|
}
|
|
1790
|
+
function isRevocation(error) {
|
|
1791
|
+
return isType(error, "LicenseRevoked" /* LicenseRevoked */) || isType(error, "LicenseActivationRevoked" /* LicenseActivationRevoked */);
|
|
1792
|
+
}
|
|
1790
1793
|
function isType(error, type) {
|
|
1791
1794
|
return error instanceof MoonbaseError && error.type === type;
|
|
1792
1795
|
}
|
|
@@ -2087,7 +2090,10 @@ var ActivationController = class {
|
|
|
2087
2090
|
setLicense(license) {
|
|
2088
2091
|
this.setStanding({ kind: "licensed", license });
|
|
2089
2092
|
}
|
|
2090
|
-
/**
|
|
2093
|
+
/**
|
|
2094
|
+
* Drop the license and say why. The file stays, so the next launch checks it
|
|
2095
|
+
* again, unless Moonbase revoked it (see {@link forgetRevoked}).
|
|
2096
|
+
*/
|
|
2091
2097
|
lock(reason) {
|
|
2092
2098
|
this.setStanding({ kind: "unlicensed", reason });
|
|
2093
2099
|
}
|
|
@@ -2174,6 +2180,25 @@ var ActivationController = class {
|
|
|
2174
2180
|
}
|
|
2175
2181
|
this.fileStamp = kept ? null : await this.stampFile();
|
|
2176
2182
|
}
|
|
2183
|
+
/**
|
|
2184
|
+
* Delete the stored license when Moonbase answered that it, or this device's
|
|
2185
|
+
* activation, was revoked. Left on disk, it would unlock every launch that can't
|
|
2186
|
+
* reach Moonbase until the grace period ran out, since a refusal stores nothing
|
|
2187
|
+
* newer to measure that from. Call under the store's lock: `shouldPersist` says
|
|
2188
|
+
* whether the file still holds the activation that was refused, so a license
|
|
2189
|
+
* another instance stored in its place is kept.
|
|
2190
|
+
*/
|
|
2191
|
+
async forgetRevoked(error, shouldPersist) {
|
|
2192
|
+
if (!isRevocation(error) || !await shouldPersist())
|
|
2193
|
+
return;
|
|
2194
|
+
this.log.info(`moonbase: Moonbase revoked the stored license; removing it: ${errorText(error)}`);
|
|
2195
|
+
try {
|
|
2196
|
+
await this.store.deleteLocalLicense();
|
|
2197
|
+
} catch (err) {
|
|
2198
|
+
this.log.warn(`moonbase: couldn't delete the revoked license: ${errorText(err)}`);
|
|
2199
|
+
}
|
|
2200
|
+
this.fileStamp = await this.stampFile();
|
|
2201
|
+
}
|
|
2177
2202
|
/** In-process turns for a re-check and an add-on call, so their answers land in the order they reached the store. */
|
|
2178
2203
|
onlineTurn(action) {
|
|
2179
2204
|
const run = this.onlineQueue.then(action, action);
|
|
@@ -2259,8 +2284,10 @@ var ActivationController = class {
|
|
|
2259
2284
|
await this.store.storeLocalLicense(err.license).catch(noop);
|
|
2260
2285
|
throw err;
|
|
2261
2286
|
}
|
|
2262
|
-
if (isLicenseRejection(err))
|
|
2287
|
+
if (isLicenseRejection(err)) {
|
|
2288
|
+
await this.forgetRevoked(err, shouldPersist);
|
|
2263
2289
|
throw err;
|
|
2290
|
+
}
|
|
2264
2291
|
if (since <= this.gracePeriod) {
|
|
2265
2292
|
this.log.debug(`moonbase: couldn't reach Moonbase, the license is within its grace period: ${errorText(err)}`);
|
|
2266
2293
|
this.ensureCoversAppVersion(freshest);
|
|
@@ -2361,10 +2388,15 @@ var ActivationController = class {
|
|
|
2361
2388
|
try {
|
|
2362
2389
|
if (peek.expiresAt && peek.expiresAt <= /* @__PURE__ */ new Date()) {
|
|
2363
2390
|
const refreshed = await this.withStoreLock(async () => {
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
await
|
|
2367
|
-
|
|
2391
|
+
try {
|
|
2392
|
+
const answer = await this.licensing.client.validateLicense(peek);
|
|
2393
|
+
if (await stillCurrent())
|
|
2394
|
+
await this.store.storeLocalLicense(answer).catch(noop);
|
|
2395
|
+
return answer;
|
|
2396
|
+
} catch (err) {
|
|
2397
|
+
await this.forgetRevoked(err, stillCurrent);
|
|
2398
|
+
throw err;
|
|
2399
|
+
}
|
|
2368
2400
|
});
|
|
2369
2401
|
return { license: refreshed, reason: null };
|
|
2370
2402
|
}
|
|
@@ -2535,6 +2567,7 @@ var ActivationController = class {
|
|
|
2535
2567
|
} catch (err2) {
|
|
2536
2568
|
if (err2 instanceof ReleaseNotCoveredError && err2.license && await stillCurrent())
|
|
2537
2569
|
await this.store.storeLocalLicense(err2.license).catch(noop);
|
|
2570
|
+
await this.forgetRevoked(err2, stillCurrent);
|
|
2538
2571
|
return { error: err2 };
|
|
2539
2572
|
}
|
|
2540
2573
|
});
|
|
@@ -3287,6 +3320,9 @@ var ActivationController = class {
|
|
|
3287
3320
|
this.emit();
|
|
3288
3321
|
}
|
|
3289
3322
|
};
|
|
3323
|
+
|
|
3324
|
+
// src/index.ts
|
|
3325
|
+
var licensingVersion = version;
|
|
3290
3326
|
export {
|
|
3291
3327
|
ActivationController,
|
|
3292
3328
|
ActivationError,
|
|
@@ -3321,7 +3357,7 @@ export {
|
|
|
3321
3357
|
hasSubProduct,
|
|
3322
3358
|
identitySource,
|
|
3323
3359
|
isNewerVersion,
|
|
3324
|
-
|
|
3360
|
+
licensingVersion,
|
|
3325
3361
|
parseAppVersion,
|
|
3326
3362
|
parseDeviceIdStamp,
|
|
3327
3363
|
parseIoregPlatformUuid,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/licensing",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.5.
|
|
4
|
+
"version": "3.5.2",
|
|
5
5
|
"description": "Package to add sotftware licensing using Moonbase.sh to your node.js apps",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"vitest": "^2.1.4"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
|
-
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
47
|
+
"build": "tsup src/index.ts --format esm,cjs --dts && tsc -p tsconfig.dist.json",
|
|
48
48
|
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
|
|
49
49
|
"version": "npm version",
|
|
50
50
|
"type-check": "tsc --noEmit -p tsconfig.typecheck.json",
|