@memberjunction/testing-integration 0.0.0 → 5.49.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/IntegrationTestDriver.d.ts +63 -0
- package/dist/IntegrationTestDriver.d.ts.map +1 -0
- package/dist/IntegrationTestDriver.js +412 -0
- package/dist/IntegrationTestDriver.js.map +1 -0
- package/dist/ai-verify.d.ts +27 -0
- package/dist/ai-verify.d.ts.map +1 -0
- package/dist/ai-verify.js +120 -0
- package/dist/ai-verify.js.map +1 -0
- package/dist/bootstrap-client.d.ts +11 -0
- package/dist/bootstrap-client.d.ts.map +1 -0
- package/dist/bootstrap-client.js +68 -0
- package/dist/bootstrap-client.js.map +1 -0
- package/dist/bootstrap-shared.d.ts +94 -0
- package/dist/bootstrap-shared.d.ts.map +1 -0
- package/dist/bootstrap-shared.js +94 -0
- package/dist/bootstrap-shared.js.map +1 -0
- package/dist/bootstrap.d.ts +14 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +133 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/check-registry.d.ts +39 -0
- package/dist/check-registry.d.ts.map +1 -0
- package/dist/check-registry.js +61 -0
- package/dist/check-registry.js.map +1 -0
- package/dist/check.d.ts +531 -0
- package/dist/check.d.ts.map +1 -0
- package/dist/check.js +2 -0
- package/dist/check.js.map +1 -0
- package/dist/checks/self-test.check.d.ts +2 -0
- package/dist/checks/self-test.check.d.ts.map +1 -0
- package/dist/checks/self-test.check.js +35 -0
- package/dist/checks/self-test.check.js.map +1 -0
- package/dist/config.d.ts +35 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +81 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/instrumented-cache.d.ts +47 -0
- package/dist/instrumented-cache.d.ts.map +1 -0
- package/dist/instrumented-cache.js +81 -0
- package/dist/instrumented-cache.js.map +1 -0
- package/dist/registry.d.ts +33 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +37 -0
- package/dist/registry.js.map +1 -0
- package/dist/rls-fixture.d.ts +37 -0
- package/dist/rls-fixture.d.ts.map +1 -0
- package/dist/rls-fixture.js +91 -0
- package/dist/rls-fixture.js.map +1 -0
- package/dist/test-runner.d.ts +55 -0
- package/dist/test-runner.d.ts.map +1 -0
- package/dist/test-runner.js +128 -0
- package/dist/test-runner.js.map +1 -0
- package/dist/tiers.d.ts +28 -0
- package/dist/tiers.d.ts.map +1 -0
- package/dist/tiers.js +41 -0
- package/dist/tiers.js.map +1 -0
- package/dist/types.d.ts +51 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +59 -8
- package/README.md +0 -45
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* check-registry.ts — the global registry of named integration checks.
|
|
3
|
+
*
|
|
4
|
+
* Keyed by '<bundle>.<localId>' (e.g. 'server-cache.S1'). Both the
|
|
5
|
+
* IntegrationTestDriver and the transitional tsx scripts resolve checks from this
|
|
6
|
+
* single registry, so there is no drift between the two execution paths.
|
|
7
|
+
*
|
|
8
|
+
* Implemented as a BaseSingleton (CLAUDE.md critical rule 7) so a single instance
|
|
9
|
+
* is guaranteed across the process even when bundlers duplicate module code.
|
|
10
|
+
*/
|
|
11
|
+
import { BaseSingleton } from '@memberjunction/global';
|
|
12
|
+
export class IntegrationCheckRegistry extends BaseSingleton {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.checks = new Map();
|
|
16
|
+
this.lifecycles = new Map();
|
|
17
|
+
}
|
|
18
|
+
static get Instance() {
|
|
19
|
+
return super.getInstance();
|
|
20
|
+
}
|
|
21
|
+
/** Register (or replace) a check by its Id. */
|
|
22
|
+
Register(check) {
|
|
23
|
+
this.checks.set(check.Id, check);
|
|
24
|
+
}
|
|
25
|
+
/** Resolve a single check by Id; returns undefined for unknown ids (tolerant, by design). */
|
|
26
|
+
Get(id) {
|
|
27
|
+
return this.checks.get(id);
|
|
28
|
+
}
|
|
29
|
+
/** All checks whose Id starts with `<prefix>.` (e.g. GetBundle('server-cache')). */
|
|
30
|
+
GetBundle(prefix) {
|
|
31
|
+
return [...this.checks.values()].filter(c => c.Id.startsWith(prefix + '.'));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The distinct bundle names — the `<bundle>` segment of every registered check Id. The
|
|
35
|
+
* tsx↔metadata drift-check test uses this to assert every bundle has both siblings (a tsx
|
|
36
|
+
* dispatcher script and a metadata Test record).
|
|
37
|
+
*/
|
|
38
|
+
GetBundleNames() {
|
|
39
|
+
const names = new Set();
|
|
40
|
+
for (const id of this.checks.keys()) {
|
|
41
|
+
const dot = id.indexOf('.');
|
|
42
|
+
if (dot > 0) {
|
|
43
|
+
names.add(id.slice(0, dot));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return [...names].sort();
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Register a bundle's setup/teardown lifecycle (mutating bundles that share a fixture).
|
|
50
|
+
* Both the driver and the standalone dispatcher scripts look this up by bundle name so a
|
|
51
|
+
* bundle's fixture is created/torn down identically on either execution path.
|
|
52
|
+
*/
|
|
53
|
+
RegisterLifecycle(bundle, lifecycle) {
|
|
54
|
+
this.lifecycles.set(bundle, lifecycle);
|
|
55
|
+
}
|
|
56
|
+
/** The lifecycle for a bundle, or undefined when the bundle needs no shared fixture. */
|
|
57
|
+
GetLifecycle(bundle) {
|
|
58
|
+
return this.lifecycles.get(bundle);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=check-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-registry.js","sourceRoot":"","sources":["../src/check-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO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;;OAIG;IACI,iBAAiB,CAAC,MAAc,EAAE,SAA0B;QAC/D,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC3C,CAAC;IAED,wFAAwF;IACjF,YAAY,CAAC,MAAc;QAC9B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;CACJ"}
|
package/dist/check.d.ts
ADDED
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* check.ts — the integration-check contract.
|
|
3
|
+
*
|
|
4
|
+
* A check is a FUNCTION that THROWS on failure (the harness Assert* helpers throw)
|
|
5
|
+
* and RETURNS on pass. Bodies are lifted verbatim from the tsx harness, so
|
|
6
|
+
* migration is a lift-and-register, not a rewrite. The IntegrationTestDriver wraps
|
|
7
|
+
* each check in try/catch and maps the outcome onto an OracleResult — there is no
|
|
8
|
+
* separate per-check result interface.
|
|
9
|
+
*/
|
|
10
|
+
import type { UserInfo, IMetadataProvider, RowLevelSecurityFilterInfo } from '@memberjunction/core';
|
|
11
|
+
import type { MJQueryEntity, MJQueryCategoryEntity, MJConversationEntity, MJConversationDetailEntity, MJRecordProcessEntity, MJScheduledJobEntity, MJTemplateEntity, MJTemplateContentEntity, MJAISkillEntity, MJRemoteOperationEntity, MJMLTrainingPipelineEntity, MJMLModelEntity, MJMLModelScoringBindingEntity, MJUserRoutineEntity } from '@memberjunction/core-entities';
|
|
12
|
+
import type sql from 'mssql';
|
|
13
|
+
import type { InstrumentedLocalStorageProvider } from './instrumented-cache.js';
|
|
14
|
+
/**
|
|
15
|
+
* The self-contained Query/Category fixtures the `runquery-cache` bundle needs:
|
|
16
|
+
* one Query Category and two Queries (TTL-mode + smart-validation-mode), created
|
|
17
|
+
* before the bundle's checks run and torn down afterwards. Lifted from
|
|
18
|
+
* runquery-cache-tests.ts's Ctx; threaded onto IntegrationCheckContext.Fixtures so
|
|
19
|
+
* the Q-checks read them identically whether driven by the driver or the tsx script.
|
|
20
|
+
*/
|
|
21
|
+
export interface RunQueryFixtures {
|
|
22
|
+
/** "Integration Test Queries <ts>" category owning the fixture queries. */
|
|
23
|
+
Category: MJQueryCategoryEntity;
|
|
24
|
+
/** Query WITHOUT CacheValidationSQL → TTL caching mode. */
|
|
25
|
+
TtlQuery: MJQueryEntity;
|
|
26
|
+
/** Query WITH CacheValidationSQL → smart-validation caching mode. */
|
|
27
|
+
ValidatedQuery: MJQueryEntity;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Two users with DIFFERENT effective Row-Level-Security predicates for the same
|
|
31
|
+
* entity, DISCOVERED (never minted) from the provider's RLS filters + the user
|
|
32
|
+
* cache by the `rls-isolation` bundle. Discovery has the safest possible teardown:
|
|
33
|
+
* nothing to delete. When the deployment has only RLS-exempt admins (no two users
|
|
34
|
+
* with distinct non-empty clauses), `Usable` is false and the RLS checks degrade
|
|
35
|
+
* gracefully (skip-as-pass with a logged note) rather than failing.
|
|
36
|
+
*/
|
|
37
|
+
export interface RlsFixture {
|
|
38
|
+
/** First discovered non-exempt user. */
|
|
39
|
+
UserA: UserInfo;
|
|
40
|
+
/** Second discovered non-exempt user, with a DIFFERENT effective RLS clause than UserA. */
|
|
41
|
+
UserB: UserInfo;
|
|
42
|
+
/** The RLS-protected entity both users can Read but with different effective predicates. */
|
|
43
|
+
EntityName: string;
|
|
44
|
+
/** True iff discovery found two distinct users with DIFFERENT non-empty Read RLS clauses. */
|
|
45
|
+
Usable: boolean;
|
|
46
|
+
/** Why the fixture is unusable (for the skip note), when Usable is false. */
|
|
47
|
+
Reason?: string;
|
|
48
|
+
/**
|
|
49
|
+
* A `{{UserID}}`-scoped RLS filter discovered from the provider's RowLevelSecurityFilters,
|
|
50
|
+
* for the token-substitution (RLS1) and distinct-predicate-text (RLS2) checks. Present
|
|
51
|
+
* independently of `Usable` — those checks only need a `{{UserID}}` filter (+ one or two
|
|
52
|
+
* distinct users), NOT two divergent effective clauses. Undefined ⇒ those checks skip-as-pass.
|
|
53
|
+
*/
|
|
54
|
+
TokenFilter?: RowLevelSecurityFilterInfo;
|
|
55
|
+
/**
|
|
56
|
+
* A single non-exempt (user, entity) pair — a user with a NON-empty effective Read clause
|
|
57
|
+
* for that entity — for the live-RunView scoping check (RLS5). Present independently of the
|
|
58
|
+
* two-user `Usable` flag (needs only one non-exempt user). Undefined ⇒ RLS5 skips-as-pass.
|
|
59
|
+
*/
|
|
60
|
+
LivePair?: {
|
|
61
|
+
User: UserInfo;
|
|
62
|
+
EntityName: string;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* The two seeded, purpose-built RLS test users (`it-rls-a@` / `it-rls-b@integration.test`), each in
|
|
66
|
+
* ONLY the "Integration Test: RLS Scoped Reader" role — so both are genuinely scoped (non-exempt) on
|
|
67
|
+
* `MJ: AI Agent Runs`. Resolved by email from the user cache. When present, the deterministic checks
|
|
68
|
+
* RLS8/RLS9 exercise real multi-user isolation without depending on which pair discovery happens to
|
|
69
|
+
* pick; undefined (seed not pushed) ⇒ those checks skip-as-pass.
|
|
70
|
+
*/
|
|
71
|
+
SeededScopedA?: UserInfo;
|
|
72
|
+
SeededScopedB?: UserInfo;
|
|
73
|
+
/**
|
|
74
|
+
* The seeded no-grant test user (`it-nogrant@integration.test`, no roles) — has NO read permission on
|
|
75
|
+
* `MJ: AI Agent Runs`, for the negative isolation check RLS10 (a user with no grant is served no rows).
|
|
76
|
+
* Replaces the incidental reliance on `anonymous@magic-link.local`. Undefined ⇒ RLS10 skips-as-pass.
|
|
77
|
+
*/
|
|
78
|
+
SeededNoGrant?: UserInfo;
|
|
79
|
+
}
|
|
80
|
+
/** An accumulator of `{ entity, id }` rows a mutating bundle created and must delete in FK-safe order. */
|
|
81
|
+
export interface CreatedRow {
|
|
82
|
+
entity: string;
|
|
83
|
+
id: string;
|
|
84
|
+
}
|
|
85
|
+
/** Minimal shape of a cached catalog entry (Action / Agent) the ai-skills fixture references by id + name. */
|
|
86
|
+
export interface NamedRef {
|
|
87
|
+
ID: string;
|
|
88
|
+
Name: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Shared fixture for the `record-process-facade` bundle: one real `MJ: Record Processes`
|
|
92
|
+
* definition (0-row Filter scope, deterministic) reused by both checks, plus the ProcessRun
|
|
93
|
+
* IDs the checks create (appended at run time) so teardown can remove them before the process.
|
|
94
|
+
*/
|
|
95
|
+
export interface RecordProcessFacadeFixture {
|
|
96
|
+
Rp: MJRecordProcessEntity;
|
|
97
|
+
CreatedRunIds: string[];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Shared fixture for the `scheduled-jobs` bundle: one real `MJ: Scheduled Jobs` row (pointed at a
|
|
101
|
+
* missing Record Process so its driver fails fast + deterministically) reused across the ordered
|
|
102
|
+
* SJ1→SJ2 lifecycle checks. SchedulingEngine is a singleton accessed directly by the checks.
|
|
103
|
+
*/
|
|
104
|
+
export interface ScheduledJobsFixture {
|
|
105
|
+
Job: MJScheduledJobEntity;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Shared fixture for the `field-rules-bulk-update` bundle: the resolved entity ID + the IDs of the
|
|
109
|
+
* three throwaway `MJ: Action Categories` created in setup and reused across the ordered FR1→FR3 checks.
|
|
110
|
+
*/
|
|
111
|
+
export interface FieldRulesFixture {
|
|
112
|
+
EntityID: string;
|
|
113
|
+
Ids: string[];
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Shared fixture for the `remote-operations` bundle: a throwaway Template (+ Text content), a
|
|
117
|
+
* FieldRules Record Process, and two Action Categories, reused across the ordered RO1→RO7 checks.
|
|
118
|
+
* `ControlRunID` is set by RO6 and consumed by RO7 (the control-op run).
|
|
119
|
+
*/
|
|
120
|
+
export interface RemoteOpsFixture {
|
|
121
|
+
Tmpl: MJTemplateEntity;
|
|
122
|
+
Content: MJTemplateContentEntity;
|
|
123
|
+
Rp: MJRecordProcessEntity;
|
|
124
|
+
CatIds: string[];
|
|
125
|
+
ActEntity: string;
|
|
126
|
+
ControlRunID?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Shared fixture for the `ai-skills` bundle: the four skills + referenced FKs created/resolved in
|
|
130
|
+
* setup, plus the mutable teardown accumulators the checks append to (import checks create new skills
|
|
131
|
+
* that must be tracked). Deleted in FK-safe order: run steps+runs, grants, junctions, permissions, skills.
|
|
132
|
+
*/
|
|
133
|
+
export interface AiSkillsFixture {
|
|
134
|
+
SkillActive: MJAISkillEntity;
|
|
135
|
+
SkillDeprecated: MJAISkillEntity;
|
|
136
|
+
SkillOpen: MJAISkillEntity;
|
|
137
|
+
SkillAuto: MJAISkillEntity;
|
|
138
|
+
AnyAction: NamedRef;
|
|
139
|
+
BundledSubAgent: NamedRef;
|
|
140
|
+
GrantTargetAgent: NamedRef;
|
|
141
|
+
CreatedSkillIds: string[];
|
|
142
|
+
CreatedJunctionRows: CreatedRow[];
|
|
143
|
+
CreatedGrantIds: string[];
|
|
144
|
+
CreatedPermissionIds: string[];
|
|
145
|
+
CreatedRunFixtures: CreatedRow[];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Shared fixture for the `predictive-studio` bundle: a Pipeline → Model → Scoring Binding lineage chain
|
|
149
|
+
* (+ resolved FKs) created in setup and reused across the ordered PS1–PS5 seam checks, deleted child→parent.
|
|
150
|
+
*/
|
|
151
|
+
export interface PredictiveStudioFixture {
|
|
152
|
+
Pipeline: MJMLTrainingPipelineEntity;
|
|
153
|
+
Model: MJMLModelEntity;
|
|
154
|
+
Binding: MJMLModelScoringBindingEntity;
|
|
155
|
+
TargetEntityID: string;
|
|
156
|
+
AlgorithmID: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Shared fixture for the `remote-op-ai-authoring` bundle (live-model): one `MJ: Remote Operations` row
|
|
160
|
+
* (GenerationType='AI') created in setup and reused across the ordered RO4-1→RO4-3 checks (save→approve→emit),
|
|
161
|
+
* deleted after.
|
|
162
|
+
*/
|
|
163
|
+
export interface RemoteOpAiAuthoringFixture {
|
|
164
|
+
Op: MJRemoteOperationEntity;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Shared fixture for the `remote-op-wire-progress` bundle (client transport, needs MJAPI): a FieldRules
|
|
168
|
+
* Record Process + two Action Categories created over the wire and torn down after the WIRE1 check.
|
|
169
|
+
*/
|
|
170
|
+
export interface RemoteOpWireProgressFixture {
|
|
171
|
+
Rp: MJRecordProcessEntity;
|
|
172
|
+
CatIds: string[];
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Shared fixture for the `lists` bundle: one throwaway `MJ: Lists` row + its members (`MJ: List Details`),
|
|
176
|
+
* created in setup and reused across the ordered LS1–LS3 keyset-pagination checks, deleted after.
|
|
177
|
+
*/
|
|
178
|
+
export interface ListsFixture {
|
|
179
|
+
ListID: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Shared fixture for the `entity-writes` bundle: the resolved entity IDs the write-side checks need
|
|
183
|
+
* plus the FK-safe teardown accumulators. Nothing is created in Setup — each mutating check creates
|
|
184
|
+
* exactly the throwaway rows it needs and appends their IDs here, so teardown can delete them in
|
|
185
|
+
* REVERSE creation order (children before parents, which is FK-safe for the self-referencing
|
|
186
|
+
* `MJ: Action Categories.ParentID`). `StartedAtIso` bounds the Record Changes query window so RC
|
|
187
|
+
* fidelity never has to scan the entity's whole history.
|
|
188
|
+
*/
|
|
189
|
+
export interface EntityWritesFixture {
|
|
190
|
+
/** `EntityInfo.ID` of `MJ: Action Categories` — the low-risk throwaway fixture entity. */
|
|
191
|
+
ActionCategoryEntityID: string;
|
|
192
|
+
/** `EntityInfo.ID` of `MJ: Record Changes` — for the "versioning does not version itself" leg. */
|
|
193
|
+
RecordChangeEntityID: string;
|
|
194
|
+
/** Unique per-run name prefix stamped on every fixture row. */
|
|
195
|
+
Prefix: string;
|
|
196
|
+
/** ISO instant captured before any fixture write — the lower bound of the Record Changes window. */
|
|
197
|
+
StartedAtIso: string;
|
|
198
|
+
/** Every `MJ: Action Categories` row the bundle created, in creation order. */
|
|
199
|
+
CategoryIds: string[];
|
|
200
|
+
/** Every `MJ: Lists` row the bundle created, in creation order. */
|
|
201
|
+
ListIds: string[];
|
|
202
|
+
/** EW9's conversation fixtures (details swept before conversations). */
|
|
203
|
+
ConversationIds?: string[];
|
|
204
|
+
ConversationDetailIds?: string[];
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Shared fixture for the `open-app-teardown` bundle: the throwaway `__mj` metadata rows seeded for the
|
|
208
|
+
* teardown scenario (a used app's SchemaInfo/Entity/EntityField + a blocking RecordChange + a link-less
|
|
209
|
+
* nav Application), reused by OAT1/OAT2 and removed in FK-safe order in teardown.
|
|
210
|
+
*/
|
|
211
|
+
export interface OpenAppTeardownFixture {
|
|
212
|
+
AppSchema: string;
|
|
213
|
+
EntityID: string;
|
|
214
|
+
FieldID: string;
|
|
215
|
+
RecordChangeID: string;
|
|
216
|
+
ApplicationID: string;
|
|
217
|
+
Tag: string;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Shared fixture for the `user-routines` bundle: the resolved (never-mutated) 'Calculate Expression'
|
|
221
|
+
* Action target, the mutable FK-safe teardown accumulators, and the cross-check routine references the
|
|
222
|
+
* ordered UR1–UR16 checks read/append (e.g. RoutineDue set by UR9, run by UR10/11, deleted by UR14).
|
|
223
|
+
*/
|
|
224
|
+
export interface UserRoutinesFixture {
|
|
225
|
+
CalcActionID: string;
|
|
226
|
+
CreatedRoutineIds: string[];
|
|
227
|
+
CreatedRecipientIds: string[];
|
|
228
|
+
OrphanedActionLogIds: string[];
|
|
229
|
+
OrphanedRunIds: string[];
|
|
230
|
+
CreatedConversationIds: string[];
|
|
231
|
+
RoutineDue?: MJUserRoutineEntity;
|
|
232
|
+
RoutineFutureStart?: MJUserRoutineEntity;
|
|
233
|
+
RoutineSunset?: MJUserRoutineEntity;
|
|
234
|
+
RoutineSeed?: MJUserRoutineEntity;
|
|
235
|
+
FirstRunId?: string | null;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Shared fixture for the `permission-engine` bundle's MUTATION checks only (PE11/PE12). Setup is
|
|
239
|
+
* gated on `IsTierEnabled('mutation')`, so on the deterministic path this fixture is undefined and
|
|
240
|
+
* those two checks skip-as-pass — PE1–PE10 are entirely read-only. The rows are two throwaway
|
|
241
|
+
* `MJ: Permission Domains` records: one naming a class that is NEVER registered (proving an
|
|
242
|
+
* unresolvable domain is skipped, not fatal) and one naming a deliberately-throwing provider
|
|
243
|
+
* (proving the `GetAllUserPermissions` fan-out is fault-isolated).
|
|
244
|
+
*/
|
|
245
|
+
export interface PermissionEngineFixture {
|
|
246
|
+
/** Name of the domain row whose `ProviderClassName` is never registered on the ClassFactory. */
|
|
247
|
+
UnresolvableDomainName: string;
|
|
248
|
+
/** Name of the domain row bound to the deliberately-throwing provider class. */
|
|
249
|
+
ThrowingDomainName: string;
|
|
250
|
+
/** Every domain Name this bundle created — used to exclude them when auditing REAL domains. */
|
|
251
|
+
CreatedDomainNames: string[];
|
|
252
|
+
/** IDs of the created domain rows, deleted in a best-effort Teardown. */
|
|
253
|
+
CreatedDomainIds: string[];
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Shared fixture for the `transaction-groups` bundle (client transport, mutating): the resolved
|
|
257
|
+
* `MJ: Action Categories` entity ID plus the unique per-run name prefix stamped on every fixture
|
|
258
|
+
* row. Teardown sweeps ALL categories whose Name starts with the prefix (children before parents),
|
|
259
|
+
* so even a check that fails mid-transaction — or a pre-fix scope-bypass run that leaked a row —
|
|
260
|
+
* cannot orphan fixtures. The TG4 API-key fixtures (key + scope rules + usage logs) self-clean
|
|
261
|
+
* inside the check's own try/finally, mirroring the `api-keys` bundle's AK3.
|
|
262
|
+
*/
|
|
263
|
+
export interface TransactionGroupsFixture {
|
|
264
|
+
/** `EntityInfo.ID` of `MJ: Action Categories` — the low-risk throwaway fixture entity. */
|
|
265
|
+
ActionCategoryEntityID: string;
|
|
266
|
+
/** Unique per-run name prefix stamped on every fixture row (swept by teardown via LIKE). */
|
|
267
|
+
Prefix: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Shared fixture for the `templates` bundle: one throwaway `MJ: Templates` row (+ its Text
|
|
271
|
+
* `MJ: Template Contents` and the two `MJ: Template Params` created in setup — a required
|
|
272
|
+
* param and a defaulted param) rendered through the REAL TemplateEngineServer by the ordered
|
|
273
|
+
* TP checks. Teardown deletes params (including any the render pipeline auto-extracted),
|
|
274
|
+
* then content, then the template (FK-safe order).
|
|
275
|
+
*/
|
|
276
|
+
export interface TemplatesFixture {
|
|
277
|
+
/** The throwaway `MJ: Templates` fixture row (Name carries the unique run prefix). */
|
|
278
|
+
Template: MJTemplateEntity;
|
|
279
|
+
/** The Text-type `MJ: Template Contents` row holding the fixture template body. */
|
|
280
|
+
Content: MJTemplateContentEntity;
|
|
281
|
+
/** The exact template body written to Content.TemplateText (round-trip baseline). */
|
|
282
|
+
TemplateText: string;
|
|
283
|
+
/** Unique per-run name for FindTemplate lookups. */
|
|
284
|
+
TemplateName: string;
|
|
285
|
+
/** IDs of the `MJ: Template Params` rows created in setup (teardown also sweeps auto-extracted ones). */
|
|
286
|
+
ParamIds: string[];
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Shared fixture for the `communication` bundle (DryRun end-to-end): the Active communication
|
|
290
|
+
* provider (+ message type) selected from live metadata whose provider class is registered on
|
|
291
|
+
* the ClassFactory, plus the unique per-run subject marker used to find (and tear down) the
|
|
292
|
+
* Communication Run/Log audit rows the dry-run send creates. `Provider` is undefined when the
|
|
293
|
+
* deployment has no usable provider — the checks then skip-as-pass loudly.
|
|
294
|
+
*/
|
|
295
|
+
export interface CommunicationFixture {
|
|
296
|
+
/** Name of the selected Active provider (undefined ⇒ checks skip-as-pass). */
|
|
297
|
+
ProviderName?: string;
|
|
298
|
+
/** Name of the selected provider message type. */
|
|
299
|
+
MessageTypeName?: string;
|
|
300
|
+
/** Why no provider was usable (for the skip note), when ProviderName is undefined. */
|
|
301
|
+
SkipReason?: string;
|
|
302
|
+
/** Unique per-run subject marker stamped on the dry-run message for audit-row lookup + teardown. */
|
|
303
|
+
SubjectMarker: string;
|
|
304
|
+
/** Communication Log IDs discovered/created by the checks (torn down best-effort). */
|
|
305
|
+
LogIds: string[];
|
|
306
|
+
/** Communication Run IDs discovered/created by the checks (torn down best-effort, after logs). */
|
|
307
|
+
RunIds: string[];
|
|
308
|
+
/** Set by CM2 (the dry-run send) for CM3's audit assertions. */
|
|
309
|
+
DryRunResultSuccess?: boolean;
|
|
310
|
+
DryRunResultMarked?: boolean;
|
|
311
|
+
}
|
|
312
|
+
/** The bootstrapped, run-scoped real provider stack handed to every check. */
|
|
313
|
+
/**
|
|
314
|
+
* Accumulator fixture for the `conversation-compaction` bundle (CC1–CC10, graduated from
|
|
315
|
+
* conversation-compaction-tests.ts / PR #2732). Unlike the create-up-front fixtures above,
|
|
316
|
+
* compaction fixtures are created INSIDE the ordered checks (CC1 creates the conversation the
|
|
317
|
+
* CC2–CC7 window checks then reuse), so the lifecycle's job is accumulation + guaranteed
|
|
318
|
+
* FK-ordered teardown (steps → runs → details → conversations), not up-front setup.
|
|
319
|
+
* `AgentRuns`/`Steps` are typed as BaseEntity-compatible records via their entity interfaces'
|
|
320
|
+
* Delete surface only — the bundle stores the extended AI entities it created.
|
|
321
|
+
*/
|
|
322
|
+
export interface ConversationCompactionFixture {
|
|
323
|
+
/** Conversation + ordered detail rows, per fixture conversation created by a check. */
|
|
324
|
+
Conversations: Array<{
|
|
325
|
+
Conversation: MJConversationEntity;
|
|
326
|
+
Details: MJConversationDetailEntity[];
|
|
327
|
+
}>;
|
|
328
|
+
/** Tagged MJ: AI Agent Runs fixture rows (deleted before conversations). */
|
|
329
|
+
AgentRuns: Array<{
|
|
330
|
+
Delete(): Promise<boolean>;
|
|
331
|
+
}>;
|
|
332
|
+
/** Tagged MJ: AI Agent Run Steps fixture rows (deleted first). */
|
|
333
|
+
Steps: Array<{
|
|
334
|
+
Delete(): Promise<boolean>;
|
|
335
|
+
}>;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Shared fixture for the `agent-skills-live` bundle (SL1–SL5, live-model): the resolved IT: Probe
|
|
339
|
+
* Skill ID + the run IDs the checks create over real agent runs. Every AI Agent Run the bundle
|
|
340
|
+
* spawns (initial + any resumed) is accumulated here so teardown can FK-order-delete its steps,
|
|
341
|
+
* any MJ: AI Agent Requests rows, and the run itself. No skills/agents are mutated — the roster is
|
|
342
|
+
* seeded metadata, referenced read-only.
|
|
343
|
+
*/
|
|
344
|
+
export interface AgentSkillsLiveFixture {
|
|
345
|
+
/** Resolved ID of the seeded 'IT: Probe Skill' (RequestedOnly, bundles Calculate Expression). */
|
|
346
|
+
ProbeSkillID: string;
|
|
347
|
+
/** Every AI Agent Run this bundle created (initial + resumed), swept child-first in teardown. */
|
|
348
|
+
CreatedRunIds: string[];
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Shared fixture for the `agent-plan-mode` bundle (PM1–PM6, live-model): the run IDs the checks
|
|
352
|
+
* spawn (initial paused runs AND the entity-driven resumed runs discovered via ResumingAgentRunID)
|
|
353
|
+
* plus the MJ: AI Agent Requests rows the plan gate creates. Teardown deletes requests → steps →
|
|
354
|
+
* runs (FK-safe). The plan/always-plan agents themselves are seeded metadata, referenced read-only.
|
|
355
|
+
*/
|
|
356
|
+
export interface AgentPlanModeFixture {
|
|
357
|
+
/** Every AI Agent Run this bundle created — initial paused runs AND resumed runs. */
|
|
358
|
+
CreatedRunIds: string[];
|
|
359
|
+
/** Every MJ: AI Agent Requests row the plan gate created (deleted before the runs they link). */
|
|
360
|
+
CreatedRequestIds: string[];
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Accumulator fixture for the `agent-compaction-e2e` bundle (CE1–CE9): the fabricated conversation
|
|
364
|
+
* histories (created INSIDE the checks, fabricate-then-observe) + the AI Agent Run IDs the live
|
|
365
|
+
* turns spawn. Teardown deletes run steps → runs → conversation details → conversations (FK-safe).
|
|
366
|
+
*/
|
|
367
|
+
export interface AgentCompactionE2EFixture {
|
|
368
|
+
/** Fabricated conversation + ordered detail rows per fixture history a check created. */
|
|
369
|
+
Conversations: Array<{
|
|
370
|
+
Conversation: MJConversationEntity;
|
|
371
|
+
Details: MJConversationDetailEntity[];
|
|
372
|
+
}>;
|
|
373
|
+
/** Every AI Agent Run the live compaction-observing turns created. */
|
|
374
|
+
CreatedRunIds: string[];
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Shared fixture for the `agent-memory-guards` bundle (MG1–MG5, live-model): the per-run marker
|
|
378
|
+
* string that isolates + cleans up the MJ: AI Agent Notes rows the writes create (the rig's
|
|
379
|
+
* isolation technique), plus the AI Agent Run IDs. Teardown deletes notes carrying the marker,
|
|
380
|
+
* then run steps → runs. The IT: Memory Writer agent is seeded metadata, referenced read-only.
|
|
381
|
+
*/
|
|
382
|
+
export interface AgentMemoryGuardsFixture {
|
|
383
|
+
/** Unique per-run marker embedded in every instructed memory-write content string. */
|
|
384
|
+
Marker: string;
|
|
385
|
+
/** Every AI Agent Run this bundle created (swept child-first after the marker notes). */
|
|
386
|
+
CreatedRunIds: string[];
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Shared fixture for the `agent-rag-search` bundle (RS1–RS7, split-tier): the seeded sentinel
|
|
390
|
+
* MJ: AI Agent Notes rows (the searchable corpus), the resolved IT: Integration Test Scope ID, the
|
|
391
|
+
* marker/log prefix used for isolation + audit-row sweep, and the AI Agent Run IDs the live legs
|
|
392
|
+
* spawn. Teardown deletes the seeded notes, the SearchExecutionLog audit rows carrying the prefix,
|
|
393
|
+
* then run steps → runs.
|
|
394
|
+
*/
|
|
395
|
+
export interface AgentRagSearchFixture {
|
|
396
|
+
/** Resolved ID of the seeded 'IT: Integration Test Scope' (Database provider, MJ: AI Agent Notes). */
|
|
397
|
+
ScopeID: string;
|
|
398
|
+
/** Unique per-run sentinel token embedded in the seeded notes' text (≥3 chars, isolates the corpus). */
|
|
399
|
+
Marker: string;
|
|
400
|
+
/** Query prefix stamped on every SearchEngine query so teardown can sweep the audit rows. */
|
|
401
|
+
LogQueryPrefix: string;
|
|
402
|
+
/** IDs of ALL sentinel MJ: AI Agent Notes rows created in Setup (in-scope + excluded; deleted in teardown). */
|
|
403
|
+
SeededNoteIds: string[];
|
|
404
|
+
/** Subset of SeededNoteIds carrying the IT-SCOPE-EXCLUDED marker (must be filtered out by the scope). */
|
|
405
|
+
ExcludedNoteIds: string[];
|
|
406
|
+
/** Every AI Agent Run the live legs (RS4/RS6) created. */
|
|
407
|
+
CreatedRunIds: string[];
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Shared accumulator fixture for the LIVE-MODEL, CLIENT-TRANSPORT agent bundles (`agent-loop-live`,
|
|
411
|
+
* `shipped-agents-live`, `agent-carry-forward`). Each bundle gets its own instance on its own context
|
|
412
|
+
* field. Unlike create-up-front fixtures, these accumulate IDs as the ordered checks run real wire
|
|
413
|
+
* runs + hand-fabricate prior state, then the lifecycle Teardown removes everything FK-ordered:
|
|
414
|
+
* live runs are purged (AIPromptRuns → AIAgentRunSteps → AIAgentRun), fabricated tool steps + prior
|
|
415
|
+
* runs deleted, then every ConversationDetail in each fixture conversation, then the conversation.
|
|
416
|
+
* All rows carry the "(mj-integration-test — safe to delete)" tag. `Marker` isolates this run's rows.
|
|
417
|
+
*/
|
|
418
|
+
export interface AgentLiveFixture {
|
|
419
|
+
/** Unique per-run marker embedded in fixture names for isolation. */
|
|
420
|
+
Marker: string;
|
|
421
|
+
/** Fixture conversation IDs (deleted last; their details are swept first). */
|
|
422
|
+
ConversationIds: string[];
|
|
423
|
+
/** ConversationDetail IDs the checks explicitly created (teardown also sweeps run-created details). */
|
|
424
|
+
ConversationDetailIds: string[];
|
|
425
|
+
/** AIAgentRun IDs produced by real wire runs — FK-purged (prompt runs → steps → run) in teardown. */
|
|
426
|
+
LiveRunIds: string[];
|
|
427
|
+
/** Hand-fabricated prior AIAgentRun IDs (fabricate-then-observe) — deleted after their steps. */
|
|
428
|
+
FabricatedRunIds: string[];
|
|
429
|
+
/** Hand-fabricated AIAgentRunStep IDs (the prior-turn Tool steps) — deleted before their runs. */
|
|
430
|
+
FabricatedStepIds: string[];
|
|
431
|
+
}
|
|
432
|
+
export interface IntegrationCheckContext {
|
|
433
|
+
/** Resolved context user threaded from the engine (server) or bootstrap. */
|
|
434
|
+
User: UserInfo;
|
|
435
|
+
/** Run-scoped provider — SQLServerDataProvider (server) or GraphQLDataProvider (client). */
|
|
436
|
+
Provider: IMetadataProvider;
|
|
437
|
+
/** Instrumented cache wrapper: per-category Get/Set counters; ResetCounts(). */
|
|
438
|
+
Storage: InstrumentedLocalStorageProvider;
|
|
439
|
+
/** Present for server-side bundles that need raw SQL fixtures; undefined for client bundles. */
|
|
440
|
+
Pool?: sql.ConnectionPool;
|
|
441
|
+
/** Core schema (e.g. '__mj') for fixture SQL that references views directly. */
|
|
442
|
+
Schema?: string;
|
|
443
|
+
/** Bundle-specific setup state populated by the driver/script before the bundle runs. */
|
|
444
|
+
Fixtures?: RunQueryFixtures;
|
|
445
|
+
/** Discovered two-user RLS fixture for the `rls-isolation` bundle (suite-scoped). */
|
|
446
|
+
RlsFixture?: RlsFixture;
|
|
447
|
+
/** Shared fixture for the `record-process-facade` bundle (setup → checks → teardown). */
|
|
448
|
+
RpFacadeFixture?: RecordProcessFacadeFixture;
|
|
449
|
+
/** Shared fixture for the `scheduled-jobs` bundle. */
|
|
450
|
+
ScheduledJobsFixture?: ScheduledJobsFixture;
|
|
451
|
+
/** Shared fixture for the `field-rules-bulk-update` bundle. */
|
|
452
|
+
FieldRulesFixture?: FieldRulesFixture;
|
|
453
|
+
/** Shared fixture for the `remote-operations` bundle. */
|
|
454
|
+
RemoteOpsFixture?: RemoteOpsFixture;
|
|
455
|
+
/** Shared fixture for the `ai-skills` bundle. */
|
|
456
|
+
AiSkillsFixture?: AiSkillsFixture;
|
|
457
|
+
/** Shared fixture for the `predictive-studio` bundle. */
|
|
458
|
+
PredictiveStudioFixture?: PredictiveStudioFixture;
|
|
459
|
+
/** Shared fixture for the `remote-op-ai-authoring` bundle (live-model). */
|
|
460
|
+
RemoteOpAiAuthoringFixture?: RemoteOpAiAuthoringFixture;
|
|
461
|
+
/** Shared fixture for the `remote-op-wire-progress` bundle (client transport). */
|
|
462
|
+
RemoteOpWireProgressFixture?: RemoteOpWireProgressFixture;
|
|
463
|
+
/** Shared fixture for the `lists` bundle. */
|
|
464
|
+
ListsFixture?: ListsFixture;
|
|
465
|
+
/** Shared fixture for the `open-app-teardown` bundle. */
|
|
466
|
+
OpenAppTeardownFixture?: OpenAppTeardownFixture;
|
|
467
|
+
/** Shared fixture for the `entity-writes` bundle (client transport, mutating). */
|
|
468
|
+
EntityWritesFixture?: EntityWritesFixture;
|
|
469
|
+
/** Shared fixture for the `transaction-groups` bundle (client transport, mutating). */
|
|
470
|
+
TransactionGroupsFixture?: TransactionGroupsFixture;
|
|
471
|
+
/** Shared fixture for the `user-routines` bundle. */
|
|
472
|
+
UserRoutinesFixture?: UserRoutinesFixture;
|
|
473
|
+
/** Shared fixture for the `permission-engine` bundle's mutation checks (PE11/PE12) only. */
|
|
474
|
+
PermissionEngineFixture?: PermissionEngineFixture;
|
|
475
|
+
/** Accumulator fixture for the `conversation-compaction` bundle (created by checks, torn down by lifecycle). */
|
|
476
|
+
CompactionFixture?: ConversationCompactionFixture;
|
|
477
|
+
/** Shared fixture for the `agent-skills-live` bundle (live-model). */
|
|
478
|
+
AgentSkillsLiveFixture?: AgentSkillsLiveFixture;
|
|
479
|
+
/** Shared fixture for the `agent-plan-mode` bundle (live-model). */
|
|
480
|
+
AgentPlanModeFixture?: AgentPlanModeFixture;
|
|
481
|
+
/** Accumulator fixture for the `agent-compaction-e2e` bundle (fabricate-then-observe). */
|
|
482
|
+
AgentCompactionE2EFixture?: AgentCompactionE2EFixture;
|
|
483
|
+
/** Shared fixture for the `agent-memory-guards` bundle (live-model, marker-isolated). */
|
|
484
|
+
AgentMemoryGuardsFixture?: AgentMemoryGuardsFixture;
|
|
485
|
+
/** Shared fixture for the `agent-rag-search` bundle (split-tier: deterministic engine + live agent legs). */
|
|
486
|
+
AgentRagSearchFixture?: AgentRagSearchFixture;
|
|
487
|
+
/** Shared fixture for the `templates` bundle. */
|
|
488
|
+
TemplatesFixture?: TemplatesFixture;
|
|
489
|
+
/** Shared fixture for the `communication` bundle (DryRun end-to-end). */
|
|
490
|
+
CommunicationFixture?: CommunicationFixture;
|
|
491
|
+
/** Accumulator fixture for the `agent-loop-live` bundle (live-model, client transport). */
|
|
492
|
+
AgentLoopLiveFixture?: AgentLiveFixture;
|
|
493
|
+
/** Accumulator fixture for the `shipped-agents-live` bundle (live-model, client transport). */
|
|
494
|
+
ShippedAgentsLiveFixture?: AgentLiveFixture;
|
|
495
|
+
/** Accumulator fixture for the `agent-carry-forward` bundle (live-model, client transport, fabricate-then-observe). */
|
|
496
|
+
AgentCarryForwardFixture?: AgentLiveFixture;
|
|
497
|
+
/**
|
|
498
|
+
* The opaque per-selector `config` bag from `Test.Configuration.checks[].config`,
|
|
499
|
+
* set by the driver/script before each bundle runs. Bundles read their own keys
|
|
500
|
+
* from it (e.g. `dataset-cache` reads `datasetName`, `aggregates-cache` reads
|
|
501
|
+
* `entityName`) with sensible defaults when absent.
|
|
502
|
+
*/
|
|
503
|
+
Config?: Record<string, unknown>;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* A single integration check. THROWS on failure (the harness Assert* helpers
|
|
507
|
+
* throw); returns on pass.
|
|
508
|
+
*/
|
|
509
|
+
export type IntegrationCheckFn = (ctx: IntegrationCheckContext) => Promise<void>;
|
|
510
|
+
/** A registered check. Id is '<bundle>.<localId>', e.g. 'server-cache.S1'. */
|
|
511
|
+
export interface NamedCheck {
|
|
512
|
+
Id: string;
|
|
513
|
+
Name: string;
|
|
514
|
+
Fn: IntegrationCheckFn;
|
|
515
|
+
/** Gated tier — runs only when RUN_MUTATION_TESTS is set (mutation-active checks). */
|
|
516
|
+
RequiresMutation?: boolean;
|
|
517
|
+
/** Gated tier — runs only when RUN_AGENT_TESTS is set (live-model checks). */
|
|
518
|
+
RequiresLiveModel?: boolean;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Bundle-scoped setup/teardown for a mutating bundle. Setup creates the shared fixture and assigns
|
|
522
|
+
* it onto the context (e.g. `ctx.AiSkillsFixture = ...`); Teardown removes everything the bundle
|
|
523
|
+
* created in FK-safe order. The driver and the standalone dispatcher scripts both wrap a bundle's
|
|
524
|
+
* checks in `Setup` → run → `Teardown` (guaranteed finally), so the two front-ends share one
|
|
525
|
+
* definition. Teardown must be best-effort (never throw) so a check failure still cleans up.
|
|
526
|
+
*/
|
|
527
|
+
export interface BundleLifecycle {
|
|
528
|
+
Setup(ctx: IntegrationCheckContext): Promise<void>;
|
|
529
|
+
Teardown(ctx: IntegrationCheckContext): Promise<void>;
|
|
530
|
+
}
|
|
531
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../src/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACpG,OAAO,KAAK,EACR,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,6BAA6B,EAC7B,mBAAmB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KA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AC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,kBAAkB,CAAC;IACvB,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC5B,KAAK,CAAC,GAAG,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,QAAQ,CAAC,GAAG,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD"}
|
package/dist/check.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../src/check.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-test.check.d.ts","sourceRoot":"","sources":["../../src/checks/self-test.check.ts"],"names":[],"mappings":""}
|