@systemfsoftware/stryker-js-vitest-runner 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +59 -16
- package/dist/index.d.mts +0 -8
- package/dist/index.mjs +1 -47
- package/dist/main.mjs +924 -985
- package/package.json +12 -4
package/dist/main.mjs
CHANGED
|
@@ -7167,7 +7167,7 @@ const asSome = (self) => map$4(self, some);
|
|
|
7167
7167
|
/** @internal */
|
|
7168
7168
|
const andThen$3 = /*#__PURE__*/ dual(2, (self, f) => flatMap$2(self, (a) => isEffect$1(f) ? f : internalCall(() => f(a))));
|
|
7169
7169
|
/** @internal */
|
|
7170
|
-
const tap$
|
|
7170
|
+
const tap$2 = /*#__PURE__*/ dual(2, (self, f) => flatMap$2(self, (a) => as$1(isEffect$1(f) ? f : internalCall(() => f(a)), a)));
|
|
7171
7171
|
/** @internal */
|
|
7172
7172
|
const asVoid = (self) => flatMap$2(self, (_) => exitVoid);
|
|
7173
7173
|
/** @internal */
|
|
@@ -7574,7 +7574,7 @@ const scopedWith$1 = (f) => suspend$2(() => {
|
|
|
7574
7574
|
return onExit$1(f(scope), (exit) => suspend$2(() => scopeCloseUnsafe(scope, exit) ?? void_$3));
|
|
7575
7575
|
});
|
|
7576
7576
|
/** @internal */
|
|
7577
|
-
const acquireRelease$1 = (acquire, release, options) => contextWith$1((context) => uninterruptibleMask((restore) => flatMap$2(scope$1, (scope) => tap$
|
|
7577
|
+
const acquireRelease$1 = (acquire, release, options) => contextWith$1((context) => uninterruptibleMask((restore) => flatMap$2(scope$1, (scope) => tap$2(options?.interruptible ? restore(acquire) : acquire, (a) => scopeAddFinalizerExit(scope, (exit) => provideContext$3(release(a, exit), context))))));
|
|
7578
7578
|
/** @internal */
|
|
7579
7579
|
const addFinalizer$2 = (finalizer) => flatMap$2(scope$1, (scope) => contextWith$1((context) => scopeAddFinalizerExit(scope, (exit) => provideContext$3(finalizer(exit), context))));
|
|
7580
7580
|
/** @internal */
|
|
@@ -10669,6 +10669,27 @@ const provideMerge = /*#__PURE__*/ dual(2, (self, that) => provideWith(self, tha
|
|
|
10669
10669
|
*/
|
|
10670
10670
|
const flatMap$1 = /*#__PURE__*/ dual(2, (self, f) => fromBuild((memoMap, scope) => flatMap$2(self.build(memoMap, scope), (context) => f(context).build(memoMap, scope))));
|
|
10671
10671
|
/**
|
|
10672
|
+
* Performs the specified effect if this layer succeeds.
|
|
10673
|
+
*
|
|
10674
|
+
* **When to use**
|
|
10675
|
+
*
|
|
10676
|
+
* Use to run an effectful observation after a layer has been built
|
|
10677
|
+
* successfully, such as logging or metrics, without changing the services the
|
|
10678
|
+
* layer provides.
|
|
10679
|
+
*
|
|
10680
|
+
* **Details**
|
|
10681
|
+
*
|
|
10682
|
+
* The callback receives the services produced by this layer. Its result is
|
|
10683
|
+
* discarded, and the original layer output is preserved.
|
|
10684
|
+
*
|
|
10685
|
+
* @see {@link tapError} for running an effect when layer construction fails with a typed error
|
|
10686
|
+
* @see {@link tapCause} for running an effect when layer construction fails with any cause
|
|
10687
|
+
*
|
|
10688
|
+
* @category sequencing
|
|
10689
|
+
* @since 2.0.0
|
|
10690
|
+
*/
|
|
10691
|
+
const tap$1 = /*#__PURE__*/ dual(2, (self, f) => fromBuild((memoMap, scope) => flatMap$2(self.build(memoMap, scope), (context) => provide$4(as$1(f(context), context), scope))));
|
|
10692
|
+
/**
|
|
10672
10693
|
* Builds this layer and keeps it alive until the returned effect is interrupted.
|
|
10673
10694
|
*
|
|
10674
10695
|
* **When to use**
|
|
@@ -11821,7 +11842,7 @@ const andThen$2 = andThen$3;
|
|
|
11821
11842
|
* @category sequencing
|
|
11822
11843
|
* @since 2.0.0
|
|
11823
11844
|
*/
|
|
11824
|
-
const tap = tap$
|
|
11845
|
+
const tap = tap$2;
|
|
11825
11846
|
/**
|
|
11826
11847
|
* Converts both success and failure of an `Effect` into a `Result` type.
|
|
11827
11848
|
*
|
|
@@ -21525,6 +21546,32 @@ function isPattern(regExp, annotations) {
|
|
|
21525
21546
|
});
|
|
21526
21547
|
}
|
|
21527
21548
|
/**
|
|
21549
|
+
* Validates at runtime that a string starts with the specified literal prefix.
|
|
21550
|
+
*
|
|
21551
|
+
* **Details**
|
|
21552
|
+
*
|
|
21553
|
+
* RegExp metacharacters in the prefix are escaped in JSON Schema and arbitrary
|
|
21554
|
+
* metadata so that the generated patterns retain literal `startsWith` semantics.
|
|
21555
|
+
*
|
|
21556
|
+
* @category validation
|
|
21557
|
+
* @since 4.0.0
|
|
21558
|
+
*/
|
|
21559
|
+
function isStartsWith(startsWith, annotations) {
|
|
21560
|
+
const formatted = JSON.stringify(startsWith);
|
|
21561
|
+
const regExp = new globalThis.RegExp(`^${escape(startsWith)}`);
|
|
21562
|
+
return makeFilter((s) => s.startsWith(startsWith), {
|
|
21563
|
+
expected: `a string starting with ${formatted}`,
|
|
21564
|
+
representation: {
|
|
21565
|
+
id: "effect/schema/isStartsWith",
|
|
21566
|
+
payload: { startsWith }
|
|
21567
|
+
},
|
|
21568
|
+
toJsonSchema: () => ({ pattern: regExp.source }),
|
|
21569
|
+
toCode: () => ({ runtime: `Schema.isStartsWith(${format$1(startsWith)})` }),
|
|
21570
|
+
arbitrary: { constraint: { patterns: [regExp.source] } },
|
|
21571
|
+
...annotations
|
|
21572
|
+
});
|
|
21573
|
+
}
|
|
21574
|
+
/**
|
|
21528
21575
|
* Schema for finite numbers, rejecting `NaN`, `Infinity`, and `-Infinity`.
|
|
21529
21576
|
*
|
|
21530
21577
|
* @category schemas
|
|
@@ -23313,6 +23360,133 @@ const orElse = orElse$1;
|
|
|
23313
23360
|
*/
|
|
23314
23361
|
const exhaustive = exhaustive$1;
|
|
23315
23362
|
//#endregion
|
|
23363
|
+
//#region ../stryker-js-instrumenter/dist/Mutant-DnhV_fpo.mjs
|
|
23364
|
+
const PositionSchema = Struct({
|
|
23365
|
+
line: Finite,
|
|
23366
|
+
column: Finite
|
|
23367
|
+
});
|
|
23368
|
+
const LocationSchema = Struct({
|
|
23369
|
+
start: PositionSchema,
|
|
23370
|
+
end: PositionSchema
|
|
23371
|
+
});
|
|
23372
|
+
const OpenEndLocationSchema = Struct({
|
|
23373
|
+
start: PositionSchema,
|
|
23374
|
+
end: optional(PositionSchema)
|
|
23375
|
+
});
|
|
23376
|
+
const MutantStatusSchema = Literals([
|
|
23377
|
+
"Killed",
|
|
23378
|
+
"Survived",
|
|
23379
|
+
"NoCoverage",
|
|
23380
|
+
"CompileError",
|
|
23381
|
+
"RuntimeError",
|
|
23382
|
+
"Timeout",
|
|
23383
|
+
"Ignored",
|
|
23384
|
+
"Pending"
|
|
23385
|
+
]);
|
|
23386
|
+
var Mutant = class extends TaggedClass()("Mutant", {
|
|
23387
|
+
id: NonEmptyString,
|
|
23388
|
+
fileName: NonEmptyString,
|
|
23389
|
+
mutatorName: NonEmptyString,
|
|
23390
|
+
replacement: String$1,
|
|
23391
|
+
location: LocationSchema,
|
|
23392
|
+
status: optional(MutantStatusSchema),
|
|
23393
|
+
statusReason: optional(String$1),
|
|
23394
|
+
coveredBy: optional(ArraySchema(String$1)),
|
|
23395
|
+
static: optional(Boolean$2),
|
|
23396
|
+
testsCompleted: optional(Finite),
|
|
23397
|
+
description: optional(String$1)
|
|
23398
|
+
}) {};
|
|
23399
|
+
const RunOptionsFields = {
|
|
23400
|
+
timeout: Finite,
|
|
23401
|
+
disableBail: Boolean$2
|
|
23402
|
+
};
|
|
23403
|
+
const MutantActivationSchema = Literals(["runtime", "static"]);
|
|
23404
|
+
const MutantRunOptionsSchema = Struct({
|
|
23405
|
+
...RunOptionsFields,
|
|
23406
|
+
activeMutant: Mutant,
|
|
23407
|
+
sandboxFileName: String$1,
|
|
23408
|
+
mutantActivation: MutantActivationSchema,
|
|
23409
|
+
reloadEnvironment: Boolean$2,
|
|
23410
|
+
testFilter: optionalKey(ArraySchema(String$1)),
|
|
23411
|
+
hitLimit: optionalKey(Finite)
|
|
23412
|
+
});
|
|
23413
|
+
const INSTRUMENTER_CONSTANTS = Object.freeze({
|
|
23414
|
+
NAMESPACE: "__stryker__",
|
|
23415
|
+
MUTATION_COVERAGE_OBJECT: "mutantCoverage",
|
|
23416
|
+
ACTIVE_MUTANT: "activeMutant",
|
|
23417
|
+
CURRENT_TEST_ID: "currentTestId",
|
|
23418
|
+
HIT_COUNT: "hitCount",
|
|
23419
|
+
HIT_LIMIT: "hitLimit",
|
|
23420
|
+
ACTIVE_MUTANT_ENV_VARIABLE: "__STRYKER_ACTIVE_MUTANT__"
|
|
23421
|
+
});
|
|
23422
|
+
function normalizeFileName(fileName) {
|
|
23423
|
+
return fileName.replace(/\\/g, "/");
|
|
23424
|
+
}
|
|
23425
|
+
const hasText = (value) => isString(value) && value.length > 0;
|
|
23426
|
+
const textIfNonEmpty = (value) => getOrUndefined$1(filter(fromUndefinedOr(value), hasText));
|
|
23427
|
+
const fieldOf = (value$15, key) => value(key in value$15).pipe(when(true, () => {
|
|
23428
|
+
return Reflect.get(value$15, key);
|
|
23429
|
+
}), orElse(() => void 0));
|
|
23430
|
+
const hasStringCode = (error) => value(fieldOf(error, "code")).pipe(when(string$1, () => true), orElse(() => false));
|
|
23431
|
+
function isErrnoException(error) {
|
|
23432
|
+
return value(error).pipe(when(instanceOf(Error), hasStringCode), orElse(() => false));
|
|
23433
|
+
}
|
|
23434
|
+
const isEmptyNumber = (value$11) => value(value$11).pipe(when(0, () => true), orElse(Number.isNaN));
|
|
23435
|
+
const isEmptyError = (error) => value(error).pipe(when(_undefined, () => true), when(_null, () => true), when(string$1, (text) => text.length === 0), when(number, isEmptyNumber), when(boolean$1, (value) => !value), orElse(() => false));
|
|
23436
|
+
const formatErrnoException = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.code} (${error.syscall}) ${stack}`), orElse(() => `${error.name}: ${error.code} (${error.syscall})`));
|
|
23437
|
+
const formatError = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.message}\n${stack}`), orElse(() => `${error.name}: ${error.message}`));
|
|
23438
|
+
const isJsonPrimitive = (value$8) => value(value$8).pipe(when(number, () => true), when(boolean$1, () => true), when(bigint, () => true), orElse(() => false));
|
|
23439
|
+
const jsonText = (error) => {
|
|
23440
|
+
try {
|
|
23441
|
+
return textIfNonEmpty(JSON.stringify(error));
|
|
23442
|
+
} catch {
|
|
23443
|
+
return;
|
|
23444
|
+
}
|
|
23445
|
+
};
|
|
23446
|
+
const isNonPlaceholderText = (text) => value({
|
|
23447
|
+
hasLength: text.length > 0,
|
|
23448
|
+
isPlaceholder: text === "[object Object]"
|
|
23449
|
+
}).pipe(when({
|
|
23450
|
+
hasLength: true,
|
|
23451
|
+
isPlaceholder: false
|
|
23452
|
+
}, () => true), orElse(() => false));
|
|
23453
|
+
const isUsableText = (value$14) => value(value$14).pipe(when(string$1, isNonPlaceholderText), orElse(() => false));
|
|
23454
|
+
const usableText = (value$9) => value(value$9).pipe(when(isUsableText, (text) => text), orElse(() => ""));
|
|
23455
|
+
const objectToStringText = (value$13) => value(fieldOf(value$13, "toString")).pipe(when(instanceOf(Function), (callable) => {
|
|
23456
|
+
try {
|
|
23457
|
+
return usableText(Reflect.apply(callable, value$13, []));
|
|
23458
|
+
} catch {
|
|
23459
|
+
return "";
|
|
23460
|
+
}
|
|
23461
|
+
}), orElse(() => ""));
|
|
23462
|
+
const isObjectType = (cause) => typeof cause === "object";
|
|
23463
|
+
const toStringText = (error) => value(error).pipe(when(_null, () => ""), when(isObjectType, (value) => objectToStringText(value)), orElse(() => ""));
|
|
23464
|
+
const stringifyRest = (error) => value(jsonText(error)).pipe(when(hasText, (json) => json), orElse(() => toStringText(error)));
|
|
23465
|
+
const stringifyNonError = (error) => value(error).pipe(when(string$1, (text) => text), when(isJsonPrimitive, (primitive) => JSON.stringify(primitive)), orElse(() => stringifyRest(error)));
|
|
23466
|
+
const errorText = (error) => value(error).pipe(when(isErrnoException, formatErrnoException), orElse(() => formatError(error)));
|
|
23467
|
+
function errorToString(error) {
|
|
23468
|
+
return value(error).pipe(when(isEmptyError, () => ""), when(instanceOf(Error), errorText), orElse(() => stringifyNonError(error)));
|
|
23469
|
+
}
|
|
23470
|
+
Object.freeze({ NoSuchFileOrDirectory: "ENOENT" });
|
|
23471
|
+
//#endregion
|
|
23472
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/PrimaryKey.js
|
|
23473
|
+
/**
|
|
23474
|
+
* Defines the unique identifier used to identify objects that implement the `PrimaryKey` interface.
|
|
23475
|
+
*
|
|
23476
|
+
* **When to use**
|
|
23477
|
+
*
|
|
23478
|
+
* Use to implement the `PrimaryKey` protocol as a computed property key on
|
|
23479
|
+
* classes or object literals that expose a stable string identifier.
|
|
23480
|
+
*
|
|
23481
|
+
* @see {@link PrimaryKey} for the protocol interface that declares the method keyed by this symbol
|
|
23482
|
+
* @see {@link value} for reading the string key from a `PrimaryKey` value
|
|
23483
|
+
* @see {@link isPrimaryKey} for checking whether an unknown value carries this method
|
|
23484
|
+
*
|
|
23485
|
+
* @category symbols
|
|
23486
|
+
* @since 2.0.0
|
|
23487
|
+
*/
|
|
23488
|
+
const symbol = "~effect/interfaces/PrimaryKey";
|
|
23489
|
+
//#endregion
|
|
23316
23490
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Fiber.js
|
|
23317
23491
|
/**
|
|
23318
23492
|
* Interrupts all fibers in the provided iterable, causing them to stop executing
|
|
@@ -24683,167 +24857,15 @@ const provideContext$1 = /*#__PURE__*/ dual(2, (self, context) => fromTransform$
|
|
|
24683
24857
|
*/
|
|
24684
24858
|
const runForEach = /*#__PURE__*/ dual(2, (self, f) => runWith(self, (pull) => forever(flatMap(pull, f), { disableYield: true })));
|
|
24685
24859
|
//#endregion
|
|
24686
|
-
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/PlatformError.js
|
|
24687
|
-
/**
|
|
24688
|
-
* Normalized errors for platform APIs.
|
|
24689
|
-
*
|
|
24690
|
-
* Platform services such as file systems, terminals, and sockets use
|
|
24691
|
-
* `PlatformError` to report host-level failures in a consistent shape. The
|
|
24692
|
-
* wrapper records whether the problem came from an invalid argument or from the
|
|
24693
|
-
* operating system, while preserving useful details such as the module, method,
|
|
24694
|
-
* path, descriptor, description, and original cause when available.
|
|
24695
|
-
*
|
|
24696
|
-
* @since 4.0.0
|
|
24697
|
-
*/
|
|
24698
|
-
const TypeId$11 = "~effect/platform/PlatformError";
|
|
24699
|
-
/**
|
|
24700
|
-
* Error data for an invalid argument passed to a platform API.
|
|
24701
|
-
*
|
|
24702
|
-
* **When to use**
|
|
24703
|
-
*
|
|
24704
|
-
* Use when you need to model caller input rejected before a platform operation
|
|
24705
|
-
* runs, including invalid-argument reason data.
|
|
24706
|
-
*
|
|
24707
|
-
* **Details**
|
|
24708
|
-
*
|
|
24709
|
-
* The error records the module and method that rejected the argument, with an
|
|
24710
|
-
* optional description and cause. It is usually wrapped in `PlatformError`.
|
|
24711
|
-
*
|
|
24712
|
-
* @see {@link badArgument} for creating a wrapped `PlatformError` whose reason is `BadArgument`
|
|
24713
|
-
* @see {@link SystemError} for failures reported by the host platform or operating system
|
|
24714
|
-
* @see {@link PlatformError} for the wrapper used by most platform APIs
|
|
24715
|
-
*
|
|
24716
|
-
* @category errors
|
|
24717
|
-
* @since 4.0.0
|
|
24718
|
-
*/
|
|
24719
|
-
var BadArgument = class extends (/*#__PURE__*/ TaggedError$1("BadArgument")) {
|
|
24720
|
-
/**
|
|
24721
|
-
* Formats the module, method, and optional description that rejected the argument.
|
|
24722
|
-
*
|
|
24723
|
-
* **When to use**
|
|
24724
|
-
*
|
|
24725
|
-
* Use to read the formatted error message for a rejected platform argument.
|
|
24726
|
-
*
|
|
24727
|
-
* @since 4.0.0
|
|
24728
|
-
*/
|
|
24729
|
-
get message() {
|
|
24730
|
-
return `${this.module}.${this.method}${this.description ? `: ${this.description}` : ""}`;
|
|
24731
|
-
}
|
|
24732
|
-
};
|
|
24733
|
-
/**
|
|
24734
|
-
* Error data for a platform or system operation failure.
|
|
24735
|
-
*
|
|
24736
|
-
* **When to use**
|
|
24737
|
-
*
|
|
24738
|
-
* Use when you need normalized reason data for a platform or system operation
|
|
24739
|
-
* failure, including the operation details.
|
|
24740
|
-
*
|
|
24741
|
-
* **Details**
|
|
24742
|
-
*
|
|
24743
|
-
* The error records a normalized `_tag`, the module and method that failed,
|
|
24744
|
-
* and optional details such as the syscall, path or descriptor, description,
|
|
24745
|
-
* and original cause. It is usually wrapped in `PlatformError`.
|
|
24746
|
-
*
|
|
24747
|
-
* @see {@link systemError} for creating the usual `PlatformError` wrapper from this reason data
|
|
24748
|
-
* @see {@link BadArgument} for platform API failures caused by rejected caller input before an operation runs
|
|
24749
|
-
* @see {@link SystemErrorTag} for the normalized tag values stored in `_tag`
|
|
24750
|
-
*
|
|
24751
|
-
* @category errors
|
|
24752
|
-
* @since 4.0.0
|
|
24753
|
-
*/
|
|
24754
|
-
var SystemError = class extends Error$2 {
|
|
24755
|
-
/**
|
|
24756
|
-
* Formats the normalized system error tag with operation and path details.
|
|
24757
|
-
*
|
|
24758
|
-
* **When to use**
|
|
24759
|
-
*
|
|
24760
|
-
* Use to read the formatted error message for a normalized system failure.
|
|
24761
|
-
*
|
|
24762
|
-
* @since 4.0.0
|
|
24763
|
-
*/
|
|
24764
|
-
get message() {
|
|
24765
|
-
return `${this._tag}: ${this.module}.${this.method}${this.pathOrDescriptor !== void 0 ? ` (${this.pathOrDescriptor})` : ""}${this.description ? `: ${this.description}` : ""}`;
|
|
24766
|
-
}
|
|
24767
|
-
};
|
|
24768
|
-
/**
|
|
24769
|
-
* Tagged error used by platform APIs to report either invalid arguments or
|
|
24770
|
-
* system-level failures.
|
|
24771
|
-
*
|
|
24772
|
-
* **When to use**
|
|
24773
|
-
*
|
|
24774
|
-
* Use as the shared error type for platform APIs that expose invalid arguments
|
|
24775
|
-
* and host or operating-system failures through a single `Effect` error
|
|
24776
|
-
* channel.
|
|
24777
|
-
*
|
|
24778
|
-
* **Details**
|
|
24779
|
-
*
|
|
24780
|
-
* The `reason` field contains the underlying `BadArgument` or `SystemError`.
|
|
24781
|
-
* When that reason has a cause, the cause is preserved on the wrapper.
|
|
24782
|
-
*
|
|
24783
|
-
* @see {@link BadArgument} for invalid inputs rejected before an operation runs
|
|
24784
|
-
* @see {@link SystemError} for failures reported by the host platform or operating system
|
|
24785
|
-
* @see {@link badArgument} for creating this wrapper from rejected caller input
|
|
24786
|
-
* @see {@link systemError} for creating this wrapper from a host or operating-system failure
|
|
24787
|
-
*
|
|
24788
|
-
* @category errors
|
|
24789
|
-
* @since 4.0.0
|
|
24790
|
-
*/
|
|
24791
|
-
var PlatformError = class extends (/*#__PURE__*/ TaggedError$1("PlatformError")) {
|
|
24792
|
-
constructor(reason) {
|
|
24793
|
-
if ("cause" in reason) super({
|
|
24794
|
-
reason,
|
|
24795
|
-
cause: reason.cause
|
|
24796
|
-
});
|
|
24797
|
-
else super({ reason });
|
|
24798
|
-
}
|
|
24799
|
-
/**
|
|
24800
|
-
* Marks this value as a platform error wrapper for runtime guards.
|
|
24801
|
-
*
|
|
24802
|
-
* **When to use**
|
|
24803
|
-
*
|
|
24804
|
-
* Use to identify `PlatformError` values through their runtime type marker.
|
|
24805
|
-
*
|
|
24806
|
-
* @since 4.0.0
|
|
24807
|
-
*/
|
|
24808
|
-
[TypeId$11] = TypeId$11;
|
|
24809
|
-
get message() {
|
|
24810
|
-
return this.reason.message;
|
|
24811
|
-
}
|
|
24812
|
-
};
|
|
24813
|
-
/**
|
|
24814
|
-
* Creates a `PlatformError` whose reason is a `SystemError`.
|
|
24815
|
-
*
|
|
24816
|
-
* **When to use**
|
|
24817
|
-
*
|
|
24818
|
-
* Use to adapt an operating-system or platform failure into the normalized
|
|
24819
|
-
* platform error model.
|
|
24820
|
-
*
|
|
24821
|
-
* @category constructors
|
|
24822
|
-
* @since 4.0.0
|
|
24823
|
-
*/
|
|
24824
|
-
const systemError = (options) => new PlatformError(new SystemError(options));
|
|
24825
|
-
/**
|
|
24826
|
-
* Creates a `PlatformError` whose reason is a `BadArgument`.
|
|
24827
|
-
*
|
|
24828
|
-
* **When to use**
|
|
24829
|
-
*
|
|
24830
|
-
* Use to report a platform API rejecting caller input before performing the
|
|
24831
|
-
* underlying operation.
|
|
24832
|
-
*
|
|
24833
|
-
* @category constructors
|
|
24834
|
-
* @since 4.0.0
|
|
24835
|
-
*/
|
|
24836
|
-
const badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
24837
|
-
//#endregion
|
|
24838
24860
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/stream.js
|
|
24839
|
-
const TypeId$
|
|
24861
|
+
const TypeId$11 = "~effect/Stream";
|
|
24840
24862
|
const streamVariance = {
|
|
24841
24863
|
_R: identity,
|
|
24842
24864
|
_E: identity,
|
|
24843
24865
|
_A: identity
|
|
24844
24866
|
};
|
|
24845
24867
|
const StreamProto = {
|
|
24846
|
-
[TypeId$
|
|
24868
|
+
[TypeId$11]: streamVariance,
|
|
24847
24869
|
pipe() {
|
|
24848
24870
|
return pipeArguments(this, arguments);
|
|
24849
24871
|
}
|
|
@@ -24856,7 +24878,7 @@ const fromChannel$2 = (channel) => {
|
|
|
24856
24878
|
};
|
|
24857
24879
|
//#endregion
|
|
24858
24880
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Sink.js
|
|
24859
|
-
const TypeId$
|
|
24881
|
+
const TypeId$10 = "~effect/Sink";
|
|
24860
24882
|
const endVoid = /*#__PURE__*/ succeed$1([void 0]);
|
|
24861
24883
|
const sinkVariance = {
|
|
24862
24884
|
_A: identity,
|
|
@@ -24866,7 +24888,7 @@ const sinkVariance = {
|
|
|
24866
24888
|
_R: identity
|
|
24867
24889
|
};
|
|
24868
24890
|
const SinkProto = {
|
|
24869
|
-
[TypeId$
|
|
24891
|
+
[TypeId$10]: sinkVariance,
|
|
24870
24892
|
pipe() {
|
|
24871
24893
|
return pipeArguments(this, arguments);
|
|
24872
24894
|
}
|
|
@@ -25019,7 +25041,7 @@ const unwrap$1 = (effect) => fromChannel$1(unwrap$2(map$2(effect, toChannel$1)))
|
|
|
25019
25041
|
* @category type IDs
|
|
25020
25042
|
* @since 4.0.0
|
|
25021
25043
|
*/
|
|
25022
|
-
const TypeId$
|
|
25044
|
+
const TypeId$9 = "~effect/Stream";
|
|
25023
25045
|
/**
|
|
25024
25046
|
* Checks whether a value is a Stream.
|
|
25025
25047
|
*
|
|
@@ -25035,7 +25057,7 @@ const TypeId$8 = "~effect/Stream";
|
|
|
25035
25057
|
* @category guards
|
|
25036
25058
|
* @since 4.0.0
|
|
25037
25059
|
*/
|
|
25038
|
-
const isStream = (u) => hasProperty(u, TypeId$
|
|
25060
|
+
const isStream = (u) => hasProperty(u, TypeId$9);
|
|
25039
25061
|
/**
|
|
25040
25062
|
* Creates a stream from a array-emitting `Channel`.
|
|
25041
25063
|
*
|
|
@@ -25218,6 +25240,597 @@ const provideContext = /*#__PURE__*/ dual(2, (self, context) => fromChannel(prov
|
|
|
25218
25240
|
*/
|
|
25219
25241
|
const runForEachArray = /*#__PURE__*/ dual(2, (self, f) => runForEach(self.channel, f));
|
|
25220
25242
|
//#endregion
|
|
25243
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/unstable/rpc/RpcSchema.js
|
|
25244
|
+
/**
|
|
25245
|
+
* RPC schema markers and interruption annotations.
|
|
25246
|
+
*
|
|
25247
|
+
* This module contains the small pieces of schema metadata that the RPC
|
|
25248
|
+
* declaration, client, server, cluster, and reactivity layers share. It marks
|
|
25249
|
+
* streamed responses and annotates interruptions that came from a remote client
|
|
25250
|
+
* closing or cancelling a request.
|
|
25251
|
+
*
|
|
25252
|
+
* @since 4.0.0
|
|
25253
|
+
*/
|
|
25254
|
+
const StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema";
|
|
25255
|
+
/**
|
|
25256
|
+
* Returns `true` when a schema is an RPC stream schema created by
|
|
25257
|
+
* `RpcSchema.Stream`.
|
|
25258
|
+
*
|
|
25259
|
+
* @category guards
|
|
25260
|
+
* @since 4.0.0
|
|
25261
|
+
*/
|
|
25262
|
+
function isStreamSchema(schema) {
|
|
25263
|
+
return hasProperty(schema, StreamSchemaTypeId);
|
|
25264
|
+
}
|
|
25265
|
+
/** @internal */
|
|
25266
|
+
function getStreamSchemas(schema) {
|
|
25267
|
+
return isStreamSchema(schema) ? some({
|
|
25268
|
+
success: schema.success,
|
|
25269
|
+
error: schema.error
|
|
25270
|
+
}) : none();
|
|
25271
|
+
}
|
|
25272
|
+
const schema$1 = /*#__PURE__*/ declare(isStream);
|
|
25273
|
+
/**
|
|
25274
|
+
* Creates an RPC stream schema from a stream element success schema and stream
|
|
25275
|
+
* error schema.
|
|
25276
|
+
*
|
|
25277
|
+
* @category constructors
|
|
25278
|
+
* @since 4.0.0
|
|
25279
|
+
*/
|
|
25280
|
+
function Stream(success, error) {
|
|
25281
|
+
return make$20(schema$1.ast, {
|
|
25282
|
+
[StreamSchemaTypeId]: StreamSchemaTypeId,
|
|
25283
|
+
success,
|
|
25284
|
+
error
|
|
25285
|
+
});
|
|
25286
|
+
}
|
|
25287
|
+
/**
|
|
25288
|
+
* Annotation that marks interruptions that originate from an RPC client
|
|
25289
|
+
* abort.
|
|
25290
|
+
*
|
|
25291
|
+
* @category services
|
|
25292
|
+
* @since 4.0.0
|
|
25293
|
+
*/
|
|
25294
|
+
var ClientAbort = class extends (/*#__PURE__*/ Service$1()("effect/rpc/RpcSchema/ClientAbort")) {
|
|
25295
|
+
static annotation = /*#__PURE__*/ this.context(true).pipe(/*#__PURE__*/ add(StackTrace, {
|
|
25296
|
+
name: "ClientAbort",
|
|
25297
|
+
stack: constUndefined,
|
|
25298
|
+
parent: void 0
|
|
25299
|
+
}));
|
|
25300
|
+
};
|
|
25301
|
+
//#endregion
|
|
25302
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/unstable/rpc/Rpc.js
|
|
25303
|
+
const TypeId$8 = "~effect/rpc/Rpc";
|
|
25304
|
+
/**
|
|
25305
|
+
* Represents server-side metadata for the client associated with an RPC request.
|
|
25306
|
+
*
|
|
25307
|
+
* **When to use**
|
|
25308
|
+
*
|
|
25309
|
+
* Use to inspect or annotate the connected client while handling an RPC request
|
|
25310
|
+
* on the server.
|
|
25311
|
+
*
|
|
25312
|
+
* **Details**
|
|
25313
|
+
*
|
|
25314
|
+
* It stores the client id and request annotations that handlers can read or
|
|
25315
|
+
* extend.
|
|
25316
|
+
*
|
|
25317
|
+
* @category models
|
|
25318
|
+
* @since 4.0.0
|
|
25319
|
+
*/
|
|
25320
|
+
var ServerClient = class {
|
|
25321
|
+
id;
|
|
25322
|
+
annotations;
|
|
25323
|
+
constructor(id) {
|
|
25324
|
+
this.id = id;
|
|
25325
|
+
this.annotations = empty$5();
|
|
25326
|
+
}
|
|
25327
|
+
annotate(tag, value) {
|
|
25328
|
+
this.annotations = add(this.annotations, tag, value);
|
|
25329
|
+
return this;
|
|
25330
|
+
}
|
|
25331
|
+
};
|
|
25332
|
+
const Proto$4 = {
|
|
25333
|
+
[TypeId$8]: TypeId$8,
|
|
25334
|
+
pipe() {
|
|
25335
|
+
return pipeArguments(this, arguments);
|
|
25336
|
+
},
|
|
25337
|
+
setSuccess(successSchema) {
|
|
25338
|
+
return makeProto$1({
|
|
25339
|
+
_tag: this._tag,
|
|
25340
|
+
payloadSchema: this.payloadSchema,
|
|
25341
|
+
successSchema,
|
|
25342
|
+
errorSchema: this.errorSchema,
|
|
25343
|
+
defectSchema: this.defectSchema,
|
|
25344
|
+
annotations: this.annotations,
|
|
25345
|
+
middlewares: this.middlewares
|
|
25346
|
+
});
|
|
25347
|
+
},
|
|
25348
|
+
setError(errorSchema) {
|
|
25349
|
+
return makeProto$1({
|
|
25350
|
+
_tag: this._tag,
|
|
25351
|
+
payloadSchema: this.payloadSchema,
|
|
25352
|
+
successSchema: this.successSchema,
|
|
25353
|
+
errorSchema,
|
|
25354
|
+
defectSchema: this.defectSchema,
|
|
25355
|
+
annotations: this.annotations,
|
|
25356
|
+
middlewares: this.middlewares
|
|
25357
|
+
});
|
|
25358
|
+
},
|
|
25359
|
+
setPayload(payloadSchema) {
|
|
25360
|
+
return makeProto$1({
|
|
25361
|
+
_tag: this._tag,
|
|
25362
|
+
payloadSchema: isSchema(payloadSchema) ? payloadSchema : Struct(payloadSchema),
|
|
25363
|
+
successSchema: this.successSchema,
|
|
25364
|
+
errorSchema: this.errorSchema,
|
|
25365
|
+
defectSchema: this.defectSchema,
|
|
25366
|
+
annotations: this.annotations,
|
|
25367
|
+
middlewares: this.middlewares
|
|
25368
|
+
});
|
|
25369
|
+
},
|
|
25370
|
+
middleware(middleware) {
|
|
25371
|
+
return makeProto$1({
|
|
25372
|
+
_tag: this._tag,
|
|
25373
|
+
payloadSchema: this.payloadSchema,
|
|
25374
|
+
successSchema: this.successSchema,
|
|
25375
|
+
errorSchema: this.errorSchema,
|
|
25376
|
+
defectSchema: this.defectSchema,
|
|
25377
|
+
annotations: this.annotations,
|
|
25378
|
+
middlewares: /* @__PURE__ */ new Set([...this.middlewares, middleware])
|
|
25379
|
+
});
|
|
25380
|
+
},
|
|
25381
|
+
prefix(prefix) {
|
|
25382
|
+
return makeProto$1({
|
|
25383
|
+
_tag: `${prefix}${this._tag}`,
|
|
25384
|
+
payloadSchema: this.payloadSchema,
|
|
25385
|
+
successSchema: this.successSchema,
|
|
25386
|
+
errorSchema: this.errorSchema,
|
|
25387
|
+
defectSchema: this.defectSchema,
|
|
25388
|
+
annotations: this.annotations,
|
|
25389
|
+
middlewares: this.middlewares
|
|
25390
|
+
});
|
|
25391
|
+
},
|
|
25392
|
+
annotate(tag, value) {
|
|
25393
|
+
return makeProto$1({
|
|
25394
|
+
_tag: this._tag,
|
|
25395
|
+
payloadSchema: this.payloadSchema,
|
|
25396
|
+
successSchema: this.successSchema,
|
|
25397
|
+
errorSchema: this.errorSchema,
|
|
25398
|
+
defectSchema: this.defectSchema,
|
|
25399
|
+
middlewares: this.middlewares,
|
|
25400
|
+
annotations: add(this.annotations, tag, value)
|
|
25401
|
+
});
|
|
25402
|
+
},
|
|
25403
|
+
annotateMerge(context) {
|
|
25404
|
+
return makeProto$1({
|
|
25405
|
+
_tag: this._tag,
|
|
25406
|
+
payloadSchema: this.payloadSchema,
|
|
25407
|
+
successSchema: this.successSchema,
|
|
25408
|
+
errorSchema: this.errorSchema,
|
|
25409
|
+
defectSchema: this.defectSchema,
|
|
25410
|
+
middlewares: this.middlewares,
|
|
25411
|
+
annotations: merge$1(this.annotations, context)
|
|
25412
|
+
});
|
|
25413
|
+
}
|
|
25414
|
+
};
|
|
25415
|
+
const makeProto$1 = (options) => {
|
|
25416
|
+
function Rpc() {}
|
|
25417
|
+
Object.setPrototypeOf(Rpc, Proto$4);
|
|
25418
|
+
Object.assign(Rpc, options);
|
|
25419
|
+
Rpc.key = `effect/rpc/Rpc/${options._tag}`;
|
|
25420
|
+
return Rpc;
|
|
25421
|
+
};
|
|
25422
|
+
/**
|
|
25423
|
+
* Creates an RPC definition with the supplied tag and optional schemas.
|
|
25424
|
+
*
|
|
25425
|
+
* **Details**
|
|
25426
|
+
*
|
|
25427
|
+
* Payload options can be either a schema or struct fields. `stream: true` wraps
|
|
25428
|
+
* the success and error schemas in a stream schema and sets the normal error
|
|
25429
|
+
* schema to `Schema.Never`. `primaryKey` creates a payload class with a
|
|
25430
|
+
* primary key derived from the payload value.
|
|
25431
|
+
*
|
|
25432
|
+
* @category constructors
|
|
25433
|
+
* @since 4.0.0
|
|
25434
|
+
*/
|
|
25435
|
+
const make$15 = (tag, options) => {
|
|
25436
|
+
const successSchema = options?.success ?? Void;
|
|
25437
|
+
const errorSchema = options?.error ?? Never;
|
|
25438
|
+
const defectSchema = options?.defect ?? Defect();
|
|
25439
|
+
let payloadSchema;
|
|
25440
|
+
if (options?.primaryKey) payloadSchema = class Payload extends Class(`effect/rpc/Rpc/${tag}`)(options.payload) {
|
|
25441
|
+
[symbol]() {
|
|
25442
|
+
return options.primaryKey(this);
|
|
25443
|
+
}
|
|
25444
|
+
};
|
|
25445
|
+
else payloadSchema = isSchema(options?.payload) ? options?.payload : options?.payload ? Struct(options?.payload) : Void;
|
|
25446
|
+
return makeProto$1({
|
|
25447
|
+
_tag: tag,
|
|
25448
|
+
payloadSchema,
|
|
25449
|
+
successSchema: options?.stream ? Stream(successSchema, errorSchema) : successSchema,
|
|
25450
|
+
errorSchema: options?.stream ? Never : errorSchema,
|
|
25451
|
+
defectSchema,
|
|
25452
|
+
annotations: empty$5(),
|
|
25453
|
+
middlewares: /* @__PURE__ */ new Set()
|
|
25454
|
+
});
|
|
25455
|
+
};
|
|
25456
|
+
const exitSchemaCache = /*#__PURE__*/ new WeakMap();
|
|
25457
|
+
/**
|
|
25458
|
+
* Builds the `Schema.Exit` used to encode and decode RPC results.
|
|
25459
|
+
*
|
|
25460
|
+
* **Details**
|
|
25461
|
+
*
|
|
25462
|
+
* The failure side includes the RPC error schema, middleware error schemas, and
|
|
25463
|
+
* stream error schema for streaming RPCs. Streaming RPCs use `Schema.Void` for
|
|
25464
|
+
* the exit success value. The schema is cached per RPC definition.
|
|
25465
|
+
*
|
|
25466
|
+
* @category constructors
|
|
25467
|
+
* @since 4.0.0
|
|
25468
|
+
*/
|
|
25469
|
+
const exitSchema = (self) => {
|
|
25470
|
+
if (exitSchemaCache.has(self)) return exitSchemaCache.get(self);
|
|
25471
|
+
const rpc = self;
|
|
25472
|
+
const failures = /* @__PURE__ */ new Set([rpc.errorSchema]);
|
|
25473
|
+
const streamSchemas = getStreamSchemas(rpc.successSchema);
|
|
25474
|
+
if (isSome(streamSchemas)) failures.add(streamSchemas.value.error);
|
|
25475
|
+
for (const middleware of rpc.middlewares) failures.add(middleware.error);
|
|
25476
|
+
const schema = Exit(isSome(streamSchemas) ? Void : rpc.successSchema, Union([...failures]), rpc.defectSchema);
|
|
25477
|
+
exitSchemaCache.set(self, schema);
|
|
25478
|
+
return schema;
|
|
25479
|
+
};
|
|
25480
|
+
const WrapperTypeId = "~effect/rpc/Rpc/Wrapper";
|
|
25481
|
+
/**
|
|
25482
|
+
* Returns `true` when the value is an RPC `Wrapper`.
|
|
25483
|
+
*
|
|
25484
|
+
* @category guards
|
|
25485
|
+
* @since 4.0.0
|
|
25486
|
+
*/
|
|
25487
|
+
const isWrapper = (u) => WrapperTypeId in u;
|
|
25488
|
+
//#endregion
|
|
25489
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/unstable/rpc/RpcGroup.js
|
|
25490
|
+
const RpcGroupProto = {
|
|
25491
|
+
add(...rpcs) {
|
|
25492
|
+
const requests = new Map(this.requests);
|
|
25493
|
+
for (const rpc of rpcs) requests.set(rpc._tag, rpc);
|
|
25494
|
+
return makeProto({
|
|
25495
|
+
requests,
|
|
25496
|
+
annotations: this.annotations
|
|
25497
|
+
});
|
|
25498
|
+
},
|
|
25499
|
+
merge(...groups) {
|
|
25500
|
+
const requests = new Map(this.requests);
|
|
25501
|
+
const annotations = new Map(this.annotations.mapUnsafe);
|
|
25502
|
+
for (const group of groups) {
|
|
25503
|
+
for (const [tag, rpc] of group.requests) requests.set(tag, rpc);
|
|
25504
|
+
for (const [key, value] of group.annotations.mapUnsafe) annotations.set(key, value);
|
|
25505
|
+
}
|
|
25506
|
+
return makeProto({
|
|
25507
|
+
requests,
|
|
25508
|
+
annotations: makeUnsafe$7(annotations)
|
|
25509
|
+
});
|
|
25510
|
+
},
|
|
25511
|
+
omit(...tags) {
|
|
25512
|
+
const requests = new Map(this.requests);
|
|
25513
|
+
for (const tag of tags) requests.delete(tag);
|
|
25514
|
+
return makeProto({
|
|
25515
|
+
requests,
|
|
25516
|
+
annotations: this.annotations
|
|
25517
|
+
});
|
|
25518
|
+
},
|
|
25519
|
+
middleware(middleware) {
|
|
25520
|
+
const requests = /* @__PURE__ */ new Map();
|
|
25521
|
+
for (const [tag, rpc] of this.requests) requests.set(tag, rpc.middleware(middleware));
|
|
25522
|
+
return makeProto({
|
|
25523
|
+
requests,
|
|
25524
|
+
annotations: this.annotations
|
|
25525
|
+
});
|
|
25526
|
+
},
|
|
25527
|
+
toHandlers(build) {
|
|
25528
|
+
const self = this;
|
|
25529
|
+
return gen(function* () {
|
|
25530
|
+
const services = yield* context$1();
|
|
25531
|
+
const handlers = isEffect(build) ? yield* build : build;
|
|
25532
|
+
const contextMap = /* @__PURE__ */ new Map();
|
|
25533
|
+
self.requests.forEach((rpc, tag) => {
|
|
25534
|
+
contextMap.set(rpc.key, {
|
|
25535
|
+
tag: rpc._tag,
|
|
25536
|
+
handler: handlers[tag],
|
|
25537
|
+
context: services
|
|
25538
|
+
});
|
|
25539
|
+
});
|
|
25540
|
+
return makeUnsafe$7(contextMap);
|
|
25541
|
+
});
|
|
25542
|
+
},
|
|
25543
|
+
prefix(prefix) {
|
|
25544
|
+
const requests = /* @__PURE__ */ new Map();
|
|
25545
|
+
for (const rpc of this.requests.values()) {
|
|
25546
|
+
const newRpc = rpc.prefix(prefix);
|
|
25547
|
+
requests.set(newRpc._tag, newRpc);
|
|
25548
|
+
}
|
|
25549
|
+
return makeProto({
|
|
25550
|
+
requests,
|
|
25551
|
+
annotations: this.annotations
|
|
25552
|
+
});
|
|
25553
|
+
},
|
|
25554
|
+
toLayer(build) {
|
|
25555
|
+
return effectContext(this.toHandlers(build));
|
|
25556
|
+
},
|
|
25557
|
+
of: identity,
|
|
25558
|
+
toLayerHandler(service, build) {
|
|
25559
|
+
const self = this;
|
|
25560
|
+
return effectContext(gen(function* () {
|
|
25561
|
+
const services = yield* context$1();
|
|
25562
|
+
const handler = isEffect(build) ? yield* build : build;
|
|
25563
|
+
const contextMap = /* @__PURE__ */ new Map();
|
|
25564
|
+
const rpc = self.requests.get(service);
|
|
25565
|
+
contextMap.set(rpc.key, {
|
|
25566
|
+
handler,
|
|
25567
|
+
context: services
|
|
25568
|
+
});
|
|
25569
|
+
return makeUnsafe$7(contextMap);
|
|
25570
|
+
}));
|
|
25571
|
+
},
|
|
25572
|
+
accessHandler(service) {
|
|
25573
|
+
return contextWith((parentContext) => {
|
|
25574
|
+
const rpc = this.requests.get(service);
|
|
25575
|
+
const { handler, context } = getOrUndefinedUnsafe(parentContext, rpc.key);
|
|
25576
|
+
return succeed$1((payload, options) => {
|
|
25577
|
+
options.rpc = rpc;
|
|
25578
|
+
const result = handler(payload, options);
|
|
25579
|
+
const effectOrStream = isWrapper(result) ? result.value : result;
|
|
25580
|
+
return isEffect(effectOrStream) ? provide$1(effectOrStream, context) : provideContext(effectOrStream, context);
|
|
25581
|
+
});
|
|
25582
|
+
});
|
|
25583
|
+
},
|
|
25584
|
+
annotate(service, value) {
|
|
25585
|
+
return makeProto({
|
|
25586
|
+
requests: this.requests,
|
|
25587
|
+
annotations: add(this.annotations, service, value)
|
|
25588
|
+
});
|
|
25589
|
+
},
|
|
25590
|
+
annotateRpcs(service, value) {
|
|
25591
|
+
return this.annotateRpcsMerge(make$31(service, value));
|
|
25592
|
+
},
|
|
25593
|
+
annotateMerge(context) {
|
|
25594
|
+
return makeProto({
|
|
25595
|
+
requests: this.requests,
|
|
25596
|
+
annotations: merge$1(this.annotations, context)
|
|
25597
|
+
});
|
|
25598
|
+
},
|
|
25599
|
+
annotateRpcsMerge(context) {
|
|
25600
|
+
const requests = /* @__PURE__ */ new Map();
|
|
25601
|
+
for (const [tag, rpc] of this.requests) requests.set(tag, rpc.annotateMerge(merge$1(context, rpc.annotations)));
|
|
25602
|
+
return makeProto({
|
|
25603
|
+
requests,
|
|
25604
|
+
annotations: this.annotations
|
|
25605
|
+
});
|
|
25606
|
+
}
|
|
25607
|
+
};
|
|
25608
|
+
const makeProto = (options) => Object.assign(function() {}, RpcGroupProto, {
|
|
25609
|
+
requests: options.requests,
|
|
25610
|
+
annotations: options.annotations
|
|
25611
|
+
});
|
|
25612
|
+
/**
|
|
25613
|
+
* Creates an `RpcGroup` from one or more RPC definitions.
|
|
25614
|
+
*
|
|
25615
|
+
* @category constructors
|
|
25616
|
+
* @since 4.0.0
|
|
25617
|
+
*/
|
|
25618
|
+
const make$14 = (...rpcs) => makeProto({
|
|
25619
|
+
requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
|
|
25620
|
+
annotations: empty$5()
|
|
25621
|
+
});
|
|
25622
|
+
//#endregion
|
|
25623
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/unstable/rpc/RpcMiddleware.js
|
|
25624
|
+
/**
|
|
25625
|
+
* Middleware services for the unstable RPC runtime.
|
|
25626
|
+
*
|
|
25627
|
+
* A middleware service wraps server handler execution and can also install a
|
|
25628
|
+
* client-side wrapper for generated clients. Its metadata records the services
|
|
25629
|
+
* provided to downstream handlers, the services required by the middleware
|
|
25630
|
+
* implementation, the schema for server-visible failures, the client-only error
|
|
25631
|
+
* type, and whether generated clients must require the matching client layer.
|
|
25632
|
+
*
|
|
25633
|
+
* @since 4.0.0
|
|
25634
|
+
*/
|
|
25635
|
+
/**
|
|
25636
|
+
* The runtime type id used to attach and inspect RPC middleware metadata.
|
|
25637
|
+
*
|
|
25638
|
+
* @category type IDs
|
|
25639
|
+
* @since 4.0.0
|
|
25640
|
+
*/
|
|
25641
|
+
const TypeId$7 = "~effect/rpc/RpcMiddleware";
|
|
25642
|
+
/**
|
|
25643
|
+
* Creates a typed RPC middleware service class, with optional service
|
|
25644
|
+
* requirements, provided services, error schema, and client-side requirement
|
|
25645
|
+
* metadata.
|
|
25646
|
+
*
|
|
25647
|
+
* @category constructors
|
|
25648
|
+
* @since 4.0.0
|
|
25649
|
+
*/
|
|
25650
|
+
const Service = () => (id, options) => {
|
|
25651
|
+
const Err = globalThis.Error;
|
|
25652
|
+
const limit = getStackTraceLimit();
|
|
25653
|
+
setStackTraceLimit(2);
|
|
25654
|
+
const creationError = new Err();
|
|
25655
|
+
setStackTraceLimit(limit);
|
|
25656
|
+
function ServiceClass() {}
|
|
25657
|
+
const ServiceClass_ = ServiceClass;
|
|
25658
|
+
Object.setPrototypeOf(ServiceClass, Object.getPrototypeOf(Service$1(id)));
|
|
25659
|
+
ServiceClass.key = id;
|
|
25660
|
+
Object.defineProperty(ServiceClass, "stack", { get() {
|
|
25661
|
+
return creationError.stack;
|
|
25662
|
+
} });
|
|
25663
|
+
ServiceClass_[TypeId$7] = TypeId$7;
|
|
25664
|
+
ServiceClass_.error = options?.error ?? Never;
|
|
25665
|
+
ServiceClass_.requiredForClient = options?.requiredForClient ?? false;
|
|
25666
|
+
return ServiceClass;
|
|
25667
|
+
};
|
|
25668
|
+
/**
|
|
25669
|
+
* Provides the client-side implementation for an RPC middleware service,
|
|
25670
|
+
* capturing the layer's environment and merging it into each middleware
|
|
25671
|
+
* invocation.
|
|
25672
|
+
*
|
|
25673
|
+
* @category layers
|
|
25674
|
+
* @since 4.0.0
|
|
25675
|
+
*/
|
|
25676
|
+
const layerClient = (tag, service) => effectContext(gen(function* () {
|
|
25677
|
+
const services = (yield* context$1()).pipe(omit$1(Scope));
|
|
25678
|
+
const middleware = isEffect(service) ? yield* service : service;
|
|
25679
|
+
return makeUnsafe$7(/* @__PURE__ */ new Map([[`${tag.key}/Client`, (options) => updateContext(middleware(options), (requestContext) => merge$1(services, requestContext))]]));
|
|
25680
|
+
}));
|
|
25681
|
+
//#endregion
|
|
25682
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/PlatformError.js
|
|
25683
|
+
/**
|
|
25684
|
+
* Normalized errors for platform APIs.
|
|
25685
|
+
*
|
|
25686
|
+
* Platform services such as file systems, terminals, and sockets use
|
|
25687
|
+
* `PlatformError` to report host-level failures in a consistent shape. The
|
|
25688
|
+
* wrapper records whether the problem came from an invalid argument or from the
|
|
25689
|
+
* operating system, while preserving useful details such as the module, method,
|
|
25690
|
+
* path, descriptor, description, and original cause when available.
|
|
25691
|
+
*
|
|
25692
|
+
* @since 4.0.0
|
|
25693
|
+
*/
|
|
25694
|
+
const TypeId$6 = "~effect/platform/PlatformError";
|
|
25695
|
+
/**
|
|
25696
|
+
* Error data for an invalid argument passed to a platform API.
|
|
25697
|
+
*
|
|
25698
|
+
* **When to use**
|
|
25699
|
+
*
|
|
25700
|
+
* Use when you need to model caller input rejected before a platform operation
|
|
25701
|
+
* runs, including invalid-argument reason data.
|
|
25702
|
+
*
|
|
25703
|
+
* **Details**
|
|
25704
|
+
*
|
|
25705
|
+
* The error records the module and method that rejected the argument, with an
|
|
25706
|
+
* optional description and cause. It is usually wrapped in `PlatformError`.
|
|
25707
|
+
*
|
|
25708
|
+
* @see {@link badArgument} for creating a wrapped `PlatformError` whose reason is `BadArgument`
|
|
25709
|
+
* @see {@link SystemError} for failures reported by the host platform or operating system
|
|
25710
|
+
* @see {@link PlatformError} for the wrapper used by most platform APIs
|
|
25711
|
+
*
|
|
25712
|
+
* @category errors
|
|
25713
|
+
* @since 4.0.0
|
|
25714
|
+
*/
|
|
25715
|
+
var BadArgument = class extends (/*#__PURE__*/ TaggedError$1("BadArgument")) {
|
|
25716
|
+
/**
|
|
25717
|
+
* Formats the module, method, and optional description that rejected the argument.
|
|
25718
|
+
*
|
|
25719
|
+
* **When to use**
|
|
25720
|
+
*
|
|
25721
|
+
* Use to read the formatted error message for a rejected platform argument.
|
|
25722
|
+
*
|
|
25723
|
+
* @since 4.0.0
|
|
25724
|
+
*/
|
|
25725
|
+
get message() {
|
|
25726
|
+
return `${this.module}.${this.method}${this.description ? `: ${this.description}` : ""}`;
|
|
25727
|
+
}
|
|
25728
|
+
};
|
|
25729
|
+
/**
|
|
25730
|
+
* Error data for a platform or system operation failure.
|
|
25731
|
+
*
|
|
25732
|
+
* **When to use**
|
|
25733
|
+
*
|
|
25734
|
+
* Use when you need normalized reason data for a platform or system operation
|
|
25735
|
+
* failure, including the operation details.
|
|
25736
|
+
*
|
|
25737
|
+
* **Details**
|
|
25738
|
+
*
|
|
25739
|
+
* The error records a normalized `_tag`, the module and method that failed,
|
|
25740
|
+
* and optional details such as the syscall, path or descriptor, description,
|
|
25741
|
+
* and original cause. It is usually wrapped in `PlatformError`.
|
|
25742
|
+
*
|
|
25743
|
+
* @see {@link systemError} for creating the usual `PlatformError` wrapper from this reason data
|
|
25744
|
+
* @see {@link BadArgument} for platform API failures caused by rejected caller input before an operation runs
|
|
25745
|
+
* @see {@link SystemErrorTag} for the normalized tag values stored in `_tag`
|
|
25746
|
+
*
|
|
25747
|
+
* @category errors
|
|
25748
|
+
* @since 4.0.0
|
|
25749
|
+
*/
|
|
25750
|
+
var SystemError = class extends Error$2 {
|
|
25751
|
+
/**
|
|
25752
|
+
* Formats the normalized system error tag with operation and path details.
|
|
25753
|
+
*
|
|
25754
|
+
* **When to use**
|
|
25755
|
+
*
|
|
25756
|
+
* Use to read the formatted error message for a normalized system failure.
|
|
25757
|
+
*
|
|
25758
|
+
* @since 4.0.0
|
|
25759
|
+
*/
|
|
25760
|
+
get message() {
|
|
25761
|
+
return `${this._tag}: ${this.module}.${this.method}${this.pathOrDescriptor !== void 0 ? ` (${this.pathOrDescriptor})` : ""}${this.description ? `: ${this.description}` : ""}`;
|
|
25762
|
+
}
|
|
25763
|
+
};
|
|
25764
|
+
/**
|
|
25765
|
+
* Tagged error used by platform APIs to report either invalid arguments or
|
|
25766
|
+
* system-level failures.
|
|
25767
|
+
*
|
|
25768
|
+
* **When to use**
|
|
25769
|
+
*
|
|
25770
|
+
* Use as the shared error type for platform APIs that expose invalid arguments
|
|
25771
|
+
* and host or operating-system failures through a single `Effect` error
|
|
25772
|
+
* channel.
|
|
25773
|
+
*
|
|
25774
|
+
* **Details**
|
|
25775
|
+
*
|
|
25776
|
+
* The `reason` field contains the underlying `BadArgument` or `SystemError`.
|
|
25777
|
+
* When that reason has a cause, the cause is preserved on the wrapper.
|
|
25778
|
+
*
|
|
25779
|
+
* @see {@link BadArgument} for invalid inputs rejected before an operation runs
|
|
25780
|
+
* @see {@link SystemError} for failures reported by the host platform or operating system
|
|
25781
|
+
* @see {@link badArgument} for creating this wrapper from rejected caller input
|
|
25782
|
+
* @see {@link systemError} for creating this wrapper from a host or operating-system failure
|
|
25783
|
+
*
|
|
25784
|
+
* @category errors
|
|
25785
|
+
* @since 4.0.0
|
|
25786
|
+
*/
|
|
25787
|
+
var PlatformError = class extends (/*#__PURE__*/ TaggedError$1("PlatformError")) {
|
|
25788
|
+
constructor(reason) {
|
|
25789
|
+
if ("cause" in reason) super({
|
|
25790
|
+
reason,
|
|
25791
|
+
cause: reason.cause
|
|
25792
|
+
});
|
|
25793
|
+
else super({ reason });
|
|
25794
|
+
}
|
|
25795
|
+
/**
|
|
25796
|
+
* Marks this value as a platform error wrapper for runtime guards.
|
|
25797
|
+
*
|
|
25798
|
+
* **When to use**
|
|
25799
|
+
*
|
|
25800
|
+
* Use to identify `PlatformError` values through their runtime type marker.
|
|
25801
|
+
*
|
|
25802
|
+
* @since 4.0.0
|
|
25803
|
+
*/
|
|
25804
|
+
[TypeId$6] = TypeId$6;
|
|
25805
|
+
get message() {
|
|
25806
|
+
return this.reason.message;
|
|
25807
|
+
}
|
|
25808
|
+
};
|
|
25809
|
+
/**
|
|
25810
|
+
* Creates a `PlatformError` whose reason is a `SystemError`.
|
|
25811
|
+
*
|
|
25812
|
+
* **When to use**
|
|
25813
|
+
*
|
|
25814
|
+
* Use to adapt an operating-system or platform failure into the normalized
|
|
25815
|
+
* platform error model.
|
|
25816
|
+
*
|
|
25817
|
+
* @category constructors
|
|
25818
|
+
* @since 4.0.0
|
|
25819
|
+
*/
|
|
25820
|
+
const systemError = (options) => new PlatformError(new SystemError(options));
|
|
25821
|
+
/**
|
|
25822
|
+
* Creates a `PlatformError` whose reason is a `BadArgument`.
|
|
25823
|
+
*
|
|
25824
|
+
* **When to use**
|
|
25825
|
+
*
|
|
25826
|
+
* Use to report a platform API rejecting caller input before performing the
|
|
25827
|
+
* underlying operation.
|
|
25828
|
+
*
|
|
25829
|
+
* @category constructors
|
|
25830
|
+
* @since 4.0.0
|
|
25831
|
+
*/
|
|
25832
|
+
const badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
25833
|
+
//#endregion
|
|
25221
25834
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/FileSystem.js
|
|
25222
25835
|
/**
|
|
25223
25836
|
* Defines the portable file system service for Effect programs.
|
|
@@ -25231,7 +25844,7 @@ const runForEachArray = /*#__PURE__*/ dual(2, (self, f) => runForEach(self.chann
|
|
|
25231
25844
|
*
|
|
25232
25845
|
* @since 4.0.0
|
|
25233
25846
|
*/
|
|
25234
|
-
const TypeId$
|
|
25847
|
+
const TypeId$5 = "~effect/platform/FileSystem";
|
|
25235
25848
|
/**
|
|
25236
25849
|
* Creates a `Size` from various numeric input types.
|
|
25237
25850
|
*
|
|
@@ -25327,9 +25940,9 @@ const FileSystem = /*#__PURE__*/ Service$1("effect/platform/FileSystem");
|
|
|
25327
25940
|
* @category constructors
|
|
25328
25941
|
* @since 4.0.0
|
|
25329
25942
|
*/
|
|
25330
|
-
const make$
|
|
25943
|
+
const make$13 = (impl) => FileSystem.of({
|
|
25331
25944
|
...impl,
|
|
25332
|
-
[TypeId$
|
|
25945
|
+
[TypeId$5]: TypeId$5,
|
|
25333
25946
|
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed$1(false) : fail(e))),
|
|
25334
25947
|
readFileString: (path, encoding) => flatMap(impl.readFile(path), (_) => try_({
|
|
25335
25948
|
try: () => new TextDecoder(encoding).decode(_),
|
|
@@ -25456,7 +26069,7 @@ var WatchBackend = class extends (/*#__PURE__*/ Service$1()("effect/platform/Fil
|
|
|
25456
26069
|
* @category type IDs
|
|
25457
26070
|
* @since 4.0.0
|
|
25458
26071
|
*/
|
|
25459
|
-
const TypeId$
|
|
26072
|
+
const TypeId$4 = "~effect/platform/Path";
|
|
25460
26073
|
/**
|
|
25461
26074
|
* Service tag for accessing the current `Path` implementation.
|
|
25462
26075
|
*
|
|
@@ -25678,7 +26291,7 @@ function makeArray(length, value) {
|
|
|
25678
26291
|
* @since 4.0.0
|
|
25679
26292
|
*/
|
|
25680
26293
|
const ConfigProvider = /*#__PURE__*/ Reference("effect/ConfigProvider", { defaultValue: () => fromEnv() });
|
|
25681
|
-
const Proto$
|
|
26294
|
+
const Proto$3 = {
|
|
25682
26295
|
...PipeInspectableProto,
|
|
25683
26296
|
toJSON() {
|
|
25684
26297
|
return { _id: "ConfigProvider" };
|
|
@@ -25686,7 +26299,7 @@ const Proto$4 = {
|
|
|
25686
26299
|
};
|
|
25687
26300
|
const identityPath = (path) => path;
|
|
25688
26301
|
function makeProvider(load, mapInput) {
|
|
25689
|
-
const self = Object.create(Proto$
|
|
26302
|
+
const self = Object.create(Proto$3);
|
|
25690
26303
|
self.load = load;
|
|
25691
26304
|
self.mapInput = mapInput;
|
|
25692
26305
|
return self;
|
|
@@ -25740,7 +26353,7 @@ function makeSource(get, transform) {
|
|
|
25740
26353
|
* @category constructors
|
|
25741
26354
|
* @since 4.0.0
|
|
25742
26355
|
*/
|
|
25743
|
-
function make$
|
|
26356
|
+
function make$12(get) {
|
|
25744
26357
|
return makeSource(get, identityPath);
|
|
25745
26358
|
}
|
|
25746
26359
|
function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
@@ -25777,7 +26390,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
|
25777
26390
|
function fromEnvRecord(env, options) {
|
|
25778
26391
|
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
25779
26392
|
const trie = buildEnvTrie(env);
|
|
25780
|
-
return make$
|
|
26393
|
+
return make$12((path) => succeed$1(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
25781
26394
|
}
|
|
25782
26395
|
/**
|
|
25783
26396
|
* Creates a `ConfigProvider` backed by environment variables.
|
|
@@ -25872,7 +26485,7 @@ function trieNodeAt(root, path) {
|
|
|
25872
26485
|
}
|
|
25873
26486
|
//#endregion
|
|
25874
26487
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Config.js
|
|
25875
|
-
const TypeId$
|
|
26488
|
+
const TypeId$3 = "~effect/Config";
|
|
25876
26489
|
/**
|
|
25877
26490
|
* Represents the error type produced when config loading or validation fails.
|
|
25878
26491
|
*
|
|
@@ -25907,20 +26520,20 @@ var ConfigError = class {
|
|
|
25907
26520
|
return `ConfigError(${this.message})`;
|
|
25908
26521
|
}
|
|
25909
26522
|
};
|
|
25910
|
-
const Proto$
|
|
26523
|
+
const Proto$2 = {
|
|
25911
26524
|
.../*#__PURE__*/ Prototype({
|
|
25912
26525
|
label: "Config",
|
|
25913
26526
|
evaluate(fiber) {
|
|
25914
26527
|
return this.parse(fiber.getRef(ConfigProvider));
|
|
25915
26528
|
}
|
|
25916
26529
|
}),
|
|
25917
|
-
[TypeId$
|
|
26530
|
+
[TypeId$3]: TypeId$3,
|
|
25918
26531
|
toJSON() {
|
|
25919
26532
|
return { _id: "Config" };
|
|
25920
26533
|
}
|
|
25921
26534
|
};
|
|
25922
|
-
function make$
|
|
25923
|
-
const self = Object.create(Proto$
|
|
26535
|
+
function make$11(evaluator) {
|
|
26536
|
+
const self = Object.create(Proto$2);
|
|
25924
26537
|
self.evaluator = evaluator;
|
|
25925
26538
|
self.parse = (provider) => evaluator(provider, []).pipe(mapErrorEager((failure) => failure.error), flatMapEager((resolution) => resolution._tag === "Resolved" ? succeed$1(resolution.value) : fail(resolution.error)));
|
|
25926
26539
|
return self;
|
|
@@ -25968,7 +26581,7 @@ const catchSourceError = (self, hasInput) => self.pipe(catchDefect((defect) => i
|
|
|
25968
26581
|
* @since 2.0.0
|
|
25969
26582
|
*/
|
|
25970
26583
|
const map$1 = /*#__PURE__*/ dual(2, (self, f) => {
|
|
25971
|
-
return make$
|
|
26584
|
+
return make$11((provider, pathPrefix) => map$2(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Resolved" ? resolved(f(resolution.value), resolution.hasInput) : resolution));
|
|
25972
26585
|
});
|
|
25973
26586
|
/**
|
|
25974
26587
|
* Provides a fallback value when the config cannot resolve because none of its
|
|
@@ -26004,7 +26617,7 @@ const map$1 = /*#__PURE__*/ dual(2, (self, f) => {
|
|
|
26004
26617
|
* @since 2.0.0
|
|
26005
26618
|
*/
|
|
26006
26619
|
const withDefault = /*#__PURE__*/ dual(2, (self, defaultValue) => {
|
|
26007
|
-
return make$
|
|
26620
|
+
return make$11((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Absent" ? resolved(defaultValue, false) : resolution));
|
|
26008
26621
|
});
|
|
26009
26622
|
/**
|
|
26010
26623
|
* Makes a config optional: returns `Some(value)` on success and `None` when the
|
|
@@ -26196,12 +26809,12 @@ const toConfigCursorAST = /*#__PURE__*/ memoize((root) => {
|
|
|
26196
26809
|
* @category schemas
|
|
26197
26810
|
* @since 4.0.0
|
|
26198
26811
|
*/
|
|
26199
|
-
function schema
|
|
26812
|
+
function schema(codec, path) {
|
|
26200
26813
|
const codecStringTree = toCodecStringTree(codec);
|
|
26201
26814
|
const encodedAst = toEncoded$1(codecStringTree.ast);
|
|
26202
26815
|
const decodeCursor = decodeUnknownEffect$1(make$20(toConfigCursorAST(codecStringTree.ast)));
|
|
26203
26816
|
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
26204
|
-
return make$
|
|
26817
|
+
return make$11((provider, pathPrefix) => {
|
|
26205
26818
|
const fullPath = [...pathPrefix, ...localPath];
|
|
26206
26819
|
return catchSourceError(loadCursor(provider, fullPath), false).pipe(flatMapEager((cursor) => {
|
|
26207
26820
|
const hasInput = hasProviderInput(encodedAst, cursor.node);
|
|
@@ -26279,7 +26892,7 @@ const Boolean$1 = /*#__PURE__*/ Literals([...TrueValues.literals, ...FalseValues
|
|
|
26279
26892
|
* @since 2.0.0
|
|
26280
26893
|
*/
|
|
26281
26894
|
function string(name) {
|
|
26282
|
-
return schema
|
|
26895
|
+
return schema(String$1, name);
|
|
26283
26896
|
}
|
|
26284
26897
|
/**
|
|
26285
26898
|
* Creates a config for a boolean value parsed from common string
|
|
@@ -26320,7 +26933,7 @@ function string(name) {
|
|
|
26320
26933
|
* @since 2.0.0
|
|
26321
26934
|
*/
|
|
26322
26935
|
function boolean(name) {
|
|
26323
|
-
return schema
|
|
26936
|
+
return schema(Boolean$1, name);
|
|
26324
26937
|
}
|
|
26325
26938
|
//#endregion
|
|
26326
26939
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/FiberSet.js
|
|
@@ -26334,7 +26947,7 @@ function boolean(name) {
|
|
|
26334
26947
|
*
|
|
26335
26948
|
* @since 2.0.0
|
|
26336
26949
|
*/
|
|
26337
|
-
const TypeId$
|
|
26950
|
+
const TypeId$2 = "~effect/FiberSet";
|
|
26338
26951
|
/**
|
|
26339
26952
|
* Checks whether a value is a FiberSet.
|
|
26340
26953
|
*
|
|
@@ -26356,9 +26969,9 @@ const TypeId$4 = "~effect/FiberSet";
|
|
|
26356
26969
|
* @category guards
|
|
26357
26970
|
* @since 2.0.0
|
|
26358
26971
|
*/
|
|
26359
|
-
const isFiberSet = (u) => hasProperty(u, TypeId$
|
|
26360
|
-
const Proto$
|
|
26361
|
-
[TypeId$
|
|
26972
|
+
const isFiberSet = (u) => hasProperty(u, TypeId$2);
|
|
26973
|
+
const Proto$1 = {
|
|
26974
|
+
[TypeId$2]: TypeId$2,
|
|
26362
26975
|
[Symbol.iterator]() {
|
|
26363
26976
|
if (this.state._tag === "Closed") return empty$4();
|
|
26364
26977
|
return this.state.backing[Symbol.iterator]();
|
|
@@ -26372,7 +26985,7 @@ const Proto$2 = {
|
|
|
26372
26985
|
}
|
|
26373
26986
|
};
|
|
26374
26987
|
const makeUnsafe$1 = (backing, deferred) => {
|
|
26375
|
-
const self = Object.create(Proto$
|
|
26988
|
+
const self = Object.create(Proto$1);
|
|
26376
26989
|
self.state = {
|
|
26377
26990
|
_tag: "Open",
|
|
26378
26991
|
backing
|
|
@@ -26415,7 +27028,7 @@ const makeUnsafe$1 = (backing, deferred) => {
|
|
|
26415
27028
|
* @category constructors
|
|
26416
27029
|
* @since 2.0.0
|
|
26417
27030
|
*/
|
|
26418
|
-
const make$
|
|
27031
|
+
const make$10 = () => acquireRelease(sync(() => makeUnsafe$1(/* @__PURE__ */ new Set(), makeUnsafe$6())), (set) => suspend$1(() => {
|
|
26419
27032
|
const state = set.state;
|
|
26420
27033
|
if (state._tag === "Closed") return void_$1;
|
|
26421
27034
|
set.state = { _tag: "Closed" };
|
|
@@ -26548,24 +27161,6 @@ const runtime = (self) => () => map$2(context$1(), (services) => {
|
|
|
26548
27161
|
*/
|
|
26549
27162
|
const join = (self) => _await(self.deferred);
|
|
26550
27163
|
//#endregion
|
|
26551
|
-
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/PrimaryKey.js
|
|
26552
|
-
/**
|
|
26553
|
-
* Defines the unique identifier used to identify objects that implement the `PrimaryKey` interface.
|
|
26554
|
-
*
|
|
26555
|
-
* **When to use**
|
|
26556
|
-
*
|
|
26557
|
-
* Use to implement the `PrimaryKey` protocol as a computed property key on
|
|
26558
|
-
* classes or object literals that expose a stable string identifier.
|
|
26559
|
-
*
|
|
26560
|
-
* @see {@link PrimaryKey} for the protocol interface that declares the method keyed by this symbol
|
|
26561
|
-
* @see {@link value} for reading the string key from a `PrimaryKey` value
|
|
26562
|
-
* @see {@link isPrimaryKey} for checking whether an unknown value carries this method
|
|
26563
|
-
*
|
|
26564
|
-
* @category symbols
|
|
26565
|
-
* @since 2.0.0
|
|
26566
|
-
*/
|
|
26567
|
-
const symbol = "~effect/interfaces/PrimaryKey";
|
|
26568
|
-
//#endregion
|
|
26569
27164
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Logger.js
|
|
26570
27165
|
/**
|
|
26571
27166
|
* Context reference containing the active loggers for the current fiber.
|
|
@@ -26652,7 +27247,7 @@ const LogToStderr = LogToStderr$1;
|
|
|
26652
27247
|
* @category constructors
|
|
26653
27248
|
* @since 2.0.0
|
|
26654
27249
|
*/
|
|
26655
|
-
const make$
|
|
27250
|
+
const make$9 = loggerMake;
|
|
26656
27251
|
/**
|
|
26657
27252
|
* Creates a `Layer` which will overwrite the current set of loggers with the
|
|
26658
27253
|
* specified array of `loggers`.
|
|
@@ -26766,7 +27361,7 @@ const makeUnsafe = (value) => {
|
|
|
26766
27361
|
* @category constructors
|
|
26767
27362
|
* @since 2.0.0
|
|
26768
27363
|
*/
|
|
26769
|
-
const make$
|
|
27364
|
+
const make$8 = (value) => sync(() => makeUnsafe(value));
|
|
26770
27365
|
/**
|
|
26771
27366
|
* Gets the current value of the Ref.
|
|
26772
27367
|
*
|
|
@@ -26841,9 +27436,9 @@ var CheckerFailed = class extends TaggedError()("CheckerFailed", {
|
|
|
26841
27436
|
checkerName: String$1,
|
|
26842
27437
|
mutantIds: ArraySchema(String$1)
|
|
26843
27438
|
}) {};
|
|
26844
|
-
Service$1()("
|
|
27439
|
+
Service$1()("@systemfsoftware/stryker-js-plugin-interface/Checker");
|
|
26845
27440
|
TaggedError()("EvaluatorFailed", { cause: Unknown });
|
|
26846
|
-
Service$1()("
|
|
27441
|
+
Service$1()("@systemfsoftware/stryker-js-plugin-interface/Evaluator");
|
|
26847
27442
|
const ExitClass = Literals([
|
|
26848
27443
|
"VerdictFail",
|
|
26849
27444
|
"ConfigError",
|
|
@@ -26852,9 +27447,9 @@ const ExitClass = Literals([
|
|
|
26852
27447
|
]);
|
|
26853
27448
|
TaggedClass()("ClassifyExitCommand", {
|
|
26854
27449
|
pending: ArraySchema(ExitClass),
|
|
26855
|
-
signal: NullOr(
|
|
26856
|
-
score: NullOr(
|
|
26857
|
-
breakingThreshold: NullOr(
|
|
27450
|
+
signal: NullOr(Finite),
|
|
27451
|
+
score: NullOr(Finite),
|
|
27452
|
+
breakingThreshold: NullOr(Finite)
|
|
26858
27453
|
});
|
|
26859
27454
|
TaggedClass()("ClassifyExitDecision", {
|
|
26860
27455
|
highestClass: NullOr(ExitClass),
|
|
@@ -26882,28 +27477,6 @@ const MetricsResultSchema = Struct({
|
|
|
26882
27477
|
}),
|
|
26883
27478
|
childResults: ArraySchema(suspend(() => MetricsResultSchema))
|
|
26884
27479
|
}).annotate({ identifier: "MetricsResult" });
|
|
26885
|
-
const PositionSchema = Struct({
|
|
26886
|
-
line: Finite,
|
|
26887
|
-
column: Finite
|
|
26888
|
-
});
|
|
26889
|
-
const LocationSchema = Struct({
|
|
26890
|
-
start: PositionSchema,
|
|
26891
|
-
end: PositionSchema
|
|
26892
|
-
});
|
|
26893
|
-
const OpenEndLocationSchema = Struct({
|
|
26894
|
-
start: PositionSchema,
|
|
26895
|
-
end: optional(PositionSchema)
|
|
26896
|
-
});
|
|
26897
|
-
const MutantStatusSchema = Literals([
|
|
26898
|
-
"Killed",
|
|
26899
|
-
"Survived",
|
|
26900
|
-
"NoCoverage",
|
|
26901
|
-
"CompileError",
|
|
26902
|
-
"RuntimeError",
|
|
26903
|
-
"Timeout",
|
|
26904
|
-
"Ignored",
|
|
26905
|
-
"Pending"
|
|
26906
|
-
]);
|
|
26907
27480
|
const FileResultDictionarySchema = Record(String$1, Struct({
|
|
26908
27481
|
language: String$1,
|
|
26909
27482
|
source: String$1,
|
|
@@ -26955,77 +27528,6 @@ const MutationTestResultSchema = Struct({
|
|
|
26955
27528
|
projectRoot: optional(String$1),
|
|
26956
27529
|
framework: optional(FrameworkInformationSchema)
|
|
26957
27530
|
});
|
|
26958
|
-
var Mutant = class extends TaggedClass()("Mutant", {
|
|
26959
|
-
id: NonEmptyString,
|
|
26960
|
-
fileName: NonEmptyString,
|
|
26961
|
-
mutatorName: NonEmptyString,
|
|
26962
|
-
replacement: String$1,
|
|
26963
|
-
location: LocationSchema,
|
|
26964
|
-
status: optional(MutantStatusSchema),
|
|
26965
|
-
statusReason: optional(String$1),
|
|
26966
|
-
coveredBy: optional(ArraySchema(String$1)),
|
|
26967
|
-
static: optional(Boolean$2),
|
|
26968
|
-
testsCompleted: optional(Finite),
|
|
26969
|
-
description: optional(String$1)
|
|
26970
|
-
}) {};
|
|
26971
|
-
const INSTRUMENTER_CONSTANTS = Object.freeze({
|
|
26972
|
-
NAMESPACE: "__stryker__",
|
|
26973
|
-
MUTATION_COVERAGE_OBJECT: "mutantCoverage",
|
|
26974
|
-
ACTIVE_MUTANT: "activeMutant",
|
|
26975
|
-
CURRENT_TEST_ID: "currentTestId",
|
|
26976
|
-
HIT_COUNT: "hitCount",
|
|
26977
|
-
HIT_LIMIT: "hitLimit",
|
|
26978
|
-
ACTIVE_MUTANT_ENV_VARIABLE: "__STRYKER_ACTIVE_MUTANT__"
|
|
26979
|
-
});
|
|
26980
|
-
function normalizeFileName(fileName) {
|
|
26981
|
-
return fileName.replace(/\\/g, "/");
|
|
26982
|
-
}
|
|
26983
|
-
const hasText = (value) => isString(value) && value.length > 0;
|
|
26984
|
-
const textIfNonEmpty = (value) => getOrUndefined$1(filter(fromUndefinedOr(value), hasText));
|
|
26985
|
-
const fieldOf = (value$9, key) => value(key in value$9).pipe(when(true, () => {
|
|
26986
|
-
return Reflect.get(value$9, key);
|
|
26987
|
-
}), orElse(() => void 0));
|
|
26988
|
-
const hasStringCode = (error) => value(fieldOf(error, "code")).pipe(when(string$1, () => true), orElse(() => false));
|
|
26989
|
-
function isErrnoException(error) {
|
|
26990
|
-
return value(error).pipe(when(instanceOf(Error), hasStringCode), orElse(() => false));
|
|
26991
|
-
}
|
|
26992
|
-
const isEmptyNumber = (value$16) => value(value$16).pipe(when(0, () => true), orElse(Number.isNaN));
|
|
26993
|
-
const isEmptyError = (error) => value(error).pipe(when(_undefined, () => true), when(_null, () => true), when(string$1, (text) => text.length === 0), when(number, isEmptyNumber), when(boolean$1, (value) => !value), orElse(() => false));
|
|
26994
|
-
const formatErrnoException = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.code} (${error.syscall}) ${stack}`), orElse(() => `${error.name}: ${error.code} (${error.syscall})`));
|
|
26995
|
-
const formatError = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.message}\n${stack}`), orElse(() => `${error.name}: ${error.message}`));
|
|
26996
|
-
const isJsonPrimitive = (value$14) => value(value$14).pipe(when(number, () => true), when(boolean$1, () => true), when(bigint, () => true), orElse(() => false));
|
|
26997
|
-
const jsonText = (error) => {
|
|
26998
|
-
try {
|
|
26999
|
-
return textIfNonEmpty(JSON.stringify(error));
|
|
27000
|
-
} catch {
|
|
27001
|
-
return;
|
|
27002
|
-
}
|
|
27003
|
-
};
|
|
27004
|
-
const isNonPlaceholderText = (text) => value({
|
|
27005
|
-
hasLength: text.length > 0,
|
|
27006
|
-
isPlaceholder: text === "[object Object]"
|
|
27007
|
-
}).pipe(when({
|
|
27008
|
-
hasLength: true,
|
|
27009
|
-
isPlaceholder: false
|
|
27010
|
-
}, () => true), orElse(() => false));
|
|
27011
|
-
const isUsableText = (value$13) => value(value$13).pipe(when(string$1, isNonPlaceholderText), orElse(() => false));
|
|
27012
|
-
const usableText = (value$11) => value(value$11).pipe(when(isUsableText, (text) => text), orElse(() => ""));
|
|
27013
|
-
const objectToStringText = (value$7) => value(fieldOf(value$7, "toString")).pipe(when(instanceOf(Function), (callable) => {
|
|
27014
|
-
try {
|
|
27015
|
-
return usableText(Reflect.apply(callable, value$7, []));
|
|
27016
|
-
} catch {
|
|
27017
|
-
return "";
|
|
27018
|
-
}
|
|
27019
|
-
}), orElse(() => ""));
|
|
27020
|
-
const isObjectType = (cause) => typeof cause === "object";
|
|
27021
|
-
const toStringText = (error) => value(error).pipe(when(_null, () => ""), when(isObjectType, (value) => objectToStringText(value)), orElse(() => ""));
|
|
27022
|
-
const stringifyRest = (error) => value(jsonText(error)).pipe(when(hasText, (json) => json), orElse(() => toStringText(error)));
|
|
27023
|
-
const stringifyNonError = (error) => value(error).pipe(when(string$1, (text) => text), when(isJsonPrimitive, (primitive) => JSON.stringify(primitive)), orElse(() => stringifyRest(error)));
|
|
27024
|
-
const errorText = (error) => value(error).pipe(when(isErrnoException, formatErrnoException), orElse(() => formatError(error)));
|
|
27025
|
-
function errorToString(error) {
|
|
27026
|
-
return value(error).pipe(when(isEmptyError, () => ""), when(instanceOf(Error), errorText), orElse(() => stringifyNonError(error)));
|
|
27027
|
-
}
|
|
27028
|
-
Object.freeze({ NoSuchFileOrDirectory: "ENOENT" });
|
|
27029
27531
|
Literals([
|
|
27030
27532
|
"complete",
|
|
27031
27533
|
"error",
|
|
@@ -27108,26 +27610,12 @@ const CoverageAnalysisSchema = Literals([
|
|
|
27108
27610
|
"all",
|
|
27109
27611
|
"perTest"
|
|
27110
27612
|
]);
|
|
27111
|
-
const RunOptionsFields = {
|
|
27112
|
-
timeout: Finite,
|
|
27113
|
-
disableBail: Boolean$2
|
|
27114
|
-
};
|
|
27115
27613
|
const DryRunOptionsSchema = Struct({
|
|
27116
27614
|
...RunOptionsFields,
|
|
27117
27615
|
coverageAnalysis: CoverageAnalysisSchema,
|
|
27118
27616
|
files: optionalKey(ArraySchema(String$1)),
|
|
27119
27617
|
testFiles: optionalKey(ArraySchema(String$1))
|
|
27120
27618
|
});
|
|
27121
|
-
const MutantActivationSchema = Literals(["runtime", "static"]);
|
|
27122
|
-
const MutantRunOptionsSchema = Struct({
|
|
27123
|
-
...RunOptionsFields,
|
|
27124
|
-
activeMutant: Mutant,
|
|
27125
|
-
sandboxFileName: String$1,
|
|
27126
|
-
mutantActivation: MutantActivationSchema,
|
|
27127
|
-
reloadEnvironment: Boolean$2,
|
|
27128
|
-
testFilter: optionalKey(ArraySchema(String$1)),
|
|
27129
|
-
hitLimit: optionalKey(Finite)
|
|
27130
|
-
});
|
|
27131
27619
|
const TestRunnerCapabilitiesSchema = Struct({ reloadEnvironment: Boolean$2 });
|
|
27132
27620
|
var TestRunnerFailed = class extends TaggedError()("TestRunnerFailed", {
|
|
27133
27621
|
cause: String$1,
|
|
@@ -27192,124 +27680,82 @@ var ReporterFailed = class extends TaggedError()("ReporterFailed", {
|
|
|
27192
27680
|
event: ReporterEventKind,
|
|
27193
27681
|
reporterName: String$1
|
|
27194
27682
|
}) {};
|
|
27195
|
-
const
|
|
27196
|
-
"
|
|
27197
|
-
"
|
|
27198
|
-
"
|
|
27199
|
-
"mutation-test"
|
|
27200
|
-
]);
|
|
27201
|
-
const OutputMode = Literals(["human", "machine"]);
|
|
27202
|
-
const ModeSignal = Literals([
|
|
27203
|
-
"flag",
|
|
27204
|
-
"env",
|
|
27205
|
-
"tty",
|
|
27206
|
-
"agent",
|
|
27207
|
-
"tool"
|
|
27683
|
+
const WorkerPluginKind = Literals([
|
|
27684
|
+
"TestRunner",
|
|
27685
|
+
"Checker",
|
|
27686
|
+
"Reporter"
|
|
27208
27687
|
]);
|
|
27209
|
-
|
|
27210
|
-
|
|
27211
|
-
|
|
27212
|
-
|
|
27213
|
-
|
|
27214
|
-
}) {};
|
|
27215
|
-
var PhaseEntered = class extends TaggedClass()("phase", {
|
|
27216
|
-
phase: RunPhase,
|
|
27217
|
-
elapsedMs: Finite
|
|
27218
|
-
}) {};
|
|
27219
|
-
var PlanKnown = class extends TaggedClass()("plan", { total: Finite }) {};
|
|
27220
|
-
var RunMutantTested = class extends TaggedClass()("mutant", {
|
|
27221
|
-
id: String$1,
|
|
27222
|
-
status: MutantStatusSchema,
|
|
27223
|
-
file: String$1,
|
|
27224
|
-
location: LocationSchema,
|
|
27225
|
-
mutator: String$1,
|
|
27226
|
-
replacement: NullOr(String$1),
|
|
27227
|
-
completed: Finite,
|
|
27228
|
-
total: Finite
|
|
27229
|
-
}) {};
|
|
27230
|
-
var Heartbeat = class extends TaggedClass()("tick", {
|
|
27231
|
-
elapsedMs: Finite,
|
|
27232
|
-
completed: Finite,
|
|
27233
|
-
total: NullOr(Finite)
|
|
27234
|
-
}) {};
|
|
27235
|
-
const VerdictThresholds = Struct({
|
|
27236
|
-
high: Finite,
|
|
27237
|
-
low: Finite,
|
|
27238
|
-
break: NullOr(Finite)
|
|
27239
|
-
});
|
|
27240
|
-
const VerdictMutant = Struct({
|
|
27241
|
-
id: String$1,
|
|
27242
|
-
file: String$1,
|
|
27243
|
-
location: LocationSchema,
|
|
27244
|
-
mutator: String$1,
|
|
27245
|
-
replacement: NullOr(String$1),
|
|
27246
|
-
status: MutantStatusSchema
|
|
27688
|
+
const TestRunnerDryRunRequest = Struct({ options: DryRunOptionsSchema });
|
|
27689
|
+
const TestRunnerMutantRunRequest = Struct({ options: MutantRunOptionsSchema });
|
|
27690
|
+
const CheckerRequest = Struct({
|
|
27691
|
+
checkerName: String$1,
|
|
27692
|
+
mutants: ArraySchema(Mutant)
|
|
27247
27693
|
});
|
|
27248
|
-
const
|
|
27249
|
-
|
|
27250
|
-
|
|
27251
|
-
|
|
27252
|
-
|
|
27253
|
-
runtimeErrors: Finite,
|
|
27254
|
-
compileErrors: Finite,
|
|
27255
|
-
ignored: Finite,
|
|
27256
|
-
pending: Finite
|
|
27694
|
+
const CheckerCheckResult = Record(String$1, CheckResultSchema);
|
|
27695
|
+
const CheckerGroupResult = ArraySchema(ArraySchema(String$1));
|
|
27696
|
+
const ReporterInitOptions = Struct({
|
|
27697
|
+
traceparent: optionalKey(String$1),
|
|
27698
|
+
tracestate: optionalKey(String$1)
|
|
27257
27699
|
});
|
|
27258
|
-
|
|
27259
|
-
|
|
27260
|
-
|
|
27261
|
-
|
|
27262
|
-
|
|
27263
|
-
|
|
27264
|
-
|
|
27265
|
-
reportFile: NullOr(String$1),
|
|
27266
|
-
counts: VerdictCounts,
|
|
27267
|
-
mutants: ArraySchema(VerdictMutant)
|
|
27268
|
-
}) {};
|
|
27269
|
-
var RunFailed = class extends TaggedClass()("error", {
|
|
27270
|
-
schemaVersion: String$1,
|
|
27271
|
-
code: Finite,
|
|
27272
|
-
error: String$1,
|
|
27273
|
-
remediation: String$1
|
|
27700
|
+
const ReporterEventBatch = ArraySchema(ReporterEventUnion);
|
|
27701
|
+
const ReporterAck = Void;
|
|
27702
|
+
const ReporterDrained = Void;
|
|
27703
|
+
var BoundaryPayloadRejected = class extends TaggedError()("BoundaryPayloadRejected", {
|
|
27704
|
+
pluginName: String$1,
|
|
27705
|
+
method: String$1,
|
|
27706
|
+
cause: String$1
|
|
27274
27707
|
}) {};
|
|
27275
|
-
var
|
|
27276
|
-
|
|
27277
|
-
|
|
27278
|
-
|
|
27708
|
+
var BoundaryUnrecognizedSignal = class extends TaggedError()("BoundaryUnrecognizedSignal", {
|
|
27709
|
+
pluginName: String$1,
|
|
27710
|
+
method: String$1,
|
|
27711
|
+
signal: String$1
|
|
27279
27712
|
}) {};
|
|
27280
27713
|
Union([
|
|
27281
|
-
|
|
27282
|
-
|
|
27283
|
-
|
|
27284
|
-
|
|
27285
|
-
|
|
27286
|
-
VerdictReached,
|
|
27287
|
-
RunFailed,
|
|
27288
|
-
HelpRendered
|
|
27714
|
+
BoundaryPayloadRejected,
|
|
27715
|
+
BoundaryUnrecognizedSignal,
|
|
27716
|
+
TestRunnerFailed,
|
|
27717
|
+
CheckerFailed,
|
|
27718
|
+
ReporterFailed
|
|
27289
27719
|
]);
|
|
27290
|
-
|
|
27291
|
-
|
|
27292
|
-
|
|
27293
|
-
});
|
|
27294
|
-
TaggedClass()("RunOutput", {
|
|
27295
|
-
verdictJson: String$1,
|
|
27296
|
-
exitCode: Finite
|
|
27297
|
-
});
|
|
27298
|
-
TaggedError()("RunDecodeError", { message: String$1 });
|
|
27299
|
-
TaggedError()("RunReadError", { message: String$1 });
|
|
27300
|
-
TaggedError()("RunWriteError", { message: String$1 });
|
|
27301
|
-
TaggedClass()("PlanMutationRunCommand", {
|
|
27302
|
-
configMutatePatterns: ArraySchema(String$1),
|
|
27303
|
-
configMutatorNames: ArraySchema(String$1),
|
|
27304
|
-
targetMutatePatterns: ArraySchema(String$1),
|
|
27305
|
-
availableMutators: ArraySchema(String$1)
|
|
27306
|
-
});
|
|
27307
|
-
TaggedClass()("MutationRunPlan", {
|
|
27308
|
-
mutatePatterns: ArraySchema(String$1),
|
|
27309
|
-
mutatorNames: ArraySchema(String$1)
|
|
27720
|
+
Struct({
|
|
27721
|
+
kind: WorkerPluginKind,
|
|
27722
|
+
entrypoint: String$1.check(isPattern(/^file:\/\//, { expected: "a file: URL of the worker program" }))
|
|
27310
27723
|
});
|
|
27311
|
-
Service$1()("
|
|
27312
|
-
Service
|
|
27724
|
+
var PropagatedTrace = class extends Service$1()("@systemfsoftware/stryker-js-plugin-interface/TraceContextRpc/PropagatedTrace") {};
|
|
27725
|
+
var TraceContextMiddleware = class extends Service()("@systemfsoftware/stryker-js-plugin-interface/TraceContextMiddleware", { requiredForClient: true }) {};
|
|
27726
|
+
const TestRunnerRpcs = make$14(make$15("capabilities", {
|
|
27727
|
+
success: TestRunnerCapabilitiesSchema,
|
|
27728
|
+
error: TestRunnerFailed
|
|
27729
|
+
}), make$15("dryRun", {
|
|
27730
|
+
payload: TestRunnerDryRunRequest,
|
|
27731
|
+
success: DryRunResultSchema,
|
|
27732
|
+
error: TestRunnerFailed
|
|
27733
|
+
}), make$15("mutantRun", {
|
|
27734
|
+
payload: TestRunnerMutantRunRequest,
|
|
27735
|
+
success: MutantRunResultSchema,
|
|
27736
|
+
error: TestRunnerFailed
|
|
27737
|
+
})).middleware(TraceContextMiddleware);
|
|
27738
|
+
make$14(make$15("check", {
|
|
27739
|
+
payload: CheckerRequest,
|
|
27740
|
+
success: CheckerCheckResult,
|
|
27741
|
+
error: CheckerFailed
|
|
27742
|
+
}), make$15("group", {
|
|
27743
|
+
payload: CheckerRequest,
|
|
27744
|
+
success: CheckerGroupResult,
|
|
27745
|
+
error: CheckerFailed
|
|
27746
|
+
})).middleware(TraceContextMiddleware);
|
|
27747
|
+
make$14(make$15("init", {
|
|
27748
|
+
payload: ReporterInitOptions,
|
|
27749
|
+
success: ReporterAck,
|
|
27750
|
+
error: ReporterFailed
|
|
27751
|
+
}), make$15("onEventBatch", {
|
|
27752
|
+
payload: ReporterEventBatch,
|
|
27753
|
+
success: ReporterAck,
|
|
27754
|
+
error: ReporterFailed
|
|
27755
|
+
}), make$15("flush", {
|
|
27756
|
+
success: ReporterDrained,
|
|
27757
|
+
error: ReporterFailed
|
|
27758
|
+
})).middleware(TraceContextMiddleware);
|
|
27313
27759
|
const RENDERED_OPTION_DEFAULTS$1 = {
|
|
27314
27760
|
coverageAnalysis: "perTest",
|
|
27315
27761
|
fileLogLevel: "off",
|
|
@@ -27411,10 +27857,21 @@ const WarningOptions = openStruct({
|
|
|
27411
27857
|
});
|
|
27412
27858
|
const ConcurrencyCount = Finite.pipe(check(isGreaterThanOrEqualTo(1)));
|
|
27413
27859
|
const ConcurrencyPercent = String$1.pipe(check(isPattern(/^(100|[1-9]?[0-9])%$/)));
|
|
27860
|
+
const PluginFileUrl = String$1.pipe(check(isStartsWith("file://")));
|
|
27861
|
+
const TestRunnerConfigSchema = Union([String$1, Struct({
|
|
27862
|
+
plugin: PluginFileUrl,
|
|
27863
|
+
nodeArgs: optional(ArraySchema(String$1)),
|
|
27864
|
+
options: optional(Record(String$1, Unknown))
|
|
27865
|
+
})]);
|
|
27866
|
+
const CheckerEntryConfigSchema = Struct({
|
|
27867
|
+
plugin: PluginFileUrl,
|
|
27868
|
+
nodeArgs: optional(ArraySchema(String$1)),
|
|
27869
|
+
options: optional(Record(String$1, Unknown))
|
|
27870
|
+
});
|
|
27414
27871
|
const StrykerOptionsSchema = StructWithRest(Struct({
|
|
27415
27872
|
allowConsoleColors: defaulted(Boolean$2, true),
|
|
27416
27873
|
buildCommand: optional(String$1),
|
|
27417
|
-
checkers: defaulted(ArraySchema(
|
|
27874
|
+
checkers: defaulted(ArraySchema(CheckerEntryConfigSchema), []),
|
|
27418
27875
|
checkerNodeArgs: defaulted(ArraySchema(String$1), []),
|
|
27419
27876
|
concurrency: optional(Union([ConcurrencyCount, ConcurrencyPercent])),
|
|
27420
27877
|
commandRunner: defaulted(CommandRunnerOptionsSchema, { command: "npm test" }),
|
|
@@ -27444,8 +27901,8 @@ const StrykerOptionsSchema = StructWithRest(Struct({
|
|
|
27444
27901
|
mutate: defaulted(ArraySchema(String$1), ["{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)"]),
|
|
27445
27902
|
mutator: defaulted(MutatorDescriptor, { excludedMutations: [] }),
|
|
27446
27903
|
packageManager: optional(PackageManager),
|
|
27447
|
-
plugins: defaulted(ArraySchema(
|
|
27448
|
-
appendPlugins: defaulted(ArraySchema(
|
|
27904
|
+
plugins: defaulted(ArraySchema(PluginFileUrl), []),
|
|
27905
|
+
appendPlugins: defaulted(ArraySchema(PluginFileUrl), []),
|
|
27449
27906
|
reporters: defaulted(ArraySchema(String$1), [
|
|
27450
27907
|
"clear-text",
|
|
27451
27908
|
"progress",
|
|
@@ -27461,7 +27918,7 @@ const StrykerOptionsSchema = StructWithRest(Struct({
|
|
|
27461
27918
|
false,
|
|
27462
27919
|
true
|
|
27463
27920
|
]), true),
|
|
27464
|
-
testRunner: defaulted(
|
|
27921
|
+
testRunner: defaulted(TestRunnerConfigSchema, "command"),
|
|
27465
27922
|
testRunnerNodeArgs: defaulted(ArraySchema(String$1), []),
|
|
27466
27923
|
thresholds: defaulted(MutationScoreThresholdsSchema, {
|
|
27467
27924
|
high: 80,
|
|
@@ -27475,9 +27932,10 @@ const StrykerOptionsSchema = StructWithRest(Struct({
|
|
|
27475
27932
|
warnings: defaulted(Union([Boolean$2, WarningOptions]), true),
|
|
27476
27933
|
disableBail: defaulted(Boolean$2, false),
|
|
27477
27934
|
allowEmpty: defaulted(Boolean$2, false),
|
|
27478
|
-
ignorers: defaulted(ArraySchema(
|
|
27935
|
+
ignorers: defaulted(ArraySchema(PluginFileUrl), []),
|
|
27479
27936
|
testFiles: defaulted(ArraySchema(String$1), [])
|
|
27480
27937
|
}), [Record(String$1, Unknown)]);
|
|
27938
|
+
const isCustomTestRunner = (value) => typeof value !== "string";
|
|
27481
27939
|
(() => {
|
|
27482
27940
|
const { schema, definitions } = toJsonSchemaDocument(StrykerOptionsSchema);
|
|
27483
27941
|
if (Object.keys(definitions).length === 0) return schema;
|
|
@@ -27486,527 +27944,10 @@ const StrykerOptionsSchema = StructWithRest(Struct({
|
|
|
27486
27944
|
definitions
|
|
27487
27945
|
};
|
|
27488
27946
|
})();
|
|
27489
|
-
var TestRunner = class extends Service$1()("
|
|
27947
|
+
var TestRunner = class extends Service$1()("@systemfsoftware/stryker-js-plugin-interface/TestRunner") {};
|
|
27490
27948
|
function testFilesProvided(options) {
|
|
27491
27949
|
return options.testFiles !== void 0 && options.testFiles.length > 0;
|
|
27492
27950
|
}
|
|
27493
|
-
//#endregion
|
|
27494
|
-
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/unstable/rpc/RpcSchema.js
|
|
27495
|
-
/**
|
|
27496
|
-
* RPC schema markers and interruption annotations.
|
|
27497
|
-
*
|
|
27498
|
-
* This module contains the small pieces of schema metadata that the RPC
|
|
27499
|
-
* declaration, client, server, cluster, and reactivity layers share. It marks
|
|
27500
|
-
* streamed responses and annotates interruptions that came from a remote client
|
|
27501
|
-
* closing or cancelling a request.
|
|
27502
|
-
*
|
|
27503
|
-
* @since 4.0.0
|
|
27504
|
-
*/
|
|
27505
|
-
const StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema";
|
|
27506
|
-
/**
|
|
27507
|
-
* Returns `true` when a schema is an RPC stream schema created by
|
|
27508
|
-
* `RpcSchema.Stream`.
|
|
27509
|
-
*
|
|
27510
|
-
* @category guards
|
|
27511
|
-
* @since 4.0.0
|
|
27512
|
-
*/
|
|
27513
|
-
function isStreamSchema(schema) {
|
|
27514
|
-
return hasProperty(schema, StreamSchemaTypeId);
|
|
27515
|
-
}
|
|
27516
|
-
/** @internal */
|
|
27517
|
-
function getStreamSchemas(schema) {
|
|
27518
|
-
return isStreamSchema(schema) ? some({
|
|
27519
|
-
success: schema.success,
|
|
27520
|
-
error: schema.error
|
|
27521
|
-
}) : none();
|
|
27522
|
-
}
|
|
27523
|
-
const schema = /*#__PURE__*/ declare(isStream);
|
|
27524
|
-
/**
|
|
27525
|
-
* Creates an RPC stream schema from a stream element success schema and stream
|
|
27526
|
-
* error schema.
|
|
27527
|
-
*
|
|
27528
|
-
* @category constructors
|
|
27529
|
-
* @since 4.0.0
|
|
27530
|
-
*/
|
|
27531
|
-
function Stream(success, error) {
|
|
27532
|
-
return make$20(schema.ast, {
|
|
27533
|
-
[StreamSchemaTypeId]: StreamSchemaTypeId,
|
|
27534
|
-
success,
|
|
27535
|
-
error
|
|
27536
|
-
});
|
|
27537
|
-
}
|
|
27538
|
-
/**
|
|
27539
|
-
* Annotation that marks interruptions that originate from an RPC client
|
|
27540
|
-
* abort.
|
|
27541
|
-
*
|
|
27542
|
-
* @category services
|
|
27543
|
-
* @since 4.0.0
|
|
27544
|
-
*/
|
|
27545
|
-
var ClientAbort = class extends (/*#__PURE__*/ Service$1()("effect/rpc/RpcSchema/ClientAbort")) {
|
|
27546
|
-
static annotation = /*#__PURE__*/ this.context(true).pipe(/*#__PURE__*/ add(StackTrace, {
|
|
27547
|
-
name: "ClientAbort",
|
|
27548
|
-
stack: constUndefined,
|
|
27549
|
-
parent: void 0
|
|
27550
|
-
}));
|
|
27551
|
-
};
|
|
27552
|
-
//#endregion
|
|
27553
|
-
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/unstable/rpc/Rpc.js
|
|
27554
|
-
const TypeId$3 = "~effect/rpc/Rpc";
|
|
27555
|
-
/**
|
|
27556
|
-
* Represents server-side metadata for the client associated with an RPC request.
|
|
27557
|
-
*
|
|
27558
|
-
* **When to use**
|
|
27559
|
-
*
|
|
27560
|
-
* Use to inspect or annotate the connected client while handling an RPC request
|
|
27561
|
-
* on the server.
|
|
27562
|
-
*
|
|
27563
|
-
* **Details**
|
|
27564
|
-
*
|
|
27565
|
-
* It stores the client id and request annotations that handlers can read or
|
|
27566
|
-
* extend.
|
|
27567
|
-
*
|
|
27568
|
-
* @category models
|
|
27569
|
-
* @since 4.0.0
|
|
27570
|
-
*/
|
|
27571
|
-
var ServerClient = class {
|
|
27572
|
-
id;
|
|
27573
|
-
annotations;
|
|
27574
|
-
constructor(id) {
|
|
27575
|
-
this.id = id;
|
|
27576
|
-
this.annotations = empty$5();
|
|
27577
|
-
}
|
|
27578
|
-
annotate(tag, value) {
|
|
27579
|
-
this.annotations = add(this.annotations, tag, value);
|
|
27580
|
-
return this;
|
|
27581
|
-
}
|
|
27582
|
-
};
|
|
27583
|
-
const Proto$1 = {
|
|
27584
|
-
[TypeId$3]: TypeId$3,
|
|
27585
|
-
pipe() {
|
|
27586
|
-
return pipeArguments(this, arguments);
|
|
27587
|
-
},
|
|
27588
|
-
setSuccess(successSchema) {
|
|
27589
|
-
return makeProto$1({
|
|
27590
|
-
_tag: this._tag,
|
|
27591
|
-
payloadSchema: this.payloadSchema,
|
|
27592
|
-
successSchema,
|
|
27593
|
-
errorSchema: this.errorSchema,
|
|
27594
|
-
defectSchema: this.defectSchema,
|
|
27595
|
-
annotations: this.annotations,
|
|
27596
|
-
middlewares: this.middlewares
|
|
27597
|
-
});
|
|
27598
|
-
},
|
|
27599
|
-
setError(errorSchema) {
|
|
27600
|
-
return makeProto$1({
|
|
27601
|
-
_tag: this._tag,
|
|
27602
|
-
payloadSchema: this.payloadSchema,
|
|
27603
|
-
successSchema: this.successSchema,
|
|
27604
|
-
errorSchema,
|
|
27605
|
-
defectSchema: this.defectSchema,
|
|
27606
|
-
annotations: this.annotations,
|
|
27607
|
-
middlewares: this.middlewares
|
|
27608
|
-
});
|
|
27609
|
-
},
|
|
27610
|
-
setPayload(payloadSchema) {
|
|
27611
|
-
return makeProto$1({
|
|
27612
|
-
_tag: this._tag,
|
|
27613
|
-
payloadSchema: isSchema(payloadSchema) ? payloadSchema : Struct(payloadSchema),
|
|
27614
|
-
successSchema: this.successSchema,
|
|
27615
|
-
errorSchema: this.errorSchema,
|
|
27616
|
-
defectSchema: this.defectSchema,
|
|
27617
|
-
annotations: this.annotations,
|
|
27618
|
-
middlewares: this.middlewares
|
|
27619
|
-
});
|
|
27620
|
-
},
|
|
27621
|
-
middleware(middleware) {
|
|
27622
|
-
return makeProto$1({
|
|
27623
|
-
_tag: this._tag,
|
|
27624
|
-
payloadSchema: this.payloadSchema,
|
|
27625
|
-
successSchema: this.successSchema,
|
|
27626
|
-
errorSchema: this.errorSchema,
|
|
27627
|
-
defectSchema: this.defectSchema,
|
|
27628
|
-
annotations: this.annotations,
|
|
27629
|
-
middlewares: /* @__PURE__ */ new Set([...this.middlewares, middleware])
|
|
27630
|
-
});
|
|
27631
|
-
},
|
|
27632
|
-
prefix(prefix) {
|
|
27633
|
-
return makeProto$1({
|
|
27634
|
-
_tag: `${prefix}${this._tag}`,
|
|
27635
|
-
payloadSchema: this.payloadSchema,
|
|
27636
|
-
successSchema: this.successSchema,
|
|
27637
|
-
errorSchema: this.errorSchema,
|
|
27638
|
-
defectSchema: this.defectSchema,
|
|
27639
|
-
annotations: this.annotations,
|
|
27640
|
-
middlewares: this.middlewares
|
|
27641
|
-
});
|
|
27642
|
-
},
|
|
27643
|
-
annotate(tag, value) {
|
|
27644
|
-
return makeProto$1({
|
|
27645
|
-
_tag: this._tag,
|
|
27646
|
-
payloadSchema: this.payloadSchema,
|
|
27647
|
-
successSchema: this.successSchema,
|
|
27648
|
-
errorSchema: this.errorSchema,
|
|
27649
|
-
defectSchema: this.defectSchema,
|
|
27650
|
-
middlewares: this.middlewares,
|
|
27651
|
-
annotations: add(this.annotations, tag, value)
|
|
27652
|
-
});
|
|
27653
|
-
},
|
|
27654
|
-
annotateMerge(context) {
|
|
27655
|
-
return makeProto$1({
|
|
27656
|
-
_tag: this._tag,
|
|
27657
|
-
payloadSchema: this.payloadSchema,
|
|
27658
|
-
successSchema: this.successSchema,
|
|
27659
|
-
errorSchema: this.errorSchema,
|
|
27660
|
-
defectSchema: this.defectSchema,
|
|
27661
|
-
middlewares: this.middlewares,
|
|
27662
|
-
annotations: merge$1(this.annotations, context)
|
|
27663
|
-
});
|
|
27664
|
-
}
|
|
27665
|
-
};
|
|
27666
|
-
const makeProto$1 = (options) => {
|
|
27667
|
-
function Rpc() {}
|
|
27668
|
-
Object.setPrototypeOf(Rpc, Proto$1);
|
|
27669
|
-
Object.assign(Rpc, options);
|
|
27670
|
-
Rpc.key = `effect/rpc/Rpc/${options._tag}`;
|
|
27671
|
-
return Rpc;
|
|
27672
|
-
};
|
|
27673
|
-
/**
|
|
27674
|
-
* Creates an RPC definition with the supplied tag and optional schemas.
|
|
27675
|
-
*
|
|
27676
|
-
* **Details**
|
|
27677
|
-
*
|
|
27678
|
-
* Payload options can be either a schema or struct fields. `stream: true` wraps
|
|
27679
|
-
* the success and error schemas in a stream schema and sets the normal error
|
|
27680
|
-
* schema to `Schema.Never`. `primaryKey` creates a payload class with a
|
|
27681
|
-
* primary key derived from the payload value.
|
|
27682
|
-
*
|
|
27683
|
-
* @category constructors
|
|
27684
|
-
* @since 4.0.0
|
|
27685
|
-
*/
|
|
27686
|
-
const make$9 = (tag, options) => {
|
|
27687
|
-
const successSchema = options?.success ?? Void;
|
|
27688
|
-
const errorSchema = options?.error ?? Never;
|
|
27689
|
-
const defectSchema = options?.defect ?? Defect();
|
|
27690
|
-
let payloadSchema;
|
|
27691
|
-
if (options?.primaryKey) payloadSchema = class Payload extends Class(`effect/rpc/Rpc/${tag}`)(options.payload) {
|
|
27692
|
-
[symbol]() {
|
|
27693
|
-
return options.primaryKey(this);
|
|
27694
|
-
}
|
|
27695
|
-
};
|
|
27696
|
-
else payloadSchema = isSchema(options?.payload) ? options?.payload : options?.payload ? Struct(options?.payload) : Void;
|
|
27697
|
-
return makeProto$1({
|
|
27698
|
-
_tag: tag,
|
|
27699
|
-
payloadSchema,
|
|
27700
|
-
successSchema: options?.stream ? Stream(successSchema, errorSchema) : successSchema,
|
|
27701
|
-
errorSchema: options?.stream ? Never : errorSchema,
|
|
27702
|
-
defectSchema,
|
|
27703
|
-
annotations: empty$5(),
|
|
27704
|
-
middlewares: /* @__PURE__ */ new Set()
|
|
27705
|
-
});
|
|
27706
|
-
};
|
|
27707
|
-
const exitSchemaCache = /*#__PURE__*/ new WeakMap();
|
|
27708
|
-
/**
|
|
27709
|
-
* Builds the `Schema.Exit` used to encode and decode RPC results.
|
|
27710
|
-
*
|
|
27711
|
-
* **Details**
|
|
27712
|
-
*
|
|
27713
|
-
* The failure side includes the RPC error schema, middleware error schemas, and
|
|
27714
|
-
* stream error schema for streaming RPCs. Streaming RPCs use `Schema.Void` for
|
|
27715
|
-
* the exit success value. The schema is cached per RPC definition.
|
|
27716
|
-
*
|
|
27717
|
-
* @category constructors
|
|
27718
|
-
* @since 4.0.0
|
|
27719
|
-
*/
|
|
27720
|
-
const exitSchema = (self) => {
|
|
27721
|
-
if (exitSchemaCache.has(self)) return exitSchemaCache.get(self);
|
|
27722
|
-
const rpc = self;
|
|
27723
|
-
const failures = /* @__PURE__ */ new Set([rpc.errorSchema]);
|
|
27724
|
-
const streamSchemas = getStreamSchemas(rpc.successSchema);
|
|
27725
|
-
if (isSome(streamSchemas)) failures.add(streamSchemas.value.error);
|
|
27726
|
-
for (const middleware of rpc.middlewares) failures.add(middleware.error);
|
|
27727
|
-
const schema = Exit(isSome(streamSchemas) ? Void : rpc.successSchema, Union([...failures]), rpc.defectSchema);
|
|
27728
|
-
exitSchemaCache.set(self, schema);
|
|
27729
|
-
return schema;
|
|
27730
|
-
};
|
|
27731
|
-
const WrapperTypeId = "~effect/rpc/Rpc/Wrapper";
|
|
27732
|
-
/**
|
|
27733
|
-
* Returns `true` when the value is an RPC `Wrapper`.
|
|
27734
|
-
*
|
|
27735
|
-
* @category guards
|
|
27736
|
-
* @since 4.0.0
|
|
27737
|
-
*/
|
|
27738
|
-
const isWrapper = (u) => WrapperTypeId in u;
|
|
27739
|
-
//#endregion
|
|
27740
|
-
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/unstable/rpc/RpcGroup.js
|
|
27741
|
-
const RpcGroupProto = {
|
|
27742
|
-
add(...rpcs) {
|
|
27743
|
-
const requests = new Map(this.requests);
|
|
27744
|
-
for (const rpc of rpcs) requests.set(rpc._tag, rpc);
|
|
27745
|
-
return makeProto({
|
|
27746
|
-
requests,
|
|
27747
|
-
annotations: this.annotations
|
|
27748
|
-
});
|
|
27749
|
-
},
|
|
27750
|
-
merge(...groups) {
|
|
27751
|
-
const requests = new Map(this.requests);
|
|
27752
|
-
const annotations = new Map(this.annotations.mapUnsafe);
|
|
27753
|
-
for (const group of groups) {
|
|
27754
|
-
for (const [tag, rpc] of group.requests) requests.set(tag, rpc);
|
|
27755
|
-
for (const [key, value] of group.annotations.mapUnsafe) annotations.set(key, value);
|
|
27756
|
-
}
|
|
27757
|
-
return makeProto({
|
|
27758
|
-
requests,
|
|
27759
|
-
annotations: makeUnsafe$7(annotations)
|
|
27760
|
-
});
|
|
27761
|
-
},
|
|
27762
|
-
omit(...tags) {
|
|
27763
|
-
const requests = new Map(this.requests);
|
|
27764
|
-
for (const tag of tags) requests.delete(tag);
|
|
27765
|
-
return makeProto({
|
|
27766
|
-
requests,
|
|
27767
|
-
annotations: this.annotations
|
|
27768
|
-
});
|
|
27769
|
-
},
|
|
27770
|
-
middleware(middleware) {
|
|
27771
|
-
const requests = /* @__PURE__ */ new Map();
|
|
27772
|
-
for (const [tag, rpc] of this.requests) requests.set(tag, rpc.middleware(middleware));
|
|
27773
|
-
return makeProto({
|
|
27774
|
-
requests,
|
|
27775
|
-
annotations: this.annotations
|
|
27776
|
-
});
|
|
27777
|
-
},
|
|
27778
|
-
toHandlers(build) {
|
|
27779
|
-
const self = this;
|
|
27780
|
-
return gen(function* () {
|
|
27781
|
-
const services = yield* context$1();
|
|
27782
|
-
const handlers = isEffect(build) ? yield* build : build;
|
|
27783
|
-
const contextMap = /* @__PURE__ */ new Map();
|
|
27784
|
-
self.requests.forEach((rpc, tag) => {
|
|
27785
|
-
contextMap.set(rpc.key, {
|
|
27786
|
-
tag: rpc._tag,
|
|
27787
|
-
handler: handlers[tag],
|
|
27788
|
-
context: services
|
|
27789
|
-
});
|
|
27790
|
-
});
|
|
27791
|
-
return makeUnsafe$7(contextMap);
|
|
27792
|
-
});
|
|
27793
|
-
},
|
|
27794
|
-
prefix(prefix) {
|
|
27795
|
-
const requests = /* @__PURE__ */ new Map();
|
|
27796
|
-
for (const rpc of this.requests.values()) {
|
|
27797
|
-
const newRpc = rpc.prefix(prefix);
|
|
27798
|
-
requests.set(newRpc._tag, newRpc);
|
|
27799
|
-
}
|
|
27800
|
-
return makeProto({
|
|
27801
|
-
requests,
|
|
27802
|
-
annotations: this.annotations
|
|
27803
|
-
});
|
|
27804
|
-
},
|
|
27805
|
-
toLayer(build) {
|
|
27806
|
-
return effectContext(this.toHandlers(build));
|
|
27807
|
-
},
|
|
27808
|
-
of: identity,
|
|
27809
|
-
toLayerHandler(service, build) {
|
|
27810
|
-
const self = this;
|
|
27811
|
-
return effectContext(gen(function* () {
|
|
27812
|
-
const services = yield* context$1();
|
|
27813
|
-
const handler = isEffect(build) ? yield* build : build;
|
|
27814
|
-
const contextMap = /* @__PURE__ */ new Map();
|
|
27815
|
-
const rpc = self.requests.get(service);
|
|
27816
|
-
contextMap.set(rpc.key, {
|
|
27817
|
-
handler,
|
|
27818
|
-
context: services
|
|
27819
|
-
});
|
|
27820
|
-
return makeUnsafe$7(contextMap);
|
|
27821
|
-
}));
|
|
27822
|
-
},
|
|
27823
|
-
accessHandler(service) {
|
|
27824
|
-
return contextWith((parentContext) => {
|
|
27825
|
-
const rpc = this.requests.get(service);
|
|
27826
|
-
const { handler, context } = getOrUndefinedUnsafe(parentContext, rpc.key);
|
|
27827
|
-
return succeed$1((payload, options) => {
|
|
27828
|
-
options.rpc = rpc;
|
|
27829
|
-
const result = handler(payload, options);
|
|
27830
|
-
const effectOrStream = isWrapper(result) ? result.value : result;
|
|
27831
|
-
return isEffect(effectOrStream) ? provide$1(effectOrStream, context) : provideContext(effectOrStream, context);
|
|
27832
|
-
});
|
|
27833
|
-
});
|
|
27834
|
-
},
|
|
27835
|
-
annotate(service, value) {
|
|
27836
|
-
return makeProto({
|
|
27837
|
-
requests: this.requests,
|
|
27838
|
-
annotations: add(this.annotations, service, value)
|
|
27839
|
-
});
|
|
27840
|
-
},
|
|
27841
|
-
annotateRpcs(service, value) {
|
|
27842
|
-
return this.annotateRpcsMerge(make$31(service, value));
|
|
27843
|
-
},
|
|
27844
|
-
annotateMerge(context) {
|
|
27845
|
-
return makeProto({
|
|
27846
|
-
requests: this.requests,
|
|
27847
|
-
annotations: merge$1(this.annotations, context)
|
|
27848
|
-
});
|
|
27849
|
-
},
|
|
27850
|
-
annotateRpcsMerge(context) {
|
|
27851
|
-
const requests = /* @__PURE__ */ new Map();
|
|
27852
|
-
for (const [tag, rpc] of this.requests) requests.set(tag, rpc.annotateMerge(merge$1(context, rpc.annotations)));
|
|
27853
|
-
return makeProto({
|
|
27854
|
-
requests,
|
|
27855
|
-
annotations: this.annotations
|
|
27856
|
-
});
|
|
27857
|
-
}
|
|
27858
|
-
};
|
|
27859
|
-
const makeProto = (options) => Object.assign(function() {}, RpcGroupProto, {
|
|
27860
|
-
requests: options.requests,
|
|
27861
|
-
annotations: options.annotations
|
|
27862
|
-
});
|
|
27863
|
-
/**
|
|
27864
|
-
* Creates an `RpcGroup` from one or more RPC definitions.
|
|
27865
|
-
*
|
|
27866
|
-
* @category constructors
|
|
27867
|
-
* @since 4.0.0
|
|
27868
|
-
*/
|
|
27869
|
-
const make$8 = (...rpcs) => makeProto({
|
|
27870
|
-
requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
|
|
27871
|
-
annotations: empty$5()
|
|
27872
|
-
});
|
|
27873
|
-
//#endregion
|
|
27874
|
-
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/unstable/rpc/RpcMiddleware.js
|
|
27875
|
-
/**
|
|
27876
|
-
* Middleware services for the unstable RPC runtime.
|
|
27877
|
-
*
|
|
27878
|
-
* A middleware service wraps server handler execution and can also install a
|
|
27879
|
-
* client-side wrapper for generated clients. Its metadata records the services
|
|
27880
|
-
* provided to downstream handlers, the services required by the middleware
|
|
27881
|
-
* implementation, the schema for server-visible failures, the client-only error
|
|
27882
|
-
* type, and whether generated clients must require the matching client layer.
|
|
27883
|
-
*
|
|
27884
|
-
* @since 4.0.0
|
|
27885
|
-
*/
|
|
27886
|
-
/**
|
|
27887
|
-
* The runtime type id used to attach and inspect RPC middleware metadata.
|
|
27888
|
-
*
|
|
27889
|
-
* @category type IDs
|
|
27890
|
-
* @since 4.0.0
|
|
27891
|
-
*/
|
|
27892
|
-
const TypeId$2 = "~effect/rpc/RpcMiddleware";
|
|
27893
|
-
/**
|
|
27894
|
-
* Creates a typed RPC middleware service class, with optional service
|
|
27895
|
-
* requirements, provided services, error schema, and client-side requirement
|
|
27896
|
-
* metadata.
|
|
27897
|
-
*
|
|
27898
|
-
* @category constructors
|
|
27899
|
-
* @since 4.0.0
|
|
27900
|
-
*/
|
|
27901
|
-
const Service = () => (id, options) => {
|
|
27902
|
-
const Err = globalThis.Error;
|
|
27903
|
-
const limit = getStackTraceLimit();
|
|
27904
|
-
setStackTraceLimit(2);
|
|
27905
|
-
const creationError = new Err();
|
|
27906
|
-
setStackTraceLimit(limit);
|
|
27907
|
-
function ServiceClass() {}
|
|
27908
|
-
const ServiceClass_ = ServiceClass;
|
|
27909
|
-
Object.setPrototypeOf(ServiceClass, Object.getPrototypeOf(Service$1(id)));
|
|
27910
|
-
ServiceClass.key = id;
|
|
27911
|
-
Object.defineProperty(ServiceClass, "stack", { get() {
|
|
27912
|
-
return creationError.stack;
|
|
27913
|
-
} });
|
|
27914
|
-
ServiceClass_[TypeId$2] = TypeId$2;
|
|
27915
|
-
ServiceClass_.error = options?.error ?? Never;
|
|
27916
|
-
ServiceClass_.requiredForClient = options?.requiredForClient ?? false;
|
|
27917
|
-
return ServiceClass;
|
|
27918
|
-
};
|
|
27919
|
-
/**
|
|
27920
|
-
* Provides the client-side implementation for an RPC middleware service,
|
|
27921
|
-
* capturing the layer's environment and merging it into each middleware
|
|
27922
|
-
* invocation.
|
|
27923
|
-
*
|
|
27924
|
-
* @category layers
|
|
27925
|
-
* @since 4.0.0
|
|
27926
|
-
*/
|
|
27927
|
-
const layerClient = (tag, service) => effectContext(gen(function* () {
|
|
27928
|
-
const services = (yield* context$1()).pipe(omit$1(Scope));
|
|
27929
|
-
const middleware = isEffect(service) ? yield* service : service;
|
|
27930
|
-
return makeUnsafe$7(/* @__PURE__ */ new Map([[`${tag.key}/Client`, (options) => updateContext(middleware(options), (requestContext) => merge$1(services, requestContext))]]));
|
|
27931
|
-
}));
|
|
27932
|
-
//#endregion
|
|
27933
|
-
//#region ../stryker-js-plugin-interface/dist/index.mjs
|
|
27934
|
-
const WorkerPluginKind = Literals([
|
|
27935
|
-
"TestRunner",
|
|
27936
|
-
"Checker",
|
|
27937
|
-
"Reporter"
|
|
27938
|
-
]);
|
|
27939
|
-
const TestRunnerDryRunRequest = Struct({ options: DryRunOptionsSchema });
|
|
27940
|
-
const TestRunnerMutantRunRequest = Struct({ options: MutantRunOptionsSchema });
|
|
27941
|
-
const CheckerRequest = Struct({
|
|
27942
|
-
checkerName: String$1,
|
|
27943
|
-
mutants: ArraySchema(Mutant)
|
|
27944
|
-
});
|
|
27945
|
-
const CheckerCheckResult = Record(String$1, CheckResultSchema);
|
|
27946
|
-
const CheckerGroupResult = ArraySchema(ArraySchema(String$1));
|
|
27947
|
-
const ReporterInitOptions = Struct({
|
|
27948
|
-
traceparent: optionalKey(String$1),
|
|
27949
|
-
tracestate: optionalKey(String$1)
|
|
27950
|
-
});
|
|
27951
|
-
const ReporterEventBatch = ArraySchema(ReporterEventUnion);
|
|
27952
|
-
const ReporterAck = Void;
|
|
27953
|
-
const ReporterDrained = Void;
|
|
27954
|
-
var BoundaryPayloadRejected = class extends TaggedError()("BoundaryPayloadRejected", {
|
|
27955
|
-
pluginName: String$1,
|
|
27956
|
-
method: String$1,
|
|
27957
|
-
cause: String$1
|
|
27958
|
-
}) {};
|
|
27959
|
-
var BoundaryUnrecognizedSignal = class extends TaggedError()("BoundaryUnrecognizedSignal", {
|
|
27960
|
-
pluginName: String$1,
|
|
27961
|
-
method: String$1,
|
|
27962
|
-
signal: String$1
|
|
27963
|
-
}) {};
|
|
27964
|
-
Union([
|
|
27965
|
-
BoundaryPayloadRejected,
|
|
27966
|
-
BoundaryUnrecognizedSignal,
|
|
27967
|
-
TestRunnerFailed,
|
|
27968
|
-
CheckerFailed,
|
|
27969
|
-
ReporterFailed
|
|
27970
|
-
]);
|
|
27971
|
-
Struct({
|
|
27972
|
-
kind: WorkerPluginKind,
|
|
27973
|
-
entrypoint: String$1.check(isPattern(/^file:\/\//, { expected: "a file: URL of the worker program" }))
|
|
27974
|
-
});
|
|
27975
|
-
var PropagatedTrace = class extends Service$1()("@systemfsoftware/stryker-js-plugin-interface/TraceContextRpc/PropagatedTrace") {};
|
|
27976
|
-
var TraceContextMiddleware = class extends Service()("@systemfsoftware/stryker-js-plugin-interface/TraceContextMiddleware", { requiredForClient: true }) {};
|
|
27977
|
-
const TestRunnerRpcs = make$8(make$9("capabilities", {
|
|
27978
|
-
success: TestRunnerCapabilitiesSchema,
|
|
27979
|
-
error: TestRunnerFailed
|
|
27980
|
-
}), make$9("dryRun", {
|
|
27981
|
-
payload: TestRunnerDryRunRequest,
|
|
27982
|
-
success: DryRunResultSchema,
|
|
27983
|
-
error: TestRunnerFailed
|
|
27984
|
-
}), make$9("mutantRun", {
|
|
27985
|
-
payload: TestRunnerMutantRunRequest,
|
|
27986
|
-
success: MutantRunResultSchema,
|
|
27987
|
-
error: TestRunnerFailed
|
|
27988
|
-
})).middleware(TraceContextMiddleware);
|
|
27989
|
-
make$8(make$9("check", {
|
|
27990
|
-
payload: CheckerRequest,
|
|
27991
|
-
success: CheckerCheckResult,
|
|
27992
|
-
error: CheckerFailed
|
|
27993
|
-
}), make$9("group", {
|
|
27994
|
-
payload: CheckerRequest,
|
|
27995
|
-
success: CheckerGroupResult,
|
|
27996
|
-
error: CheckerFailed
|
|
27997
|
-
})).middleware(TraceContextMiddleware);
|
|
27998
|
-
make$8(make$9("init", {
|
|
27999
|
-
payload: ReporterInitOptions,
|
|
28000
|
-
success: ReporterAck,
|
|
28001
|
-
error: ReporterFailed
|
|
28002
|
-
}), make$9("onEventBatch", {
|
|
28003
|
-
payload: ReporterEventBatch,
|
|
28004
|
-
success: ReporterAck,
|
|
28005
|
-
error: ReporterFailed
|
|
28006
|
-
}), make$9("flush", {
|
|
28007
|
-
success: ReporterDrained,
|
|
28008
|
-
error: ReporterFailed
|
|
28009
|
-
})).middleware(TraceContextMiddleware);
|
|
28010
27951
|
const TRACEPARENT_HEADER = "traceparent";
|
|
28011
27952
|
const TRACESTATE_HEADER = "tracestate";
|
|
28012
27953
|
const formatTraceparent = (parts) => `${parts.version}-${parts.traceId}-${parts.spanId}-${(parts.traceFlags & 255).toString(16).padStart(2, "0")}`;
|
|
@@ -36799,7 +36740,7 @@ const fromDuplex = (open, options) => withFiber((fiber) => {
|
|
|
36799
36740
|
const latch = makeUnsafe$3(false);
|
|
36800
36741
|
const openServices = fiber.context;
|
|
36801
36742
|
const run = (handler, opts) => scopedWith(fnUntraced(function* (scope) {
|
|
36802
|
-
const fiberSet = yield* make$
|
|
36743
|
+
const fiberSet = yield* make$10().pipe(provide$4(scope));
|
|
36803
36744
|
let conn = void 0;
|
|
36804
36745
|
yield* addFinalizer$1(scope, sync(() => {
|
|
36805
36746
|
if (!conn) return;
|
|
@@ -37270,7 +37211,7 @@ const writeFile = (path, data, options) => callback$1((resume, signal) => {
|
|
|
37270
37211
|
resume(fail(handleBadArgument("writeFile")(err)));
|
|
37271
37212
|
}
|
|
37272
37213
|
});
|
|
37273
|
-
const makeFileSystem = /*#__PURE__*/ map$2(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$
|
|
37214
|
+
const makeFileSystem = /*#__PURE__*/ map$2(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$13({
|
|
37274
37215
|
access,
|
|
37275
37216
|
chmod,
|
|
37276
37217
|
chown,
|
|
@@ -37376,7 +37317,7 @@ const fileUrlOps = (windows) => ({
|
|
|
37376
37317
|
* @since 4.0.0
|
|
37377
37318
|
*/
|
|
37378
37319
|
const layer$5 = /* @__PURE__ */ succeed$2(Path$1)({
|
|
37379
|
-
[TypeId$
|
|
37320
|
+
[TypeId$4]: TypeId$4,
|
|
37380
37321
|
...Path,
|
|
37381
37322
|
.../*#__PURE__*/ fileUrlOps(void 0)
|
|
37382
37323
|
});
|
|
@@ -46321,7 +46262,7 @@ const make$3 = /*#__PURE__*/ gen(function* () {
|
|
|
46321
46262
|
const loggerProvider = yield* OtelLoggerProvider;
|
|
46322
46263
|
const clock = yield* Clock;
|
|
46323
46264
|
const otelLogger = loggerProvider.getLogger("@effect/opentelemetry");
|
|
46324
|
-
return make$
|
|
46265
|
+
return make$9((options) => {
|
|
46325
46266
|
const attributes = { fiberId: options.fiber.id };
|
|
46326
46267
|
for (const [key, value] of Object.entries(options.fiber.getRef(CurrentLogAnnotations))) assignProperty(attributes, key, unknownToAttributeValue(value));
|
|
46327
46268
|
const span = getOrUndefined(options.fiber.context, ParentSpan);
|
|
@@ -50691,7 +50632,10 @@ const workerTelemetryLayer = unwrap$3(gen(function* () {
|
|
|
50691
50632
|
}));
|
|
50692
50633
|
const workerServerLayer = (params) => unwrap$3(gen(function* () {
|
|
50693
50634
|
const socketPath = yield* string("STRYKER_SOCKET");
|
|
50694
|
-
|
|
50635
|
+
const restrictSocket = layer$9({ path: socketPath }).pipe(tap$1(() => value(socketPath.startsWith("\\\\.\\pipe\\")).pipe(when(true, () => void_$1), orElse(() => gen(function* () {
|
|
50636
|
+
yield* (yield* FileSystem).chmod(socketPath, 384);
|
|
50637
|
+
})))));
|
|
50638
|
+
return layer$10(params.rpcs).pipe(provide$3(params.handlers), provide$3(params.schemaServices), provide$3(layerProtocolSocketServer), provide$3(layerNdjson), provide$3(restrictSocket), provide$3(mergeAll(layer$7, layer$5)), provide$3(layerTraceContextServer), provideMerge(workerTelemetryLayer));
|
|
50695
50639
|
}));
|
|
50696
50640
|
//#endregion
|
|
50697
50641
|
//#region ../../node_modules/.pnpm/@systemfsoftware+effect-cell-types@8.1.0_effect@4.0.0-rc.112/node_modules/@systemfsoftware/effect-cell-types/dist/rolldown-runtime-D7D4PA-g.mjs
|
|
@@ -51100,11 +51044,14 @@ const decideVitestMutantRun = (command) => value(hitLimitReason(command.hitCount
|
|
|
51100
51044
|
}), exhaustive);
|
|
51101
51045
|
}), exhaustive);
|
|
51102
51046
|
const interpretVitestRun = Workflow_exports.make(VitestMutantRunCommand, decideVitestMutantRun);
|
|
51103
|
-
|
|
51047
|
+
//#endregion
|
|
51048
|
+
//#region src/Runner.schema.ts
|
|
51049
|
+
const VitestRunnerOptionsSchema = Struct({
|
|
51104
51050
|
dir: optional(String$1),
|
|
51105
51051
|
related: optional(Boolean$2).pipe(withDecodingDefault(succeed$1(true))),
|
|
51106
51052
|
configFile: optional(String$1)
|
|
51107
|
-
})
|
|
51053
|
+
});
|
|
51054
|
+
optional(VitestRunnerOptionsSchema).pipe(withDecodingDefault(succeed$1({ related: true })));
|
|
51108
51055
|
const HitCountMetaSchema = Struct({ hitCount: optional(Finite) });
|
|
51109
51056
|
const MutantCoverageMetaSchema = Struct({ mutantCoverage: optional(Struct({
|
|
51110
51057
|
static: Record(String$1, Finite),
|
|
@@ -51444,28 +51391,28 @@ const experimentalStateGetExternalErrorText = (vitest) => match$4(errorsSetOf(vi
|
|
|
51444
51391
|
onNone: () => "",
|
|
51445
51392
|
onSome: (errorsSet) => value(errorsSet).pipe(when(isIterable, (errors) => [...errors].map(errorToString).join("\n")), orElse(() => ""))
|
|
51446
51393
|
});
|
|
51447
|
-
const applyHarnessValue = (ctx, key, value$
|
|
51448
|
-
ctx.provide("hitLimit", getOrUndefined$1(filter(fromNullishOr(value$
|
|
51394
|
+
const applyHarnessValue = (ctx, key, value$2) => value(key).pipe(when("hitLimit", () => {
|
|
51395
|
+
ctx.provide("hitLimit", getOrUndefined$1(filter(fromNullishOr(value$2), isNumber)));
|
|
51449
51396
|
}), when("mutantActivation", () => {
|
|
51450
|
-
value(value$
|
|
51397
|
+
value(value$2).pipe(when(is("runtime", "static"), (activation) => {
|
|
51451
51398
|
ctx.provide("mutantActivation", activation);
|
|
51452
51399
|
}), orElse(() => void 0));
|
|
51453
51400
|
}), orElse(() => {
|
|
51454
|
-
value(value$
|
|
51401
|
+
value(value$2).pipe(when(isString, (activeMutant) => {
|
|
51455
51402
|
ctx.provide("activeMutant", activeMutant);
|
|
51456
51403
|
}), orElse(() => void 0));
|
|
51457
51404
|
}));
|
|
51458
|
-
const applyRunFilterToConfig = (vitest, options) => {
|
|
51459
|
-
|
|
51460
|
-
for (const project of vitest.projects)
|
|
51461
|
-
};
|
|
51405
|
+
const applyRunFilterToConfig = (vitest, options) => sync(() => {
|
|
51406
|
+
vitest.config.related = options.related;
|
|
51407
|
+
for (const project of vitest.projects) project.config.testNamePattern = options.testNamePattern;
|
|
51408
|
+
});
|
|
51462
51409
|
const disableScreenshotFailures = (value) => match$4(filter(fromNullishOr(value), isObject), {
|
|
51463
51410
|
onNone: () => void 0,
|
|
51464
51411
|
onSome: (browser) => {
|
|
51465
51412
|
Reflect.set(browser, "screenshotFailures", false);
|
|
51466
51413
|
}
|
|
51467
51414
|
});
|
|
51468
|
-
const setupFilePathsOf = (value$
|
|
51415
|
+
const setupFilePathsOf = (value$3) => value(value$3).pipe(when(Array.isArray, (setupFiles) => setupFiles.filter(isString)), orElse(() => []));
|
|
51469
51416
|
const applySetupFilesToProjects = (vitest, localSetupFile) => {
|
|
51470
51417
|
disableScreenshotFailures(Reflect.get(vitest.config, "browser"));
|
|
51471
51418
|
for (const project of vitest.projects) {
|
|
@@ -51475,7 +51422,7 @@ const applySetupFilesToProjects = (vitest, localSetupFile) => {
|
|
|
51475
51422
|
}
|
|
51476
51423
|
};
|
|
51477
51424
|
const makeVitestRunnerLayer = (input) => effect(TestRunner, gen(function* () {
|
|
51478
|
-
const stateRef = yield* make$
|
|
51425
|
+
const stateRef = yield* make$8({
|
|
51479
51426
|
ctx: void 0,
|
|
51480
51427
|
localSetupFile: void 0
|
|
51481
51428
|
});
|
|
@@ -51491,21 +51438,14 @@ const makeVitestRunnerLayer = (input) => effect(TestRunner, gen(function* () {
|
|
|
51491
51438
|
});
|
|
51492
51439
|
return state.ctx;
|
|
51493
51440
|
});
|
|
51494
|
-
const
|
|
51495
|
-
if (decoded === void 0) return { related: true };
|
|
51496
|
-
return decoded;
|
|
51497
|
-
})()), mapError((cause) => new TestRunnerFailed({
|
|
51441
|
+
const vitestOptionsEffect = decodeUnknownEffect(VitestRunnerOptionsSchema)(value(input.options.testRunner).pipe(when(isCustomTestRunner, (runner) => value(runner.options).pipe(when(_undefined, () => ({})), orElse((opts) => opts))), orElse(() => ({})))).pipe(mapError((cause) => new TestRunnerFailed({
|
|
51498
51442
|
runnerName: "vitest",
|
|
51499
51443
|
phase: "init",
|
|
51500
51444
|
cause: errorToString(cause)
|
|
51501
51445
|
})));
|
|
51502
|
-
const optionsEffect = decodedOptionsEffect(Reflect.get(input.options, "vitest")).pipe(map$2((vitestOptions) => ({
|
|
51503
|
-
...input.options,
|
|
51504
|
-
vitest: vitestOptions
|
|
51505
|
-
})));
|
|
51506
51446
|
const capabilities = succeed$1({ reloadEnvironment: true });
|
|
51507
51447
|
const init = gen(function* () {
|
|
51508
|
-
const
|
|
51448
|
+
const vitestOptions = yield* vitestOptionsEffect;
|
|
51509
51449
|
const projectRoot = input.sandboxDirectory;
|
|
51510
51450
|
const localSetupFile = pathService.resolve(projectRoot, `stryker-setup-${globalThis.crypto.randomUUID()}.js`);
|
|
51511
51451
|
yield* update(stateRef, (s) => ({
|
|
@@ -51530,13 +51470,13 @@ const makeVitestRunnerLayer = (input) => effect(TestRunner, gen(function* () {
|
|
|
51530
51470
|
}))));
|
|
51531
51471
|
const namespace = getOrElse$1(fromNullishOr(input.globalNamespace), () => INSTRUMENTER_CONSTANTS.NAMESPACE);
|
|
51532
51472
|
const scanDir = (() => {
|
|
51533
|
-
if (typeof
|
|
51473
|
+
if (typeof vitestOptions.dir === "string") return pathService.resolve(projectRoot, vitestOptions.dir);
|
|
51534
51474
|
})();
|
|
51535
51475
|
const aliases = yield* readSandboxSelfAliases(projectRoot).pipe(provideService(FileSystem, fsService), provideService(Path$1, pathService));
|
|
51536
51476
|
const plugin = sandboxSelfPlugin(aliases);
|
|
51537
51477
|
const ctx = yield* tryPromise({
|
|
51538
51478
|
try: () => createVitest("test", {
|
|
51539
|
-
config:
|
|
51479
|
+
config: vitestOptions.configFile,
|
|
51540
51480
|
coverage: { enabled: false },
|
|
51541
51481
|
maxWorkers: 1,
|
|
51542
51482
|
maxConcurrency: 1,
|
|
@@ -51547,7 +51487,7 @@ const makeVitestRunnerLayer = (input) => effect(TestRunner, gen(function* () {
|
|
|
51547
51487
|
return { dir: scanDir };
|
|
51548
51488
|
})(),
|
|
51549
51489
|
bail: (() => {
|
|
51550
|
-
if (options.disableBail) return 0;
|
|
51490
|
+
if (input.options.disableBail) return 0;
|
|
51551
51491
|
return 1;
|
|
51552
51492
|
})(),
|
|
51553
51493
|
onConsoleLog: () => false,
|
|
@@ -51624,16 +51564,15 @@ const makeVitestRunnerLayer = (input) => effect(TestRunner, gen(function* () {
|
|
|
51624
51564
|
});
|
|
51625
51565
|
const collectRaw = (filter) => gen(function* () {
|
|
51626
51566
|
const ctx = yield* requireCtx;
|
|
51627
|
-
const
|
|
51567
|
+
const vitestOptions = yield* vitestOptionsEffect;
|
|
51628
51568
|
yield* resetContext.pipe(mapError((cause) => new TestRunnerFailed({
|
|
51629
51569
|
runnerName: "vitest",
|
|
51630
51570
|
phase: "dryRun",
|
|
51631
51571
|
cause: errorToString(cause)
|
|
51632
51572
|
})));
|
|
51633
|
-
const
|
|
51634
|
-
const related = relatedFilesOf(Reflect.get(vitestInRun, "related"), filter.relatedFiles);
|
|
51573
|
+
const related = relatedFilesOf(vitestOptions.related, filter.relatedFiles);
|
|
51635
51574
|
const plan = runFilterPlan(filter, input.sandboxDirectory, pathService);
|
|
51636
|
-
applyRunFilterToConfig(ctx, {
|
|
51575
|
+
yield* applyRunFilterToConfig(ctx, {
|
|
51637
51576
|
related,
|
|
51638
51577
|
testNamePattern: plan.testNamePattern
|
|
51639
51578
|
});
|
|
@@ -51869,7 +51808,7 @@ runMain(launch(workerServerLayer({
|
|
|
51869
51808
|
rpcs: TestRunnerRpcs,
|
|
51870
51809
|
handlers: TestRunnerRpcs.toLayer(gen(function* () {
|
|
51871
51810
|
const options = yield* readWorkerOptionsFromEnv;
|
|
51872
|
-
const runnerName = options.testRunner;
|
|
51811
|
+
const runnerName = value(options.testRunner).pipe(when(string$1, (name) => name), orElse(() => "vitest"));
|
|
51873
51812
|
const sandboxDirectory = yield* string("STRYKER_SANDBOX_DIR");
|
|
51874
51813
|
const failed = (phase) => (cause) => fail(new TestRunnerFailed({
|
|
51875
51814
|
cause: pretty(cause),
|