@systemfsoftware/stryker-js 10.1.2 → 10.2.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 +6 -0
- package/dist/{Run.schema-BsSOfQnD.d.mts → Run.schema-B-Pi3bCB.d.mts} +1 -1
- package/dist/{Run.schema-57k1klOe.mjs → Run.schema-Ba34IwAY.mjs} +687 -28
- package/dist/config.d.mts +1 -1
- package/dist/events.d.mts +1 -1
- package/dist/events.mjs +1 -1
- package/dist/{index-CogNSD0V.d.mts → index-tt2EziOT.d.mts} +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +2 -2
- package/dist/main.mjs +893 -117
- package/dist/{mutation-test.cell-DS86DvC9.d.mts → mutation-test.cell-Dq23b2NP.d.mts} +3 -2
- package/dist/promises.d.mts +2 -2
- package/dist/promises.mjs +1 -1
- package/dist/{src-jn0C-9I0.mjs → src-CcqEZJIY.mjs} +4 -3
- package/package.json +7 -7
package/dist/main.mjs
CHANGED
|
@@ -4007,6 +4007,34 @@ const map$13 = /*#__PURE__*/ dual(2, (self, f) => isNone(self) ? none() : some(f
|
|
|
4007
4007
|
*/
|
|
4008
4008
|
const flatMap$7 = /*#__PURE__*/ dual(2, (self, f) => isNone(self) ? none() : f(self.value));
|
|
4009
4009
|
/**
|
|
4010
|
+
* Flattens a nested `Option<Option<A>>` into `Option<A>`.
|
|
4011
|
+
*
|
|
4012
|
+
* **When to use**
|
|
4013
|
+
*
|
|
4014
|
+
* Use when you need to remove one layer of nested `Option`.
|
|
4015
|
+
*
|
|
4016
|
+
* **Details**
|
|
4017
|
+
*
|
|
4018
|
+
* - `Some(Some(value))` → `Some(value)`
|
|
4019
|
+
* - `Some(None)` → `None`
|
|
4020
|
+
* - `None` → `None`
|
|
4021
|
+
*
|
|
4022
|
+
* **Example** (Flattening nested Options)
|
|
4023
|
+
*
|
|
4024
|
+
* ```ts import.meta.vitest
|
|
4025
|
+
* import { Option } from "effect"
|
|
4026
|
+
*
|
|
4027
|
+
* Option.flatten(Option.some(Option.some("value"))) // => Option.some("value")
|
|
4028
|
+
* Option.flatten(Option.some(Option.none())) // => Option.none()
|
|
4029
|
+
* ```
|
|
4030
|
+
*
|
|
4031
|
+
* @see {@link flatMap} which is `map` + `flatten`
|
|
4032
|
+
*
|
|
4033
|
+
* @category sequencing
|
|
4034
|
+
* @since 2.0.0
|
|
4035
|
+
*/
|
|
4036
|
+
const flatten$3 = /*#__PURE__*/ flatMap$7(identity);
|
|
4037
|
+
/**
|
|
4010
4038
|
* Combines a structure of `Option`s (tuple, struct, or iterable) into a single
|
|
4011
4039
|
* `Option` containing the unwrapped structure.
|
|
4012
4040
|
*
|
|
@@ -6082,6 +6110,39 @@ function isOutOfBounds(i, as) {
|
|
|
6082
6110
|
return !Number.isFinite(i) || i < 0 || i >= as.length;
|
|
6083
6111
|
}
|
|
6084
6112
|
/**
|
|
6113
|
+
* Reads an element at the given index safely, returning `Option.some` or
|
|
6114
|
+
* `Option.none` if the index is out of bounds.
|
|
6115
|
+
*
|
|
6116
|
+
* **When to use**
|
|
6117
|
+
*
|
|
6118
|
+
* Use when you need to read an array element by index and handle an
|
|
6119
|
+
* out-of-bounds index as `Option.none`.
|
|
6120
|
+
*
|
|
6121
|
+
* **Details**
|
|
6122
|
+
*
|
|
6123
|
+
* The index is floored to an integer. This never throws.
|
|
6124
|
+
*
|
|
6125
|
+
* **Example** (Accessing indexes safely)
|
|
6126
|
+
*
|
|
6127
|
+
* ```ts import.meta.vitest
|
|
6128
|
+
* import { Array, Option } from "effect"
|
|
6129
|
+
*
|
|
6130
|
+
* Array.get([1, 2, 3], 1) // => Option.some(2)
|
|
6131
|
+
* Array.get([1, 2, 3], 10) // => Option.none()
|
|
6132
|
+
* ```
|
|
6133
|
+
*
|
|
6134
|
+
* @see {@link getUnsafe} for indexed access that throws when the index is out of bounds
|
|
6135
|
+
* @see {@link head} for reading the first element as an `Option`
|
|
6136
|
+
* @see {@link last} for reading the last element as an `Option`
|
|
6137
|
+
*
|
|
6138
|
+
* @category getters
|
|
6139
|
+
* @since 2.0.0
|
|
6140
|
+
*/
|
|
6141
|
+
const get$8 = /*#__PURE__*/ dual(2, (self, index) => {
|
|
6142
|
+
const i = Math.floor(index);
|
|
6143
|
+
return isOutOfBounds(i, self) ? none() : some(self[i]);
|
|
6144
|
+
});
|
|
6145
|
+
/**
|
|
6085
6146
|
* Returns the first element of an array safely wrapped in `Option.some`, or
|
|
6086
6147
|
* `Option.none` if the array is empty.
|
|
6087
6148
|
*
|
|
@@ -6104,10 +6165,7 @@ function isOutOfBounds(i, as) {
|
|
|
6104
6165
|
* @category getters
|
|
6105
6166
|
* @since 2.0.0
|
|
6106
6167
|
*/
|
|
6107
|
-
const head = /*#__PURE__*/ (
|
|
6108
|
-
const i = Math.floor(index);
|
|
6109
|
-
return isOutOfBounds(i, self) ? none() : some(self[i]);
|
|
6110
|
-
}))(0);
|
|
6168
|
+
const head = /*#__PURE__*/ get$8(0);
|
|
6111
6169
|
/**
|
|
6112
6170
|
* Returns the last element of an array safely wrapped in `Option.some`, or
|
|
6113
6171
|
* `Option.none` if the array is empty.
|
|
@@ -6155,6 +6213,38 @@ const last = (self) => isReadonlyArrayNonEmpty(self) ? some(lastNonEmpty(self))
|
|
|
6155
6213
|
* @since 2.0.0
|
|
6156
6214
|
*/
|
|
6157
6215
|
const lastNonEmpty = (self) => self[self.length - 1];
|
|
6216
|
+
const clampCount = (n, length) => Math.min(normalize$1(n), length);
|
|
6217
|
+
/**
|
|
6218
|
+
* Keeps the first `n` elements, creating a new array.
|
|
6219
|
+
*
|
|
6220
|
+
* **When to use**
|
|
6221
|
+
*
|
|
6222
|
+
* Use to keep up to the first `n` elements from an iterable as a new array.
|
|
6223
|
+
*
|
|
6224
|
+
* **Details**
|
|
6225
|
+
*
|
|
6226
|
+
* `n` is rounded down and clamped to `[0, length]`. `NaN` is treated as `0`.
|
|
6227
|
+
* Returns an empty array when `n <= 0`.
|
|
6228
|
+
*
|
|
6229
|
+
* **Example** (Taking from the start)
|
|
6230
|
+
*
|
|
6231
|
+
* ```ts import.meta.vitest
|
|
6232
|
+
* import { Array } from "effect"
|
|
6233
|
+
*
|
|
6234
|
+
* Array.take([1, 2, 3, 4, 5], 3) // => [1, 2, 3]
|
|
6235
|
+
* ```
|
|
6236
|
+
*
|
|
6237
|
+
* @see {@link takeRight} for keeping elements from the end
|
|
6238
|
+
* @see {@link takeWhile} for keeping an initial prefix while a predicate holds
|
|
6239
|
+
* @see {@link drop} for removing elements from the start
|
|
6240
|
+
*
|
|
6241
|
+
* @category getters
|
|
6242
|
+
* @since 2.0.0
|
|
6243
|
+
*/
|
|
6244
|
+
const take$2 = /*#__PURE__*/ dual(2, (self, n) => {
|
|
6245
|
+
const input = fromIterable$7(self);
|
|
6246
|
+
return input.slice(0, clampCount(n, input.length));
|
|
6247
|
+
});
|
|
6158
6248
|
/**
|
|
6159
6249
|
* Takes elements from the start while the predicate holds, stopping at the
|
|
6160
6250
|
* first element that fails.
|
|
@@ -25075,7 +25165,7 @@ const layer$14 = /* @__PURE__ */ succeed$6(Stdio, /*#__PURE__*/ make$34({
|
|
|
25075
25165
|
}));
|
|
25076
25166
|
//#endregion
|
|
25077
25167
|
//#region package.json
|
|
25078
|
-
var version = "10.
|
|
25168
|
+
var version = "10.2.0";
|
|
25079
25169
|
var engines = { "node": ">=24.13.1" };
|
|
25080
25170
|
//#endregion
|
|
25081
25171
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.116/node_modules/effect/dist/Logger.js
|
|
@@ -27160,7 +27250,7 @@ const isNever = /*#__PURE__*/ makeGuard("Never");
|
|
|
27160
27250
|
* @category guards
|
|
27161
27251
|
* @since 3.10.0
|
|
27162
27252
|
*/
|
|
27163
|
-
const isLiteral = /*#__PURE__*/ makeGuard("Literal");
|
|
27253
|
+
const isLiteral$1 = /*#__PURE__*/ makeGuard("Literal");
|
|
27164
27254
|
/**
|
|
27165
27255
|
* Narrows an {@link AST} to {@link UniqueSymbol}.
|
|
27166
27256
|
*
|
|
@@ -27565,7 +27655,7 @@ const number$1 = /*#__PURE__*/ new Number$4();
|
|
|
27565
27655
|
* @category constructors
|
|
27566
27656
|
* @since 4.0.0
|
|
27567
27657
|
*/
|
|
27568
|
-
const Boolean$
|
|
27658
|
+
const Boolean$7 = class extends ASTNodeImpl {
|
|
27569
27659
|
_tag = "Boolean";
|
|
27570
27660
|
/** @internal */
|
|
27571
27661
|
getParser() {
|
|
@@ -27590,7 +27680,7 @@ const Boolean$6 = class extends ASTNodeImpl {
|
|
|
27590
27680
|
* @category constructors
|
|
27591
27681
|
* @since 4.0.0
|
|
27592
27682
|
*/
|
|
27593
|
-
const boolean$1 = /*#__PURE__*/ new Boolean$
|
|
27683
|
+
const boolean$1 = /*#__PURE__*/ new Boolean$7();
|
|
27594
27684
|
/**
|
|
27595
27685
|
* Constructs a {@link Arrays}.
|
|
27596
27686
|
*
|
|
@@ -28152,7 +28242,7 @@ function collectSentinels(ast) {
|
|
|
28152
28242
|
case "Objects": return ast.propertySignatures.flatMap((ps) => {
|
|
28153
28243
|
const type = ps.type;
|
|
28154
28244
|
if (!isOptional(type)) {
|
|
28155
|
-
if (isLiteral(type)) return [{
|
|
28245
|
+
if (isLiteral$1(type)) return [{
|
|
28156
28246
|
key: ps.name,
|
|
28157
28247
|
literal: type.literal
|
|
28158
28248
|
}];
|
|
@@ -28165,7 +28255,7 @@ function collectSentinels(ast) {
|
|
|
28165
28255
|
});
|
|
28166
28256
|
case "Arrays": return ast.elements.flatMap((e, i) => {
|
|
28167
28257
|
if (!isOptional(e)) {
|
|
28168
|
-
if (isLiteral(e)) return [{
|
|
28258
|
+
if (isLiteral$1(e)) return [{
|
|
28169
28259
|
key: i,
|
|
28170
28260
|
literal: e.literal
|
|
28171
28261
|
}];
|
|
@@ -28200,9 +28290,9 @@ function getIndex(types) {
|
|
|
28200
28290
|
const encoded = toCandidate(a);
|
|
28201
28291
|
if (isNever(encoded)) continue;
|
|
28202
28292
|
if (onlyLiterals) {
|
|
28203
|
-
if (isLiteral(encoded) || isUniqueSymbol(encoded)) {
|
|
28293
|
+
if (isLiteral$1(encoded) || isUniqueSymbol(encoded)) {
|
|
28204
28294
|
literalCandidates ??= /* @__PURE__ */ new Map();
|
|
28205
|
-
const literal = isLiteral(encoded) ? encoded.literal : encoded.symbol;
|
|
28295
|
+
const literal = isLiteral$1(encoded) ? encoded.literal : encoded.symbol;
|
|
28206
28296
|
let arr = literalCandidates.get(literal);
|
|
28207
28297
|
if (!arr) literalCandidates.set(literal, arr = []);
|
|
28208
28298
|
arr.push(a);
|
|
@@ -28378,12 +28468,12 @@ const Union$1 = class extends ASTNodeImpl {
|
|
|
28378
28468
|
const encoded = toEncoded$1(type);
|
|
28379
28469
|
switch (encoded._tag) {
|
|
28380
28470
|
case "Arrays": {
|
|
28381
|
-
const literals = encoded.elements.filter(isLiteral);
|
|
28471
|
+
const literals = encoded.elements.filter(isLiteral$1);
|
|
28382
28472
|
if (literals.length > 0) return `${formatIsMutable(encoded.isMutable)}[ ${literals.map((e) => getExpected(e) + formatIsOptional(e.context?.isOptional)).join(", ")}, ... ]`;
|
|
28383
28473
|
break;
|
|
28384
28474
|
}
|
|
28385
28475
|
case "Objects": {
|
|
28386
|
-
const literals = encoded.propertySignatures.filter((ps) => isLiteral(ps.type));
|
|
28476
|
+
const literals = encoded.propertySignatures.filter((ps) => isLiteral$1(ps.type));
|
|
28387
28477
|
if (literals.length > 0) return `{ ${literals.map((ps) => `${formatIsMutable(ps.type.context?.isMutable)}${formatPropertyKey(ps.name)}${formatIsOptional(ps.type.context?.isOptional)}: ${getExpected(ps.type)}`).join(", ")}, ... }`;
|
|
28388
28478
|
break;
|
|
28389
28479
|
}
|
|
@@ -33667,7 +33757,7 @@ const Number$3 = /*#__PURE__*/ make$22(number$1);
|
|
|
33667
33757
|
* @category schemas
|
|
33668
33758
|
* @since 4.0.0
|
|
33669
33759
|
*/
|
|
33670
|
-
const Boolean$
|
|
33760
|
+
const Boolean$6 = /*#__PURE__*/ make$22(boolean$1);
|
|
33671
33761
|
/**
|
|
33672
33762
|
* Schema for a TypeScript `void` return value.
|
|
33673
33763
|
*
|
|
@@ -34083,7 +34173,7 @@ const FalseLiterals = /*#__PURE__*/ Literals$2([
|
|
|
34083
34173
|
"n"
|
|
34084
34174
|
]);
|
|
34085
34175
|
/** @internal */
|
|
34086
|
-
const BooleanLiterals = /*#__PURE__*/ Literals$2([...TrueLiterals.literals, ...FalseLiterals.literals]).pipe(/*#__PURE__*/ decodeTo(Boolean$
|
|
34176
|
+
const BooleanLiterals = /*#__PURE__*/ Literals$2([...TrueLiterals.literals, ...FalseLiterals.literals]).pipe(/*#__PURE__*/ decodeTo(Boolean$6, /*#__PURE__*/ transform$2({
|
|
34087
34177
|
decode: (value) => value === "true" || value === "yes" || value === "on" || value === "1" || value === "y",
|
|
34088
34178
|
encode: (value) => value ? "true" : "false"
|
|
34089
34179
|
})));
|
|
@@ -36655,6 +36745,33 @@ function walk(input, options) {
|
|
|
36655
36745
|
leave: options.leave
|
|
36656
36746
|
}, { scopeTracker: options.scopeTracker }).traverse(input);
|
|
36657
36747
|
}
|
|
36748
|
+
globalThis.Boolean;
|
|
36749
|
+
/**
|
|
36750
|
+
* Combines two booleans using logical AND: `self && that`.
|
|
36751
|
+
*
|
|
36752
|
+
* **When to use**
|
|
36753
|
+
*
|
|
36754
|
+
* Use to require both boolean operands to be `true`.
|
|
36755
|
+
*
|
|
36756
|
+
* **Details**
|
|
36757
|
+
*
|
|
36758
|
+
* Supports both data-first and data-last forms.
|
|
36759
|
+
*
|
|
36760
|
+
* **Example** (Combining booleans with AND)
|
|
36761
|
+
*
|
|
36762
|
+
* ```ts import.meta.vitest
|
|
36763
|
+
* import { Boolean } from "effect"
|
|
36764
|
+
*
|
|
36765
|
+
* Boolean.and(true, true) // => true
|
|
36766
|
+
* Boolean.and(true, false) // => false
|
|
36767
|
+
* Boolean.and(false, true) // => false
|
|
36768
|
+
* Boolean.and(false, false) // => false
|
|
36769
|
+
* ```
|
|
36770
|
+
*
|
|
36771
|
+
* @category combinators
|
|
36772
|
+
* @since 2.0.0
|
|
36773
|
+
*/
|
|
36774
|
+
const and = /*#__PURE__*/ dual(2, (self, that) => self && that);
|
|
36658
36775
|
//#endregion
|
|
36659
36776
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.116/node_modules/effect/dist/ConfigProvider.js
|
|
36660
36777
|
/**
|
|
@@ -41085,13 +41202,13 @@ var Mutant = class extends TaggedClass()("Mutant", {
|
|
|
41085
41202
|
status: optional$4(MutantStatusSchema),
|
|
41086
41203
|
statusReason: optional$4(String$7),
|
|
41087
41204
|
coveredBy: optional$4(ArraySchema(String$7)),
|
|
41088
|
-
static: optional$4(Boolean$
|
|
41205
|
+
static: optional$4(Boolean$6),
|
|
41089
41206
|
testsCompleted: optional$4(Finite$3),
|
|
41090
41207
|
description: optional$4(String$7)
|
|
41091
41208
|
}) {};
|
|
41092
41209
|
const RunOptionsFields = {
|
|
41093
41210
|
timeout: Finite$3,
|
|
41094
|
-
disableBail: Boolean$
|
|
41211
|
+
disableBail: Boolean$6
|
|
41095
41212
|
};
|
|
41096
41213
|
const MutantActivationSchema = Literals$2(["runtime", "static"]);
|
|
41097
41214
|
const MutantRunOptionsSchema = Struct({
|
|
@@ -41099,7 +41216,7 @@ const MutantRunOptionsSchema = Struct({
|
|
|
41099
41216
|
activeMutant: Mutant,
|
|
41100
41217
|
sandboxFileName: String$7,
|
|
41101
41218
|
mutantActivation: MutantActivationSchema,
|
|
41102
|
-
reloadEnvironment: Boolean$
|
|
41219
|
+
reloadEnvironment: Boolean$6,
|
|
41103
41220
|
testFilter: optionalKey(ArraySchema(String$7)),
|
|
41104
41221
|
hitLimit: optionalKey(Finite$3)
|
|
41105
41222
|
});
|
|
@@ -41119,7 +41236,7 @@ const PositionSchema$1$1 = Struct({
|
|
|
41119
41236
|
const FileSchema = Struct({
|
|
41120
41237
|
name: String$7,
|
|
41121
41238
|
content: String$7,
|
|
41122
|
-
mutate: Union([Boolean$
|
|
41239
|
+
mutate: Union([Boolean$6, ArraySchema(Struct({
|
|
41123
41240
|
start: PositionSchema$1$1,
|
|
41124
41241
|
end: PositionSchema$1$1
|
|
41125
41242
|
}))])
|
|
@@ -41128,7 +41245,8 @@ const IgnorerSchema = Unknown;
|
|
|
41128
41245
|
Struct({
|
|
41129
41246
|
excludedMutations: ArraySchema(String$7),
|
|
41130
41247
|
ignorers: ArraySchema(IgnorerSchema),
|
|
41131
|
-
noHeader: optional$4(Boolean$
|
|
41248
|
+
noHeader: optional$4(Boolean$6),
|
|
41249
|
+
optInMutations: optional$4(ArraySchema(String$7))
|
|
41132
41250
|
});
|
|
41133
41251
|
var InstrumentResult = class extends TaggedClass()("InstrumentResult", {
|
|
41134
41252
|
files: ArraySchema(FileSchema),
|
|
@@ -41437,6 +41555,22 @@ function unaryExpression(operator, argument, loc) {
|
|
|
41437
41555
|
prefix: true
|
|
41438
41556
|
}, loc);
|
|
41439
41557
|
}
|
|
41558
|
+
function binaryExpression(operator, left, right, loc) {
|
|
41559
|
+
return mark({
|
|
41560
|
+
type: "BinaryExpression",
|
|
41561
|
+
operator,
|
|
41562
|
+
left,
|
|
41563
|
+
right
|
|
41564
|
+
}, loc);
|
|
41565
|
+
}
|
|
41566
|
+
function logicalExpression(operator, left, right, loc) {
|
|
41567
|
+
return mark({
|
|
41568
|
+
type: "LogicalExpression",
|
|
41569
|
+
operator,
|
|
41570
|
+
left,
|
|
41571
|
+
right
|
|
41572
|
+
}, loc);
|
|
41573
|
+
}
|
|
41440
41574
|
function updateExpression(operator, argument, prefix, loc) {
|
|
41441
41575
|
return mark({
|
|
41442
41576
|
type: "UpdateExpression",
|
|
@@ -44053,14 +44187,14 @@ function isTSType(node) {
|
|
|
44053
44187
|
function isNodeOfKind(node, kind) {
|
|
44054
44188
|
return node.type === kind;
|
|
44055
44189
|
}
|
|
44056
|
-
const FUNCTION_KINDS = {
|
|
44190
|
+
const FUNCTION_KINDS$1 = {
|
|
44057
44191
|
FunctionDeclaration: true,
|
|
44058
44192
|
FunctionExpression: true,
|
|
44059
44193
|
TSDeclareFunction: true,
|
|
44060
44194
|
TSEmptyBodyFunctionExpression: true
|
|
44061
44195
|
};
|
|
44062
44196
|
function isFunctionNode(node) {
|
|
44063
|
-
return FUNCTION_KINDS[node.type] === true;
|
|
44197
|
+
return FUNCTION_KINDS$1[node.type] === true;
|
|
44064
44198
|
}
|
|
44065
44199
|
function isAssignmentPattern(node) {
|
|
44066
44200
|
return node.type === "AssignmentPattern";
|
|
@@ -44508,11 +44642,11 @@ const hasStringCode = (error) => value(fieldOf(error, "code")).pipe(when(string,
|
|
|
44508
44642
|
function isErrnoException(error) {
|
|
44509
44643
|
return value(error).pipe(when(instanceOf(Error), hasStringCode), orElse$1(() => false));
|
|
44510
44644
|
}
|
|
44511
|
-
const isEmptyNumber = (value$
|
|
44645
|
+
const isEmptyNumber = (value$27) => value(value$27).pipe(when(0, () => true), orElse$1(Number.isNaN));
|
|
44512
44646
|
const isEmptyError = (error) => value(error).pipe(when(_undefined, () => true), when(_null, () => true), when(string, (text) => text.length === 0), when(number, isEmptyNumber), when(boolean, (value) => !value), orElse$1(() => false));
|
|
44513
44647
|
const formatErrnoException = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.code} (${error.syscall}) ${stack}`), orElse$1(() => `${error.name}: ${error.code} (${error.syscall})`));
|
|
44514
44648
|
const formatError = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.message}\n${stack}`), orElse$1(() => `${error.name}: ${error.message}`));
|
|
44515
|
-
const isJsonPrimitive = (value$
|
|
44649
|
+
const isJsonPrimitive = (value$18) => value(value$18).pipe(when(number, () => true), when(boolean, () => true), when(bigint, () => true), orElse$1(() => false));
|
|
44516
44650
|
const jsonText = (error) => {
|
|
44517
44651
|
try {
|
|
44518
44652
|
return textIfNonEmpty(JSON.stringify(error));
|
|
@@ -44527,11 +44661,11 @@ const isNonPlaceholderText = (text) => value({
|
|
|
44527
44661
|
hasLength: true,
|
|
44528
44662
|
isPlaceholder: false
|
|
44529
44663
|
}, () => true), orElse$1(() => false));
|
|
44530
|
-
const isUsableText = (value$
|
|
44664
|
+
const isUsableText = (value$26) => value(value$26).pipe(when(string, isNonPlaceholderText), orElse$1(() => false));
|
|
44531
44665
|
const usableText = (value) => isUsableText(value) ? value : "";
|
|
44532
|
-
const objectToStringText = (value$
|
|
44666
|
+
const objectToStringText = (value$28) => value(fieldOf(value$28, "toString")).pipe(when(instanceOf(Function), (callable) => {
|
|
44533
44667
|
try {
|
|
44534
|
-
return usableText(Reflect.apply(callable, value$
|
|
44668
|
+
return usableText(Reflect.apply(callable, value$28, []));
|
|
44535
44669
|
} catch {
|
|
44536
44670
|
return "";
|
|
44537
44671
|
}
|
|
@@ -44555,14 +44689,14 @@ function errorToString(error) {
|
|
|
44555
44689
|
return value(error).pipe(when(isEmptyError, () => ""), when(instanceOf(Error), errorText$2), orElse$1(() => stringifyNonError(error)));
|
|
44556
44690
|
}
|
|
44557
44691
|
Object.freeze({ NoSuchFileOrDirectory: "ENOENT" });
|
|
44558
|
-
const errorNameOf = (value$
|
|
44559
|
-
const tagOf = (value$
|
|
44692
|
+
const errorNameOf = (value$25) => value(value$25).pipe(when(instanceOf(Error), (error) => textIfNonEmpty(error.name)), orElse$1(() => void 0));
|
|
44693
|
+
const tagOf = (value$19) => value(textIfNonEmpty(fieldOf(value$19, "_tag"))).pipe(when(hasText, (tag) => tag), orElse$1(() => errorNameOf(value$19)));
|
|
44560
44694
|
const textWithNested = (own, nested) => value(own).pipe(when(hasText, (text) => appendNested(text, nested)), orElse$1(() => nested));
|
|
44561
44695
|
const appendNested = (own, nested) => value(nested).pipe(when(hasText, (text) => `${own}: ${text}`), orElse$1(() => own));
|
|
44562
44696
|
const errorMessage = (error) => value(error.message.length > 0).pipe(when(true, () => error.message), orElse$1(() => tagOf(error)));
|
|
44563
|
-
const errorMessageOrTag = (value$
|
|
44564
|
-
const messageText = (value$
|
|
44565
|
-
const ownCauseText = (value$
|
|
44697
|
+
const errorMessageOrTag = (value$24) => value(value$24).pipe(when(instanceOf(Error), errorMessage), orElse$1(() => tagOf(value$24)));
|
|
44698
|
+
const messageText = (value$21) => value(textIfNonEmpty(fieldOf(value$21, "message"))).pipe(when(hasText, (message) => message), orElse$1(() => errorMessageOrTag(value$21)));
|
|
44699
|
+
const ownCauseText = (value$22) => value(textIfNonEmpty(fieldOf(value$22, "reason"))).pipe(when(hasText, (reason) => reason), orElse$1(() => messageText(value$22)));
|
|
44566
44700
|
const isPastDepth = (depth) => depth > 4;
|
|
44567
44701
|
const isMissingCause = (cause) => cause === void 0 || cause === null;
|
|
44568
44702
|
const causeText = (cause, depth) => isPastDepth(depth) ? void 0 : missingCauseTextOf(cause, depth);
|
|
@@ -44576,6 +44710,583 @@ function objectCauseTextOf(cause, depth) {
|
|
|
44576
44710
|
return isObjectType(cause) ? textWithNested(ownCauseText(cause), causeText(fieldOf(cause, "cause"), depth + 1)) : void 0;
|
|
44577
44711
|
}
|
|
44578
44712
|
/**
|
|
44713
|
+
* EffectCall — the resolution front half the opt-in concurrency mutators share.
|
|
44714
|
+
*
|
|
44715
|
+
* Given a visited node it answers: is this a covered Effect call (R1); through
|
|
44716
|
+
* which module and export did its callee resolve; which call form does its
|
|
44717
|
+
* argument count select (KTD10); does a data-last form sit where the replacement
|
|
44718
|
+
* function is contextually typed (R4); and how can each `effect` module the
|
|
44719
|
+
* replacement needs be reached from the file's own imports (KTD3). It decides
|
|
44720
|
+
* nothing about a replacement: a mutator asks for module access through the
|
|
44721
|
+
* description's `moduleAccess`, and gets none when the file has no unshadowed
|
|
44722
|
+
* binding for that module (R2).
|
|
44723
|
+
*
|
|
44724
|
+
* Pure. One expression per decision, no I/O, no throwing. The import table is
|
|
44725
|
+
* built once per Program and memoised in a WeakMap, because every visited node
|
|
44726
|
+
* asks for it and a file's imports never change mid-parse (KTD4).
|
|
44727
|
+
*/
|
|
44728
|
+
const MODULE_NAMES = [
|
|
44729
|
+
"Effect",
|
|
44730
|
+
"Ref",
|
|
44731
|
+
"Semaphore",
|
|
44732
|
+
"SynchronizedRef"
|
|
44733
|
+
];
|
|
44734
|
+
const EFFECT_SOURCE = "effect";
|
|
44735
|
+
const FUNCTION_SOURCE = "effect/Function";
|
|
44736
|
+
const DATA_FIRST = "data-first";
|
|
44737
|
+
const DATA_LAST_PIPE_ARG = "data-last-pipe-arg";
|
|
44738
|
+
const DATA_LAST_PIPE_METHOD = "data-last-pipe-method";
|
|
44739
|
+
const DATA_LAST_IMMEDIATE = "data-last-immediate";
|
|
44740
|
+
const PIPED_REFERENCE = "piped-reference";
|
|
44741
|
+
const NO_ARGUMENTS = Object.freeze([]);
|
|
44742
|
+
const ARITIES = Object.freeze({
|
|
44743
|
+
"Ref.modify": {
|
|
44744
|
+
dataFirst: [2],
|
|
44745
|
+
dataLast: 1
|
|
44746
|
+
},
|
|
44747
|
+
"Ref.modifySome": {
|
|
44748
|
+
dataFirst: [2],
|
|
44749
|
+
dataLast: 1
|
|
44750
|
+
},
|
|
44751
|
+
"Ref.update": {
|
|
44752
|
+
dataFirst: [2],
|
|
44753
|
+
dataLast: 1
|
|
44754
|
+
},
|
|
44755
|
+
"Ref.updateSome": {
|
|
44756
|
+
dataFirst: [2],
|
|
44757
|
+
dataLast: 1
|
|
44758
|
+
},
|
|
44759
|
+
"Ref.updateAndGet": {
|
|
44760
|
+
dataFirst: [2],
|
|
44761
|
+
dataLast: 1
|
|
44762
|
+
},
|
|
44763
|
+
"Ref.getAndUpdate": {
|
|
44764
|
+
dataFirst: [2],
|
|
44765
|
+
dataLast: 1
|
|
44766
|
+
},
|
|
44767
|
+
"SynchronizedRef.modify": {
|
|
44768
|
+
dataFirst: [2],
|
|
44769
|
+
dataLast: 1
|
|
44770
|
+
},
|
|
44771
|
+
"SynchronizedRef.modifySome": {
|
|
44772
|
+
dataFirst: [2],
|
|
44773
|
+
dataLast: 1
|
|
44774
|
+
},
|
|
44775
|
+
"SynchronizedRef.update": {
|
|
44776
|
+
dataFirst: [2],
|
|
44777
|
+
dataLast: 1
|
|
44778
|
+
},
|
|
44779
|
+
"SynchronizedRef.updateSome": {
|
|
44780
|
+
dataFirst: [2],
|
|
44781
|
+
dataLast: 1
|
|
44782
|
+
},
|
|
44783
|
+
"SynchronizedRef.updateAndGet": {
|
|
44784
|
+
dataFirst: [2],
|
|
44785
|
+
dataLast: 1
|
|
44786
|
+
},
|
|
44787
|
+
"SynchronizedRef.getAndUpdate": {
|
|
44788
|
+
dataFirst: [2],
|
|
44789
|
+
dataLast: 1
|
|
44790
|
+
},
|
|
44791
|
+
"Semaphore.withPermits": {
|
|
44792
|
+
dataFirst: [3],
|
|
44793
|
+
dataLast: 2
|
|
44794
|
+
},
|
|
44795
|
+
"Semaphore.withPermit": {
|
|
44796
|
+
dataFirst: [2],
|
|
44797
|
+
dataLast: 1
|
|
44798
|
+
},
|
|
44799
|
+
"Effect.ensuring": {
|
|
44800
|
+
dataFirst: [2],
|
|
44801
|
+
dataLast: 1
|
|
44802
|
+
},
|
|
44803
|
+
"Effect.onExit": {
|
|
44804
|
+
dataFirst: [2],
|
|
44805
|
+
dataLast: 1
|
|
44806
|
+
},
|
|
44807
|
+
"Effect.onError": {
|
|
44808
|
+
dataFirst: [2],
|
|
44809
|
+
dataLast: 1
|
|
44810
|
+
},
|
|
44811
|
+
"Effect.onInterrupt": {
|
|
44812
|
+
dataFirst: [2],
|
|
44813
|
+
dataLast: 1
|
|
44814
|
+
},
|
|
44815
|
+
"Effect.uninterruptible": { dataFirst: [1] },
|
|
44816
|
+
"Effect.uninterruptibleMask": { dataFirst: [1] },
|
|
44817
|
+
"Effect.acquireRelease": { dataFirst: [2, 3] },
|
|
44818
|
+
"Effect.acquireUseRelease": { dataFirst: [3] }
|
|
44819
|
+
});
|
|
44820
|
+
const EMPTY_IMPORT_TABLE = Object.freeze({
|
|
44821
|
+
moduleBindings: /* @__PURE__ */ new Map(),
|
|
44822
|
+
namespaces: /* @__PURE__ */ new Map(),
|
|
44823
|
+
bareFunctions: /* @__PURE__ */ new Map(),
|
|
44824
|
+
pipeBindings: /* @__PURE__ */ new Set()
|
|
44825
|
+
});
|
|
44826
|
+
const importTables = /* @__PURE__ */ new WeakMap();
|
|
44827
|
+
const importTableFor = (program) => getOrElse(fromNullishOr(importTables.get(program)), () => rememberImportTable(program));
|
|
44828
|
+
function rememberImportTable(program) {
|
|
44829
|
+
const table = buildImportTable(program);
|
|
44830
|
+
importTables.set(program, table);
|
|
44831
|
+
return table;
|
|
44832
|
+
}
|
|
44833
|
+
const buildImportTable = (program) => reduce$2(flatMap$5(filter$2(program.body, isImportDeclaration$1), importContributions), EMPTY_IMPORT_TABLE, applyContribution);
|
|
44834
|
+
const withEntry = (entries, key, value) => new Map([...entries, [key, value]]);
|
|
44835
|
+
const withMember = (members, value) => /* @__PURE__ */ new Set([...members, value]);
|
|
44836
|
+
const applyContribution = (table, contribution) => value(contribution).pipe(when((candidate) => candidate.kind === "module", (moduleBinding) => ({
|
|
44837
|
+
...table,
|
|
44838
|
+
moduleBindings: withEntry(table.moduleBindings, moduleBinding.local, moduleBinding.module)
|
|
44839
|
+
})), when((candidate) => candidate.kind === "namespace", (namespaceBinding) => ({
|
|
44840
|
+
...table,
|
|
44841
|
+
namespaces: withEntry(table.namespaces, namespaceBinding.local, namespaceBinding.binding)
|
|
44842
|
+
})), when((candidate) => candidate.kind === "bareFunction", (bareFunction) => ({
|
|
44843
|
+
...table,
|
|
44844
|
+
bareFunctions: withEntry(table.bareFunctions, bareFunction.local, {
|
|
44845
|
+
module: bareFunction.module,
|
|
44846
|
+
exportName: bareFunction.exportName
|
|
44847
|
+
})
|
|
44848
|
+
})), orElse$1((pipeBinding) => ({
|
|
44849
|
+
...table,
|
|
44850
|
+
pipeBindings: withMember(table.pipeBindings, pipeBinding.local)
|
|
44851
|
+
})));
|
|
44852
|
+
const importContributions = (declaration) => toArray(onlyWhen(declaration.importKind !== "type", declaration)).flatMap((imported) => flatMap$5(imported.specifiers, (specifier) => toArray(specifierContribution(imported.source.value, specifier))));
|
|
44853
|
+
const specifierContribution = (source, specifier) => value(specifier).pipe(when(isNamedImportSpecifier, (named) => namedSpecifierContribution(source, named)), when(isNamespaceImportSpecifier, (namespace) => namespaceSpecifierContribution(source, namespace)), orElse$1(() => none()));
|
|
44854
|
+
const namedSpecifierContribution = (source, specifier) => onlyWhen(specifier.importKind !== "type", specifier).pipe(flatMap$7((imported) => namedContribution(source, moduleExportName(imported.imported), imported.local.name)));
|
|
44855
|
+
const namedContribution = (source, importedName, localName) => value(source).pipe(when((candidate) => candidate === EFFECT_SOURCE, () => effectRootContribution(importedName, localName)), when((candidate) => candidate === FUNCTION_SOURCE, () => pipeContribution(importedName, localName)), orElse$1(() => map$13(moduleNameFromSource(source), (module) => bareFunctionContribution(localName, module, importedName))));
|
|
44856
|
+
const effectRootContribution = (importedName, localName) => orElse$3(map$13(moduleNameFromName(importedName), (module) => moduleContribution(localName, module)), () => pipeContribution(importedName, localName));
|
|
44857
|
+
const pipeContribution = (importedName, localName) => onlyWhen(importedName === "pipe", pipeContributionOf(localName));
|
|
44858
|
+
const namespaceSpecifierContribution = (source, specifier) => map$13(namespaceBindingFor(source), (binding) => ({
|
|
44859
|
+
kind: "namespace",
|
|
44860
|
+
local: specifier.local.name,
|
|
44861
|
+
binding
|
|
44862
|
+
}));
|
|
44863
|
+
const moduleContribution = (local, module) => ({
|
|
44864
|
+
kind: "module",
|
|
44865
|
+
local,
|
|
44866
|
+
module
|
|
44867
|
+
});
|
|
44868
|
+
const bareFunctionContribution = (local, module, exportName) => ({
|
|
44869
|
+
kind: "bareFunction",
|
|
44870
|
+
local,
|
|
44871
|
+
module,
|
|
44872
|
+
exportName
|
|
44873
|
+
});
|
|
44874
|
+
const pipeContributionOf = (local) => ({
|
|
44875
|
+
kind: "pipe",
|
|
44876
|
+
local
|
|
44877
|
+
});
|
|
44878
|
+
const namespaceBindingFor = (source) => value(source).pipe(when((candidate) => candidate === EFFECT_SOURCE, () => some({ kind: "root" })), when((candidate) => candidate === FUNCTION_SOURCE, () => some({ kind: "functionModule" })), orElse$1(() => map$13(moduleNameFromSource(source), (module) => ({
|
|
44879
|
+
kind: "module",
|
|
44880
|
+
module
|
|
44881
|
+
}))));
|
|
44882
|
+
const moduleNameFromName = (name) => findFirst(MODULE_NAMES, (module) => module === name);
|
|
44883
|
+
const moduleNameFromSource = (source) => findFirst(MODULE_NAMES, (module) => source === `${EFFECT_SOURCE}/${module}`);
|
|
44884
|
+
const resolveEffectCall = (node, context) => flatMap$7(programOf(context), (program) => resolveIn(node, context, importTableFor(program)));
|
|
44885
|
+
const programOf = (context) => findLast(context.ancestors, isProgram);
|
|
44886
|
+
const resolveIn = (node, context, table) => value(node).pipe(when(isCallExpression$1, (call) => resolveCall(call, context, table)), when(isMemberExpression, (member) => resolveReference(member, context, table)), when(isIdentifier$1, (reference) => resolveReference(reference, context, table)), orElse$1(() => none()));
|
|
44887
|
+
const resolveCall = (call, context, table) => flatMap$7(resolveCallee(call.callee, context, table), (callee) => flatMap$7(spreadFreeArguments$1(call.arguments), (args) => flatMap$7(callForm(callee, args, call, context, table), (form) => some({
|
|
44888
|
+
module: callee.module,
|
|
44889
|
+
exportName: callee.exportName,
|
|
44890
|
+
form,
|
|
44891
|
+
args,
|
|
44892
|
+
moduleAccess: moduleAccessFunction(callee, context, table)
|
|
44893
|
+
}))));
|
|
44894
|
+
const resolveReference = (reference, context, table) => flatMap$7(resolveCallee(reference, context, table), (callee) => flatMap$7(referenceForm(reference, context, table), (form) => some({
|
|
44895
|
+
module: callee.module,
|
|
44896
|
+
exportName: callee.exportName,
|
|
44897
|
+
form,
|
|
44898
|
+
args: NO_ARGUMENTS,
|
|
44899
|
+
moduleAccess: moduleAccessFunction(callee, context, table)
|
|
44900
|
+
})));
|
|
44901
|
+
const referenceForm = (reference, context, table) => flatMap$7(parentCall(context), (parent) => map$13(pipePosition(parent, reference, context, table), () => PIPED_REFERENCE));
|
|
44902
|
+
const spreadFreeArguments$1 = (args) => value(args.some(isSpreadElement)).pipe(when(true, () => none()), orElse$1(() => some(args.filter(isSpreadFree))));
|
|
44903
|
+
const resolveCallee = (callee, context, table) => value(callee).pipe(when(isIdentifier$1, (reference) => resolveBareCallee(reference, context, table)), when(isMemberExpression, (member) => resolveMemberCallee(member, context, table)), orElse$1(() => none()));
|
|
44904
|
+
const resolveBareCallee = (reference, context, table) => flatMap$7(fromNullishOr(table.bareFunctions.get(reference.name)), (binding) => map$13(unshadowedName(reference.name, context), () => ({
|
|
44905
|
+
module: binding.module,
|
|
44906
|
+
exportName: binding.exportName,
|
|
44907
|
+
owner: none()
|
|
44908
|
+
})));
|
|
44909
|
+
const resolveMemberCallee = (member, context, table) => flatMap$7(staticMemberName(member), (exportName) => map$13(resolveModuleObject(member.object, context, table), (owner) => ({
|
|
44910
|
+
module: owner.module,
|
|
44911
|
+
exportName,
|
|
44912
|
+
owner: some(owner)
|
|
44913
|
+
})));
|
|
44914
|
+
const resolveModuleObject = (expression, context, table) => value(expression).pipe(when(isIdentifier$1, (reference) => identifierModuleObject(reference, context, table)), when(isMemberExpression, (member) => namespacedModuleObject(member, context, table)), orElse$1(() => none()));
|
|
44915
|
+
const identifierModuleObject = (reference, context, table) => orElse$3(flatMap$7(fromNullishOr(table.moduleBindings.get(reference.name)), (module) => map$13(unshadowedName(reference.name, context), () => ({
|
|
44916
|
+
module,
|
|
44917
|
+
access: reference
|
|
44918
|
+
}))), () => flatMap$7(namespaceOf(reference, context, table), (binding) => map$13(moduleOf(binding), (module) => ({
|
|
44919
|
+
module,
|
|
44920
|
+
access: reference
|
|
44921
|
+
}))));
|
|
44922
|
+
const namespacedModuleObject = (member, context, table) => flatMap$7(staticMemberName(member), (moduleName) => flatMap$7(namespaceOf(member.object, context, table), (binding) => value(binding).pipe(when(isRootNamespace, () => map$13(moduleNameFromName(moduleName), (module) => ({
|
|
44923
|
+
module,
|
|
44924
|
+
access: member
|
|
44925
|
+
}))), when(isModuleNamespace, (moduleNamespace) => map$13(onlyWhen(moduleNamespace.module === moduleName, member), (access) => ({
|
|
44926
|
+
module: moduleNamespace.module,
|
|
44927
|
+
access
|
|
44928
|
+
}))), orElse$1(() => none()))));
|
|
44929
|
+
const isRootNamespace = (binding) => binding.kind === "root";
|
|
44930
|
+
const moduleOf = (binding) => value(binding).pipe(when(isModuleNamespace, (moduleNamespace) => some(moduleNamespace.module)), orElse$1(() => none()));
|
|
44931
|
+
const isModuleNamespace = (binding) => binding.kind === "module";
|
|
44932
|
+
const namespaceOf = (expression, context, table) => value(expression).pipe(when(isIdentifier$1, (reference) => flatMap$7(fromNullishOr(table.namespaces.get(reference.name)), (binding) => map$13(unshadowedName(reference.name, context), () => binding))), orElse$1(() => none()));
|
|
44933
|
+
const callForm = (callee, args, call, context, table) => flatMap$7(arityOf(callee), (arity) => value(args.length).pipe(when((count) => arity.dataFirst.includes(count), () => some(DATA_FIRST)), when((count) => arity.dataLast === count, () => dataLastForm(call, context, table)), orElse$1(() => none())));
|
|
44934
|
+
const arityOf = (callee) => fromNullishOr(ARITIES[`${callee.module}.${callee.exportName}`]);
|
|
44935
|
+
const dataLastForm = (call, context, table) => flatMap$7(parentCall(context), (parent) => value(parent.callee === call).pipe(when(true, () => some(DATA_LAST_IMMEDIATE)), orElse$1(() => flatMap$7(pipePosition(parent, call, context, table), formForPosition))));
|
|
44936
|
+
const pipePosition = (parent, argument, context, table) => flatMap$7(argumentIndex(parent.arguments, argument), (index) => orElse$3(onlyWhen(isPipeMethodCall(parent), {
|
|
44937
|
+
index,
|
|
44938
|
+
callee: "method"
|
|
44939
|
+
}), () => onlyWhen(isEffectPipeCall(parent, context, table), {
|
|
44940
|
+
index,
|
|
44941
|
+
callee: "effect"
|
|
44942
|
+
})));
|
|
44943
|
+
const formForPosition = (position) => value(position.callee).pipe(when((callee) => callee === "method", () => some(DATA_LAST_PIPE_METHOD)), orElse$1(() => onlyWhen(position.index >= 1, DATA_LAST_PIPE_ARG)));
|
|
44944
|
+
const argumentIndex = (args, node) => flatMap$7(fromNullishOr(args.findIndex((argument) => sameNode(argument, node))), (index) => onlyWhen(index >= 0, index));
|
|
44945
|
+
const parentCall = (context) => flatMap$7(fromNullishOr(context.parent), (parent) => value(parent).pipe(when(isCallExpression$1, (call) => some(call)), orElse$1(() => none())));
|
|
44946
|
+
const isPipeMethodCall = (parent) => value(parent.callee).pipe(when(isMemberExpression, (member) => exists$1(staticMemberName(member), (name) => name === "pipe")), orElse$1(() => false));
|
|
44947
|
+
const isEffectPipeCall = (parent, context, table) => value(parent.callee).pipe(when(isIdentifier$1, (reference) => and(isVisible(reference.name, context), table.pipeBindings.has(reference.name))), when(isMemberExpression, (member) => exists$1(staticMemberName(member), (name) => and(name === "pipe", isPipeNamespace(member.object, context, table)))), orElse$1(() => false));
|
|
44948
|
+
const isPipeNamespace = (expression, context, table) => value(expression).pipe(when(isIdentifier$1, (reference) => match$7(namespaceOf(expression, context, table), {
|
|
44949
|
+
onNone: () => false,
|
|
44950
|
+
onSome: (binding) => and(isPipeNamespaceBinding(binding), isVisible(reference.name, context))
|
|
44951
|
+
})), orElse$1(() => false));
|
|
44952
|
+
const isPipeNamespaceBinding = (binding) => value(binding.kind).pipe(when((kind) => kind === "root", () => true), when((kind) => kind === "functionModule", () => true), orElse$1(() => false));
|
|
44953
|
+
const moduleAccessFunction = (callee, context, table) => (module) => findFirst([
|
|
44954
|
+
ownerAccessFor(callee, module),
|
|
44955
|
+
namedModuleAccess(module, context, table),
|
|
44956
|
+
rootNamespaceAccess(module, context, table),
|
|
44957
|
+
moduleNamespaceAccess(module, context, table)
|
|
44958
|
+
], isSome).pipe(flatten$3);
|
|
44959
|
+
const ownerAccessFor = (callee, module) => flatMap$7(callee.owner, (owner) => onlyWhen(owner.module === module, owner.access));
|
|
44960
|
+
const namedModuleAccess = (module, context, table) => map$13(fromNullishOr([...table.moduleBindings].find(([local, bound]) => and(bound === module, isVisible(local, context)))), ([local]) => identifier(local));
|
|
44961
|
+
const rootNamespaceAccess = (module, context, table) => map$13(fromNullishOr([...table.namespaces].find(([local, binding]) => and(binding.kind === "root", isVisible(local, context)))), ([local]) => memberExpression(identifier(local), identifier(module), false));
|
|
44962
|
+
const moduleNamespaceAccess = (module, context, table) => map$13(fromNullishOr([...table.namespaces].find(([local, binding]) => and(exists$1(moduleOf(binding), (bound) => bound === module), isVisible(local, context)))), ([local]) => identifier(local));
|
|
44963
|
+
const isMovableArgument = (node) => nodesOutsideFunctions(node).every((candidate) => YIELD_OR_AWAIT_KINDS[nodeType(candidate) ?? ""] !== true);
|
|
44964
|
+
const YIELD_OR_AWAIT_KINDS = {
|
|
44965
|
+
AwaitExpression: true,
|
|
44966
|
+
YieldExpression: true
|
|
44967
|
+
};
|
|
44968
|
+
const isDroppableArgument = (node) => value(node).pipe(when(isIdentifier$1, () => true), when(isLiteral, () => true), when(isThisExpression, () => true), when(isFunctionLike, () => true), when(isMemberExpression, (member) => isCallFreeMemberChain(member)), orElse$1(() => false));
|
|
44969
|
+
const isCallFreeMemberChain = (member) => value(member.computed).pipe(when(true, () => false), orElse$1(() => value(member.object).pipe(when(isIdentifier$1, () => true), when(isThisExpression, () => true), when(isMemberExpression, (inner) => isCallFreeMemberChain(inner)), orElse$1(() => false))));
|
|
44970
|
+
const identifiersIn = (node) => allNodesUnder(node).flatMap((candidate) => toArray(identifierText(candidate)));
|
|
44971
|
+
const freshIdentifier = (base, taken) => freeIdentifier(base, taken, 0);
|
|
44972
|
+
const freeIdentifier = (base, taken, suffix) => value(taken.has(suffixedName(base, suffix))).pipe(when(false, () => suffixedName(base, suffix)), orElse$1(() => freeIdentifier(base, taken, suffix + 1)));
|
|
44973
|
+
const suffixedName = (base, suffix) => value(suffix).pipe(when(0, () => base), orElse$1((count) => `${base}${count}`));
|
|
44974
|
+
const isShadowed = (name, context) => context.ancestors.some((ancestor) => scopeDeclares(ancestor, name));
|
|
44975
|
+
const isVisible = (name, context) => isShadowed(name, context) === false;
|
|
44976
|
+
const unshadowedName = (name, context) => onlyWhen(isVisible(name, context), name);
|
|
44977
|
+
const scopeDeclares = (ancestor, name) => value(ancestor).pipe(when(isProgram, (program) => statementsDeclare(program.body, name)), when(isBlockStatement, (block) => statementsDeclare(block.body, name)), when(isStaticBlock, (block) => statementsDeclare(block.body, name)), when(isTSModuleBlock, (block) => statementsDeclare(block.body, name)), when(isSwitchStatement, (statement) => statement.cases.some((caseClause) => statementsDeclare(caseClause.consequent, name))), when(isFunctionLike, (fn) => functionDeclares(fn, name)), when(isCatchClause, (clause) => patternDeclaresOr(clause.param, name)), when(isForStatement, (statement) => variableDeclarationDeclaresOr(statement.init, name)), when(isForInStatement, (statement) => variableDeclarationDeclaresOr(statement.left, name)), when(isForOfStatement, (statement) => variableDeclarationDeclaresOr(statement.left, name)), when(isClassLike, (cls) => declaresIdentifier(cls.id, name)), orElse$1(() => false));
|
|
44978
|
+
const functionDeclares = (fn, name) => holdsAny([
|
|
44979
|
+
fn.params.some((param) => patternDeclaresOr(param, name)),
|
|
44980
|
+
declaresIdentifier(fn.id, name),
|
|
44981
|
+
blockBodyDeclaresHoistedVar(fn.body, name)
|
|
44982
|
+
]);
|
|
44983
|
+
const blockBodyDeclaresHoistedVar = (body, name) => match$7(fromNullishOr(body), {
|
|
44984
|
+
onNone: () => false,
|
|
44985
|
+
onSome: (present) => value(present).pipe(when(isBlockStatement, (block) => hoistedVarsDeclare(block, name)), orElse$1(() => false))
|
|
44986
|
+
});
|
|
44987
|
+
const hoistedVarsDeclare = (block, name) => nodesOutsideFunctions(block).some((candidate) => hoistedCandidateDeclares(candidate, name));
|
|
44988
|
+
const hoistedCandidateDeclares = (candidate, name) => value(candidate).pipe(when(isVariableDeclaration, (declaration) => and(declaration.kind === "var", statementBindingsDeclare(declaration, name))), orElse$1(() => false));
|
|
44989
|
+
const statementsDeclare = (statements, name) => statements.some((statement) => statementDeclares(statement, name));
|
|
44990
|
+
const statementDeclares = (statement, name) => value(statement).pipe(when(isVariableDeclaration, (declaration) => statementBindingsDeclare(declaration, name)), when(isFunctionDeclaration, (declaration) => declaresIdentifier(declaration.id, name)), when(isClassLike, (declaration) => declaresIdentifier(declaration.id, name)), when(isTSEnumDeclaration, (declaration) => declaration.id.name === name), when(isTSModuleDeclaration, (declaration) => moduleDeclarationDeclares(declaration, name)), when(isTSImportEqualsDeclaration, (declaration) => importEqualsDeclares(declaration, name)), when(isExportNamedDeclaration, (declaration) => exists$1(fromNullishOr(declaration.declaration), (inner) => statementDeclares(inner, name))), orElse$1(() => false));
|
|
44991
|
+
const statementBindingsDeclare = (declaration, name) => declaration.declarations.some((declarator) => patternDeclaresOr(declarator.id, name));
|
|
44992
|
+
const variableDeclarationDeclaresOr = (node, name) => match$7(fromNullishOr(node), {
|
|
44993
|
+
onNone: () => false,
|
|
44994
|
+
onSome: (present) => value(present).pipe(when(isVariableDeclaration, (declaration) => statementBindingsDeclare(declaration, name)), orElse$1(() => false))
|
|
44995
|
+
});
|
|
44996
|
+
const moduleDeclarationDeclares = (declaration, name) => and(declaration.body !== null, exists$1(identifierText(declaration.id), (text) => text === name));
|
|
44997
|
+
const importEqualsDeclares = (declaration, name) => and(declaration.importKind !== "type", declaration.id.name === name);
|
|
44998
|
+
const declaresIdentifier = (id, name) => exists$1(identifierText(id), (text) => text === name);
|
|
44999
|
+
const patternDeclaresOr = (pattern, name) => match$7(fromNullishOr(pattern), {
|
|
45000
|
+
onNone: () => false,
|
|
45001
|
+
onSome: (present) => value(present).pipe(when(isBindingIdentifierPattern, (binding) => binding.name === name), when(isObjectBindingPattern, (object) => object.properties.some((property) => propertyDeclares(property, name))), when(isArrayBindingPattern, (array) => array.elements.some((element) => patternDeclaresOr(element, name))), when(isAssignmentBindingPattern, (assignment) => patternDeclaresOr(assignment.left, name)), when(isBindingRestElement, (rest) => patternDeclaresOr(rest.argument, name)), orElse$1(() => false))
|
|
45002
|
+
});
|
|
45003
|
+
const propertyDeclares = (property, name) => value(property).pipe(when(isBindingProperty, (binding) => patternDeclaresOr(binding.value, name)), when(isBindingRestElement, (rest) => patternDeclaresOr(rest.argument, name)), orElse$1(() => false));
|
|
45004
|
+
const isBindingIdentifierPattern = (candidate) => nodeType(candidate) === "Identifier";
|
|
45005
|
+
const isObjectBindingPattern = (candidate) => nodeType(candidate) === "ObjectPattern";
|
|
45006
|
+
const isArrayBindingPattern = (candidate) => nodeType(candidate) === "ArrayPattern";
|
|
45007
|
+
const isAssignmentBindingPattern = (candidate) => nodeType(candidate) === "AssignmentPattern";
|
|
45008
|
+
const isBindingRestElement = (candidate) => nodeType(candidate) === "RestElement";
|
|
45009
|
+
const isBindingProperty = (candidate) => nodeType(candidate) === "Property";
|
|
45010
|
+
const identifierText = (node) => match$7(fromNullishOr(node), {
|
|
45011
|
+
onNone: () => none(),
|
|
45012
|
+
onSome: (present) => value(present).pipe(when(isNamedIdentifier, (name) => some(name.name)), when(isStringLiteral$1, (literal) => literalValueText(literal.value)), orElse$1(() => none()))
|
|
45013
|
+
});
|
|
45014
|
+
const literalValueText = (value$20) => value(value$20).pipe(when(isString, (text) => some(text)), orElse$1(() => none()));
|
|
45015
|
+
const moduleExportName = (name) => getOrElse(identifierText(name), () => "");
|
|
45016
|
+
const staticMemberName = (member) => value(member.computed).pipe(when(false, () => identifierText(member.property)), orElse$1(() => none()));
|
|
45017
|
+
const nodesOutsideFunctions = (root) => {
|
|
45018
|
+
const collected = [];
|
|
45019
|
+
traverse(root, { enter(path) {
|
|
45020
|
+
collected.push(path.node);
|
|
45021
|
+
pruneAtFunction(path);
|
|
45022
|
+
} });
|
|
45023
|
+
return collected;
|
|
45024
|
+
};
|
|
45025
|
+
const allNodesUnder = (root) => {
|
|
45026
|
+
const collected = [];
|
|
45027
|
+
traverse(root, { enter(path) {
|
|
45028
|
+
collected.push(path.node);
|
|
45029
|
+
} });
|
|
45030
|
+
return collected;
|
|
45031
|
+
};
|
|
45032
|
+
const pruneAtFunction = (path) => match$7(onlyWhen(isFunctionLike(path.node), path), {
|
|
45033
|
+
onNone: () => void 0,
|
|
45034
|
+
onSome: (atFunction) => atFunction.skip()
|
|
45035
|
+
});
|
|
45036
|
+
const moduleCall = (module, property, args) => callExpression(memberExpression(module, identifier(property), false), args);
|
|
45037
|
+
const onlyWhen = (holds, value$23) => value(holds).pipe(when(true, () => some(value$23)), orElse$1(() => none()));
|
|
45038
|
+
const holdsAny = (conditions) => conditions.some((condition) => condition);
|
|
45039
|
+
const sameNode = (first, second) => first === second;
|
|
45040
|
+
const FUNCTION_KINDS = {
|
|
45041
|
+
ArrowFunctionExpression: true,
|
|
45042
|
+
FunctionDeclaration: true,
|
|
45043
|
+
FunctionExpression: true
|
|
45044
|
+
};
|
|
45045
|
+
const CLASS_KINDS = {
|
|
45046
|
+
ClassDeclaration: true,
|
|
45047
|
+
ClassExpression: true
|
|
45048
|
+
};
|
|
45049
|
+
const isFunctionLike = (candidate) => FUNCTION_KINDS[nodeType(candidate) ?? ""] === true;
|
|
45050
|
+
const isClassLike = (candidate) => CLASS_KINDS[nodeType(candidate) ?? ""] === true;
|
|
45051
|
+
const isProgram = (candidate) => nodeType(candidate) === "Program";
|
|
45052
|
+
const isBlockStatement = (candidate) => nodeType(candidate) === "BlockStatement";
|
|
45053
|
+
const isStaticBlock = (candidate) => nodeType(candidate) === "StaticBlock";
|
|
45054
|
+
const isTSModuleBlock = (candidate) => nodeType(candidate) === "TSModuleBlock";
|
|
45055
|
+
const isSwitchStatement = (candidate) => nodeType(candidate) === "SwitchStatement";
|
|
45056
|
+
const isCatchClause = (candidate) => nodeType(candidate) === "CatchClause";
|
|
45057
|
+
const isForStatement = (candidate) => nodeType(candidate) === "ForStatement";
|
|
45058
|
+
const isForInStatement = (candidate) => nodeType(candidate) === "ForInStatement";
|
|
45059
|
+
const isForOfStatement = (candidate) => nodeType(candidate) === "ForOfStatement";
|
|
45060
|
+
const isVariableDeclaration = (candidate) => nodeType(candidate) === "VariableDeclaration";
|
|
45061
|
+
const isFunctionDeclaration = (candidate) => nodeType(candidate) === "FunctionDeclaration";
|
|
45062
|
+
const isTSEnumDeclaration = (candidate) => nodeType(candidate) === "TSEnumDeclaration";
|
|
45063
|
+
const isTSModuleDeclaration = (candidate) => nodeType(candidate) === "TSModuleDeclaration";
|
|
45064
|
+
const isTSImportEqualsDeclaration = (candidate) => nodeType(candidate) === "TSImportEqualsDeclaration";
|
|
45065
|
+
const isExportNamedDeclaration = (candidate) => nodeType(candidate) === "ExportNamedDeclaration";
|
|
45066
|
+
const isImportDeclaration$1 = (candidate) => nodeType(candidate) === "ImportDeclaration";
|
|
45067
|
+
const isNamedImportSpecifier = (candidate) => nodeType(candidate) === "ImportSpecifier";
|
|
45068
|
+
const isNamespaceImportSpecifier = (candidate) => nodeType(candidate) === "ImportNamespaceSpecifier";
|
|
45069
|
+
const isCallExpression$1 = (candidate) => nodeType(candidate) === "CallExpression";
|
|
45070
|
+
const isMemberExpression = (candidate) => nodeType(candidate) === "MemberExpression";
|
|
45071
|
+
const isIdentifier$1 = (candidate) => nodeType(candidate) === "Identifier";
|
|
45072
|
+
const isNamedIdentifier = (candidate) => nodeType(candidate) === "Identifier";
|
|
45073
|
+
const isThisExpression = (candidate) => nodeType(candidate) === "ThisExpression";
|
|
45074
|
+
const isLiteral = (candidate) => nodeType(candidate) === "Literal";
|
|
45075
|
+
const isStringLiteral$1 = (candidate) => nodeType(candidate) === "Literal";
|
|
45076
|
+
const isSpreadElement = (argument) => nodeType(argument) === "SpreadElement";
|
|
45077
|
+
const isSpreadFree = (argument) => nodeType(argument) !== "SpreadElement";
|
|
45078
|
+
const NO_MUTANTS$3 = [];
|
|
45079
|
+
const ATOMIC_UPDATE_SPLIT_MODULES = ["Ref", "SynchronizedRef"];
|
|
45080
|
+
const ATOMIC_UPDATE_SPLIT_OPERATIONS = [
|
|
45081
|
+
"modify",
|
|
45082
|
+
"modifySome",
|
|
45083
|
+
"update",
|
|
45084
|
+
"updateSome",
|
|
45085
|
+
"updateAndGet",
|
|
45086
|
+
"getAndUpdate"
|
|
45087
|
+
];
|
|
45088
|
+
const atomicUpdateSplitMutator = (node, context) => match$7(resolveEffectCall(node, context), {
|
|
45089
|
+
onNone: () => NO_MUTANTS$3,
|
|
45090
|
+
onSome: (call) => toArray(atomicUpdateSplitReplacement(call))
|
|
45091
|
+
});
|
|
45092
|
+
const atomicUpdateSplitReplacement = (call) => flatMap$7(splitOperation(call), (operation) => some(replacementExpression$1(operation)));
|
|
45093
|
+
const splitOperation = (call) => value(call).pipe(when(isAtomicUpdateSplitOperation, (covered) => splitOperationOf(covered)), orElse$1(() => none()));
|
|
45094
|
+
const isAtomicUpdateSplitOperation = (call) => and(included(ATOMIC_UPDATE_SPLIT_MODULES, call.module), included(ATOMIC_UPDATE_SPLIT_OPERATIONS, call.exportName));
|
|
45095
|
+
const splitOperationOf = (call) => flatMap$7(moduleBindings(call), (bindings) => flatMap$7(splitArguments$1(call), (args) => some({
|
|
45096
|
+
effectModule: bindings.effectModule,
|
|
45097
|
+
operationModule: bindings.operationModule,
|
|
45098
|
+
exportName: call.exportName,
|
|
45099
|
+
ref: args.ref,
|
|
45100
|
+
f: args.f,
|
|
45101
|
+
binders: freshBinders$1(takenNames$2(call, bindings, args.f))
|
|
45102
|
+
})));
|
|
45103
|
+
const splitArguments$1 = (call) => value(call.form).pipe(when((form) => form === "data-first", () => dataFirstArguments$1(call)), when((form) => form === "piped-reference", () => none()), orElse$1(() => dataLastArguments(call)));
|
|
45104
|
+
const dataFirstArguments$1 = (call) => flatMap$7(get$8(call.args, 0), (ref) => flatMap$7(get$8(call.args, 1), (f) => onlyWhen(and(isMovableArgument(ref), isMovableArgument(f)), {
|
|
45105
|
+
ref: some(cloneNode(ref)),
|
|
45106
|
+
f: cloneNode(f)
|
|
45107
|
+
})));
|
|
45108
|
+
const dataLastArguments = (call) => flatMap$7(get$8(call.args, 0), (f) => onlyWhen(isMovableArgument(f), {
|
|
45109
|
+
ref: none(),
|
|
45110
|
+
f: cloneNode(f)
|
|
45111
|
+
}));
|
|
45112
|
+
const moduleBindings = (call) => flatMap$7(call.moduleAccess("Effect"), (effectModule) => map$13(call.moduleAccess(call.module), (operationModule) => ({
|
|
45113
|
+
effectModule,
|
|
45114
|
+
operationModule
|
|
45115
|
+
})));
|
|
45116
|
+
const takenNames$2 = (call, bindings, f) => /* @__PURE__ */ new Set([
|
|
45117
|
+
...call.args.flatMap((argument) => identifiersIn(argument)),
|
|
45118
|
+
...identifiersIn(f),
|
|
45119
|
+
...identifiersIn(bindings.effectModule),
|
|
45120
|
+
...identifiersIn(bindings.operationModule)
|
|
45121
|
+
]);
|
|
45122
|
+
const freshBinders$1 = (taken) => ({
|
|
45123
|
+
self: freshIdentifier("self", taken),
|
|
45124
|
+
s: freshIdentifier("s", taken),
|
|
45125
|
+
snap: freshIdentifier("snap", taken),
|
|
45126
|
+
b: freshIdentifier("b", taken),
|
|
45127
|
+
a: freshIdentifier("a", taken)
|
|
45128
|
+
});
|
|
45129
|
+
const replacementExpression$1 = (operation) => match$7(operation.ref, {
|
|
45130
|
+
onNone: () => arrowFunctionExpression([identifier(operation.binders.self)], splitBody(operation)),
|
|
45131
|
+
onSome: (ref) => moduleCall(operation.effectModule, "flatMap", [moduleCall(operation.effectModule, "succeed", [ref]), arrowFunctionExpression([identifier(operation.binders.self)], splitBody(operation))])
|
|
45132
|
+
});
|
|
45133
|
+
const splitBody = (operation) => moduleCall(operation.effectModule, "flatMap", [moduleCall(operation.operationModule, "get", [identifier(operation.binders.self)]), arrowFunctionExpression([identifier(operation.binders.s)], moduleCall(operation.effectModule, "flatMap", [moduleCall(operation.operationModule, "make", [identifier(operation.binders.s)]), arrowFunctionExpression([identifier(operation.binders.snap)], moduleCall(operation.effectModule, "flatMap", [moduleCall(operation.operationModule, operation.exportName, [identifier(operation.binders.snap), operation.f]), arrowFunctionExpression([identifier(operation.binders.b)], moduleCall(operation.effectModule, "flatMap", [memberExpression(operation.effectModule, identifier("yieldNow"), false), arrowFunctionExpression([], moduleCall(operation.effectModule, "flatMap", [moduleCall(operation.operationModule, "get", [identifier(operation.binders.snap)]), arrowFunctionExpression([identifier(operation.binders.a)], moduleCall(operation.effectModule, "as", [moduleCall(operation.operationModule, "set", [identifier(operation.binders.self), identifier(operation.binders.a)]), identifier(operation.binders.b)]))]))]))]))]))]);
|
|
45134
|
+
const included = (values, value) => values.includes(value);
|
|
45135
|
+
const NO_MUTANTS$2 = [];
|
|
45136
|
+
const COVERED_MODULE = "Effect";
|
|
45137
|
+
const TAG = "_tag";
|
|
45138
|
+
const SUCCESS_TAG = "Success";
|
|
45139
|
+
const INTERRUPT_TAG = "Interrupt";
|
|
45140
|
+
const finalizerEscapeMutator = (node, context) => match$7(resolveEffectCall(node, context), {
|
|
45141
|
+
onNone: () => NO_MUTANTS$2,
|
|
45142
|
+
onSome: (call) => toArray(replacementOf(call))
|
|
45143
|
+
});
|
|
45144
|
+
const replacementOf = (call) => flatMap$7(onlyWhen(call.module === COVERED_MODULE, call), (covered) => flatMap$7(covered.moduleAccess(COVERED_MODULE), (effect) => flatMap$7(coveredForm(covered), (form) => flatMap$7(splitArguments(covered, form), (split) => flatMap$7(shapeOf(covered.exportName, split.rest), (shape) => some(replacementExpression(call, effect, form, split, shape)))))));
|
|
45145
|
+
const replacementExpression = (call, effect, form, split, shape) => {
|
|
45146
|
+
const binders = freshBinders(takenNames$1(call, effect));
|
|
45147
|
+
const plan = {
|
|
45148
|
+
effect,
|
|
45149
|
+
self: selfExpression(split, binders),
|
|
45150
|
+
shape,
|
|
45151
|
+
binders
|
|
45152
|
+
};
|
|
45153
|
+
return placedBody(form, bodyExpression(plan), binders);
|
|
45154
|
+
};
|
|
45155
|
+
const coveredForm = (call) => value(call.form).pipe(when("data-first", () => some("data-first")), when("data-last-pipe-arg", () => some("data-last")), when("data-last-pipe-method", () => some("data-last")), when("data-last-immediate", () => some("data-last")), orElse$1(() => none()));
|
|
45156
|
+
const splitArguments = (call, form) => value(form).pipe(when("data-first", () => dataFirstArguments(call)), orElse$1(() => some({
|
|
45157
|
+
self: none(),
|
|
45158
|
+
rest: [...call.args]
|
|
45159
|
+
})));
|
|
45160
|
+
const dataFirstArguments = (call) => map$13(get$8(call.args, 0), (self) => ({
|
|
45161
|
+
self: some(cloneNode(self)),
|
|
45162
|
+
rest: call.args.slice(1)
|
|
45163
|
+
}));
|
|
45164
|
+
const selfExpression = (split, binders) => getOrElse(split.self, () => identifier(binders.self));
|
|
45165
|
+
const shapeOf = (exportName, rest) => value(exportName).pipe(when("ensuring", () => finalizerShape(rest)), when("onExit", () => exitShape(rest)), when("onError", () => handlerShape(rest)), when("onInterrupt", () => droppedHandlerShape(rest)), when("acquireRelease", () => releaseShape(rest)), when("acquireUseRelease", () => useReleaseShape(rest)), orElse$1(() => none()));
|
|
45166
|
+
const finalizerShape = (rest) => flatMap$7(get$8(rest, 0), (fin) => onlyWhen(isMovableArgument(fin), {
|
|
45167
|
+
kind: "ensuring",
|
|
45168
|
+
fin
|
|
45169
|
+
}));
|
|
45170
|
+
const exitShape = (rest) => map$13(get$8(rest, 0), (f) => ({
|
|
45171
|
+
kind: "onExit",
|
|
45172
|
+
f
|
|
45173
|
+
}));
|
|
45174
|
+
const handlerShape = (rest) => map$13(get$8(rest, 0), (h) => ({
|
|
45175
|
+
kind: "onError",
|
|
45176
|
+
h
|
|
45177
|
+
}));
|
|
45178
|
+
const droppedHandlerShape = (rest) => flatMap$7(get$8(rest, 0), (h) => onlyWhen(isDroppableArgument(h), {
|
|
45179
|
+
kind: "onInterrupt",
|
|
45180
|
+
h
|
|
45181
|
+
}));
|
|
45182
|
+
const releaseShape = (rest) => flatMap$7(get$8(rest, 0), (rel) => flatMap$7(droppableOptionAt(rest, 1), (optionsDroppable) => onlyWhen(and(isMovableArgument(rel), optionsDroppable), {
|
|
45183
|
+
kind: "acquireRelease",
|
|
45184
|
+
rel
|
|
45185
|
+
})));
|
|
45186
|
+
const useReleaseShape = (rest) => flatMap$7(get$8(rest, 1), (rel) => flatMap$7(get$8(rest, 0), (use) => flatMap$7(releaseArityOf(rel), (releaseArity) => onlyWhen(isMovableArgument(rel), {
|
|
45187
|
+
kind: "acquireUseRelease",
|
|
45188
|
+
use,
|
|
45189
|
+
rel,
|
|
45190
|
+
releaseArity
|
|
45191
|
+
}))));
|
|
45192
|
+
const droppableOptionAt = (rest, index) => match$7(get$8(rest, index), {
|
|
45193
|
+
onNone: () => some(true),
|
|
45194
|
+
onSome: (argument) => onlyWhen(isDroppableArgument(argument), true)
|
|
45195
|
+
});
|
|
45196
|
+
const bodyExpression = (plan) => value(plan.shape).pipe(when({ kind: "ensuring" }, (shape) => moduleCall(plan.effect, "onExitIf", [
|
|
45197
|
+
plan.self,
|
|
45198
|
+
notInterruptedPredicate(plan.binders),
|
|
45199
|
+
arrowFunctionExpression([], shape.fin)
|
|
45200
|
+
])), when({ kind: "onExit" }, (shape) => moduleCall(plan.effect, "onExitIf", [
|
|
45201
|
+
plan.self,
|
|
45202
|
+
notInterruptedPredicate(plan.binders),
|
|
45203
|
+
shape.f
|
|
45204
|
+
])), when({ kind: "onError" }, (shape) => moduleCall(plan.effect, "onErrorIf", [
|
|
45205
|
+
plan.self,
|
|
45206
|
+
noInterruptPredicate(plan.binders),
|
|
45207
|
+
shape.h
|
|
45208
|
+
])), when({ kind: "onInterrupt" }, () => plan.self), when({ kind: "acquireRelease" }, (shape) => releaseBody(plan, shape)), when({ kind: "acquireUseRelease" }, (shape) => useReleaseBody(plan, shape)), exhaustive);
|
|
45209
|
+
const releaseBody = (plan, shape) => moduleCall(plan.effect, "flatMap", [moduleCall(plan.effect, "interruptible", [plan.self]), arrowFunctionExpression([identifier(plan.binders.a)], moduleCall(plan.effect, "acquireRelease", [moduleCall(plan.effect, "succeed", [identifier(plan.binders.a)]), shape.rel]))]);
|
|
45210
|
+
const useReleaseBody = (plan, shape) => moduleCall(plan.effect, "acquireUseRelease", [
|
|
45211
|
+
plan.self,
|
|
45212
|
+
shape.use,
|
|
45213
|
+
arrowFunctionExpression([identifier(plan.binders.a), identifier(plan.binders.exit)], conditionalExpression(notInterruptedTest(plan.binders), appliedRelease(shape.rel, plan.binders, shape.releaseArity), memberExpression(plan.effect, identifier("void"), false)))
|
|
45214
|
+
]);
|
|
45215
|
+
const appliedRelease = (rel, binders, releaseArity) => callExpression(rel, take$2([identifier(binders.a), identifier(binders.exit)], releaseArity));
|
|
45216
|
+
const releaseArityOf = (rel) => value(rel).pipe(when(isInlineFunction, plainParameterArity), orElse$1(() => none()));
|
|
45217
|
+
const isInlineFunction = (candidate) => nodeType(candidate) === "ArrowFunctionExpression" || nodeType(candidate) === "FunctionExpression";
|
|
45218
|
+
const plainParameterArity = (fn) => onlyWhen(and(fn.params.every(isPlainParameter), fn.params.length <= 2), fn.params.length);
|
|
45219
|
+
const isPlainParameter = (param) => nodeType(param) === "Identifier";
|
|
45220
|
+
const placedBody = (form, body, binders) => value(form).pipe(when("data-first", () => body), orElse$1(() => arrowFunctionExpression([identifier(binders.self)], body)));
|
|
45221
|
+
const notInterruptedPredicate = (binders) => arrowFunctionExpression([identifier(binders.exit)], notInterruptedTest(binders));
|
|
45222
|
+
const notInterruptedTest = (binders) => logicalExpression("||", tagCheck(binders.exit, SUCCESS_TAG), unaryExpression("!", interruptionSome(failureReasons(binders.exit), binders.reason)));
|
|
45223
|
+
const noInterruptPredicate = (binders) => arrowFunctionExpression([identifier(binders.cause)], unaryExpression("!", interruptionSome(causeReasons(binders.cause), binders.reason)));
|
|
45224
|
+
const tagCheck = (name, tag) => binaryExpression("===", memberExpression(identifier(name), identifier(TAG), false), stringLiteral(tag));
|
|
45225
|
+
const failureReasons = (exitName) => memberExpression(memberExpression(identifier(exitName), identifier("cause"), false), identifier("reasons"), false);
|
|
45226
|
+
const causeReasons = (causeName) => memberExpression(identifier(causeName), identifier("reasons"), false);
|
|
45227
|
+
const interruptionSome = (reasons, reasonName) => callExpression(memberExpression(reasons, identifier("some"), false), [arrowFunctionExpression([identifier(reasonName)], tagCheck(reasonName, INTERRUPT_TAG))]);
|
|
45228
|
+
const takenNames$1 = (call, effect) => /* @__PURE__ */ new Set([...call.args.flatMap((argument) => identifiersIn(argument)), ...identifiersIn(effect)]);
|
|
45229
|
+
const freshBinders = (taken) => ({
|
|
45230
|
+
self: freshIdentifier("self", taken),
|
|
45231
|
+
exit: freshIdentifier("exit", taken),
|
|
45232
|
+
cause: freshIdentifier("cause", taken),
|
|
45233
|
+
reason: freshIdentifier("reason", taken),
|
|
45234
|
+
a: freshIdentifier("a", taken)
|
|
45235
|
+
});
|
|
45236
|
+
/**
|
|
45237
|
+
* SynchronizationRemoval — the R7 mutants: a removed lock and a removed mask.
|
|
45238
|
+
*
|
|
45239
|
+
* Four call shapes, each producing the wrapped effect alone:
|
|
45240
|
+
*
|
|
45241
|
+
* - `Semaphore.withPermits(sem, n, e)` and `Semaphore.withPermit(sem, e)` become
|
|
45242
|
+
* the guarded effect. The guard arguments are dropped, so they must be
|
|
45243
|
+
* droppable (KTD5); the effect itself is cloned so the mutant's tree shares
|
|
45244
|
+
* nothing with the original's.
|
|
45245
|
+
* - Their data-last forms become `(self) => self`, which the resolver only
|
|
45246
|
+
* reports where that function is contextually typed (R4, KTD9) — a piped
|
|
45247
|
+
* argument, a piped method argument, or the callee of an immediate call.
|
|
45248
|
+
* - `Effect.uninterruptible(e)` becomes `e`, and a bare `Effect.uninterruptible`
|
|
45249
|
+
* used as a pipe argument becomes `(self) => self` (KTD9).
|
|
45250
|
+
* - `Effect.uninterruptibleMask(f)` becomes `E.suspend(() => f(E.interruptible))`
|
|
45251
|
+
* (KTD7): `f` is called at run time, as the original calls it, and the restore
|
|
45252
|
+
* it receives is the identity wherever the surrounding region is interruptible.
|
|
45253
|
+
* This needs the Effect module object in scope (R2, KTD3).
|
|
45254
|
+
*
|
|
45255
|
+
* Resolution lives in `EffectCall.ts`; this module never inspects imports. It is
|
|
45256
|
+
* a pure function from a resolved call to the one mutant it implies, and yields
|
|
45257
|
+
* no mutant whenever the replacement would evaluate an argument twice or lean on
|
|
45258
|
+
* a moved argument that can yield.
|
|
45259
|
+
*/
|
|
45260
|
+
const NO_MUTANTS$1 = [];
|
|
45261
|
+
const synchronizationRemovalMutator = (node, context) => match$7(resolveEffectCall(node, context), {
|
|
45262
|
+
onNone: () => NO_MUTANTS$1,
|
|
45263
|
+
onSome: (call) => toArray(synchronizationRemovalReplacement(call))
|
|
45264
|
+
});
|
|
45265
|
+
const synchronizationRemovalReplacement = (call) => value(call).pipe(when(isWithPermits, withPermitsReplacement), when(isWithPermit, withPermitReplacement), when(isUninterruptible, uninterruptibleReplacement), when(isUninterruptibleMask, uninterruptibleMaskReplacement), orElse$1(() => none()));
|
|
45266
|
+
const isWithPermits = (call) => and(call.module === "Semaphore", call.exportName === "withPermits");
|
|
45267
|
+
const isWithPermit = (call) => and(call.module === "Semaphore", call.exportName === "withPermit");
|
|
45268
|
+
const isUninterruptible = (call) => and(call.module === "Effect", call.exportName === "uninterruptible");
|
|
45269
|
+
const isUninterruptibleMask = (call) => and(call.module === "Effect", call.exportName === "uninterruptibleMask");
|
|
45270
|
+
const isDataFirst = (form) => form === "data-first";
|
|
45271
|
+
const isPipedReference = (form) => form === "piped-reference";
|
|
45272
|
+
const withPermitsReplacement = (call) => value(call.form).pipe(when(isDataFirst, () => whenDroppable(call, [0, 1], (guarded) => argumentReplacement(guarded, 2))), orElse$1(() => whenDroppable(call, [0, 1], identityFunctionOf)));
|
|
45273
|
+
const withPermitReplacement = (call) => value(call.form).pipe(when(isDataFirst, () => whenDroppable(call, [0], (guarded) => argumentReplacement(guarded, 1))), orElse$1(() => whenDroppable(call, [0], identityFunctionOf)));
|
|
45274
|
+
const uninterruptibleReplacement = (call) => value(call.form).pipe(when(isPipedReference, () => some(identityFunction(call))), orElse$1(() => argumentReplacement(call, 0)));
|
|
45275
|
+
const uninterruptibleMaskReplacement = (call) => whenMovable(call, [0], (masked) => flatMap$7(masked.moduleAccess("Effect"), (effectModule) => map$13(get$8(masked.args, 0), (f) => maskedReplacement(effectModule, f))));
|
|
45276
|
+
const maskedReplacement = (effectModule, f) => moduleCall(effectModule, "suspend", [arrowFunctionExpression([], callExpression(cloneNode(f), [memberExpression(effectModule, identifier("interruptible"), false)]))]);
|
|
45277
|
+
const argumentReplacement = (call, index) => map$13(get$8(call.args, index), (argument) => cloneNode(argument));
|
|
45278
|
+
const identityFunctionOf = (call) => some(identityFunction(call));
|
|
45279
|
+
const identityFunction = (call) => {
|
|
45280
|
+
const name = freshIdentifier("self", takenNames(call));
|
|
45281
|
+
return arrowFunctionExpression([identifier(name)], identifier(name));
|
|
45282
|
+
};
|
|
45283
|
+
const takenNames = (call) => new Set(call.args.flatMap((argument) => identifiersIn(argument)));
|
|
45284
|
+
const whenDroppable = (call, indices, build) => flatMap$7(onlyWhen(argumentsDroppable(call, indices), call), build);
|
|
45285
|
+
const whenMovable = (call, indices, build) => flatMap$7(onlyWhen(argumentsMovable(call, indices), call), build);
|
|
45286
|
+
const argumentsDroppable = (call, indices) => indices.every((index) => argumentSatisfies(call, index, isDroppableArgument));
|
|
45287
|
+
const argumentsMovable = (call, indices) => indices.every((index) => argumentSatisfies(call, index, isMovableArgument));
|
|
45288
|
+
const argumentSatisfies = (call, index, predicate) => exists$1(get$8(call.args, index), predicate);
|
|
45289
|
+
/**
|
|
44579
45290
|
* Mutator — every mutation operator and its registry.
|
|
44580
45291
|
*/
|
|
44581
45292
|
/**
|
|
@@ -45408,8 +46119,11 @@ function isUpdateExpression(node) {
|
|
|
45408
46119
|
*
|
|
45409
46120
|
* Naming each mutator here costs one line when a mutator is added and makes
|
|
45410
46121
|
* that line a compile-checked import instead of a runtime effect.
|
|
46122
|
+
*
|
|
46123
|
+
* `optInMutators` below follows the same hand-written rule, for the same
|
|
46124
|
+
* reason: a mutator exists for a run only when a human named it here.
|
|
45411
46125
|
*/
|
|
45412
|
-
const
|
|
46126
|
+
const defaultMutators = Object.freeze({
|
|
45413
46127
|
ArithmeticOperator: arithmeticOperatorMutator,
|
|
45414
46128
|
ArrayDeclaration: arrayDeclarationMutator,
|
|
45415
46129
|
ArrowFunction: arrowFunctionMutator,
|
|
@@ -45427,6 +46141,28 @@ const allMutators = Object.freeze({
|
|
|
45427
46141
|
UnaryOperator: unaryOperatorMutator,
|
|
45428
46142
|
UpdateOperator: updateOperatorMutator
|
|
45429
46143
|
});
|
|
46144
|
+
const optInMutators = Object.freeze({
|
|
46145
|
+
AtomicUpdateSplit: atomicUpdateSplitMutator,
|
|
46146
|
+
SynchronizationRemoval: synchronizationRemovalMutator,
|
|
46147
|
+
FinalizerEscape: finalizerEscapeMutator
|
|
46148
|
+
});
|
|
46149
|
+
/**
|
|
46150
|
+
* The entries a run applies, and the names its directives may reference.
|
|
46151
|
+
*
|
|
46152
|
+
* Naming is additive, never a whitelist: `optInMutations` adds entries on top
|
|
46153
|
+
* of the defaults and removes none. Selection walks the registry's declared
|
|
46154
|
+
* order, not the order the run listed its names in, so a mutant's identity
|
|
46155
|
+
* never depends on how a config happened to spell the list; a name listed
|
|
46156
|
+
* twice selects its entry once. An unknown name selects nothing here —
|
|
46157
|
+
* `instrument` refuses it before any file is parsed, because a typo that
|
|
46158
|
+
* silently enables nothing removes mutants and raises the score.
|
|
46159
|
+
*
|
|
46160
|
+
* Pure: a registry and a run's names in, entries and names out.
|
|
46161
|
+
*/
|
|
46162
|
+
const selectMutators = (registry, optInMutations) => ({
|
|
46163
|
+
active: [...Object.entries(registry.defaults), ...Object.entries(registry.optIn).filter(([name]) => optInMutations.includes(name))],
|
|
46164
|
+
known: [...Object.keys(registry.defaults), ...Object.keys(registry.optIn)]
|
|
46165
|
+
});
|
|
45430
46166
|
TaggedError("@systemfsoftware/stryker-js-instrumenter/Transformer.schema/PlacementFailed")("PlacementFailed", {
|
|
45431
46167
|
fileName: String$7,
|
|
45432
46168
|
placerName: String$7,
|
|
@@ -45440,6 +46176,10 @@ TaggedError("@systemfsoftware/stryker-js-instrumenter/Transformer.schema/Transfo
|
|
|
45440
46176
|
const STRYKER_NAMESPACE_HELPER = "stryNS_9fa48";
|
|
45441
46177
|
const COVER_MUTANT_HELPER = "stryCov_9fa48";
|
|
45442
46178
|
const IS_MUTANT_ACTIVE_HELPER = "stryMutAct_9fa48";
|
|
46179
|
+
const DEFAULT_MUTATOR_REGISTRY = {
|
|
46180
|
+
defaults: defaultMutators,
|
|
46181
|
+
optIn: optInMutators
|
|
46182
|
+
};
|
|
45443
46183
|
function createMutantCollector() {
|
|
45444
46184
|
return [];
|
|
45445
46185
|
}
|
|
@@ -45475,11 +46215,11 @@ function directiveApplies(directive, lowerMutatorName, line) {
|
|
|
45475
46215
|
const NO_COMMENTS = [];
|
|
45476
46216
|
const PARSE_FAILURE = "Stryker directive without directive type or mutators";
|
|
45477
46217
|
const MISSING_LOCATION = "Comment without location";
|
|
45478
|
-
function processStrykerDirectives(rule, node,
|
|
46218
|
+
function processStrykerDirectives(rule, node, knownMutatorNames, originFileName, nodeLine) {
|
|
45479
46219
|
const directives = attachedComments(node).map(parseStrykerDirective).flatMap(toArray);
|
|
45480
|
-
const warnings = directives.flatMap((directive) => mutatorWarnings(directive,
|
|
46220
|
+
const warnings = directives.flatMap((directive) => mutatorWarnings(directive, knownMutatorNames, originFileName));
|
|
45481
46221
|
return {
|
|
45482
|
-
rule: directives.reduce(applyStrykerDirective, rule),
|
|
46222
|
+
rule: directives.map((directive) => nextLineOn(directive, nodeLine)).reduce(applyStrykerDirective, rule),
|
|
45483
46223
|
warnings
|
|
45484
46224
|
};
|
|
45485
46225
|
}
|
|
@@ -45508,36 +46248,39 @@ function strykerDirective(match, loc) {
|
|
|
45508
46248
|
function matchGroup(match, group) {
|
|
45509
46249
|
return getOrThrowWith$1(fromNullishOr(match[group]), () => /* @__PURE__ */ new Error(PARSE_FAILURE));
|
|
45510
46250
|
}
|
|
45511
|
-
|
|
45512
|
-
|
|
46251
|
+
const nextLineOn = (directive, nodeLine) => ({
|
|
46252
|
+
directive,
|
|
46253
|
+
nodeLine
|
|
46254
|
+
});
|
|
46255
|
+
function applyStrykerDirective(rule, directed) {
|
|
46256
|
+
return value(directed.directive.type).pipe(when("disable", () => ignoreRuleFor(rule, directed)), when("restore", () => restoreRuleFor(rule, directed)), orElse$1(() => rule));
|
|
45513
46257
|
}
|
|
45514
|
-
function ignoreRuleFor(rule,
|
|
46258
|
+
function ignoreRuleFor(rule, directed) {
|
|
45515
46259
|
return {
|
|
45516
46260
|
kind: "Ignore",
|
|
45517
|
-
mutatorNames: directive.mutatorNames.map((mutatorName) => mutatorName.toLowerCase()),
|
|
45518
|
-
line: directiveLine(
|
|
45519
|
-
ignoreReason: directive.reason,
|
|
46261
|
+
mutatorNames: directed.directive.mutatorNames.map((mutatorName) => mutatorName.toLowerCase()),
|
|
46262
|
+
line: directiveLine(directed),
|
|
46263
|
+
ignoreReason: directed.directive.reason,
|
|
45520
46264
|
previous: rule
|
|
45521
46265
|
};
|
|
45522
46266
|
}
|
|
45523
|
-
function restoreRuleFor(rule,
|
|
46267
|
+
function restoreRuleFor(rule, directed) {
|
|
45524
46268
|
return {
|
|
45525
46269
|
kind: "Restore",
|
|
45526
|
-
mutatorNames: directive.mutatorNames.map((mutatorName) => mutatorName.toLowerCase()),
|
|
45527
|
-
line: directiveLine(
|
|
46270
|
+
mutatorNames: directed.directive.mutatorNames.map((mutatorName) => mutatorName.toLowerCase()),
|
|
46271
|
+
line: directiveLine(directed),
|
|
45528
46272
|
previous: rule
|
|
45529
46273
|
};
|
|
45530
46274
|
}
|
|
45531
|
-
|
|
45532
|
-
|
|
45533
|
-
return value(directive.scope).pipe(when("next-line", () => commentLocation(directive.loc).start.line), orElse$1(() => void 0));
|
|
46275
|
+
function directiveLine(directed) {
|
|
46276
|
+
return value(directed.directive.scope).pipe(when("next-line", () => directed.nodeLine), orElse$1(() => void 0));
|
|
45534
46277
|
}
|
|
45535
46278
|
function commentLocation(loc) {
|
|
45536
46279
|
return getOrThrowWith$1(fromNullishOr(loc), () => /* @__PURE__ */ new Error(MISSING_LOCATION));
|
|
45537
46280
|
}
|
|
45538
|
-
/** Warnings for the directive's mutator names that
|
|
45539
|
-
function mutatorWarnings(directive,
|
|
45540
|
-
return directive.mutatorNames.filter((mutatorName) => mutatorName !== WILDCARD).filter((mutatorName) => !
|
|
46281
|
+
/** Warnings for the directive's mutator names that no registered mutator answers to, selected or not. */
|
|
46282
|
+
function mutatorWarnings(directive, knownMutatorNames, originFileName) {
|
|
46283
|
+
return directive.mutatorNames.filter((mutatorName) => mutatorName !== WILDCARD).filter((mutatorName) => !knownMutatorNames.includes(mutatorName.toLowerCase())).map((mutatorName) => mutatorWarning(directive, mutatorName, originFileName));
|
|
45541
46284
|
}
|
|
45542
46285
|
function mutatorWarning(directive, mutatorName, originFileName) {
|
|
45543
46286
|
const loc = commentLocation(directive.loc);
|
|
@@ -46023,19 +46766,21 @@ const emptyAppliedMutants = () => /* @__PURE__ */ new Map();
|
|
|
46023
46766
|
function isMutateRangeList(value) {
|
|
46024
46767
|
return Array.isArray(value);
|
|
46025
46768
|
}
|
|
46026
|
-
const transformScript = ({ root, originFileName, rawContent, offset, comments }, mutantCollector, { options, mutateDescription, basePath },
|
|
46769
|
+
const transformScript = ({ root, originFileName, rawContent, offset, comments }, mutantCollector, { options, mutateDescription, basePath }, registry, mutantPlacers) => {
|
|
46027
46770
|
const placementMap = /* @__PURE__ */ new Map();
|
|
46028
46771
|
return gen(function* () {
|
|
46029
46772
|
const lineTable = buildLineTable(rawContent);
|
|
46030
46773
|
attachComments(root, comments, lineTable);
|
|
46031
46774
|
let directiveRule = rootRule;
|
|
46032
|
-
const
|
|
46775
|
+
const mutatorRegistry = getOrElse(fromNullishOr(registry), () => DEFAULT_MUTATOR_REGISTRY);
|
|
46776
|
+
const selection = selectMutators(mutatorRegistry, options.optInMutations);
|
|
46777
|
+
const mutatorEntries = selection.active;
|
|
46033
46778
|
const placers = getOrElse(fromNullishOr(mutantPlacers), () => allMutantPlacers);
|
|
46034
|
-
const
|
|
46779
|
+
const knownMutatorNames = selection.known.map((name) => name.toLowerCase());
|
|
46035
46780
|
const warnings = [];
|
|
46036
46781
|
traverse(root, {
|
|
46037
46782
|
enter(path) {
|
|
46038
|
-
const result = processStrykerDirectives(directiveRule, path.node,
|
|
46783
|
+
const result = processStrykerDirectives(directiveRule, path.node, knownMutatorNames, originFileName, nodeStartLine(path.node));
|
|
46039
46784
|
directiveRule = result.rule;
|
|
46040
46785
|
warnings.push(...result.warnings);
|
|
46041
46786
|
visitNode(path);
|
|
@@ -46045,6 +46790,12 @@ const transformScript = ({ root, originFileName, rawContent, offset, comments },
|
|
|
46045
46790
|
if (hasAppliedMutants(placement)) applyPlacement(path, placement);
|
|
46046
46791
|
}
|
|
46047
46792
|
});
|
|
46793
|
+
function nodeStartLine(node) {
|
|
46794
|
+
return match$7(fromNullishOr(spanOf(node)), {
|
|
46795
|
+
onNone: () => 0,
|
|
46796
|
+
onSome: (span) => positionFromLineTable(span.start, lineTable).line
|
|
46797
|
+
});
|
|
46798
|
+
}
|
|
46048
46799
|
yield* placeHeaderIfNeeded(mutantCollector, originFileName, options, root);
|
|
46049
46800
|
return warnings;
|
|
46050
46801
|
function visitNode(path) {
|
|
@@ -46316,9 +47067,26 @@ function toOneBasedLineNumber(range) {
|
|
|
46316
47067
|
function isIgnorer(value) {
|
|
46317
47068
|
return isObject(value) && typeof value["shouldIgnore"] === "function";
|
|
46318
47069
|
}
|
|
47070
|
+
const EMPTY_MUTATION_NAMES = [];
|
|
47071
|
+
const KNOWN_OPT_IN_MUTATIONS = Object.keys(optInMutators);
|
|
47072
|
+
const requestedOptInMutations = (options) => getOrElse(fromNullishOr(options.optInMutations), () => EMPTY_MUTATION_NAMES);
|
|
47073
|
+
const unknownOptInMutations = (requested) => requested.filter((name) => !KNOWN_OPT_IN_MUTATIONS.includes(name));
|
|
47074
|
+
const listNames$1 = (names) => match$7(fromNullishOr(names.at(0)), {
|
|
47075
|
+
onNone: () => "none",
|
|
47076
|
+
onSome: () => names.map((name) => `'${name}'`).join(", ")
|
|
47077
|
+
});
|
|
47078
|
+
const unknownOptInMutationsError = (requested) => map$13(fromNullishOr(unknownOptInMutations(requested).at(0)), () => InstrumentError$1.make({
|
|
47079
|
+
message: `Unknown opt-in mutations: ${listNames$1(unknownOptInMutations(requested))}. Known opt-in mutations: ${listNames$1(KNOWN_OPT_IN_MUTATIONS)}.`,
|
|
47080
|
+
cause: void 0
|
|
47081
|
+
}));
|
|
47082
|
+
const refuseUnknownOptInMutations = (requested) => match$7(unknownOptInMutationsError(requested), {
|
|
47083
|
+
onNone: () => void_$1,
|
|
47084
|
+
onSome: (error) => fail$2(error)
|
|
47085
|
+
});
|
|
46319
47086
|
function toTransformerOptions(options) {
|
|
46320
47087
|
const base = {
|
|
46321
47088
|
excludedMutations: [...options.excludedMutations],
|
|
47089
|
+
optInMutations: [...requestedOptInMutations(options)],
|
|
46322
47090
|
ignorers: options.ignorers.filter(isIgnorer)
|
|
46323
47091
|
};
|
|
46324
47092
|
if (options.noHeader !== void 0) return {
|
|
@@ -46340,6 +47108,7 @@ function printedFile(file, ast) {
|
|
|
46340
47108
|
}];
|
|
46341
47109
|
}
|
|
46342
47110
|
const instrument = (files, options, basePath) => gen(function* () {
|
|
47111
|
+
yield* refuseUnknownOptInMutations(requestedOptInMutations(options));
|
|
46343
47112
|
const schemaFiles = files.map((file) => ({
|
|
46344
47113
|
name: file.name,
|
|
46345
47114
|
content: file.content,
|
|
@@ -46922,7 +47691,7 @@ const FileResultDictionarySchema = Record(String$7, Struct({
|
|
|
46922
47691
|
replacement: optional$4(String$7),
|
|
46923
47692
|
description: optional$4(String$7),
|
|
46924
47693
|
statusReason: optional$4(String$7),
|
|
46925
|
-
static: optional$4(Boolean$
|
|
47694
|
+
static: optional$4(Boolean$6),
|
|
46926
47695
|
coveredBy: optional$4(ArraySchema(String$7)),
|
|
46927
47696
|
killedBy: optional$4(ArraySchema(String$7)),
|
|
46928
47697
|
testsCompleted: optional$4(NonNegativeInt),
|
|
@@ -47070,7 +47839,7 @@ const DryRunOptionsSchema = Struct({
|
|
|
47070
47839
|
files: optionalKey(ArraySchema(String$7)),
|
|
47071
47840
|
testFiles: optionalKey(ArraySchema(String$7))
|
|
47072
47841
|
});
|
|
47073
|
-
const TestRunnerCapabilitiesSchema = Struct({ reloadEnvironment: Boolean$
|
|
47842
|
+
const TestRunnerCapabilitiesSchema = Struct({ reloadEnvironment: Boolean$6 });
|
|
47074
47843
|
var TestRunnerFailed = class extends TaggedError()("TestRunnerFailed", {
|
|
47075
47844
|
cause: String$7,
|
|
47076
47845
|
phase: Literals$2([
|
|
@@ -47096,7 +47865,7 @@ const ReporterPlanDescriptorSchema = Struct({
|
|
|
47096
47865
|
mutantId: String$7,
|
|
47097
47866
|
plan: Literals$2(["EarlyResult", "Run"]),
|
|
47098
47867
|
netTime: NonNegativeFinite,
|
|
47099
|
-
reloadEnvironment: Boolean$
|
|
47868
|
+
reloadEnvironment: Boolean$6
|
|
47100
47869
|
});
|
|
47101
47870
|
var DryRunCompleted = class extends TaggedClass()("dryRunCompleted", {
|
|
47102
47871
|
timing: RunTimingSchema,
|
|
@@ -47282,14 +48051,14 @@ const PackageManager = Literals$2([
|
|
|
47282
48051
|
]);
|
|
47283
48052
|
const CommandRunnerOptionsSchema = openStruct({ command: defaulted(String$7, "npm test") });
|
|
47284
48053
|
const ClearTextReporterOptions = openStruct({
|
|
47285
|
-
allowColor: defaulted(Boolean$
|
|
47286
|
-
allowEmojis: defaulted(Boolean$
|
|
47287
|
-
logTests: defaulted(Boolean$
|
|
48054
|
+
allowColor: defaulted(Boolean$6, true),
|
|
48055
|
+
allowEmojis: defaulted(Boolean$6, false),
|
|
48056
|
+
logTests: defaulted(Boolean$6, true),
|
|
47288
48057
|
maxTestsToLog: defaulted(Finite$3.pipe(check(isGreaterThanOrEqualTo(0))), 3),
|
|
47289
|
-
reportTests: defaulted(Boolean$
|
|
47290
|
-
reportMutants: defaulted(Boolean$
|
|
47291
|
-
reportScoreTable: defaulted(Boolean$
|
|
47292
|
-
skipFull: defaulted(Boolean$
|
|
48058
|
+
reportTests: defaulted(Boolean$6, true),
|
|
48059
|
+
reportMutants: defaulted(Boolean$6, true),
|
|
48060
|
+
reportScoreTable: defaulted(Boolean$6, true),
|
|
48061
|
+
skipFull: defaulted(Boolean$6, false)
|
|
47293
48062
|
});
|
|
47294
48063
|
const HtmlReporterOptions = Struct({ fileName: defaulted(String$7, "reports/mutation/mutation.html") });
|
|
47295
48064
|
const JsonReporterOptions = Struct({ fileName: defaulted(String$7, "reports/mutation/mutation.json") });
|
|
@@ -47319,12 +48088,15 @@ const OrderedMutationScoreThresholds = declare(isMutationScoreThresholds, {
|
|
|
47319
48088
|
})
|
|
47320
48089
|
});
|
|
47321
48090
|
const MutationScoreThresholdsSchema = MutationScoreThresholdsValuesSchema.pipe(decodeTo(OrderedMutationScoreThresholds, passthrough()));
|
|
47322
|
-
const MutatorDescriptor = Struct({
|
|
48091
|
+
const MutatorDescriptor = Struct({
|
|
48092
|
+
excludedMutations: defaulted(ArraySchema(String$7), []),
|
|
48093
|
+
optInMutations: defaulted(ArraySchema(String$7), [])
|
|
48094
|
+
});
|
|
47323
48095
|
const WarningOptions = openStruct({
|
|
47324
|
-
unknownOptions: defaulted(Boolean$
|
|
47325
|
-
preprocessorErrors: defaulted(Boolean$
|
|
47326
|
-
unserializableOptions: defaulted(Boolean$
|
|
47327
|
-
slow: defaulted(Boolean$
|
|
48096
|
+
unknownOptions: defaulted(Boolean$6, true),
|
|
48097
|
+
preprocessorErrors: defaulted(Boolean$6, true),
|
|
48098
|
+
unserializableOptions: defaulted(Boolean$6, true),
|
|
48099
|
+
slow: defaulted(Boolean$6, true)
|
|
47328
48100
|
});
|
|
47329
48101
|
const ConcurrencyCount = Finite$3.pipe(check(isGreaterThanOrEqualTo(1)));
|
|
47330
48102
|
const ConcurrencyPercent = String$7.pipe(check(isPattern(/^(100|[1-9]?[0-9])%$/)));
|
|
@@ -47340,7 +48112,7 @@ const CheckerEntryConfigSchema = Struct({
|
|
|
47340
48112
|
options: optional$4(Record(String$7, Unknown))
|
|
47341
48113
|
});
|
|
47342
48114
|
const StrykerOptionsSchema = StructWithRest(Struct({
|
|
47343
|
-
allowConsoleColors: defaulted(Boolean$
|
|
48115
|
+
allowConsoleColors: defaulted(Boolean$6, true),
|
|
47344
48116
|
buildCommand: optional$4(String$7),
|
|
47345
48117
|
checkers: defaulted(ArraySchema(CheckerEntryConfigSchema), []),
|
|
47346
48118
|
checkerNodeArgs: defaulted(ArraySchema(String$7), []),
|
|
@@ -47357,20 +48129,23 @@ const StrykerOptionsSchema = StructWithRest(Struct({
|
|
|
47357
48129
|
reportScoreTable: true,
|
|
47358
48130
|
skipFull: false
|
|
47359
48131
|
}),
|
|
47360
|
-
dryRunOnly: defaulted(Boolean$
|
|
48132
|
+
dryRunOnly: defaulted(Boolean$6, false),
|
|
47361
48133
|
ignorePatterns: defaulted(ArraySchema(String$7), []),
|
|
47362
|
-
ignoreStatic: defaulted(Boolean$
|
|
47363
|
-
incremental: defaulted(Boolean$
|
|
48134
|
+
ignoreStatic: defaulted(Boolean$6, false),
|
|
48135
|
+
incremental: defaulted(Boolean$6, false),
|
|
47364
48136
|
incrementalFile: defaulted(String$7, "reports/stryker-incremental.json"),
|
|
47365
48137
|
progressStreamFile: defaulted(String$7, "reports/mutation-stream.jsonl"),
|
|
47366
|
-
force: defaulted(Boolean$
|
|
48138
|
+
force: defaulted(Boolean$6, false),
|
|
47367
48139
|
fileLogLevel: defaulted(LogLevel$1, RENDERED_OPTION_DEFAULTS$1.fileLogLevel),
|
|
47368
|
-
inPlace: defaulted(Boolean$
|
|
48140
|
+
inPlace: defaulted(Boolean$6, false),
|
|
47369
48141
|
logLevel: defaulted(LogLevel$1, RENDERED_OPTION_DEFAULTS$1.logLevel),
|
|
47370
48142
|
maxConcurrentTestRunners: defaulted(Finite$3, 9007199254740991),
|
|
47371
48143
|
maxTestRunnerReuse: defaulted(Finite$3, 0),
|
|
47372
48144
|
mutate: defaulted(ArraySchema(String$7), ["{src,lib}/**/!(*.+(s|S)pec|*.+(t|T)est).+(cjs|mjs|js|ts|mts|cts|jsx|tsx|html|vue|svelte)", "!{src,lib}/**/__tests__/**/*.+(cjs|mjs|js|ts|mts|cts|jsx|tsx|html|vue|svelte)"]),
|
|
47373
|
-
mutator: defaulted(MutatorDescriptor, {
|
|
48145
|
+
mutator: defaulted(MutatorDescriptor, {
|
|
48146
|
+
excludedMutations: [],
|
|
48147
|
+
optInMutations: []
|
|
48148
|
+
}),
|
|
47374
48149
|
packageManager: optional$4(PackageManager),
|
|
47375
48150
|
plugins: defaulted(ArraySchema(PluginFileUrl), []),
|
|
47376
48151
|
appendPlugins: defaulted(ArraySchema(PluginFileUrl), []),
|
|
@@ -47381,8 +48156,8 @@ const StrykerOptionsSchema = StructWithRest(Struct({
|
|
|
47381
48156
|
]),
|
|
47382
48157
|
htmlReporter: defaulted(HtmlReporterOptions, { fileName: "reports/mutation/mutation.html" }),
|
|
47383
48158
|
jsonReporter: defaulted(JsonReporterOptions, { fileName: "reports/mutation/mutation.json" }),
|
|
47384
|
-
disableTypeChecks: defaulted(Union([Boolean$
|
|
47385
|
-
symlinkNodeModules: defaulted(Boolean$
|
|
48159
|
+
disableTypeChecks: defaulted(Union([Boolean$6, String$7]), true),
|
|
48160
|
+
symlinkNodeModules: defaulted(Boolean$6, true),
|
|
47386
48161
|
tempDirName: defaulted(String$7, RENDERED_OPTION_DEFAULTS$1.tempDirName),
|
|
47387
48162
|
cleanTempDir: defaulted(Literals$2([
|
|
47388
48163
|
"always",
|
|
@@ -47400,9 +48175,9 @@ const StrykerOptionsSchema = StructWithRest(Struct({
|
|
|
47400
48175
|
timeoutMS: defaulted(Finite$3, 5e3),
|
|
47401
48176
|
dryRunTimeoutMinutes: defaulted(Finite$3.pipe(check(isGreaterThanOrEqualTo(0))), 5),
|
|
47402
48177
|
tsconfigFile: defaulted(String$7, "tsconfig.json"),
|
|
47403
|
-
warnings: defaulted(Union([Boolean$
|
|
47404
|
-
disableBail: defaulted(Boolean$
|
|
47405
|
-
allowEmpty: defaulted(Boolean$
|
|
48178
|
+
warnings: defaulted(Union([Boolean$6, WarningOptions]), true),
|
|
48179
|
+
disableBail: defaulted(Boolean$6, false),
|
|
48180
|
+
allowEmpty: defaulted(Boolean$6, false),
|
|
47406
48181
|
ignorers: defaulted(ArraySchema(PluginFileUrl), []),
|
|
47407
48182
|
testFiles: defaulted(ArraySchema(String$7), [])
|
|
47408
48183
|
}), [Record(String$7, Unknown)]);
|
|
@@ -54215,7 +54990,7 @@ function wasProducedBySurvivorsRun(priorReport) {
|
|
|
54215
54990
|
const hashValueSchema = () => Union([
|
|
54216
54991
|
Null,
|
|
54217
54992
|
Finite$3,
|
|
54218
|
-
Boolean$
|
|
54993
|
+
Boolean$6,
|
|
54219
54994
|
String$7,
|
|
54220
54995
|
ArraySchema(suspend$1(hashValueSchema)),
|
|
54221
54996
|
Record(String$7, suspend$1(hashValueSchema))
|
|
@@ -54324,14 +55099,14 @@ const admitSurvivorsRun = Workflow_exports.make(AdmitSurvivorsRunCommand, decide
|
|
|
54324
55099
|
//#endregion
|
|
54325
55100
|
//#region src/classify-run-outcome.workflow.ts
|
|
54326
55101
|
var RunOutcomeCommand = class extends TaggedClass()("RunOutcomeCommand", {
|
|
54327
|
-
succeeded: Boolean$
|
|
54328
|
-
interrupted: Boolean$
|
|
55102
|
+
succeeded: Boolean$6,
|
|
55103
|
+
interrupted: Boolean$6,
|
|
54329
55104
|
helpErrorCount: optional$4(Finite$3),
|
|
54330
|
-
cliError: Boolean$
|
|
55105
|
+
cliError: Boolean$6,
|
|
54331
55106
|
unrecognized: optional$4(String$7),
|
|
54332
55107
|
survivorsReason: optional$4(Literals$2(["no-report", "mismatch"])),
|
|
54333
55108
|
survivorsDiagnostic: optional$4(String$7),
|
|
54334
|
-
schemaError: Boolean$
|
|
55109
|
+
schemaError: Boolean$6,
|
|
54335
55110
|
successExitClass: optional$4(ExitClass),
|
|
54336
55111
|
highestExitClass: optional$4(ExitClass),
|
|
54337
55112
|
configDetail: optional$4(String$7),
|
|
@@ -54345,7 +55120,7 @@ var RunExit = class extends TaggedError()("RunExit", { code: Finite$3 }) {
|
|
|
54345
55120
|
const CONFIG_CODE$1 = 2;
|
|
54346
55121
|
const classCode = (exitClass) => value(exitClass).pipe(when("VerdictFail", () => 1), when("ConfigError", () => CONFIG_CODE$1), when("RuntimeError", () => 3), when("InternalError", () => 4), exhaustive);
|
|
54347
55122
|
const RunOutcomeTypeId = Symbol.for("@systemfsoftware/stryker-js/RunOutcome");
|
|
54348
|
-
var RunOk = class extends TaggedClass()("RunOk", { help: Boolean$
|
|
55123
|
+
var RunOk = class extends TaggedClass()("RunOk", { help: Boolean$6 }) {
|
|
54349
55124
|
[RunOutcomeTypeId] = RunOutcomeTypeId;
|
|
54350
55125
|
};
|
|
54351
55126
|
var RunInterrupted = class extends TaggedError()("RunInterrupted", { code: Finite$3 }) {
|
|
@@ -55684,7 +56459,7 @@ const EMPTY_TEST_FILES = {};
|
|
|
55684
56459
|
const ReportPart = Struct({
|
|
55685
56460
|
label: String$7,
|
|
55686
56461
|
outcome: String$7,
|
|
55687
|
-
incomplete: Boolean$
|
|
56462
|
+
incomplete: Boolean$6,
|
|
55688
56463
|
report: optional$4(MutationTestResultSchema)
|
|
55689
56464
|
});
|
|
55690
56465
|
const MergeVerdictRow = Struct({
|
|
@@ -64701,7 +65476,7 @@ function jsonSchema() {
|
|
|
64701
65476
|
schema = Union([
|
|
64702
65477
|
Null,
|
|
64703
65478
|
Finite$3,
|
|
64704
|
-
Boolean$
|
|
65479
|
+
Boolean$6,
|
|
64705
65480
|
String$7,
|
|
64706
65481
|
ArraySchema(suspend$1(() => schema)),
|
|
64707
65482
|
Record(String$7, suspend$1(() => schema))
|
|
@@ -64723,12 +65498,12 @@ function regexpSchema() {
|
|
|
64723
65498
|
"^\\d{4}-\\d{2}-\\d{2}$"
|
|
64724
65499
|
]),
|
|
64725
65500
|
flags: Struct({
|
|
64726
|
-
g: Boolean$
|
|
64727
|
-
i: Boolean$
|
|
64728
|
-
m: Boolean$
|
|
64729
|
-
s: Boolean$
|
|
64730
|
-
u: Boolean$
|
|
64731
|
-
y: Boolean$
|
|
65501
|
+
g: Boolean$6,
|
|
65502
|
+
i: Boolean$6,
|
|
65503
|
+
m: Boolean$6,
|
|
65504
|
+
s: Boolean$6,
|
|
65505
|
+
u: Boolean$6,
|
|
65506
|
+
y: Boolean$6
|
|
64732
65507
|
})
|
|
64733
65508
|
});
|
|
64734
65509
|
}
|
|
@@ -66174,12 +66949,12 @@ var PlannedTestView = class extends Class("PlannedTestView")({
|
|
|
66174
66949
|
fullName: String$7,
|
|
66175
66950
|
file: String$7,
|
|
66176
66951
|
seq: Finite$3,
|
|
66177
|
-
inverted: Boolean$
|
|
66178
|
-
skipped: Boolean$
|
|
66952
|
+
inverted: Boolean$6,
|
|
66953
|
+
skipped: Boolean$6
|
|
66179
66954
|
}) {};
|
|
66180
66955
|
var DrainRegistryCommand = class extends TaggedClass()("DrainRegistryCommand", {
|
|
66181
66956
|
plan: ArraySchema(PlannedTestView),
|
|
66182
|
-
timedOut: optional$4(Boolean$
|
|
66957
|
+
timedOut: optional$4(Boolean$6),
|
|
66183
66958
|
outcomes: optional$4(Record(String$7, TestOutcomeSchema)),
|
|
66184
66959
|
lateRejections: optional$4(ArraySchema(String$7))
|
|
66185
66960
|
}) {};
|
|
@@ -84036,8 +84811,8 @@ const FramingState = Struct({
|
|
|
84036
84811
|
"agent",
|
|
84037
84812
|
"tool"
|
|
84038
84813
|
]),
|
|
84039
|
-
headerWritten: Boolean$
|
|
84040
|
-
terminalSeen: Boolean$
|
|
84814
|
+
headerWritten: Boolean$6,
|
|
84815
|
+
terminalSeen: Boolean$6,
|
|
84041
84816
|
completed: NonNegativeInt,
|
|
84042
84817
|
total: NullOr(NonNegativeInt)
|
|
84043
84818
|
});
|
|
@@ -84180,7 +84955,7 @@ var DryRunCommand = class extends TaggedClass()("DryRunCommand", {
|
|
|
84180
84955
|
]),
|
|
84181
84956
|
testCount: Finite$3,
|
|
84182
84957
|
failedTestCount: Finite$3,
|
|
84183
|
-
allowEmpty: Boolean$
|
|
84958
|
+
allowEmpty: Boolean$6,
|
|
84184
84959
|
errorMessage: optional$4(String$7),
|
|
84185
84960
|
reason: optional$4(String$7)
|
|
84186
84961
|
}) {};
|
|
@@ -86204,7 +86979,7 @@ var InstrumentError = class extends TaggedError()("InstrumentError", {
|
|
|
86204
86979
|
}) {};
|
|
86205
86980
|
var InstrumentCommand = class extends TaggedClass()("InstrumentCommand", {
|
|
86206
86981
|
fileCount: Finite$3,
|
|
86207
|
-
inPlace: Boolean$
|
|
86982
|
+
inPlace: Boolean$6,
|
|
86208
86983
|
pluginCount: Finite$3
|
|
86209
86984
|
}) {};
|
|
86210
86985
|
const InstrumentDecisionTypeId = Symbol.for("@systemfsoftware/stryker-js/InstrumentDecision");
|
|
@@ -86266,7 +87041,7 @@ const FileResultLikeSchema = Struct({
|
|
|
86266
87041
|
]),
|
|
86267
87042
|
killedBy: optional$4(ArraySchema(String$7)),
|
|
86268
87043
|
coveredBy: optional$4(ArraySchema(String$7)),
|
|
86269
|
-
static: optional$4(Boolean$
|
|
87044
|
+
static: optional$4(Boolean$6),
|
|
86270
87045
|
statusReason: optional$4(String$7),
|
|
86271
87046
|
testsCompleted: optional$4(Finite$3),
|
|
86272
87047
|
description: optional$4(String$7),
|
|
@@ -87065,17 +87840,17 @@ const ExtendsArraySchema = ArraySchema(String$7);
|
|
|
87065
87840
|
TaggedClass()("SandboxCommand", {
|
|
87066
87841
|
fileEntries: ArraySchema(Struct({
|
|
87067
87842
|
name: String$7,
|
|
87068
|
-
hasChanges: Boolean$
|
|
87843
|
+
hasChanges: Boolean$6
|
|
87069
87844
|
})),
|
|
87070
87845
|
basePath: String$7,
|
|
87071
87846
|
workingDirectory: String$7,
|
|
87072
87847
|
backupDirectory: String$7,
|
|
87073
|
-
inPlace: Boolean$
|
|
87848
|
+
inPlace: Boolean$6
|
|
87074
87849
|
});
|
|
87075
87850
|
TaggedClass()("SandboxDecision", { entries: ArraySchema(Struct({
|
|
87076
87851
|
original: String$7,
|
|
87077
87852
|
target: String$7,
|
|
87078
|
-
needsBackup: Boolean$
|
|
87853
|
+
needsBackup: Boolean$6
|
|
87079
87854
|
})) });
|
|
87080
87855
|
//#endregion
|
|
87081
87856
|
//#region src/Sandbox.ts
|
|
@@ -87415,7 +88190,8 @@ const instrumentCell = Sandwich_exports.read((command) => gen(function* () {
|
|
|
87415
88190
|
})));
|
|
87416
88191
|
const instrumentResult = yield* instrument(filesToMutate, {
|
|
87417
88192
|
ignorers: [...command.ignorers],
|
|
87418
|
-
excludedMutations: [...command.options.mutator.excludedMutations]
|
|
88193
|
+
excludedMutations: [...command.options.mutator.excludedMutations],
|
|
88194
|
+
optInMutations: [...command.options.mutator.optInMutations]
|
|
87419
88195
|
}, env.basePath).pipe(mapError$1((cause) => StageError.make({
|
|
87420
88196
|
stage: "instrument",
|
|
87421
88197
|
reason: "Instrumenter failed",
|
|
@@ -87486,10 +88262,10 @@ const instrumentCell = Sandwich_exports.read((command) => gen(function* () {
|
|
|
87486
88262
|
//#endregion
|
|
87487
88263
|
//#region src/MutationTest.schema.ts
|
|
87488
88264
|
var MutationTestCommand = class extends TaggedClass()("MutationTestCommand", {
|
|
87489
|
-
dryRunOnly: Boolean$
|
|
87490
|
-
allowEmpty: Boolean$
|
|
88265
|
+
dryRunOnly: Boolean$6,
|
|
88266
|
+
allowEmpty: Boolean$6,
|
|
87491
88267
|
testCount: Finite$3,
|
|
87492
|
-
isZero: Boolean$
|
|
88268
|
+
isZero: Boolean$6
|
|
87493
88269
|
}) {};
|
|
87494
88270
|
//#endregion
|
|
87495
88271
|
//#region src/admit-mutation-test.workflow.ts
|
|
@@ -90430,9 +91206,9 @@ const runStrykerCli = (input, createRunEventStream) => gen(function* () {
|
|
|
90430
91206
|
//#region src/resolve-output-mode.workflow.ts
|
|
90431
91207
|
const TOOL_VARIABLES$1 = ["CLAUDECODE", "CODEX_SANDBOX"];
|
|
90432
91208
|
var ResolveModeCommand = class extends TaggedClass()("ResolveModeCommand", {
|
|
90433
|
-
stdoutIsTTY: Boolean$
|
|
90434
|
-
text: optional$4(Boolean$
|
|
90435
|
-
json: optional$4(Boolean$
|
|
91209
|
+
stdoutIsTTY: Boolean$6,
|
|
91210
|
+
text: optional$4(Boolean$6),
|
|
91211
|
+
json: optional$4(Boolean$6),
|
|
90436
91212
|
envMode: optional$4(String$7),
|
|
90437
91213
|
agent: optional$4(String$7),
|
|
90438
91214
|
toolVars: optional$4(Record(String$7, String$7))
|
|
@@ -90454,13 +91230,13 @@ const ModeSignal = Literals$2([
|
|
|
90454
91230
|
]);
|
|
90455
91231
|
var HumanOutput = class extends TaggedClass()("HumanOutput", {
|
|
90456
91232
|
signal: ModeSignal,
|
|
90457
|
-
stdoutIsTTY: Boolean$
|
|
91233
|
+
stdoutIsTTY: Boolean$6
|
|
90458
91234
|
}) {
|
|
90459
91235
|
[ResolveModeTypeId] = ResolveModeTypeId;
|
|
90460
91236
|
};
|
|
90461
91237
|
var MachineOutput = class extends TaggedClass()("MachineOutput", {
|
|
90462
91238
|
signal: ModeSignal,
|
|
90463
|
-
stdoutIsTTY: Boolean$
|
|
91239
|
+
stdoutIsTTY: Boolean$6
|
|
90464
91240
|
}) {
|
|
90465
91241
|
[ResolveModeTypeId] = ResolveModeTypeId;
|
|
90466
91242
|
};
|