@systemfsoftware/stryker-js-cli-contract 0.3.0 → 2.0.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/CHANGELOG.md +74 -0
- package/README.md +12 -10
- package/contract/span-taxonomy.json +52 -0
- package/contract/stock-catalog.json +3 -3
- package/contract/stream.schema.json +663 -154
- package/dist/index.d.mts +1839 -55
- package/dist/index.mjs +180 -53
- package/package.json +13 -11
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
2
|
import * as S from "effect/Schema";
|
|
3
|
-
import { Schema, SchemaGetter } from "effect";
|
|
3
|
+
import { Effect, Schema, SchemaGetter } from "effect";
|
|
4
4
|
import * as SchemaGetter$1 from "effect/SchemaGetter";
|
|
5
|
+
import * as SchemaTransformation from "effect/SchemaTransformation";
|
|
5
6
|
import { Mutant, Plugin, Report } from "@systemfsoftware/stryker-js-plugin-interface";
|
|
6
7
|
//#region src/output-mode.schema.ts
|
|
7
8
|
const OutputMode = S.Literals(["human", "machine"]);
|
|
@@ -32,7 +33,26 @@ const PluginLoadFailureReason = Schema.Union([
|
|
|
32
33
|
]);
|
|
33
34
|
//#endregion
|
|
34
35
|
//#region src/shard-plan.schema.ts
|
|
35
|
-
const ShardPlanVersion = S.Literal(
|
|
36
|
+
const ShardPlanVersion = S.Literal(2);
|
|
37
|
+
const ShardPlanUnscoped = S.TaggedStruct("Unscoped", {});
|
|
38
|
+
const ShardPlanDiffScoped = S.TaggedStruct("DiffScoped", {
|
|
39
|
+
base: S.NonEmptyString,
|
|
40
|
+
head: S.NonEmptyString,
|
|
41
|
+
sources: S.String,
|
|
42
|
+
files: S.Array(S.String)
|
|
43
|
+
});
|
|
44
|
+
const ShardPlanFullScope = S.TaggedStruct("FullScope", {
|
|
45
|
+
base: S.NonEmptyString,
|
|
46
|
+
head: S.NonEmptyString,
|
|
47
|
+
sources: S.String,
|
|
48
|
+
files: S.Array(S.String),
|
|
49
|
+
reason: S.NonEmptyString
|
|
50
|
+
});
|
|
51
|
+
const ShardPlanScope = S.Union([
|
|
52
|
+
ShardPlanUnscoped,
|
|
53
|
+
ShardPlanDiffScoped,
|
|
54
|
+
ShardPlanFullScope
|
|
55
|
+
]);
|
|
36
56
|
const ShardProject = S.Struct({
|
|
37
57
|
project: S.String,
|
|
38
58
|
mutants: S.Array(S.String)
|
|
@@ -50,6 +70,7 @@ const shardLabelsAreUnique = S.makeFilter((shards) => {
|
|
|
50
70
|
}, { arbitraryConstraint: { uniqueBy: labelOf } });
|
|
51
71
|
const ShardPlan = S.Struct({
|
|
52
72
|
version: ShardPlanVersion,
|
|
73
|
+
scope: ShardPlanScope,
|
|
53
74
|
targetSeconds: S.Finite,
|
|
54
75
|
shards: S.Array(Shard).check(shardLabelsAreUnique),
|
|
55
76
|
matrix: S.Struct({ include: S.Array(S.Struct({
|
|
@@ -59,14 +80,15 @@ const ShardPlan = S.Struct({
|
|
|
59
80
|
});
|
|
60
81
|
//#endregion
|
|
61
82
|
//#region src/stream-version.schema.ts
|
|
62
|
-
const StreamSchemaVersion = S.Literal("
|
|
83
|
+
const StreamSchemaVersion = S.Literal("10.0");
|
|
63
84
|
//#endregion
|
|
64
85
|
//#region src/run-event.schema.ts
|
|
65
86
|
const RunPhase = S.Literals([
|
|
66
87
|
"prepare",
|
|
67
88
|
"instrument",
|
|
68
89
|
"dry-run",
|
|
69
|
-
"mutation-test"
|
|
90
|
+
"mutation-test",
|
|
91
|
+
"reporting"
|
|
70
92
|
]);
|
|
71
93
|
const RunId = S.String.pipe(S.check(S.isPattern(/^[0-9A-HJKMNP-TV-Z]{26}$/u)), S.brand("RunId"));
|
|
72
94
|
var RunStarted = class extends S.TaggedClass()("stream", {
|
|
@@ -79,9 +101,46 @@ var PhaseEntered = class extends S.TaggedClass()("phase", {
|
|
|
79
101
|
phase: RunPhase,
|
|
80
102
|
elapsedMs: Report.NonNegativeFinite
|
|
81
103
|
}) {};
|
|
104
|
+
const ReuseRefusals = S.Struct({
|
|
105
|
+
semanticsChanged: Report.NonNegativeInt,
|
|
106
|
+
policyChanged: Report.NonNegativeInt,
|
|
107
|
+
runInputsChanged: Report.NonNegativeInt,
|
|
108
|
+
closureChanged: Report.NonNegativeInt,
|
|
109
|
+
closureAnalysisFailed: S.optionalKey(Report.NonNegativeInt),
|
|
110
|
+
programChanged: S.optionalKey(Report.NonNegativeInt),
|
|
111
|
+
timeoutUnreproduced: Report.NonNegativeInt,
|
|
112
|
+
flakyDependency: Report.NonNegativeInt,
|
|
113
|
+
noPriorRecord: Report.NonNegativeInt,
|
|
114
|
+
decidedPerRun: S.optionalKey(Report.NonNegativeInt)
|
|
115
|
+
});
|
|
116
|
+
const PlanReportDiscardReason = S.Literals([
|
|
117
|
+
"noPriorRecord",
|
|
118
|
+
"cacheLayoutChanged",
|
|
119
|
+
"semanticsChanged",
|
|
120
|
+
"policyChanged",
|
|
121
|
+
"runInputsChanged"
|
|
122
|
+
]);
|
|
123
|
+
/**
|
|
124
|
+
* Why a whole incremental report was discarded before planning: its reason
|
|
125
|
+
* vocabulary matches the engine's report admission, and `actual`/`expected`
|
|
126
|
+
* repeat the mismatching identity when the reason names one.
|
|
127
|
+
*/
|
|
128
|
+
const PlanReportDiscard = S.Struct({
|
|
129
|
+
reason: PlanReportDiscardReason,
|
|
130
|
+
actual: S.optionalKey(S.String),
|
|
131
|
+
expected: S.String
|
|
132
|
+
});
|
|
133
|
+
const PlanProjectReuse = S.Struct({
|
|
134
|
+
project: S.String,
|
|
135
|
+
reused: Report.NonNegativeInt,
|
|
136
|
+
ran: Report.NonNegativeInt,
|
|
137
|
+
refused: ReuseRefusals,
|
|
138
|
+
discard: S.optionalKey(PlanReportDiscard)
|
|
139
|
+
});
|
|
82
140
|
var PlanKnown = class extends S.TaggedClass()("plan", {
|
|
83
141
|
total: Report.NonNegativeInt,
|
|
84
|
-
shardPlan: S.NullOr(ShardPlan)
|
|
142
|
+
shardPlan: S.NullOr(ShardPlan),
|
|
143
|
+
projects: PlanProjectReuse.pipe(S.Array, S.optionalKey)
|
|
85
144
|
}) {};
|
|
86
145
|
const WorkerRole = S.Literals(["testRunner", "checker"]);
|
|
87
146
|
var WorkerReported = class extends S.TaggedClass()("worker", {
|
|
@@ -96,15 +155,8 @@ const MutantCost = S.Struct({
|
|
|
96
155
|
testsExecuted: Report.NonNegativeInt,
|
|
97
156
|
shared: S.Boolean
|
|
98
157
|
});
|
|
99
|
-
|
|
100
|
-
* The machine-stream line a tested mutant is published as. Its wire shape is a
|
|
101
|
-
* published contract: the `mutant` tag and the `file`/`mutator` keys must not
|
|
102
|
-
* change. The line carries the verified fields of `Reporter.MutantTested` plus
|
|
103
|
-
* the static classification (R24) and the measured cost breakdown (R39).
|
|
104
|
-
*/
|
|
105
|
-
var RunMutantTestedEvent = class extends S.TaggedClass()("mutantTested", {
|
|
158
|
+
const mutantTestedFields = {
|
|
106
159
|
id: Mutant.MutantId,
|
|
107
|
-
status: Mutant.MutantStatusSchema,
|
|
108
160
|
fileName: Mutant.CanonicalFileName,
|
|
109
161
|
location: Mutant.Location,
|
|
110
162
|
mutatorName: Mutant.MutatorName,
|
|
@@ -112,11 +164,26 @@ var RunMutantTestedEvent = class extends S.TaggedClass()("mutantTested", {
|
|
|
112
164
|
completed: Report.NonNegativeInt,
|
|
113
165
|
total: Report.NonNegativeInt,
|
|
114
166
|
static: S.Boolean,
|
|
115
|
-
cost: S.NullOr(MutantCost)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
167
|
+
cost: S.NullOr(MutantCost),
|
|
168
|
+
subsumption: S.NullOr(Mutant.Subsumption)
|
|
169
|
+
};
|
|
170
|
+
const IgnoredStatusReason = S.Struct({
|
|
171
|
+
status: S.Literal("Ignored"),
|
|
172
|
+
statusReason: Mutant.IgnoreStatusReasonText
|
|
173
|
+
});
|
|
174
|
+
const SettledStatusReason = S.Struct({
|
|
175
|
+
status: Mutant.SettledStatusSchema,
|
|
176
|
+
statusReason: S.NullOr(S.String)
|
|
177
|
+
});
|
|
178
|
+
const statusReasonCheck = S.makeFilter(S.is(S.Union([IgnoredStatusReason, SettledStatusReason])), { expected: "an Ignored mutant whose statusReason names an ignore rule (`<rule-id>: <detail>`)" });
|
|
179
|
+
const subsumptionCheck = S.makeFilter((line) => line.subsumption === null || Mutant.subsumptionMatchesStatus(line.subsumption, line.status), { expected: "a Subsumed reference only on an Ignored mutant, and a Readmitted one only on a mutant that is not Ignored" });
|
|
180
|
+
var RunMutantTestedEvent = class extends S.TaggedClass()("mutantTested", S.Struct({
|
|
181
|
+
...mutantTestedFields,
|
|
119
182
|
status: Mutant.MutantStatusSchema,
|
|
183
|
+
statusReason: S.NullOr(S.String)
|
|
184
|
+
}).check(statusReasonCheck, subsumptionCheck)) {};
|
|
185
|
+
const mutantWireFields = {
|
|
186
|
+
id: Mutant.MutantId,
|
|
120
187
|
file: S.toType(Mutant.CanonicalFileName),
|
|
121
188
|
location: Mutant.Location,
|
|
122
189
|
mutator: Mutant.MutatorName,
|
|
@@ -124,24 +191,35 @@ const RunMutantTested = S.TaggedStruct("mutant", {
|
|
|
124
191
|
completed: Report.NonNegativeInt,
|
|
125
192
|
total: Report.NonNegativeInt,
|
|
126
193
|
static: S.Boolean,
|
|
127
|
-
cost: S.NullOr(MutantCost)
|
|
128
|
-
|
|
194
|
+
cost: S.NullOr(MutantCost),
|
|
195
|
+
subsumption: S.NullOr(Mutant.Subsumption)
|
|
196
|
+
};
|
|
197
|
+
S.Struct(mutantWireFields);
|
|
198
|
+
const eventFieldsOf = (line) => ({
|
|
199
|
+
id: line.id,
|
|
200
|
+
fileName: line.file,
|
|
201
|
+
location: line.location,
|
|
202
|
+
mutatorName: line.mutator,
|
|
203
|
+
replacement: line.replacement,
|
|
204
|
+
completed: line.completed,
|
|
205
|
+
total: line.total,
|
|
206
|
+
static: line.static,
|
|
207
|
+
cost: line.cost,
|
|
208
|
+
subsumption: line.subsumption
|
|
209
|
+
});
|
|
210
|
+
const RunMutantTested = S.TaggedStruct("mutant", {
|
|
211
|
+
...mutantWireFields,
|
|
212
|
+
status: Mutant.MutantStatusSchema,
|
|
213
|
+
statusReason: S.NullOr(S.String)
|
|
214
|
+
}).check(statusReasonCheck, subsumptionCheck).pipe(S.decodeTo(S.toType(RunMutantTestedEvent), {
|
|
129
215
|
decode: SchemaGetter.transform((line) => RunMutantTestedEvent.make({
|
|
130
|
-
|
|
216
|
+
...eventFieldsOf(line),
|
|
131
217
|
status: line.status,
|
|
132
|
-
|
|
133
|
-
location: line.location,
|
|
134
|
-
mutatorName: line.mutator,
|
|
135
|
-
replacement: line.replacement,
|
|
136
|
-
completed: line.completed,
|
|
137
|
-
total: line.total,
|
|
138
|
-
static: line.static,
|
|
139
|
-
cost: line.cost
|
|
218
|
+
statusReason: line.statusReason
|
|
140
219
|
})),
|
|
141
220
|
encode: SchemaGetter.transform((tested) => ({
|
|
142
221
|
_tag: "mutant",
|
|
143
222
|
id: tested.id,
|
|
144
|
-
status: tested.status,
|
|
145
223
|
file: tested.fileName,
|
|
146
224
|
location: tested.location,
|
|
147
225
|
mutator: tested.mutatorName,
|
|
@@ -149,7 +227,10 @@ const RunMutantTested = S.TaggedStruct("mutant", {
|
|
|
149
227
|
completed: tested.completed,
|
|
150
228
|
total: tested.total,
|
|
151
229
|
static: tested.static,
|
|
152
|
-
cost: tested.cost
|
|
230
|
+
cost: tested.cost,
|
|
231
|
+
subsumption: tested.subsumption,
|
|
232
|
+
status: tested.status,
|
|
233
|
+
statusReason: tested.statusReason
|
|
153
234
|
}))
|
|
154
235
|
}));
|
|
155
236
|
var Heartbeat = class extends S.TaggedClass()("tick", {
|
|
@@ -177,11 +258,19 @@ const VerdictMutant = S.Struct({
|
|
|
177
258
|
const RunScope = S.Literals(["full", "diff"]);
|
|
178
259
|
const MutantSetPolicy = S.Literals(["default", "full"]);
|
|
179
260
|
const IncrementalMode = S.Literals(["incremental", "full"]);
|
|
261
|
+
const CheckDuration = S.Union([
|
|
262
|
+
S.TaggedStruct("measured", { ms: Report.NonNegativeFinite }),
|
|
263
|
+
S.TaggedStruct("not-run", {}),
|
|
264
|
+
S.TaggedStruct("not-recorded", {})
|
|
265
|
+
]);
|
|
266
|
+
const ReportingDuration = S.Union([S.TaggedStruct("measured", { ms: Report.NonNegativeFinite }), S.TaggedStruct("not-recorded", {})]);
|
|
180
267
|
const PhaseDurations = S.Struct({
|
|
181
268
|
prepare: Report.NonNegativeFinite,
|
|
182
269
|
instrument: Report.NonNegativeFinite,
|
|
183
270
|
"dry-run": Report.NonNegativeFinite,
|
|
184
|
-
"mutation-test": Report.NonNegativeFinite
|
|
271
|
+
"mutation-test": Report.NonNegativeFinite,
|
|
272
|
+
check: CheckDuration.pipe(S.withDecodingDefaultKey(Effect.succeed({ _tag: "not-recorded" }))),
|
|
273
|
+
reporting: ReportingDuration.pipe(S.withDecodingDefaultKey(Effect.succeed({ _tag: "not-recorded" })))
|
|
185
274
|
});
|
|
186
275
|
const StaticVerdict = S.Struct({
|
|
187
276
|
count: Report.NonNegativeInt,
|
|
@@ -239,15 +328,6 @@ const SkippedFileRow = S.Struct({
|
|
|
239
328
|
reason: S.String
|
|
240
329
|
});
|
|
241
330
|
var SkippedReported = class extends S.TaggedClass()("skipped", { files: S.Array(SkippedFileRow) }) {};
|
|
242
|
-
const ReuseRefusals = S.Struct({
|
|
243
|
-
semanticsChanged: Report.NonNegativeInt,
|
|
244
|
-
policyChanged: Report.NonNegativeInt,
|
|
245
|
-
runInputsChanged: Report.NonNegativeInt,
|
|
246
|
-
closureChanged: Report.NonNegativeInt,
|
|
247
|
-
timeoutUnreproduced: Report.NonNegativeInt,
|
|
248
|
-
flakyDependency: Report.NonNegativeInt,
|
|
249
|
-
noPriorRecord: Report.NonNegativeInt
|
|
250
|
-
});
|
|
251
331
|
var ReuseReported = class extends S.TaggedClass()("reuse", {
|
|
252
332
|
reused: Report.NonNegativeInt,
|
|
253
333
|
ran: Report.NonNegativeInt,
|
|
@@ -306,17 +386,30 @@ const RunEvent = Object.assign(S.Union([
|
|
|
306
386
|
RunFailed,
|
|
307
387
|
HelpRendered,
|
|
308
388
|
Refused
|
|
309
|
-
]), { QUEUE_BOUND: 256 });
|
|
389
|
+
]).pipe(S.toTaggedUnion("_tag")), { QUEUE_BOUND: 256 });
|
|
310
390
|
//#endregion
|
|
311
391
|
//#region src/run-event-wire.schema.ts
|
|
312
392
|
const RunEventWireLine = S.String.pipe(S.decodeTo(S.fromJsonString(RunEvent), {
|
|
313
393
|
decode: SchemaGetter$1.transform((line) => line.replace(/\n$/, "")),
|
|
314
394
|
encode: SchemaGetter$1.transform((json) => `${json}\n`)
|
|
315
395
|
}));
|
|
396
|
+
const BlankLine = S.String.check(S.isPattern(/^\s*$/)).pipe(S.decodeTo(S.Null, SchemaTransformation.transform({
|
|
397
|
+
decode: () => null,
|
|
398
|
+
encode: () => ""
|
|
399
|
+
})));
|
|
400
|
+
const linesOf = (text) => text.split(/(?<=\n)/);
|
|
401
|
+
const RunEventWireText = S.String.pipe(S.decodeTo(S.Array(S.Union([BlankLine, RunEventWireLine])), SchemaTransformation.transform({
|
|
402
|
+
decode: linesOf,
|
|
403
|
+
encode: (lines) => lines.join("")
|
|
404
|
+
})), S.decodeTo(RunEvent.pipe(S.toType, S.Array), SchemaTransformation.transform({
|
|
405
|
+
decode: (lines) => lines.filter((line) => line !== null),
|
|
406
|
+
encode: (events) => events
|
|
407
|
+
})));
|
|
316
408
|
//#endregion
|
|
317
409
|
//#region src/RunEvent/mod.ts
|
|
318
410
|
var RunEvent_exports = /* @__PURE__ */ __exportAll({
|
|
319
411
|
Budget: () => Budget,
|
|
412
|
+
CheckDuration: () => CheckDuration,
|
|
320
413
|
FeedbackJudgment: () => FeedbackJudgment,
|
|
321
414
|
FeedbackReported: () => FeedbackReported,
|
|
322
415
|
FormatClaimShadowingRow: () => FormatClaimShadowingRow,
|
|
@@ -333,14 +426,19 @@ var RunEvent_exports = /* @__PURE__ */ __exportAll({
|
|
|
333
426
|
PhaseDurations: () => PhaseDurations,
|
|
334
427
|
PhaseEntered: () => PhaseEntered,
|
|
335
428
|
PlanKnown: () => PlanKnown,
|
|
429
|
+
PlanProjectReuse: () => PlanProjectReuse,
|
|
430
|
+
PlanReportDiscard: () => PlanReportDiscard,
|
|
431
|
+
PlanReportDiscardReason: () => PlanReportDiscardReason,
|
|
336
432
|
PluginLoadFailureReason: () => PluginLoadFailureReason,
|
|
337
433
|
PluginsReported: () => PluginsReported,
|
|
338
434
|
RefusalRule: () => RefusalRule,
|
|
339
435
|
Refused: () => Refused,
|
|
436
|
+
ReportingDuration: () => ReportingDuration,
|
|
340
437
|
ReuseRefusals: () => ReuseRefusals,
|
|
341
438
|
ReuseReported: () => ReuseReported,
|
|
342
439
|
RunEvent: () => RunEvent,
|
|
343
440
|
RunEventWireLine: () => RunEventWireLine,
|
|
441
|
+
RunEventWireText: () => RunEventWireText,
|
|
344
442
|
RunFailed: () => RunFailed,
|
|
345
443
|
RunId: () => RunId,
|
|
346
444
|
RunMutantTested: () => RunMutantTested,
|
|
@@ -402,6 +500,10 @@ const Spans = {
|
|
|
402
500
|
name: "stryker.checker.check_plans",
|
|
403
501
|
attributes: {}
|
|
404
502
|
},
|
|
503
|
+
checkerDigest: {
|
|
504
|
+
name: "stryker.checker.digest",
|
|
505
|
+
attributes: { "stryker.checker.name": SpanAttributeText }
|
|
506
|
+
},
|
|
405
507
|
checkerGroup: {
|
|
406
508
|
name: "stryker.checker.group",
|
|
407
509
|
attributes: {
|
|
@@ -421,6 +523,10 @@ const Spans = {
|
|
|
421
523
|
name: "stryker.checker_pool.check_plans",
|
|
422
524
|
attributes: {}
|
|
423
525
|
},
|
|
526
|
+
checkerPoolProgramDigest: {
|
|
527
|
+
name: "stryker.checker_pool.program_digest",
|
|
528
|
+
attributes: {}
|
|
529
|
+
},
|
|
424
530
|
checkerPoolSplitChecked: {
|
|
425
531
|
name: "stryker.checker_pool.split_checked",
|
|
426
532
|
attributes: {}
|
|
@@ -629,6 +735,10 @@ const Spans = {
|
|
|
629
735
|
name: "stryker.mutationReporting.emitVerdict",
|
|
630
736
|
attributes: {}
|
|
631
737
|
},
|
|
738
|
+
mutationReportingJudgeScore: {
|
|
739
|
+
name: "stryker.mutationReporting.judgeScore",
|
|
740
|
+
attributes: {}
|
|
741
|
+
},
|
|
632
742
|
mutationReportingManifestVersion: {
|
|
633
743
|
name: "stryker.mutationReporting.manifestVersion",
|
|
634
744
|
attributes: {}
|
|
@@ -812,6 +922,10 @@ const Spans = {
|
|
|
812
922
|
name: "stryker.report.progress.consumeEvent",
|
|
813
923
|
attributes: {}
|
|
814
924
|
},
|
|
925
|
+
reportSarif: {
|
|
926
|
+
name: "stryker.report.sarif",
|
|
927
|
+
attributes: {}
|
|
928
|
+
},
|
|
815
929
|
reporterStreamAttach: {
|
|
816
930
|
name: "stryker.reporterStream.attach",
|
|
817
931
|
attributes: {}
|
|
@@ -892,6 +1006,10 @@ const Spans = {
|
|
|
892
1006
|
name: "RpcClient.onEventBatch",
|
|
893
1007
|
attributes: {}
|
|
894
1008
|
},
|
|
1009
|
+
rpcDigest: {
|
|
1010
|
+
name: "rpc.digest",
|
|
1011
|
+
attributes: { "rpc.method": SpanAttributeText }
|
|
1012
|
+
},
|
|
895
1013
|
rpcDryRun: {
|
|
896
1014
|
name: "rpc.dryRun",
|
|
897
1015
|
attributes: { "rpc.method": SpanAttributeText }
|
|
@@ -948,6 +1066,10 @@ const Spans = {
|
|
|
948
1066
|
name: "RpcServer.onEventBatch",
|
|
949
1067
|
attributes: {}
|
|
950
1068
|
},
|
|
1069
|
+
rpcTypeQuery: {
|
|
1070
|
+
name: "rpc.typeQuery",
|
|
1071
|
+
attributes: { "rpc.method": SpanAttributeText }
|
|
1072
|
+
},
|
|
951
1073
|
runConclude: {
|
|
952
1074
|
name: "stryker.run.conclude",
|
|
953
1075
|
attributes: {}
|
|
@@ -1040,6 +1162,10 @@ const Spans = {
|
|
|
1040
1162
|
name: "stryker.sandbox.move_entry",
|
|
1041
1163
|
attributes: {}
|
|
1042
1164
|
},
|
|
1165
|
+
sandboxPrepare: {
|
|
1166
|
+
name: "stryker.sandbox.prepare",
|
|
1167
|
+
attributes: {}
|
|
1168
|
+
},
|
|
1043
1169
|
sandboxPreprocessDisableTypeChecks: {
|
|
1044
1170
|
name: "stryker.sandbox.preprocess.disable_type_checks",
|
|
1045
1171
|
attributes: {}
|
|
@@ -1165,6 +1291,10 @@ const Spans = {
|
|
|
1165
1291
|
name: "typescript-checker.compiler.nodes",
|
|
1166
1292
|
attributes: {}
|
|
1167
1293
|
},
|
|
1294
|
+
typescriptCheckerCompilerProgramDigest: {
|
|
1295
|
+
name: "typescript-checker.compiler.programDigest",
|
|
1296
|
+
attributes: {}
|
|
1297
|
+
},
|
|
1168
1298
|
typescriptCheckerCompilerScoped: {
|
|
1169
1299
|
name: "typescript-checker.compiler.scoped",
|
|
1170
1300
|
attributes: {}
|
|
@@ -1266,12 +1396,14 @@ const spanMembers = Object.values(Spans);
|
|
|
1266
1396
|
const rpcServedSpans = /* @__PURE__ */ new Map([
|
|
1267
1397
|
["capabilities", Spans.rpcCapabilities],
|
|
1268
1398
|
["check", Spans.rpcCheck],
|
|
1399
|
+
["digest", Spans.rpcDigest],
|
|
1269
1400
|
["dryRun", Spans.rpcDryRun],
|
|
1270
1401
|
["flush", Spans.rpcFlush],
|
|
1271
1402
|
["group", Spans.rpcGroup],
|
|
1272
1403
|
["init", Spans.rpcInit],
|
|
1273
1404
|
["mutantRun", Spans.rpcMutantRun],
|
|
1274
|
-
["onEventBatch", Spans.rpcOnEventBatch]
|
|
1405
|
+
["onEventBatch", Spans.rpcOnEventBatch],
|
|
1406
|
+
["typeQuery", Spans.rpcTypeQuery]
|
|
1275
1407
|
]);
|
|
1276
1408
|
const rpcServedSpanOf = (method) => rpcServedSpans.get(method);
|
|
1277
1409
|
//#endregion
|
|
@@ -1305,14 +1437,11 @@ const StockDefaultName = S.Literals([
|
|
|
1305
1437
|
"Regex",
|
|
1306
1438
|
"StringLiteral",
|
|
1307
1439
|
"UnaryOperator",
|
|
1308
|
-
"UpdateOperator"
|
|
1309
|
-
]);
|
|
1310
|
-
const StockOptInName = S.Literals([
|
|
1440
|
+
"UpdateOperator",
|
|
1311
1441
|
"AtomicUpdateSplit",
|
|
1312
1442
|
"SynchronizationRemoval",
|
|
1313
1443
|
"FinalizerEscape"
|
|
1314
1444
|
]);
|
|
1315
|
-
const StockMutatorName = S.Union([StockDefaultName, StockOptInName]);
|
|
1316
1445
|
const StockCatalog = {
|
|
1317
1446
|
provider: "stryker",
|
|
1318
1447
|
entries: [
|
|
@@ -1574,7 +1703,7 @@ const StockCatalog = {
|
|
|
1574
1703
|
{
|
|
1575
1704
|
id: "atomic-update-split",
|
|
1576
1705
|
name: "AtomicUpdateSplit",
|
|
1577
|
-
tier: "
|
|
1706
|
+
tier: "default",
|
|
1578
1707
|
definition: "A `Ref` or `SynchronizedRef` atomic update — `modify`, `modifySome`, `update`, `updateSome`, `updateAndGet`, `getAndUpdate` — is split into a read, a snapshot update and a write, so a lost update survives. The `Effect` module has to be in scope, and the reference and the handler have to be movable.",
|
|
1579
1708
|
examples: [
|
|
1580
1709
|
{
|
|
@@ -1603,7 +1732,7 @@ export const withoutEffect = (ref: Ref.Ref<number>) => Ref.update(ref, (n) => n
|
|
|
1603
1732
|
{
|
|
1604
1733
|
id: "synchronization-removal",
|
|
1605
1734
|
name: "SynchronizationRemoval",
|
|
1606
|
-
tier: "
|
|
1735
|
+
tier: "default",
|
|
1607
1736
|
definition: "The lock a call takes is dropped: `Semaphore.withPermits(sem, n, effect)` and `Semaphore.withPermit(sem, effect)` become the guarded effect, their piped forms become `self => self`, `Effect.uninterruptible(effect)` becomes `effect`, and `Effect.uninterruptibleMask(f)` becomes `Effect.suspend(() => f(Effect.interruptible))`. A guard that is not droppable, and a method-form call whose guard is built on the spot, are refused.",
|
|
1608
1737
|
examples: [
|
|
1609
1738
|
{
|
|
@@ -1641,7 +1770,7 @@ export const methodForm = (sem: Semaphore.Semaphore, effect: Effect.Effect<numbe
|
|
|
1641
1770
|
{
|
|
1642
1771
|
id: "finalizer-escape",
|
|
1643
1772
|
name: "FinalizerEscape",
|
|
1644
|
-
tier: "
|
|
1773
|
+
tier: "default",
|
|
1645
1774
|
definition: "A finalizer is kept only for the path that did not interrupt: `Effect.ensuring(effect, fin)` re-runs `fin` when the exit was not an interruption, `Effect.onError(effect, h)` re-runs `h` when the cause carries none, a release bracket wraps its release the same way, and `Effect.onInterrupt(effect, h)` drops the handler. A handler built by a call, and a cleanup that yields while it is moved, are refused.",
|
|
1646
1775
|
examples: [
|
|
1647
1776
|
{
|
|
@@ -1697,9 +1826,7 @@ export const localEnsuringRefusal = (effect: Effect.Effect<number>, closed: Ref.
|
|
|
1697
1826
|
//#region src/StockCatalog/mod.ts
|
|
1698
1827
|
var StockCatalog_exports = /* @__PURE__ */ __exportAll({
|
|
1699
1828
|
StockCatalog: () => StockCatalog,
|
|
1700
|
-
StockDefaultName: () => StockDefaultName
|
|
1701
|
-
StockMutatorName: () => StockMutatorName,
|
|
1702
|
-
StockOptInName: () => StockOptInName
|
|
1829
|
+
StockDefaultName: () => StockDefaultName
|
|
1703
1830
|
});
|
|
1704
1831
|
//#endregion
|
|
1705
|
-
export { OutputMode_exports as OutputMode, RunEvent_exports as RunEvent, Shard, ShardPlan, ShardPlanVersion, ShardProject, SpanTaxonomy_exports as SpanTaxonomy, StockCatalog_exports as StockCatalog };
|
|
1832
|
+
export { OutputMode_exports as OutputMode, RunEvent_exports as RunEvent, Shard, ShardPlan, ShardPlanDiffScoped, ShardPlanFullScope, ShardPlanScope, ShardPlanUnscoped, ShardPlanVersion, ShardProject, SpanTaxonomy_exports as SpanTaxonomy, StockCatalog_exports as StockCatalog };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-js-cli-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
|
|
@@ -12,36 +12,38 @@
|
|
|
12
12
|
"type": "module",
|
|
13
13
|
"files": [
|
|
14
14
|
"dist",
|
|
15
|
-
"contract"
|
|
15
|
+
"contract",
|
|
16
|
+
"CHANGELOG.md"
|
|
16
17
|
],
|
|
17
18
|
"license": "Apache-2.0",
|
|
18
19
|
"engines": {
|
|
19
20
|
"node": ">=20.0.0"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
23
|
+
"@systemfsoftware/stryker-js-plugin-interface": "^18.0.0",
|
|
24
|
+
"effect": "^4.1.0"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
|
-
"@effect/platform-node-shared": "^4.
|
|
27
|
-
"@effect/tsgo": "^0.
|
|
27
|
+
"@effect/platform-node-shared": "^4.1.0",
|
|
28
|
+
"@effect/tsgo": "^0.63.0",
|
|
28
29
|
"@microsoft/api-extractor": "^7",
|
|
29
30
|
"@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
|
|
30
31
|
"@systemfsoftware/effect-gherkin-spec": "^7.0.0",
|
|
31
32
|
"@systemfsoftware/effect-schema-law": "^5.0.0",
|
|
32
33
|
"@systemfsoftware/oxlint-config-recommended": "^4.0.0",
|
|
33
34
|
"@systemfsoftware/tsconfig": "^2.0.1",
|
|
34
|
-
"@systemfsoftware/
|
|
35
|
+
"@systemfsoftware/tsdown-config": "^0.1.0",
|
|
36
|
+
"@systemfsoftware/vitest": "^2.0.0",
|
|
37
|
+
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
35
38
|
"@types/node": "^24",
|
|
36
|
-
"oxlint": "
|
|
37
|
-
"oxlint-tsgolint": "
|
|
39
|
+
"oxlint": "~1.90.0",
|
|
40
|
+
"oxlint-tsgolint": "7.0.2005",
|
|
38
41
|
"rimraf": "^6.1.3",
|
|
39
42
|
"tsdown": "^0.23.0",
|
|
40
43
|
"tsx": "^4.23.14",
|
|
41
44
|
"typescript": "^7",
|
|
42
45
|
"vitest": "^5",
|
|
43
|
-
"
|
|
44
|
-
"@systemfsoftware/tsdown-config": "^0.1.0"
|
|
46
|
+
"yaml": "^2.9.1"
|
|
45
47
|
},
|
|
46
48
|
"publishConfig": {
|
|
47
49
|
"access": "public",
|