@systemfsoftware/stryker-js 7.0.0 → 9.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 +16 -0
- package/dist/config.d.mts +12 -2
- package/dist/index.d.mts +74 -18
- package/dist/index.mjs +2 -2
- package/dist/main.mjs +1615 -626
- package/dist/{mutation-test.cell-689vUxaq.d.mts → mutation-test.cell-BTa-up9u.d.mts} +2 -55
- package/dist/{output-mode-C5DpB11I.d.mts → output-mode-CE6VNHfH.d.mts} +38 -6
- package/dist/promises.d.mts +2 -2
- package/dist/promises.mjs +1 -1
- package/dist/{src-BY5pFAY5.mjs → src-BQuaL-fB.mjs} +649 -460
- package/package.json +7 -5
- package/dist/stryker-config-CTcO2hiS.d.mts +0 -13
package/dist/main.mjs
CHANGED
|
@@ -1231,7 +1231,7 @@ const symbol$2 = "~effect/interfaces/Hash";
|
|
|
1231
1231
|
*/
|
|
1232
1232
|
const hash = (self) => {
|
|
1233
1233
|
switch (typeof self) {
|
|
1234
|
-
case "number": return number$
|
|
1234
|
+
case "number": return number$3(self);
|
|
1235
1235
|
case "bigint": return string$7(self.toString(10));
|
|
1236
1236
|
case "boolean": return string$7(String(self));
|
|
1237
1237
|
case "symbol": return string$7(String(self));
|
|
@@ -1291,7 +1291,7 @@ const hash = (self) => {
|
|
|
1291
1291
|
* @since 2.0.0
|
|
1292
1292
|
*/
|
|
1293
1293
|
const random = (self) => {
|
|
1294
|
-
if (!randomHashCache.has(self)) randomHashCache.set(self, number$
|
|
1294
|
+
if (!randomHashCache.has(self)) randomHashCache.set(self, number$3(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)));
|
|
1295
1295
|
return randomHashCache.get(self);
|
|
1296
1296
|
};
|
|
1297
1297
|
/**
|
|
@@ -1410,7 +1410,7 @@ const isHash = (u) => hasProperty(u, symbol$2);
|
|
|
1410
1410
|
* @category hashing
|
|
1411
1411
|
* @since 2.0.0
|
|
1412
1412
|
*/
|
|
1413
|
-
const number$
|
|
1413
|
+
const number$3 = (n) => {
|
|
1414
1414
|
if (n !== n) return string$7("NaN");
|
|
1415
1415
|
if (n === Infinity) return string$7("Infinity");
|
|
1416
1416
|
if (n === -Infinity) return string$7("-Infinity");
|
|
@@ -2935,9 +2935,9 @@ function Array_(item) {
|
|
|
2935
2935
|
/**
|
|
2936
2936
|
* @since 2.0.0
|
|
2937
2937
|
*/
|
|
2938
|
-
const TypeId$
|
|
2938
|
+
const TypeId$46 = "~effect/data/Option";
|
|
2939
2939
|
const CommonProto$1 = {
|
|
2940
|
-
[TypeId$
|
|
2940
|
+
[TypeId$46]: { _A: (_) => _ },
|
|
2941
2941
|
...PipeInspectableProto,
|
|
2942
2942
|
[Symbol.iterator]() {
|
|
2943
2943
|
return new SingleShotGen(this);
|
|
@@ -2987,7 +2987,7 @@ const NoneProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
2987
2987
|
}
|
|
2988
2988
|
});
|
|
2989
2989
|
/** @internal */
|
|
2990
|
-
const isOption$1 = (input) => hasProperty(input, TypeId$
|
|
2990
|
+
const isOption$1 = (input) => hasProperty(input, TypeId$46);
|
|
2991
2991
|
/** @internal */
|
|
2992
2992
|
const isNone$1 = (fa) => fa._tag === "None";
|
|
2993
2993
|
/** @internal */
|
|
@@ -3002,9 +3002,9 @@ const some$1 = (value) => {
|
|
|
3002
3002
|
};
|
|
3003
3003
|
//#endregion
|
|
3004
3004
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/result.js
|
|
3005
|
-
const TypeId$
|
|
3005
|
+
const TypeId$45 = "~effect/data/Result";
|
|
3006
3006
|
const CommonProto = {
|
|
3007
|
-
[TypeId$
|
|
3007
|
+
[TypeId$45]: {
|
|
3008
3008
|
/* v8 ignore next 2 */
|
|
3009
3009
|
_A: (_) => _,
|
|
3010
3010
|
_E: (_) => _
|
|
@@ -3055,7 +3055,7 @@ const FailureProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Com
|
|
|
3055
3055
|
}
|
|
3056
3056
|
});
|
|
3057
3057
|
/** @internal */
|
|
3058
|
-
const isResult$1 = (input) => hasProperty(input, TypeId$
|
|
3058
|
+
const isResult$1 = (input) => hasProperty(input, TypeId$45);
|
|
3059
3059
|
/** @internal */
|
|
3060
3060
|
const isFailure$2 = (result) => result._tag === "Failure";
|
|
3061
3061
|
/** @internal */
|
|
@@ -3072,6 +3072,8 @@ const succeed$9 = (success) => {
|
|
|
3072
3072
|
a.success = success;
|
|
3073
3073
|
return a;
|
|
3074
3074
|
};
|
|
3075
|
+
/** @internal */
|
|
3076
|
+
const getSuccess$1 = (self) => isFailure$2(self) ? none$1 : some$1(self.success);
|
|
3075
3077
|
//#endregion
|
|
3076
3078
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Order.js
|
|
3077
3079
|
/**
|
|
@@ -3193,7 +3195,7 @@ const Number$5 = /*#__PURE__*/ make$43((self, that) => {
|
|
|
3193
3195
|
* @category mapping
|
|
3194
3196
|
* @since 2.0.0
|
|
3195
3197
|
*/
|
|
3196
|
-
const mapInput$
|
|
3198
|
+
const mapInput$2 = /*#__PURE__*/ dual(2, (self, f) => make$43((b1, b2) => self(f(b1), f(b2))));
|
|
3197
3199
|
/**
|
|
3198
3200
|
* Checks whether one value is strictly less than another according to the given order.
|
|
3199
3201
|
*
|
|
@@ -3994,7 +3996,7 @@ const toArray = (self) => isNone(self) ? [] : [self.value];
|
|
|
3994
3996
|
* @category filtering
|
|
3995
3997
|
* @since 2.0.0
|
|
3996
3998
|
*/
|
|
3997
|
-
const filter$
|
|
3999
|
+
const filter$3 = /*#__PURE__*/ dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none());
|
|
3998
4000
|
/**
|
|
3999
4001
|
* Lifts a `Predicate` or `Refinement` into the `Option` context: returns
|
|
4000
4002
|
* `Some(value)` when the predicate holds, `None` otherwise.
|
|
@@ -4166,7 +4168,7 @@ const ServiceProto = {
|
|
|
4166
4168
|
};
|
|
4167
4169
|
const cacheKeys = /*#__PURE__*/ new Set();
|
|
4168
4170
|
const ReferenceTypeId = "~effect/Context/Reference";
|
|
4169
|
-
const TypeId$
|
|
4171
|
+
const TypeId$44 = "~effect/Context";
|
|
4170
4172
|
const MaxDepth = 8;
|
|
4171
4173
|
const FlattenAfterBaseHits = 8;
|
|
4172
4174
|
const makeImpl$1 = (cacheRoot, base, overlay, depth) => {
|
|
@@ -4246,7 +4248,7 @@ const Proto$11 = {
|
|
|
4246
4248
|
return flatten$2(this);
|
|
4247
4249
|
},
|
|
4248
4250
|
...PipeInspectableProto,
|
|
4249
|
-
[TypeId$
|
|
4251
|
+
[TypeId$44]: { _Services: (_) => _ },
|
|
4250
4252
|
toJSON() {
|
|
4251
4253
|
return {
|
|
4252
4254
|
_id: "Context",
|
|
@@ -4265,7 +4267,7 @@ const Proto$11 = {
|
|
|
4265
4267
|
return true;
|
|
4266
4268
|
},
|
|
4267
4269
|
[symbol$2]() {
|
|
4268
|
-
return number$
|
|
4270
|
+
return number$3(this.mapUnsafe.size);
|
|
4269
4271
|
}
|
|
4270
4272
|
};
|
|
4271
4273
|
/** @internal */
|
|
@@ -4301,7 +4303,7 @@ const hasSameCache = (self, that) => self.cacheRoot === that.cacheRoot;
|
|
|
4301
4303
|
* @category guards
|
|
4302
4304
|
* @since 2.0.0
|
|
4303
4305
|
*/
|
|
4304
|
-
const isContext = (u) => hasProperty(u, TypeId$
|
|
4306
|
+
const isContext = (u) => hasProperty(u, TypeId$44);
|
|
4305
4307
|
/**
|
|
4306
4308
|
* Checks whether the provided argument is a `Reference`.
|
|
4307
4309
|
*
|
|
@@ -4879,6 +4881,36 @@ const isFailure$1 = isFailure$2;
|
|
|
4879
4881
|
*/
|
|
4880
4882
|
const isSuccess$1 = isSuccess$2;
|
|
4881
4883
|
/**
|
|
4884
|
+
* Extracts the success value as an `Option`, discarding the failure.
|
|
4885
|
+
*
|
|
4886
|
+
* **When to use**
|
|
4887
|
+
*
|
|
4888
|
+
* Use when you need to extract the success value from a `Result` as an
|
|
4889
|
+
* `Option` and discard failure information.
|
|
4890
|
+
*
|
|
4891
|
+
* **Details**
|
|
4892
|
+
*
|
|
4893
|
+
* - `Success<A>` becomes `Some<A>`
|
|
4894
|
+
* - `Failure<E>` becomes `None`
|
|
4895
|
+
*
|
|
4896
|
+
* **Example** (Extracting the success as an Option)
|
|
4897
|
+
*
|
|
4898
|
+
* ```ts import.meta.vitest
|
|
4899
|
+
* import { Option, Result } from "effect"
|
|
4900
|
+
*
|
|
4901
|
+
* Result.getSuccess(Result.succeed("ok")) // => Option.some("ok")
|
|
4902
|
+
*
|
|
4903
|
+
* Result.getSuccess(Result.fail("err")) // => Option.none()
|
|
4904
|
+
* ```
|
|
4905
|
+
*
|
|
4906
|
+
* @see {@link getFailure} to extract the error instead
|
|
4907
|
+
* @see {@link fromOption} for the reverse conversion
|
|
4908
|
+
*
|
|
4909
|
+
* @category getters
|
|
4910
|
+
* @since 4.0.0
|
|
4911
|
+
*/
|
|
4912
|
+
const getSuccess = getSuccess$1;
|
|
4913
|
+
/**
|
|
4882
4914
|
* Transforms the failure channel of a `Result`, leaving the success channel unchanged.
|
|
4883
4915
|
*
|
|
4884
4916
|
* **When to use**
|
|
@@ -5163,7 +5195,7 @@ const has$4 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key));
|
|
|
5163
5195
|
* @category filtering
|
|
5164
5196
|
* @since 2.0.0
|
|
5165
5197
|
*/
|
|
5166
|
-
const filter$
|
|
5198
|
+
const filter$2 = /*#__PURE__*/ dual(2, (self, predicate) => {
|
|
5167
5199
|
const out = empty$10();
|
|
5168
5200
|
for (const key of keys$3(self)) if (predicate(self[key], key)) assignProperty$1(out, key, self[key]);
|
|
5169
5201
|
return out;
|
|
@@ -5355,6 +5387,39 @@ const Array$1 = globalThis.Array;
|
|
|
5355
5387
|
*/
|
|
5356
5388
|
const allocate$1 = (n) => new Array$1(n);
|
|
5357
5389
|
/**
|
|
5390
|
+
* Creates a `NonEmptyArray` of length `n` where element `i` is computed by `f(i)`.
|
|
5391
|
+
*
|
|
5392
|
+
* **When to use**
|
|
5393
|
+
*
|
|
5394
|
+
* Use when you need to compute each array element from its index.
|
|
5395
|
+
*
|
|
5396
|
+
* **Details**
|
|
5397
|
+
*
|
|
5398
|
+
* `n` is normalized to an integer greater than or equal to 1, so this function
|
|
5399
|
+
* always returns at least one element. Supports both data-first and data-last
|
|
5400
|
+
* usage.
|
|
5401
|
+
*
|
|
5402
|
+
* **Example** (Generating values from indices)
|
|
5403
|
+
*
|
|
5404
|
+
* ```ts import.meta.vitest
|
|
5405
|
+
* import { Array } from "effect"
|
|
5406
|
+
*
|
|
5407
|
+
* Array.makeBy(5, (n) => n * 2) // => [0, 2, 4, 6, 8]
|
|
5408
|
+
* ```
|
|
5409
|
+
*
|
|
5410
|
+
* @see {@link range} — create a range of integers
|
|
5411
|
+
* @see {@link replicate} — repeat a single value
|
|
5412
|
+
*
|
|
5413
|
+
* @category constructors
|
|
5414
|
+
* @since 2.0.0
|
|
5415
|
+
*/
|
|
5416
|
+
const makeBy = /*#__PURE__*/ dual(2, (n, f) => {
|
|
5417
|
+
const max = Math.max(1, Math.floor(n));
|
|
5418
|
+
const out = new Array$1(max);
|
|
5419
|
+
for (let i = 0; i < max; i++) out[i] = f(i);
|
|
5420
|
+
return out;
|
|
5421
|
+
});
|
|
5422
|
+
/**
|
|
5358
5423
|
* Converts an `Iterable` to an `Array`.
|
|
5359
5424
|
*
|
|
5360
5425
|
* **When to use**
|
|
@@ -5763,6 +5828,37 @@ const findLast = /*#__PURE__*/ dual(2, (self, f) => {
|
|
|
5763
5828
|
}
|
|
5764
5829
|
return none();
|
|
5765
5830
|
});
|
|
5831
|
+
/**
|
|
5832
|
+
* Sorts an array by the given `Order`, returning a new array.
|
|
5833
|
+
*
|
|
5834
|
+
* **When to use**
|
|
5835
|
+
*
|
|
5836
|
+
* Use to sort an array using a single `Order` comparator.
|
|
5837
|
+
*
|
|
5838
|
+
* **Details**
|
|
5839
|
+
*
|
|
5840
|
+
* Preserves `NonEmptyArray` in the return type. Use `sortWith` to sort by a
|
|
5841
|
+
* derived key, or `sortBy` for multi-key sorting.
|
|
5842
|
+
*
|
|
5843
|
+
* **Example** (Sorting numbers)
|
|
5844
|
+
*
|
|
5845
|
+
* ```ts import.meta.vitest
|
|
5846
|
+
* import { Array, Order } from "effect"
|
|
5847
|
+
*
|
|
5848
|
+
* Array.sort([3, 1, 4, 1, 5], Order.Number) // => [1, 1, 3, 4, 5]
|
|
5849
|
+
* ```
|
|
5850
|
+
*
|
|
5851
|
+
* @see {@link sortWith} — sort by a mapping function
|
|
5852
|
+
* @see {@link sortBy} — sort by multiple orders
|
|
5853
|
+
*
|
|
5854
|
+
* @category sorting
|
|
5855
|
+
* @since 2.0.0
|
|
5856
|
+
*/
|
|
5857
|
+
const sort = /*#__PURE__*/ dual(2, (self, O) => {
|
|
5858
|
+
const out = Array$1.from(self);
|
|
5859
|
+
out.sort(O);
|
|
5860
|
+
return out;
|
|
5861
|
+
});
|
|
5766
5862
|
const hashBucketsAdd = (buckets, value) => {
|
|
5767
5863
|
const hash$7 = hash(value);
|
|
5768
5864
|
const bucket = buckets.get(hash$7);
|
|
@@ -5866,6 +5962,39 @@ const of = (a) => [a];
|
|
|
5866
5962
|
*/
|
|
5867
5963
|
const map$10 = /*#__PURE__*/ dual(2, (self, f) => self.map(f));
|
|
5868
5964
|
/**
|
|
5965
|
+
* Keeps only elements satisfying a predicate (or refinement).
|
|
5966
|
+
*
|
|
5967
|
+
* **When to use**
|
|
5968
|
+
*
|
|
5969
|
+
* Use to filter an iterable into a new array of original elements that satisfy
|
|
5970
|
+
* a boolean predicate or refinement.
|
|
5971
|
+
*
|
|
5972
|
+
* **Details**
|
|
5973
|
+
*
|
|
5974
|
+
* The predicate receives `(element, index)`. Refinements are supported for type
|
|
5975
|
+
* narrowing.
|
|
5976
|
+
*
|
|
5977
|
+
* **Example** (Filtering even numbers)
|
|
5978
|
+
*
|
|
5979
|
+
* ```ts import.meta.vitest
|
|
5980
|
+
* import { Array } from "effect"
|
|
5981
|
+
*
|
|
5982
|
+
* Array.filter([1, 2, 3, 4], (x) => x % 2 === 0) // => [2, 4]
|
|
5983
|
+
* ```
|
|
5984
|
+
*
|
|
5985
|
+
* @see {@link partition} — split into matching and non-matching
|
|
5986
|
+
* @see {@link filterMap} for transforming while filtering
|
|
5987
|
+
*
|
|
5988
|
+
* @category filtering
|
|
5989
|
+
* @since 2.0.0
|
|
5990
|
+
*/
|
|
5991
|
+
const filter$1 = /*#__PURE__*/ dual(2, (self, predicate) => {
|
|
5992
|
+
const as = fromIterable$6(self);
|
|
5993
|
+
const out = [];
|
|
5994
|
+
for (let i = 0; i < as.length; i++) if (predicate(as[i], i)) out.push(as[i]);
|
|
5995
|
+
return out;
|
|
5996
|
+
});
|
|
5997
|
+
/**
|
|
5869
5998
|
* Folds an iterable from left to right into a single value.
|
|
5870
5999
|
*
|
|
5871
6000
|
* **When to use**
|
|
@@ -5924,8 +6053,8 @@ const dedupe = (self) => {
|
|
|
5924
6053
|
};
|
|
5925
6054
|
//#endregion
|
|
5926
6055
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Duration.js
|
|
5927
|
-
const TypeId$
|
|
5928
|
-
const bigint0$
|
|
6056
|
+
const TypeId$43 = "~effect/time/Duration";
|
|
6057
|
+
const bigint0$3 = /*#__PURE__*/ BigInt(0);
|
|
5929
6058
|
const bigint1 = /*#__PURE__*/ BigInt(1);
|
|
5930
6059
|
const bigint2 = /*#__PURE__*/ BigInt(2);
|
|
5931
6060
|
const bigint10$1 = /*#__PURE__*/ BigInt(10);
|
|
@@ -5942,7 +6071,7 @@ const parseNanos = (input, scale) => {
|
|
|
5942
6071
|
const fractional = input.slice(decimalIndex + 1);
|
|
5943
6072
|
const fractionalScale = bigint10$1 ** BigInt(fractional.length);
|
|
5944
6073
|
const scaled = (BigInt(input.slice(isNegative ? 1 : 0, decimalIndex)) * fractionalScale + BigInt(fractional)) * scale;
|
|
5945
|
-
const rounded = scaled / fractionalScale + (scaled % fractionalScale * bigint2 >= fractionalScale ? bigint1 : bigint0$
|
|
6074
|
+
const rounded = scaled / fractionalScale + (scaled % fractionalScale * bigint2 >= fractionalScale ? bigint1 : bigint0$3);
|
|
5946
6075
|
return isNegative ? -rounded : rounded;
|
|
5947
6076
|
};
|
|
5948
6077
|
const DURATION_REGEXP = /^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/;
|
|
@@ -6003,7 +6132,7 @@ const fromInputUnsafe = (input) => {
|
|
|
6003
6132
|
}
|
|
6004
6133
|
case "object": {
|
|
6005
6134
|
if (input === null) break;
|
|
6006
|
-
if (TypeId$
|
|
6135
|
+
if (TypeId$43 in input) return input;
|
|
6007
6136
|
if (Array.isArray(input)) {
|
|
6008
6137
|
if (input.length !== 2 || !input.every(isNumber)) return invalid(input);
|
|
6009
6138
|
if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero$1;
|
|
@@ -6035,12 +6164,12 @@ const zeroDurationValue = {
|
|
|
6035
6164
|
const infinityDurationValue = { _tag: "Infinity" };
|
|
6036
6165
|
const negativeInfinityDurationValue = { _tag: "NegativeInfinity" };
|
|
6037
6166
|
const DurationProto = {
|
|
6038
|
-
[TypeId$
|
|
6167
|
+
[TypeId$43]: TypeId$43,
|
|
6039
6168
|
[symbol$2]() {
|
|
6040
6169
|
switch (this.value._tag) {
|
|
6041
6170
|
case "Millis": {
|
|
6042
6171
|
const nanos = this.value.millis * 1e6;
|
|
6043
|
-
return Number.isFinite(nanos) ? hash(roundTiesAwayFromZero(nanos)) : number$
|
|
6172
|
+
return Number.isFinite(nanos) ? hash(roundTiesAwayFromZero(nanos)) : number$3(this.value.millis);
|
|
6044
6173
|
}
|
|
6045
6174
|
case "Nanos": return hash(this.value.nanos);
|
|
6046
6175
|
default: return structure(this.value);
|
|
@@ -6099,7 +6228,7 @@ const make$41 = (input) => {
|
|
|
6099
6228
|
_tag: "Millis",
|
|
6100
6229
|
millis: input
|
|
6101
6230
|
};
|
|
6102
|
-
} else if (input === bigint0$
|
|
6231
|
+
} else if (input === bigint0$3) duration.value = zeroDurationValue;
|
|
6103
6232
|
else duration.value = {
|
|
6104
6233
|
_tag: "Nanos",
|
|
6105
6234
|
nanos: input
|
|
@@ -6121,7 +6250,7 @@ const make$41 = (input) => {
|
|
|
6121
6250
|
* @category guards
|
|
6122
6251
|
* @since 2.0.0
|
|
6123
6252
|
*/
|
|
6124
|
-
const isDuration = (u) => hasProperty(u, TypeId$
|
|
6253
|
+
const isDuration = (u) => hasProperty(u, TypeId$43);
|
|
6125
6254
|
/**
|
|
6126
6255
|
* Checks whether a Duration is finite (not infinite).
|
|
6127
6256
|
*
|
|
@@ -6156,7 +6285,7 @@ const isFinite$2 = (self) => self.value._tag !== "Infinity" && self.value._tag !
|
|
|
6156
6285
|
const isZero$1 = (self) => {
|
|
6157
6286
|
switch (self.value._tag) {
|
|
6158
6287
|
case "Millis": return self.value.millis === 0;
|
|
6159
|
-
case "Nanos": return self.value.nanos === bigint0$
|
|
6288
|
+
case "Nanos": return self.value.nanos === bigint0$3;
|
|
6160
6289
|
case "Infinity":
|
|
6161
6290
|
case "NegativeInfinity": return false;
|
|
6162
6291
|
}
|
|
@@ -6180,7 +6309,7 @@ const isZero$1 = (self) => {
|
|
|
6180
6309
|
const isNegative$1 = (self) => {
|
|
6181
6310
|
switch (self.value._tag) {
|
|
6182
6311
|
case "Millis": return self.value.millis < 0;
|
|
6183
|
-
case "Nanos": return self.value.nanos < bigint0$
|
|
6312
|
+
case "Nanos": return self.value.nanos < bigint0$3;
|
|
6184
6313
|
case "NegativeInfinity": return true;
|
|
6185
6314
|
case "Infinity": return false;
|
|
6186
6315
|
}
|
|
@@ -6205,7 +6334,7 @@ const abs$1 = (self) => {
|
|
|
6205
6334
|
case "Infinity":
|
|
6206
6335
|
case "NegativeInfinity": return infinity;
|
|
6207
6336
|
case "Millis": return self.value.millis < 0 ? make$41(-self.value.millis) : self;
|
|
6208
|
-
case "Nanos": return self.value.nanos < bigint0$
|
|
6337
|
+
case "Nanos": return self.value.nanos < bigint0$3 ? make$41(-self.value.nanos) : self;
|
|
6209
6338
|
}
|
|
6210
6339
|
};
|
|
6211
6340
|
/**
|
|
@@ -6642,7 +6771,7 @@ const parts = (self) => {
|
|
|
6642
6771
|
nanos: -Infinity
|
|
6643
6772
|
};
|
|
6644
6773
|
const n = toNanosUnsafe(self);
|
|
6645
|
-
const neg = n < bigint0$
|
|
6774
|
+
const neg = n < bigint0$3;
|
|
6646
6775
|
const a = neg ? -n : n;
|
|
6647
6776
|
const ms = a / bigint1e6;
|
|
6648
6777
|
const sec = ms / bigint1e3;
|
|
@@ -9240,7 +9369,7 @@ var Latch = class {
|
|
|
9240
9369
|
};
|
|
9241
9370
|
/** @internal */
|
|
9242
9371
|
const makeLatchUnsafe = (open) => new Latch(open ?? false);
|
|
9243
|
-
const bigint0$
|
|
9372
|
+
const bigint0$2 = /*#__PURE__*/ BigInt(0);
|
|
9244
9373
|
const NoopSpanProto = {
|
|
9245
9374
|
_tag: "Span",
|
|
9246
9375
|
spanId: "noop",
|
|
@@ -9248,8 +9377,8 @@ const NoopSpanProto = {
|
|
|
9248
9377
|
sampled: false,
|
|
9249
9378
|
status: {
|
|
9250
9379
|
_tag: "Ended",
|
|
9251
|
-
startTime: bigint0$
|
|
9252
|
-
endTime: bigint0$
|
|
9380
|
+
startTime: bigint0$2,
|
|
9381
|
+
endTime: bigint0$2,
|
|
9253
9382
|
exit: exitVoid
|
|
9254
9383
|
},
|
|
9255
9384
|
attributes: /*#__PURE__*/ new Map(),
|
|
@@ -9318,7 +9447,7 @@ const provideSpanStackFrame = (name, stack) => {
|
|
|
9318
9447
|
/** @internal */
|
|
9319
9448
|
const endSpan = (span, exit, clock, timingEnabled) => sync$1(() => {
|
|
9320
9449
|
if (span.status._tag === "Ended") return;
|
|
9321
|
-
span.end(timingEnabled ? clock.currentTimeNanosUnsafe() : bigint0$
|
|
9450
|
+
span.end(timingEnabled ? clock.currentTimeNanosUnsafe() : bigint0$2, exit);
|
|
9322
9451
|
});
|
|
9323
9452
|
/** @internal */
|
|
9324
9453
|
const useSpan$1 = (name, ...args) => {
|
|
@@ -9491,7 +9620,7 @@ const logLevelToOrder = (level) => {
|
|
|
9491
9620
|
}
|
|
9492
9621
|
};
|
|
9493
9622
|
/** @internal */
|
|
9494
|
-
const isLogLevelGreaterThan = /*#__PURE__*/ isGreaterThan$1(/* @__PURE__ */ mapInput$
|
|
9623
|
+
const isLogLevelGreaterThan = /*#__PURE__*/ isGreaterThan$1(/* @__PURE__ */ mapInput$2(Number$5, logLevelToOrder));
|
|
9495
9624
|
/** @internal */
|
|
9496
9625
|
const CurrentLoggers$1 = /*#__PURE__*/ Reference("effect/Loggers/CurrentLoggers", { defaultValue: () => /* @__PURE__ */ new Set([defaultLogger, tracerLogger]) });
|
|
9497
9626
|
/** @internal */
|
|
@@ -11143,14 +11272,14 @@ const forkUnsafe = scopeForkUnsafe;
|
|
|
11143
11272
|
const close = scopeClose;
|
|
11144
11273
|
//#endregion
|
|
11145
11274
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Layer.js
|
|
11146
|
-
const TypeId$
|
|
11275
|
+
const TypeId$41 = "~effect/Layer";
|
|
11147
11276
|
const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
11148
11277
|
const memoMapReuse = (entry, scope) => {
|
|
11149
11278
|
entry.observers++;
|
|
11150
11279
|
return andThen$3(scopeAddFinalizerExit(scope, (exit) => entry.finalizer(exit)), entry.effect);
|
|
11151
11280
|
};
|
|
11152
11281
|
const LayerProto = {
|
|
11153
|
-
[TypeId$
|
|
11282
|
+
[TypeId$41]: {
|
|
11154
11283
|
_ROut: identity,
|
|
11155
11284
|
_E: identity,
|
|
11156
11285
|
_RIn: identity
|
|
@@ -12216,11 +12345,11 @@ const currentTimeMillis = currentTimeMillis$1;
|
|
|
12216
12345
|
//#endregion
|
|
12217
12346
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/dateTime.js
|
|
12218
12347
|
/** @internal */
|
|
12219
|
-
const TypeId$
|
|
12348
|
+
const TypeId$40 = "~effect/time/DateTime";
|
|
12220
12349
|
/** @internal */
|
|
12221
12350
|
const TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
|
|
12222
12351
|
const Proto$10 = {
|
|
12223
|
-
[TypeId$
|
|
12352
|
+
[TypeId$40]: TypeId$40,
|
|
12224
12353
|
pipe() {
|
|
12225
12354
|
return pipeArguments(this, arguments);
|
|
12226
12355
|
},
|
|
@@ -12235,7 +12364,7 @@ const ProtoUtc = {
|
|
|
12235
12364
|
...Proto$10,
|
|
12236
12365
|
_tag: "Utc",
|
|
12237
12366
|
[symbol$2]() {
|
|
12238
|
-
return number$
|
|
12367
|
+
return number$3(this.epochMilliseconds);
|
|
12239
12368
|
},
|
|
12240
12369
|
[symbol$1](that) {
|
|
12241
12370
|
return isDateTime$1(that) && that._tag === "Utc" && this.epochMilliseconds === that.epochMilliseconds;
|
|
@@ -12254,7 +12383,7 @@ const ProtoTimeZone = {
|
|
|
12254
12383
|
({ ...ProtoTimeZone });
|
|
12255
12384
|
({ ...ProtoTimeZone });
|
|
12256
12385
|
/** @internal */
|
|
12257
|
-
const isDateTime$1 = (u) => hasProperty(u, TypeId$
|
|
12386
|
+
const isDateTime$1 = (u) => hasProperty(u, TypeId$40);
|
|
12258
12387
|
const makeUtc = (epochMillis) => {
|
|
12259
12388
|
const self = Object.create(ProtoUtc);
|
|
12260
12389
|
self.epochMilliseconds = epochMillis;
|
|
@@ -12504,7 +12633,7 @@ const matchEffect$1 = /*#__PURE__*/ dual(2, (self, options) => matchCauseEffect$
|
|
|
12504
12633
|
}));
|
|
12505
12634
|
//#endregion
|
|
12506
12635
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schedule.js
|
|
12507
|
-
const TypeId$
|
|
12636
|
+
const TypeId$39 = "~effect/Schedule";
|
|
12508
12637
|
/**
|
|
12509
12638
|
* Context reference containing metadata for the currently running schedule step.
|
|
12510
12639
|
*
|
|
@@ -12529,7 +12658,7 @@ const CurrentMetadata = /*#__PURE__*/ Reference("effect/Schedule/CurrentMetadata
|
|
|
12529
12658
|
elapsedSincePrevious: 0
|
|
12530
12659
|
}) });
|
|
12531
12660
|
const ScheduleProto = {
|
|
12532
|
-
[TypeId$
|
|
12661
|
+
[TypeId$39]: {
|
|
12533
12662
|
_Out: identity,
|
|
12534
12663
|
_In: identity,
|
|
12535
12664
|
_Env: identity
|
|
@@ -12558,7 +12687,7 @@ const ScheduleProto = {
|
|
|
12558
12687
|
* @category guards
|
|
12559
12688
|
* @since 2.0.0
|
|
12560
12689
|
*/
|
|
12561
|
-
const isSchedule = (u) => hasProperty(u, TypeId$
|
|
12690
|
+
const isSchedule = (u) => hasProperty(u, TypeId$39);
|
|
12562
12691
|
/**
|
|
12563
12692
|
* Creates a Schedule from a step function that returns a Pull.
|
|
12564
12693
|
*
|
|
@@ -12987,6 +13116,52 @@ const buildFromOptions = (options) => {
|
|
|
12987
13116
|
return schedule;
|
|
12988
13117
|
};
|
|
12989
13118
|
/**
|
|
13119
|
+
* Context reference for metric attributes applied from the current Effect
|
|
13120
|
+
* context.
|
|
13121
|
+
*
|
|
13122
|
+
* **When to use**
|
|
13123
|
+
*
|
|
13124
|
+
* Use to provide default attributes that should be merged into metric updates
|
|
13125
|
+
* and reads in a scoped part of a program.
|
|
13126
|
+
*
|
|
13127
|
+
* **Details**
|
|
13128
|
+
*
|
|
13129
|
+
* The default value is an empty attribute set. Metric reads and updates merge
|
|
13130
|
+
* these contextual attributes with the metric's own attributes to select the
|
|
13131
|
+
* metric series being accessed.
|
|
13132
|
+
*
|
|
13133
|
+
* **Example** (Providing current metric attributes)
|
|
13134
|
+
*
|
|
13135
|
+
* ```ts import.meta.vitest
|
|
13136
|
+
* import { Effect, Metric } from "effect"
|
|
13137
|
+
*
|
|
13138
|
+
* const program = Effect.gen(function*() {
|
|
13139
|
+
* // Access current metric attributes
|
|
13140
|
+
* yield* Metric.CurrentMetricAttributes
|
|
13141
|
+
*
|
|
13142
|
+
* // Set new attributes context
|
|
13143
|
+
* const newAttributes = { service: "api", version: "1.0" }
|
|
13144
|
+
* const result = yield* Effect.provideService(
|
|
13145
|
+
* Effect.gen(function*() {
|
|
13146
|
+
* const updatedAttributes = yield* Metric.CurrentMetricAttributes
|
|
13147
|
+
* return updatedAttributes
|
|
13148
|
+
* }),
|
|
13149
|
+
* Metric.CurrentMetricAttributes,
|
|
13150
|
+
* newAttributes
|
|
13151
|
+
* )
|
|
13152
|
+
*
|
|
13153
|
+
* return result
|
|
13154
|
+
* })
|
|
13155
|
+
*
|
|
13156
|
+
* const attributes = await Effect.runPromise(program)
|
|
13157
|
+
* const actual = attributes // => { service: "api", version: "1.0" }
|
|
13158
|
+
* ```
|
|
13159
|
+
*
|
|
13160
|
+
* @category services
|
|
13161
|
+
* @since 4.0.0
|
|
13162
|
+
*/
|
|
13163
|
+
const CurrentMetricAttributes = /*#__PURE__*/ Reference("effect/Metric/CurrentMetricAttributes", { defaultValue: () => ({}) });
|
|
13164
|
+
/**
|
|
12990
13165
|
* Context reference for the metric registry in the current context.
|
|
12991
13166
|
*
|
|
12992
13167
|
* **When to use**
|
|
@@ -13013,6 +13188,360 @@ const buildFromOptions = (options) => {
|
|
|
13013
13188
|
* @since 4.0.0
|
|
13014
13189
|
*/
|
|
13015
13190
|
const MetricRegistry = /*#__PURE__*/ Reference("~effect/observability/Metric/MetricRegistryKey", { defaultValue: () => /* @__PURE__ */ new Map() });
|
|
13191
|
+
const TypeId$38 = "~effect/observability/Metric";
|
|
13192
|
+
var Metric$ = class {
|
|
13193
|
+
[TypeId$38] = TypeId$38;
|
|
13194
|
+
#metadataCache = /*#__PURE__*/ new WeakMap();
|
|
13195
|
+
#metadata;
|
|
13196
|
+
id;
|
|
13197
|
+
description;
|
|
13198
|
+
attributes;
|
|
13199
|
+
constructor(id, description, attributes) {
|
|
13200
|
+
this.id = id;
|
|
13201
|
+
this.description = description;
|
|
13202
|
+
this.attributes = attributes;
|
|
13203
|
+
}
|
|
13204
|
+
valueUnsafe(context) {
|
|
13205
|
+
return this.hook(context).get(context);
|
|
13206
|
+
}
|
|
13207
|
+
modifyUnsafe(input, context) {
|
|
13208
|
+
return this.hook(context).modify(input, context);
|
|
13209
|
+
}
|
|
13210
|
+
updateUnsafe(input, context) {
|
|
13211
|
+
return this.hook(context).update(input, context);
|
|
13212
|
+
}
|
|
13213
|
+
hook(context) {
|
|
13214
|
+
const extraAttributes = get$9(context, CurrentMetricAttributes);
|
|
13215
|
+
if (Object.keys(extraAttributes).length === 0) {
|
|
13216
|
+
if (isNotUndefined(this.#metadata)) return this.#metadata.hooks;
|
|
13217
|
+
this.#metadata = this.getOrCreate(context, this.attributes);
|
|
13218
|
+
return this.#metadata.hooks;
|
|
13219
|
+
}
|
|
13220
|
+
const mergedAttributes = mergeAttributes(this.attributes, extraAttributes);
|
|
13221
|
+
let metadata = this.#metadataCache.get(mergedAttributes);
|
|
13222
|
+
if (isNotUndefined(metadata)) return metadata.hooks;
|
|
13223
|
+
metadata = this.getOrCreate(context, mergedAttributes);
|
|
13224
|
+
this.#metadataCache.set(mergedAttributes, metadata);
|
|
13225
|
+
return metadata.hooks;
|
|
13226
|
+
}
|
|
13227
|
+
getOrCreate(context, attributes) {
|
|
13228
|
+
const key = makeKey(this, attributes);
|
|
13229
|
+
const registry = get$9(context, MetricRegistry);
|
|
13230
|
+
if (registry.has(key)) return registry.get(key);
|
|
13231
|
+
const hooks = this.createHooks();
|
|
13232
|
+
const meta = {
|
|
13233
|
+
id: this.id,
|
|
13234
|
+
type: this.type,
|
|
13235
|
+
description: this.description,
|
|
13236
|
+
attributes: attributesToRecord(attributes),
|
|
13237
|
+
hooks
|
|
13238
|
+
};
|
|
13239
|
+
registry.set(key, meta);
|
|
13240
|
+
return meta;
|
|
13241
|
+
}
|
|
13242
|
+
pipe() {
|
|
13243
|
+
return pipeArguments(this, arguments);
|
|
13244
|
+
}
|
|
13245
|
+
};
|
|
13246
|
+
const bigint0$1 = /*#__PURE__*/ BigInt(0);
|
|
13247
|
+
var CounterMetric = class extends Metric$ {
|
|
13248
|
+
type = "Counter";
|
|
13249
|
+
#bigint;
|
|
13250
|
+
#incremental;
|
|
13251
|
+
constructor(id, options) {
|
|
13252
|
+
super(id, options?.description, attributesToRecord(options?.attributes));
|
|
13253
|
+
this.#bigint = options?.bigint ?? false;
|
|
13254
|
+
this.#incremental = options?.incremental ?? false;
|
|
13255
|
+
}
|
|
13256
|
+
createHooks() {
|
|
13257
|
+
let count = this.#bigint ? bigint0$1 : 0;
|
|
13258
|
+
const canUpdate = this.#incremental ? this.#bigint ? (value) => value >= bigint0$1 : (value) => value >= 0 : (_value) => true;
|
|
13259
|
+
const update = (value) => {
|
|
13260
|
+
if (canUpdate(value)) count = count + value;
|
|
13261
|
+
};
|
|
13262
|
+
return makeHooks(() => ({
|
|
13263
|
+
count,
|
|
13264
|
+
incremental: this.#incremental
|
|
13265
|
+
}), update);
|
|
13266
|
+
}
|
|
13267
|
+
};
|
|
13268
|
+
var HistogramMetric = class extends Metric$ {
|
|
13269
|
+
type = "Histogram";
|
|
13270
|
+
#boundaries;
|
|
13271
|
+
constructor(id, options) {
|
|
13272
|
+
super(id, options?.description, attributesToRecord(options?.attributes));
|
|
13273
|
+
this.#boundaries = options.boundaries;
|
|
13274
|
+
}
|
|
13275
|
+
createHooks() {
|
|
13276
|
+
const bounds = this.#boundaries;
|
|
13277
|
+
const size = bounds.length;
|
|
13278
|
+
const values = new Uint32Array(size + 1);
|
|
13279
|
+
const boundaries = new Float64Array(size);
|
|
13280
|
+
let count = 0;
|
|
13281
|
+
let sum = 0;
|
|
13282
|
+
let min = Number.MAX_VALUE;
|
|
13283
|
+
let max = -Number.MAX_VALUE;
|
|
13284
|
+
map$10(sort(bounds, Number$5), (n, i) => {
|
|
13285
|
+
boundaries[i] = n;
|
|
13286
|
+
});
|
|
13287
|
+
const update = (value) => {
|
|
13288
|
+
let from = 0;
|
|
13289
|
+
let to = size;
|
|
13290
|
+
while (from !== to) {
|
|
13291
|
+
const mid = Math.floor(from + (to - from) / 2);
|
|
13292
|
+
if (value <= boundaries[mid]) to = mid;
|
|
13293
|
+
else from = mid;
|
|
13294
|
+
if (to === from + 1) {
|
|
13295
|
+
if (value <= boundaries[from]) to = from;
|
|
13296
|
+
else from = to;
|
|
13297
|
+
}
|
|
13298
|
+
}
|
|
13299
|
+
values[from] = values[from] + 1;
|
|
13300
|
+
count = count + 1;
|
|
13301
|
+
sum = sum + value;
|
|
13302
|
+
if (value < min) min = value;
|
|
13303
|
+
if (value > max) max = value;
|
|
13304
|
+
};
|
|
13305
|
+
const getBuckets = () => {
|
|
13306
|
+
const builder = allocate$1(size);
|
|
13307
|
+
let cumulated = 0;
|
|
13308
|
+
for (let i = 0; i < size; i++) {
|
|
13309
|
+
const boundary = boundaries[i];
|
|
13310
|
+
const value = values[i];
|
|
13311
|
+
cumulated = cumulated + value;
|
|
13312
|
+
builder[i] = [boundary, cumulated];
|
|
13313
|
+
}
|
|
13314
|
+
return builder;
|
|
13315
|
+
};
|
|
13316
|
+
return makeHooks(() => ({
|
|
13317
|
+
buckets: getBuckets(),
|
|
13318
|
+
count,
|
|
13319
|
+
min,
|
|
13320
|
+
max,
|
|
13321
|
+
sum
|
|
13322
|
+
}), update);
|
|
13323
|
+
}
|
|
13324
|
+
};
|
|
13325
|
+
var MetricTransform = class extends Metric$ {
|
|
13326
|
+
type;
|
|
13327
|
+
metric;
|
|
13328
|
+
valueUnsafe;
|
|
13329
|
+
updateUnsafe;
|
|
13330
|
+
modifyUnsafe;
|
|
13331
|
+
constructor(metric, valueUnsafe, updateUnsafe, modifyUnsafe) {
|
|
13332
|
+
super(metric.id, metric.description, metric.attributes);
|
|
13333
|
+
this.metric = metric;
|
|
13334
|
+
this.valueUnsafe = valueUnsafe;
|
|
13335
|
+
this.updateUnsafe = updateUnsafe;
|
|
13336
|
+
this.modifyUnsafe = modifyUnsafe;
|
|
13337
|
+
this.type = metric.type;
|
|
13338
|
+
}
|
|
13339
|
+
createHooks() {
|
|
13340
|
+
return this.metric.createHooks();
|
|
13341
|
+
}
|
|
13342
|
+
};
|
|
13343
|
+
/**
|
|
13344
|
+
* Represents a Counter metric that tracks cumulative numerical values over
|
|
13345
|
+
* time. Counters can be incremented and decremented and provide a running total
|
|
13346
|
+
* of changes.
|
|
13347
|
+
*
|
|
13348
|
+
* **Details**
|
|
13349
|
+
*
|
|
13350
|
+
* The optional `description` describes the counter, and `attributes` attach
|
|
13351
|
+
* dimensions to it. Set `bigint` to create a counter that accepts `bigint`
|
|
13352
|
+
* inputs. Set `incremental` to `true` to create a counter that can only ever be
|
|
13353
|
+
* incremented.
|
|
13354
|
+
*
|
|
13355
|
+
* **Example** (Creating counter metrics)
|
|
13356
|
+
*
|
|
13357
|
+
* ```ts import.meta.vitest
|
|
13358
|
+
* import { Effect, Metric } from "effect"
|
|
13359
|
+
*
|
|
13360
|
+
* const program = Effect.gen(function*() {
|
|
13361
|
+
* // Create a basic counter for tracking requests
|
|
13362
|
+
* const requestCounter = Metric.counter("http_requests_total", {
|
|
13363
|
+
* description: "Total number of HTTP requests processed"
|
|
13364
|
+
* })
|
|
13365
|
+
*
|
|
13366
|
+
* // Create an incremental-only counter for events
|
|
13367
|
+
* const eventCounter = Metric.counter("events_processed", {
|
|
13368
|
+
* description: "Events processed (increment only)",
|
|
13369
|
+
* incremental: true
|
|
13370
|
+
* })
|
|
13371
|
+
*
|
|
13372
|
+
* // Create a bigint counter for large values
|
|
13373
|
+
* const bytesCounter = Metric.counter("bytes_transferred", {
|
|
13374
|
+
* description: "Total bytes transferred",
|
|
13375
|
+
* bigint: true,
|
|
13376
|
+
* attributes: { service: "file-transfer" }
|
|
13377
|
+
* })
|
|
13378
|
+
*
|
|
13379
|
+
* // Update counters with values
|
|
13380
|
+
* yield* Metric.update(requestCounter, 1) // Increment by 1
|
|
13381
|
+
* yield* Metric.update(requestCounter, 5) // Increment by 5 (total: 6)
|
|
13382
|
+
* yield* Metric.update(eventCounter, 1) // Increment by 1
|
|
13383
|
+
* yield* Metric.update(bytesCounter, 1024n) // Add 1024 bytes
|
|
13384
|
+
*
|
|
13385
|
+
* // Get current counter values
|
|
13386
|
+
* const requestValue = yield* Metric.value(requestCounter)
|
|
13387
|
+
* const eventValue = yield* Metric.value(eventCounter)
|
|
13388
|
+
* const bytesValue = yield* Metric.value(bytesCounter)
|
|
13389
|
+
*
|
|
13390
|
+
* return { requestValue, eventValue, bytesValue }
|
|
13391
|
+
* })
|
|
13392
|
+
*
|
|
13393
|
+
* const result = await Effect.runPromise(Effect.provideService(program, Metric.MetricRegistry, new Map()))
|
|
13394
|
+
* const counts = [result.requestValue.count, result.eventValue.count, result.bytesValue.count] // => [6, 1, 1024n]
|
|
13395
|
+
* ```
|
|
13396
|
+
*
|
|
13397
|
+
* @category constructors
|
|
13398
|
+
* @since 2.0.0
|
|
13399
|
+
*/
|
|
13400
|
+
const counter = (name, options) => new CounterMetric(name, options);
|
|
13401
|
+
/**
|
|
13402
|
+
* Creates a timer metric, based on a `Histogram`, which keeps track of
|
|
13403
|
+
* durations in milliseconds.
|
|
13404
|
+
*
|
|
13405
|
+
* **Details**
|
|
13406
|
+
*
|
|
13407
|
+
* The unit of time will automatically be added to the metric as a tag (i.e.
|
|
13408
|
+
* `"time_unit: milliseconds"`).
|
|
13409
|
+
*
|
|
13410
|
+
* If `options.boundaries` is not provided, the boundaries will be computed
|
|
13411
|
+
* using `Metric.exponentialBoundaries({ start: 0.5, factor: 2, count: 35 })`.
|
|
13412
|
+
*
|
|
13413
|
+
* **Example** (Recording durations with a timer)
|
|
13414
|
+
*
|
|
13415
|
+
* ```ts import.meta.vitest
|
|
13416
|
+
* import { Duration, Effect, Metric } from "effect"
|
|
13417
|
+
*
|
|
13418
|
+
* // Create a timer metric to track API request durations
|
|
13419
|
+
* const apiRequestTimer = Metric.timer("api_request_duration", {
|
|
13420
|
+
* description: "Duration of API requests",
|
|
13421
|
+
* attributes: { service: "user-api" }
|
|
13422
|
+
* })
|
|
13423
|
+
*
|
|
13424
|
+
* // Record a measured API operation duration
|
|
13425
|
+
* const apiOperation = Effect.gen(function*() {
|
|
13426
|
+
* const duration = Duration.millis(120)
|
|
13427
|
+
* yield* Metric.update(apiRequestTimer, duration)
|
|
13428
|
+
*
|
|
13429
|
+
* const state = yield* Metric.value(apiRequestTimer)
|
|
13430
|
+
* return {
|
|
13431
|
+
* count: state.count,
|
|
13432
|
+
* min: state.min,
|
|
13433
|
+
* max: state.max,
|
|
13434
|
+
* sum: state.sum
|
|
13435
|
+
* }
|
|
13436
|
+
* })
|
|
13437
|
+
*
|
|
13438
|
+
* await Effect.runPromise(
|
|
13439
|
+
* Effect.provideService(apiOperation, Metric.MetricRegistry, new Map())
|
|
13440
|
+
* ) // => { count: 1, min: 120, max: 120, sum: 120 }
|
|
13441
|
+
* ```
|
|
13442
|
+
*
|
|
13443
|
+
* @category constructors
|
|
13444
|
+
* @since 2.0.0
|
|
13445
|
+
*/
|
|
13446
|
+
const timer = (name, options) => {
|
|
13447
|
+
const boundaries = isNotUndefined(options?.boundaries) ? options.boundaries : exponentialBoundaries({
|
|
13448
|
+
start: .5,
|
|
13449
|
+
factor: 2,
|
|
13450
|
+
count: 35
|
|
13451
|
+
});
|
|
13452
|
+
const attributes = mergeAttributes(options?.attributes, { time_unit: "milliseconds" });
|
|
13453
|
+
const metric = new HistogramMetric(name, {
|
|
13454
|
+
...options,
|
|
13455
|
+
boundaries,
|
|
13456
|
+
attributes
|
|
13457
|
+
});
|
|
13458
|
+
return mapInput$1(metric, toMillis);
|
|
13459
|
+
};
|
|
13460
|
+
/**
|
|
13461
|
+
* Updates the metric with the specified input.
|
|
13462
|
+
*
|
|
13463
|
+
* **Details**
|
|
13464
|
+
*
|
|
13465
|
+
* The behavior of `update` depends on the metric type. Counters add the input
|
|
13466
|
+
* value to the current count, gauges replace the current value with the input
|
|
13467
|
+
* value, frequencies increment the occurrence count for the input string,
|
|
13468
|
+
* histograms record the input value in the appropriate bucket, and summaries
|
|
13469
|
+
* record the input value as a new observation.
|
|
13470
|
+
*
|
|
13471
|
+
* **Example** (Updating metric values)
|
|
13472
|
+
*
|
|
13473
|
+
* ```ts import.meta.vitest
|
|
13474
|
+
* import { Effect, Metric } from "effect"
|
|
13475
|
+
*
|
|
13476
|
+
* const cpuUsage = Metric.gauge("cpu_usage_percent")
|
|
13477
|
+
* const httpStatus = Metric.frequency("http_status_codes")
|
|
13478
|
+
* const responseTime = Metric.histogram("response_time_ms", {
|
|
13479
|
+
* boundaries: [100, 500, 1000, 2000]
|
|
13480
|
+
* })
|
|
13481
|
+
*
|
|
13482
|
+
* const program = Effect.gen(function*() {
|
|
13483
|
+
* // Update gauge to specific values
|
|
13484
|
+
* yield* Metric.update(cpuUsage, 45.2)
|
|
13485
|
+
* yield* Metric.update(cpuUsage, 67.8) // Replaces previous value
|
|
13486
|
+
*
|
|
13487
|
+
* // Track HTTP status code occurrences
|
|
13488
|
+
* yield* Metric.update(httpStatus, "200")
|
|
13489
|
+
* yield* Metric.update(httpStatus, "404")
|
|
13490
|
+
* yield* Metric.update(httpStatus, "200") // Increments 200 count
|
|
13491
|
+
*
|
|
13492
|
+
* // Record response times
|
|
13493
|
+
* yield* Metric.update(responseTime, 250)
|
|
13494
|
+
* yield* Metric.update(responseTime, 750)
|
|
13495
|
+
* yield* Metric.update(responseTime, 1500)
|
|
13496
|
+
*
|
|
13497
|
+
* // Check current states
|
|
13498
|
+
* const cpu = yield* Metric.value(cpuUsage)
|
|
13499
|
+
* const statuses = yield* Metric.value(httpStatus)
|
|
13500
|
+
* const times = yield* Metric.value(responseTime)
|
|
13501
|
+
* return [cpu.value, statuses.occurrences.get("200"), times.count] as const
|
|
13502
|
+
* })
|
|
13503
|
+
*
|
|
13504
|
+
* await Effect.runPromise(Effect.provideService(program, Metric.MetricRegistry, new Map())) // => [67.8, 2, 3]
|
|
13505
|
+
* ```
|
|
13506
|
+
*
|
|
13507
|
+
* @category mutations
|
|
13508
|
+
* @since 2.0.0
|
|
13509
|
+
*/
|
|
13510
|
+
const update = /*#__PURE__*/ dual(2, (self, input) => contextWith$1((services) => sync$1(() => self.updateUnsafe(input, services))));
|
|
13511
|
+
/**
|
|
13512
|
+
* Returns a new metric that is powered by this one, but which accepts updates
|
|
13513
|
+
* of the specified new type, which must be transformable to the input type of
|
|
13514
|
+
* this metric.
|
|
13515
|
+
*
|
|
13516
|
+
* **Example** (Mapping metric inputs)
|
|
13517
|
+
*
|
|
13518
|
+
* ```ts import.meta.vitest
|
|
13519
|
+
* import { Effect, Metric } from "effect"
|
|
13520
|
+
*
|
|
13521
|
+
* const durationHistogram = Metric.histogram("request_duration_ms", {
|
|
13522
|
+
* description: "Request duration in milliseconds",
|
|
13523
|
+
* boundaries: Metric.linearBoundaries({ start: 0, width: 100, count: 10 })
|
|
13524
|
+
* })
|
|
13525
|
+
*
|
|
13526
|
+
* // Accept duration strings while recording numeric milliseconds
|
|
13527
|
+
* const durationStringHistogram = Metric.mapInput(
|
|
13528
|
+
* durationHistogram,
|
|
13529
|
+
* (input: string) => Number(input)
|
|
13530
|
+
* )
|
|
13531
|
+
*
|
|
13532
|
+
* const program = Effect.gen(function*() {
|
|
13533
|
+
* yield* Metric.update(durationStringHistogram, "250")
|
|
13534
|
+
* return yield* Metric.value(durationStringHistogram)
|
|
13535
|
+
* })
|
|
13536
|
+
*
|
|
13537
|
+
* const value = await Effect.runPromise(Effect.provideService(program, Metric.MetricRegistry, new Map()))
|
|
13538
|
+
* const values = [value.count, value.sum] // => [1, 250]
|
|
13539
|
+
* ```
|
|
13540
|
+
*
|
|
13541
|
+
* @category annotations
|
|
13542
|
+
* @since 2.0.0
|
|
13543
|
+
*/
|
|
13544
|
+
const mapInput$1 = /*#__PURE__*/ dual(2, (self, f) => new MetricTransform(self, (context) => self.valueUnsafe(context), (input, context) => self.updateUnsafe(f(input, context), context), (input, context) => self.modifyUnsafe(f(input, context), context)));
|
|
13016
13545
|
/**
|
|
13017
13546
|
* Captures a snapshot of all registered metrics synchronously using the provided
|
|
13018
13547
|
* service context.
|
|
@@ -13053,6 +13582,76 @@ const snapshotUnsafe = (context) => {
|
|
|
13053
13582
|
state: hooks.get(context)
|
|
13054
13583
|
}));
|
|
13055
13584
|
};
|
|
13585
|
+
/**
|
|
13586
|
+
* Creates histogram bucket boundaries from an iterable set of values.
|
|
13587
|
+
*
|
|
13588
|
+
* **Details**
|
|
13589
|
+
*
|
|
13590
|
+
* Processes any iterable of numbers by removing duplicates, filtering out
|
|
13591
|
+
* non-positive values, and automatically appending positive infinity as the
|
|
13592
|
+
* final boundary.
|
|
13593
|
+
*
|
|
13594
|
+
* **Example** (Creating boundaries from values)
|
|
13595
|
+
*
|
|
13596
|
+
* ```ts import.meta.vitest
|
|
13597
|
+
* import { Metric } from "effect"
|
|
13598
|
+
*
|
|
13599
|
+
* Metric.boundariesFromIterable([-5, 0, 10, 10, 25, 50]) // => [10, 25, 50, Infinity]
|
|
13600
|
+
* ```
|
|
13601
|
+
*
|
|
13602
|
+
* @category constructors
|
|
13603
|
+
* @since 4.0.0
|
|
13604
|
+
*/
|
|
13605
|
+
const boundariesFromIterable = (iterable) => append$1(filter$1(new Set(iterable), (n) => n > 0), Number.POSITIVE_INFINITY);
|
|
13606
|
+
/**
|
|
13607
|
+
* Creates histogram bucket boundaries with exponentially increasing values.
|
|
13608
|
+
*
|
|
13609
|
+
* **Details**
|
|
13610
|
+
*
|
|
13611
|
+
* Creates boundaries that grow exponentially, useful for metrics that span
|
|
13612
|
+
* multiple orders of magnitude. Each boundary is calculated as start * factor^i.
|
|
13613
|
+
*
|
|
13614
|
+
* **Example** (Creating exponential boundaries)
|
|
13615
|
+
*
|
|
13616
|
+
* ```ts import.meta.vitest
|
|
13617
|
+
* import { Metric } from "effect"
|
|
13618
|
+
*
|
|
13619
|
+
* Metric.exponentialBoundaries({ start: 1, factor: 2, count: 5 }) // => [1, 2, 4, 8, Infinity]
|
|
13620
|
+
* ```
|
|
13621
|
+
*
|
|
13622
|
+
* @category constructors
|
|
13623
|
+
* @since 4.0.0
|
|
13624
|
+
*/
|
|
13625
|
+
const exponentialBoundaries = (options) => boundariesFromIterable(makeBy(options.count - 1, (i) => options.start * Math.pow(options.factor, i)));
|
|
13626
|
+
function makeKey(metric, attributes) {
|
|
13627
|
+
let key = `${metric.type}:${metric.id}`;
|
|
13628
|
+
if (isNotUndefined(metric.description)) key += `:${metric.description}`;
|
|
13629
|
+
if (isNotUndefined(attributes)) key += `:${serializeAttributes(attributes)}`;
|
|
13630
|
+
return key;
|
|
13631
|
+
}
|
|
13632
|
+
function makeHooks(get, update, modify) {
|
|
13633
|
+
return {
|
|
13634
|
+
get,
|
|
13635
|
+
update,
|
|
13636
|
+
modify: modify ?? update
|
|
13637
|
+
};
|
|
13638
|
+
}
|
|
13639
|
+
function serializeAttributes(attributes) {
|
|
13640
|
+
return JSON.stringify(Array.isArray(attributes) ? attributes : Object.entries(attributes));
|
|
13641
|
+
}
|
|
13642
|
+
function mergeAttributes(self, other) {
|
|
13643
|
+
return {
|
|
13644
|
+
...attributesToRecord(self),
|
|
13645
|
+
...attributesToRecord(other)
|
|
13646
|
+
};
|
|
13647
|
+
}
|
|
13648
|
+
function attributesToRecord(attributes) {
|
|
13649
|
+
if (isNotUndefined(attributes) && Array.isArray(attributes)) return attributes.reduce((acc, [key, value]) => {
|
|
13650
|
+
assignProperty$1(acc, key, value);
|
|
13651
|
+
return acc;
|
|
13652
|
+
}, {});
|
|
13653
|
+
return attributes;
|
|
13654
|
+
}
|
|
13056
13655
|
//#endregion
|
|
13057
13656
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effect.js
|
|
13058
13657
|
/**
|
|
@@ -23798,7 +24397,7 @@ const layer$12 = (loggers, options) => effect(CurrentLoggers, withFiber$1(fnUntr
|
|
|
23798
24397
|
//#region package.json
|
|
23799
24398
|
var package_default = {
|
|
23800
24399
|
name: "@systemfsoftware/stryker-js",
|
|
23801
|
-
version: "
|
|
24400
|
+
version: "9.0.0",
|
|
23802
24401
|
repository: {
|
|
23803
24402
|
"type": "git",
|
|
23804
24403
|
"url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
|
|
@@ -23830,7 +24429,9 @@ var package_default = {
|
|
|
23830
24429
|
"@effect/platform-node-shared": "catalog:",
|
|
23831
24430
|
"@noble/hashes": "catalog:",
|
|
23832
24431
|
"@opentelemetry/api": "^1.9.0",
|
|
24432
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.208.0",
|
|
23833
24433
|
"@opentelemetry/exporter-trace-otlp-http": "^0.208.0",
|
|
24434
|
+
"@opentelemetry/sdk-metrics": "^2.2.0",
|
|
23834
24435
|
"@opentelemetry/sdk-trace-base": "^2.2.0",
|
|
23835
24436
|
"@systemfsoftware/effect-cell-types": "catalog:"
|
|
23836
24437
|
},
|
|
@@ -25105,7 +25706,7 @@ function omit() {
|
|
|
25105
25706
|
*/
|
|
25106
25707
|
function withDefault$3(defaultValue) {
|
|
25107
25708
|
return new Getter((o) => {
|
|
25108
|
-
const filtered = filter$
|
|
25709
|
+
const filtered = filter$3(o, isNotUndefined);
|
|
25109
25710
|
return isSome(filtered) ? succeed$4(filtered) : mapEager(defaultValue, some);
|
|
25110
25711
|
});
|
|
25111
25712
|
}
|
|
@@ -25168,7 +25769,7 @@ function String$3() {
|
|
|
25168
25769
|
function Number$3() {
|
|
25169
25770
|
return transform$3(globalThis.Number);
|
|
25170
25771
|
}
|
|
25171
|
-
function parseJson
|
|
25772
|
+
function parseJson(options) {
|
|
25172
25773
|
return onSome((input, parseOptions) => try_({
|
|
25173
25774
|
try: () => some(JSON.parse(input, options?.reviver)),
|
|
25174
25775
|
catch: () => new InvalidValue$1({ expected: "a valid JSON string" }, input, parseOptions)
|
|
@@ -25230,7 +25831,7 @@ const BigDecimalProto = {
|
|
|
25230
25831
|
[TypeId$24]: TypeId$24,
|
|
25231
25832
|
[symbol$2]() {
|
|
25232
25833
|
const normalized = normalize(this);
|
|
25233
|
-
return combine$3(hash(normalized.value), number$
|
|
25834
|
+
return combine$3(hash(normalized.value), number$3(normalized.scale));
|
|
25234
25835
|
},
|
|
25235
25836
|
[symbol$1](that) {
|
|
25236
25837
|
return isBigDecimal(that) && equals(this, that);
|
|
@@ -25889,7 +26490,7 @@ const defectFromJson = (options) => transform$2({
|
|
|
25889
26490
|
* @since 4.0.0
|
|
25890
26491
|
*/
|
|
25891
26492
|
function fromJsonString$1(options) {
|
|
25892
|
-
return new Transformation(parseJson
|
|
26493
|
+
return new Transformation(parseJson(options ?? {}), stringifyJson(options));
|
|
25893
26494
|
}
|
|
25894
26495
|
//#endregion
|
|
25895
26496
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaAST.js
|
|
@@ -26483,7 +27084,7 @@ function hasCheck(checks, id) {
|
|
|
26483
27084
|
* @category constructors
|
|
26484
27085
|
* @since 4.0.0
|
|
26485
27086
|
*/
|
|
26486
|
-
const number$
|
|
27087
|
+
const number$2 = /*#__PURE__*/ new Number$2();
|
|
26487
27088
|
/**
|
|
26488
27089
|
* AST node matching any `boolean` value (`true` or `false`).
|
|
26489
27090
|
*
|
|
@@ -27627,7 +28228,7 @@ function isFinite$1(annotations) {
|
|
|
27627
28228
|
});
|
|
27628
28229
|
}
|
|
27629
28230
|
/** @internal */
|
|
27630
|
-
const finite = /*#__PURE__*/ appendChecks(number$
|
|
28231
|
+
const finite = /*#__PURE__*/ appendChecks(number$2, [/*#__PURE__*/ isFinite$1()]);
|
|
27631
28232
|
const numberToJson = /*#__PURE__*/ new Link(/*#__PURE__*/ new Union$1([finite, nonFiniteLiterals], "anyOf"), /*#__PURE__*/ new Transformation(/*#__PURE__*/ Number$3(), /*#__PURE__*/ transform$3((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
|
|
27632
28233
|
/**
|
|
27633
28234
|
* Creates a {@link Filter} that validates strings by running `RegExp.test`.
|
|
@@ -32073,7 +32674,7 @@ const String$1 = /*#__PURE__*/ make$19(string$6);
|
|
|
32073
32674
|
* @category schemas
|
|
32074
32675
|
* @since 4.0.0
|
|
32075
32676
|
*/
|
|
32076
|
-
const Number$1 = /*#__PURE__*/ make$19(number$
|
|
32677
|
+
const Number$1 = /*#__PURE__*/ make$19(number$2);
|
|
32077
32678
|
/**
|
|
32078
32679
|
* Schema for `boolean` values. Validates that the input is `typeof` `"boolean"`.
|
|
32079
32680
|
*
|
|
@@ -34561,7 +35162,7 @@ const string$5 = isString;
|
|
|
34561
35162
|
* @category guards
|
|
34562
35163
|
* @since 4.0.0
|
|
34563
35164
|
*/
|
|
34564
|
-
const number = isNumber;
|
|
35165
|
+
const number$1 = isNumber;
|
|
34565
35166
|
/**
|
|
34566
35167
|
* Matches any defined (non-null and non-undefined) value.
|
|
34567
35168
|
*
|
|
@@ -35787,6 +36388,27 @@ function string$4(name) {
|
|
|
35787
36388
|
return schema$1(String$1, name);
|
|
35788
36389
|
}
|
|
35789
36390
|
/**
|
|
36391
|
+
* Creates a config for a numeric value (including `NaN`, `Infinity`).
|
|
36392
|
+
*
|
|
36393
|
+
* **When to use**
|
|
36394
|
+
*
|
|
36395
|
+
* Use when you need config input to accept JavaScript's full number domain,
|
|
36396
|
+
* including NaN and infinities, rather than reject non-finite values.
|
|
36397
|
+
*
|
|
36398
|
+
* **Details**
|
|
36399
|
+
*
|
|
36400
|
+
* Shortcut for `Config.schema(Schema.Number, name)`.
|
|
36401
|
+
*
|
|
36402
|
+
* @see {@link finite} for rejecting `NaN` and `Infinity`
|
|
36403
|
+
* @see {@link int} for accepting only integers
|
|
36404
|
+
*
|
|
36405
|
+
* @category constructors
|
|
36406
|
+
* @since 2.0.0
|
|
36407
|
+
*/
|
|
36408
|
+
function number(name) {
|
|
36409
|
+
return schema$1(Number$1, name);
|
|
36410
|
+
}
|
|
36411
|
+
/**
|
|
35790
36412
|
* Creates a config for a boolean value parsed from common string
|
|
35791
36413
|
* representations.
|
|
35792
36414
|
*
|
|
@@ -42869,7 +43491,7 @@ function normalizeFileName$4(fileName) {
|
|
|
42869
43491
|
return fileName.replace(/\\/g, "/");
|
|
42870
43492
|
}
|
|
42871
43493
|
const hasText = (value) => isString(value) && value.length > 0;
|
|
42872
|
-
const textIfNonEmpty = (value) => getOrUndefined$1(filter$
|
|
43494
|
+
const textIfNonEmpty = (value) => getOrUndefined$1(filter$3(fromUndefinedOr(value), hasText));
|
|
42873
43495
|
const fieldOf = (value$36, key) => value(key in value$36).pipe(when(true, () => {
|
|
42874
43496
|
return Reflect.get(value$36, key);
|
|
42875
43497
|
}), orElse(() => void 0));
|
|
@@ -42878,10 +43500,10 @@ function isErrnoException(error) {
|
|
|
42878
43500
|
return value(error).pipe(when(instanceOf(Error), hasStringCode), orElse(() => false));
|
|
42879
43501
|
}
|
|
42880
43502
|
const isEmptyNumber = (value$32) => value(value$32).pipe(when(0, () => true), orElse(Number.isNaN));
|
|
42881
|
-
const isEmptyError = (error) => value(error).pipe(when(_undefined, () => true), when(_null, () => true), when(string$5, (text) => text.length === 0), when(number, isEmptyNumber), when(boolean$4, (value) => !value), orElse(() => false));
|
|
43503
|
+
const isEmptyError = (error) => value(error).pipe(when(_undefined, () => true), when(_null, () => true), when(string$5, (text) => text.length === 0), when(number$1, isEmptyNumber), when(boolean$4, (value) => !value), orElse(() => false));
|
|
42882
43504
|
const formatErrnoException = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.code} (${error.syscall}) ${stack}`), orElse(() => `${error.name}: ${error.code} (${error.syscall})`));
|
|
42883
43505
|
const formatError = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.message}\n${stack}`), orElse(() => `${error.name}: ${error.message}`));
|
|
42884
|
-
const isJsonPrimitive = (value$30) => value(value$30).pipe(when(number, () => true), when(boolean$4, () => true), when(bigint, () => true), orElse(() => false));
|
|
43506
|
+
const isJsonPrimitive = (value$30) => value(value$30).pipe(when(number$1, () => true), when(boolean$4, () => true), when(bigint, () => true), orElse(() => false));
|
|
42885
43507
|
const jsonText = (error) => {
|
|
42886
43508
|
try {
|
|
42887
43509
|
return textIfNonEmpty(JSON.stringify(error));
|
|
@@ -43013,11 +43635,11 @@ function replaceFirstMatch(path, original, replacement) {
|
|
|
43013
43635
|
*/
|
|
43014
43636
|
function toApiLocation(startOffset, endOffset, lineTable, offset) {
|
|
43015
43637
|
return {
|
|
43016
|
-
start: toPosition
|
|
43017
|
-
end: toPosition
|
|
43638
|
+
start: toPosition(positionFromLineTable(startOffset, lineTable), offset),
|
|
43639
|
+
end: toPosition(positionFromLineTable(endOffset, lineTable), offset)
|
|
43018
43640
|
};
|
|
43019
43641
|
}
|
|
43020
|
-
function toPosition
|
|
43642
|
+
function toPosition(source, offset) {
|
|
43021
43643
|
let columnOffset = 0;
|
|
43022
43644
|
if (source.line === 1) columnOffset = offset.column;
|
|
43023
43645
|
return {
|
|
@@ -43888,7 +44510,7 @@ function mutatorWarnings(directive, allMutatorNames, originFileName) {
|
|
|
43888
44510
|
}
|
|
43889
44511
|
function mutatorWarning(directive, mutatorName, originFileName) {
|
|
43890
44512
|
const loc = commentLocation(directive.loc);
|
|
43891
|
-
return `Unused 'Stryker ${match$6(filter$
|
|
44513
|
+
return `Unused 'Stryker ${match$6(filter$3(fromNullishOr(directive.scope), (scope) => scope !== ""), {
|
|
43892
44514
|
onNone: () => directive.type,
|
|
43893
44515
|
onSome: (scope) => `${directive.type} ${scope}`
|
|
43894
44516
|
})}' directive. Mutator with name '${mutatorName}' not found. Directive found at: ${originFileName}:${loc.start.line}:${loc.start.column}.`;
|
|
@@ -44130,7 +44752,7 @@ function unwrapParenthesizedExpression(node) {
|
|
|
44130
44752
|
return getOrElse(innerExpression(node), () => node);
|
|
44131
44753
|
}
|
|
44132
44754
|
function innerExpression(node) {
|
|
44133
|
-
return flatMap$5(filter$
|
|
44755
|
+
return flatMap$5(filter$3(some(node), isParenthesizedWrapper), (parenthesized) => map$12(fromNullishOr(parenthesized.expression), unwrapParenthesizedExpression));
|
|
44134
44756
|
}
|
|
44135
44757
|
function isParenthesizedWrapper(value) {
|
|
44136
44758
|
return hasProperty(value, "type") && value["type"] === "ParenthesizedExpression";
|
|
@@ -44258,7 +44880,7 @@ const headerFor = (root) => map$7(instrumentationHeader, (header) => match$6(lea
|
|
|
44258
44880
|
onSome: (leadingComments) => [commentedHeader(leadingComments, header), ...header.slice(1)]
|
|
44259
44881
|
}));
|
|
44260
44882
|
function leadingCommentsOf(root) {
|
|
44261
|
-
return filter$
|
|
44883
|
+
return filter$3(some(leadingCommentsOn(root.body[0])), isCommentArray);
|
|
44262
44884
|
}
|
|
44263
44885
|
function commentedHeader(leadingComments, header) {
|
|
44264
44886
|
const cloned = cloneNode(getOrThrowWith(fromNullishOr(header[0]), () => /* @__PURE__ */ new Error("Instrumentation header is empty")));
|
|
@@ -44272,7 +44894,7 @@ function deepFreeze$2(value) {
|
|
|
44272
44894
|
});
|
|
44273
44895
|
}
|
|
44274
44896
|
function frozenContainer(value) {
|
|
44275
|
-
return map$12(filter$
|
|
44897
|
+
return map$12(filter$3(some(value), isObjectValue), (object) => {
|
|
44276
44898
|
freezableChildren(object).forEach((child) => {
|
|
44277
44899
|
deepFreeze$2(child);
|
|
44278
44900
|
});
|
|
@@ -44287,10 +44909,10 @@ function freezableChildren(value) {
|
|
|
44287
44909
|
];
|
|
44288
44910
|
}
|
|
44289
44911
|
function mapEntries(value) {
|
|
44290
|
-
return getOrElse(map$12(filter$
|
|
44912
|
+
return getOrElse(map$12(filter$3(some(value), isMap), (map) => [...map.entries()].flat()), () => NO_CHILDREN);
|
|
44291
44913
|
}
|
|
44292
44914
|
function setItems(value) {
|
|
44293
|
-
return getOrElse(map$12(filter$
|
|
44915
|
+
return getOrElse(map$12(filter$3(some(value), isSet), (set) => [...set]), () => NO_CHILDREN);
|
|
44294
44916
|
}
|
|
44295
44917
|
function isObjectValue(value) {
|
|
44296
44918
|
return value !== null && typeof value === "object";
|
|
@@ -44451,7 +45073,7 @@ const transformScript = ({ root, originFileName, rawContent, offset, comments },
|
|
|
44451
45073
|
].some((skip) => skip);
|
|
44452
45074
|
}
|
|
44453
45075
|
function mutateRanges() {
|
|
44454
|
-
return filter$
|
|
45076
|
+
return filter$3(some(mutateDescription), isMutateRangeList);
|
|
44455
45077
|
}
|
|
44456
45078
|
function isOutsideMutateRanges(path) {
|
|
44457
45079
|
return exists$1(mutateRanges(), (ranges) => ranges.every((range) => !locationOverlaps(range, getNodeLocation(path.node))));
|
|
@@ -45125,6 +45747,23 @@ const layerClient = (tag, service) => effectContext(gen(function* () {
|
|
|
45125
45747
|
const middleware = isEffect(service) ? yield* service : service;
|
|
45126
45748
|
return makeUnsafe$8(/* @__PURE__ */ new Map([[`${tag.key}/Client`, (options) => updateContext(middleware(options), (requestContext) => merge$4(services, requestContext))]]));
|
|
45127
45749
|
}));
|
|
45750
|
+
//#endregion
|
|
45751
|
+
//#region ../stryker-js-plugin-interface/dist/index.mjs
|
|
45752
|
+
/** A position inside a file, in the coordinates the wire carries — 0-based line and column. */
|
|
45753
|
+
const CheckerPositionWire = Struct({
|
|
45754
|
+
line: Finite,
|
|
45755
|
+
column: Finite
|
|
45756
|
+
});
|
|
45757
|
+
const CheckerMutantWire = Struct({
|
|
45758
|
+
id: NonEmptyString,
|
|
45759
|
+
fileName: NonEmptyString,
|
|
45760
|
+
mutatorName: NonEmptyString,
|
|
45761
|
+
replacement: String$1,
|
|
45762
|
+
location: Struct({
|
|
45763
|
+
start: CheckerPositionWire,
|
|
45764
|
+
end: CheckerPositionWire
|
|
45765
|
+
})
|
|
45766
|
+
});
|
|
45128
45767
|
Literals(["passed", "compileError"]);
|
|
45129
45768
|
const CheckResultSchema$1 = Union([Struct({ status: Literal("passed") }), Struct({
|
|
45130
45769
|
status: Literal("compileError"),
|
|
@@ -45388,7 +46027,7 @@ const TestRunnerDryRunRequest = Struct({ options: DryRunOptionsSchema });
|
|
|
45388
46027
|
const TestRunnerMutantRunRequest = Struct({ options: MutantRunOptionsSchema });
|
|
45389
46028
|
const CheckerRequest = Struct({
|
|
45390
46029
|
checkerName: String$1,
|
|
45391
|
-
mutants: ArraySchema(
|
|
46030
|
+
mutants: ArraySchema(CheckerMutantWire)
|
|
45392
46031
|
});
|
|
45393
46032
|
const CheckerCheckResult = Record(String$1, CheckResultSchema$1);
|
|
45394
46033
|
const CheckerGroupResult = ArraySchema(ArraySchema(String$1));
|
|
@@ -52479,7 +53118,7 @@ function parseConcurrency(value) {
|
|
|
52479
53118
|
return value;
|
|
52480
53119
|
}
|
|
52481
53120
|
const optional = (option) => optional$1(option);
|
|
52482
|
-
const absentWhenFalse = (value) => getOrUndefined$1(filter$
|
|
53121
|
+
const absentWhenFalse = (value) => getOrUndefined$1(filter$3(value, (present) => present));
|
|
52483
53122
|
const isUnknownArgument = (argument) => exists$1(fromUndefinedOr(argument), (text) => text.startsWith("-"));
|
|
52484
53123
|
function unwrap(value) {
|
|
52485
53124
|
if (isOption(value)) return getOrUndefined$1(value);
|
|
@@ -52704,7 +53343,7 @@ function argumentHintOf(error, argv) {
|
|
|
52704
53343
|
return value(error).pipe(tag("UnrecognizedOption", (unrecognized) => some(unrecognizedArgument(argv, unrecognized.option))), tag("UnexpectedArgument", (unexpected) => fromNullishOr(unexpected.arguments[0])), tag("UnknownSubcommand", (unknown) => some(unknown.subcommand)), orElse(() => none()));
|
|
52705
53344
|
}
|
|
52706
53345
|
function unrecognizedArgument(argv, option) {
|
|
52707
|
-
return followingArgument(argv, option).pipe(filter$
|
|
53346
|
+
return followingArgument(argv, option).pipe(filter$3((argument) => !argument.startsWith("-")), getOrElse(() => option));
|
|
52708
53347
|
}
|
|
52709
53348
|
function followingArgument(argv, option) {
|
|
52710
53349
|
return value(argv.indexOf(option)).pipe(when((at) => at >= 0, (at) => fromNullishOr(argv[at + 1])), orElse(() => none()));
|
|
@@ -53141,7 +53780,7 @@ var MissingPackages = class extends TaggedError()("MissingPackages", { packages:
|
|
|
53141
53780
|
const orDefault = (present, fallback) => getOrElse(present, () => fallback);
|
|
53142
53781
|
const thresholdsOf = (part) => orDefault(map$12(fromUndefinedOr(part), (present) => present.report.thresholds), DEFAULT_THRESHOLDS);
|
|
53143
53782
|
const hasReport = (part) => part.report !== void 0;
|
|
53144
|
-
const scoreFor = (part) => getOrUndefined$1(map$12(filter$
|
|
53783
|
+
const scoreFor = (part) => getOrUndefined$1(map$12(filter$3(fromUndefinedOr(part), hasReport), (present) => scoreOf(present.report.files)));
|
|
53145
53784
|
const outcomeOf = (reports) => value(reports.some((part) => part.outcome === FAILING_OUTCOME)).pipe(when(true, () => FAILING_OUTCOME), when(false, () => PASSING_OUTCOME), exhaustive);
|
|
53146
53785
|
const normalizeName = (fileName) => fileName.split(SEGMENT_SEPARATORS).filter(Boolean).join("/");
|
|
53147
53786
|
const commonBasePath = (fileNames) => {
|
|
@@ -53252,7 +53891,7 @@ const verdictOf = (label, score, outcome, incomplete) => value(incomplete).pipe(
|
|
|
53252
53891
|
verdict: incompleteVerdict(outcome)
|
|
53253
53892
|
})), when(false, () => completeRow(label, score, outcome)), exhaustive);
|
|
53254
53893
|
/** The label a second part repeats, and `none` when it repeats none a report can name. */
|
|
53255
|
-
const repeatedLabel = (parts) => filter$
|
|
53894
|
+
const repeatedLabel = (parts) => filter$3(map$12(fromUndefinedOr(parts.find((part, index) => parts.slice(0, index).some((earlier) => earlier.label === part.label))), (duplicate) => duplicate.label), (label) => label !== "");
|
|
53256
53895
|
const uniqueParts = (parts) => parts.filter((part, index) => parts.slice(0, index).every((earlier) => earlier.label !== part.label));
|
|
53257
53896
|
const chooseReports = (parts) => parts.flatMap((part) => toArray(map$12(fromUndefinedOr(part.report), (report) => ({
|
|
53258
53897
|
...part,
|
|
@@ -53298,8 +53937,8 @@ const labelCheckOf = (parts) => match$6(repeatedLabel(parts), {
|
|
|
53298
53937
|
onNone: () => LabelsDistinct.make({}),
|
|
53299
53938
|
onSome: (label) => DuplicateLabelFound.make({ label })
|
|
53300
53939
|
});
|
|
53301
|
-
const decide = (command) => value(labelCheckOf(command.parts)).pipe(tag("DuplicateLabelFound", (found) => fail$4(DuplicatePackageLabel.make({ label: found.label }))), tag("LabelsDistinct", () => decideMerge(command)), exhaustive);
|
|
53302
|
-
const mergeReportParts = Workflow_exports.make(MergeReportPartsCommand, decide);
|
|
53940
|
+
const decide$1 = (command) => value(labelCheckOf(command.parts)).pipe(tag("DuplicateLabelFound", (found) => fail$4(DuplicatePackageLabel.make({ label: found.label }))), tag("LabelsDistinct", () => decideMerge(command)), exhaustive);
|
|
53941
|
+
const mergeReportParts = Workflow_exports.make(MergeReportPartsCommand, decide$1);
|
|
53303
53942
|
//#endregion
|
|
53304
53943
|
//#region src/merge-reports.schema.ts
|
|
53305
53944
|
var MergeReportsFailed = class extends TaggedError()("MergeReportsFailed", { reason: String$1 }) {};
|
|
@@ -53466,7 +54105,7 @@ const decodedPart = (bytes) => match$6(flatMap$5(fromNullishOr(bytes.metaText),
|
|
|
53466
54105
|
});
|
|
53467
54106
|
}
|
|
53468
54107
|
});
|
|
53469
|
-
const expectedPackages = (raw) => match$6(filter$
|
|
54108
|
+
const expectedPackages = (raw) => match$6(filter$3(fromNullishOr(raw), is$2(NonEmptyString)), {
|
|
53470
54109
|
onNone: () => succeed$8(void 0),
|
|
53471
54110
|
onSome: (text) => match$6(decodeOption(fromJsonString(ArraySchema(String$1)))(text), {
|
|
53472
54111
|
onNone: () => fail$4(refuse(`--packages is not a JSON array: ${text}`)),
|
|
@@ -53650,7 +54289,7 @@ var MachineOutput = class extends TaggedClass()("MachineOutput", {
|
|
|
53650
54289
|
[ResolveModeTypeId] = ResolveModeTypeId;
|
|
53651
54290
|
};
|
|
53652
54291
|
const CONFLICT_EXPECTED = "the \"--format text\" and \"--json\" flags are mutually exclusive — use one or the other";
|
|
53653
|
-
const configured = (value) => filter$
|
|
54292
|
+
const configured = (value) => filter$3(fromNullishOr(value), is$2(NonEmptyString));
|
|
53654
54293
|
const modeFromEnv = (envMode, stdoutIsTTY) => value(envMode).pipe(when("machine", () => MachineOutput.make({
|
|
53655
54294
|
signal: "env",
|
|
53656
54295
|
stdoutIsTTY
|
|
@@ -53948,6 +54587,39 @@ const PreviousFileSchema = Struct({
|
|
|
53948
54587
|
const PreviousTestFileSchema = Struct({ source: optional$4(String$1) });
|
|
53949
54588
|
const PreviousFilesSchema = Record(String$1, PreviousFileSchema);
|
|
53950
54589
|
const PreviousTestFilesSchema = Record(String$1, PreviousTestFileSchema);
|
|
54590
|
+
//#endregion
|
|
54591
|
+
//#region src/mutant-result-mapping.ts
|
|
54592
|
+
const toSchemaPosition = (pos) => ({
|
|
54593
|
+
column: pos.column + 1,
|
|
54594
|
+
line: pos.line + 1
|
|
54595
|
+
});
|
|
54596
|
+
const toSchemaLocation = (location) => ({
|
|
54597
|
+
start: toSchemaPosition(location.start),
|
|
54598
|
+
end: toSchemaPosition(location.end)
|
|
54599
|
+
});
|
|
54600
|
+
const checkStatusToMutantStatus = (_status) => "CompileError";
|
|
54601
|
+
const mutantResult = (mutant, status, outcome = {}) => ({
|
|
54602
|
+
_tag: "Mutant",
|
|
54603
|
+
id: mutant.id,
|
|
54604
|
+
fileName: mutant.fileName,
|
|
54605
|
+
mutatorName: mutant.mutatorName,
|
|
54606
|
+
replacement: mutant.replacement,
|
|
54607
|
+
location: toSchemaLocation(mutant.location),
|
|
54608
|
+
status,
|
|
54609
|
+
coveredBy: mutant.coveredBy,
|
|
54610
|
+
static: mutant.static,
|
|
54611
|
+
testsCompleted: mutant.testsCompleted,
|
|
54612
|
+
description: mutant.description,
|
|
54613
|
+
...outcome
|
|
54614
|
+
});
|
|
54615
|
+
const mapRunResult = (mutant, result) => value(result).pipe(discriminator("status")("error", (errored) => mutantResult(mutant, "RuntimeError", { statusReason: errored.errorMessage })), discriminator("status")("killed", (killed) => mutantResult(mutant, "Killed", {
|
|
54616
|
+
testsCompleted: killed.nrOfTests,
|
|
54617
|
+
killedBy: [...killed.killedBy],
|
|
54618
|
+
statusReason: killed.failureMessage
|
|
54619
|
+
})), discriminator("status")("timeout", (timedOut) => {
|
|
54620
|
+
if (timedOut.reason === void 0) return mutantResult(mutant, "Timeout");
|
|
54621
|
+
return mutantResult(mutant, "Timeout", { statusReason: timedOut.reason });
|
|
54622
|
+
}), discriminator("status")("survived", (survived) => mutantResult(mutant, "Survived", { testsCompleted: survived.nrOfTests })), exhaustive);
|
|
53951
54623
|
const ZERO = 0;
|
|
53952
54624
|
const firstDefined = (first, second) => getOrElse(fromNullishOr(first), () => second);
|
|
53953
54625
|
const staticField = (isStatic) => match$6(fromUndefinedOr(isStatic), {
|
|
@@ -54212,6 +54884,18 @@ const decidePlans = (mutants, testCoverage, options, timeOverheadMS, globalTestF
|
|
|
54212
54884
|
const command = coverageToCommand(mutants, testCoverage, options, timeOverheadMS, globalTestFilter, sandboxFileByName);
|
|
54213
54885
|
return makeMutantTestPlanner(command);
|
|
54214
54886
|
};
|
|
54887
|
+
const isRunPlan = (plan) => plan.plan === "Run";
|
|
54888
|
+
const isEarlyPlan = (plan) => !isRunPlan(plan);
|
|
54889
|
+
const earlyResultOf = (plan) => Object.assign({}, plan.mutant, {
|
|
54890
|
+
location: toSchemaLocation(plan.mutant.location),
|
|
54891
|
+
status: plan.mutant.status ?? "Ignored"
|
|
54892
|
+
});
|
|
54893
|
+
const partitionRunPlans = (plans) => ({
|
|
54894
|
+
runPlans: plans.filter(isRunPlan),
|
|
54895
|
+
earlyResults: plans.filter(isEarlyPlan).map(earlyResultOf)
|
|
54896
|
+
});
|
|
54897
|
+
const byReloadEnvironment = (left, right) => Number(left.runOptions.reloadEnvironment) - Number(right.runOptions.reloadEnvironment);
|
|
54898
|
+
const sortRunPlans = (plans) => [...plans].sort(byReloadEnvironment);
|
|
54215
54899
|
const REMEMBERED_STATUS = /* @__PURE__ */ new Set([
|
|
54216
54900
|
"Killed",
|
|
54217
54901
|
"Survived",
|
|
@@ -54247,7 +54931,7 @@ const isRememberable = (previous, mutant, input, file, changedFiles, changedTest
|
|
|
54247
54931
|
const decideForMutant = (mutant, input, changedFiles, changedTests) => {
|
|
54248
54932
|
const file = toRelativeNormalized(mutant.fileName, input.basePath);
|
|
54249
54933
|
const previous = findRemembered(input.previousFiles, file, currentMutantKey(mutant));
|
|
54250
|
-
return match$6(filter$
|
|
54934
|
+
return match$6(filter$3(fromUndefinedOr(previous), (candidate) => isRememberable(candidate, mutant, input, file, changedFiles, changedTests)), {
|
|
54251
54935
|
onNone: () => ({ kind: "run" }),
|
|
54252
54936
|
onSome: (present) => ({
|
|
54253
54937
|
kind: "remembered",
|
|
@@ -54349,8 +55033,8 @@ const incrementalDiffOfChanges = (input) => {
|
|
|
54349
55033
|
};
|
|
54350
55034
|
};
|
|
54351
55035
|
const computeIncrementalDiff = (input) => value(input.force).pipe(when(true, () => forcedDiff(input)), orElse(() => incrementalDiffOfChanges(input)));
|
|
54352
|
-
const previousFilesOf = (rawReport) => value(rawReport).pipe(when(isObject, (report) => getOrElse(filter$
|
|
54353
|
-
const previousTestFilesOf = (rawReport) => value(rawReport).pipe(when(isObject, (report) => getOrElse(filter$
|
|
55036
|
+
const previousFilesOf = (rawReport) => value(rawReport).pipe(when(isObject, (report) => getOrElse(filter$3(fromUndefinedOr(report["files"]), is$2(PreviousFilesSchema)), () => ({}))), orElse(() => ({})));
|
|
55037
|
+
const previousTestFilesOf = (rawReport) => value(rawReport).pipe(when(isObject, (report) => getOrElse(filter$3(fromUndefinedOr(report["testFiles"]), is$2(PreviousTestFilesSchema)), () => ({}))), orElse(() => ({})));
|
|
54354
55038
|
const hasTestFileName = (result) => result.fileName !== void 0;
|
|
54355
55039
|
const testIdsByRelativeFile = (testCoverage, basePath) => {
|
|
54356
55040
|
const byFile = {};
|
|
@@ -54445,7 +55129,7 @@ const combine$1 = (left, right) => {
|
|
|
54445
55129
|
if (isObject(left)) return combineNested(left, right);
|
|
54446
55130
|
return right;
|
|
54447
55131
|
};
|
|
54448
|
-
const mergeRecords = (base, overrides) => union$2(base, filter$
|
|
55132
|
+
const mergeRecords = (base, overrides) => union$2(base, filter$2(overrides, usable), combine$1);
|
|
54449
55133
|
const mergeConfig = (defaults, overrides) => mergeRecords(defaults, overrides);
|
|
54450
55134
|
//#endregion
|
|
54451
55135
|
//#region src/Project.ignore.ts
|
|
@@ -63680,7 +64364,7 @@ var require_AsyncLocalStorageContextManager = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
63680
64364
|
}));
|
|
63681
64365
|
//#endregion
|
|
63682
64366
|
//#region ../../node_modules/.pnpm/@opentelemetry+context-async-hooks@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/context-async-hooks/build/src/index.js
|
|
63683
|
-
var require_src$
|
|
64367
|
+
var require_src$13 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
63684
64368
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63685
64369
|
exports.AsyncLocalStorageContextManager = exports.AsyncHooksContextManager = void 0;
|
|
63686
64370
|
var AsyncHooksContextManager_1 = require_AsyncHooksContextManager();
|
|
@@ -66248,7 +66932,7 @@ var require_sdk_info$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
66248
66932
|
}));
|
|
66249
66933
|
//#endregion
|
|
66250
66934
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/src/platform/node/index.js
|
|
66251
|
-
var require_node$
|
|
66935
|
+
var require_node$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
66252
66936
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66253
66937
|
exports.SDK_INFO = exports.otperformance = exports._globalThis = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = void 0;
|
|
66254
66938
|
var environment_1 = require_environment$1();
|
|
@@ -66300,10 +66984,10 @@ var require_node$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
66300
66984
|
}));
|
|
66301
66985
|
//#endregion
|
|
66302
66986
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/src/platform/index.js
|
|
66303
|
-
var require_platform$
|
|
66987
|
+
var require_platform$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
66304
66988
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66305
66989
|
exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getStringFromEnv = exports.getBooleanFromEnv = exports.otperformance = exports._globalThis = exports.SDK_INFO = void 0;
|
|
66306
|
-
var node_1 = require_node$
|
|
66990
|
+
var node_1 = require_node$10();
|
|
66307
66991
|
Object.defineProperty(exports, "SDK_INFO", {
|
|
66308
66992
|
enumerable: true,
|
|
66309
66993
|
get: function() {
|
|
@@ -66352,7 +67036,7 @@ var require_platform$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
66352
67036
|
var require_time$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
66353
67037
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66354
67038
|
exports.addHrTimes = exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = exports.getTimeOrigin = exports.millisToHrTime = void 0;
|
|
66355
|
-
const platform_1 = require_platform$
|
|
67039
|
+
const platform_1 = require_platform$10();
|
|
66356
67040
|
const NANOSECOND_DIGITS = 9;
|
|
66357
67041
|
const MILLISECONDS_TO_NANOSECONDS = Math.pow(10, 6);
|
|
66358
67042
|
const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);
|
|
@@ -67159,7 +67843,7 @@ var require_exporter$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67159
67843
|
}));
|
|
67160
67844
|
//#endregion
|
|
67161
67845
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/src/index.js
|
|
67162
|
-
var require_src$
|
|
67846
|
+
var require_src$12 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
67163
67847
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67164
67848
|
exports.internal = exports.diagLogLevelFromString = exports.BindOnceFuture = exports.urlMatches = exports.isUrlIgnored = exports.callWithTimeout = exports.TimeoutError = exports.merge = exports.TraceState = exports.unsuppressTracing = exports.suppressTracing = exports.isTracingSuppressed = exports.setRPCMetadata = exports.getRPCMetadata = exports.deleteRPCMetadata = exports.RPCType = exports.parseTraceParent = exports.W3CTraceContextPropagator = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = exports.CompositePropagator = exports.otperformance = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = exports._globalThis = exports.SDK_INFO = exports.parseKeyPairsIntoRecord = exports.ExportResultCode = exports.unrefTimer = exports.timeInputToHrTime = exports.millisToHrTime = exports.isTimeInputHrTime = exports.isTimeInput = exports.hrTimeToTimeStamp = exports.hrTimeToNanoseconds = exports.hrTimeToMilliseconds = exports.hrTimeToMicroseconds = exports.hrTimeDuration = exports.hrTime = exports.getTimeOrigin = exports.addHrTimes = exports.loggingErrorHandler = exports.setGlobalErrorHandler = exports.globalErrorHandler = exports.sanitizeAttributes = exports.isAttributeValue = exports.AnchoredClock = exports.W3CBaggagePropagator = void 0;
|
|
67165
67849
|
var W3CBaggagePropagator_1 = require_W3CBaggagePropagator$1();
|
|
@@ -67303,7 +67987,7 @@ var require_src$11 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67303
67987
|
return utils_1.parseKeyPairsIntoRecord;
|
|
67304
67988
|
}
|
|
67305
67989
|
});
|
|
67306
|
-
var platform_1 = require_platform$
|
|
67990
|
+
var platform_1 = require_platform$10();
|
|
67307
67991
|
Object.defineProperty(exports, "SDK_INFO", {
|
|
67308
67992
|
enumerable: true,
|
|
67309
67993
|
get: function() {
|
|
@@ -67490,7 +68174,7 @@ var require_default_service_name$1 = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
67490
68174
|
}));
|
|
67491
68175
|
//#endregion
|
|
67492
68176
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/platform/node/index.js
|
|
67493
|
-
var require_node$
|
|
68177
|
+
var require_node$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
67494
68178
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67495
68179
|
exports.defaultServiceName = void 0;
|
|
67496
68180
|
var default_service_name_1 = require_default_service_name$1();
|
|
@@ -67503,10 +68187,10 @@ var require_node$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67503
68187
|
}));
|
|
67504
68188
|
//#endregion
|
|
67505
68189
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/platform/index.js
|
|
67506
|
-
var require_platform$
|
|
68190
|
+
var require_platform$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
67507
68191
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67508
68192
|
exports.defaultServiceName = void 0;
|
|
67509
|
-
var node_1 = require_node$
|
|
68193
|
+
var node_1 = require_node$9();
|
|
67510
68194
|
Object.defineProperty(exports, "defaultServiceName", {
|
|
67511
68195
|
enumerable: true,
|
|
67512
68196
|
get: function() {
|
|
@@ -67534,9 +68218,9 @@ var require_ResourceImpl$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67534
68218
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67535
68219
|
exports.defaultResource = exports.emptyResource = exports.resourceFromDetectedResource = exports.resourceFromAttributes = void 0;
|
|
67536
68220
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
67537
|
-
const core_1 = require_src$
|
|
68221
|
+
const core_1 = require_src$12();
|
|
67538
68222
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
67539
|
-
const platform_1 = require_platform$
|
|
68223
|
+
const platform_1 = require_platform$9();
|
|
67540
68224
|
const utils_1 = require_utils$6();
|
|
67541
68225
|
var ResourceImpl = class ResourceImpl {
|
|
67542
68226
|
_rawAttributes;
|
|
@@ -67673,7 +68357,7 @@ var require_EnvDetector$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67673
68357
|
exports.envDetector = void 0;
|
|
67674
68358
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
67675
68359
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
67676
|
-
const core_1 = require_src$
|
|
68360
|
+
const core_1 = require_src$12();
|
|
67677
68361
|
/**
|
|
67678
68362
|
* EnvDetector can be used to detect the presence of and create a Resource
|
|
67679
68363
|
* from the OTEL_RESOURCE_ATTRIBUTES environment variable.
|
|
@@ -68238,7 +68922,7 @@ var require_ServiceInstanceIdDetector$1 = /* @__PURE__ */ __commonJSMin(((export
|
|
|
68238
68922
|
}));
|
|
68239
68923
|
//#endregion
|
|
68240
68924
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/index.js
|
|
68241
|
-
var require_node$
|
|
68925
|
+
var require_node$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
68242
68926
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68243
68927
|
exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = void 0;
|
|
68244
68928
|
var HostDetector_1 = require_HostDetector$1();
|
|
@@ -68272,10 +68956,10 @@ var require_node$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68272
68956
|
}));
|
|
68273
68957
|
//#endregion
|
|
68274
68958
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/index.js
|
|
68275
|
-
var require_platform$
|
|
68959
|
+
var require_platform$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
68276
68960
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68277
68961
|
exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = void 0;
|
|
68278
|
-
var node_1 = require_node$
|
|
68962
|
+
var node_1 = require_node$8();
|
|
68279
68963
|
Object.defineProperty(exports, "hostDetector", {
|
|
68280
68964
|
enumerable: true,
|
|
68281
68965
|
get: function() {
|
|
@@ -68326,7 +69010,7 @@ var require_detectors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68326
69010
|
return EnvDetector_1.envDetector;
|
|
68327
69011
|
}
|
|
68328
69012
|
});
|
|
68329
|
-
var platform_1 = require_platform$
|
|
69013
|
+
var platform_1 = require_platform$8();
|
|
68330
69014
|
Object.defineProperty(exports, "hostDetector", {
|
|
68331
69015
|
enumerable: true,
|
|
68332
69016
|
get: function() {
|
|
@@ -68361,7 +69045,7 @@ var require_detectors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68361
69045
|
}));
|
|
68362
69046
|
//#endregion
|
|
68363
69047
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/index.js
|
|
68364
|
-
var require_src$
|
|
69048
|
+
var require_src$11 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
68365
69049
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68366
69050
|
exports.defaultServiceName = exports.emptyResource = exports.defaultResource = exports.resourceFromAttributes = exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = exports.envDetector = exports.detectResources = void 0;
|
|
68367
69051
|
var detect_resources_1 = require_detect_resources$1();
|
|
@@ -68421,7 +69105,7 @@ var require_src$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68421
69105
|
return ResourceImpl_1.emptyResource;
|
|
68422
69106
|
}
|
|
68423
69107
|
});
|
|
68424
|
-
var platform_1 = require_platform$
|
|
69108
|
+
var platform_1 = require_platform$9();
|
|
68425
69109
|
Object.defineProperty(exports, "defaultServiceName", {
|
|
68426
69110
|
enumerable: true,
|
|
68427
69111
|
get: function() {
|
|
@@ -68442,7 +69126,7 @@ var require_Span$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68442
69126
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68443
69127
|
exports.SpanImpl = void 0;
|
|
68444
69128
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
68445
|
-
const core_1 = require_src$
|
|
69129
|
+
const core_1 = require_src$12();
|
|
68446
69130
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
68447
69131
|
const enums_1 = require_enums$1();
|
|
68448
69132
|
/**
|
|
@@ -68728,7 +69412,7 @@ var require_ParentBasedSampler$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68728
69412
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68729
69413
|
exports.ParentBasedSampler = void 0;
|
|
68730
69414
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
68731
|
-
const core_1 = require_src$
|
|
69415
|
+
const core_1 = require_src$12();
|
|
68732
69416
|
const AlwaysOffSampler_1 = require_AlwaysOffSampler$1();
|
|
68733
69417
|
const AlwaysOnSampler_1 = require_AlwaysOnSampler$1();
|
|
68734
69418
|
/**
|
|
@@ -68812,7 +69496,7 @@ var require_config$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68812
69496
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68813
69497
|
exports.buildSamplerFromEnv = exports.loadDefaultConfig = void 0;
|
|
68814
69498
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
68815
|
-
const core_1 = require_src$
|
|
69499
|
+
const core_1 = require_src$12();
|
|
68816
69500
|
const AlwaysOffSampler_1 = require_AlwaysOffSampler$1();
|
|
68817
69501
|
const AlwaysOnSampler_1 = require_AlwaysOnSampler$1();
|
|
68818
69502
|
const ParentBasedSampler_1 = require_ParentBasedSampler$1();
|
|
@@ -68889,7 +69573,7 @@ var require_utility$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68889
69573
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68890
69574
|
exports.reconfigureLimits = exports.mergeConfig = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = void 0;
|
|
68891
69575
|
const config_1 = require_config$2();
|
|
68892
|
-
const core_1 = require_src$
|
|
69576
|
+
const core_1 = require_src$12();
|
|
68893
69577
|
exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
|
|
68894
69578
|
exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
|
|
68895
69579
|
/**
|
|
@@ -68930,7 +69614,7 @@ var require_BatchSpanProcessorBase$1 = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
68930
69614
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68931
69615
|
exports.BatchSpanProcessorBase = void 0;
|
|
68932
69616
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
68933
|
-
const core_1 = require_src$
|
|
69617
|
+
const core_1 = require_src$12();
|
|
68934
69618
|
/**
|
|
68935
69619
|
* Implementation of the {@link SpanProcessor} that batches spans exported by
|
|
68936
69620
|
* the SDK then pushes them to the exporter pipeline.
|
|
@@ -69115,7 +69799,7 @@ var require_RandomIdGenerator$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69115
69799
|
}));
|
|
69116
69800
|
//#endregion
|
|
69117
69801
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/index.js
|
|
69118
|
-
var require_node$
|
|
69802
|
+
var require_node$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69119
69803
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69120
69804
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;
|
|
69121
69805
|
var BatchSpanProcessor_1 = require_BatchSpanProcessor$1();
|
|
@@ -69135,10 +69819,10 @@ var require_node$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69135
69819
|
}));
|
|
69136
69820
|
//#endregion
|
|
69137
69821
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/index.js
|
|
69138
|
-
var require_platform$
|
|
69822
|
+
var require_platform$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69139
69823
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69140
69824
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;
|
|
69141
|
-
var node_1 = require_node$
|
|
69825
|
+
var node_1 = require_node$7();
|
|
69142
69826
|
Object.defineProperty(exports, "BatchSpanProcessor", {
|
|
69143
69827
|
enumerable: true,
|
|
69144
69828
|
get: function() {
|
|
@@ -69158,10 +69842,10 @@ var require_Tracer$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69158
69842
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69159
69843
|
exports.Tracer = void 0;
|
|
69160
69844
|
const api = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
69161
|
-
const core_1 = require_src$
|
|
69845
|
+
const core_1 = require_src$12();
|
|
69162
69846
|
const Span_1 = require_Span$1();
|
|
69163
69847
|
const utility_1 = require_utility$1();
|
|
69164
|
-
const platform_1 = require_platform$
|
|
69848
|
+
const platform_1 = require_platform$7();
|
|
69165
69849
|
/**
|
|
69166
69850
|
* This class represents a basic tracer.
|
|
69167
69851
|
*/
|
|
@@ -69280,7 +69964,7 @@ var require_Tracer$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69280
69964
|
var require_MultiSpanProcessor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69281
69965
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69282
69966
|
exports.MultiSpanProcessor = void 0;
|
|
69283
|
-
const core_1 = require_src$
|
|
69967
|
+
const core_1 = require_src$12();
|
|
69284
69968
|
/**
|
|
69285
69969
|
* Implementation of the {@link SpanProcessor} that simply forwards all
|
|
69286
69970
|
* received events to a list of {@link SpanProcessor}s.
|
|
@@ -69325,8 +70009,8 @@ var require_MultiSpanProcessor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69325
70009
|
var require_BasicTracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69326
70010
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69327
70011
|
exports.BasicTracerProvider = exports.ForceFlushState = void 0;
|
|
69328
|
-
const core_1 = require_src$
|
|
69329
|
-
const resources_1 = require_src$
|
|
70012
|
+
const core_1 = require_src$12();
|
|
70013
|
+
const resources_1 = require_src$11();
|
|
69330
70014
|
const Tracer_1 = require_Tracer$1();
|
|
69331
70015
|
const config_1 = require_config$2();
|
|
69332
70016
|
const MultiSpanProcessor_1 = require_MultiSpanProcessor$1();
|
|
@@ -69404,7 +70088,7 @@ var require_BasicTracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69404
70088
|
var require_ConsoleSpanExporter$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69405
70089
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69406
70090
|
exports.ConsoleSpanExporter = void 0;
|
|
69407
|
-
const core_1 = require_src$
|
|
70091
|
+
const core_1 = require_src$12();
|
|
69408
70092
|
/**
|
|
69409
70093
|
* This is implementation of {@link SpanExporter} that prints spans to the
|
|
69410
70094
|
* console. This class can be used for diagnostic purposes.
|
|
@@ -69472,7 +70156,7 @@ var require_ConsoleSpanExporter$1 = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
69472
70156
|
var require_InMemorySpanExporter$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69473
70157
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69474
70158
|
exports.InMemorySpanExporter = void 0;
|
|
69475
|
-
const core_1 = require_src$
|
|
70159
|
+
const core_1 = require_src$12();
|
|
69476
70160
|
/**
|
|
69477
70161
|
* This class can be used for testing purposes. It stores the exported spans
|
|
69478
70162
|
* in a list in memory that can be retrieved using the `getFinishedSpans()`
|
|
@@ -69519,7 +70203,7 @@ var require_SimpleSpanProcessor$1 = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
69519
70203
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69520
70204
|
exports.SimpleSpanProcessor = void 0;
|
|
69521
70205
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
69522
|
-
const core_1 = require_src$
|
|
70206
|
+
const core_1 = require_src$12();
|
|
69523
70207
|
/**
|
|
69524
70208
|
* An implementation of the {@link SpanProcessor} that converts the {@link Span}
|
|
69525
70209
|
* to {@link ReadableSpan} and passes it to the configured exporter.
|
|
@@ -69583,7 +70267,7 @@ var require_NoopSpanProcessor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69583
70267
|
}));
|
|
69584
70268
|
//#endregion
|
|
69585
70269
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/index.js
|
|
69586
|
-
var require_src$
|
|
70270
|
+
var require_src$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69587
70271
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69588
70272
|
exports.SamplingDecision = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NoopSpanProcessor = exports.SimpleSpanProcessor = exports.InMemorySpanExporter = exports.ConsoleSpanExporter = exports.RandomIdGenerator = exports.BatchSpanProcessor = exports.BasicTracerProvider = void 0;
|
|
69589
70273
|
var BasicTracerProvider_1 = require_BasicTracerProvider();
|
|
@@ -69593,7 +70277,7 @@ var require_src$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69593
70277
|
return BasicTracerProvider_1.BasicTracerProvider;
|
|
69594
70278
|
}
|
|
69595
70279
|
});
|
|
69596
|
-
var platform_1 = require_platform$
|
|
70280
|
+
var platform_1 = require_platform$7();
|
|
69597
70281
|
Object.defineProperty(exports, "BatchSpanProcessor", {
|
|
69598
70282
|
enumerable: true,
|
|
69599
70283
|
get: function() {
|
|
@@ -69675,10 +70359,10 @@ var require_src$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69675
70359
|
var require_NodeTracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69676
70360
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69677
70361
|
exports.NodeTracerProvider = void 0;
|
|
69678
|
-
const context_async_hooks_1 = require_src$
|
|
69679
|
-
const sdk_trace_base_1 = require_src$
|
|
70362
|
+
const context_async_hooks_1 = require_src$13();
|
|
70363
|
+
const sdk_trace_base_1 = require_src$10();
|
|
69680
70364
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
69681
|
-
const core_1 = require_src$
|
|
70365
|
+
const core_1 = require_src$12();
|
|
69682
70366
|
function setupContextManager(contextManager) {
|
|
69683
70367
|
if (contextManager === null) return;
|
|
69684
70368
|
if (contextManager === void 0) {
|
|
@@ -69726,7 +70410,7 @@ var require_NodeTracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69726
70410
|
}));
|
|
69727
70411
|
//#endregion
|
|
69728
70412
|
//#region ../../node_modules/.pnpm/@effect+opentelemetry@4.0.0-rc.112_@opentelemetry+api-logs@0.208.0_@opentelemetry+api@1_7701debc00a5bb5eabaf6c887c6cbde9/node_modules/@effect/opentelemetry/dist/internal/utilities.js
|
|
69729
|
-
var import_src$
|
|
70413
|
+
var import_src$5 = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69730
70414
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69731
70415
|
exports.TraceIdRatioBasedSampler = exports.SimpleSpanProcessor = exports.SamplingDecision = exports.RandomIdGenerator = exports.ParentBasedSampler = exports.NoopSpanProcessor = exports.InMemorySpanExporter = exports.ConsoleSpanExporter = exports.BatchSpanProcessor = exports.BasicTracerProvider = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NodeTracerProvider = void 0;
|
|
69732
70416
|
var NodeTracerProvider_1 = require_NodeTracerProvider();
|
|
@@ -69736,7 +70420,7 @@ var import_src$4 = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69736
70420
|
return NodeTracerProvider_1.NodeTracerProvider;
|
|
69737
70421
|
}
|
|
69738
70422
|
});
|
|
69739
|
-
var sdk_trace_base_1 = require_src$
|
|
70423
|
+
var sdk_trace_base_1 = require_src$10();
|
|
69740
70424
|
Object.defineProperty(exports, "AlwaysOffSampler", {
|
|
69741
70425
|
enumerable: true,
|
|
69742
70426
|
get: function() {
|
|
@@ -69953,7 +70637,7 @@ var require_globalThis$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69953
70637
|
}));
|
|
69954
70638
|
//#endregion
|
|
69955
70639
|
//#region ../../node_modules/.pnpm/@opentelemetry+api-logs@0.208.0/node_modules/@opentelemetry/api-logs/build/src/platform/node/index.js
|
|
69956
|
-
var require_node$
|
|
70640
|
+
var require_node$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69957
70641
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69958
70642
|
exports._globalThis = void 0;
|
|
69959
70643
|
var globalThis_1 = require_globalThis$1();
|
|
@@ -69966,10 +70650,10 @@ var require_node$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69966
70650
|
}));
|
|
69967
70651
|
//#endregion
|
|
69968
70652
|
//#region ../../node_modules/.pnpm/@opentelemetry+api-logs@0.208.0/node_modules/@opentelemetry/api-logs/build/src/platform/index.js
|
|
69969
|
-
var require_platform$
|
|
70653
|
+
var require_platform$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69970
70654
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69971
70655
|
exports._globalThis = void 0;
|
|
69972
|
-
var node_1 = require_node$
|
|
70656
|
+
var node_1 = require_node$6();
|
|
69973
70657
|
Object.defineProperty(exports, "_globalThis", {
|
|
69974
70658
|
enumerable: true,
|
|
69975
70659
|
get: function() {
|
|
@@ -69982,7 +70666,7 @@ var require_platform$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69982
70666
|
var require_global_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69983
70667
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69984
70668
|
exports.API_BACKWARDS_COMPATIBILITY_VERSION = exports.makeGetter = exports._global = exports.GLOBAL_LOGS_API_KEY = void 0;
|
|
69985
|
-
const platform_1 = require_platform$
|
|
70669
|
+
const platform_1 = require_platform$6();
|
|
69986
70670
|
exports.GLOBAL_LOGS_API_KEY = Symbol.for("io.opentelemetry.js.api.logs");
|
|
69987
70671
|
exports._global = platform_1._globalThis;
|
|
69988
70672
|
/**
|
|
@@ -70054,7 +70738,7 @@ var require_logs$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70054
70738
|
}));
|
|
70055
70739
|
//#endregion
|
|
70056
70740
|
//#region ../../node_modules/.pnpm/@opentelemetry+api-logs@0.208.0/node_modules/@opentelemetry/api-logs/build/src/index.js
|
|
70057
|
-
var require_src$
|
|
70741
|
+
var require_src$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70058
70742
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70059
70743
|
exports.logs = exports.ProxyLoggerProvider = exports.NoopLogger = exports.NOOP_LOGGER = exports.SeverityNumber = void 0;
|
|
70060
70744
|
var LogRecord_1 = require_LogRecord();
|
|
@@ -70092,7 +70776,7 @@ var require_LogRecordImpl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70092
70776
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70093
70777
|
exports.LogRecordImpl = void 0;
|
|
70094
70778
|
const api = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
70095
|
-
const core_1 = require_src$
|
|
70779
|
+
const core_1 = require_src$12();
|
|
70096
70780
|
var LogRecordImpl = class {
|
|
70097
70781
|
hrTime;
|
|
70098
70782
|
hrTimeObserved;
|
|
@@ -70269,7 +70953,7 @@ var require_Logger = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70269
70953
|
var require_config$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70270
70954
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70271
70955
|
exports.reconfigureLimits = exports.loadDefaultConfig = void 0;
|
|
70272
|
-
const core_1 = require_src$
|
|
70956
|
+
const core_1 = require_src$12();
|
|
70273
70957
|
function loadDefaultConfig() {
|
|
70274
70958
|
return {
|
|
70275
70959
|
forceFlushTimeoutMillis: 3e4,
|
|
@@ -70321,7 +71005,7 @@ var require_NoopLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
70321
71005
|
var require_MultiLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70322
71006
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70323
71007
|
exports.MultiLogRecordProcessor = void 0;
|
|
70324
|
-
const core_1 = require_src$
|
|
71008
|
+
const core_1 = require_src$12();
|
|
70325
71009
|
/**
|
|
70326
71010
|
* Implementation of the {@link LogRecordProcessor} that simply forwards all
|
|
70327
71011
|
* received events to a list of {@link LogRecordProcessor}s.
|
|
@@ -70380,9 +71064,9 @@ var require_LoggerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70380
71064
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70381
71065
|
exports.LoggerProvider = exports.DEFAULT_LOGGER_NAME = void 0;
|
|
70382
71066
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
70383
|
-
const api_logs_1 = require_src$
|
|
70384
|
-
const resources_1 = require_src$
|
|
70385
|
-
const core_1 = require_src$
|
|
71067
|
+
const api_logs_1 = require_src$8();
|
|
71068
|
+
const resources_1 = require_src$11();
|
|
71069
|
+
const core_1 = require_src$12();
|
|
70386
71070
|
const Logger_1 = require_Logger();
|
|
70387
71071
|
const config_1 = require_config$1();
|
|
70388
71072
|
const LoggerProviderSharedState_1 = require_LoggerProviderSharedState();
|
|
@@ -70450,7 +71134,7 @@ var require_LoggerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70450
71134
|
var require_ConsoleLogRecordExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70451
71135
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70452
71136
|
exports.ConsoleLogRecordExporter = void 0;
|
|
70453
|
-
const core_1 = require_src$
|
|
71137
|
+
const core_1 = require_src$12();
|
|
70454
71138
|
/**
|
|
70455
71139
|
* This is implementation of {@link LogRecordExporter} that prints LogRecords to the
|
|
70456
71140
|
* console. This class can be used for diagnostic purposes.
|
|
@@ -70507,7 +71191,7 @@ var require_ConsoleLogRecordExporter = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
70507
71191
|
var require_SimpleLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70508
71192
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70509
71193
|
exports.SimpleLogRecordProcessor = void 0;
|
|
70510
|
-
const core_1 = require_src$
|
|
71194
|
+
const core_1 = require_src$12();
|
|
70511
71195
|
/**
|
|
70512
71196
|
* An implementation of the {@link LogRecordProcessor} interface that exports
|
|
70513
71197
|
* each {@link LogRecord} as it is emitted.
|
|
@@ -70556,7 +71240,7 @@ var require_SimpleLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
70556
71240
|
var require_InMemoryLogRecordExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70557
71241
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70558
71242
|
exports.InMemoryLogRecordExporter = void 0;
|
|
70559
|
-
const core_1 = require_src$
|
|
71243
|
+
const core_1 = require_src$12();
|
|
70560
71244
|
/**
|
|
70561
71245
|
* This class can be used for testing purposes. It stores the exported LogRecords
|
|
70562
71246
|
* in a list in memory that can be retrieved using the `getFinishedLogRecords()`
|
|
@@ -70597,7 +71281,7 @@ var require_BatchLogRecordProcessorBase = /* @__PURE__ */ __commonJSMin(((export
|
|
|
70597
71281
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70598
71282
|
exports.BatchLogRecordProcessorBase = void 0;
|
|
70599
71283
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
70600
|
-
const core_1 = require_src$
|
|
71284
|
+
const core_1 = require_src$12();
|
|
70601
71285
|
var BatchLogRecordProcessorBase = class {
|
|
70602
71286
|
_exporter;
|
|
70603
71287
|
_maxExportBatchSize;
|
|
@@ -70714,7 +71398,7 @@ var require_BatchLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
70714
71398
|
}));
|
|
70715
71399
|
//#endregion
|
|
70716
71400
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/platform/node/index.js
|
|
70717
|
-
var require_node$
|
|
71401
|
+
var require_node$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70718
71402
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70719
71403
|
exports.BatchLogRecordProcessor = void 0;
|
|
70720
71404
|
var BatchLogRecordProcessor_1 = require_BatchLogRecordProcessor();
|
|
@@ -70727,10 +71411,10 @@ var require_node$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70727
71411
|
}));
|
|
70728
71412
|
//#endregion
|
|
70729
71413
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/platform/index.js
|
|
70730
|
-
var require_platform$
|
|
71414
|
+
var require_platform$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70731
71415
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70732
71416
|
exports.BatchLogRecordProcessor = void 0;
|
|
70733
|
-
var node_1 = require_node$
|
|
71417
|
+
var node_1 = require_node$5();
|
|
70734
71418
|
Object.defineProperty(exports, "BatchLogRecordProcessor", {
|
|
70735
71419
|
enumerable: true,
|
|
70736
71420
|
get: function() {
|
|
@@ -70740,7 +71424,7 @@ var require_platform$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70740
71424
|
}));
|
|
70741
71425
|
//#endregion
|
|
70742
71426
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/index.js
|
|
70743
|
-
var require_src$
|
|
71427
|
+
var require_src$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70744
71428
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70745
71429
|
exports.BatchLogRecordProcessor = exports.InMemoryLogRecordExporter = exports.SimpleLogRecordProcessor = exports.ConsoleLogRecordExporter = exports.LoggerProvider = void 0;
|
|
70746
71430
|
var LoggerProvider_1 = require_LoggerProvider();
|
|
@@ -70771,7 +71455,7 @@ var require_src$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70771
71455
|
return InMemoryLogRecordExporter_1.InMemoryLogRecordExporter;
|
|
70772
71456
|
}
|
|
70773
71457
|
});
|
|
70774
|
-
var platform_1 = require_platform$
|
|
71458
|
+
var platform_1 = require_platform$5();
|
|
70775
71459
|
Object.defineProperty(exports, "BatchLogRecordProcessor", {
|
|
70776
71460
|
enumerable: true,
|
|
70777
71461
|
get: function() {
|
|
@@ -70781,8 +71465,8 @@ var require_src$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70781
71465
|
}));
|
|
70782
71466
|
//#endregion
|
|
70783
71467
|
//#region ../../node_modules/.pnpm/@effect+opentelemetry@4.0.0-rc.112_@opentelemetry+api-logs@0.208.0_@opentelemetry+api@1_7701debc00a5bb5eabaf6c887c6cbde9/node_modules/@effect/opentelemetry/dist/internal/attributes.js
|
|
70784
|
-
var import_src$
|
|
70785
|
-
var import_src$
|
|
71468
|
+
var import_src$7 = require_src$8();
|
|
71469
|
+
var import_src$8 = /* @__PURE__ */ __toESM(require_src$7(), 1);
|
|
70786
71470
|
const bigint1e9 = /*#__PURE__*/ BigInt(1e9);
|
|
70787
71471
|
/** @internal */
|
|
70788
71472
|
const nanosToHrTime = (timestamp) => {
|
|
@@ -71272,7 +71956,7 @@ var require_sdk_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
71272
71956
|
}));
|
|
71273
71957
|
//#endregion
|
|
71274
71958
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/src/platform/node/index.js
|
|
71275
|
-
var require_node$
|
|
71959
|
+
var require_node$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
71276
71960
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71277
71961
|
exports.otperformance = exports.SDK_INFO = exports._globalThis = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = void 0;
|
|
71278
71962
|
var environment_1 = require_environment();
|
|
@@ -71321,10 +72005,10 @@ var require_node$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
71321
72005
|
}));
|
|
71322
72006
|
//#endregion
|
|
71323
72007
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/src/platform/index.js
|
|
71324
|
-
var require_platform$
|
|
72008
|
+
var require_platform$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
71325
72009
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71326
72010
|
exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getStringFromEnv = exports.getBooleanFromEnv = exports.otperformance = exports._globalThis = exports.SDK_INFO = void 0;
|
|
71327
|
-
var node_1 = require_node$
|
|
72011
|
+
var node_1 = require_node$4();
|
|
71328
72012
|
Object.defineProperty(exports, "SDK_INFO", {
|
|
71329
72013
|
enumerable: true,
|
|
71330
72014
|
get: function() {
|
|
@@ -71373,7 +72057,7 @@ var require_platform$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
71373
72057
|
var require_time = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
71374
72058
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71375
72059
|
exports.addHrTimes = exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToSeconds = exports.hrTimeToMilliseconds = exports.hrTimeToMicroseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = exports.getTimeOrigin = exports.millisToHrTime = void 0;
|
|
71376
|
-
const platform_1 = require_platform$
|
|
72060
|
+
const platform_1 = require_platform$4();
|
|
71377
72061
|
const NANOSECOND_DIGITS = 9;
|
|
71378
72062
|
const MILLISECONDS_TO_NANOSECONDS = Math.pow(10, 6);
|
|
71379
72063
|
const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);
|
|
@@ -72218,7 +72902,7 @@ var require_exporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
72218
72902
|
}));
|
|
72219
72903
|
//#endregion
|
|
72220
72904
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/src/index.js
|
|
72221
|
-
var require_src$
|
|
72905
|
+
var require_src$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
72222
72906
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72223
72907
|
exports.diagLogLevelFromString = exports.BindOnceFuture = exports.urlMatches = exports.isUrlIgnored = exports.callWithTimeout = exports.TimeoutError = exports.merge = exports.TraceState = exports.unsuppressTracing = exports.suppressTracing = exports.isTracingSuppressed = exports.setRPCMetadata = exports.getRPCMetadata = exports.deleteRPCMetadata = exports.RPCType = exports.parseTraceParent = exports.W3CTraceContextPropagator = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = exports.CompositePropagator = exports.otperformance = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = exports._globalThis = exports.SDK_INFO = exports.parseKeyPairsIntoRecord = exports.ExportResultCode = exports.unrefTimer = exports.timeInputToHrTime = exports.millisToHrTime = exports.isTimeInputHrTime = exports.isTimeInput = exports.hrTimeToTimeStamp = exports.hrTimeToSeconds = exports.hrTimeToNanoseconds = exports.hrTimeToMilliseconds = exports.hrTimeToMicroseconds = exports.hrTimeDuration = exports.hrTime = exports.getTimeOrigin = exports.addHrTimes = exports.loggingErrorHandler = exports.setGlobalErrorHandler = exports.globalErrorHandler = exports.sanitizeAttributes = exports.isAttributeValue = exports.AnchoredClock = exports.W3CBaggagePropagator = void 0;
|
|
72224
72908
|
exports.internal = void 0;
|
|
@@ -72369,7 +73053,7 @@ var require_src$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
72369
73053
|
return utils_1.parseKeyPairsIntoRecord;
|
|
72370
73054
|
}
|
|
72371
73055
|
});
|
|
72372
|
-
var platform_1 = require_platform$
|
|
73056
|
+
var platform_1 = require_platform$4();
|
|
72373
73057
|
Object.defineProperty(exports, "SDK_INFO", {
|
|
72374
73058
|
enumerable: true,
|
|
72375
73059
|
get: function() {
|
|
@@ -72587,7 +73271,7 @@ var require_ResourceImpl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
72587
73271
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72588
73272
|
exports.defaultResource = exports.emptyResource = exports.resourceFromDetectedResource = exports.resourceFromAttributes = void 0;
|
|
72589
73273
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
72590
|
-
const core_1 = require_src$
|
|
73274
|
+
const core_1 = require_src$6();
|
|
72591
73275
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
72592
73276
|
const default_service_name_1 = require_default_service_name();
|
|
72593
73277
|
const utils_1 = require_utils$3();
|
|
@@ -72726,7 +73410,7 @@ var require_EnvDetector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
72726
73410
|
exports.envDetector = void 0;
|
|
72727
73411
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
72728
73412
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
72729
|
-
const core_1 = require_src$
|
|
73413
|
+
const core_1 = require_src$6();
|
|
72730
73414
|
/**
|
|
72731
73415
|
* EnvDetector can be used to detect the presence of and create a Resource
|
|
72732
73416
|
* from the OTEL_RESOURCE_ATTRIBUTES environment variable.
|
|
@@ -73275,7 +73959,7 @@ var require_ServiceInstanceIdDetector = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
73275
73959
|
}));
|
|
73276
73960
|
//#endregion
|
|
73277
73961
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/index.js
|
|
73278
|
-
var require_node$
|
|
73962
|
+
var require_node$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
73279
73963
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73280
73964
|
exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = void 0;
|
|
73281
73965
|
var HostDetector_1 = require_HostDetector();
|
|
@@ -73309,10 +73993,10 @@ var require_node$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
73309
73993
|
}));
|
|
73310
73994
|
//#endregion
|
|
73311
73995
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/index.js
|
|
73312
|
-
var require_platform$
|
|
73996
|
+
var require_platform$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
73313
73997
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73314
73998
|
exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = void 0;
|
|
73315
|
-
var node_1 = require_node$
|
|
73999
|
+
var node_1 = require_node$3();
|
|
73316
74000
|
Object.defineProperty(exports, "hostDetector", {
|
|
73317
74001
|
enumerable: true,
|
|
73318
74002
|
get: function() {
|
|
@@ -73363,7 +74047,7 @@ var require_detectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
73363
74047
|
return EnvDetector_1.envDetector;
|
|
73364
74048
|
}
|
|
73365
74049
|
});
|
|
73366
|
-
var platform_1 = require_platform$
|
|
74050
|
+
var platform_1 = require_platform$3();
|
|
73367
74051
|
Object.defineProperty(exports, "hostDetector", {
|
|
73368
74052
|
enumerable: true,
|
|
73369
74053
|
get: function() {
|
|
@@ -73398,7 +74082,7 @@ var require_detectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
73398
74082
|
}));
|
|
73399
74083
|
//#endregion
|
|
73400
74084
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/index.js
|
|
73401
|
-
var require_src$
|
|
74085
|
+
var require_src$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
73402
74086
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73403
74087
|
exports.defaultServiceName = exports.emptyResource = exports.defaultResource = exports.resourceFromAttributes = exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = exports.envDetector = exports.detectResources = void 0;
|
|
73404
74088
|
var detect_resources_1 = require_detect_resources();
|
|
@@ -73468,7 +74152,7 @@ var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
73468
74152
|
}));
|
|
73469
74153
|
//#endregion
|
|
73470
74154
|
//#region ../../node_modules/.pnpm/@effect+opentelemetry@4.0.0-rc.112_@opentelemetry+api-logs@0.208.0_@opentelemetry+api@1_7701debc00a5bb5eabaf6c887c6cbde9/node_modules/@effect/opentelemetry/dist/Resource.js
|
|
73471
|
-
var import_src$
|
|
74155
|
+
var import_src$9 = /* @__PURE__ */ __toESM(require_src$5(), 1);
|
|
73472
74156
|
init_esm$1();
|
|
73473
74157
|
/**
|
|
73474
74158
|
* Service tag for OpenTelemetry metadata attached to emitted telemetry.
|
|
@@ -73536,7 +74220,7 @@ const layerFromEnv = (additionalAttributes) => effect(Resource, gen(function* ()
|
|
|
73536
74220
|
});
|
|
73537
74221
|
}));
|
|
73538
74222
|
if (serviceName._tag === "Some") attributes[ATTR_SERVICE_NAME] = serviceName.value;
|
|
73539
|
-
return import_src$
|
|
74223
|
+
return import_src$9.resourceFromAttributes({
|
|
73540
74224
|
...attributes,
|
|
73541
74225
|
...additionalAttributes
|
|
73542
74226
|
});
|
|
@@ -73577,13 +74261,13 @@ var OtelLoggerProvider = class extends (/*#__PURE__*/ Service$1()("@effect/opent
|
|
|
73577
74261
|
*/
|
|
73578
74262
|
const logLevelToSeverityNumber = (level) => {
|
|
73579
74263
|
switch (level) {
|
|
73580
|
-
case "Trace": return import_src$
|
|
73581
|
-
case "Debug": return import_src$
|
|
73582
|
-
case "Info": return import_src$
|
|
73583
|
-
case "Warn": return import_src$
|
|
73584
|
-
case "Error": return import_src$
|
|
73585
|
-
case "Fatal": return import_src$
|
|
73586
|
-
default: return import_src$
|
|
74264
|
+
case "Trace": return import_src$7.SeverityNumber.TRACE;
|
|
74265
|
+
case "Debug": return import_src$7.SeverityNumber.DEBUG;
|
|
74266
|
+
case "Info": return import_src$7.SeverityNumber.INFO;
|
|
74267
|
+
case "Warn": return import_src$7.SeverityNumber.WARN;
|
|
74268
|
+
case "Error": return import_src$7.SeverityNumber.ERROR;
|
|
74269
|
+
case "Fatal": return import_src$7.SeverityNumber.FATAL;
|
|
74270
|
+
default: return import_src$7.SeverityNumber.UNSPECIFIED;
|
|
73587
74271
|
}
|
|
73588
74272
|
};
|
|
73589
74273
|
/**
|
|
@@ -73647,7 +74331,7 @@ const layer$4 = (options) => layer$12([make$1], { mergeWithExisting: options.mer
|
|
|
73647
74331
|
*/
|
|
73648
74332
|
const layerLoggerProvider = (processor, config) => effect(OtelLoggerProvider, gen(function* () {
|
|
73649
74333
|
const resource = yield* Resource;
|
|
73650
|
-
return yield* acquireRelease(sync(() => new import_src$
|
|
74334
|
+
return yield* acquireRelease(sync(() => new import_src$8.LoggerProvider({
|
|
73651
74335
|
...config ?? void 0,
|
|
73652
74336
|
processors: ensure(processor),
|
|
73653
74337
|
resource
|
|
@@ -74951,7 +75635,7 @@ var require_LastValue = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
74951
75635
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74952
75636
|
exports.LastValueAggregator = exports.LastValueAccumulation = void 0;
|
|
74953
75637
|
const types_1 = require_types$1();
|
|
74954
|
-
const core_1 = require_src$
|
|
75638
|
+
const core_1 = require_src$12();
|
|
74955
75639
|
const MetricData_1 = require_MetricData();
|
|
74956
75640
|
var LastValueAccumulation = class {
|
|
74957
75641
|
startTime;
|
|
@@ -75438,7 +76122,7 @@ var require_PeriodicExportingMetricReader = /* @__PURE__ */ __commonJSMin(((expo
|
|
|
75438
76122
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75439
76123
|
exports.PeriodicExportingMetricReader = void 0;
|
|
75440
76124
|
const api = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
75441
|
-
const core_1 = require_src$
|
|
76125
|
+
const core_1 = require_src$12();
|
|
75442
76126
|
const MetricReader_1 = require_MetricReader();
|
|
75443
76127
|
const utils_1 = require_utils$1();
|
|
75444
76128
|
/**
|
|
@@ -75510,7 +76194,7 @@ var require_PeriodicExportingMetricReader = /* @__PURE__ */ __commonJSMin(((expo
|
|
|
75510
76194
|
var require_InMemoryMetricExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
75511
76195
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75512
76196
|
exports.InMemoryMetricExporter = void 0;
|
|
75513
|
-
const core_1 = require_src$
|
|
76197
|
+
const core_1 = require_src$12();
|
|
75514
76198
|
/**
|
|
75515
76199
|
* In-memory Metrics Exporter is a Push Metric Exporter
|
|
75516
76200
|
* which accumulates metrics data in the local memory and
|
|
@@ -75562,7 +76246,7 @@ var require_InMemoryMetricExporter = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
75562
76246
|
var require_ConsoleMetricExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
75563
76247
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75564
76248
|
exports.ConsoleMetricExporter = void 0;
|
|
75565
|
-
const core_1 = require_src$
|
|
76249
|
+
const core_1 = require_src$12();
|
|
75566
76250
|
const AggregationSelector_1 = require_AggregationSelector();
|
|
75567
76251
|
exports.ConsoleMetricExporter = class ConsoleMetricExporter {
|
|
75568
76252
|
_shutdown = false;
|
|
@@ -75667,7 +76351,7 @@ var require_Instruments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
75667
76351
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75668
76352
|
exports.isObservableInstrument = exports.ObservableUpDownCounterInstrument = exports.ObservableGaugeInstrument = exports.ObservableCounterInstrument = exports.ObservableInstrument = exports.HistogramInstrument = exports.GaugeInstrument = exports.CounterInstrument = exports.UpDownCounterInstrument = exports.SyncInstrument = void 0;
|
|
75669
76353
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
75670
|
-
const core_1 = require_src$
|
|
76354
|
+
const core_1 = require_src$12();
|
|
75671
76355
|
var SyncInstrument = class {
|
|
75672
76356
|
_writableMetricStorage;
|
|
75673
76357
|
_descriptor;
|
|
@@ -76740,7 +77424,7 @@ var require_MeterProviderSharedState = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
76740
77424
|
var require_MetricCollector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
76741
77425
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76742
77426
|
exports.MetricCollector = void 0;
|
|
76743
|
-
const core_1 = require_src$
|
|
77427
|
+
const core_1 = require_src$12();
|
|
76744
77428
|
/**
|
|
76745
77429
|
* An internal opaque interface that the MetricReader receives as
|
|
76746
77430
|
* MetricProducer. It acts as the storage key to the internal metric stream
|
|
@@ -77012,7 +77696,7 @@ var require_MeterProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
77012
77696
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77013
77697
|
exports.MeterProvider = void 0;
|
|
77014
77698
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
77015
|
-
const resources_1 = require_src$
|
|
77699
|
+
const resources_1 = require_src$11();
|
|
77016
77700
|
const MeterProviderSharedState_1 = require_MeterProviderSharedState();
|
|
77017
77701
|
const MetricCollector_1 = require_MetricCollector();
|
|
77018
77702
|
const View_1 = require_View();
|
|
@@ -77080,7 +77764,7 @@ var require_MeterProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
77080
77764
|
}));
|
|
77081
77765
|
//#endregion
|
|
77082
77766
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-metrics@2.2.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/index.js
|
|
77083
|
-
var require_src$
|
|
77767
|
+
var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
77084
77768
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77085
77769
|
exports.TimeoutError = exports.createDenyListAttributesProcessor = exports.createAllowListAttributesProcessor = exports.AggregationType = exports.MeterProvider = exports.ConsoleMetricExporter = exports.InMemoryMetricExporter = exports.PeriodicExportingMetricReader = exports.MetricReader = exports.InstrumentType = exports.DataPointType = exports.AggregationTemporality = void 0;
|
|
77086
77770
|
var AggregationTemporality_1 = require_AggregationTemporality();
|
|
@@ -77168,7 +77852,7 @@ var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
77168
77852
|
}));
|
|
77169
77853
|
//#endregion
|
|
77170
77854
|
//#region ../../node_modules/.pnpm/@effect+opentelemetry@4.0.0-rc.112_@opentelemetry+api-logs@0.208.0_@opentelemetry+api@1_7701debc00a5bb5eabaf6c887c6cbde9/node_modules/@effect/opentelemetry/dist/internal/metrics.js
|
|
77171
|
-
var import_src$
|
|
77855
|
+
var import_src$6 = require_src$4();
|
|
77172
77856
|
const sdkName = "@effect/opentelemetry/Metrics";
|
|
77173
77857
|
/** @internal */
|
|
77174
77858
|
var MetricProducerImpl = class MetricProducerImpl {
|
|
@@ -77212,7 +77896,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77212
77896
|
metricDataByName.set(data.descriptor.name, data);
|
|
77213
77897
|
};
|
|
77214
77898
|
const isDelta = this.temporality === "delta";
|
|
77215
|
-
const aggregationTemporality = isDelta ? import_src$
|
|
77899
|
+
const aggregationTemporality = isDelta ? import_src$6.AggregationTemporality.DELTA : import_src$6.AggregationTemporality.CUMULATIVE;
|
|
77216
77900
|
const intervalStartTime = isDelta ? this.previousExportTimeNanos : this.startTimeNanos;
|
|
77217
77901
|
for (let i = 0, len = snapshot.length; i < len; i++) {
|
|
77218
77902
|
const state = snapshot[i];
|
|
@@ -77248,7 +77932,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77248
77932
|
};
|
|
77249
77933
|
if (metricDataByName.has(state.id)) metricDataByName.get(state.id).dataPoints.push(dataPoint);
|
|
77250
77934
|
else addMetricData({
|
|
77251
|
-
dataPointType: import_src$
|
|
77935
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77252
77936
|
descriptor,
|
|
77253
77937
|
isMonotonic: state.state.incremental,
|
|
77254
77938
|
aggregationTemporality,
|
|
@@ -77266,9 +77950,9 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77266
77950
|
};
|
|
77267
77951
|
if (metricDataByName.has(state.id)) metricDataByName.get(state.id).dataPoints.push(dataPoint);
|
|
77268
77952
|
else addMetricData({
|
|
77269
|
-
dataPointType: import_src$
|
|
77953
|
+
dataPointType: import_src$6.DataPointType.GAUGE,
|
|
77270
77954
|
descriptor,
|
|
77271
|
-
aggregationTemporality: import_src$
|
|
77955
|
+
aggregationTemporality: import_src$6.AggregationTemporality.CUMULATIVE,
|
|
77272
77956
|
dataPoints: [dataPoint]
|
|
77273
77957
|
});
|
|
77274
77958
|
break;
|
|
@@ -77325,7 +78009,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77325
78009
|
};
|
|
77326
78010
|
if (metricDataByName.has(state.id)) metricDataByName.get(state.id).dataPoints.push(dataPoint);
|
|
77327
78011
|
else addMetricData({
|
|
77328
|
-
dataPointType: import_src$
|
|
78012
|
+
dataPointType: import_src$6.DataPointType.HISTOGRAM,
|
|
77329
78013
|
descriptor,
|
|
77330
78014
|
aggregationTemporality,
|
|
77331
78015
|
dataPoints: [dataPoint]
|
|
@@ -77362,7 +78046,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77362
78046
|
else {
|
|
77363
78047
|
const descriptor = descriptorFromState(state, attributes);
|
|
77364
78048
|
addMetricData({
|
|
77365
|
-
dataPointType: import_src$
|
|
78049
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77366
78050
|
descriptor,
|
|
77367
78051
|
aggregationTemporality,
|
|
77368
78052
|
isMonotonic: true,
|
|
@@ -77431,7 +78115,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77431
78115
|
} else {
|
|
77432
78116
|
const descriptor = descriptorFromState(state, attributes);
|
|
77433
78117
|
addMetricData({
|
|
77434
|
-
dataPointType: import_src$
|
|
78118
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77435
78119
|
descriptor: {
|
|
77436
78120
|
...descriptor,
|
|
77437
78121
|
name: `${descriptor.name}_quantiles`
|
|
@@ -77441,12 +78125,12 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77441
78125
|
dataPoints
|
|
77442
78126
|
});
|
|
77443
78127
|
addMetricData({
|
|
77444
|
-
dataPointType: import_src$
|
|
78128
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77445
78129
|
descriptor: {
|
|
77446
78130
|
name: `${state.id}_count`,
|
|
77447
78131
|
description: state.description ?? "",
|
|
77448
78132
|
unit: "1",
|
|
77449
|
-
type: import_src$
|
|
78133
|
+
type: import_src$6.InstrumentType.COUNTER,
|
|
77450
78134
|
valueType: ValueType.INT,
|
|
77451
78135
|
advice: {}
|
|
77452
78136
|
},
|
|
@@ -77455,12 +78139,12 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77455
78139
|
dataPoints: [countDataPoint]
|
|
77456
78140
|
});
|
|
77457
78141
|
addMetricData({
|
|
77458
|
-
dataPointType: import_src$
|
|
78142
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77459
78143
|
descriptor: {
|
|
77460
78144
|
name: `${state.id}_sum`,
|
|
77461
78145
|
description: state.description ?? "",
|
|
77462
78146
|
unit: "1",
|
|
77463
|
-
type: import_src$
|
|
78147
|
+
type: import_src$6.InstrumentType.COUNTER,
|
|
77464
78148
|
valueType: ValueType.DOUBLE,
|
|
77465
78149
|
advice: {}
|
|
77466
78150
|
},
|
|
@@ -77509,11 +78193,11 @@ const descriptorFromState = (state, attributes) => {
|
|
|
77509
78193
|
};
|
|
77510
78194
|
const instrumentTypeFromSnapshot = (state) => {
|
|
77511
78195
|
switch (state.type) {
|
|
77512
|
-
case "Histogram": return import_src$
|
|
77513
|
-
case "Gauge": return import_src$
|
|
77514
|
-
case "Frequency": return import_src$
|
|
77515
|
-
case "Counter": return state.state.incremental ? import_src$
|
|
77516
|
-
case "Summary": return import_src$
|
|
78196
|
+
case "Histogram": return import_src$6.InstrumentType.HISTOGRAM;
|
|
78197
|
+
case "Gauge": return import_src$6.InstrumentType.OBSERVABLE_GAUGE;
|
|
78198
|
+
case "Frequency": return import_src$6.InstrumentType.COUNTER;
|
|
78199
|
+
case "Counter": return state.state.incremental ? import_src$6.InstrumentType.COUNTER : import_src$6.InstrumentType.UP_DOWN_COUNTER;
|
|
78200
|
+
case "Summary": return import_src$6.InstrumentType.COUNTER;
|
|
77517
78201
|
}
|
|
77518
78202
|
};
|
|
77519
78203
|
const determineValueType = (state) => {
|
|
@@ -77833,7 +78517,7 @@ const populateContext = (context, span, annotations) => span instanceof OtelSpan
|
|
|
77833
78517
|
const layerTracerProvider = (processor, config) => effect(OtelTracerProvider, gen(function* () {
|
|
77834
78518
|
const resource = yield* Resource;
|
|
77835
78519
|
return yield* acquireRelease(sync(() => {
|
|
77836
|
-
return new import_src$
|
|
78520
|
+
return new import_src$5.NodeTracerProvider({
|
|
77837
78521
|
...config ?? void 0,
|
|
77838
78522
|
resource,
|
|
77839
78523
|
spanProcessors: Array.isArray(processor) ? processor : [processor]
|
|
@@ -78022,9 +78706,9 @@ var init_logging_response_handler = __esmMin((() => {
|
|
|
78022
78706
|
function createOtlpExportDelegate(components, settings) {
|
|
78023
78707
|
return new OTLPExportDelegate(components.transport, components.serializer, createLoggingPartialSuccessResponseHandler(), components.promiseHandler, settings.timeout);
|
|
78024
78708
|
}
|
|
78025
|
-
var import_src$
|
|
78709
|
+
var import_src$4, OTLPExportDelegate;
|
|
78026
78710
|
var init_otlp_export_delegate = __esmMin((() => {
|
|
78027
|
-
import_src$
|
|
78711
|
+
import_src$4 = require_src$12();
|
|
78028
78712
|
init_types();
|
|
78029
78713
|
init_logging_response_handler();
|
|
78030
78714
|
init_esm$2();
|
|
@@ -78047,7 +78731,7 @@ var init_otlp_export_delegate = __esmMin((() => {
|
|
|
78047
78731
|
this._diagLogger.debug("items to be sent", internalRepresentation);
|
|
78048
78732
|
if (this._promiseQueue.hasReachedLimit()) {
|
|
78049
78733
|
resultCallback({
|
|
78050
|
-
code: import_src$
|
|
78734
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78051
78735
|
error: /* @__PURE__ */ new Error("Concurrent export limit reached")
|
|
78052
78736
|
});
|
|
78053
78737
|
return;
|
|
@@ -78055,7 +78739,7 @@ var init_otlp_export_delegate = __esmMin((() => {
|
|
|
78055
78739
|
const serializedRequest = this._serializer.serializeRequest(internalRepresentation);
|
|
78056
78740
|
if (serializedRequest == null) {
|
|
78057
78741
|
resultCallback({
|
|
78058
|
-
code: import_src$
|
|
78742
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78059
78743
|
error: /* @__PURE__ */ new Error("Nothing to send")
|
|
78060
78744
|
});
|
|
78061
78745
|
return;
|
|
@@ -78067,24 +78751,24 @@ var init_otlp_export_delegate = __esmMin((() => {
|
|
|
78067
78751
|
} catch (e) {
|
|
78068
78752
|
this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?", e, response.data);
|
|
78069
78753
|
}
|
|
78070
|
-
resultCallback({ code: import_src$
|
|
78754
|
+
resultCallback({ code: import_src$4.ExportResultCode.SUCCESS });
|
|
78071
78755
|
return;
|
|
78072
78756
|
} else if (response.status === "failure" && response.error) {
|
|
78073
78757
|
resultCallback({
|
|
78074
|
-
code: import_src$
|
|
78758
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78075
78759
|
error: response.error
|
|
78076
78760
|
});
|
|
78077
78761
|
return;
|
|
78078
78762
|
} else if (response.status === "retryable") resultCallback({
|
|
78079
|
-
code: import_src$
|
|
78763
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78080
78764
|
error: new OTLPExporterError("Export failed with retryable status")
|
|
78081
78765
|
});
|
|
78082
78766
|
else resultCallback({
|
|
78083
|
-
code: import_src$
|
|
78767
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78084
78768
|
error: new OTLPExporterError("Export failed with unknown error")
|
|
78085
78769
|
});
|
|
78086
78770
|
}, (reason) => resultCallback({
|
|
78087
|
-
code: import_src$
|
|
78771
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78088
78772
|
error: reason
|
|
78089
78773
|
})));
|
|
78090
78774
|
}
|
|
@@ -93466,7 +94150,7 @@ var require_hex_to_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
93466
94150
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
93467
94151
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
93468
94152
|
exports.getOtlpEncoder = exports.encodeAsString = exports.encodeAsLongBits = exports.toLongBits = exports.hrTimeToNanos = void 0;
|
|
93469
|
-
const core_1 = require_src$
|
|
94153
|
+
const core_1 = require_src$12();
|
|
93470
94154
|
const hex_to_binary_1 = require_hex_to_binary();
|
|
93471
94155
|
function hrTimeToNanos(hrTime) {
|
|
93472
94156
|
const NANOSECONDS = BigInt(1e9);
|
|
@@ -93739,7 +94423,7 @@ var require_internal$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
93739
94423
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
93740
94424
|
exports.createExportMetricsServiceRequest = exports.toMetric = exports.toScopeMetrics = exports.toResourceMetrics = void 0;
|
|
93741
94425
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
93742
|
-
const sdk_metrics_1 = require_src$
|
|
94426
|
+
const sdk_metrics_1 = require_src$4();
|
|
93743
94427
|
const internal_types_1 = require_internal_types();
|
|
93744
94428
|
const utils_1 = require_utils();
|
|
93745
94429
|
const internal_1 = require_internal$3();
|
|
@@ -94149,7 +94833,7 @@ var require_json = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94149
94833
|
}));
|
|
94150
94834
|
//#endregion
|
|
94151
94835
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-transformer/build/src/index.js
|
|
94152
|
-
var require_src$
|
|
94836
|
+
var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
94153
94837
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94154
94838
|
exports.JsonTraceSerializer = exports.JsonMetricsSerializer = exports.JsonLogsSerializer = exports.ProtobufTraceSerializer = exports.ProtobufMetricsSerializer = exports.ProtobufLogsSerializer = void 0;
|
|
94155
94839
|
var protobuf_1 = require_protobuf$2();
|
|
@@ -94509,7 +95193,7 @@ var init_otlp_http_export_delegate = __esmMin((() => {
|
|
|
94509
95193
|
//#endregion
|
|
94510
95194
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/shared-env-configuration.js
|
|
94511
95195
|
function parseAndValidateTimeoutFromEnv(timeoutEnvVar) {
|
|
94512
|
-
const envTimeout = (0, import_src$
|
|
95196
|
+
const envTimeout = (0, import_src$3.getNumberFromEnv)(timeoutEnvVar);
|
|
94513
95197
|
if (envTimeout != null) {
|
|
94514
95198
|
if (Number.isFinite(envTimeout) && envTimeout > 0) return envTimeout;
|
|
94515
95199
|
diag.warn(`Configuration: ${timeoutEnvVar} is invalid, expected number greater than 0 (actual: ${envTimeout})`);
|
|
@@ -94521,7 +95205,7 @@ function getTimeoutFromEnv(signalIdentifier) {
|
|
|
94521
95205
|
return specificTimeout ?? nonSpecificTimeout;
|
|
94522
95206
|
}
|
|
94523
95207
|
function parseAndValidateCompressionFromEnv(compressionEnvVar) {
|
|
94524
|
-
const compression = (0, import_src$
|
|
95208
|
+
const compression = (0, import_src$3.getStringFromEnv)(compressionEnvVar)?.trim();
|
|
94525
95209
|
if (compression == null || compression === "none" || compression === "gzip") return compression;
|
|
94526
95210
|
diag.warn(`Configuration: ${compressionEnvVar} is invalid, expected 'none' or 'gzip' (actual: '${compression}')`);
|
|
94527
95211
|
}
|
|
@@ -94536,20 +95220,20 @@ function getSharedConfigurationFromEnvironment(signalIdentifier) {
|
|
|
94536
95220
|
compression: getCompressionFromEnv(signalIdentifier)
|
|
94537
95221
|
};
|
|
94538
95222
|
}
|
|
94539
|
-
var import_src$
|
|
95223
|
+
var import_src$3;
|
|
94540
95224
|
var init_shared_env_configuration = __esmMin((() => {
|
|
94541
|
-
import_src$
|
|
95225
|
+
import_src$3 = require_src$12();
|
|
94542
95226
|
init_esm$2();
|
|
94543
95227
|
}));
|
|
94544
95228
|
//#endregion
|
|
94545
95229
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-node-http-env-configuration.js
|
|
94546
95230
|
function getStaticHeadersFromEnv(signalIdentifier) {
|
|
94547
|
-
const signalSpecificRawHeaders = (0, import_src$
|
|
94548
|
-
const nonSignalSpecificRawHeaders = (0, import_src$
|
|
94549
|
-
const signalSpecificHeaders = (0, import_src$
|
|
94550
|
-
const nonSignalSpecificHeaders = (0, import_src$
|
|
95231
|
+
const signalSpecificRawHeaders = (0, import_src$2.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${signalIdentifier}_HEADERS`);
|
|
95232
|
+
const nonSignalSpecificRawHeaders = (0, import_src$2.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS");
|
|
95233
|
+
const signalSpecificHeaders = (0, import_src$2.parseKeyPairsIntoRecord)(signalSpecificRawHeaders);
|
|
95234
|
+
const nonSignalSpecificHeaders = (0, import_src$2.parseKeyPairsIntoRecord)(nonSignalSpecificRawHeaders);
|
|
94551
95235
|
if (Object.keys(signalSpecificHeaders).length === 0 && Object.keys(nonSignalSpecificHeaders).length === 0) return;
|
|
94552
|
-
return Object.assign({}, (0, import_src$
|
|
95236
|
+
return Object.assign({}, (0, import_src$2.parseKeyPairsIntoRecord)(nonSignalSpecificRawHeaders), (0, import_src$2.parseKeyPairsIntoRecord)(signalSpecificRawHeaders));
|
|
94553
95237
|
}
|
|
94554
95238
|
function appendRootPathToUrlIfNeeded(url) {
|
|
94555
95239
|
try {
|
|
@@ -94577,18 +95261,18 @@ function appendResourcePathToUrl(url, path) {
|
|
|
94577
95261
|
return url;
|
|
94578
95262
|
}
|
|
94579
95263
|
function getNonSpecificUrlFromEnv(signalResourcePath) {
|
|
94580
|
-
const envUrl = (0, import_src$
|
|
95264
|
+
const envUrl = (0, import_src$2.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");
|
|
94581
95265
|
if (envUrl === void 0) return;
|
|
94582
95266
|
return appendResourcePathToUrl(envUrl, signalResourcePath);
|
|
94583
95267
|
}
|
|
94584
95268
|
function getSpecificUrlFromEnv(signalIdentifier) {
|
|
94585
|
-
const envUrl = (0, import_src$
|
|
95269
|
+
const envUrl = (0, import_src$2.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${signalIdentifier}_ENDPOINT`);
|
|
94586
95270
|
if (envUrl === void 0) return;
|
|
94587
95271
|
return appendRootPathToUrlIfNeeded(envUrl);
|
|
94588
95272
|
}
|
|
94589
95273
|
function readFileFromEnv(signalSpecificEnvVar, nonSignalSpecificEnvVar, warningMessage) {
|
|
94590
|
-
const signalSpecificPath = (0, import_src$
|
|
94591
|
-
const nonSignalSpecificPath = (0, import_src$
|
|
95274
|
+
const signalSpecificPath = (0, import_src$2.getStringFromEnv)(signalSpecificEnvVar);
|
|
95275
|
+
const nonSignalSpecificPath = (0, import_src$2.getStringFromEnv)(nonSignalSpecificEnvVar);
|
|
94592
95276
|
const filePath = signalSpecificPath ?? nonSignalSpecificPath;
|
|
94593
95277
|
if (filePath != null) try {
|
|
94594
95278
|
return fs.readFileSync(path$1.resolve(process.cwd(), filePath));
|
|
@@ -94626,9 +95310,9 @@ function getNodeHttpConfigurationFromEnvironment(signalIdentifier, signalResourc
|
|
|
94626
95310
|
})
|
|
94627
95311
|
};
|
|
94628
95312
|
}
|
|
94629
|
-
var import_src$
|
|
95313
|
+
var import_src$2;
|
|
94630
95314
|
var init_otlp_node_http_env_configuration = __esmMin((() => {
|
|
94631
|
-
import_src$
|
|
95315
|
+
import_src$2 = require_src$12();
|
|
94632
95316
|
init_esm$2();
|
|
94633
95317
|
init_shared_env_configuration();
|
|
94634
95318
|
init_shared_configuration();
|
|
@@ -94701,7 +95385,7 @@ var require_OTLPTraceExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94701
95385
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94702
95386
|
exports.OTLPTraceExporter = void 0;
|
|
94703
95387
|
const otlp_exporter_base_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
94704
|
-
const otlp_transformer_1 = require_src$
|
|
95388
|
+
const otlp_transformer_1 = require_src$3();
|
|
94705
95389
|
const node_http_1 = (init_index_node_http(), __toCommonJS(index_node_http_exports));
|
|
94706
95390
|
/**
|
|
94707
95391
|
* Collector Trace Exporter for Node
|
|
@@ -94715,7 +95399,7 @@ var require_OTLPTraceExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94715
95399
|
}));
|
|
94716
95400
|
//#endregion
|
|
94717
95401
|
//#region ../../node_modules/.pnpm/@opentelemetry+exporter-trace-otlp-http@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/platform/node/index.js
|
|
94718
|
-
var require_node$
|
|
95402
|
+
var require_node$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
94719
95403
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94720
95404
|
exports.OTLPTraceExporter = void 0;
|
|
94721
95405
|
var OTLPTraceExporter_1 = require_OTLPTraceExporter();
|
|
@@ -94728,10 +95412,10 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94728
95412
|
}));
|
|
94729
95413
|
//#endregion
|
|
94730
95414
|
//#region ../../node_modules/.pnpm/@opentelemetry+exporter-trace-otlp-http@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/platform/index.js
|
|
94731
|
-
var require_platform$
|
|
95415
|
+
var require_platform$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
94732
95416
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94733
95417
|
exports.OTLPTraceExporter = void 0;
|
|
94734
|
-
var node_1 = require_node$
|
|
95418
|
+
var node_1 = require_node$2();
|
|
94735
95419
|
Object.defineProperty(exports, "OTLPTraceExporter", {
|
|
94736
95420
|
enumerable: true,
|
|
94737
95421
|
get: function() {
|
|
@@ -94741,10 +95425,10 @@ var require_platform$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94741
95425
|
}));
|
|
94742
95426
|
//#endregion
|
|
94743
95427
|
//#region ../../node_modules/.pnpm/@opentelemetry+exporter-trace-otlp-http@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/index.js
|
|
94744
|
-
var require_src$
|
|
95428
|
+
var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
94745
95429
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94746
95430
|
exports.OTLPTraceExporter = void 0;
|
|
94747
|
-
var platform_1 = require_platform$
|
|
95431
|
+
var platform_1 = require_platform$2();
|
|
94748
95432
|
Object.defineProperty(exports, "OTLPTraceExporter", {
|
|
94749
95433
|
enumerable: true,
|
|
94750
95434
|
get: function() {
|
|
@@ -94814,7 +95498,7 @@ var require_Span = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94814
95498
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94815
95499
|
exports.SpanImpl = void 0;
|
|
94816
95500
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
94817
|
-
const core_1 = require_src$
|
|
95501
|
+
const core_1 = require_src$6();
|
|
94818
95502
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
94819
95503
|
const enums_1 = require_enums();
|
|
94820
95504
|
const inspect_1 = require_inspect();
|
|
@@ -95315,7 +95999,7 @@ var require_Tracer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95315
95999
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95316
96000
|
exports.Tracer = void 0;
|
|
95317
96001
|
const api = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
95318
|
-
const core_1 = require_src$
|
|
96002
|
+
const core_1 = require_src$6();
|
|
95319
96003
|
const Span_1 = require_Span();
|
|
95320
96004
|
const TracerMetrics_1 = require_TracerMetrics();
|
|
95321
96005
|
const version_1 = require_version();
|
|
@@ -95440,7 +96124,7 @@ var require_Tracer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95440
96124
|
var require_MultiSpanProcessor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
95441
96125
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95442
96126
|
exports.MultiSpanProcessor = void 0;
|
|
95443
|
-
const core_1 = require_src$
|
|
96127
|
+
const core_1 = require_src$6();
|
|
95444
96128
|
/**
|
|
95445
96129
|
* Implementation of the {@link SpanProcessor} that simply forwards all
|
|
95446
96130
|
* received events to a list of {@link SpanProcessor}s.
|
|
@@ -95523,7 +96207,7 @@ var require_ParentBasedSampler = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95523
96207
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95524
96208
|
exports.ParentBasedSampler = void 0;
|
|
95525
96209
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
95526
|
-
const core_1 = require_src$
|
|
96210
|
+
const core_1 = require_src$6();
|
|
95527
96211
|
const AlwaysOffSampler_1 = require_AlwaysOffSampler();
|
|
95528
96212
|
const AlwaysOnSampler_1 = require_AlwaysOnSampler();
|
|
95529
96213
|
/**
|
|
@@ -95632,7 +96316,7 @@ var require_BatchSpanProcessorBase = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
95632
96316
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95633
96317
|
exports.BatchSpanProcessorBase = void 0;
|
|
95634
96318
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
95635
|
-
const core_1 = require_src$
|
|
96319
|
+
const core_1 = require_src$6();
|
|
95636
96320
|
const SpanProcessorMetrics_1 = require_SpanProcessorMetrics();
|
|
95637
96321
|
const semconv_1 = require_semconv();
|
|
95638
96322
|
/**
|
|
@@ -95828,7 +96512,7 @@ var require_RandomIdGenerator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95828
96512
|
}));
|
|
95829
96513
|
//#endregion
|
|
95830
96514
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/src/platform/node/index.js
|
|
95831
|
-
var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96515
|
+
var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
95832
96516
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95833
96517
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;
|
|
95834
96518
|
var BatchSpanProcessor_1 = require_BatchSpanProcessor();
|
|
@@ -95848,10 +96532,10 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95848
96532
|
}));
|
|
95849
96533
|
//#endregion
|
|
95850
96534
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/src/platform/index.js
|
|
95851
|
-
var require_platform = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96535
|
+
var require_platform$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
95852
96536
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95853
96537
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;
|
|
95854
|
-
var node_1 = require_node();
|
|
96538
|
+
var node_1 = require_node$1();
|
|
95855
96539
|
Object.defineProperty(exports, "BatchSpanProcessor", {
|
|
95856
96540
|
enumerable: true,
|
|
95857
96541
|
get: function() {
|
|
@@ -95871,12 +96555,12 @@ var require_TracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95871
96555
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95872
96556
|
exports.TracerProvider = void 0;
|
|
95873
96557
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
95874
|
-
const resources_1 = require_src$
|
|
96558
|
+
const resources_1 = require_src$5();
|
|
95875
96559
|
const Tracer_1 = require_Tracer();
|
|
95876
96560
|
const MultiSpanProcessor_1 = require_MultiSpanProcessor();
|
|
95877
96561
|
const ParentBasedSampler_1 = require_ParentBasedSampler();
|
|
95878
96562
|
const AlwaysOnSampler_1 = require_AlwaysOnSampler();
|
|
95879
|
-
const platform_1 = require_platform();
|
|
96563
|
+
const platform_1 = require_platform$1();
|
|
95880
96564
|
const inspect_1 = require_inspect();
|
|
95881
96565
|
var ForceFlushState;
|
|
95882
96566
|
(function(ForceFlushState) {
|
|
@@ -95976,7 +96660,7 @@ var require_TracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95976
96660
|
var require_ConsoleSpanExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
95977
96661
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95978
96662
|
exports.ConsoleSpanExporter = void 0;
|
|
95979
|
-
const core_1 = require_src$
|
|
96663
|
+
const core_1 = require_src$6();
|
|
95980
96664
|
/**
|
|
95981
96665
|
* This is implementation of {@link SpanExporter} that prints spans to the
|
|
95982
96666
|
* console. This class can be used for diagnostic purposes.
|
|
@@ -96044,7 +96728,7 @@ var require_ConsoleSpanExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96044
96728
|
var require_InMemorySpanExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96045
96729
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96046
96730
|
exports.InMemorySpanExporter = void 0;
|
|
96047
|
-
const core_1 = require_src$
|
|
96731
|
+
const core_1 = require_src$6();
|
|
96048
96732
|
/**
|
|
96049
96733
|
* This class can be used for testing purposes. It stores the exported spans
|
|
96050
96734
|
* in a list in memory that can be retrieved using the `getFinishedSpans()`
|
|
@@ -96091,7 +96775,7 @@ var require_SimpleSpanProcessor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96091
96775
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96092
96776
|
exports.SimpleSpanProcessor = void 0;
|
|
96093
96777
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
96094
|
-
const core_1 = require_src$
|
|
96778
|
+
const core_1 = require_src$6();
|
|
96095
96779
|
const SpanProcessorMetrics_1 = require_SpanProcessorMetrics();
|
|
96096
96780
|
const semconv_1 = require_semconv();
|
|
96097
96781
|
/**
|
|
@@ -96245,7 +96929,7 @@ var require_TraceIdRatioBasedSampler = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
96245
96929
|
}));
|
|
96246
96930
|
//#endregion
|
|
96247
96931
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/src/index.js
|
|
96248
|
-
var require_src = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96932
|
+
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96249
96933
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96250
96934
|
exports.SamplingDecision = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.createAlwaysRecordSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NoopSpanProcessor = exports.SimpleSpanProcessor = exports.InMemorySpanExporter = exports.ConsoleSpanExporter = exports.RandomIdGenerator = exports.BatchSpanProcessor = exports.TracerProvider = void 0;
|
|
96251
96935
|
var TracerProvider_1 = require_TracerProvider();
|
|
@@ -96255,7 +96939,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96255
96939
|
return TracerProvider_1.TracerProvider;
|
|
96256
96940
|
}
|
|
96257
96941
|
});
|
|
96258
|
-
var platform_1 = require_platform();
|
|
96942
|
+
var platform_1 = require_platform$1();
|
|
96259
96943
|
Object.defineProperty(exports, "BatchSpanProcessor", {
|
|
96260
96944
|
enumerable: true,
|
|
96261
96945
|
get: function() {
|
|
@@ -96345,8 +97029,8 @@ var require_config = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96345
97029
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96346
97030
|
exports.buildSamplerFromEnv = exports.loadDefaultConfig = void 0;
|
|
96347
97031
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
96348
|
-
const core_1 = require_src$
|
|
96349
|
-
const sdk_trace_1 = require_src();
|
|
97032
|
+
const core_1 = require_src$6();
|
|
97033
|
+
const sdk_trace_1 = require_src$1();
|
|
96350
97034
|
var TracesSamplerValues;
|
|
96351
97035
|
(function(TracesSamplerValues) {
|
|
96352
97036
|
TracesSamplerValues["AlwaysOff"] = "always_off";
|
|
@@ -96418,7 +97102,7 @@ var require_config = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96418
97102
|
var require_utility = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96419
97103
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96420
97104
|
exports.reconfigureLimits = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = void 0;
|
|
96421
|
-
const core_1 = require_src$
|
|
97105
|
+
const core_1 = require_src$6();
|
|
96422
97106
|
exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
|
|
96423
97107
|
exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
|
|
96424
97108
|
/**
|
|
@@ -96445,10 +97129,10 @@ var require_utility = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96445
97129
|
var require_BasicTracerProvider_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96446
97130
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96447
97131
|
exports.BasicTracerProvider = void 0;
|
|
96448
|
-
const core_1 = require_src$
|
|
97132
|
+
const core_1 = require_src$6();
|
|
96449
97133
|
const config_1 = require_config();
|
|
96450
97134
|
const utility_1 = require_utility();
|
|
96451
|
-
const sdk_trace_1 = require_src();
|
|
97135
|
+
const sdk_trace_1 = require_src$1();
|
|
96452
97136
|
/**
|
|
96453
97137
|
* A TracerProvider implementation that reads configuration defaults from
|
|
96454
97138
|
* OTEL_* environment variables per
|
|
@@ -96468,8 +97152,8 @@ var require_BasicTracerProvider_shim = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
96468
97152
|
var require_BatchSpanProcessor_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96469
97153
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96470
97154
|
exports.BatchSpanProcessor = void 0;
|
|
96471
|
-
const core_1 = require_src$
|
|
96472
|
-
const sdk_trace_1 = require_src();
|
|
97155
|
+
const core_1 = require_src$6();
|
|
97156
|
+
const sdk_trace_1 = require_src$1();
|
|
96473
97157
|
/**
|
|
96474
97158
|
* A BatchSpanProcessor that applies `OTEL_*` environment variable fallbacks per
|
|
96475
97159
|
* https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
|
|
@@ -96499,7 +97183,7 @@ var require_BatchSpanProcessor_shim = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
96499
97183
|
var require_SimpleSpanProcessor_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96500
97184
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96501
97185
|
exports.SimpleSpanProcessor = void 0;
|
|
96502
|
-
const sdk_trace_1 = require_src();
|
|
97186
|
+
const sdk_trace_1 = require_src$1();
|
|
96503
97187
|
/**
|
|
96504
97188
|
* A SimpleSpanProcessor with the old constructor call signature that
|
|
96505
97189
|
* takes just a single exporter argument. This version does not support
|
|
@@ -96538,7 +97222,7 @@ var require_index_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96538
97222
|
return SimpleSpanProcessor_shim_1.SimpleSpanProcessor;
|
|
96539
97223
|
}
|
|
96540
97224
|
});
|
|
96541
|
-
var sdk_trace_1 = require_src();
|
|
97225
|
+
var sdk_trace_1 = require_src$1();
|
|
96542
97226
|
Object.defineProperty(exports, "ConsoleSpanExporter", {
|
|
96543
97227
|
enumerable: true,
|
|
96544
97228
|
get: function() {
|
|
@@ -96597,10 +97281,10 @@ var require_index_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96597
97281
|
//#endregion
|
|
96598
97282
|
//#region ../stryker-js-plugin-runtime/dist/index.mjs
|
|
96599
97283
|
init_esm$2();
|
|
96600
|
-
var import_src = require_src$
|
|
97284
|
+
var import_src$1 = require_src$2();
|
|
96601
97285
|
var import_index_shim = require_index_shim();
|
|
96602
97286
|
const CURRENT_VERSION = "00";
|
|
96603
|
-
const serializedTraceState = (traceState) => filter$
|
|
97287
|
+
const serializedTraceState = (traceState) => filter$3(map$12(fromUndefinedOr(traceState), (state) => state.serialize()), (serialized) => serialized.length > 0);
|
|
96604
97288
|
const traceStateField = (traceState) => match$6(serializedTraceState(traceState), {
|
|
96605
97289
|
onNone: () => ({}),
|
|
96606
97290
|
onSome: (serialized) => ({ traceState: serialized })
|
|
@@ -96686,7 +97370,7 @@ const tracesUrl = (endpoint) => {
|
|
|
96686
97370
|
};
|
|
96687
97371
|
const otlpLayer = (serviceName, endpoint) => layer$1(() => ({
|
|
96688
97372
|
resource: { serviceName },
|
|
96689
|
-
spanProcessor: new import_index_shim.SimpleSpanProcessor(new import_src.OTLPTraceExporter({ url: tracesUrl(endpoint) }))
|
|
97373
|
+
spanProcessor: new import_index_shim.SimpleSpanProcessor(new import_src$1.OTLPTraceExporter({ url: tracesUrl(endpoint) }))
|
|
96690
97374
|
}));
|
|
96691
97375
|
unwrap$4(gen(function* () {
|
|
96692
97376
|
if (!(yield* boolean$3("OTEL_ENABLED").pipe(withDefault$2(false)))) return empty$7;
|
|
@@ -97309,12 +97993,12 @@ const collectUnserializables = (groups) => {
|
|
|
97309
97993
|
const describeUnserializableArray = (value) => collectUnserializables(value.map((child, index) => describeUnserializableChild(child, index.toString())));
|
|
97310
97994
|
const describeUnserializableRecord = (value) => collectUnserializables(Object.entries(value).map(([key, child]) => describeUnserializableChild(child, key)));
|
|
97311
97995
|
const isPlainObjectValue = (value) => !Array.isArray(value) && value.constructor === Object;
|
|
97312
|
-
const classNameOf = (value$
|
|
97996
|
+
const classNameOf = (value$9) => value(value$9.constructor).pipe(when(defined, (ctor) => ctor.name), orElse(() => "Object"));
|
|
97313
97997
|
const describeUnserializableInstance = (value) => [{
|
|
97314
97998
|
path: [],
|
|
97315
97999
|
reason: `Value is an instance of "${classNameOf(value)}", this detail will get lost in translation during serialization`
|
|
97316
98000
|
}];
|
|
97317
|
-
const describeUnserializableObject = (value$
|
|
98001
|
+
const describeUnserializableObject = (value$10) => value(value$10).pipe(when(isArrayValue, describeUnserializableArray), when(isPlainObjectValue, describeUnserializableRecord), orElse(describeUnserializableInstance));
|
|
97318
98002
|
const NON_JSON_PRIMITIVE_TYPES = [
|
|
97319
98003
|
"bigint",
|
|
97320
98004
|
"function",
|
|
@@ -97719,7 +98403,7 @@ function findConfigFile(configFileName) {
|
|
|
97719
98403
|
return value(configFileName).pipe(when(string$5, (fileName) => configFileFor(fileName)), orElse(() => discoverConfigFile()));
|
|
97720
98404
|
}
|
|
97721
98405
|
const resolveChildExtends = (configFile, child, configEnv) => value("extends" in child).pipe(when(true, () => resolveExtends(configFile, child, configEnv)), orElse(() => succeed$4(child)));
|
|
97722
|
-
const isCiEnvironment = string$4("CI").pipe(map$7((value$
|
|
98406
|
+
const isCiEnvironment = string$4("CI").pipe(map$7((value$11) => value(value$11.trim().toLowerCase()).pipe(when("", () => false), when("0", () => false), when("false", () => false), orElse(() => true))), orElseSucceed(() => false));
|
|
97723
98407
|
function loadOptionsFromConfigFile(cliOptions, configEnv) {
|
|
97724
98408
|
return findConfigFile(cliOptions["configFile"]).pipe(flatMap$1((configFile) => value(configFile).pipe(when(void 0, () => succeed$4({})), orElse((found) => readConfigModule(found, configEnv).pipe(flatMap$1((child) => resolveChildExtends(found, child, configEnv)))))));
|
|
97725
98409
|
}
|
|
@@ -98425,6 +99109,7 @@ const TestFileLikeSchema = Struct({
|
|
|
98425
99109
|
tests: ArraySchema(TestDefinitionLikeSchema)
|
|
98426
99110
|
});
|
|
98427
99111
|
const IncrementalReportSchema = StructWithRest(Struct({
|
|
99112
|
+
incrementalVersion: String$1,
|
|
98428
99113
|
schemaVersion: String$1,
|
|
98429
99114
|
thresholds: Struct({
|
|
98430
99115
|
high: Finite,
|
|
@@ -98433,7 +99118,85 @@ const IncrementalReportSchema = StructWithRest(Struct({
|
|
|
98433
99118
|
files: Record(String$1, FileResultLikeSchema),
|
|
98434
99119
|
testFiles: optional$4(Record(String$1, TestFileLikeSchema))
|
|
98435
99120
|
}), [Record(String$1, Unknown)]);
|
|
98436
|
-
|
|
99121
|
+
//#endregion
|
|
99122
|
+
//#region src/admit-incremental-report.workflow.ts
|
|
99123
|
+
var AdmitIncrementalReportCommand = class extends TaggedClass()("AdmitIncrementalReportCommand", {
|
|
99124
|
+
report: optional$4(IncrementalReportSchema),
|
|
99125
|
+
expectedVersion: String$1
|
|
99126
|
+
}) {};
|
|
99127
|
+
const IncrementalReportDecisionTypeId = Symbol.for("@systemfsoftware/stryker-js/IncrementalReportDecision");
|
|
99128
|
+
var IncrementalReportKeep = class extends TaggedClass()("IncrementalReportKeep", { report: IncrementalReportSchema }) {
|
|
99129
|
+
[IncrementalReportDecisionTypeId] = IncrementalReportDecisionTypeId;
|
|
99130
|
+
};
|
|
99131
|
+
var IncrementalReportDiscard = class extends TaggedClass()("IncrementalReportDiscard", {
|
|
99132
|
+
actual: optional$4(String$1),
|
|
99133
|
+
expected: String$1
|
|
99134
|
+
}) {
|
|
99135
|
+
[IncrementalReportDecisionTypeId] = IncrementalReportDecisionTypeId;
|
|
99136
|
+
};
|
|
99137
|
+
const decide = (command) => match$6(fromUndefinedOr(command.report), {
|
|
99138
|
+
onNone: () => IncrementalReportDiscard.make({
|
|
99139
|
+
actual: void 0,
|
|
99140
|
+
expected: command.expectedVersion
|
|
99141
|
+
}),
|
|
99142
|
+
onSome: (report) => value(report.incrementalVersion === command.expectedVersion).pipe(when(true, () => IncrementalReportKeep.make({ report })), orElse(() => IncrementalReportDiscard.make({
|
|
99143
|
+
actual: report.incrementalVersion,
|
|
99144
|
+
expected: command.expectedVersion
|
|
99145
|
+
})))
|
|
99146
|
+
});
|
|
99147
|
+
const admitIncrementalReport = Workflow_exports.total(AdmitIncrementalReportCommand, (command) => succeed$8(decide(command)));
|
|
99148
|
+
//#endregion
|
|
99149
|
+
//#region src/stryker-package.schema.ts
|
|
99150
|
+
const PackageJsonSchema = Struct({ version: String$1 });
|
|
99151
|
+
//#endregion
|
|
99152
|
+
//#region src/stryker-package.ts
|
|
99153
|
+
const rawPackageJson = package_default;
|
|
99154
|
+
const strykerVersion = decodeUnknownSync(PackageJsonSchema)(rawPackageJson).version;
|
|
99155
|
+
//#endregion
|
|
99156
|
+
//#region src/incremental-report.cell.ts
|
|
99157
|
+
const parseAndDecodeIncrementalReport = decodeUnknownResult(fromJsonString(IncrementalReportSchema));
|
|
99158
|
+
const readIncrementalReportRaw = (input) => {
|
|
99159
|
+
if (!input.incremental) return succeed$4({
|
|
99160
|
+
incremental: false,
|
|
99161
|
+
incrementalFile: input.incrementalFile,
|
|
99162
|
+
contents: void 0
|
|
99163
|
+
});
|
|
99164
|
+
return gen(function* () {
|
|
99165
|
+
const contents = yield* (yield* FileSystem).readFileString(input.incrementalFile).pipe(catchTag("PlatformError", (error) => value(error.reason).pipe(tag("NotFound", () => logInfo(`No incremental result file found at ${input.incrementalFile}, a full mutation testing run will be performed.`).pipe(as(void 0))), orElse(() => fail(error)))));
|
|
99166
|
+
return {
|
|
99167
|
+
incremental: true,
|
|
99168
|
+
incrementalFile: input.incrementalFile,
|
|
99169
|
+
contents
|
|
99170
|
+
};
|
|
99171
|
+
});
|
|
99172
|
+
};
|
|
99173
|
+
const decodeIncrementalReportRaw = (raw) => succeed$8(AdmitIncrementalReportCommand.make({
|
|
99174
|
+
report: getOrUndefined$1(flatMap$5(fromUndefinedOr(raw.contents), (text) => getSuccess(parseAndDecodeIncrementalReport(text)))),
|
|
99175
|
+
expectedVersion: strykerVersion
|
|
99176
|
+
}));
|
|
99177
|
+
const writeIncrementalReportOutcome = (outcome, raw) => match$5(outcome, {
|
|
99178
|
+
onFailure: (error) => fail(error),
|
|
99179
|
+
onSuccess: (decision) => value(decision).pipe(tag("IncrementalReportKeep", (keep) => {
|
|
99180
|
+
const report = keep.report;
|
|
99181
|
+
return succeedSome(report);
|
|
99182
|
+
}), tag("IncrementalReportDiscard", (discard) => {
|
|
99183
|
+
if (!raw.incremental) return succeedNone;
|
|
99184
|
+
return match$6(fromUndefinedOr(raw.contents), {
|
|
99185
|
+
onNone: () => succeedNone,
|
|
99186
|
+
onSome: () => match$6(fromUndefinedOr(discard.actual), {
|
|
99187
|
+
onNone: () => logInfo(`Unable to parse incremental result file at ${raw.incrementalFile}; a full mutation testing run will be performed.`).pipe(as(none())),
|
|
99188
|
+
onSome: (actual) => logInfo(`Incremental result file at ${raw.incrementalFile} version ${actual} does not match expected version ${discard.expected}; a full mutation testing run will be performed.`).pipe(as(none()))
|
|
99189
|
+
})
|
|
99190
|
+
});
|
|
99191
|
+
}), exhaustive)
|
|
99192
|
+
});
|
|
99193
|
+
const incrementalReportCell = Cell_exports.layer({
|
|
99194
|
+
read: readIncrementalReportRaw,
|
|
99195
|
+
decode: decodeIncrementalReportRaw,
|
|
99196
|
+
decide: admitIncrementalReport,
|
|
99197
|
+
encode: (outcome) => outcome,
|
|
99198
|
+
write: writeIncrementalReportOutcome
|
|
99199
|
+
});
|
|
98437
99200
|
//#endregion
|
|
98438
99201
|
//#region src/Project.ts
|
|
98439
99202
|
const DEFAULT_GLOB$1 = "**/*.{js,ts,jsx,tsx,html,vue,mjs,mts,cts,cjs}";
|
|
@@ -98529,7 +99292,7 @@ function createPureMatcher(pattern, allowHiddenFiles, basePath) {
|
|
|
98529
99292
|
return value(isExcludedHiddenFile(normalizedFile, base, allowHiddenFiles, patternHasDot)).pipe(when(true, () => false), orElse(() => regex.test(normalizedFile)));
|
|
98530
99293
|
};
|
|
98531
99294
|
}
|
|
98532
|
-
const rangeListOf = (mutate) => filter$
|
|
99295
|
+
const rangeListOf = (mutate) => filter$3(fromUndefinedOr(mutate), Array.isArray);
|
|
98533
99296
|
function unionPair(first, second) {
|
|
98534
99297
|
const ranges = all$2([rangeListOf(first.mutate), rangeListOf(second.mutate)]);
|
|
98535
99298
|
return match$6(ranges, {
|
|
@@ -98655,54 +99418,6 @@ const selectFiles = (input) => ({
|
|
|
98655
99418
|
fileDescriptions: resolveFileDescriptionsPure(input.inputFileNames, input.mutatePatterns, input.targetMutatePatterns, input.basePath),
|
|
98656
99419
|
testFiles: resolveTestFilesPure(input.inputFileNames, input.testFilePatterns, input.basePath)
|
|
98657
99420
|
});
|
|
98658
|
-
const toPosition = (position) => ({
|
|
98659
|
-
line: position.line,
|
|
98660
|
-
column: position.column
|
|
98661
|
-
});
|
|
98662
|
-
const toLocation = (location) => ({
|
|
98663
|
-
start: toPosition(location.start),
|
|
98664
|
-
end: toPosition(location.end)
|
|
98665
|
-
});
|
|
98666
|
-
const toOpenEndLocation = (location) => match$6(fromUndefinedOr(location.end), {
|
|
98667
|
-
onNone: () => ({ start: toPosition(location.start) }),
|
|
98668
|
-
onSome: (end) => ({
|
|
98669
|
-
start: toPosition(location.start),
|
|
98670
|
-
end: toPosition(end)
|
|
98671
|
-
})
|
|
98672
|
-
});
|
|
98673
|
-
const withMappedMutantLocations = (report) => Object.fromEntries(Object.entries(report.files).map(([fileName, file]) => [fileName, {
|
|
98674
|
-
...file,
|
|
98675
|
-
mutants: file.mutants.map((mutant) => ({
|
|
98676
|
-
...mutant,
|
|
98677
|
-
location: toLocation(mutant.location)
|
|
98678
|
-
}))
|
|
98679
|
-
}]));
|
|
98680
|
-
const withMappedTestLocations = (testFiles) => Object.fromEntries(Object.entries(testFiles).map(([fileName, file]) => [fileName, {
|
|
98681
|
-
...file,
|
|
98682
|
-
tests: file.tests.map((test) => match$6(fromUndefinedOr(test.location), {
|
|
98683
|
-
onNone: () => ({ ...test }),
|
|
98684
|
-
onSome: (location) => ({
|
|
98685
|
-
...test,
|
|
98686
|
-
location: toOpenEndLocation(location)
|
|
98687
|
-
})
|
|
98688
|
-
}))
|
|
98689
|
-
}]));
|
|
98690
|
-
const reshape = (decoded) => match$6(fromUndefinedOr(decoded.testFiles), {
|
|
98691
|
-
onNone: () => ({
|
|
98692
|
-
...decoded,
|
|
98693
|
-
files: withMappedMutantLocations(decoded)
|
|
98694
|
-
}),
|
|
98695
|
-
onSome: (testFiles) => ({
|
|
98696
|
-
...decoded,
|
|
98697
|
-
files: withMappedMutantLocations(decoded),
|
|
98698
|
-
testFiles: withMappedTestLocations(testFiles)
|
|
98699
|
-
})
|
|
98700
|
-
});
|
|
98701
|
-
const decodeIncrementalReport = (raw) => match$5(decodeUnknownResult(IncrementalReportSchema)(raw), {
|
|
98702
|
-
onFailure: () => fail$4(IncrementalReportError.make({ message: "The incremental report is not a mutation testing report; delete it or re-run without --incremental." })),
|
|
98703
|
-
onSuccess: (decoded) => succeed$8(reshape(decoded))
|
|
98704
|
-
});
|
|
98705
|
-
const parseJson = (text) => JSON.parse(text);
|
|
98706
99421
|
const stringArrayEquivalence = Array_(String$4);
|
|
98707
99422
|
function makeProjectFile(name, mutate, content, originalContent) {
|
|
98708
99423
|
return {
|
|
@@ -98745,7 +99460,7 @@ function readOriginal(file) {
|
|
|
98745
99460
|
});
|
|
98746
99461
|
}
|
|
98747
99462
|
function writeInPlace(file) {
|
|
98748
|
-
const content = filter$
|
|
99463
|
+
const content = filter$3(fromUndefinedOr(file.content), () => hasChanges(file));
|
|
98749
99464
|
return match$6(content, {
|
|
98750
99465
|
onNone: () => void_$1,
|
|
98751
99466
|
onSome: (text) => gen(function* () {
|
|
@@ -98859,23 +99574,6 @@ function resolveInputFileNames(ignoreRules, basePath) {
|
|
|
98859
99574
|
return yield* crawlDir(basePath, basePath);
|
|
98860
99575
|
});
|
|
98861
99576
|
}
|
|
98862
|
-
function parseIncrementalReport(contents) {
|
|
98863
|
-
return match$6(fromUndefinedOr(contents), {
|
|
98864
|
-
onNone: () => succeedNone,
|
|
98865
|
-
onSome: (text) => gen(function* () {
|
|
98866
|
-
const parsed = yield* try_(() => parseJson(text));
|
|
98867
|
-
const rawReport = yield* fromResult(decodeIncrementalReport(parsed));
|
|
98868
|
-
const isMutationTestResult = (_value) => true;
|
|
98869
|
-
if (!isMutationTestResult(rawReport)) throw new Error("Invalid incremental report shape");
|
|
98870
|
-
return fromUndefinedOr(rawReport);
|
|
98871
|
-
})
|
|
98872
|
-
});
|
|
98873
|
-
}
|
|
98874
|
-
function readIncrementalReport(incremental, incrementalFile) {
|
|
98875
|
-
return value(incremental).pipe(when(false, () => succeedNone), orElse(() => gen(function* () {
|
|
98876
|
-
return yield* parseIncrementalReport(yield* (yield* FileSystem).readFileString(incrementalFile).pipe(catchTag("PlatformError", (error) => value(error.reason).pipe(tag("NotFound", () => logInfo(`No incremental result file found at ${incrementalFile}, a full mutation testing run will be performed.`).pipe(as(void 0))), orElse(() => fail(error))))));
|
|
98877
|
-
})));
|
|
98878
|
-
}
|
|
98879
99577
|
function readProject(options, targetMutatePatterns, basePath) {
|
|
98880
99578
|
const { mutate, tempDirName, ignorePatterns, incremental, incrementalFile, progressStreamFile, htmlReporter, jsonReporter, testFiles } = options;
|
|
98881
99579
|
const mutatePatterns = mutate;
|
|
@@ -98927,7 +99625,10 @@ function readProject(options, targetMutatePatterns, basePath) {
|
|
|
98927
99625
|
basePath
|
|
98928
99626
|
}).testFiles.length === 0) yield* logWarning(`Glob pattern "${pattern}" did not match any test files.`);
|
|
98929
99627
|
}));
|
|
98930
|
-
const incrementalReport = yield*
|
|
99628
|
+
const incrementalReport = yield* incrementalReportCell.run({
|
|
99629
|
+
incremental,
|
|
99630
|
+
incrementalFile
|
|
99631
|
+
});
|
|
98931
99632
|
return makeProject(decision.fileDescriptions, getOrUndefined$1(incrementalReport), [...decision.testFiles]);
|
|
98932
99633
|
});
|
|
98933
99634
|
}
|
|
@@ -99657,6 +100358,29 @@ const admitMutationTest = Workflow_exports.make(MutationTestCommand, (command) =
|
|
|
99657
100358
|
allowEmpty: true
|
|
99658
100359
|
}, () => succeed$8(MutationTestNoTests.make({}))), orElse(() => succeed$8(MutationTestProceed.make({})))));
|
|
99659
100360
|
//#endregion
|
|
100361
|
+
//#region src/checker-mutant-wire.ts
|
|
100362
|
+
const CheckerMutantFromMutant = Mutant.pipe(decodeTo(CheckerMutantWire, transform$2({
|
|
100363
|
+
decode: (m) => ({
|
|
100364
|
+
id: m.id,
|
|
100365
|
+
fileName: m.fileName,
|
|
100366
|
+
mutatorName: m.mutatorName,
|
|
100367
|
+
replacement: m.replacement,
|
|
100368
|
+
location: m.location
|
|
100369
|
+
}),
|
|
100370
|
+
encode: (w) => Mutant.make({
|
|
100371
|
+
id: w.id,
|
|
100372
|
+
fileName: w.fileName,
|
|
100373
|
+
mutatorName: w.mutatorName,
|
|
100374
|
+
replacement: w.replacement,
|
|
100375
|
+
location: w.location
|
|
100376
|
+
})
|
|
100377
|
+
})));
|
|
100378
|
+
const wireRecordOf = (mutant) => mapError$2(decodeUnknownResult(CheckerMutantFromMutant)(mutant), (error) => ({
|
|
100379
|
+
id: mutant.id,
|
|
100380
|
+
fileName: mutant.fileName,
|
|
100381
|
+
reason: error.message
|
|
100382
|
+
}));
|
|
100383
|
+
//#endregion
|
|
99660
100384
|
//#region src/admit-checker-answer.workflow.ts
|
|
99661
100385
|
var CheckerAnsweredUnrequested = class extends TaggedError()("CheckerAnsweredUnrequested", {
|
|
99662
100386
|
checkerName: String$1,
|
|
@@ -99724,6 +100448,19 @@ const evaluateCheckResult = (command) => {
|
|
|
99724
100448
|
};
|
|
99725
100449
|
const admitCheckerAnswer = Workflow_exports.make(CheckerCommand, (command) => value(command.phase).pipe(when("group", () => evaluateGroup(command)), when("check", () => evaluateCheckResult(command)), exhaustive));
|
|
99726
100450
|
//#endregion
|
|
100451
|
+
//#region src/metrics.ts
|
|
100452
|
+
const checkerDuration = timer("stryker.checker.duration", { description: "Checker worker RPC duration in milliseconds" });
|
|
100453
|
+
const checkerMutantsChecked = counter("stryker.checker.mutants.checked", { description: "Total number of mutants a checker worker answered for" });
|
|
100454
|
+
const checkerMutantsSkipped = counter("stryker.checker.mutants.skipped", { description: "Total number of mutants dropped because they cannot be described to a checker" });
|
|
100455
|
+
const checkerRpcFailures = counter("stryker.checker.rpc_failures", {
|
|
100456
|
+
description: "Checker worker RPC calls that did not complete, excluding interruptions",
|
|
100457
|
+
incremental: true
|
|
100458
|
+
});
|
|
100459
|
+
const checkerProcessCrashes = counter("stryker.checker.process_crashes", {
|
|
100460
|
+
description: "Checker worker processes that never became usable",
|
|
100461
|
+
incremental: true
|
|
100462
|
+
});
|
|
100463
|
+
//#endregion
|
|
99727
100464
|
//#region src/Checker.ts
|
|
99728
100465
|
/**
|
|
99729
100466
|
* Checker — the Checker capability.
|
|
@@ -99839,16 +100576,20 @@ const makeCheckerChildProcess = (params) => gen(function* () {
|
|
|
99839
100576
|
execArgv: [...params.execArgv],
|
|
99840
100577
|
optionsJson,
|
|
99841
100578
|
tempDirPrefix: "stryker-checker-"
|
|
99842
|
-
}).pipe(mapError((error) => value(error).pipe(tag("ChildProcessCrashedError", "OutOfMemoryError", (crash) => crash), tag("WorkerBootTimeoutError", () => crashed(`Checker worker failed to start: its boot window closed before it accepted the RPC connection`)), exhaustive)));
|
|
100579
|
+
}).pipe(mapError((error) => value(error).pipe(tag("ChildProcessCrashedError", "OutOfMemoryError", (crash) => crash), tag("WorkerBootTimeoutError", () => crashed(`Checker worker failed to start: its boot window closed before it accepted the RPC connection`)), exhaustive)), tapError(() => update(checkerProcessCrashes, 1)));
|
|
100580
|
+
const recordCheckerCall = (spanName, checkerName, mutants, call) => call.pipe(withSpan(spanName, { attributes: {
|
|
100581
|
+
"stryker.checker.name": checkerName,
|
|
100582
|
+
"stryker.mutants.count": mutants.length
|
|
100583
|
+
} }), timed, onExit((exit) => value(exit).pipe(tag("Success", () => update(checkerMutantsChecked, mutants.length)), tag("Failure", (failure) => value(hasInterruptsOnly(failure.cause)).pipe(when(true, () => void_$1), orElse(() => update(checkerRpcFailures, 1)))), exhaustive)), tap$1(([duration]) => update(checkerDuration, duration)), map$7(([, result]) => result), mapError((error) => crashed(error.message)));
|
|
99843
100584
|
return {
|
|
99844
|
-
check: (checkerName, mutants) => client.check({
|
|
100585
|
+
check: (checkerName, mutants) => recordCheckerCall("stryker.checker.check", checkerName, mutants, client.check({
|
|
99845
100586
|
checkerName,
|
|
99846
100587
|
mutants: [...mutants]
|
|
99847
|
-
})
|
|
99848
|
-
group: (checkerName, mutants) => client.group({
|
|
100588
|
+
})),
|
|
100589
|
+
group: (checkerName, mutants) => recordCheckerCall("stryker.checker.group", checkerName, mutants, client.group({
|
|
99849
100590
|
checkerName,
|
|
99850
100591
|
mutants: [...mutants]
|
|
99851
|
-
})
|
|
100592
|
+
}))
|
|
99852
100593
|
};
|
|
99853
100594
|
});
|
|
99854
100595
|
const createCheckerFactory = (options, fileDescriptions, workerEntrypoint, idGenerator, workingDirectory) => makeCheckerChildProcess({
|
|
@@ -99879,6 +100620,69 @@ const writeGroupOutcome = (plans, checkerName, outcome) => match$5(outcome, {
|
|
|
99879
100620
|
onFailure: (error) => fail(error),
|
|
99880
100621
|
onSuccess: (decision) => writeGroupDecision(plans, checkerName, decision)
|
|
99881
100622
|
});
|
|
100623
|
+
const partitionMutantsForWire = (plans) => {
|
|
100624
|
+
const wire = [];
|
|
100625
|
+
const undescribable = [];
|
|
100626
|
+
plans.forEach((plan) => match$5(wireRecordOf(plan.mutant), {
|
|
100627
|
+
onSuccess: (wireMutant) => {
|
|
100628
|
+
wire.push(wireMutant);
|
|
100629
|
+
},
|
|
100630
|
+
onFailure: (refused) => {
|
|
100631
|
+
undescribable.push(refused);
|
|
100632
|
+
}
|
|
100633
|
+
}));
|
|
100634
|
+
return {
|
|
100635
|
+
wire,
|
|
100636
|
+
undescribable
|
|
100637
|
+
};
|
|
100638
|
+
};
|
|
100639
|
+
const compileErrorAnswersOf = (undescribable) => Object.fromEntries(undescribable.map((mutant) => [mutant.id, {
|
|
100640
|
+
status: "compileError",
|
|
100641
|
+
reason: mutant.reason
|
|
100642
|
+
}]));
|
|
100643
|
+
const singletonGroupsOf = (undescribable) => undescribable.map((mutant) => [mutant.id]);
|
|
100644
|
+
const undescribableIdsOf = (undescribable) => new Set(undescribable.map((mutant) => mutant.id));
|
|
100645
|
+
const lookupOf = (partitioned) => ({
|
|
100646
|
+
wireById: new Map(partitioned.wire.map((mutant) => [mutant.id, mutant])),
|
|
100647
|
+
undescribableById: new Map(partitioned.undescribable.map((mutant) => [mutant.id, mutant]))
|
|
100648
|
+
});
|
|
100649
|
+
const selectedFromLookup = (plans, lookup) => {
|
|
100650
|
+
const wire = [];
|
|
100651
|
+
const undescribable = [];
|
|
100652
|
+
plans.forEach((plan) => {
|
|
100653
|
+
match$6(fromUndefinedOr(lookup.wireById.get(plan.mutant.id)), {
|
|
100654
|
+
onSome: (wired) => {
|
|
100655
|
+
wire.push(wired);
|
|
100656
|
+
},
|
|
100657
|
+
onNone: () => match$6(fromUndefinedOr(lookup.undescribableById.get(plan.mutant.id)), {
|
|
100658
|
+
onSome: (refused) => {
|
|
100659
|
+
undescribable.push(refused);
|
|
100660
|
+
},
|
|
100661
|
+
onNone: () => {
|
|
100662
|
+
match$5(wireRecordOf(plan.mutant), {
|
|
100663
|
+
onSuccess: (wired) => {
|
|
100664
|
+
wire.push(wired);
|
|
100665
|
+
},
|
|
100666
|
+
onFailure: (refused) => {
|
|
100667
|
+
undescribable.push(refused);
|
|
100668
|
+
}
|
|
100669
|
+
});
|
|
100670
|
+
}
|
|
100671
|
+
})
|
|
100672
|
+
});
|
|
100673
|
+
});
|
|
100674
|
+
return {
|
|
100675
|
+
wire,
|
|
100676
|
+
undescribable
|
|
100677
|
+
};
|
|
100678
|
+
};
|
|
100679
|
+
const SKIPPED_IDS_IN_WARNING = 5;
|
|
100680
|
+
const skippedIdsOf = (undescribable) => `${undescribable.slice(0, SKIPPED_IDS_IN_WARNING).map((item) => item.id).join(", ")}${match$6(liftPredicate(undescribable.length, (count) => count > SKIPPED_IDS_IN_WARNING), {
|
|
100681
|
+
onNone: () => "",
|
|
100682
|
+
onSome: (count) => `, +${count - SKIPPED_IDS_IN_WARNING} more`
|
|
100683
|
+
})}`;
|
|
100684
|
+
const refusalReasonsOf = (undescribable) => [...new Set(undescribable.map((mutant) => mutant.reason))].join("; ");
|
|
100685
|
+
const logSkippedMutants = (checkerName, undescribable) => value(undescribable.length).pipe(when(0, () => void_$1), orElse(() => logWarning(`Checker "${checkerName}" skipped ${undescribable.length} mutant(s) it cannot be told about: ${refusalReasonsOf(undescribable)} (${skippedIdsOf(undescribable)})`)));
|
|
99882
100686
|
/**
|
|
99883
100687
|
* Ask a checker about run plans and get run plans back.
|
|
99884
100688
|
*
|
|
@@ -99887,13 +100691,26 @@ const writeGroupOutcome = (plans, checkerName, outcome) => match$5(outcome, {
|
|
|
99887
100691
|
* project the plans down, call the checker, and hand the answers to the pure decision
|
|
99888
100692
|
* that joins them back. The join is where the work is, and it is pure.
|
|
99889
100693
|
*/
|
|
99890
|
-
const checkPlans = (checker, checkerName, plans) => {
|
|
100694
|
+
const checkPlans = (checker, checkerName, plans, lookup) => {
|
|
99891
100695
|
return Cell_exports.layer({
|
|
99892
|
-
read: (command) =>
|
|
99893
|
-
|
|
99894
|
-
|
|
99895
|
-
|
|
99896
|
-
|
|
100696
|
+
read: (command) => gen(function* () {
|
|
100697
|
+
const partitioned = match$6(fromUndefinedOr(command.lookup), {
|
|
100698
|
+
onSome: (known) => selectedFromLookup(command.plans, known),
|
|
100699
|
+
onNone: () => partitionMutantsForWire(command.plans)
|
|
100700
|
+
});
|
|
100701
|
+
yield* logSkippedMutants(command.checkerName, partitioned.undescribable);
|
|
100702
|
+
if (partitioned.undescribable.length > 0) yield* update(checkerMutantsSkipped, partitioned.undescribable.length);
|
|
100703
|
+
yield* annotateCurrentSpan({ "stryker.checker.skipped_mutants_count": partitioned.undescribable.length });
|
|
100704
|
+
const answers = yield* command.checker.check(command.checkerName, partitioned.wire);
|
|
100705
|
+
return {
|
|
100706
|
+
checkerName: command.checkerName,
|
|
100707
|
+
requestedIds: command.plans.map((plan) => plan.mutant.id),
|
|
100708
|
+
answers: {
|
|
100709
|
+
...compileErrorAnswersOf(partitioned.undescribable),
|
|
100710
|
+
...answers
|
|
100711
|
+
}
|
|
100712
|
+
};
|
|
100713
|
+
}),
|
|
99897
100714
|
decode: (raw) => succeed$8(CheckerCommand.make({
|
|
99898
100715
|
checkerName: raw.checkerName,
|
|
99899
100716
|
requestedIds: [...raw.requestedIds],
|
|
@@ -99906,19 +100723,29 @@ const checkPlans = (checker, checkerName, plans) => {
|
|
|
99906
100723
|
}).run({
|
|
99907
100724
|
checker,
|
|
99908
100725
|
checkerName,
|
|
99909
|
-
plans
|
|
100726
|
+
plans,
|
|
100727
|
+
lookup
|
|
99910
100728
|
});
|
|
99911
100729
|
};
|
|
99912
100730
|
/**
|
|
99913
100731
|
* Ask a checker how to group run plans, and get groups of run plans back.
|
|
99914
100732
|
*/
|
|
99915
|
-
const groupPlans = (checker, checkerName, plans) => {
|
|
100733
|
+
const groupPlans = (checker, checkerName, plans, lookup) => {
|
|
99916
100734
|
return Cell_exports.layer({
|
|
99917
|
-
read: (command) =>
|
|
99918
|
-
|
|
99919
|
-
|
|
99920
|
-
|
|
99921
|
-
|
|
100735
|
+
read: (command) => gen(function* () {
|
|
100736
|
+
const partitioned = match$6(fromUndefinedOr(command.lookup), {
|
|
100737
|
+
onSome: (known) => selectedFromLookup(command.plans, known),
|
|
100738
|
+
onNone: () => partitionMutantsForWire(command.plans)
|
|
100739
|
+
});
|
|
100740
|
+
yield* annotateCurrentSpan({ "stryker.checker.skipped_mutants_count": partitioned.undescribable.length });
|
|
100741
|
+
const undescribableIds = undescribableIdsOf(partitioned.undescribable);
|
|
100742
|
+
const withoutSkipped = (yield* command.checker.group(command.checkerName, partitioned.wire)).map((group) => group.filter((id) => !undescribableIds.has(id))).filter((group) => group.length > 0);
|
|
100743
|
+
return {
|
|
100744
|
+
checkerName: command.checkerName,
|
|
100745
|
+
requestedIds: command.plans.map((plan) => plan.mutant.id),
|
|
100746
|
+
idGroups: [...singletonGroupsOf(partitioned.undescribable), ...withoutSkipped]
|
|
100747
|
+
};
|
|
100748
|
+
}),
|
|
99922
100749
|
decode: (raw) => succeed$8(CheckerCommand.make({
|
|
99923
100750
|
checkerName: raw.checkerName,
|
|
99924
100751
|
requestedIds: [...raw.requestedIds],
|
|
@@ -99931,47 +100758,16 @@ const groupPlans = (checker, checkerName, plans) => {
|
|
|
99931
100758
|
}).run({
|
|
99932
100759
|
checker,
|
|
99933
100760
|
checkerName,
|
|
99934
|
-
plans
|
|
100761
|
+
plans,
|
|
100762
|
+
lookup
|
|
99935
100763
|
});
|
|
99936
100764
|
};
|
|
99937
100765
|
const checkGroupedPlans = (checker, checkerName, plans) => gen(function* () {
|
|
99938
|
-
const
|
|
99939
|
-
|
|
100766
|
+
const lookup = lookupOf(partitionMutantsForWire(plans));
|
|
100767
|
+
const groups = yield* groupPlans(checker, checkerName, plans, lookup);
|
|
100768
|
+
return (yield* forEach$1(groups, (group) => checkPlans(checker, checkerName, group, lookup), { concurrency: 1 })).flat();
|
|
99940
100769
|
});
|
|
99941
100770
|
//#endregion
|
|
99942
|
-
//#region src/mutant-result-mapping.ts
|
|
99943
|
-
const toSchemaPosition = (pos) => ({
|
|
99944
|
-
column: pos.column + 1,
|
|
99945
|
-
line: pos.line + 1
|
|
99946
|
-
});
|
|
99947
|
-
const toSchemaLocation = (location) => ({
|
|
99948
|
-
start: toSchemaPosition(location.start),
|
|
99949
|
-
end: toSchemaPosition(location.end)
|
|
99950
|
-
});
|
|
99951
|
-
const checkStatusToMutantStatus = (_status) => "CompileError";
|
|
99952
|
-
const mutantResult = (mutant, status, outcome = {}) => ({
|
|
99953
|
-
_tag: "Mutant",
|
|
99954
|
-
id: mutant.id,
|
|
99955
|
-
fileName: mutant.fileName,
|
|
99956
|
-
mutatorName: mutant.mutatorName,
|
|
99957
|
-
replacement: mutant.replacement,
|
|
99958
|
-
location: toSchemaLocation(mutant.location),
|
|
99959
|
-
status,
|
|
99960
|
-
coveredBy: mutant.coveredBy,
|
|
99961
|
-
static: mutant.static,
|
|
99962
|
-
testsCompleted: mutant.testsCompleted,
|
|
99963
|
-
description: mutant.description,
|
|
99964
|
-
...outcome
|
|
99965
|
-
});
|
|
99966
|
-
const mapRunResult = (mutant, result) => value(result).pipe(discriminator("status")("error", (errored) => mutantResult(mutant, "RuntimeError", { statusReason: errored.errorMessage })), discriminator("status")("killed", (killed) => mutantResult(mutant, "Killed", {
|
|
99967
|
-
testsCompleted: killed.nrOfTests,
|
|
99968
|
-
killedBy: [...killed.killedBy],
|
|
99969
|
-
statusReason: killed.failureMessage
|
|
99970
|
-
})), discriminator("status")("timeout", (timedOut) => {
|
|
99971
|
-
if (timedOut.reason === void 0) return mutantResult(mutant, "Timeout");
|
|
99972
|
-
return mutantResult(mutant, "Timeout", { statusReason: timedOut.reason });
|
|
99973
|
-
}), discriminator("status")("survived", (survived) => mutantResult(mutant, "Survived", { testsCompleted: survived.nrOfTests })), exhaustive);
|
|
99974
|
-
//#endregion
|
|
99975
100771
|
//#region src/report-assembly.ts
|
|
99976
100772
|
const extensionOf = (fileName) => {
|
|
99977
100773
|
const base = fileName.slice(fileName.lastIndexOf("/") + 1);
|
|
@@ -100080,13 +100876,6 @@ const assembleTestFiles = (input) => {
|
|
|
100080
100876
|
return Object.fromEntries(entries);
|
|
100081
100877
|
};
|
|
100082
100878
|
//#endregion
|
|
100083
|
-
//#region src/stryker-package.schema.ts
|
|
100084
|
-
const PackageJsonSchema = Struct({ version: String$1 });
|
|
100085
|
-
//#endregion
|
|
100086
|
-
//#region src/stryker-package.ts
|
|
100087
|
-
const rawPackageJson = package_default;
|
|
100088
|
-
const strykerVersion = decodeUnknownSync(PackageJsonSchema)(rawPackageJson).version;
|
|
100089
|
-
//#endregion
|
|
100090
100879
|
//#region ../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/utils.js
|
|
100091
100880
|
/**
|
|
100092
100881
|
* Checks if something is Uint8Array. Be careful: nodejs Buffer will return true.
|
|
@@ -100443,7 +101232,7 @@ function buildVerdictEnvelope(report, mode, signal, runId, basePath, pathService
|
|
|
100443
101232
|
runId,
|
|
100444
101233
|
mode,
|
|
100445
101234
|
signal,
|
|
100446
|
-
score: getOrNull(filter$
|
|
101235
|
+
score: getOrNull(filter$3(some(metrics.mutationScore), (score) => metrics.totalMutants > 0 && Number.isFinite(score))),
|
|
100447
101236
|
thresholds: {
|
|
100448
101237
|
high: report.thresholds.high,
|
|
100449
101238
|
low: report.thresholds.low,
|
|
@@ -100459,7 +101248,7 @@ function buildVerdictEnvelope(report, mode, signal, runId, basePath, pathService
|
|
|
100459
101248
|
ignored: metrics.ignored,
|
|
100460
101249
|
pending: metrics.pending
|
|
100461
101250
|
},
|
|
100462
|
-
reportFile: getOrNull(map$12(filter$
|
|
101251
|
+
reportFile: getOrNull(map$12(filter$3(fromUndefinedOr(jsonReporterFileName), () => metrics.totalMutants > 0), (fileName) => normalizeFileName(pathService.relative(basePath, fileName)))),
|
|
100463
101252
|
mutants: actionableMutants(report.files)
|
|
100464
101253
|
};
|
|
100465
101254
|
}
|
|
@@ -100652,7 +101441,10 @@ const makeMutationReportingService = (input) => {
|
|
|
100652
101441
|
const fs = yield* FileSystem;
|
|
100653
101442
|
const dir = pathService.dirname(input.options.incrementalFile);
|
|
100654
101443
|
yield* fs.makeDirectory(dir, { recursive: true });
|
|
100655
|
-
const json = yield* encodeEffect(fromJsonString(Unknown, { space: 2 }))(
|
|
101444
|
+
const json = yield* encodeEffect(fromJsonString(Unknown, { space: 2 }))({
|
|
101445
|
+
incrementalVersion: strykerVersion,
|
|
101446
|
+
...report
|
|
101447
|
+
}).pipe(orDie);
|
|
100656
101448
|
yield* fs.writeFileString(input.options.incrementalFile, json);
|
|
100657
101449
|
}
|
|
100658
101450
|
return {
|
|
@@ -100671,6 +101463,7 @@ const makeMutationReportingService = (input) => {
|
|
|
100671
101463
|
const slimIncrementalReport = (results) => gen(function* () {
|
|
100672
101464
|
const { files, testFiles } = yield* assembleReport(results);
|
|
100673
101465
|
return {
|
|
101466
|
+
incrementalVersion: strykerVersion,
|
|
100674
101467
|
schemaVersion: "1.0",
|
|
100675
101468
|
thresholds: input.options.thresholds,
|
|
100676
101469
|
files,
|
|
@@ -100721,25 +101514,6 @@ const rememberedResultsOf = (mutants, remembered) => {
|
|
|
100721
101514
|
onSome: (mutant) => [rememberedResultOf(mutant, entry)]
|
|
100722
101515
|
}));
|
|
100723
101516
|
};
|
|
100724
|
-
const isRunPlan = (plan) => plan.plan === "Run";
|
|
100725
|
-
const earlyResultOf = (plan) => Object.assign({}, plan.mutant, {
|
|
100726
|
-
location: toSchemaLocation(plan.mutant.location),
|
|
100727
|
-
status: plan.mutant.status ?? "Ignored"
|
|
100728
|
-
});
|
|
100729
|
-
const collectPlan = (plan, coveredPlans, earlyResults) => value(plan).pipe(when(isRunPlan, (runPlan) => {
|
|
100730
|
-
coveredPlans.push(runPlan);
|
|
100731
|
-
}), orElse((earlyPlan) => {
|
|
100732
|
-
earlyResults.push(earlyResultOf(earlyPlan));
|
|
100733
|
-
}));
|
|
100734
|
-
const partitionPlans = (plans) => {
|
|
100735
|
-
const coveredPlans = [];
|
|
100736
|
-
const earlyResults = [];
|
|
100737
|
-
plans.forEach((plan) => collectPlan(plan, coveredPlans, earlyResults));
|
|
100738
|
-
return {
|
|
100739
|
-
coveredPlans,
|
|
100740
|
-
earlyResults
|
|
100741
|
-
};
|
|
100742
|
-
};
|
|
100743
101517
|
const VALID_MUTANT_STATUS_SET = /* @__PURE__ */ new Set([
|
|
100744
101518
|
"Killed",
|
|
100745
101519
|
"Survived",
|
|
@@ -100757,6 +101531,8 @@ const toReportedMutant = (mutant) => Object.assign(mutant, {
|
|
|
100757
101531
|
coveredBy: mutant.coveredBy,
|
|
100758
101532
|
static: mutant.static
|
|
100759
101533
|
});
|
|
101534
|
+
const CHECKER_ACQUIRE_RETRIES = 2;
|
|
101535
|
+
const isCheckerCrash = (error) => value(error).pipe(tag("ChildProcessCrashedError", "OutOfMemoryError", () => true), orElse(() => false));
|
|
100760
101536
|
const makeCheckerPool = (prev, idGenerator) => value(prev.options.checkers.length === 0).pipe(when(true, () => as(void_$1, void 0)), orElse(() => make$12({
|
|
100761
101537
|
acquire: forEach$1(prev.options.checkers, (checker) => gen(function* () {
|
|
100762
101538
|
const resolved = yield* resolveConfiguredWorkerSpawn({
|
|
@@ -100767,7 +101543,10 @@ const makeCheckerPool = (prev, idGenerator) => value(prev.options.checkers.lengt
|
|
|
100767
101543
|
const service = yield* createCheckerFactory({
|
|
100768
101544
|
...prev.options,
|
|
100769
101545
|
checkers: [checker]
|
|
100770
|
-
}, prev.project.fileDescriptions, resolved.spawn.entrypoint, idGenerator, prev.sandbox.workingDirectory)
|
|
101546
|
+
}, prev.project.fileDescriptions, resolved.spawn.entrypoint, idGenerator, prev.sandbox.workingDirectory).pipe(retry({
|
|
101547
|
+
times: CHECKER_ACQUIRE_RETRIES,
|
|
101548
|
+
while: isCheckerCrash
|
|
101549
|
+
}));
|
|
100771
101550
|
return {
|
|
100772
101551
|
checkerName: resolved.name,
|
|
100773
101552
|
checker: service
|
|
@@ -100790,6 +101569,28 @@ const checkPlansWithConfiguredCheckers = (checkerPool, plans, reporting) => matc
|
|
|
100790
101569
|
}).pipe(as(checked.filter(([, result]) => result.status === "passed").map(([plan]) => plan))))));
|
|
100791
101570
|
}))
|
|
100792
101571
|
});
|
|
101572
|
+
const isPlannable = (mutant) => isSuccess$1(wireRecordOf(mutant));
|
|
101573
|
+
const DROPPED_IDS_IN_WARNING = 5;
|
|
101574
|
+
const partitionPlannable = (mutants) => {
|
|
101575
|
+
const plannable = [];
|
|
101576
|
+
const dropped = [];
|
|
101577
|
+
mutants.forEach((mutant) => {
|
|
101578
|
+
if (isPlannable(mutant)) plannable.push(mutant);
|
|
101579
|
+
else dropped.push(mutant);
|
|
101580
|
+
});
|
|
101581
|
+
return {
|
|
101582
|
+
plannable,
|
|
101583
|
+
dropped
|
|
101584
|
+
};
|
|
101585
|
+
};
|
|
101586
|
+
const droppedIdsOf = (dropped) => `${dropped.slice(0, DROPPED_IDS_IN_WARNING).map((mutant) => mutant.id).join(", ")}${match$6(liftPredicate(dropped.length, (count) => count > DROPPED_IDS_IN_WARNING), {
|
|
101587
|
+
onNone: () => "",
|
|
101588
|
+
onSome: (count) => `, +${count - DROPPED_IDS_IN_WARNING} more`
|
|
101589
|
+
})}`;
|
|
101590
|
+
const reportDroppedMutants = (dropped) => value(dropped.length).pipe(when(0, () => void_$1), orElse(() => gen(function* () {
|
|
101591
|
+
yield* update(checkerMutantsSkipped, dropped.length);
|
|
101592
|
+
yield* logWarning(`${dropped.length} mutant(s) cannot be described to a checker and were left out of the run (${droppedIdsOf(dropped)})`);
|
|
101593
|
+
})));
|
|
100793
101594
|
const mutationTestCell$1 = Cell_exports.layer({
|
|
100794
101595
|
read: (command) => gen(function* () {
|
|
100795
101596
|
yield* Scope;
|
|
@@ -100803,156 +101604,147 @@ const mutationTestCell$1 = Cell_exports.layer({
|
|
|
100803
101604
|
})),
|
|
100804
101605
|
decide: admitMutationTest,
|
|
100805
101606
|
encode: (outcome) => outcome,
|
|
100806
|
-
write: (outcome, raw) =>
|
|
100807
|
-
|
|
100808
|
-
|
|
100809
|
-
|
|
100810
|
-
|
|
100811
|
-
|
|
100812
|
-
|
|
100813
|
-
|
|
100814
|
-
|
|
100815
|
-
|
|
100816
|
-
|
|
100817
|
-
|
|
100818
|
-
|
|
100819
|
-
|
|
100820
|
-
|
|
100821
|
-
|
|
100822
|
-
yield*
|
|
100823
|
-
|
|
100824
|
-
|
|
100825
|
-
}));
|
|
100826
|
-
yield* logInfo("The dry-run has been completed successfully. No mutations have been executed.");
|
|
100827
|
-
return {
|
|
100828
|
-
results: [],
|
|
100829
|
-
verdict: null
|
|
100830
|
-
};
|
|
100831
|
-
})), tag("MutationTestNoTests", () => gen(function* () {
|
|
100832
|
-
const env = yield* RunEnvironment;
|
|
100833
|
-
const queue = yield* RunEvents;
|
|
100834
|
-
const now = yield* currentTimeMillis;
|
|
100835
|
-
const elapsed = millis(now - env.runStartedAt);
|
|
100836
|
-
yield* logInfo(`Done in ${format$1(elapsed)}.`);
|
|
100837
|
-
const nowEmit = yield* currentTimeMillis;
|
|
100838
|
-
yield* offer(queue, PhaseEntered.make({
|
|
100839
|
-
phase: "mutation-test",
|
|
100840
|
-
elapsedMs: nowEmit - env.runStartedAt
|
|
100841
|
-
}));
|
|
100842
|
-
return {
|
|
100843
|
-
results: [],
|
|
100844
|
-
verdict: null
|
|
100845
|
-
};
|
|
100846
|
-
})), tag("MutationTestProceed", () => gen(function* () {
|
|
100847
|
-
const prev = raw.prev;
|
|
100848
|
-
const env = yield* RunEnvironment;
|
|
100849
|
-
yield* gen(function* () {
|
|
101607
|
+
write: (outcome, raw) => {
|
|
101608
|
+
const { dropped, plannable: plannableMutants } = partitionPlannable(raw.prev.mutants);
|
|
101609
|
+
return withPhaseSpan("mutationTest", {
|
|
101610
|
+
mutantCount: raw.prev.mutants.length,
|
|
101611
|
+
skippedMutantCount: dropped.length,
|
|
101612
|
+
testCount: raw.prev.dryRunResult.tests.length
|
|
101613
|
+
}, () => gen(function* () {
|
|
101614
|
+
yield* reportDroppedMutants(dropped);
|
|
101615
|
+
const decision = yield* match$5(outcome, {
|
|
101616
|
+
onFailure: (err) => fail(StageError.make({
|
|
101617
|
+
stage: err.stage,
|
|
101618
|
+
reason: err.reason,
|
|
101619
|
+
cause: err
|
|
101620
|
+
})),
|
|
101621
|
+
onSuccess: (d) => succeed$4(d)
|
|
101622
|
+
});
|
|
101623
|
+
return yield* value(decision).pipe(tag("MutationTestDryRunOnly", () => gen(function* () {
|
|
101624
|
+
const env = yield* RunEnvironment;
|
|
101625
|
+
const queue = yield* RunEvents;
|
|
100850
101626
|
const nowEmit = yield* currentTimeMillis;
|
|
101627
|
+
yield* offer(queue, PhaseEntered.make({
|
|
101628
|
+
phase: "mutation-test",
|
|
101629
|
+
elapsedMs: nowEmit - env.runStartedAt
|
|
101630
|
+
}));
|
|
101631
|
+
yield* logInfo("The dry-run has been completed successfully. No mutations have been executed.");
|
|
101632
|
+
return {
|
|
101633
|
+
results: [],
|
|
101634
|
+
verdict: null
|
|
101635
|
+
};
|
|
101636
|
+
})), tag("MutationTestNoTests", () => gen(function* () {
|
|
101637
|
+
const env = yield* RunEnvironment;
|
|
100851
101638
|
const queue = yield* RunEvents;
|
|
101639
|
+
const now = yield* currentTimeMillis;
|
|
101640
|
+
const elapsed = millis(now - env.runStartedAt);
|
|
101641
|
+
yield* logInfo(`Done in ${format$1(elapsed)}.`);
|
|
101642
|
+
const nowEmit = yield* currentTimeMillis;
|
|
100852
101643
|
yield* offer(queue, PhaseEntered.make({
|
|
100853
101644
|
phase: "mutation-test",
|
|
100854
101645
|
elapsedMs: nowEmit - env.runStartedAt
|
|
100855
101646
|
}));
|
|
100856
|
-
});
|
|
100857
|
-
const idGenerator = yield* IdGenerator;
|
|
100858
|
-
const checkerPool = yield* makeCheckerPool(prev, idGenerator);
|
|
100859
|
-
const testRunnerContext = {
|
|
100860
|
-
options: prev.options,
|
|
100861
|
-
fileDescriptions: prev.project.fileDescriptions,
|
|
100862
|
-
sandboxWorkingDirectory: prev.sandbox.workingDirectory,
|
|
100863
|
-
idGenerator,
|
|
100864
|
-
retire: void_$1,
|
|
100865
|
-
testFiles: prev.project.testFiles.map((file) => prev.sandbox.sandboxFileFor(file))
|
|
100866
|
-
};
|
|
100867
|
-
const testRunnerPool = yield* make$12({
|
|
100868
|
-
acquire: buildTestRunner(testRunnerContext, suspend$3(() => {
|
|
100869
|
-
const runnerConfigured = prev.options.testRunner;
|
|
100870
|
-
const runnerLabel = value(runnerConfigured).pipe(when(isCustomTestRunner, (runner) => runner.plugin), orElse((name) => name));
|
|
100871
|
-
return resolveConfiguredWorkerSpawn({
|
|
100872
|
-
loaded: prev.loadedPlugins,
|
|
100873
|
-
kind: "TestRunner",
|
|
100874
|
-
configured: runnerConfigured
|
|
100875
|
-
}).pipe(mapError(missingWorkerEntry("mutationTest", "test runner", runnerLabel)), flatMap$1(({ spawn }) => makeChildProcessTestRunner({
|
|
100876
|
-
options: prev.options,
|
|
100877
|
-
fileDescriptions: prev.project.fileDescriptions,
|
|
100878
|
-
sandboxWorkingDirectory: prev.sandbox.workingDirectory,
|
|
100879
|
-
workerEntrypoint: spawn.entrypoint,
|
|
100880
|
-
idGenerator
|
|
100881
|
-
})));
|
|
100882
|
-
})),
|
|
100883
|
-
size: prev.concurrency.testRunners
|
|
100884
|
-
});
|
|
100885
|
-
const reporting = makeMutationReportingService({
|
|
100886
|
-
reporterStage: prev.reporterStage,
|
|
100887
|
-
options: prev.options,
|
|
100888
|
-
project: prev.project,
|
|
100889
|
-
testCoverage: prev.testCoverage,
|
|
100890
|
-
runId: env.runId,
|
|
100891
|
-
resolvedMode: env.resolvedMode,
|
|
100892
|
-
sandboxDirectory: prev.sandbox.workingDirectory,
|
|
100893
|
-
basePath: env.basePath
|
|
100894
|
-
});
|
|
100895
|
-
const sandboxFileByName = Object.fromEntries([...keys$2(prev.project.filesToMutate)].map((name) => [name, prev.sandbox.sandboxFileFor(name)]));
|
|
100896
|
-
const currentRelativeFiles = yield* readCurrentRelativeFiles(prev.project, env.basePath);
|
|
100897
|
-
const incremental = incrementalDiff({
|
|
100898
|
-
currentMutants: prev.mutants,
|
|
100899
|
-
testCoverage: prev.testCoverage,
|
|
100900
|
-
incrementalReport: prev.project.incrementalReport,
|
|
100901
|
-
currentRelativeFiles,
|
|
100902
|
-
basePath: env.basePath,
|
|
100903
|
-
force: prev.options.force
|
|
100904
|
-
});
|
|
100905
|
-
const rememberedResults = rememberedResultsOf(prev.mutants, incremental.remembered);
|
|
100906
|
-
yield* when$2(logInfo(`Incremental mode: reusing ${rememberedResults.length} mutant result(s), running ${incremental.mutants.length} mutant(s).`), succeed$4(rememberedResults.length > 0));
|
|
100907
|
-
const { coveredPlans, earlyResults: noCoverageResults } = partitionPlans(yield* decidePlans(incremental.mutants, prev.testCoverage, {
|
|
100908
|
-
disableBail: prev.options.disableBail,
|
|
100909
|
-
timeoutMS: prev.options.timeoutMS,
|
|
100910
|
-
timeoutFactor: prev.options.timeoutFactor,
|
|
100911
|
-
ignoreStatic: prev.options.ignoreStatic
|
|
100912
|
-
}, toMillis(prev.timeOverhead), void 0, sandboxFileByName));
|
|
100913
|
-
const sortedPlans = [...coveredPlans].sort((a, b) => Number(a.runOptions.reloadEnvironment) - Number(b.runOptions.reloadEnvironment));
|
|
100914
|
-
const allPlansForReporter = [...sortedPlans];
|
|
100915
|
-
yield* offerReporterEvent(prev.reporterStage, MutationTestingPlanReady.make({
|
|
100916
|
-
total: allPlansForReporter.length + noCoverageResults.length + rememberedResults.length,
|
|
100917
|
-
plans: allPlansForReporter.map((plan) => ({
|
|
100918
|
-
mutantId: plan.mutant.id,
|
|
100919
|
-
plan: plan.plan,
|
|
100920
|
-
netTime: plan.netTime,
|
|
100921
|
-
reloadEnvironment: plan.runOptions.reloadEnvironment
|
|
100922
|
-
}))
|
|
100923
|
-
})).pipe(ignoreCause);
|
|
100924
|
-
{
|
|
100925
|
-
const queue2 = yield* RunEvents;
|
|
100926
|
-
yield* offer(queue2, PlanKnown.make({ total: allPlansForReporter.length + noCoverageResults.length }));
|
|
100927
|
-
}
|
|
100928
|
-
const passedPlans = yield* checkPlansWithConfiguredCheckers(checkerPool, sortedPlans, reporting);
|
|
100929
|
-
const testRunnerStream = fromIterable$4(passedPlans);
|
|
100930
|
-
const plannedTotal = allPlansForReporter.length + noCoverageResults.length + rememberedResults.length;
|
|
100931
|
-
const pathService = yield* Path;
|
|
100932
|
-
const progressQueue = yield* RunEvents;
|
|
100933
|
-
const completedRef = yield* make$11(0);
|
|
100934
|
-
const preparedStreamableOf = (result) => {
|
|
100935
|
-
if (!isMutantStatus(result.status)) return;
|
|
100936
101647
|
return {
|
|
100937
|
-
|
|
100938
|
-
|
|
100939
|
-
location: toSchemaLocation(result.location)
|
|
101648
|
+
results: [],
|
|
101649
|
+
verdict: null
|
|
100940
101650
|
};
|
|
100941
|
-
}
|
|
100942
|
-
|
|
100943
|
-
|
|
100944
|
-
|
|
100945
|
-
|
|
100946
|
-
|
|
100947
|
-
|
|
100948
|
-
|
|
100949
|
-
|
|
100950
|
-
|
|
100951
|
-
|
|
100952
|
-
|
|
100953
|
-
|
|
100954
|
-
const
|
|
100955
|
-
|
|
101651
|
+
})), tag("MutationTestProceed", () => gen(function* () {
|
|
101652
|
+
const prev = raw.prev;
|
|
101653
|
+
const env = yield* RunEnvironment;
|
|
101654
|
+
yield* gen(function* () {
|
|
101655
|
+
const nowEmit = yield* currentTimeMillis;
|
|
101656
|
+
const queue = yield* RunEvents;
|
|
101657
|
+
yield* offer(queue, PhaseEntered.make({
|
|
101658
|
+
phase: "mutation-test",
|
|
101659
|
+
elapsedMs: nowEmit - env.runStartedAt
|
|
101660
|
+
}));
|
|
101661
|
+
});
|
|
101662
|
+
const idGenerator = yield* IdGenerator;
|
|
101663
|
+
const checkerPool = yield* makeCheckerPool(prev, idGenerator);
|
|
101664
|
+
const testRunnerContext = {
|
|
101665
|
+
options: prev.options,
|
|
101666
|
+
fileDescriptions: prev.project.fileDescriptions,
|
|
101667
|
+
sandboxWorkingDirectory: prev.sandbox.workingDirectory,
|
|
101668
|
+
idGenerator,
|
|
101669
|
+
retire: void_$1,
|
|
101670
|
+
testFiles: prev.project.testFiles.map((file) => prev.sandbox.sandboxFileFor(file))
|
|
101671
|
+
};
|
|
101672
|
+
const testRunnerPool = yield* make$12({
|
|
101673
|
+
acquire: buildTestRunner(testRunnerContext, suspend$3(() => {
|
|
101674
|
+
const runnerConfigured = prev.options.testRunner;
|
|
101675
|
+
const runnerLabel = value(runnerConfigured).pipe(when(isCustomTestRunner, (runner) => runner.plugin), orElse((name) => name));
|
|
101676
|
+
return resolveConfiguredWorkerSpawn({
|
|
101677
|
+
loaded: prev.loadedPlugins,
|
|
101678
|
+
kind: "TestRunner",
|
|
101679
|
+
configured: runnerConfigured
|
|
101680
|
+
}).pipe(mapError(missingWorkerEntry("mutationTest", "test runner", runnerLabel)), flatMap$1(({ spawn }) => makeChildProcessTestRunner({
|
|
101681
|
+
options: prev.options,
|
|
101682
|
+
fileDescriptions: prev.project.fileDescriptions,
|
|
101683
|
+
sandboxWorkingDirectory: prev.sandbox.workingDirectory,
|
|
101684
|
+
workerEntrypoint: spawn.entrypoint,
|
|
101685
|
+
idGenerator
|
|
101686
|
+
})));
|
|
101687
|
+
})),
|
|
101688
|
+
size: prev.concurrency.testRunners
|
|
101689
|
+
});
|
|
101690
|
+
const reporting = makeMutationReportingService({
|
|
101691
|
+
reporterStage: prev.reporterStage,
|
|
101692
|
+
options: prev.options,
|
|
101693
|
+
project: prev.project,
|
|
101694
|
+
testCoverage: prev.testCoverage,
|
|
101695
|
+
runId: env.runId,
|
|
101696
|
+
resolvedMode: env.resolvedMode,
|
|
101697
|
+
sandboxDirectory: prev.sandbox.workingDirectory,
|
|
101698
|
+
basePath: env.basePath
|
|
101699
|
+
});
|
|
101700
|
+
const sandboxFileByName = Object.fromEntries([...keys$2(prev.project.filesToMutate)].map((name) => [name, prev.sandbox.sandboxFileFor(name)]));
|
|
101701
|
+
const currentRelativeFiles = yield* readCurrentRelativeFiles(prev.project, env.basePath);
|
|
101702
|
+
const incremental = incrementalDiff({
|
|
101703
|
+
currentMutants: plannableMutants,
|
|
101704
|
+
testCoverage: prev.testCoverage,
|
|
101705
|
+
incrementalReport: prev.project.incrementalReport,
|
|
101706
|
+
currentRelativeFiles,
|
|
101707
|
+
basePath: env.basePath,
|
|
101708
|
+
force: prev.options.force
|
|
101709
|
+
});
|
|
101710
|
+
const rememberedResults = rememberedResultsOf(plannableMutants, incremental.remembered);
|
|
101711
|
+
yield* when$2(logInfo(`Incremental mode: reusing ${rememberedResults.length} mutant result(s), running ${incremental.mutants.length} mutant(s).`), succeed$4(rememberedResults.length > 0));
|
|
101712
|
+
const { runPlans, earlyResults: noCoverageResults } = partitionRunPlans(yield* decidePlans(incremental.mutants, prev.testCoverage, {
|
|
101713
|
+
disableBail: prev.options.disableBail,
|
|
101714
|
+
timeoutMS: prev.options.timeoutMS,
|
|
101715
|
+
timeoutFactor: prev.options.timeoutFactor,
|
|
101716
|
+
ignoreStatic: prev.options.ignoreStatic
|
|
101717
|
+
}, toMillis(prev.timeOverhead), void 0, sandboxFileByName));
|
|
101718
|
+
const sortedPlans = sortRunPlans(runPlans);
|
|
101719
|
+
const allPlansForReporter = [...sortedPlans];
|
|
101720
|
+
yield* offerReporterEvent(prev.reporterStage, MutationTestingPlanReady.make({
|
|
101721
|
+
total: allPlansForReporter.length + noCoverageResults.length + rememberedResults.length,
|
|
101722
|
+
plans: allPlansForReporter.map((plan) => ({
|
|
101723
|
+
mutantId: plan.mutant.id,
|
|
101724
|
+
plan: plan.plan,
|
|
101725
|
+
netTime: plan.netTime,
|
|
101726
|
+
reloadEnvironment: plan.runOptions.reloadEnvironment
|
|
101727
|
+
}))
|
|
101728
|
+
})).pipe(ignoreCause);
|
|
101729
|
+
{
|
|
101730
|
+
const queue2 = yield* RunEvents;
|
|
101731
|
+
yield* offer(queue2, PlanKnown.make({ total: allPlansForReporter.length + noCoverageResults.length }));
|
|
101732
|
+
}
|
|
101733
|
+
const passedPlans = yield* checkPlansWithConfiguredCheckers(checkerPool, sortedPlans, reporting);
|
|
101734
|
+
const testRunnerStream = fromIterable$4(passedPlans);
|
|
101735
|
+
const plannedTotal = allPlansForReporter.length + noCoverageResults.length + rememberedResults.length;
|
|
101736
|
+
const pathService = yield* Path;
|
|
101737
|
+
const progressQueue = yield* RunEvents;
|
|
101738
|
+
const completedRef = yield* make$11(0);
|
|
101739
|
+
const preparedStreamableOf = (result) => {
|
|
101740
|
+
if (!isMutantStatus(result.status)) return;
|
|
101741
|
+
return {
|
|
101742
|
+
status: result.status,
|
|
101743
|
+
file: reportFileName(pathService.relative(env.basePath, result.fileName)),
|
|
101744
|
+
location: toSchemaLocation(result.location)
|
|
101745
|
+
};
|
|
101746
|
+
};
|
|
101747
|
+
const toStreamEvent = (result, completed, prepared) => MutantTested.make({
|
|
100956
101748
|
id: result.id,
|
|
100957
101749
|
status: prepared.status,
|
|
100958
101750
|
file: prepared.file,
|
|
@@ -100961,71 +101753,85 @@ const mutationTestCell$1 = Cell_exports.layer({
|
|
|
100961
101753
|
replacement: result.replacement,
|
|
100962
101754
|
completed,
|
|
100963
101755
|
total: plannedTotal
|
|
101756
|
+
});
|
|
101757
|
+
const offerFinished = (result, prepared) => gen(function* () {
|
|
101758
|
+
if (prepared === void 0) return;
|
|
101759
|
+
const completed = yield* updateAndGet(completedRef, (n) => n + 1);
|
|
101760
|
+
yield* offer(progressQueue, RunMutantTested.make({
|
|
101761
|
+
id: result.id,
|
|
101762
|
+
status: prepared.status,
|
|
101763
|
+
file: prepared.file,
|
|
101764
|
+
location: prepared.location,
|
|
101765
|
+
mutator: result.mutatorName,
|
|
101766
|
+
replacement: result.replacement,
|
|
101767
|
+
completed,
|
|
101768
|
+
total: plannedTotal
|
|
101769
|
+
}));
|
|
101770
|
+
return completed;
|
|
101771
|
+
});
|
|
101772
|
+
const reportStreamTested = (result, completed, prepared) => offerReporterEvent(prev.reporterStage, toStreamEvent(result, completed, prepared)).pipe(catchCause((cause) => logWarning("Reporter stream failed handling mutantTested", cause)));
|
|
101773
|
+
const offerStreamTested = (result, completed, prepared) => match$6(all$2([fromNullishOr(completed), fromNullishOr(prepared)]), {
|
|
101774
|
+
onNone: () => void_$1,
|
|
101775
|
+
onSome: ([done, streamable]) => reportStreamTested(result, done, streamable)
|
|
101776
|
+
});
|
|
101777
|
+
const announceSettledMutant = (result) => gen(function* () {
|
|
101778
|
+
const prepared = preparedStreamableOf(result);
|
|
101779
|
+
const completed = yield* offerFinished(result, prepared);
|
|
101780
|
+
yield* offerStreamTested(result, completed, prepared);
|
|
101781
|
+
});
|
|
101782
|
+
yield* forEach$1([...rememberedResults, ...noCoverageResults], announceSettledMutant, {
|
|
101783
|
+
concurrency: 1,
|
|
101784
|
+
discard: true
|
|
101785
|
+
});
|
|
101786
|
+
const completedMutants = yield* make$11([...rememberedResults, ...noCoverageResults]);
|
|
101787
|
+
const checkpointGate = yield* make$34(1);
|
|
101788
|
+
yield* reporting.checkpoint(yield* get$1(completedMutants)).pipe(catchCause((cause) => logWarning("Failed to persist the mutation checkpoint", cause)));
|
|
101789
|
+
const persist = (result) => checkpointGate.withPermits(1)(gen(function* () {
|
|
101790
|
+
const next = yield* updateAndGet(completedMutants, (prev) => [...prev, result]);
|
|
101791
|
+
yield* reporting.checkpoint(next).pipe(catchCause((cause) => logWarning("Failed to persist the mutation checkpoint", cause)));
|
|
100964
101792
|
}));
|
|
100965
|
-
|
|
100966
|
-
|
|
100967
|
-
|
|
100968
|
-
|
|
100969
|
-
|
|
100970
|
-
|
|
100971
|
-
|
|
100972
|
-
|
|
100973
|
-
|
|
100974
|
-
|
|
100975
|
-
|
|
100976
|
-
|
|
100977
|
-
|
|
100978
|
-
|
|
100979
|
-
|
|
100980
|
-
|
|
100981
|
-
|
|
100982
|
-
|
|
100983
|
-
|
|
100984
|
-
|
|
100985
|
-
|
|
100986
|
-
|
|
100987
|
-
|
|
100988
|
-
|
|
100989
|
-
|
|
100990
|
-
|
|
100991
|
-
|
|
100992
|
-
|
|
100993
|
-
|
|
100994
|
-
|
|
100995
|
-
|
|
100996
|
-
|
|
100997
|
-
|
|
100998
|
-
|
|
100999
|
-
|
|
101000
|
-
|
|
101001
|
-
|
|
101002
|
-
|
|
101003
|
-
|
|
101004
|
-
|
|
101005
|
-
|
|
101006
|
-
|
|
101007
|
-
...noCoverageResults,
|
|
101008
|
-
...runResults
|
|
101009
|
-
];
|
|
101010
|
-
const outcomeResult = yield* reporting.reportAll(allResults);
|
|
101011
|
-
const doneNow = yield* currentTimeMillis;
|
|
101012
|
-
const elapsed = millis(doneNow - env.runStartedAt);
|
|
101013
|
-
yield* logInfo(`Done in ${format$1(elapsed)}.`);
|
|
101014
|
-
return outcomeResult;
|
|
101015
|
-
})), exhaustive);
|
|
101016
|
-
})).pipe(mapError((cause) => value(cause).pipe(tag("StageError", (stage) => stage), tag("CheckerAnsweredUnrequested", (breach) => StageError.make({
|
|
101017
|
-
stage: "mutationTest",
|
|
101018
|
-
reason: `Checker "${breach.checkerName}" answered about mutants it was not asked about (${breach.phase} phase): ${breach.unrequestedIds.join(", ")}`,
|
|
101019
|
-
cause: breach
|
|
101020
|
-
})), tag("CheckerSkippedRequested", (breach) => StageError.make({
|
|
101021
|
-
stage: "mutationTest",
|
|
101022
|
-
reason: `Checker "${breach.checkerName}" skipped requested mutants (${breach.phase} phase): ${breach.missingIds.join(", ")}`,
|
|
101023
|
-
cause: breach
|
|
101024
|
-
})), tag("ChildProcessCrashedError", "OutOfMemoryError", "PlatformError", "TestRunnerFailed", () => StageError.make({
|
|
101025
|
-
stage: "mutationTest",
|
|
101026
|
-
reason: "Mutation testing failed",
|
|
101027
|
-
cause
|
|
101028
|
-
})), exhaustive)))
|
|
101793
|
+
const runResults = yield* withPhaseSpan("mutationTest.batch", {
|
|
101794
|
+
total: plannedTotal,
|
|
101795
|
+
testRunners: prev.concurrency.testRunners
|
|
101796
|
+
}, () => mapEffect$1(testRunnerStream, (plan) => scoped(gen(function* () {
|
|
101797
|
+
const pool = testRunnerPool;
|
|
101798
|
+
const runner = yield* get$2(pool);
|
|
101799
|
+
const result = yield* runner.mutantRun(plan.runOptions).pipe(catchTags({
|
|
101800
|
+
OutOfMemoryError: (error) => flatMap$1(invalidate(pool, runner), () => fail(error)),
|
|
101801
|
+
ChildProcessCrashedError: (error) => flatMap$1(invalidate(pool, runner), () => fail(error))
|
|
101802
|
+
}));
|
|
101803
|
+
const reported = yield* reporting.reportMutantRunResult(toReportedMutant(plan.mutant), result);
|
|
101804
|
+
const prepared = preparedStreamableOf(reported);
|
|
101805
|
+
const finished = yield* offerFinished(reported, prepared);
|
|
101806
|
+
yield* offerStreamTested(reported, finished, prepared);
|
|
101807
|
+
yield* persist(reported);
|
|
101808
|
+
return reported;
|
|
101809
|
+
})), { concurrency: Math.max(1, prev.concurrency.testRunners) }).pipe(runCollect, map$7((chunk) => [...chunk])));
|
|
101810
|
+
const allResults = [
|
|
101811
|
+
...rememberedResults,
|
|
101812
|
+
...noCoverageResults,
|
|
101813
|
+
...runResults
|
|
101814
|
+
];
|
|
101815
|
+
const outcomeResult = yield* reporting.reportAll(allResults);
|
|
101816
|
+
const doneNow = yield* currentTimeMillis;
|
|
101817
|
+
const elapsed = millis(doneNow - env.runStartedAt);
|
|
101818
|
+
yield* logInfo(`Done in ${format$1(elapsed)}.`);
|
|
101819
|
+
return outcomeResult;
|
|
101820
|
+
})), exhaustive);
|
|
101821
|
+
})).pipe(mapError((cause) => value(cause).pipe(tag("StageError", (stage) => stage), tag("CheckerAnsweredUnrequested", (breach) => StageError.make({
|
|
101822
|
+
stage: "mutationTest",
|
|
101823
|
+
reason: `Checker "${breach.checkerName}" answered about mutants it was not asked about (${breach.phase} phase): ${breach.unrequestedIds.join(", ")}`,
|
|
101824
|
+
cause: breach
|
|
101825
|
+
})), tag("CheckerSkippedRequested", (breach) => StageError.make({
|
|
101826
|
+
stage: "mutationTest",
|
|
101827
|
+
reason: `Checker "${breach.checkerName}" skipped requested mutants (${breach.phase} phase): ${breach.missingIds.join(", ")}`,
|
|
101828
|
+
cause: breach
|
|
101829
|
+
})), tag("ChildProcessCrashedError", "OutOfMemoryError", "PlatformError", "TestRunnerFailed", () => StageError.make({
|
|
101830
|
+
stage: "mutationTest",
|
|
101831
|
+
reason: "Mutation testing failed",
|
|
101832
|
+
cause
|
|
101833
|
+
})), exhaustive)));
|
|
101834
|
+
}
|
|
101029
101835
|
});
|
|
101030
101836
|
//#endregion
|
|
101031
101837
|
//#region src/reporter-output.ts
|
|
@@ -102131,7 +102937,7 @@ const emitHelpEnvelope = (stream, help) => offer(stream.queue, HelpRendered.make
|
|
|
102131
102937
|
code: 0,
|
|
102132
102938
|
help
|
|
102133
102939
|
}));
|
|
102134
|
-
const helpPayload = (ok, captured) => filter$
|
|
102940
|
+
const helpPayload = (ok, captured) => filter$3(some(captured), () => ok.help || captured.length > 0);
|
|
102135
102941
|
const emitNullScoreVerdictWhenOpen = (stream, mode, basePath, pathService) => gen(function* () {
|
|
102136
102942
|
if (!stream.isOpen()) return;
|
|
102137
102943
|
yield* emitNullScoreVerdict(stream, mode, (yield* defaultOptions$2).thresholds, {}, basePath, pathService);
|
|
@@ -102930,50 +103736,233 @@ const runStrykerCli = (input, createRunEventStream) => gen(function* () {
|
|
|
102930
103736
|
})));
|
|
102931
103737
|
});
|
|
102932
103738
|
//#endregion
|
|
103739
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+exporter-metrics-otlp-http@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/OTLPMetricExporterOptions.js
|
|
103740
|
+
var require_OTLPMetricExporterOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103741
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103742
|
+
exports.AggregationTemporalityPreference = void 0;
|
|
103743
|
+
(function(AggregationTemporalityPreference) {
|
|
103744
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["DELTA"] = 0] = "DELTA";
|
|
103745
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["CUMULATIVE"] = 1] = "CUMULATIVE";
|
|
103746
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["LOWMEMORY"] = 2] = "LOWMEMORY";
|
|
103747
|
+
})(exports.AggregationTemporalityPreference || (exports.AggregationTemporalityPreference = {}));
|
|
103748
|
+
}));
|
|
103749
|
+
//#endregion
|
|
103750
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+exporter-metrics-otlp-http@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/OTLPMetricExporterBase.js
|
|
103751
|
+
var require_OTLPMetricExporterBase = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103752
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103753
|
+
exports.OTLPMetricExporterBase = exports.LowMemoryTemporalitySelector = exports.DeltaTemporalitySelector = exports.CumulativeTemporalitySelector = void 0;
|
|
103754
|
+
const core_1 = require_src$12();
|
|
103755
|
+
const sdk_metrics_1 = require_src$4();
|
|
103756
|
+
const OTLPMetricExporterOptions_1 = require_OTLPMetricExporterOptions();
|
|
103757
|
+
const otlp_exporter_base_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
103758
|
+
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
103759
|
+
const CumulativeTemporalitySelector = () => sdk_metrics_1.AggregationTemporality.CUMULATIVE;
|
|
103760
|
+
exports.CumulativeTemporalitySelector = CumulativeTemporalitySelector;
|
|
103761
|
+
const DeltaTemporalitySelector = (instrumentType) => {
|
|
103762
|
+
switch (instrumentType) {
|
|
103763
|
+
case sdk_metrics_1.InstrumentType.COUNTER:
|
|
103764
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_COUNTER:
|
|
103765
|
+
case sdk_metrics_1.InstrumentType.GAUGE:
|
|
103766
|
+
case sdk_metrics_1.InstrumentType.HISTOGRAM:
|
|
103767
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_GAUGE: return sdk_metrics_1.AggregationTemporality.DELTA;
|
|
103768
|
+
case sdk_metrics_1.InstrumentType.UP_DOWN_COUNTER:
|
|
103769
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER: return sdk_metrics_1.AggregationTemporality.CUMULATIVE;
|
|
103770
|
+
}
|
|
103771
|
+
};
|
|
103772
|
+
exports.DeltaTemporalitySelector = DeltaTemporalitySelector;
|
|
103773
|
+
const LowMemoryTemporalitySelector = (instrumentType) => {
|
|
103774
|
+
switch (instrumentType) {
|
|
103775
|
+
case sdk_metrics_1.InstrumentType.COUNTER:
|
|
103776
|
+
case sdk_metrics_1.InstrumentType.HISTOGRAM: return sdk_metrics_1.AggregationTemporality.DELTA;
|
|
103777
|
+
case sdk_metrics_1.InstrumentType.GAUGE:
|
|
103778
|
+
case sdk_metrics_1.InstrumentType.UP_DOWN_COUNTER:
|
|
103779
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
|
|
103780
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_COUNTER:
|
|
103781
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_GAUGE: return sdk_metrics_1.AggregationTemporality.CUMULATIVE;
|
|
103782
|
+
}
|
|
103783
|
+
};
|
|
103784
|
+
exports.LowMemoryTemporalitySelector = LowMemoryTemporalitySelector;
|
|
103785
|
+
function chooseTemporalitySelectorFromEnvironment() {
|
|
103786
|
+
const configuredTemporality = ((0, core_1.getStringFromEnv)("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE") ?? "cumulative").toLowerCase();
|
|
103787
|
+
if (configuredTemporality === "cumulative") return exports.CumulativeTemporalitySelector;
|
|
103788
|
+
if (configuredTemporality === "delta") return exports.DeltaTemporalitySelector;
|
|
103789
|
+
if (configuredTemporality === "lowmemory") return exports.LowMemoryTemporalitySelector;
|
|
103790
|
+
api_1.diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${configuredTemporality}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`);
|
|
103791
|
+
return exports.CumulativeTemporalitySelector;
|
|
103792
|
+
}
|
|
103793
|
+
function chooseTemporalitySelector(temporalityPreference) {
|
|
103794
|
+
if (temporalityPreference != null) {
|
|
103795
|
+
if (temporalityPreference === OTLPMetricExporterOptions_1.AggregationTemporalityPreference.DELTA) return exports.DeltaTemporalitySelector;
|
|
103796
|
+
else if (temporalityPreference === OTLPMetricExporterOptions_1.AggregationTemporalityPreference.LOWMEMORY) return exports.LowMemoryTemporalitySelector;
|
|
103797
|
+
return exports.CumulativeTemporalitySelector;
|
|
103798
|
+
}
|
|
103799
|
+
return chooseTemporalitySelectorFromEnvironment();
|
|
103800
|
+
}
|
|
103801
|
+
const DEFAULT_AGGREGATION = Object.freeze({ type: sdk_metrics_1.AggregationType.DEFAULT });
|
|
103802
|
+
function chooseAggregationSelector(config) {
|
|
103803
|
+
return config?.aggregationPreference ?? (() => DEFAULT_AGGREGATION);
|
|
103804
|
+
}
|
|
103805
|
+
var OTLPMetricExporterBase = class extends otlp_exporter_base_1.OTLPExporterBase {
|
|
103806
|
+
_aggregationTemporalitySelector;
|
|
103807
|
+
_aggregationSelector;
|
|
103808
|
+
constructor(delegate, config) {
|
|
103809
|
+
super(delegate);
|
|
103810
|
+
this._aggregationSelector = chooseAggregationSelector(config);
|
|
103811
|
+
this._aggregationTemporalitySelector = chooseTemporalitySelector(config?.temporalityPreference);
|
|
103812
|
+
}
|
|
103813
|
+
selectAggregation(instrumentType) {
|
|
103814
|
+
return this._aggregationSelector(instrumentType);
|
|
103815
|
+
}
|
|
103816
|
+
selectAggregationTemporality(instrumentType) {
|
|
103817
|
+
return this._aggregationTemporalitySelector(instrumentType);
|
|
103818
|
+
}
|
|
103819
|
+
};
|
|
103820
|
+
exports.OTLPMetricExporterBase = OTLPMetricExporterBase;
|
|
103821
|
+
}));
|
|
103822
|
+
//#endregion
|
|
103823
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+exporter-metrics-otlp-http@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/platform/node/OTLPMetricExporter.js
|
|
103824
|
+
var require_OTLPMetricExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103825
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103826
|
+
exports.OTLPMetricExporter = void 0;
|
|
103827
|
+
const OTLPMetricExporterBase_1 = require_OTLPMetricExporterBase();
|
|
103828
|
+
const otlp_transformer_1 = require_src$3();
|
|
103829
|
+
const node_http_1 = (init_index_node_http(), __toCommonJS(index_node_http_exports));
|
|
103830
|
+
/**
|
|
103831
|
+
* OTLP Metric Exporter for Node.js
|
|
103832
|
+
*/
|
|
103833
|
+
var OTLPMetricExporter = class extends OTLPMetricExporterBase_1.OTLPMetricExporterBase {
|
|
103834
|
+
constructor(config) {
|
|
103835
|
+
super((0, node_http_1.createOtlpHttpExportDelegate)((0, node_http_1.convertLegacyHttpOptions)(config ?? {}, "METRICS", "v1/metrics", { "Content-Type": "application/json" }), otlp_transformer_1.JsonMetricsSerializer), config);
|
|
103836
|
+
}
|
|
103837
|
+
};
|
|
103838
|
+
exports.OTLPMetricExporter = OTLPMetricExporter;
|
|
103839
|
+
}));
|
|
103840
|
+
//#endregion
|
|
103841
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+exporter-metrics-otlp-http@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/platform/node/index.js
|
|
103842
|
+
var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103843
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103844
|
+
exports.OTLPMetricExporter = void 0;
|
|
103845
|
+
var OTLPMetricExporter_1 = require_OTLPMetricExporter();
|
|
103846
|
+
Object.defineProperty(exports, "OTLPMetricExporter", {
|
|
103847
|
+
enumerable: true,
|
|
103848
|
+
get: function() {
|
|
103849
|
+
return OTLPMetricExporter_1.OTLPMetricExporter;
|
|
103850
|
+
}
|
|
103851
|
+
});
|
|
103852
|
+
}));
|
|
103853
|
+
//#endregion
|
|
103854
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+exporter-metrics-otlp-http@0.208.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/platform/index.js
|
|
103855
|
+
var require_platform = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103856
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103857
|
+
exports.OTLPMetricExporter = void 0;
|
|
103858
|
+
var node_1 = require_node();
|
|
103859
|
+
Object.defineProperty(exports, "OTLPMetricExporter", {
|
|
103860
|
+
enumerable: true,
|
|
103861
|
+
get: function() {
|
|
103862
|
+
return node_1.OTLPMetricExporter;
|
|
103863
|
+
}
|
|
103864
|
+
});
|
|
103865
|
+
}));
|
|
103866
|
+
//#endregion
|
|
102933
103867
|
//#region src/platform/telemetry.ts
|
|
102934
|
-
|
|
103868
|
+
var import_src = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103869
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103870
|
+
exports.OTLPMetricExporterBase = exports.LowMemoryTemporalitySelector = exports.DeltaTemporalitySelector = exports.CumulativeTemporalitySelector = exports.AggregationTemporalityPreference = exports.OTLPMetricExporter = void 0;
|
|
103871
|
+
var platform_1 = require_platform();
|
|
103872
|
+
Object.defineProperty(exports, "OTLPMetricExporter", {
|
|
103873
|
+
enumerable: true,
|
|
103874
|
+
get: function() {
|
|
103875
|
+
return platform_1.OTLPMetricExporter;
|
|
103876
|
+
}
|
|
103877
|
+
});
|
|
103878
|
+
var OTLPMetricExporterOptions_1 = require_OTLPMetricExporterOptions();
|
|
103879
|
+
Object.defineProperty(exports, "AggregationTemporalityPreference", {
|
|
103880
|
+
enumerable: true,
|
|
103881
|
+
get: function() {
|
|
103882
|
+
return OTLPMetricExporterOptions_1.AggregationTemporalityPreference;
|
|
103883
|
+
}
|
|
103884
|
+
});
|
|
103885
|
+
var OTLPMetricExporterBase_1 = require_OTLPMetricExporterBase();
|
|
103886
|
+
Object.defineProperty(exports, "CumulativeTemporalitySelector", {
|
|
103887
|
+
enumerable: true,
|
|
103888
|
+
get: function() {
|
|
103889
|
+
return OTLPMetricExporterBase_1.CumulativeTemporalitySelector;
|
|
103890
|
+
}
|
|
103891
|
+
});
|
|
103892
|
+
Object.defineProperty(exports, "DeltaTemporalitySelector", {
|
|
103893
|
+
enumerable: true,
|
|
103894
|
+
get: function() {
|
|
103895
|
+
return OTLPMetricExporterBase_1.DeltaTemporalitySelector;
|
|
103896
|
+
}
|
|
103897
|
+
});
|
|
103898
|
+
Object.defineProperty(exports, "LowMemoryTemporalitySelector", {
|
|
103899
|
+
enumerable: true,
|
|
103900
|
+
get: function() {
|
|
103901
|
+
return OTLPMetricExporterBase_1.LowMemoryTemporalitySelector;
|
|
103902
|
+
}
|
|
103903
|
+
});
|
|
103904
|
+
Object.defineProperty(exports, "OTLPMetricExporterBase", {
|
|
103905
|
+
enumerable: true,
|
|
103906
|
+
get: function() {
|
|
103907
|
+
return OTLPMetricExporterBase_1.OTLPMetricExporterBase;
|
|
103908
|
+
}
|
|
103909
|
+
});
|
|
103910
|
+
})))();
|
|
102935
103911
|
const EXPORT_TIMEOUT_MILLIS = 5e3;
|
|
103912
|
+
const SHUTDOWN_TIMEOUT = millis(6e3);
|
|
102936
103913
|
const withBestEffortShutdown = (self, shutdownTimeout) => effectContext(acquireRelease(gen(function* () {
|
|
102937
103914
|
const scope = yield* make$39();
|
|
102938
103915
|
return {
|
|
102939
103916
|
context: yield* buildWithScope(self, scope),
|
|
102940
103917
|
scope
|
|
102941
103918
|
};
|
|
102942
|
-
}), ({ scope }) => close(scope, void_$2).pipe(interruptible, timeoutOption(shutdownTimeout), ignoreCause)).pipe(map$7(({ context }) => context)));
|
|
103919
|
+
}), ({ scope }) => close(scope, void_$2).pipe(interruptible, timeoutOption(shutdownTimeout), tapCause((cause) => logWarning(`Telemetry shutdown did not complete: ${pretty(cause)}`)), ignoreCause)).pipe(map$7(({ context }) => context)));
|
|
102943
103920
|
const PROCESSOR_BY_KIND = {
|
|
102944
103921
|
batch: (exporter) => new import_index_shim.BatchSpanProcessor(exporter),
|
|
102945
103922
|
simple: (exporter) => new import_index_shim.SimpleSpanProcessor(exporter)
|
|
102946
103923
|
};
|
|
102947
103924
|
const TRACES_PATH = "/v1/traces";
|
|
102948
|
-
const
|
|
103925
|
+
const METRICS_PATH = "/v1/metrics";
|
|
103926
|
+
const DEFAULT_METRIC_EXPORT_INTERVAL_MILLIS = 6e4;
|
|
103927
|
+
const SIGNAL_PATH = /\/(?:v1|v1\/(?:traces|metrics))$/u;
|
|
103928
|
+
const urlFor = (endpoint, path) => match$6(fromUndefinedOr(endpoint), {
|
|
102949
103929
|
onNone: () => void 0,
|
|
102950
|
-
onSome: (base) => {
|
|
102951
|
-
const trimmed = base.replace(/\/+$/u, "");
|
|
102952
|
-
return value(trimmed.endsWith(TRACES_PATH)).pipe(when(true, () => trimmed), orElse(() => `${trimmed}${TRACES_PATH}`));
|
|
102953
|
-
}
|
|
103930
|
+
onSome: (base) => `${base.replace(/\/+$/u, "").replace(SIGNAL_PATH, "")}${path}`
|
|
102954
103931
|
});
|
|
102955
|
-
const
|
|
103932
|
+
const resourceUrlFor = (endpoint, path) => value(urlFor(endpoint, path)).pipe(when(void 0, () => ({ timeoutMillis: EXPORT_TIMEOUT_MILLIS })), orElse((url) => ({
|
|
102956
103933
|
url,
|
|
102957
103934
|
timeoutMillis: EXPORT_TIMEOUT_MILLIS
|
|
102958
103935
|
})));
|
|
103936
|
+
const exporterOptionsFor = (endpoint) => resourceUrlFor(endpoint, TRACES_PATH);
|
|
102959
103937
|
const otlpTelemetryLayer = (options) => {
|
|
102960
|
-
const exporter = new import_src.OTLPTraceExporter(exporterOptionsFor(options.endpoint));
|
|
103938
|
+
const exporter = new import_src$1.OTLPTraceExporter(exporterOptionsFor(options.endpoint));
|
|
103939
|
+
const metricReader = new import_src$6.PeriodicExportingMetricReader({
|
|
103940
|
+
exporter: new import_src.OTLPMetricExporter({
|
|
103941
|
+
...resourceUrlFor(options.endpoint, METRICS_PATH),
|
|
103942
|
+
temporalityPreference: import_src.AggregationTemporalityPreference.CUMULATIVE
|
|
103943
|
+
}),
|
|
103944
|
+
exportIntervalMillis: options.metricExportIntervalMillis ?? DEFAULT_METRIC_EXPORT_INTERVAL_MILLIS
|
|
103945
|
+
});
|
|
102961
103946
|
return withBestEffortShutdown(layer$1(() => ({
|
|
102962
103947
|
resource: { serviceName: options.serviceName },
|
|
103948
|
+
metricReader,
|
|
102963
103949
|
spanProcessor: value(options.processor ?? "simple").pipe(when("batch", (kind) => PROCESSOR_BY_KIND[kind](exporter)), orElse((kind) => PROCESSOR_BY_KIND[kind](exporter)))
|
|
102964
103950
|
})), SHUTDOWN_TIMEOUT);
|
|
102965
103951
|
};
|
|
102966
103952
|
const telemetryLayer = unwrap$4(all([
|
|
102967
103953
|
boolean$3("OTEL_ENABLED").pipe(withDefault$2(false)),
|
|
102968
103954
|
string$4("OTEL_SERVICE_NAME").pipe(withDefault$2("stryker-js")),
|
|
102969
|
-
string$4("OTEL_EXPORTER_OTLP_ENDPOINT").pipe(withDefault$2("http://127.0.0.1:4318"))
|
|
103955
|
+
string$4("OTEL_EXPORTER_OTLP_ENDPOINT").pipe(withDefault$2("http://127.0.0.1:4318")),
|
|
103956
|
+
number("OTEL_METRIC_EXPORT_INTERVAL").pipe(withDefault$2(DEFAULT_METRIC_EXPORT_INTERVAL_MILLIS))
|
|
102970
103957
|
]).pipe(orElseSucceed(() => [
|
|
102971
103958
|
false,
|
|
102972
103959
|
"stryker-js",
|
|
102973
|
-
"http://127.0.0.1:4318"
|
|
102974
|
-
|
|
103960
|
+
"http://127.0.0.1:4318",
|
|
103961
|
+
DEFAULT_METRIC_EXPORT_INTERVAL_MILLIS
|
|
103962
|
+
]), map$7(([enabled, serviceName, endpoint, metricExportIntervalMillis]) => value(enabled).pipe(when(true, () => otlpTelemetryLayer({
|
|
102975
103963
|
serviceName,
|
|
102976
|
-
endpoint
|
|
103964
|
+
endpoint,
|
|
103965
|
+
metricExportIntervalMillis
|
|
102977
103966
|
})), orElse(() => empty$7)))));
|
|
102978
103967
|
//#endregion
|
|
102979
103968
|
//#region src/bin/main.ts
|