@enterprisestandard/esv 0.0.5-beta.20260115.2 → 0.0.5-beta.20260115.4
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/iam/index.d.ts +8 -5
- package/dist/iam/index.js +5755 -664
- package/dist/iam/index.js.map +1 -1
- package/dist/index.d.ts +90 -10
- package/dist/index.js +6897 -152
- package/dist/index.js.map +1 -1
- package/dist/runner.d.ts +0 -36
- package/dist/runner.js +11407 -283
- package/dist/runner.js.map +1 -1
- package/dist/server/index.d.ts +88 -14
- package/dist/server/index.js +1387 -33
- package/dist/server/index.js.map +1 -1
- package/dist/sso/index.d.ts +8 -5
- package/dist/sso/index.js +365 -357
- package/dist/sso/index.js.map +1 -1
- package/dist/{types.d.ts → types-Bn1pr_xY.d.ts} +13 -11
- package/dist/workload/index.d.ts +8 -5
- package/dist/workload/index.js +393 -403
- package/dist/workload/index.js.map +1 -1
- package/package.json +2 -4
- package/dist/iam/index.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/runner.d.ts.map +0 -1
- package/dist/server/crypto.d.ts +0 -46
- package/dist/server/crypto.d.ts.map +0 -1
- package/dist/server/crypto.js +0 -134
- package/dist/server/crypto.js.map +0 -1
- package/dist/server/iam.d.ts +0 -11
- package/dist/server/iam.d.ts.map +0 -1
- package/dist/server/iam.js +0 -402
- package/dist/server/iam.js.map +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/server.d.ts +0 -66
- package/dist/server/server.d.ts.map +0 -1
- package/dist/server/server.js +0 -223
- package/dist/server/server.js.map +0 -1
- package/dist/server/sso.d.ts +0 -11
- package/dist/server/sso.d.ts.map +0 -1
- package/dist/server/sso.js +0 -428
- package/dist/server/sso.js.map +0 -1
- package/dist/server/state.d.ts +0 -137
- package/dist/server/state.d.ts.map +0 -1
- package/dist/server/state.js +0 -152
- package/dist/server/state.js.map +0 -1
- package/dist/server/vault.d.ts +0 -11
- package/dist/server/vault.d.ts.map +0 -1
- package/dist/server/vault.js +0 -92
- package/dist/server/vault.js.map +0 -1
- package/dist/server/workload.d.ts +0 -19
- package/dist/server/workload.d.ts.map +0 -1
- package/dist/server/workload.js +0 -226
- package/dist/server/workload.js.map +0 -1
- package/dist/sso/index.d.ts.map +0 -1
- package/dist/tenant/index.d.ts +0 -17
- package/dist/tenant/index.d.ts.map +0 -1
- package/dist/tenant/index.js +0 -300
- package/dist/tenant/index.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts +0 -75
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -139
- package/dist/utils.js.map +0 -1
- package/dist/workload/index.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,88 @@
|
|
|
1
|
+
export { createIAMTests, validateIAM } from './iam/index.js';
|
|
2
|
+
export { createSSOTests, validateSSO } from './sso/index.js';
|
|
3
|
+
import { a as TenantValidationConfig, T as TestDef, V as ValidationSuiteResult, b as ValidationResult, S as SSOValidationConfig, I as IAMValidationConfig, W as WorkloadValidationConfig, c as ValidationReport } from './types-Bn1pr_xY.js';
|
|
4
|
+
export { d as ValidationConfig } from './types-Bn1pr_xY.js';
|
|
5
|
+
export { createWorkloadTests, validateWorkload } from './workload/index.js';
|
|
6
|
+
import '@enterprisestandard/react';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Tenant Validation Tests
|
|
10
|
+
*
|
|
11
|
+
* These tests validate that an application correctly implements
|
|
12
|
+
* Enterprise Standard Tenant Management functionality.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Runs all Tenant validation tests
|
|
17
|
+
*/
|
|
18
|
+
declare function validateTenant(config: TenantValidationConfig): Promise<ValidationSuiteResult>;
|
|
19
|
+
/**
|
|
20
|
+
* Creates Vitest-compatible test suite for Tenant validation
|
|
21
|
+
*/
|
|
22
|
+
declare function createTenantTests(config: TenantValidationConfig): Array<TestDef>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Utility functions for Enterprise Standard Validator
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
type StandardSchemaV1 = {
|
|
29
|
+
readonly '~standard': {
|
|
30
|
+
readonly validate: (value: unknown) => {
|
|
31
|
+
value: unknown;
|
|
32
|
+
} | {
|
|
33
|
+
issues: ReadonlyArray<{
|
|
34
|
+
message: string;
|
|
35
|
+
path?: ReadonlyArray<PropertyKey>;
|
|
36
|
+
}>;
|
|
37
|
+
} | Promise<{
|
|
38
|
+
value: unknown;
|
|
39
|
+
} | {
|
|
40
|
+
issues: ReadonlyArray<{
|
|
41
|
+
message: string;
|
|
42
|
+
path?: ReadonlyArray<PropertyKey>;
|
|
43
|
+
}>;
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Wraps a test function to capture timing and errors
|
|
49
|
+
*/
|
|
50
|
+
declare function runTest(name: string, testFn: () => Promise<undefined | {
|
|
51
|
+
details?: Record<string, unknown>;
|
|
52
|
+
}>): Promise<ValidationResult>;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a skipped test result
|
|
55
|
+
*/
|
|
56
|
+
declare function skipTest(name: string, reason: string): ValidationResult;
|
|
57
|
+
/**
|
|
58
|
+
* Assertion helper for tests
|
|
59
|
+
*/
|
|
60
|
+
declare function assert(condition: boolean, message: string): asserts condition;
|
|
61
|
+
/**
|
|
62
|
+
* Assertion helper for equality
|
|
63
|
+
*/
|
|
64
|
+
declare function assertEqual<T>(actual: T, expected: T, message?: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* Assertion helper for validating data against a StandardSchemaV1 validator
|
|
67
|
+
*
|
|
68
|
+
* This is the preferred way to validate data when you have a validator available.
|
|
69
|
+
* The validator can be from valibot, zod, or any other library that implements StandardSchemaV1.
|
|
70
|
+
*
|
|
71
|
+
* @param data - The data to validate
|
|
72
|
+
* @param validator - A StandardSchemaV1 validator (e.g., from valibotValidators or zodValidators)
|
|
73
|
+
* @param message - Optional custom error message
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* import { valibotValidators } from '@enterprisestandard/react-validators-valibot';
|
|
78
|
+
* const tenantValidator = valibotValidators.createTenantResponse();
|
|
79
|
+
* assertValid(data, tenantValidator);
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @throws Error if validation fails
|
|
83
|
+
*/
|
|
84
|
+
declare function assertValid(data: unknown, validator: StandardSchemaV1, message?: string): void;
|
|
85
|
+
|
|
1
86
|
/**
|
|
2
87
|
* Enterprise Standard Validator
|
|
3
88
|
*
|
|
@@ -45,13 +130,7 @@
|
|
|
45
130
|
* });
|
|
46
131
|
* ```
|
|
47
132
|
*/
|
|
48
|
-
|
|
49
|
-
export { createSSOTests, validateSSO } from './sso';
|
|
50
|
-
export { createTenantTests, validateTenant } from './tenant';
|
|
51
|
-
export type { IAMValidationConfig, SSOValidationConfig, TenantValidationConfig, TestDef, ValidationConfig, ValidationReport, ValidationResult, ValidationSuiteResult, WorkloadValidationConfig, } from './types';
|
|
52
|
-
export { assert, assertEqual, assertValid, runTest, skipTest } from './utils';
|
|
53
|
-
export { createWorkloadTests, validateWorkload } from './workload';
|
|
54
|
-
import type { IAMValidationConfig, SSOValidationConfig, TenantValidationConfig, ValidationReport, WorkloadValidationConfig } from './types';
|
|
133
|
+
|
|
55
134
|
/**
|
|
56
135
|
* Helper to create a complete Vitest test suite
|
|
57
136
|
*
|
|
@@ -67,7 +146,7 @@ import type { IAMValidationConfig, SSOValidationConfig, TenantValidationConfig,
|
|
|
67
146
|
* });
|
|
68
147
|
* ```
|
|
69
148
|
*/
|
|
70
|
-
|
|
149
|
+
declare function defineESVTests(describe: (name: string, fn: () => void) => void, it: (name: string, fn: () => Promise<void>) => void, config: {
|
|
71
150
|
baseUrl: string;
|
|
72
151
|
sso?: boolean | SSOValidationConfig;
|
|
73
152
|
iam?: IAMValidationConfig;
|
|
@@ -77,5 +156,6 @@ export declare function defineESVTests(describe: (name: string, fn: () => void)
|
|
|
77
156
|
/**
|
|
78
157
|
* Print a validation report to console
|
|
79
158
|
*/
|
|
80
|
-
|
|
81
|
-
|
|
159
|
+
declare function printReport(report: ValidationReport): void;
|
|
160
|
+
|
|
161
|
+
export { IAMValidationConfig, SSOValidationConfig, TenantValidationConfig, TestDef, ValidationReport, ValidationResult, ValidationSuiteResult, WorkloadValidationConfig, assert, assertEqual, assertValid, createTenantTests, defineESVTests, printReport, runTest, skipTest, validateTenant };
|