@sdux-vault/engine 0.11.0 → 0.25.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdux-vault/engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
+
"private": false,
|
|
12
13
|
"homepage": "https://www.sdux-vault.com",
|
|
13
14
|
"dependencies": {
|
|
14
|
-
"@sdux-vault/devtools": "0.
|
|
15
|
-
"@sdux-vault/shared": "0.
|
|
15
|
+
"@sdux-vault/devtools": "0.7.0",
|
|
16
|
+
"@sdux-vault/shared": "0.6.0",
|
|
16
17
|
"tslib": "^2.3.0"
|
|
17
18
|
},
|
|
18
19
|
"peerDependencies": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _sdux_vault_shared from '@sdux-vault/shared';
|
|
2
|
-
import { TapCallback, BehaviorClassContract, FeatureCellBaseShape, CoreEmitStateCallback, VaultErrorCallback, FilterFunction, DeferredType, ReducerFunction, InterceptorBehaviorClassContract, OperatorsBehaviorClassContract, ControllerClassContract, ControllerContract, ControllerContext, VaultErrorShape, BehaviorContext, VaultPrivateErrorServiceContract, StateInputType, DecisionOutcomeType, OperationType, VAULT_NOOP, VAULT_CLEAR_STATE, InsightConfig, PipelineValue,
|
|
2
|
+
import { TapCallback, BehaviorClassContract, FeatureCellBaseShape, CoreEmitStateCallback, VaultErrorCallback, FilterFunction, DeferredType, StateSnapshotShape, ReducerFunction, StateEmitSnapshotShape, InterceptorBehaviorClassContract, OperatorsBehaviorClassContract, ControllerClassContract, ControllerContract, ControllerContext, VaultErrorShape, BehaviorContext, VaultPrivateErrorServiceContract, StateInputType, DecisionOutcomeType, OperationType, VAULT_NOOP, VAULT_CLEAR_STATE, InsightConfig, PipelineValue, CellBuilderContract, VaultConfig, VaultRegistrationShape, FinalState } from '@sdux-vault/shared';
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
|
|
@@ -53,10 +53,21 @@ interface OrchestratorConfig<T> {
|
|
|
53
53
|
* Initial state value that seeds the FeatureCell.
|
|
54
54
|
*/
|
|
55
55
|
initialState: T | DeferredType<T>;
|
|
56
|
+
/**
|
|
57
|
+
* Live reference to the FeatureCell's mutable last-snapshot object.
|
|
58
|
+
* Passed through to behavior constructors so they can commit state
|
|
59
|
+
* outside the pipeline call stack.
|
|
60
|
+
*/
|
|
61
|
+
lastSnapshot: StateSnapshotShape<T>;
|
|
56
62
|
/**
|
|
57
63
|
* Reducer callbacks responsible for state transformation.
|
|
58
64
|
*/
|
|
59
65
|
reducerCallbacks: ReducerFunction<T>[];
|
|
66
|
+
/**
|
|
67
|
+
* Subject used by the FeatureCell to emit state snapshots.
|
|
68
|
+
* Passed through to behavior constructors.
|
|
69
|
+
*/
|
|
70
|
+
state$: Subject<StateEmitSnapshotShape<T>>;
|
|
60
71
|
/**
|
|
61
72
|
* Interceptor behavior classes applied before pipeline execution.
|
|
62
73
|
*/
|
|
@@ -325,21 +336,8 @@ declare class FeatureCellClass<T> extends FeatureCellBuilder<T> {
|
|
|
325
336
|
build(): FeatureCellShape<T>;
|
|
326
337
|
}
|
|
327
338
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
* against tier-specific public keys. Tokens use a dot-separated format:
|
|
331
|
-
* `base64(payload).base64(signature)`.
|
|
332
|
-
*
|
|
333
|
-
* The verification process:
|
|
334
|
-
* - Splits the token on `.` to extract the encoded payload and signature
|
|
335
|
-
* - Decodes the payload from base64 to determine the license tier
|
|
336
|
-
* - Rejects tokens with missing or unrecognized tier
|
|
337
|
-
* - Loads the appropriate PEM-encoded public key for the tier
|
|
338
|
-
* - Uses `crypto.subtle.verify()` (RSA-SHA256) to validate the signature
|
|
339
|
-
* against the raw base64-encoded payload string
|
|
340
|
-
*
|
|
341
|
-
* Verification failures return `false` rather than throwing.
|
|
342
|
-
*/
|
|
339
|
+
declare function verifyLicensePayload(licensePayload: string): Promise<boolean>;
|
|
340
|
+
|
|
343
341
|
declare const VerifyLicenseToken: {
|
|
344
342
|
/**
|
|
345
343
|
* Verifies the supplied signed license token using the public key associated
|
|
@@ -379,7 +377,10 @@ declare abstract class LicensingAbstract<T> {
|
|
|
379
377
|
#private;
|
|
380
378
|
static readonly needsLicense: boolean;
|
|
381
379
|
static readonly key: string;
|
|
382
|
-
constructor(ctx:
|
|
380
|
+
constructor(ctx: {
|
|
381
|
+
readonly featureCellKey: string;
|
|
382
|
+
readonly licensePayload?: unknown;
|
|
383
|
+
});
|
|
383
384
|
validateLicense(valid: boolean): void;
|
|
384
385
|
}
|
|
385
386
|
|
|
@@ -415,5 +416,5 @@ declare function getFeatureCellToken(key: string): FeatureCellToken;
|
|
|
415
416
|
*/
|
|
416
417
|
declare const isPipelineTerminal: <T>(current: FinalState<T>) => boolean;
|
|
417
418
|
|
|
418
|
-
export { Conductor, FeatureCellClass, LicensingAbstract, VAULT_LICENSE_ID, VaultCore, VerifyLicenseToken, createFeatureCellToken, getFeatureCellToken, getLicensePayload, getVaultRegistryForTests, hasVaultLicense, isAuthorizedKey, isBypassLicensing, isPipelineTerminal, registerFeatureCell, registerVaultSettled, resetFeatureCellRegistry, resetVaultForTests, vaultAllSettled, vaultSettled };
|
|
419
|
+
export { Conductor, FeatureCellClass, LicensingAbstract, VAULT_LICENSE_ID, VaultCore, VerifyLicenseToken, createFeatureCellToken, getFeatureCellToken, getLicensePayload, getVaultRegistryForTests, hasVaultLicense, isAuthorizedKey, isBypassLicensing, isPipelineTerminal, registerFeatureCell, registerVaultSettled, resetFeatureCellRegistry, resetVaultForTests, vaultAllSettled, vaultSettled, verifyLicensePayload };
|
|
419
420
|
export type { ConductorConfig, FeatureCellConfig, FeatureCellShape, VaultStateRef };
|