@revealui/core 0.11.1 → 0.12.1
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 +2 -3
- package/dist/api/rest.js +4 -4
- package/dist/client/admin/utils/csrf.d.ts +9 -6
- package/dist/client/admin/utils/csrf.d.ts.map +1 -1
- package/dist/client/admin/utils/csrf.js +9 -6
- package/dist/collections/operations/fieldValidation.d.ts +5 -16
- package/dist/collections/operations/fieldValidation.d.ts.map +1 -1
- package/dist/collections/operations/fieldValidation.js +5 -20
- package/dist/collections/operations/update.d.ts.map +1 -1
- package/dist/collections/operations/update.js +4 -2
- package/dist/database/safe-parse.js +3 -3
- package/dist/database/universal-postgres.d.ts.map +1 -1
- package/dist/database/universal-postgres.js +10 -13
- package/dist/deployment-mode.d.ts +44 -0
- package/dist/deployment-mode.d.ts.map +1 -0
- package/dist/deployment-mode.js +58 -0
- package/dist/error-handling/error-boundary.d.ts +16 -2
- package/dist/error-handling/error-boundary.d.ts.map +1 -1
- package/dist/error-handling/error-boundary.js +18 -3
- package/dist/error-handling/error-reporter.d.ts +1 -1
- package/dist/error-handling/error-reporter.d.ts.map +1 -1
- package/dist/error-handling/error-reporter.js +6 -2
- package/dist/error-handling/index.d.ts +1 -1
- package/dist/error-handling/index.d.ts.map +1 -1
- package/dist/error-handling/index.js +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/instance/logger.d.ts +18 -7
- package/dist/instance/logger.d.ts.map +1 -1
- package/dist/instance/logger.js +66 -17
- package/dist/license/mint-client.d.ts +72 -0
- package/dist/license/mint-client.d.ts.map +1 -0
- package/dist/license/mint-client.js +175 -0
- package/dist/license.d.ts +109 -0
- package/dist/license.d.ts.map +1 -1
- package/dist/license.js +153 -6
- package/dist/observability/index.d.ts +5 -2
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +5 -2
- package/dist/observability/logger.d.ts +5 -3
- package/dist/observability/logger.d.ts.map +1 -1
- package/dist/observability/logger.js +5 -3
- package/dist/relationships/analyzer.js +2 -2
- package/dist/revforge-license.d.ts +9 -0
- package/dist/revforge-license.d.ts.map +1 -1
- package/dist/revforge-license.js +12 -2
- package/dist/storage/object-storage.d.ts.map +1 -1
- package/dist/storage/object-storage.js +3 -3
- package/dist/utils/errors.d.ts +16 -4
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +14 -2
- package/dist/utils/json-parsing.d.ts.map +1 -1
- package/dist/utils/json-parsing.js +4 -2
- package/dist/utils/logger-client.d.ts +6 -27
- package/dist/utils/logger-client.d.ts.map +1 -1
- package/dist/utils/logger-client.js +5 -51
- package/dist/utils/logger-server.d.ts +16 -20
- package/dist/utils/logger-server.d.ts.map +1 -1
- package/dist/utils/logger-server.js +40 -53
- package/dist/utils/logger.d.ts +7 -9
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +6 -8
- package/package.json +154 -76
- package/dist/caching/index.d.ts +0 -6
- package/dist/caching/index.d.ts.map +0 -1
- package/dist/caching/index.js +0 -5
- package/dist/observability/tracing.d.ts +0 -149
- package/dist/observability/tracing.d.ts.map +0 -1
- package/dist/observability/tracing.js +0 -380
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error-handling/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,sBAAsB,EACtB,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EACtB,8BAA8B,EAC9B,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,KAAK,EACL,UAAU,EACV,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,KAAK,EACL,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,2BAA2B,EAC3B,SAAS,EACT,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,0BAA0B,EAC1B,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,aAAa,EACb,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,KAAK,GACN,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error-handling/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,sBAAsB,EACtB,QAA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K,GACN,MAAM,uBAAuB,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { AdaptiveCircuitBreaker, Bulkhead, CircuitBreak, CircuitBreaker, CircuitBreakerOpenError, CircuitBreakerRegistry, calculateDelay, circuitBreakerRegistry, createCircuitBreakerMiddleware, createResilientFunction, createRetryMiddleware, ExponentialBackoff, fetchWithCircuitBreaker, fetchWithRetry, globalRetryConfig, ResilientOperation, Retryable, RetryableOperation, RetryPolicies, RetryPolicyBuilder, retry, retryBatch, retryIf, retryUntil, retryWithFallback, sleep, withCircuitBreaker, } from '@revealui/resilience';
|
|
7
7
|
// Error boundaries
|
|
8
|
-
export { AuthenticationError, ErrorBoundary, ErrorBoundaryWithRetry, getErrorSeverity, isAuthenticationError, isNetworkError, isNotFoundError, isValidationError, NetworkError, NotFoundError, shouldRetryError, useErrorHandler, ValidationError, withErrorBoundary, } from './error-boundary';
|
|
8
|
+
export { AuthenticationError, ClientValidationError, ErrorBoundary, ErrorBoundaryWithRetry, getErrorSeverity, isAuthenticationError, isClientValidationError, isNetworkError, isNotFoundError, isValidationError, NetworkError, NotFoundError, shouldRetryError, useErrorHandler, ValidationError, withErrorBoundary, } from './error-boundary';
|
|
9
9
|
// Error reporting
|
|
10
10
|
export { ConsoleErrorReporter, ErrorFilters, ErrorReportingSystem, errorReporter, HTTPErrorReporter, initializeErrorReporting, LoggingErrorReporter, trackAction, trackAPICall, trackNavigation, } from './error-reporter';
|
|
11
11
|
// Fallback components
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACzD,YAAY,EACV,0BAA0B,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BAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EAExB,mBAAmB,EAEnB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EAEnB,UAAU,EACV,WAAW,EACX,WAAW,EACX,cAAc,EAEd,eAAe,EACf,UAAU,EACV,cAAc,EACd,UAAU,EACV,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EAEV,MAAM,EAEN,UAAU,EACV,UAAU,EACV,sBAAsB,EAEtB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAEhB,eAAe,EAEf,qBAAqB,EACrB,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,iBAAiB,IAAI,uBAAuB,EAC5C,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EAEX,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EAEpB,aAAa,EACb,kBAAkB,EAElB,aAAa,EACb,iBAAiB,EACjB,2BAA2B,EAC3B,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAC5B,UAAU,EACV,aAAa,EACb,SAAS,EAET,mBAAmB,EACnB,YAAY,EAEZ,gBAAgB,EAChB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAK1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG"}
|
package/dist/index.js
CHANGED
|
@@ -67,14 +67,16 @@ RevealUICollection, RevealUIGlobal, relationshipPopulationPromise, validateRelat
|
|
|
67
67
|
export { BoldFeature, FixedToolbarFeature, HeadingFeature, ItalicFeature, LinkFeature, lexicalEditor, TreeViewFeature, UnderlineFeature, } from './richtext/index.js';
|
|
68
68
|
// Storage adapters
|
|
69
69
|
export { objectStorage } from './storage/object-storage.js';
|
|
70
|
-
// Note: Logger
|
|
70
|
+
// Note: Instance-shaped Logger (RevealUILogger adapter) is exported from
|
|
71
|
+
// ./revealui.ts (instance/logger.js). Structured utils logger is re-exported
|
|
72
|
+
// below from ./utils/logger.js (ADR-008: both backed by @revealui/utils/logger).
|
|
71
73
|
export { LRUCache } from './utils/cache.js';
|
|
72
74
|
// Deep clone utility
|
|
73
75
|
export { deepClone } from './utils/deep-clone.js';
|
|
74
76
|
// Error response utilities (framework-agnostic)
|
|
75
77
|
export { createApplicationErrorResponseData, createErrorResponseData, createSuccessResponseData, createValidationErrorResponseData, } from './utils/error-responses.js';
|
|
76
78
|
export { ApplicationError, AuthenticationError, AuthorizationError, ConflictError, DatabaseError, handleApiError, handleDatabaseError, NotFoundError, PostgresErrorCode, RateLimitError, ValidationError, } from './utils/errors.js';
|
|
77
|
-
//
|
|
79
|
+
// Structured logger (utils-backed client barrel — ADR-008 D4)
|
|
78
80
|
export { createLogger, logger, } from './utils/logger.js';
|
|
79
81
|
// Type guards
|
|
80
82
|
export { flattenFields, isJsonFieldType, isObject } from './utils/type-guards.js';
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* RevealUI Logger
|
|
2
|
+
* RevealUI Logger (instance API adapter)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* ADR-008 D2/D4: implementation is a thin adapter over `@revealui/utils/logger`.
|
|
5
|
+
* The varargs `RevealUILogger` shape stays for `RevealUIInstance.logger` and
|
|
6
|
+
* public re-exports from `revealui.ts`. Prefer structured imports for new code:
|
|
7
|
+
*
|
|
8
|
+
* import { logger } from '@revealui/core/observability/logger'
|
|
9
|
+
*
|
|
10
|
+
* Production silencing: follows utils `LOG_LEVEL` (default `info`). Legacy
|
|
11
|
+
* hard-silence of info/warn in production is intentionally retired (documented
|
|
12
|
+
* in the D2 PR). setup/scripts CLI loggers are out of scope.
|
|
6
13
|
*/
|
|
14
|
+
import { type Logger as UtilsLogger } from '@revealui/utils/logger';
|
|
7
15
|
export interface RevealUILogger {
|
|
8
16
|
info: (...args: unknown[]) => void;
|
|
9
17
|
warn: (...args: unknown[]) => void;
|
|
@@ -11,21 +19,24 @@ export interface RevealUILogger {
|
|
|
11
19
|
debug: (...args: unknown[]) => void;
|
|
12
20
|
}
|
|
13
21
|
/**
|
|
14
|
-
*
|
|
15
|
-
* Info/warn messages are completely silenced in production
|
|
22
|
+
* Adapts structured utils logger to the historical varargs instance API.
|
|
16
23
|
*/
|
|
17
24
|
export declare class Logger implements RevealUILogger {
|
|
25
|
+
private readonly backend;
|
|
26
|
+
constructor(backend?: UtilsLogger);
|
|
18
27
|
info(...args: unknown[]): void;
|
|
19
28
|
warn(...args: unknown[]): void;
|
|
20
29
|
error(...args: unknown[]): void;
|
|
21
30
|
debug(...args: unknown[]): void;
|
|
22
31
|
}
|
|
23
32
|
/**
|
|
24
|
-
* Creates a new logger
|
|
33
|
+
* Creates a new instance-shaped logger (utils-backed).
|
|
25
34
|
*/
|
|
26
35
|
export declare function createLogger(): RevealUILogger;
|
|
27
36
|
/**
|
|
28
|
-
* Default logger
|
|
37
|
+
* Default instance-shaped logger (utils-backed).
|
|
38
|
+
*
|
|
39
|
+
* @deprecated Prefer `import { logger } from '@revealui/core/observability/logger'`.
|
|
29
40
|
*/
|
|
30
41
|
export declare const defaultLogger: RevealUILogger;
|
|
31
42
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/instance/logger.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/instance/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAGL,KAAK,MAAM,IAAI,WAAW,EAE3B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACnC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACrC;AAoCD;;GAEG;AACH,qBAAa,MAAO,YAAW,cAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;gBAE1B,OAAO,GAAE,WAAyB;IAI9C,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAS9B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAS9B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAS/B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;CAQhC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,cAAc,CAE7C;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,cAA6B,CAAC"}
|
package/dist/instance/logger.js
CHANGED
|
@@ -1,42 +1,91 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* RevealUI Logger
|
|
2
|
+
* RevealUI Logger (instance API adapter)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* ADR-008 D2/D4: implementation is a thin adapter over `@revealui/utils/logger`.
|
|
5
|
+
* The varargs `RevealUILogger` shape stays for `RevealUIInstance.logger` and
|
|
6
|
+
* public re-exports from `revealui.ts`. Prefer structured imports for new code:
|
|
7
|
+
*
|
|
8
|
+
* import { logger } from '@revealui/core/observability/logger'
|
|
9
|
+
*
|
|
10
|
+
* Production silencing: follows utils `LOG_LEVEL` (default `info`). Legacy
|
|
11
|
+
* hard-silence of info/warn in production is intentionally retired (documented
|
|
12
|
+
* in the D2 PR). setup/scripts CLI loggers are out of scope.
|
|
6
13
|
*/
|
|
14
|
+
import { createLogger as createUtilsLogger, logger as utilsLogger, } from '@revealui/utils/logger';
|
|
15
|
+
function toMessageAndContext(args) {
|
|
16
|
+
if (args.length === 0) {
|
|
17
|
+
return { message: '' };
|
|
18
|
+
}
|
|
19
|
+
const [first, ...rest] = args;
|
|
20
|
+
const message = typeof first === 'string' ? first : first instanceof Error ? first.message : String(first);
|
|
21
|
+
if (rest.length === 0) {
|
|
22
|
+
if (first instanceof Error) {
|
|
23
|
+
return { message, error: first };
|
|
24
|
+
}
|
|
25
|
+
return { message };
|
|
26
|
+
}
|
|
27
|
+
if (rest.length === 1) {
|
|
28
|
+
const only = rest[0];
|
|
29
|
+
if (only instanceof Error) {
|
|
30
|
+
return { message, error: only };
|
|
31
|
+
}
|
|
32
|
+
if (only !== null && typeof only === 'object' && !Array.isArray(only)) {
|
|
33
|
+
return { message, context: only };
|
|
34
|
+
}
|
|
35
|
+
return { message, context: { detail: only } };
|
|
36
|
+
}
|
|
37
|
+
return { message, context: { args: rest } };
|
|
38
|
+
}
|
|
7
39
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Info/warn messages are completely silenced in production
|
|
40
|
+
* Adapts structured utils logger to the historical varargs instance API.
|
|
10
41
|
*/
|
|
11
42
|
export class Logger {
|
|
43
|
+
backend;
|
|
44
|
+
constructor(backend = utilsLogger) {
|
|
45
|
+
this.backend = backend;
|
|
46
|
+
}
|
|
12
47
|
info(...args) {
|
|
13
|
-
|
|
14
|
-
if (
|
|
15
|
-
|
|
48
|
+
const { message, context, error } = toMessageAndContext(args);
|
|
49
|
+
if (error) {
|
|
50
|
+
this.backend.info(message, { ...context, error: error.message, stack: error.stack });
|
|
51
|
+
return;
|
|
16
52
|
}
|
|
53
|
+
this.backend.info(message, context);
|
|
17
54
|
}
|
|
18
55
|
warn(...args) {
|
|
19
|
-
|
|
20
|
-
if (
|
|
21
|
-
|
|
56
|
+
const { message, context, error } = toMessageAndContext(args);
|
|
57
|
+
if (error) {
|
|
58
|
+
this.backend.warn(message, { ...context, error: error.message, stack: error.stack });
|
|
59
|
+
return;
|
|
22
60
|
}
|
|
61
|
+
this.backend.warn(message, context);
|
|
23
62
|
}
|
|
24
63
|
error(...args) {
|
|
25
|
-
|
|
64
|
+
const { message, context, error } = toMessageAndContext(args);
|
|
65
|
+
if (error) {
|
|
66
|
+
this.backend.error(message, error, context);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.backend.error(message, context);
|
|
26
70
|
}
|
|
27
71
|
debug(...args) {
|
|
28
|
-
|
|
29
|
-
|
|
72
|
+
const { message, context, error } = toMessageAndContext(args);
|
|
73
|
+
if (error) {
|
|
74
|
+
this.backend.debug(message, { ...context, error: error.message, stack: error.stack });
|
|
75
|
+
return;
|
|
30
76
|
}
|
|
77
|
+
this.backend.debug(message, context);
|
|
31
78
|
}
|
|
32
79
|
}
|
|
33
80
|
/**
|
|
34
|
-
* Creates a new logger
|
|
81
|
+
* Creates a new instance-shaped logger (utils-backed).
|
|
35
82
|
*/
|
|
36
83
|
export function createLogger() {
|
|
37
|
-
return new Logger();
|
|
84
|
+
return new Logger(createUtilsLogger({ component: 'revealui-instance' }));
|
|
38
85
|
}
|
|
39
86
|
/**
|
|
40
|
-
* Default logger
|
|
87
|
+
* Default instance-shaped logger (utils-backed).
|
|
88
|
+
*
|
|
89
|
+
* @deprecated Prefer `import { logger } from '@revealui/core/observability/logger'`.
|
|
41
90
|
*/
|
|
42
91
|
export const defaultLogger = new Logger();
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* License mint client (GAP-260 P4-3).
|
|
3
|
+
*
|
|
4
|
+
* Single entry for online mint surfaces (Stripe webhooks, admin generate).
|
|
5
|
+
* Routes to either:
|
|
6
|
+
* - remote `apps/license-signer` POST /internal/mint when
|
|
7
|
+
* REVEALUI_LICENSE_SIGN_VIA_SIGNER is truthy, or
|
|
8
|
+
* - local {@link generateLicenseKey} with REVEALUI_LICENSE_PRIVATE_KEY
|
|
9
|
+
* (default / fallback until P4-4 drops the private key from api).
|
|
10
|
+
*
|
|
11
|
+
* Offline stamper (revforge) keeps calling generateLicenseKey directly.
|
|
12
|
+
*
|
|
13
|
+
* Env (remote path):
|
|
14
|
+
* REVEALUI_LICENSE_SIGN_VIA_SIGNER=1|true|yes|on
|
|
15
|
+
* REVEALUI_LICENSE_SIGNER_URL base URL (e.g. http://127.0.0.1:8791)
|
|
16
|
+
* REVEALUI_SIGNER_INVOKE_SECRET HMAC secret (no REVEALUI_SECRET fallback)
|
|
17
|
+
*
|
|
18
|
+
* Env (local path):
|
|
19
|
+
* REVEALUI_LICENSE_PRIVATE_KEY PKCS#8 Ed25519 PEM (required)
|
|
20
|
+
* REVEALUI_LICENSE_PUBLIC_KEY optional; enables kid on JWT header
|
|
21
|
+
*/
|
|
22
|
+
export declare const SIGNER_TIMESTAMP_HEADER = "x-revealui-signer-timestamp";
|
|
23
|
+
export declare const SIGNER_SIGNATURE_HEADER = "x-revealui-signer-signature";
|
|
24
|
+
export declare const SIGNER_MINT_PATH = "/internal/mint";
|
|
25
|
+
export type MintEnv = Record<string, string | undefined>;
|
|
26
|
+
/** Payload fields the signer / generateLicenseKey accept for online mints. */
|
|
27
|
+
export type MintLicensePayload = {
|
|
28
|
+
tier: 'pro' | 'max' | 'enterprise';
|
|
29
|
+
customerId: string;
|
|
30
|
+
domains?: string[];
|
|
31
|
+
maxSites?: number;
|
|
32
|
+
maxUsers?: number;
|
|
33
|
+
perpetual?: boolean;
|
|
34
|
+
jti?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Relative JWT lifetime in seconds.
|
|
37
|
+
* - `undefined`: local default (subscription TTL) / omit on remote body
|
|
38
|
+
* - `null`: perpetual (no exp claim)
|
|
39
|
+
* - number: explicit TTL
|
|
40
|
+
*/
|
|
41
|
+
expiresInSeconds?: number | null;
|
|
42
|
+
};
|
|
43
|
+
export declare class LicenseMintConfigError extends Error {
|
|
44
|
+
readonly code: "license_mint_config";
|
|
45
|
+
constructor(message: string);
|
|
46
|
+
}
|
|
47
|
+
export declare class LicenseMintRemoteError extends Error {
|
|
48
|
+
readonly code: "license_mint_remote";
|
|
49
|
+
readonly status: number;
|
|
50
|
+
constructor(message: string, status: number);
|
|
51
|
+
}
|
|
52
|
+
/** Truthy flag values for REVEALUI_LICENSE_SIGN_VIA_SIGNER. */
|
|
53
|
+
export declare function isSignViaSigner(env?: MintEnv): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether this process can mint a license key (local private key OR remote
|
|
56
|
+
* signer fully configured). Used by call sites that used to gate only on
|
|
57
|
+
* REVEALUI_LICENSE_PRIVATE_KEY presence.
|
|
58
|
+
*/
|
|
59
|
+
export declare function canMintLicense(env?: MintEnv): boolean;
|
|
60
|
+
/** Human-readable reason mint is unavailable (for CRITICAL logs). */
|
|
61
|
+
export declare function mintConfigMissingMessage(env?: MintEnv): string;
|
|
62
|
+
export declare function signMintRequest(secret: string, method: string, path: string, body: string, timestampSeconds: number): string;
|
|
63
|
+
export type MintLicenseKeyOptions = {
|
|
64
|
+
env?: MintEnv;
|
|
65
|
+
/** Inject for tests; defaults to global fetch. */
|
|
66
|
+
fetch?: typeof fetch;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Mint a signed license JWT — remote signer when flagged, else local private key.
|
|
70
|
+
*/
|
|
71
|
+
export declare function mintLicenseKey(input: MintLicensePayload, options?: MintLicenseKeyOptions): Promise<string>;
|
|
72
|
+
//# sourceMappingURL=mint-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mint-client.d.ts","sourceRoot":"","sources":["../../src/license/mint-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,eAAO,MAAM,uBAAuB,gCAAgC,CAAC;AACr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E,MAAM,GACvB,MAAM,CAGR;AAyGD,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,kDAAkD;IAClD,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,MAAM,CAAC,CAQjB"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* License mint client (GAP-260 P4-3).
|
|
3
|
+
*
|
|
4
|
+
* Single entry for online mint surfaces (Stripe webhooks, admin generate).
|
|
5
|
+
* Routes to either:
|
|
6
|
+
* - remote `apps/license-signer` POST /internal/mint when
|
|
7
|
+
* REVEALUI_LICENSE_SIGN_VIA_SIGNER is truthy, or
|
|
8
|
+
* - local {@link generateLicenseKey} with REVEALUI_LICENSE_PRIVATE_KEY
|
|
9
|
+
* (default / fallback until P4-4 drops the private key from api).
|
|
10
|
+
*
|
|
11
|
+
* Offline stamper (revforge) keeps calling generateLicenseKey directly.
|
|
12
|
+
*
|
|
13
|
+
* Env (remote path):
|
|
14
|
+
* REVEALUI_LICENSE_SIGN_VIA_SIGNER=1|true|yes|on
|
|
15
|
+
* REVEALUI_LICENSE_SIGNER_URL base URL (e.g. http://127.0.0.1:8791)
|
|
16
|
+
* REVEALUI_SIGNER_INVOKE_SECRET HMAC secret (no REVEALUI_SECRET fallback)
|
|
17
|
+
*
|
|
18
|
+
* Env (local path):
|
|
19
|
+
* REVEALUI_LICENSE_PRIVATE_KEY PKCS#8 Ed25519 PEM (required)
|
|
20
|
+
* REVEALUI_LICENSE_PUBLIC_KEY optional; enables kid on JWT header
|
|
21
|
+
*/
|
|
22
|
+
import { createHmac } from 'node:crypto';
|
|
23
|
+
import { generateLicenseKey, readPemEnv } from '../license.js';
|
|
24
|
+
export const SIGNER_TIMESTAMP_HEADER = 'x-revealui-signer-timestamp';
|
|
25
|
+
export const SIGNER_SIGNATURE_HEADER = 'x-revealui-signer-signature';
|
|
26
|
+
export const SIGNER_MINT_PATH = '/internal/mint';
|
|
27
|
+
export class LicenseMintConfigError extends Error {
|
|
28
|
+
code = 'license_mint_config';
|
|
29
|
+
constructor(message) {
|
|
30
|
+
super(message);
|
|
31
|
+
this.name = 'LicenseMintConfigError';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export class LicenseMintRemoteError extends Error {
|
|
35
|
+
code = 'license_mint_remote';
|
|
36
|
+
status;
|
|
37
|
+
constructor(message, status) {
|
|
38
|
+
super(message);
|
|
39
|
+
this.name = 'LicenseMintRemoteError';
|
|
40
|
+
this.status = status;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** Truthy flag values for REVEALUI_LICENSE_SIGN_VIA_SIGNER. */
|
|
44
|
+
export function isSignViaSigner(env = process.env) {
|
|
45
|
+
const raw = (env.REVEALUI_LICENSE_SIGN_VIA_SIGNER ?? '').trim().toLowerCase();
|
|
46
|
+
return raw === '1' || raw === 'true' || raw === 'yes' || raw === 'on';
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Whether this process can mint a license key (local private key OR remote
|
|
50
|
+
* signer fully configured). Used by call sites that used to gate only on
|
|
51
|
+
* REVEALUI_LICENSE_PRIVATE_KEY presence.
|
|
52
|
+
*/
|
|
53
|
+
export function canMintLicense(env = process.env) {
|
|
54
|
+
if (isSignViaSigner(env)) {
|
|
55
|
+
const url = env.REVEALUI_LICENSE_SIGNER_URL?.trim() ?? '';
|
|
56
|
+
const secret = env.REVEALUI_SIGNER_INVOKE_SECRET?.trim() ?? '';
|
|
57
|
+
return url.length > 0 && secret.length > 0;
|
|
58
|
+
}
|
|
59
|
+
return Boolean(env.REVEALUI_LICENSE_PRIVATE_KEY?.trim());
|
|
60
|
+
}
|
|
61
|
+
/** Human-readable reason mint is unavailable (for CRITICAL logs). */
|
|
62
|
+
export function mintConfigMissingMessage(env = process.env) {
|
|
63
|
+
if (isSignViaSigner(env)) {
|
|
64
|
+
return ('REVEALUI_LICENSE_SIGN_VIA_SIGNER is set but REVEALUI_LICENSE_SIGNER_URL ' +
|
|
65
|
+
'and/or REVEALUI_SIGNER_INVOKE_SECRET are missing');
|
|
66
|
+
}
|
|
67
|
+
return 'REVEALUI_LICENSE_PRIVATE_KEY not configured';
|
|
68
|
+
}
|
|
69
|
+
export function signMintRequest(secret, method, path, body, timestampSeconds) {
|
|
70
|
+
const payload = `${timestampSeconds}.${method.toUpperCase()}.${path}.${body}`;
|
|
71
|
+
return createHmac('sha256', secret).update(payload, 'utf8').digest('hex');
|
|
72
|
+
}
|
|
73
|
+
function buildMintBody(input) {
|
|
74
|
+
const body = {
|
|
75
|
+
tier: input.tier,
|
|
76
|
+
customerId: input.customerId,
|
|
77
|
+
};
|
|
78
|
+
if (input.domains !== undefined)
|
|
79
|
+
body.domains = input.domains;
|
|
80
|
+
if (input.maxSites !== undefined)
|
|
81
|
+
body.maxSites = input.maxSites;
|
|
82
|
+
if (input.maxUsers !== undefined)
|
|
83
|
+
body.maxUsers = input.maxUsers;
|
|
84
|
+
if (input.perpetual !== undefined)
|
|
85
|
+
body.perpetual = input.perpetual;
|
|
86
|
+
if (input.jti !== undefined)
|
|
87
|
+
body.jti = input.jti;
|
|
88
|
+
if (input.expiresInSeconds !== undefined) {
|
|
89
|
+
body.expiresInSeconds = input.expiresInSeconds;
|
|
90
|
+
}
|
|
91
|
+
return body;
|
|
92
|
+
}
|
|
93
|
+
/** Strip trailing `/` without regex (CodeQL js/polynomial-redos + fleet no-regex). */
|
|
94
|
+
function stripTrailingSlashes(s) {
|
|
95
|
+
let end = s.length;
|
|
96
|
+
while (end > 0 && s.charCodeAt(end - 1) === 47 /* / */) {
|
|
97
|
+
end -= 1;
|
|
98
|
+
}
|
|
99
|
+
return end === s.length ? s : s.slice(0, end);
|
|
100
|
+
}
|
|
101
|
+
function joinSignerUrl(base, path) {
|
|
102
|
+
return `${stripTrailingSlashes(base)}${path}`;
|
|
103
|
+
}
|
|
104
|
+
async function mintViaSigner(input, env, fetchImpl) {
|
|
105
|
+
const baseUrl = env.REVEALUI_LICENSE_SIGNER_URL?.trim() ?? '';
|
|
106
|
+
const secret = env.REVEALUI_SIGNER_INVOKE_SECRET?.trim() ?? '';
|
|
107
|
+
if (!(baseUrl && secret)) {
|
|
108
|
+
throw new LicenseMintConfigError(mintConfigMissingMessage(env));
|
|
109
|
+
}
|
|
110
|
+
const bodyObj = buildMintBody(input);
|
|
111
|
+
const bodyText = JSON.stringify(bodyObj);
|
|
112
|
+
const ts = Math.floor(Date.now() / 1000);
|
|
113
|
+
const signature = signMintRequest(secret, 'POST', SIGNER_MINT_PATH, bodyText, ts);
|
|
114
|
+
const url = joinSignerUrl(baseUrl, SIGNER_MINT_PATH);
|
|
115
|
+
let res;
|
|
116
|
+
try {
|
|
117
|
+
res = await fetchImpl(url, {
|
|
118
|
+
method: 'POST',
|
|
119
|
+
headers: {
|
|
120
|
+
'content-type': 'application/json',
|
|
121
|
+
[SIGNER_TIMESTAMP_HEADER]: String(ts),
|
|
122
|
+
[SIGNER_SIGNATURE_HEADER]: signature,
|
|
123
|
+
},
|
|
124
|
+
body: bodyText,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
catch (err) {
|
|
128
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
129
|
+
throw new LicenseMintRemoteError(`license-signer fetch failed: ${detail}`, 0);
|
|
130
|
+
}
|
|
131
|
+
const text = await res.text();
|
|
132
|
+
if (!res.ok) {
|
|
133
|
+
throw new LicenseMintRemoteError(`license-signer mint failed: HTTP ${res.status}: ${text.slice(0, 200)}`, res.status);
|
|
134
|
+
}
|
|
135
|
+
let json;
|
|
136
|
+
try {
|
|
137
|
+
json = text ? JSON.parse(text) : {};
|
|
138
|
+
}
|
|
139
|
+
catch {
|
|
140
|
+
throw new LicenseMintRemoteError('license-signer returned non-JSON body', res.status);
|
|
141
|
+
}
|
|
142
|
+
const licenseKey = typeof json === 'object' &&
|
|
143
|
+
json !== null &&
|
|
144
|
+
'licenseKey' in json &&
|
|
145
|
+
typeof json.licenseKey === 'string'
|
|
146
|
+
? json.licenseKey
|
|
147
|
+
: '';
|
|
148
|
+
if (!licenseKey) {
|
|
149
|
+
throw new LicenseMintRemoteError('license-signer response missing licenseKey', res.status);
|
|
150
|
+
}
|
|
151
|
+
return licenseKey;
|
|
152
|
+
}
|
|
153
|
+
async function mintLocal(input, env) {
|
|
154
|
+
const privateKey = readPemEnv('REVEALUI_LICENSE_PRIVATE_KEY', env);
|
|
155
|
+
if (!privateKey) {
|
|
156
|
+
throw new LicenseMintConfigError(mintConfigMissingMessage(env));
|
|
157
|
+
}
|
|
158
|
+
const publicKey = readPemEnv('REVEALUI_LICENSE_PUBLIC_KEY', env);
|
|
159
|
+
const { expiresInSeconds, ...payload } = input;
|
|
160
|
+
if (expiresInSeconds === undefined) {
|
|
161
|
+
return generateLicenseKey(payload, privateKey, undefined, publicKey);
|
|
162
|
+
}
|
|
163
|
+
return generateLicenseKey(payload, privateKey, expiresInSeconds, publicKey);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Mint a signed license JWT — remote signer when flagged, else local private key.
|
|
167
|
+
*/
|
|
168
|
+
export async function mintLicenseKey(input, options = {}) {
|
|
169
|
+
const env = options.env ?? process.env;
|
|
170
|
+
const fetchImpl = options.fetch ?? globalThis.fetch.bind(globalThis);
|
|
171
|
+
if (isSignViaSigner(env)) {
|
|
172
|
+
return mintViaSigner(input, env, fetchImpl);
|
|
173
|
+
}
|
|
174
|
+
return mintLocal(input, env);
|
|
175
|
+
}
|
package/dist/license.d.ts
CHANGED
|
@@ -106,6 +106,12 @@ export declare function configureLicenseCache(overrides: Partial<LicenseCacheCon
|
|
|
106
106
|
* authored regex, per the fleet no-regex rule.
|
|
107
107
|
*/
|
|
108
108
|
export declare function normalizePem(raw: string): string;
|
|
109
|
+
/**
|
|
110
|
+
* Read a PEM from `env[name]` (defaults to `process.env`), trim, and normalize
|
|
111
|
+
* escaped newlines. Returns `undefined` when missing or blank after trim.
|
|
112
|
+
* Canonical helper for the former 8+ copy-pasted license/webhook PEM unescapes (GAP-396).
|
|
113
|
+
*/
|
|
114
|
+
export declare function readPemEnv(name: string, env?: Record<string, string | undefined>): string | undefined;
|
|
109
115
|
/**
|
|
110
116
|
* The ordered public-key candidates used to verify license JWTs.
|
|
111
117
|
*
|
|
@@ -155,6 +161,33 @@ export declare function computeKeyId(publicKeyPem: string): Promise<string>;
|
|
|
155
161
|
* options below. Signature is enforced via the public key.
|
|
156
162
|
*/
|
|
157
163
|
export declare function validateLicenseKey(licenseKey: string, publicKey: string | readonly string[], expectedCustomerId?: string): Promise<LicensePayload | null>;
|
|
164
|
+
/**
|
|
165
|
+
* How far past `exp` a license JWT is still accepted by the refresh endpoint
|
|
166
|
+
* (GAP-287 PR-1). Ratified by the owner 2026-07-18 at 30 days.
|
|
167
|
+
*
|
|
168
|
+
* Deliberately wider than the subscription validation grace
|
|
169
|
+
* (`LICENSE_GRACE_SUBSCRIPTION_DAYS`, default 3): the validation grace answers
|
|
170
|
+
* "may you still run", the refresh-accept window answers "may you still fetch
|
|
171
|
+
* your renewal". A customer returning from a month away should still be able to
|
|
172
|
+
* pull their current key rather than being bricked. Beyond this window the
|
|
173
|
+
* refresh path refuses and re-delivery goes through the authenticated admin
|
|
174
|
+
* account page.
|
|
175
|
+
*/
|
|
176
|
+
export declare const REFRESH_ACCEPT_DAYS = 30;
|
|
177
|
+
/**
|
|
178
|
+
* Refresh-path validator (GAP-287 PR-1). Verifies a presented license JWT for
|
|
179
|
+
* `POST /api/license/refresh`, accepting a token whose `exp` is past by at most
|
|
180
|
+
* `refreshAcceptDays` (default {@link REFRESH_ACCEPT_DAYS}).
|
|
181
|
+
*
|
|
182
|
+
* It reuses the SAME ordered multi-key verification (GAP-259 rotation
|
|
183
|
+
* composition) and payload schema as {@link validateLicenseKey}, so a token
|
|
184
|
+
* minted under the outgoing private key during a dual-key rotation window still
|
|
185
|
+
* verifies. It performs NO `customerId` binding: the refresh endpoint trusts
|
|
186
|
+
* the token's `customerId` claim and then independently requires an ACTIVE
|
|
187
|
+
* license row for it. This function only proves possession of a recently-valid
|
|
188
|
+
* signed key. It never mints and never grants entitlement on its own.
|
|
189
|
+
*/
|
|
190
|
+
export declare function validateLicenseKeyForRefresh(licenseKey: string, publicKey: string | readonly string[], refreshAcceptDays?: number): Promise<LicensePayload | null>;
|
|
158
191
|
/**
|
|
159
192
|
* Outcome of a signing-keypair self-test. See {@link selfVerifyLicenseKeypair}.
|
|
160
193
|
*/
|
|
@@ -259,6 +292,82 @@ export declare function getMaxUsers(): number;
|
|
|
259
292
|
* Track B metering: free=1K, pro=10K, max=50K, enterprise=unlimited.
|
|
260
293
|
*/
|
|
261
294
|
export declare function getMaxAgentTasks(): number;
|
|
295
|
+
/**
|
|
296
|
+
* Default subscription license JWT lifetime (seconds) — one year. Used as the
|
|
297
|
+
* fallback when a subscription's billing period is unavailable at mint time (an
|
|
298
|
+
* abnormal Stripe shape) so a period-bound token is never SHORTER than the
|
|
299
|
+
* pre-GAP-287 behavior, and as the default lifetime for {@link generateLicenseKey}
|
|
300
|
+
* when no explicit value is passed.
|
|
301
|
+
*/
|
|
302
|
+
export declare const DEFAULT_SUBSCRIPTION_TTL_SECONDS: number;
|
|
303
|
+
/**
|
|
304
|
+
* Slack added to a hosted subscription's `current_period_end` when deriving the
|
|
305
|
+
* license JWT `exp` (GAP-287 PR-2). Ratified by the owner 2026-07-18 at 7 days.
|
|
306
|
+
*
|
|
307
|
+
* The token's lifetime equals what billing has actually granted plus this slack.
|
|
308
|
+
* The slack must cover the Stripe dunning/retry window so a card that recovers
|
|
309
|
+
* on retry never presents a lapsed key. Renewals advance the exp each billing
|
|
310
|
+
* cycle by re-minting on `invoice.payment_succeeded`.
|
|
311
|
+
*/
|
|
312
|
+
export declare const RENEWAL_SLACK_DAYS = 7;
|
|
313
|
+
export declare const RENEWAL_SLACK_SECONDS: number;
|
|
314
|
+
/**
|
|
315
|
+
* Default lifetime, in days, for a license JWT minted by the admin
|
|
316
|
+
* `POST /generate` manual-mint endpoint when the caller does not supply an
|
|
317
|
+
* explicit `expiresInDays` (GAP-287 PR-3). Ratified by the owner 2026-07-18 at
|
|
318
|
+
* 90, down from the prior flat 365-day default: this is an operator tool, and
|
|
319
|
+
* a short default nudges the right renewal habit for manually-issued keys. An
|
|
320
|
+
* explicit `expiresInDays` on the request is always honored unchanged.
|
|
321
|
+
*/
|
|
322
|
+
export declare const DEFAULT_MANUAL_MINT_DAYS = 90;
|
|
323
|
+
/**
|
|
324
|
+
* Derives the relative `expiresInSeconds` argument for {@link generateLicenseKey}
|
|
325
|
+
* at the hosted subscription mint sites (GAP-287 PR-2): the token should expire
|
|
326
|
+
* at `periodEnd + RENEWAL_SLACK_SECONDS`. Because generateLicenseKey interprets a
|
|
327
|
+
* numeric lifetime relative to issue time, this returns that absolute bound minus
|
|
328
|
+
* now.
|
|
329
|
+
*
|
|
330
|
+
* Falls back to {@link DEFAULT_SUBSCRIPTION_TTL_SECONDS} when `periodEnd` is
|
|
331
|
+
* absent (a subscription with no billing period) so an unexpected Stripe shape
|
|
332
|
+
* never mints a shorter-than-before token. Never returns a non-positive lifetime:
|
|
333
|
+
* a period end already in the past floors at one second, leaving expiry to the
|
|
334
|
+
* validation grace + refresh window rather than minting an already-invalid token.
|
|
335
|
+
*/
|
|
336
|
+
export declare function subscriptionLicenseExpiresInSeconds(periodEnd: Date | null | undefined, nowMs?: number): number;
|
|
337
|
+
/**
|
|
338
|
+
* Absolute epoch-second bound `periodEnd + RENEWAL_SLACK_SECONDS` a hosted
|
|
339
|
+
* subscription key should reach (GAP-287 PR-2). The renewal cadence re-mints IFF
|
|
340
|
+
* the stored key's `exp` is below this bound, so the comparison uses this
|
|
341
|
+
* absolute form while the mint uses the relative
|
|
342
|
+
* {@link subscriptionLicenseExpiresInSeconds}.
|
|
343
|
+
*/
|
|
344
|
+
export declare function subscriptionExpBound(periodEnd: Date): number;
|
|
345
|
+
/**
|
|
346
|
+
* Idempotency tolerance for the renewal re-mint decision (fast-follow from the
|
|
347
|
+
* non-blocking finding on the #1978 guardrail-2 verdict). `subscriptionLicenseExpiresInSeconds`
|
|
348
|
+
* floors its relative TTL to whole seconds and the JWT signer floors `exp` to
|
|
349
|
+
* `iat + expiresInSeconds` at its own second granularity, so the `exp` actually
|
|
350
|
+
* persisted for a subscription key can land exactly 1s below
|
|
351
|
+
* {@link subscriptionExpBound}'s value even though the mint targeted that bound.
|
|
352
|
+
* Without this tolerance a duplicate/retried `invoice.payment_succeeded` lands on
|
|
353
|
+
* that 1s gap and re-enters the re-mint path instead of no-opping.
|
|
354
|
+
*/
|
|
355
|
+
export declare const RENEWAL_IDEMPOTENCY_TOLERANCE_SECONDS = 1;
|
|
356
|
+
/**
|
|
357
|
+
* True when a stored license `exp` already covers the renewal bound, within the
|
|
358
|
+
* {@link RENEWAL_IDEMPOTENCY_TOLERANCE_SECONDS} idempotency tolerance - i.e. the
|
|
359
|
+
* renewal re-mint should be SKIPPED. `null` (perpetual token, or an undecodable
|
|
360
|
+
* key) never covers, so the caller falls through to re-mint.
|
|
361
|
+
*/
|
|
362
|
+
export declare function coversRenewalBound(storedExp: number | null, newBound: number): boolean;
|
|
363
|
+
/**
|
|
364
|
+
* Reads the `exp` (epoch seconds) claim from a license JWT WITHOUT verifying its
|
|
365
|
+
* signature. Internal use only, for the GAP-287 PR-2 renewal cadence: the token
|
|
366
|
+
* comes from our OWN store and the caller needs only its expiry to decide whether
|
|
367
|
+
* to re-mint — never as an authentication or entitlement decision. Returns null
|
|
368
|
+
* for a perpetual token (no exp claim) or one that cannot be decoded.
|
|
369
|
+
*/
|
|
370
|
+
export declare function readLicenseExp(licenseKey: string): Promise<number | null>;
|
|
262
371
|
/**
|
|
263
372
|
* Generates a signed license key JWT.
|
|
264
373
|
* Server-only in practice (requires the private key) but edge-compatible —
|
package/dist/license.d.ts.map
C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