@systemfsoftware/stryker-js 7.0.0 → 8.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 +10 -0
- package/dist/config.d.mts +12 -2
- package/dist/index.d.mts +73 -18
- package/dist/index.mjs +2 -2
- package/dist/main.mjs +1487 -544
- package/dist/{mutation-test.cell-689vUxaq.d.mts → mutation-test.cell-Ch-QUquW.d.mts} +1 -1
- 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-WMC3thmX.mjs} +458 -283
- package/package.json +9 -7
- 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 */
|
|
@@ -3193,7 +3193,7 @@ const Number$5 = /*#__PURE__*/ make$43((self, that) => {
|
|
|
3193
3193
|
* @category mapping
|
|
3194
3194
|
* @since 2.0.0
|
|
3195
3195
|
*/
|
|
3196
|
-
const mapInput$
|
|
3196
|
+
const mapInput$2 = /*#__PURE__*/ dual(2, (self, f) => make$43((b1, b2) => self(f(b1), f(b2))));
|
|
3197
3197
|
/**
|
|
3198
3198
|
* Checks whether one value is strictly less than another according to the given order.
|
|
3199
3199
|
*
|
|
@@ -3994,7 +3994,7 @@ const toArray = (self) => isNone(self) ? [] : [self.value];
|
|
|
3994
3994
|
* @category filtering
|
|
3995
3995
|
* @since 2.0.0
|
|
3996
3996
|
*/
|
|
3997
|
-
const filter$
|
|
3997
|
+
const filter$3 = /*#__PURE__*/ dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none());
|
|
3998
3998
|
/**
|
|
3999
3999
|
* Lifts a `Predicate` or `Refinement` into the `Option` context: returns
|
|
4000
4000
|
* `Some(value)` when the predicate holds, `None` otherwise.
|
|
@@ -4166,7 +4166,7 @@ const ServiceProto = {
|
|
|
4166
4166
|
};
|
|
4167
4167
|
const cacheKeys = /*#__PURE__*/ new Set();
|
|
4168
4168
|
const ReferenceTypeId = "~effect/Context/Reference";
|
|
4169
|
-
const TypeId$
|
|
4169
|
+
const TypeId$44 = "~effect/Context";
|
|
4170
4170
|
const MaxDepth = 8;
|
|
4171
4171
|
const FlattenAfterBaseHits = 8;
|
|
4172
4172
|
const makeImpl$1 = (cacheRoot, base, overlay, depth) => {
|
|
@@ -4246,7 +4246,7 @@ const Proto$11 = {
|
|
|
4246
4246
|
return flatten$2(this);
|
|
4247
4247
|
},
|
|
4248
4248
|
...PipeInspectableProto,
|
|
4249
|
-
[TypeId$
|
|
4249
|
+
[TypeId$44]: { _Services: (_) => _ },
|
|
4250
4250
|
toJSON() {
|
|
4251
4251
|
return {
|
|
4252
4252
|
_id: "Context",
|
|
@@ -4265,7 +4265,7 @@ const Proto$11 = {
|
|
|
4265
4265
|
return true;
|
|
4266
4266
|
},
|
|
4267
4267
|
[symbol$2]() {
|
|
4268
|
-
return number$
|
|
4268
|
+
return number$3(this.mapUnsafe.size);
|
|
4269
4269
|
}
|
|
4270
4270
|
};
|
|
4271
4271
|
/** @internal */
|
|
@@ -4301,7 +4301,7 @@ const hasSameCache = (self, that) => self.cacheRoot === that.cacheRoot;
|
|
|
4301
4301
|
* @category guards
|
|
4302
4302
|
* @since 2.0.0
|
|
4303
4303
|
*/
|
|
4304
|
-
const isContext = (u) => hasProperty(u, TypeId$
|
|
4304
|
+
const isContext = (u) => hasProperty(u, TypeId$44);
|
|
4305
4305
|
/**
|
|
4306
4306
|
* Checks whether the provided argument is a `Reference`.
|
|
4307
4307
|
*
|
|
@@ -5163,7 +5163,7 @@ const has$4 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key));
|
|
|
5163
5163
|
* @category filtering
|
|
5164
5164
|
* @since 2.0.0
|
|
5165
5165
|
*/
|
|
5166
|
-
const filter$
|
|
5166
|
+
const filter$2 = /*#__PURE__*/ dual(2, (self, predicate) => {
|
|
5167
5167
|
const out = empty$10();
|
|
5168
5168
|
for (const key of keys$3(self)) if (predicate(self[key], key)) assignProperty$1(out, key, self[key]);
|
|
5169
5169
|
return out;
|
|
@@ -5355,6 +5355,39 @@ const Array$1 = globalThis.Array;
|
|
|
5355
5355
|
*/
|
|
5356
5356
|
const allocate$1 = (n) => new Array$1(n);
|
|
5357
5357
|
/**
|
|
5358
|
+
* Creates a `NonEmptyArray` of length `n` where element `i` is computed by `f(i)`.
|
|
5359
|
+
*
|
|
5360
|
+
* **When to use**
|
|
5361
|
+
*
|
|
5362
|
+
* Use when you need to compute each array element from its index.
|
|
5363
|
+
*
|
|
5364
|
+
* **Details**
|
|
5365
|
+
*
|
|
5366
|
+
* `n` is normalized to an integer greater than or equal to 1, so this function
|
|
5367
|
+
* always returns at least one element. Supports both data-first and data-last
|
|
5368
|
+
* usage.
|
|
5369
|
+
*
|
|
5370
|
+
* **Example** (Generating values from indices)
|
|
5371
|
+
*
|
|
5372
|
+
* ```ts import.meta.vitest
|
|
5373
|
+
* import { Array } from "effect"
|
|
5374
|
+
*
|
|
5375
|
+
* Array.makeBy(5, (n) => n * 2) // => [0, 2, 4, 6, 8]
|
|
5376
|
+
* ```
|
|
5377
|
+
*
|
|
5378
|
+
* @see {@link range} — create a range of integers
|
|
5379
|
+
* @see {@link replicate} — repeat a single value
|
|
5380
|
+
*
|
|
5381
|
+
* @category constructors
|
|
5382
|
+
* @since 2.0.0
|
|
5383
|
+
*/
|
|
5384
|
+
const makeBy = /*#__PURE__*/ dual(2, (n, f) => {
|
|
5385
|
+
const max = Math.max(1, Math.floor(n));
|
|
5386
|
+
const out = new Array$1(max);
|
|
5387
|
+
for (let i = 0; i < max; i++) out[i] = f(i);
|
|
5388
|
+
return out;
|
|
5389
|
+
});
|
|
5390
|
+
/**
|
|
5358
5391
|
* Converts an `Iterable` to an `Array`.
|
|
5359
5392
|
*
|
|
5360
5393
|
* **When to use**
|
|
@@ -5763,6 +5796,37 @@ const findLast = /*#__PURE__*/ dual(2, (self, f) => {
|
|
|
5763
5796
|
}
|
|
5764
5797
|
return none();
|
|
5765
5798
|
});
|
|
5799
|
+
/**
|
|
5800
|
+
* Sorts an array by the given `Order`, returning a new array.
|
|
5801
|
+
*
|
|
5802
|
+
* **When to use**
|
|
5803
|
+
*
|
|
5804
|
+
* Use to sort an array using a single `Order` comparator.
|
|
5805
|
+
*
|
|
5806
|
+
* **Details**
|
|
5807
|
+
*
|
|
5808
|
+
* Preserves `NonEmptyArray` in the return type. Use `sortWith` to sort by a
|
|
5809
|
+
* derived key, or `sortBy` for multi-key sorting.
|
|
5810
|
+
*
|
|
5811
|
+
* **Example** (Sorting numbers)
|
|
5812
|
+
*
|
|
5813
|
+
* ```ts import.meta.vitest
|
|
5814
|
+
* import { Array, Order } from "effect"
|
|
5815
|
+
*
|
|
5816
|
+
* Array.sort([3, 1, 4, 1, 5], Order.Number) // => [1, 1, 3, 4, 5]
|
|
5817
|
+
* ```
|
|
5818
|
+
*
|
|
5819
|
+
* @see {@link sortWith} — sort by a mapping function
|
|
5820
|
+
* @see {@link sortBy} — sort by multiple orders
|
|
5821
|
+
*
|
|
5822
|
+
* @category sorting
|
|
5823
|
+
* @since 2.0.0
|
|
5824
|
+
*/
|
|
5825
|
+
const sort = /*#__PURE__*/ dual(2, (self, O) => {
|
|
5826
|
+
const out = Array$1.from(self);
|
|
5827
|
+
out.sort(O);
|
|
5828
|
+
return out;
|
|
5829
|
+
});
|
|
5766
5830
|
const hashBucketsAdd = (buckets, value) => {
|
|
5767
5831
|
const hash$7 = hash(value);
|
|
5768
5832
|
const bucket = buckets.get(hash$7);
|
|
@@ -5866,6 +5930,39 @@ const of = (a) => [a];
|
|
|
5866
5930
|
*/
|
|
5867
5931
|
const map$10 = /*#__PURE__*/ dual(2, (self, f) => self.map(f));
|
|
5868
5932
|
/**
|
|
5933
|
+
* Keeps only elements satisfying a predicate (or refinement).
|
|
5934
|
+
*
|
|
5935
|
+
* **When to use**
|
|
5936
|
+
*
|
|
5937
|
+
* Use to filter an iterable into a new array of original elements that satisfy
|
|
5938
|
+
* a boolean predicate or refinement.
|
|
5939
|
+
*
|
|
5940
|
+
* **Details**
|
|
5941
|
+
*
|
|
5942
|
+
* The predicate receives `(element, index)`. Refinements are supported for type
|
|
5943
|
+
* narrowing.
|
|
5944
|
+
*
|
|
5945
|
+
* **Example** (Filtering even numbers)
|
|
5946
|
+
*
|
|
5947
|
+
* ```ts import.meta.vitest
|
|
5948
|
+
* import { Array } from "effect"
|
|
5949
|
+
*
|
|
5950
|
+
* Array.filter([1, 2, 3, 4], (x) => x % 2 === 0) // => [2, 4]
|
|
5951
|
+
* ```
|
|
5952
|
+
*
|
|
5953
|
+
* @see {@link partition} — split into matching and non-matching
|
|
5954
|
+
* @see {@link filterMap} for transforming while filtering
|
|
5955
|
+
*
|
|
5956
|
+
* @category filtering
|
|
5957
|
+
* @since 2.0.0
|
|
5958
|
+
*/
|
|
5959
|
+
const filter$1 = /*#__PURE__*/ dual(2, (self, predicate) => {
|
|
5960
|
+
const as = fromIterable$6(self);
|
|
5961
|
+
const out = [];
|
|
5962
|
+
for (let i = 0; i < as.length; i++) if (predicate(as[i], i)) out.push(as[i]);
|
|
5963
|
+
return out;
|
|
5964
|
+
});
|
|
5965
|
+
/**
|
|
5869
5966
|
* Folds an iterable from left to right into a single value.
|
|
5870
5967
|
*
|
|
5871
5968
|
* **When to use**
|
|
@@ -5924,8 +6021,8 @@ const dedupe = (self) => {
|
|
|
5924
6021
|
};
|
|
5925
6022
|
//#endregion
|
|
5926
6023
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Duration.js
|
|
5927
|
-
const TypeId$
|
|
5928
|
-
const bigint0$
|
|
6024
|
+
const TypeId$43 = "~effect/time/Duration";
|
|
6025
|
+
const bigint0$3 = /*#__PURE__*/ BigInt(0);
|
|
5929
6026
|
const bigint1 = /*#__PURE__*/ BigInt(1);
|
|
5930
6027
|
const bigint2 = /*#__PURE__*/ BigInt(2);
|
|
5931
6028
|
const bigint10$1 = /*#__PURE__*/ BigInt(10);
|
|
@@ -5942,7 +6039,7 @@ const parseNanos = (input, scale) => {
|
|
|
5942
6039
|
const fractional = input.slice(decimalIndex + 1);
|
|
5943
6040
|
const fractionalScale = bigint10$1 ** BigInt(fractional.length);
|
|
5944
6041
|
const scaled = (BigInt(input.slice(isNegative ? 1 : 0, decimalIndex)) * fractionalScale + BigInt(fractional)) * scale;
|
|
5945
|
-
const rounded = scaled / fractionalScale + (scaled % fractionalScale * bigint2 >= fractionalScale ? bigint1 : bigint0$
|
|
6042
|
+
const rounded = scaled / fractionalScale + (scaled % fractionalScale * bigint2 >= fractionalScale ? bigint1 : bigint0$3);
|
|
5946
6043
|
return isNegative ? -rounded : rounded;
|
|
5947
6044
|
};
|
|
5948
6045
|
const DURATION_REGEXP = /^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/;
|
|
@@ -6003,7 +6100,7 @@ const fromInputUnsafe = (input) => {
|
|
|
6003
6100
|
}
|
|
6004
6101
|
case "object": {
|
|
6005
6102
|
if (input === null) break;
|
|
6006
|
-
if (TypeId$
|
|
6103
|
+
if (TypeId$43 in input) return input;
|
|
6007
6104
|
if (Array.isArray(input)) {
|
|
6008
6105
|
if (input.length !== 2 || !input.every(isNumber)) return invalid(input);
|
|
6009
6106
|
if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero$1;
|
|
@@ -6035,12 +6132,12 @@ const zeroDurationValue = {
|
|
|
6035
6132
|
const infinityDurationValue = { _tag: "Infinity" };
|
|
6036
6133
|
const negativeInfinityDurationValue = { _tag: "NegativeInfinity" };
|
|
6037
6134
|
const DurationProto = {
|
|
6038
|
-
[TypeId$
|
|
6135
|
+
[TypeId$43]: TypeId$43,
|
|
6039
6136
|
[symbol$2]() {
|
|
6040
6137
|
switch (this.value._tag) {
|
|
6041
6138
|
case "Millis": {
|
|
6042
6139
|
const nanos = this.value.millis * 1e6;
|
|
6043
|
-
return Number.isFinite(nanos) ? hash(roundTiesAwayFromZero(nanos)) : number$
|
|
6140
|
+
return Number.isFinite(nanos) ? hash(roundTiesAwayFromZero(nanos)) : number$3(this.value.millis);
|
|
6044
6141
|
}
|
|
6045
6142
|
case "Nanos": return hash(this.value.nanos);
|
|
6046
6143
|
default: return structure(this.value);
|
|
@@ -6099,7 +6196,7 @@ const make$41 = (input) => {
|
|
|
6099
6196
|
_tag: "Millis",
|
|
6100
6197
|
millis: input
|
|
6101
6198
|
};
|
|
6102
|
-
} else if (input === bigint0$
|
|
6199
|
+
} else if (input === bigint0$3) duration.value = zeroDurationValue;
|
|
6103
6200
|
else duration.value = {
|
|
6104
6201
|
_tag: "Nanos",
|
|
6105
6202
|
nanos: input
|
|
@@ -6121,7 +6218,7 @@ const make$41 = (input) => {
|
|
|
6121
6218
|
* @category guards
|
|
6122
6219
|
* @since 2.0.0
|
|
6123
6220
|
*/
|
|
6124
|
-
const isDuration = (u) => hasProperty(u, TypeId$
|
|
6221
|
+
const isDuration = (u) => hasProperty(u, TypeId$43);
|
|
6125
6222
|
/**
|
|
6126
6223
|
* Checks whether a Duration is finite (not infinite).
|
|
6127
6224
|
*
|
|
@@ -6156,7 +6253,7 @@ const isFinite$2 = (self) => self.value._tag !== "Infinity" && self.value._tag !
|
|
|
6156
6253
|
const isZero$1 = (self) => {
|
|
6157
6254
|
switch (self.value._tag) {
|
|
6158
6255
|
case "Millis": return self.value.millis === 0;
|
|
6159
|
-
case "Nanos": return self.value.nanos === bigint0$
|
|
6256
|
+
case "Nanos": return self.value.nanos === bigint0$3;
|
|
6160
6257
|
case "Infinity":
|
|
6161
6258
|
case "NegativeInfinity": return false;
|
|
6162
6259
|
}
|
|
@@ -6180,7 +6277,7 @@ const isZero$1 = (self) => {
|
|
|
6180
6277
|
const isNegative$1 = (self) => {
|
|
6181
6278
|
switch (self.value._tag) {
|
|
6182
6279
|
case "Millis": return self.value.millis < 0;
|
|
6183
|
-
case "Nanos": return self.value.nanos < bigint0$
|
|
6280
|
+
case "Nanos": return self.value.nanos < bigint0$3;
|
|
6184
6281
|
case "NegativeInfinity": return true;
|
|
6185
6282
|
case "Infinity": return false;
|
|
6186
6283
|
}
|
|
@@ -6205,7 +6302,7 @@ const abs$1 = (self) => {
|
|
|
6205
6302
|
case "Infinity":
|
|
6206
6303
|
case "NegativeInfinity": return infinity;
|
|
6207
6304
|
case "Millis": return self.value.millis < 0 ? make$41(-self.value.millis) : self;
|
|
6208
|
-
case "Nanos": return self.value.nanos < bigint0$
|
|
6305
|
+
case "Nanos": return self.value.nanos < bigint0$3 ? make$41(-self.value.nanos) : self;
|
|
6209
6306
|
}
|
|
6210
6307
|
};
|
|
6211
6308
|
/**
|
|
@@ -6642,7 +6739,7 @@ const parts = (self) => {
|
|
|
6642
6739
|
nanos: -Infinity
|
|
6643
6740
|
};
|
|
6644
6741
|
const n = toNanosUnsafe(self);
|
|
6645
|
-
const neg = n < bigint0$
|
|
6742
|
+
const neg = n < bigint0$3;
|
|
6646
6743
|
const a = neg ? -n : n;
|
|
6647
6744
|
const ms = a / bigint1e6;
|
|
6648
6745
|
const sec = ms / bigint1e3;
|
|
@@ -9240,7 +9337,7 @@ var Latch = class {
|
|
|
9240
9337
|
};
|
|
9241
9338
|
/** @internal */
|
|
9242
9339
|
const makeLatchUnsafe = (open) => new Latch(open ?? false);
|
|
9243
|
-
const bigint0$
|
|
9340
|
+
const bigint0$2 = /*#__PURE__*/ BigInt(0);
|
|
9244
9341
|
const NoopSpanProto = {
|
|
9245
9342
|
_tag: "Span",
|
|
9246
9343
|
spanId: "noop",
|
|
@@ -9248,8 +9345,8 @@ const NoopSpanProto = {
|
|
|
9248
9345
|
sampled: false,
|
|
9249
9346
|
status: {
|
|
9250
9347
|
_tag: "Ended",
|
|
9251
|
-
startTime: bigint0$
|
|
9252
|
-
endTime: bigint0$
|
|
9348
|
+
startTime: bigint0$2,
|
|
9349
|
+
endTime: bigint0$2,
|
|
9253
9350
|
exit: exitVoid
|
|
9254
9351
|
},
|
|
9255
9352
|
attributes: /*#__PURE__*/ new Map(),
|
|
@@ -9318,7 +9415,7 @@ const provideSpanStackFrame = (name, stack) => {
|
|
|
9318
9415
|
/** @internal */
|
|
9319
9416
|
const endSpan = (span, exit, clock, timingEnabled) => sync$1(() => {
|
|
9320
9417
|
if (span.status._tag === "Ended") return;
|
|
9321
|
-
span.end(timingEnabled ? clock.currentTimeNanosUnsafe() : bigint0$
|
|
9418
|
+
span.end(timingEnabled ? clock.currentTimeNanosUnsafe() : bigint0$2, exit);
|
|
9322
9419
|
});
|
|
9323
9420
|
/** @internal */
|
|
9324
9421
|
const useSpan$1 = (name, ...args) => {
|
|
@@ -9491,7 +9588,7 @@ const logLevelToOrder = (level) => {
|
|
|
9491
9588
|
}
|
|
9492
9589
|
};
|
|
9493
9590
|
/** @internal */
|
|
9494
|
-
const isLogLevelGreaterThan = /*#__PURE__*/ isGreaterThan$1(/* @__PURE__ */ mapInput$
|
|
9591
|
+
const isLogLevelGreaterThan = /*#__PURE__*/ isGreaterThan$1(/* @__PURE__ */ mapInput$2(Number$5, logLevelToOrder));
|
|
9495
9592
|
/** @internal */
|
|
9496
9593
|
const CurrentLoggers$1 = /*#__PURE__*/ Reference("effect/Loggers/CurrentLoggers", { defaultValue: () => /* @__PURE__ */ new Set([defaultLogger, tracerLogger]) });
|
|
9497
9594
|
/** @internal */
|
|
@@ -11143,14 +11240,14 @@ const forkUnsafe = scopeForkUnsafe;
|
|
|
11143
11240
|
const close = scopeClose;
|
|
11144
11241
|
//#endregion
|
|
11145
11242
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Layer.js
|
|
11146
|
-
const TypeId$
|
|
11243
|
+
const TypeId$41 = "~effect/Layer";
|
|
11147
11244
|
const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
11148
11245
|
const memoMapReuse = (entry, scope) => {
|
|
11149
11246
|
entry.observers++;
|
|
11150
11247
|
return andThen$3(scopeAddFinalizerExit(scope, (exit) => entry.finalizer(exit)), entry.effect);
|
|
11151
11248
|
};
|
|
11152
11249
|
const LayerProto = {
|
|
11153
|
-
[TypeId$
|
|
11250
|
+
[TypeId$41]: {
|
|
11154
11251
|
_ROut: identity,
|
|
11155
11252
|
_E: identity,
|
|
11156
11253
|
_RIn: identity
|
|
@@ -12216,11 +12313,11 @@ const currentTimeMillis = currentTimeMillis$1;
|
|
|
12216
12313
|
//#endregion
|
|
12217
12314
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/dateTime.js
|
|
12218
12315
|
/** @internal */
|
|
12219
|
-
const TypeId$
|
|
12316
|
+
const TypeId$40 = "~effect/time/DateTime";
|
|
12220
12317
|
/** @internal */
|
|
12221
12318
|
const TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
|
|
12222
12319
|
const Proto$10 = {
|
|
12223
|
-
[TypeId$
|
|
12320
|
+
[TypeId$40]: TypeId$40,
|
|
12224
12321
|
pipe() {
|
|
12225
12322
|
return pipeArguments(this, arguments);
|
|
12226
12323
|
},
|
|
@@ -12235,7 +12332,7 @@ const ProtoUtc = {
|
|
|
12235
12332
|
...Proto$10,
|
|
12236
12333
|
_tag: "Utc",
|
|
12237
12334
|
[symbol$2]() {
|
|
12238
|
-
return number$
|
|
12335
|
+
return number$3(this.epochMilliseconds);
|
|
12239
12336
|
},
|
|
12240
12337
|
[symbol$1](that) {
|
|
12241
12338
|
return isDateTime$1(that) && that._tag === "Utc" && this.epochMilliseconds === that.epochMilliseconds;
|
|
@@ -12254,7 +12351,7 @@ const ProtoTimeZone = {
|
|
|
12254
12351
|
({ ...ProtoTimeZone });
|
|
12255
12352
|
({ ...ProtoTimeZone });
|
|
12256
12353
|
/** @internal */
|
|
12257
|
-
const isDateTime$1 = (u) => hasProperty(u, TypeId$
|
|
12354
|
+
const isDateTime$1 = (u) => hasProperty(u, TypeId$40);
|
|
12258
12355
|
const makeUtc = (epochMillis) => {
|
|
12259
12356
|
const self = Object.create(ProtoUtc);
|
|
12260
12357
|
self.epochMilliseconds = epochMillis;
|
|
@@ -12504,7 +12601,7 @@ const matchEffect$1 = /*#__PURE__*/ dual(2, (self, options) => matchCauseEffect$
|
|
|
12504
12601
|
}));
|
|
12505
12602
|
//#endregion
|
|
12506
12603
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schedule.js
|
|
12507
|
-
const TypeId$
|
|
12604
|
+
const TypeId$39 = "~effect/Schedule";
|
|
12508
12605
|
/**
|
|
12509
12606
|
* Context reference containing metadata for the currently running schedule step.
|
|
12510
12607
|
*
|
|
@@ -12529,7 +12626,7 @@ const CurrentMetadata = /*#__PURE__*/ Reference("effect/Schedule/CurrentMetadata
|
|
|
12529
12626
|
elapsedSincePrevious: 0
|
|
12530
12627
|
}) });
|
|
12531
12628
|
const ScheduleProto = {
|
|
12532
|
-
[TypeId$
|
|
12629
|
+
[TypeId$39]: {
|
|
12533
12630
|
_Out: identity,
|
|
12534
12631
|
_In: identity,
|
|
12535
12632
|
_Env: identity
|
|
@@ -12558,7 +12655,7 @@ const ScheduleProto = {
|
|
|
12558
12655
|
* @category guards
|
|
12559
12656
|
* @since 2.0.0
|
|
12560
12657
|
*/
|
|
12561
|
-
const isSchedule = (u) => hasProperty(u, TypeId$
|
|
12658
|
+
const isSchedule = (u) => hasProperty(u, TypeId$39);
|
|
12562
12659
|
/**
|
|
12563
12660
|
* Creates a Schedule from a step function that returns a Pull.
|
|
12564
12661
|
*
|
|
@@ -12987,6 +13084,52 @@ const buildFromOptions = (options) => {
|
|
|
12987
13084
|
return schedule;
|
|
12988
13085
|
};
|
|
12989
13086
|
/**
|
|
13087
|
+
* Context reference for metric attributes applied from the current Effect
|
|
13088
|
+
* context.
|
|
13089
|
+
*
|
|
13090
|
+
* **When to use**
|
|
13091
|
+
*
|
|
13092
|
+
* Use to provide default attributes that should be merged into metric updates
|
|
13093
|
+
* and reads in a scoped part of a program.
|
|
13094
|
+
*
|
|
13095
|
+
* **Details**
|
|
13096
|
+
*
|
|
13097
|
+
* The default value is an empty attribute set. Metric reads and updates merge
|
|
13098
|
+
* these contextual attributes with the metric's own attributes to select the
|
|
13099
|
+
* metric series being accessed.
|
|
13100
|
+
*
|
|
13101
|
+
* **Example** (Providing current metric attributes)
|
|
13102
|
+
*
|
|
13103
|
+
* ```ts import.meta.vitest
|
|
13104
|
+
* import { Effect, Metric } from "effect"
|
|
13105
|
+
*
|
|
13106
|
+
* const program = Effect.gen(function*() {
|
|
13107
|
+
* // Access current metric attributes
|
|
13108
|
+
* yield* Metric.CurrentMetricAttributes
|
|
13109
|
+
*
|
|
13110
|
+
* // Set new attributes context
|
|
13111
|
+
* const newAttributes = { service: "api", version: "1.0" }
|
|
13112
|
+
* const result = yield* Effect.provideService(
|
|
13113
|
+
* Effect.gen(function*() {
|
|
13114
|
+
* const updatedAttributes = yield* Metric.CurrentMetricAttributes
|
|
13115
|
+
* return updatedAttributes
|
|
13116
|
+
* }),
|
|
13117
|
+
* Metric.CurrentMetricAttributes,
|
|
13118
|
+
* newAttributes
|
|
13119
|
+
* )
|
|
13120
|
+
*
|
|
13121
|
+
* return result
|
|
13122
|
+
* })
|
|
13123
|
+
*
|
|
13124
|
+
* const attributes = await Effect.runPromise(program)
|
|
13125
|
+
* const actual = attributes // => { service: "api", version: "1.0" }
|
|
13126
|
+
* ```
|
|
13127
|
+
*
|
|
13128
|
+
* @category services
|
|
13129
|
+
* @since 4.0.0
|
|
13130
|
+
*/
|
|
13131
|
+
const CurrentMetricAttributes = /*#__PURE__*/ Reference("effect/Metric/CurrentMetricAttributes", { defaultValue: () => ({}) });
|
|
13132
|
+
/**
|
|
12990
13133
|
* Context reference for the metric registry in the current context.
|
|
12991
13134
|
*
|
|
12992
13135
|
* **When to use**
|
|
@@ -13013,6 +13156,360 @@ const buildFromOptions = (options) => {
|
|
|
13013
13156
|
* @since 4.0.0
|
|
13014
13157
|
*/
|
|
13015
13158
|
const MetricRegistry = /*#__PURE__*/ Reference("~effect/observability/Metric/MetricRegistryKey", { defaultValue: () => /* @__PURE__ */ new Map() });
|
|
13159
|
+
const TypeId$38 = "~effect/observability/Metric";
|
|
13160
|
+
var Metric$ = class {
|
|
13161
|
+
[TypeId$38] = TypeId$38;
|
|
13162
|
+
#metadataCache = /*#__PURE__*/ new WeakMap();
|
|
13163
|
+
#metadata;
|
|
13164
|
+
id;
|
|
13165
|
+
description;
|
|
13166
|
+
attributes;
|
|
13167
|
+
constructor(id, description, attributes) {
|
|
13168
|
+
this.id = id;
|
|
13169
|
+
this.description = description;
|
|
13170
|
+
this.attributes = attributes;
|
|
13171
|
+
}
|
|
13172
|
+
valueUnsafe(context) {
|
|
13173
|
+
return this.hook(context).get(context);
|
|
13174
|
+
}
|
|
13175
|
+
modifyUnsafe(input, context) {
|
|
13176
|
+
return this.hook(context).modify(input, context);
|
|
13177
|
+
}
|
|
13178
|
+
updateUnsafe(input, context) {
|
|
13179
|
+
return this.hook(context).update(input, context);
|
|
13180
|
+
}
|
|
13181
|
+
hook(context) {
|
|
13182
|
+
const extraAttributes = get$9(context, CurrentMetricAttributes);
|
|
13183
|
+
if (Object.keys(extraAttributes).length === 0) {
|
|
13184
|
+
if (isNotUndefined(this.#metadata)) return this.#metadata.hooks;
|
|
13185
|
+
this.#metadata = this.getOrCreate(context, this.attributes);
|
|
13186
|
+
return this.#metadata.hooks;
|
|
13187
|
+
}
|
|
13188
|
+
const mergedAttributes = mergeAttributes(this.attributes, extraAttributes);
|
|
13189
|
+
let metadata = this.#metadataCache.get(mergedAttributes);
|
|
13190
|
+
if (isNotUndefined(metadata)) return metadata.hooks;
|
|
13191
|
+
metadata = this.getOrCreate(context, mergedAttributes);
|
|
13192
|
+
this.#metadataCache.set(mergedAttributes, metadata);
|
|
13193
|
+
return metadata.hooks;
|
|
13194
|
+
}
|
|
13195
|
+
getOrCreate(context, attributes) {
|
|
13196
|
+
const key = makeKey(this, attributes);
|
|
13197
|
+
const registry = get$9(context, MetricRegistry);
|
|
13198
|
+
if (registry.has(key)) return registry.get(key);
|
|
13199
|
+
const hooks = this.createHooks();
|
|
13200
|
+
const meta = {
|
|
13201
|
+
id: this.id,
|
|
13202
|
+
type: this.type,
|
|
13203
|
+
description: this.description,
|
|
13204
|
+
attributes: attributesToRecord(attributes),
|
|
13205
|
+
hooks
|
|
13206
|
+
};
|
|
13207
|
+
registry.set(key, meta);
|
|
13208
|
+
return meta;
|
|
13209
|
+
}
|
|
13210
|
+
pipe() {
|
|
13211
|
+
return pipeArguments(this, arguments);
|
|
13212
|
+
}
|
|
13213
|
+
};
|
|
13214
|
+
const bigint0$1 = /*#__PURE__*/ BigInt(0);
|
|
13215
|
+
var CounterMetric = class extends Metric$ {
|
|
13216
|
+
type = "Counter";
|
|
13217
|
+
#bigint;
|
|
13218
|
+
#incremental;
|
|
13219
|
+
constructor(id, options) {
|
|
13220
|
+
super(id, options?.description, attributesToRecord(options?.attributes));
|
|
13221
|
+
this.#bigint = options?.bigint ?? false;
|
|
13222
|
+
this.#incremental = options?.incremental ?? false;
|
|
13223
|
+
}
|
|
13224
|
+
createHooks() {
|
|
13225
|
+
let count = this.#bigint ? bigint0$1 : 0;
|
|
13226
|
+
const canUpdate = this.#incremental ? this.#bigint ? (value) => value >= bigint0$1 : (value) => value >= 0 : (_value) => true;
|
|
13227
|
+
const update = (value) => {
|
|
13228
|
+
if (canUpdate(value)) count = count + value;
|
|
13229
|
+
};
|
|
13230
|
+
return makeHooks(() => ({
|
|
13231
|
+
count,
|
|
13232
|
+
incremental: this.#incremental
|
|
13233
|
+
}), update);
|
|
13234
|
+
}
|
|
13235
|
+
};
|
|
13236
|
+
var HistogramMetric = class extends Metric$ {
|
|
13237
|
+
type = "Histogram";
|
|
13238
|
+
#boundaries;
|
|
13239
|
+
constructor(id, options) {
|
|
13240
|
+
super(id, options?.description, attributesToRecord(options?.attributes));
|
|
13241
|
+
this.#boundaries = options.boundaries;
|
|
13242
|
+
}
|
|
13243
|
+
createHooks() {
|
|
13244
|
+
const bounds = this.#boundaries;
|
|
13245
|
+
const size = bounds.length;
|
|
13246
|
+
const values = new Uint32Array(size + 1);
|
|
13247
|
+
const boundaries = new Float64Array(size);
|
|
13248
|
+
let count = 0;
|
|
13249
|
+
let sum = 0;
|
|
13250
|
+
let min = Number.MAX_VALUE;
|
|
13251
|
+
let max = -Number.MAX_VALUE;
|
|
13252
|
+
map$10(sort(bounds, Number$5), (n, i) => {
|
|
13253
|
+
boundaries[i] = n;
|
|
13254
|
+
});
|
|
13255
|
+
const update = (value) => {
|
|
13256
|
+
let from = 0;
|
|
13257
|
+
let to = size;
|
|
13258
|
+
while (from !== to) {
|
|
13259
|
+
const mid = Math.floor(from + (to - from) / 2);
|
|
13260
|
+
if (value <= boundaries[mid]) to = mid;
|
|
13261
|
+
else from = mid;
|
|
13262
|
+
if (to === from + 1) {
|
|
13263
|
+
if (value <= boundaries[from]) to = from;
|
|
13264
|
+
else from = to;
|
|
13265
|
+
}
|
|
13266
|
+
}
|
|
13267
|
+
values[from] = values[from] + 1;
|
|
13268
|
+
count = count + 1;
|
|
13269
|
+
sum = sum + value;
|
|
13270
|
+
if (value < min) min = value;
|
|
13271
|
+
if (value > max) max = value;
|
|
13272
|
+
};
|
|
13273
|
+
const getBuckets = () => {
|
|
13274
|
+
const builder = allocate$1(size);
|
|
13275
|
+
let cumulated = 0;
|
|
13276
|
+
for (let i = 0; i < size; i++) {
|
|
13277
|
+
const boundary = boundaries[i];
|
|
13278
|
+
const value = values[i];
|
|
13279
|
+
cumulated = cumulated + value;
|
|
13280
|
+
builder[i] = [boundary, cumulated];
|
|
13281
|
+
}
|
|
13282
|
+
return builder;
|
|
13283
|
+
};
|
|
13284
|
+
return makeHooks(() => ({
|
|
13285
|
+
buckets: getBuckets(),
|
|
13286
|
+
count,
|
|
13287
|
+
min,
|
|
13288
|
+
max,
|
|
13289
|
+
sum
|
|
13290
|
+
}), update);
|
|
13291
|
+
}
|
|
13292
|
+
};
|
|
13293
|
+
var MetricTransform = class extends Metric$ {
|
|
13294
|
+
type;
|
|
13295
|
+
metric;
|
|
13296
|
+
valueUnsafe;
|
|
13297
|
+
updateUnsafe;
|
|
13298
|
+
modifyUnsafe;
|
|
13299
|
+
constructor(metric, valueUnsafe, updateUnsafe, modifyUnsafe) {
|
|
13300
|
+
super(metric.id, metric.description, metric.attributes);
|
|
13301
|
+
this.metric = metric;
|
|
13302
|
+
this.valueUnsafe = valueUnsafe;
|
|
13303
|
+
this.updateUnsafe = updateUnsafe;
|
|
13304
|
+
this.modifyUnsafe = modifyUnsafe;
|
|
13305
|
+
this.type = metric.type;
|
|
13306
|
+
}
|
|
13307
|
+
createHooks() {
|
|
13308
|
+
return this.metric.createHooks();
|
|
13309
|
+
}
|
|
13310
|
+
};
|
|
13311
|
+
/**
|
|
13312
|
+
* Represents a Counter metric that tracks cumulative numerical values over
|
|
13313
|
+
* time. Counters can be incremented and decremented and provide a running total
|
|
13314
|
+
* of changes.
|
|
13315
|
+
*
|
|
13316
|
+
* **Details**
|
|
13317
|
+
*
|
|
13318
|
+
* The optional `description` describes the counter, and `attributes` attach
|
|
13319
|
+
* dimensions to it. Set `bigint` to create a counter that accepts `bigint`
|
|
13320
|
+
* inputs. Set `incremental` to `true` to create a counter that can only ever be
|
|
13321
|
+
* incremented.
|
|
13322
|
+
*
|
|
13323
|
+
* **Example** (Creating counter metrics)
|
|
13324
|
+
*
|
|
13325
|
+
* ```ts import.meta.vitest
|
|
13326
|
+
* import { Effect, Metric } from "effect"
|
|
13327
|
+
*
|
|
13328
|
+
* const program = Effect.gen(function*() {
|
|
13329
|
+
* // Create a basic counter for tracking requests
|
|
13330
|
+
* const requestCounter = Metric.counter("http_requests_total", {
|
|
13331
|
+
* description: "Total number of HTTP requests processed"
|
|
13332
|
+
* })
|
|
13333
|
+
*
|
|
13334
|
+
* // Create an incremental-only counter for events
|
|
13335
|
+
* const eventCounter = Metric.counter("events_processed", {
|
|
13336
|
+
* description: "Events processed (increment only)",
|
|
13337
|
+
* incremental: true
|
|
13338
|
+
* })
|
|
13339
|
+
*
|
|
13340
|
+
* // Create a bigint counter for large values
|
|
13341
|
+
* const bytesCounter = Metric.counter("bytes_transferred", {
|
|
13342
|
+
* description: "Total bytes transferred",
|
|
13343
|
+
* bigint: true,
|
|
13344
|
+
* attributes: { service: "file-transfer" }
|
|
13345
|
+
* })
|
|
13346
|
+
*
|
|
13347
|
+
* // Update counters with values
|
|
13348
|
+
* yield* Metric.update(requestCounter, 1) // Increment by 1
|
|
13349
|
+
* yield* Metric.update(requestCounter, 5) // Increment by 5 (total: 6)
|
|
13350
|
+
* yield* Metric.update(eventCounter, 1) // Increment by 1
|
|
13351
|
+
* yield* Metric.update(bytesCounter, 1024n) // Add 1024 bytes
|
|
13352
|
+
*
|
|
13353
|
+
* // Get current counter values
|
|
13354
|
+
* const requestValue = yield* Metric.value(requestCounter)
|
|
13355
|
+
* const eventValue = yield* Metric.value(eventCounter)
|
|
13356
|
+
* const bytesValue = yield* Metric.value(bytesCounter)
|
|
13357
|
+
*
|
|
13358
|
+
* return { requestValue, eventValue, bytesValue }
|
|
13359
|
+
* })
|
|
13360
|
+
*
|
|
13361
|
+
* const result = await Effect.runPromise(Effect.provideService(program, Metric.MetricRegistry, new Map()))
|
|
13362
|
+
* const counts = [result.requestValue.count, result.eventValue.count, result.bytesValue.count] // => [6, 1, 1024n]
|
|
13363
|
+
* ```
|
|
13364
|
+
*
|
|
13365
|
+
* @category constructors
|
|
13366
|
+
* @since 2.0.0
|
|
13367
|
+
*/
|
|
13368
|
+
const counter = (name, options) => new CounterMetric(name, options);
|
|
13369
|
+
/**
|
|
13370
|
+
* Creates a timer metric, based on a `Histogram`, which keeps track of
|
|
13371
|
+
* durations in milliseconds.
|
|
13372
|
+
*
|
|
13373
|
+
* **Details**
|
|
13374
|
+
*
|
|
13375
|
+
* The unit of time will automatically be added to the metric as a tag (i.e.
|
|
13376
|
+
* `"time_unit: milliseconds"`).
|
|
13377
|
+
*
|
|
13378
|
+
* If `options.boundaries` is not provided, the boundaries will be computed
|
|
13379
|
+
* using `Metric.exponentialBoundaries({ start: 0.5, factor: 2, count: 35 })`.
|
|
13380
|
+
*
|
|
13381
|
+
* **Example** (Recording durations with a timer)
|
|
13382
|
+
*
|
|
13383
|
+
* ```ts import.meta.vitest
|
|
13384
|
+
* import { Duration, Effect, Metric } from "effect"
|
|
13385
|
+
*
|
|
13386
|
+
* // Create a timer metric to track API request durations
|
|
13387
|
+
* const apiRequestTimer = Metric.timer("api_request_duration", {
|
|
13388
|
+
* description: "Duration of API requests",
|
|
13389
|
+
* attributes: { service: "user-api" }
|
|
13390
|
+
* })
|
|
13391
|
+
*
|
|
13392
|
+
* // Record a measured API operation duration
|
|
13393
|
+
* const apiOperation = Effect.gen(function*() {
|
|
13394
|
+
* const duration = Duration.millis(120)
|
|
13395
|
+
* yield* Metric.update(apiRequestTimer, duration)
|
|
13396
|
+
*
|
|
13397
|
+
* const state = yield* Metric.value(apiRequestTimer)
|
|
13398
|
+
* return {
|
|
13399
|
+
* count: state.count,
|
|
13400
|
+
* min: state.min,
|
|
13401
|
+
* max: state.max,
|
|
13402
|
+
* sum: state.sum
|
|
13403
|
+
* }
|
|
13404
|
+
* })
|
|
13405
|
+
*
|
|
13406
|
+
* await Effect.runPromise(
|
|
13407
|
+
* Effect.provideService(apiOperation, Metric.MetricRegistry, new Map())
|
|
13408
|
+
* ) // => { count: 1, min: 120, max: 120, sum: 120 }
|
|
13409
|
+
* ```
|
|
13410
|
+
*
|
|
13411
|
+
* @category constructors
|
|
13412
|
+
* @since 2.0.0
|
|
13413
|
+
*/
|
|
13414
|
+
const timer = (name, options) => {
|
|
13415
|
+
const boundaries = isNotUndefined(options?.boundaries) ? options.boundaries : exponentialBoundaries({
|
|
13416
|
+
start: .5,
|
|
13417
|
+
factor: 2,
|
|
13418
|
+
count: 35
|
|
13419
|
+
});
|
|
13420
|
+
const attributes = mergeAttributes(options?.attributes, { time_unit: "milliseconds" });
|
|
13421
|
+
const metric = new HistogramMetric(name, {
|
|
13422
|
+
...options,
|
|
13423
|
+
boundaries,
|
|
13424
|
+
attributes
|
|
13425
|
+
});
|
|
13426
|
+
return mapInput$1(metric, toMillis);
|
|
13427
|
+
};
|
|
13428
|
+
/**
|
|
13429
|
+
* Updates the metric with the specified input.
|
|
13430
|
+
*
|
|
13431
|
+
* **Details**
|
|
13432
|
+
*
|
|
13433
|
+
* The behavior of `update` depends on the metric type. Counters add the input
|
|
13434
|
+
* value to the current count, gauges replace the current value with the input
|
|
13435
|
+
* value, frequencies increment the occurrence count for the input string,
|
|
13436
|
+
* histograms record the input value in the appropriate bucket, and summaries
|
|
13437
|
+
* record the input value as a new observation.
|
|
13438
|
+
*
|
|
13439
|
+
* **Example** (Updating metric values)
|
|
13440
|
+
*
|
|
13441
|
+
* ```ts import.meta.vitest
|
|
13442
|
+
* import { Effect, Metric } from "effect"
|
|
13443
|
+
*
|
|
13444
|
+
* const cpuUsage = Metric.gauge("cpu_usage_percent")
|
|
13445
|
+
* const httpStatus = Metric.frequency("http_status_codes")
|
|
13446
|
+
* const responseTime = Metric.histogram("response_time_ms", {
|
|
13447
|
+
* boundaries: [100, 500, 1000, 2000]
|
|
13448
|
+
* })
|
|
13449
|
+
*
|
|
13450
|
+
* const program = Effect.gen(function*() {
|
|
13451
|
+
* // Update gauge to specific values
|
|
13452
|
+
* yield* Metric.update(cpuUsage, 45.2)
|
|
13453
|
+
* yield* Metric.update(cpuUsage, 67.8) // Replaces previous value
|
|
13454
|
+
*
|
|
13455
|
+
* // Track HTTP status code occurrences
|
|
13456
|
+
* yield* Metric.update(httpStatus, "200")
|
|
13457
|
+
* yield* Metric.update(httpStatus, "404")
|
|
13458
|
+
* yield* Metric.update(httpStatus, "200") // Increments 200 count
|
|
13459
|
+
*
|
|
13460
|
+
* // Record response times
|
|
13461
|
+
* yield* Metric.update(responseTime, 250)
|
|
13462
|
+
* yield* Metric.update(responseTime, 750)
|
|
13463
|
+
* yield* Metric.update(responseTime, 1500)
|
|
13464
|
+
*
|
|
13465
|
+
* // Check current states
|
|
13466
|
+
* const cpu = yield* Metric.value(cpuUsage)
|
|
13467
|
+
* const statuses = yield* Metric.value(httpStatus)
|
|
13468
|
+
* const times = yield* Metric.value(responseTime)
|
|
13469
|
+
* return [cpu.value, statuses.occurrences.get("200"), times.count] as const
|
|
13470
|
+
* })
|
|
13471
|
+
*
|
|
13472
|
+
* await Effect.runPromise(Effect.provideService(program, Metric.MetricRegistry, new Map())) // => [67.8, 2, 3]
|
|
13473
|
+
* ```
|
|
13474
|
+
*
|
|
13475
|
+
* @category mutations
|
|
13476
|
+
* @since 2.0.0
|
|
13477
|
+
*/
|
|
13478
|
+
const update = /*#__PURE__*/ dual(2, (self, input) => contextWith$1((services) => sync$1(() => self.updateUnsafe(input, services))));
|
|
13479
|
+
/**
|
|
13480
|
+
* Returns a new metric that is powered by this one, but which accepts updates
|
|
13481
|
+
* of the specified new type, which must be transformable to the input type of
|
|
13482
|
+
* this metric.
|
|
13483
|
+
*
|
|
13484
|
+
* **Example** (Mapping metric inputs)
|
|
13485
|
+
*
|
|
13486
|
+
* ```ts import.meta.vitest
|
|
13487
|
+
* import { Effect, Metric } from "effect"
|
|
13488
|
+
*
|
|
13489
|
+
* const durationHistogram = Metric.histogram("request_duration_ms", {
|
|
13490
|
+
* description: "Request duration in milliseconds",
|
|
13491
|
+
* boundaries: Metric.linearBoundaries({ start: 0, width: 100, count: 10 })
|
|
13492
|
+
* })
|
|
13493
|
+
*
|
|
13494
|
+
* // Accept duration strings while recording numeric milliseconds
|
|
13495
|
+
* const durationStringHistogram = Metric.mapInput(
|
|
13496
|
+
* durationHistogram,
|
|
13497
|
+
* (input: string) => Number(input)
|
|
13498
|
+
* )
|
|
13499
|
+
*
|
|
13500
|
+
* const program = Effect.gen(function*() {
|
|
13501
|
+
* yield* Metric.update(durationStringHistogram, "250")
|
|
13502
|
+
* return yield* Metric.value(durationStringHistogram)
|
|
13503
|
+
* })
|
|
13504
|
+
*
|
|
13505
|
+
* const value = await Effect.runPromise(Effect.provideService(program, Metric.MetricRegistry, new Map()))
|
|
13506
|
+
* const values = [value.count, value.sum] // => [1, 250]
|
|
13507
|
+
* ```
|
|
13508
|
+
*
|
|
13509
|
+
* @category annotations
|
|
13510
|
+
* @since 2.0.0
|
|
13511
|
+
*/
|
|
13512
|
+
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
13513
|
/**
|
|
13017
13514
|
* Captures a snapshot of all registered metrics synchronously using the provided
|
|
13018
13515
|
* service context.
|
|
@@ -13053,6 +13550,76 @@ const snapshotUnsafe = (context) => {
|
|
|
13053
13550
|
state: hooks.get(context)
|
|
13054
13551
|
}));
|
|
13055
13552
|
};
|
|
13553
|
+
/**
|
|
13554
|
+
* Creates histogram bucket boundaries from an iterable set of values.
|
|
13555
|
+
*
|
|
13556
|
+
* **Details**
|
|
13557
|
+
*
|
|
13558
|
+
* Processes any iterable of numbers by removing duplicates, filtering out
|
|
13559
|
+
* non-positive values, and automatically appending positive infinity as the
|
|
13560
|
+
* final boundary.
|
|
13561
|
+
*
|
|
13562
|
+
* **Example** (Creating boundaries from values)
|
|
13563
|
+
*
|
|
13564
|
+
* ```ts import.meta.vitest
|
|
13565
|
+
* import { Metric } from "effect"
|
|
13566
|
+
*
|
|
13567
|
+
* Metric.boundariesFromIterable([-5, 0, 10, 10, 25, 50]) // => [10, 25, 50, Infinity]
|
|
13568
|
+
* ```
|
|
13569
|
+
*
|
|
13570
|
+
* @category constructors
|
|
13571
|
+
* @since 4.0.0
|
|
13572
|
+
*/
|
|
13573
|
+
const boundariesFromIterable = (iterable) => append$1(filter$1(new Set(iterable), (n) => n > 0), Number.POSITIVE_INFINITY);
|
|
13574
|
+
/**
|
|
13575
|
+
* Creates histogram bucket boundaries with exponentially increasing values.
|
|
13576
|
+
*
|
|
13577
|
+
* **Details**
|
|
13578
|
+
*
|
|
13579
|
+
* Creates boundaries that grow exponentially, useful for metrics that span
|
|
13580
|
+
* multiple orders of magnitude. Each boundary is calculated as start * factor^i.
|
|
13581
|
+
*
|
|
13582
|
+
* **Example** (Creating exponential boundaries)
|
|
13583
|
+
*
|
|
13584
|
+
* ```ts import.meta.vitest
|
|
13585
|
+
* import { Metric } from "effect"
|
|
13586
|
+
*
|
|
13587
|
+
* Metric.exponentialBoundaries({ start: 1, factor: 2, count: 5 }) // => [1, 2, 4, 8, Infinity]
|
|
13588
|
+
* ```
|
|
13589
|
+
*
|
|
13590
|
+
* @category constructors
|
|
13591
|
+
* @since 4.0.0
|
|
13592
|
+
*/
|
|
13593
|
+
const exponentialBoundaries = (options) => boundariesFromIterable(makeBy(options.count - 1, (i) => options.start * Math.pow(options.factor, i)));
|
|
13594
|
+
function makeKey(metric, attributes) {
|
|
13595
|
+
let key = `${metric.type}:${metric.id}`;
|
|
13596
|
+
if (isNotUndefined(metric.description)) key += `:${metric.description}`;
|
|
13597
|
+
if (isNotUndefined(attributes)) key += `:${serializeAttributes(attributes)}`;
|
|
13598
|
+
return key;
|
|
13599
|
+
}
|
|
13600
|
+
function makeHooks(get, update, modify) {
|
|
13601
|
+
return {
|
|
13602
|
+
get,
|
|
13603
|
+
update,
|
|
13604
|
+
modify: modify ?? update
|
|
13605
|
+
};
|
|
13606
|
+
}
|
|
13607
|
+
function serializeAttributes(attributes) {
|
|
13608
|
+
return JSON.stringify(Array.isArray(attributes) ? attributes : Object.entries(attributes));
|
|
13609
|
+
}
|
|
13610
|
+
function mergeAttributes(self, other) {
|
|
13611
|
+
return {
|
|
13612
|
+
...attributesToRecord(self),
|
|
13613
|
+
...attributesToRecord(other)
|
|
13614
|
+
};
|
|
13615
|
+
}
|
|
13616
|
+
function attributesToRecord(attributes) {
|
|
13617
|
+
if (isNotUndefined(attributes) && Array.isArray(attributes)) return attributes.reduce((acc, [key, value]) => {
|
|
13618
|
+
assignProperty$1(acc, key, value);
|
|
13619
|
+
return acc;
|
|
13620
|
+
}, {});
|
|
13621
|
+
return attributes;
|
|
13622
|
+
}
|
|
13056
13623
|
//#endregion
|
|
13057
13624
|
//#region ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effect.js
|
|
13058
13625
|
/**
|
|
@@ -23798,7 +24365,7 @@ const layer$12 = (loggers, options) => effect(CurrentLoggers, withFiber$1(fnUntr
|
|
|
23798
24365
|
//#region package.json
|
|
23799
24366
|
var package_default = {
|
|
23800
24367
|
name: "@systemfsoftware/stryker-js",
|
|
23801
|
-
version: "
|
|
24368
|
+
version: "8.0.0",
|
|
23802
24369
|
repository: {
|
|
23803
24370
|
"type": "git",
|
|
23804
24371
|
"url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
|
|
@@ -23830,7 +24397,9 @@ var package_default = {
|
|
|
23830
24397
|
"@effect/platform-node-shared": "catalog:",
|
|
23831
24398
|
"@noble/hashes": "catalog:",
|
|
23832
24399
|
"@opentelemetry/api": "^1.9.0",
|
|
24400
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.208.0",
|
|
23833
24401
|
"@opentelemetry/exporter-trace-otlp-http": "^0.208.0",
|
|
24402
|
+
"@opentelemetry/sdk-metrics": "^2.2.0",
|
|
23834
24403
|
"@opentelemetry/sdk-trace-base": "^2.2.0",
|
|
23835
24404
|
"@systemfsoftware/effect-cell-types": "catalog:"
|
|
23836
24405
|
},
|
|
@@ -25105,7 +25674,7 @@ function omit() {
|
|
|
25105
25674
|
*/
|
|
25106
25675
|
function withDefault$3(defaultValue) {
|
|
25107
25676
|
return new Getter((o) => {
|
|
25108
|
-
const filtered = filter$
|
|
25677
|
+
const filtered = filter$3(o, isNotUndefined);
|
|
25109
25678
|
return isSome(filtered) ? succeed$4(filtered) : mapEager(defaultValue, some);
|
|
25110
25679
|
});
|
|
25111
25680
|
}
|
|
@@ -25230,7 +25799,7 @@ const BigDecimalProto = {
|
|
|
25230
25799
|
[TypeId$24]: TypeId$24,
|
|
25231
25800
|
[symbol$2]() {
|
|
25232
25801
|
const normalized = normalize(this);
|
|
25233
|
-
return combine$3(hash(normalized.value), number$
|
|
25802
|
+
return combine$3(hash(normalized.value), number$3(normalized.scale));
|
|
25234
25803
|
},
|
|
25235
25804
|
[symbol$1](that) {
|
|
25236
25805
|
return isBigDecimal(that) && equals(this, that);
|
|
@@ -26483,7 +27052,7 @@ function hasCheck(checks, id) {
|
|
|
26483
27052
|
* @category constructors
|
|
26484
27053
|
* @since 4.0.0
|
|
26485
27054
|
*/
|
|
26486
|
-
const number$
|
|
27055
|
+
const number$2 = /*#__PURE__*/ new Number$2();
|
|
26487
27056
|
/**
|
|
26488
27057
|
* AST node matching any `boolean` value (`true` or `false`).
|
|
26489
27058
|
*
|
|
@@ -27627,7 +28196,7 @@ function isFinite$1(annotations) {
|
|
|
27627
28196
|
});
|
|
27628
28197
|
}
|
|
27629
28198
|
/** @internal */
|
|
27630
|
-
const finite = /*#__PURE__*/ appendChecks(number$
|
|
28199
|
+
const finite = /*#__PURE__*/ appendChecks(number$2, [/*#__PURE__*/ isFinite$1()]);
|
|
27631
28200
|
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
28201
|
/**
|
|
27633
28202
|
* Creates a {@link Filter} that validates strings by running `RegExp.test`.
|
|
@@ -32073,7 +32642,7 @@ const String$1 = /*#__PURE__*/ make$19(string$6);
|
|
|
32073
32642
|
* @category schemas
|
|
32074
32643
|
* @since 4.0.0
|
|
32075
32644
|
*/
|
|
32076
|
-
const Number$1 = /*#__PURE__*/ make$19(number$
|
|
32645
|
+
const Number$1 = /*#__PURE__*/ make$19(number$2);
|
|
32077
32646
|
/**
|
|
32078
32647
|
* Schema for `boolean` values. Validates that the input is `typeof` `"boolean"`.
|
|
32079
32648
|
*
|
|
@@ -34561,7 +35130,7 @@ const string$5 = isString;
|
|
|
34561
35130
|
* @category guards
|
|
34562
35131
|
* @since 4.0.0
|
|
34563
35132
|
*/
|
|
34564
|
-
const number = isNumber;
|
|
35133
|
+
const number$1 = isNumber;
|
|
34565
35134
|
/**
|
|
34566
35135
|
* Matches any defined (non-null and non-undefined) value.
|
|
34567
35136
|
*
|
|
@@ -35787,6 +36356,27 @@ function string$4(name) {
|
|
|
35787
36356
|
return schema$1(String$1, name);
|
|
35788
36357
|
}
|
|
35789
36358
|
/**
|
|
36359
|
+
* Creates a config for a numeric value (including `NaN`, `Infinity`).
|
|
36360
|
+
*
|
|
36361
|
+
* **When to use**
|
|
36362
|
+
*
|
|
36363
|
+
* Use when you need config input to accept JavaScript's full number domain,
|
|
36364
|
+
* including NaN and infinities, rather than reject non-finite values.
|
|
36365
|
+
*
|
|
36366
|
+
* **Details**
|
|
36367
|
+
*
|
|
36368
|
+
* Shortcut for `Config.schema(Schema.Number, name)`.
|
|
36369
|
+
*
|
|
36370
|
+
* @see {@link finite} for rejecting `NaN` and `Infinity`
|
|
36371
|
+
* @see {@link int} for accepting only integers
|
|
36372
|
+
*
|
|
36373
|
+
* @category constructors
|
|
36374
|
+
* @since 2.0.0
|
|
36375
|
+
*/
|
|
36376
|
+
function number(name) {
|
|
36377
|
+
return schema$1(Number$1, name);
|
|
36378
|
+
}
|
|
36379
|
+
/**
|
|
35790
36380
|
* Creates a config for a boolean value parsed from common string
|
|
35791
36381
|
* representations.
|
|
35792
36382
|
*
|
|
@@ -42869,7 +43459,7 @@ function normalizeFileName$4(fileName) {
|
|
|
42869
43459
|
return fileName.replace(/\\/g, "/");
|
|
42870
43460
|
}
|
|
42871
43461
|
const hasText = (value) => isString(value) && value.length > 0;
|
|
42872
|
-
const textIfNonEmpty = (value) => getOrUndefined$1(filter$
|
|
43462
|
+
const textIfNonEmpty = (value) => getOrUndefined$1(filter$3(fromUndefinedOr(value), hasText));
|
|
42873
43463
|
const fieldOf = (value$36, key) => value(key in value$36).pipe(when(true, () => {
|
|
42874
43464
|
return Reflect.get(value$36, key);
|
|
42875
43465
|
}), orElse(() => void 0));
|
|
@@ -42878,10 +43468,10 @@ function isErrnoException(error) {
|
|
|
42878
43468
|
return value(error).pipe(when(instanceOf(Error), hasStringCode), orElse(() => false));
|
|
42879
43469
|
}
|
|
42880
43470
|
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));
|
|
43471
|
+
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
43472
|
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
43473
|
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));
|
|
43474
|
+
const isJsonPrimitive = (value$30) => value(value$30).pipe(when(number$1, () => true), when(boolean$4, () => true), when(bigint, () => true), orElse(() => false));
|
|
42885
43475
|
const jsonText = (error) => {
|
|
42886
43476
|
try {
|
|
42887
43477
|
return textIfNonEmpty(JSON.stringify(error));
|
|
@@ -43888,7 +44478,7 @@ function mutatorWarnings(directive, allMutatorNames, originFileName) {
|
|
|
43888
44478
|
}
|
|
43889
44479
|
function mutatorWarning(directive, mutatorName, originFileName) {
|
|
43890
44480
|
const loc = commentLocation(directive.loc);
|
|
43891
|
-
return `Unused 'Stryker ${match$6(filter$
|
|
44481
|
+
return `Unused 'Stryker ${match$6(filter$3(fromNullishOr(directive.scope), (scope) => scope !== ""), {
|
|
43892
44482
|
onNone: () => directive.type,
|
|
43893
44483
|
onSome: (scope) => `${directive.type} ${scope}`
|
|
43894
44484
|
})}' directive. Mutator with name '${mutatorName}' not found. Directive found at: ${originFileName}:${loc.start.line}:${loc.start.column}.`;
|
|
@@ -44130,7 +44720,7 @@ function unwrapParenthesizedExpression(node) {
|
|
|
44130
44720
|
return getOrElse(innerExpression(node), () => node);
|
|
44131
44721
|
}
|
|
44132
44722
|
function innerExpression(node) {
|
|
44133
|
-
return flatMap$5(filter$
|
|
44723
|
+
return flatMap$5(filter$3(some(node), isParenthesizedWrapper), (parenthesized) => map$12(fromNullishOr(parenthesized.expression), unwrapParenthesizedExpression));
|
|
44134
44724
|
}
|
|
44135
44725
|
function isParenthesizedWrapper(value) {
|
|
44136
44726
|
return hasProperty(value, "type") && value["type"] === "ParenthesizedExpression";
|
|
@@ -44258,7 +44848,7 @@ const headerFor = (root) => map$7(instrumentationHeader, (header) => match$6(lea
|
|
|
44258
44848
|
onSome: (leadingComments) => [commentedHeader(leadingComments, header), ...header.slice(1)]
|
|
44259
44849
|
}));
|
|
44260
44850
|
function leadingCommentsOf(root) {
|
|
44261
|
-
return filter$
|
|
44851
|
+
return filter$3(some(leadingCommentsOn(root.body[0])), isCommentArray);
|
|
44262
44852
|
}
|
|
44263
44853
|
function commentedHeader(leadingComments, header) {
|
|
44264
44854
|
const cloned = cloneNode(getOrThrowWith(fromNullishOr(header[0]), () => /* @__PURE__ */ new Error("Instrumentation header is empty")));
|
|
@@ -44272,7 +44862,7 @@ function deepFreeze$2(value) {
|
|
|
44272
44862
|
});
|
|
44273
44863
|
}
|
|
44274
44864
|
function frozenContainer(value) {
|
|
44275
|
-
return map$12(filter$
|
|
44865
|
+
return map$12(filter$3(some(value), isObjectValue), (object) => {
|
|
44276
44866
|
freezableChildren(object).forEach((child) => {
|
|
44277
44867
|
deepFreeze$2(child);
|
|
44278
44868
|
});
|
|
@@ -44287,10 +44877,10 @@ function freezableChildren(value) {
|
|
|
44287
44877
|
];
|
|
44288
44878
|
}
|
|
44289
44879
|
function mapEntries(value) {
|
|
44290
|
-
return getOrElse(map$12(filter$
|
|
44880
|
+
return getOrElse(map$12(filter$3(some(value), isMap), (map) => [...map.entries()].flat()), () => NO_CHILDREN);
|
|
44291
44881
|
}
|
|
44292
44882
|
function setItems(value) {
|
|
44293
|
-
return getOrElse(map$12(filter$
|
|
44883
|
+
return getOrElse(map$12(filter$3(some(value), isSet), (set) => [...set]), () => NO_CHILDREN);
|
|
44294
44884
|
}
|
|
44295
44885
|
function isObjectValue(value) {
|
|
44296
44886
|
return value !== null && typeof value === "object";
|
|
@@ -44451,7 +45041,7 @@ const transformScript = ({ root, originFileName, rawContent, offset, comments },
|
|
|
44451
45041
|
].some((skip) => skip);
|
|
44452
45042
|
}
|
|
44453
45043
|
function mutateRanges() {
|
|
44454
|
-
return filter$
|
|
45044
|
+
return filter$3(some(mutateDescription), isMutateRangeList);
|
|
44455
45045
|
}
|
|
44456
45046
|
function isOutsideMutateRanges(path) {
|
|
44457
45047
|
return exists$1(mutateRanges(), (ranges) => ranges.every((range) => !locationOverlaps(range, getNodeLocation(path.node))));
|
|
@@ -45125,6 +45715,23 @@ const layerClient = (tag, service) => effectContext(gen(function* () {
|
|
|
45125
45715
|
const middleware = isEffect(service) ? yield* service : service;
|
|
45126
45716
|
return makeUnsafe$8(/* @__PURE__ */ new Map([[`${tag.key}/Client`, (options) => updateContext(middleware(options), (requestContext) => merge$4(services, requestContext))]]));
|
|
45127
45717
|
}));
|
|
45718
|
+
//#endregion
|
|
45719
|
+
//#region ../stryker-js-plugin-interface/dist/index.mjs
|
|
45720
|
+
/** A position inside a file, in the coordinates the wire carries — 0-based line and column. */
|
|
45721
|
+
const CheckerPositionWire = Struct({
|
|
45722
|
+
line: Finite,
|
|
45723
|
+
column: Finite
|
|
45724
|
+
});
|
|
45725
|
+
const CheckerMutantWire = Struct({
|
|
45726
|
+
id: NonEmptyString,
|
|
45727
|
+
fileName: NonEmptyString,
|
|
45728
|
+
mutatorName: NonEmptyString,
|
|
45729
|
+
replacement: String$1,
|
|
45730
|
+
location: Struct({
|
|
45731
|
+
start: CheckerPositionWire,
|
|
45732
|
+
end: CheckerPositionWire
|
|
45733
|
+
})
|
|
45734
|
+
});
|
|
45128
45735
|
Literals(["passed", "compileError"]);
|
|
45129
45736
|
const CheckResultSchema$1 = Union([Struct({ status: Literal("passed") }), Struct({
|
|
45130
45737
|
status: Literal("compileError"),
|
|
@@ -45388,7 +45995,7 @@ const TestRunnerDryRunRequest = Struct({ options: DryRunOptionsSchema });
|
|
|
45388
45995
|
const TestRunnerMutantRunRequest = Struct({ options: MutantRunOptionsSchema });
|
|
45389
45996
|
const CheckerRequest = Struct({
|
|
45390
45997
|
checkerName: String$1,
|
|
45391
|
-
mutants: ArraySchema(
|
|
45998
|
+
mutants: ArraySchema(CheckerMutantWire)
|
|
45392
45999
|
});
|
|
45393
46000
|
const CheckerCheckResult = Record(String$1, CheckResultSchema$1);
|
|
45394
46001
|
const CheckerGroupResult = ArraySchema(ArraySchema(String$1));
|
|
@@ -52479,7 +53086,7 @@ function parseConcurrency(value) {
|
|
|
52479
53086
|
return value;
|
|
52480
53087
|
}
|
|
52481
53088
|
const optional = (option) => optional$1(option);
|
|
52482
|
-
const absentWhenFalse = (value) => getOrUndefined$1(filter$
|
|
53089
|
+
const absentWhenFalse = (value) => getOrUndefined$1(filter$3(value, (present) => present));
|
|
52483
53090
|
const isUnknownArgument = (argument) => exists$1(fromUndefinedOr(argument), (text) => text.startsWith("-"));
|
|
52484
53091
|
function unwrap(value) {
|
|
52485
53092
|
if (isOption(value)) return getOrUndefined$1(value);
|
|
@@ -52704,7 +53311,7 @@ function argumentHintOf(error, argv) {
|
|
|
52704
53311
|
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
53312
|
}
|
|
52706
53313
|
function unrecognizedArgument(argv, option) {
|
|
52707
|
-
return followingArgument(argv, option).pipe(filter$
|
|
53314
|
+
return followingArgument(argv, option).pipe(filter$3((argument) => !argument.startsWith("-")), getOrElse(() => option));
|
|
52708
53315
|
}
|
|
52709
53316
|
function followingArgument(argv, option) {
|
|
52710
53317
|
return value(argv.indexOf(option)).pipe(when((at) => at >= 0, (at) => fromNullishOr(argv[at + 1])), orElse(() => none()));
|
|
@@ -53141,7 +53748,7 @@ var MissingPackages = class extends TaggedError()("MissingPackages", { packages:
|
|
|
53141
53748
|
const orDefault = (present, fallback) => getOrElse(present, () => fallback);
|
|
53142
53749
|
const thresholdsOf = (part) => orDefault(map$12(fromUndefinedOr(part), (present) => present.report.thresholds), DEFAULT_THRESHOLDS);
|
|
53143
53750
|
const hasReport = (part) => part.report !== void 0;
|
|
53144
|
-
const scoreFor = (part) => getOrUndefined$1(map$12(filter$
|
|
53751
|
+
const scoreFor = (part) => getOrUndefined$1(map$12(filter$3(fromUndefinedOr(part), hasReport), (present) => scoreOf(present.report.files)));
|
|
53145
53752
|
const outcomeOf = (reports) => value(reports.some((part) => part.outcome === FAILING_OUTCOME)).pipe(when(true, () => FAILING_OUTCOME), when(false, () => PASSING_OUTCOME), exhaustive);
|
|
53146
53753
|
const normalizeName = (fileName) => fileName.split(SEGMENT_SEPARATORS).filter(Boolean).join("/");
|
|
53147
53754
|
const commonBasePath = (fileNames) => {
|
|
@@ -53252,7 +53859,7 @@ const verdictOf = (label, score, outcome, incomplete) => value(incomplete).pipe(
|
|
|
53252
53859
|
verdict: incompleteVerdict(outcome)
|
|
53253
53860
|
})), when(false, () => completeRow(label, score, outcome)), exhaustive);
|
|
53254
53861
|
/** The label a second part repeats, and `none` when it repeats none a report can name. */
|
|
53255
|
-
const repeatedLabel = (parts) => filter$
|
|
53862
|
+
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
53863
|
const uniqueParts = (parts) => parts.filter((part, index) => parts.slice(0, index).every((earlier) => earlier.label !== part.label));
|
|
53257
53864
|
const chooseReports = (parts) => parts.flatMap((part) => toArray(map$12(fromUndefinedOr(part.report), (report) => ({
|
|
53258
53865
|
...part,
|
|
@@ -53466,7 +54073,7 @@ const decodedPart = (bytes) => match$6(flatMap$5(fromNullishOr(bytes.metaText),
|
|
|
53466
54073
|
});
|
|
53467
54074
|
}
|
|
53468
54075
|
});
|
|
53469
|
-
const expectedPackages = (raw) => match$6(filter$
|
|
54076
|
+
const expectedPackages = (raw) => match$6(filter$3(fromNullishOr(raw), is$2(NonEmptyString)), {
|
|
53470
54077
|
onNone: () => succeed$8(void 0),
|
|
53471
54078
|
onSome: (text) => match$6(decodeOption(fromJsonString(ArraySchema(String$1)))(text), {
|
|
53472
54079
|
onNone: () => fail$4(refuse(`--packages is not a JSON array: ${text}`)),
|
|
@@ -53650,7 +54257,7 @@ var MachineOutput = class extends TaggedClass()("MachineOutput", {
|
|
|
53650
54257
|
[ResolveModeTypeId] = ResolveModeTypeId;
|
|
53651
54258
|
};
|
|
53652
54259
|
const CONFLICT_EXPECTED = "the \"--format text\" and \"--json\" flags are mutually exclusive — use one or the other";
|
|
53653
|
-
const configured = (value) => filter$
|
|
54260
|
+
const configured = (value) => filter$3(fromNullishOr(value), is$2(NonEmptyString));
|
|
53654
54261
|
const modeFromEnv = (envMode, stdoutIsTTY) => value(envMode).pipe(when("machine", () => MachineOutput.make({
|
|
53655
54262
|
signal: "env",
|
|
53656
54263
|
stdoutIsTTY
|
|
@@ -53948,6 +54555,39 @@ const PreviousFileSchema = Struct({
|
|
|
53948
54555
|
const PreviousTestFileSchema = Struct({ source: optional$4(String$1) });
|
|
53949
54556
|
const PreviousFilesSchema = Record(String$1, PreviousFileSchema);
|
|
53950
54557
|
const PreviousTestFilesSchema = Record(String$1, PreviousTestFileSchema);
|
|
54558
|
+
//#endregion
|
|
54559
|
+
//#region src/mutant-result-mapping.ts
|
|
54560
|
+
const toSchemaPosition = (pos) => ({
|
|
54561
|
+
column: pos.column + 1,
|
|
54562
|
+
line: pos.line + 1
|
|
54563
|
+
});
|
|
54564
|
+
const toSchemaLocation = (location) => ({
|
|
54565
|
+
start: toSchemaPosition(location.start),
|
|
54566
|
+
end: toSchemaPosition(location.end)
|
|
54567
|
+
});
|
|
54568
|
+
const checkStatusToMutantStatus = (_status) => "CompileError";
|
|
54569
|
+
const mutantResult = (mutant, status, outcome = {}) => ({
|
|
54570
|
+
_tag: "Mutant",
|
|
54571
|
+
id: mutant.id,
|
|
54572
|
+
fileName: mutant.fileName,
|
|
54573
|
+
mutatorName: mutant.mutatorName,
|
|
54574
|
+
replacement: mutant.replacement,
|
|
54575
|
+
location: toSchemaLocation(mutant.location),
|
|
54576
|
+
status,
|
|
54577
|
+
coveredBy: mutant.coveredBy,
|
|
54578
|
+
static: mutant.static,
|
|
54579
|
+
testsCompleted: mutant.testsCompleted,
|
|
54580
|
+
description: mutant.description,
|
|
54581
|
+
...outcome
|
|
54582
|
+
});
|
|
54583
|
+
const mapRunResult = (mutant, result) => value(result).pipe(discriminator("status")("error", (errored) => mutantResult(mutant, "RuntimeError", { statusReason: errored.errorMessage })), discriminator("status")("killed", (killed) => mutantResult(mutant, "Killed", {
|
|
54584
|
+
testsCompleted: killed.nrOfTests,
|
|
54585
|
+
killedBy: [...killed.killedBy],
|
|
54586
|
+
statusReason: killed.failureMessage
|
|
54587
|
+
})), discriminator("status")("timeout", (timedOut) => {
|
|
54588
|
+
if (timedOut.reason === void 0) return mutantResult(mutant, "Timeout");
|
|
54589
|
+
return mutantResult(mutant, "Timeout", { statusReason: timedOut.reason });
|
|
54590
|
+
}), discriminator("status")("survived", (survived) => mutantResult(mutant, "Survived", { testsCompleted: survived.nrOfTests })), exhaustive);
|
|
53951
54591
|
const ZERO = 0;
|
|
53952
54592
|
const firstDefined = (first, second) => getOrElse(fromNullishOr(first), () => second);
|
|
53953
54593
|
const staticField = (isStatic) => match$6(fromUndefinedOr(isStatic), {
|
|
@@ -54212,6 +54852,18 @@ const decidePlans = (mutants, testCoverage, options, timeOverheadMS, globalTestF
|
|
|
54212
54852
|
const command = coverageToCommand(mutants, testCoverage, options, timeOverheadMS, globalTestFilter, sandboxFileByName);
|
|
54213
54853
|
return makeMutantTestPlanner(command);
|
|
54214
54854
|
};
|
|
54855
|
+
const isRunPlan = (plan) => plan.plan === "Run";
|
|
54856
|
+
const isEarlyPlan = (plan) => !isRunPlan(plan);
|
|
54857
|
+
const earlyResultOf = (plan) => Object.assign({}, plan.mutant, {
|
|
54858
|
+
location: toSchemaLocation(plan.mutant.location),
|
|
54859
|
+
status: plan.mutant.status ?? "Ignored"
|
|
54860
|
+
});
|
|
54861
|
+
const partitionRunPlans = (plans) => ({
|
|
54862
|
+
runPlans: plans.filter(isRunPlan),
|
|
54863
|
+
earlyResults: plans.filter(isEarlyPlan).map(earlyResultOf)
|
|
54864
|
+
});
|
|
54865
|
+
const byReloadEnvironment = (left, right) => Number(left.runOptions.reloadEnvironment) - Number(right.runOptions.reloadEnvironment);
|
|
54866
|
+
const sortRunPlans = (plans) => [...plans].sort(byReloadEnvironment);
|
|
54215
54867
|
const REMEMBERED_STATUS = /* @__PURE__ */ new Set([
|
|
54216
54868
|
"Killed",
|
|
54217
54869
|
"Survived",
|
|
@@ -54247,7 +54899,7 @@ const isRememberable = (previous, mutant, input, file, changedFiles, changedTest
|
|
|
54247
54899
|
const decideForMutant = (mutant, input, changedFiles, changedTests) => {
|
|
54248
54900
|
const file = toRelativeNormalized(mutant.fileName, input.basePath);
|
|
54249
54901
|
const previous = findRemembered(input.previousFiles, file, currentMutantKey(mutant));
|
|
54250
|
-
return match$6(filter$
|
|
54902
|
+
return match$6(filter$3(fromUndefinedOr(previous), (candidate) => isRememberable(candidate, mutant, input, file, changedFiles, changedTests)), {
|
|
54251
54903
|
onNone: () => ({ kind: "run" }),
|
|
54252
54904
|
onSome: (present) => ({
|
|
54253
54905
|
kind: "remembered",
|
|
@@ -54349,8 +55001,8 @@ const incrementalDiffOfChanges = (input) => {
|
|
|
54349
55001
|
};
|
|
54350
55002
|
};
|
|
54351
55003
|
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$
|
|
55004
|
+
const previousFilesOf = (rawReport) => value(rawReport).pipe(when(isObject, (report) => getOrElse(filter$3(fromUndefinedOr(report["files"]), is$2(PreviousFilesSchema)), () => ({}))), orElse(() => ({})));
|
|
55005
|
+
const previousTestFilesOf = (rawReport) => value(rawReport).pipe(when(isObject, (report) => getOrElse(filter$3(fromUndefinedOr(report["testFiles"]), is$2(PreviousTestFilesSchema)), () => ({}))), orElse(() => ({})));
|
|
54354
55006
|
const hasTestFileName = (result) => result.fileName !== void 0;
|
|
54355
55007
|
const testIdsByRelativeFile = (testCoverage, basePath) => {
|
|
54356
55008
|
const byFile = {};
|
|
@@ -54445,7 +55097,7 @@ const combine$1 = (left, right) => {
|
|
|
54445
55097
|
if (isObject(left)) return combineNested(left, right);
|
|
54446
55098
|
return right;
|
|
54447
55099
|
};
|
|
54448
|
-
const mergeRecords = (base, overrides) => union$2(base, filter$
|
|
55100
|
+
const mergeRecords = (base, overrides) => union$2(base, filter$2(overrides, usable), combine$1);
|
|
54449
55101
|
const mergeConfig = (defaults, overrides) => mergeRecords(defaults, overrides);
|
|
54450
55102
|
//#endregion
|
|
54451
55103
|
//#region src/Project.ignore.ts
|
|
@@ -63680,7 +64332,7 @@ var require_AsyncLocalStorageContextManager = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
63680
64332
|
}));
|
|
63681
64333
|
//#endregion
|
|
63682
64334
|
//#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$
|
|
64335
|
+
var require_src$13 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
63684
64336
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63685
64337
|
exports.AsyncLocalStorageContextManager = exports.AsyncHooksContextManager = void 0;
|
|
63686
64338
|
var AsyncHooksContextManager_1 = require_AsyncHooksContextManager();
|
|
@@ -66248,7 +66900,7 @@ var require_sdk_info$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
66248
66900
|
}));
|
|
66249
66901
|
//#endregion
|
|
66250
66902
|
//#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$
|
|
66903
|
+
var require_node$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
66252
66904
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66253
66905
|
exports.SDK_INFO = exports.otperformance = exports._globalThis = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = void 0;
|
|
66254
66906
|
var environment_1 = require_environment$1();
|
|
@@ -66300,10 +66952,10 @@ var require_node$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
66300
66952
|
}));
|
|
66301
66953
|
//#endregion
|
|
66302
66954
|
//#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$
|
|
66955
|
+
var require_platform$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
66304
66956
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66305
66957
|
exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getStringFromEnv = exports.getBooleanFromEnv = exports.otperformance = exports._globalThis = exports.SDK_INFO = void 0;
|
|
66306
|
-
var node_1 = require_node$
|
|
66958
|
+
var node_1 = require_node$10();
|
|
66307
66959
|
Object.defineProperty(exports, "SDK_INFO", {
|
|
66308
66960
|
enumerable: true,
|
|
66309
66961
|
get: function() {
|
|
@@ -66352,7 +67004,7 @@ var require_platform$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
66352
67004
|
var require_time$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
66353
67005
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66354
67006
|
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$
|
|
67007
|
+
const platform_1 = require_platform$10();
|
|
66356
67008
|
const NANOSECOND_DIGITS = 9;
|
|
66357
67009
|
const MILLISECONDS_TO_NANOSECONDS = Math.pow(10, 6);
|
|
66358
67010
|
const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);
|
|
@@ -67159,7 +67811,7 @@ var require_exporter$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67159
67811
|
}));
|
|
67160
67812
|
//#endregion
|
|
67161
67813
|
//#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$
|
|
67814
|
+
var require_src$12 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
67163
67815
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67164
67816
|
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
67817
|
var W3CBaggagePropagator_1 = require_W3CBaggagePropagator$1();
|
|
@@ -67303,7 +67955,7 @@ var require_src$11 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67303
67955
|
return utils_1.parseKeyPairsIntoRecord;
|
|
67304
67956
|
}
|
|
67305
67957
|
});
|
|
67306
|
-
var platform_1 = require_platform$
|
|
67958
|
+
var platform_1 = require_platform$10();
|
|
67307
67959
|
Object.defineProperty(exports, "SDK_INFO", {
|
|
67308
67960
|
enumerable: true,
|
|
67309
67961
|
get: function() {
|
|
@@ -67490,7 +68142,7 @@ var require_default_service_name$1 = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
67490
68142
|
}));
|
|
67491
68143
|
//#endregion
|
|
67492
68144
|
//#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$
|
|
68145
|
+
var require_node$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
67494
68146
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67495
68147
|
exports.defaultServiceName = void 0;
|
|
67496
68148
|
var default_service_name_1 = require_default_service_name$1();
|
|
@@ -67503,10 +68155,10 @@ var require_node$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67503
68155
|
}));
|
|
67504
68156
|
//#endregion
|
|
67505
68157
|
//#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$
|
|
68158
|
+
var require_platform$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
67507
68159
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67508
68160
|
exports.defaultServiceName = void 0;
|
|
67509
|
-
var node_1 = require_node$
|
|
68161
|
+
var node_1 = require_node$9();
|
|
67510
68162
|
Object.defineProperty(exports, "defaultServiceName", {
|
|
67511
68163
|
enumerable: true,
|
|
67512
68164
|
get: function() {
|
|
@@ -67534,9 +68186,9 @@ var require_ResourceImpl$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67534
68186
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67535
68187
|
exports.defaultResource = exports.emptyResource = exports.resourceFromDetectedResource = exports.resourceFromAttributes = void 0;
|
|
67536
68188
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
67537
|
-
const core_1 = require_src$
|
|
68189
|
+
const core_1 = require_src$12();
|
|
67538
68190
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
67539
|
-
const platform_1 = require_platform$
|
|
68191
|
+
const platform_1 = require_platform$9();
|
|
67540
68192
|
const utils_1 = require_utils$6();
|
|
67541
68193
|
var ResourceImpl = class ResourceImpl {
|
|
67542
68194
|
_rawAttributes;
|
|
@@ -67673,7 +68325,7 @@ var require_EnvDetector$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67673
68325
|
exports.envDetector = void 0;
|
|
67674
68326
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
67675
68327
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
67676
|
-
const core_1 = require_src$
|
|
68328
|
+
const core_1 = require_src$12();
|
|
67677
68329
|
/**
|
|
67678
68330
|
* EnvDetector can be used to detect the presence of and create a Resource
|
|
67679
68331
|
* from the OTEL_RESOURCE_ATTRIBUTES environment variable.
|
|
@@ -68238,7 +68890,7 @@ var require_ServiceInstanceIdDetector$1 = /* @__PURE__ */ __commonJSMin(((export
|
|
|
68238
68890
|
}));
|
|
68239
68891
|
//#endregion
|
|
68240
68892
|
//#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$
|
|
68893
|
+
var require_node$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
68242
68894
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68243
68895
|
exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = void 0;
|
|
68244
68896
|
var HostDetector_1 = require_HostDetector$1();
|
|
@@ -68272,10 +68924,10 @@ var require_node$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68272
68924
|
}));
|
|
68273
68925
|
//#endregion
|
|
68274
68926
|
//#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$
|
|
68927
|
+
var require_platform$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
68276
68928
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68277
68929
|
exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = void 0;
|
|
68278
|
-
var node_1 = require_node$
|
|
68930
|
+
var node_1 = require_node$8();
|
|
68279
68931
|
Object.defineProperty(exports, "hostDetector", {
|
|
68280
68932
|
enumerable: true,
|
|
68281
68933
|
get: function() {
|
|
@@ -68326,7 +68978,7 @@ var require_detectors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68326
68978
|
return EnvDetector_1.envDetector;
|
|
68327
68979
|
}
|
|
68328
68980
|
});
|
|
68329
|
-
var platform_1 = require_platform$
|
|
68981
|
+
var platform_1 = require_platform$8();
|
|
68330
68982
|
Object.defineProperty(exports, "hostDetector", {
|
|
68331
68983
|
enumerable: true,
|
|
68332
68984
|
get: function() {
|
|
@@ -68361,7 +69013,7 @@ var require_detectors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68361
69013
|
}));
|
|
68362
69014
|
//#endregion
|
|
68363
69015
|
//#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$
|
|
69016
|
+
var require_src$11 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
68365
69017
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68366
69018
|
exports.defaultServiceName = exports.emptyResource = exports.defaultResource = exports.resourceFromAttributes = exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = exports.envDetector = exports.detectResources = void 0;
|
|
68367
69019
|
var detect_resources_1 = require_detect_resources$1();
|
|
@@ -68421,7 +69073,7 @@ var require_src$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68421
69073
|
return ResourceImpl_1.emptyResource;
|
|
68422
69074
|
}
|
|
68423
69075
|
});
|
|
68424
|
-
var platform_1 = require_platform$
|
|
69076
|
+
var platform_1 = require_platform$9();
|
|
68425
69077
|
Object.defineProperty(exports, "defaultServiceName", {
|
|
68426
69078
|
enumerable: true,
|
|
68427
69079
|
get: function() {
|
|
@@ -68442,7 +69094,7 @@ var require_Span$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68442
69094
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68443
69095
|
exports.SpanImpl = void 0;
|
|
68444
69096
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
68445
|
-
const core_1 = require_src$
|
|
69097
|
+
const core_1 = require_src$12();
|
|
68446
69098
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
68447
69099
|
const enums_1 = require_enums$1();
|
|
68448
69100
|
/**
|
|
@@ -68728,7 +69380,7 @@ var require_ParentBasedSampler$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68728
69380
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68729
69381
|
exports.ParentBasedSampler = void 0;
|
|
68730
69382
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
68731
|
-
const core_1 = require_src$
|
|
69383
|
+
const core_1 = require_src$12();
|
|
68732
69384
|
const AlwaysOffSampler_1 = require_AlwaysOffSampler$1();
|
|
68733
69385
|
const AlwaysOnSampler_1 = require_AlwaysOnSampler$1();
|
|
68734
69386
|
/**
|
|
@@ -68812,7 +69464,7 @@ var require_config$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68812
69464
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68813
69465
|
exports.buildSamplerFromEnv = exports.loadDefaultConfig = void 0;
|
|
68814
69466
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
68815
|
-
const core_1 = require_src$
|
|
69467
|
+
const core_1 = require_src$12();
|
|
68816
69468
|
const AlwaysOffSampler_1 = require_AlwaysOffSampler$1();
|
|
68817
69469
|
const AlwaysOnSampler_1 = require_AlwaysOnSampler$1();
|
|
68818
69470
|
const ParentBasedSampler_1 = require_ParentBasedSampler$1();
|
|
@@ -68889,7 +69541,7 @@ var require_utility$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68889
69541
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68890
69542
|
exports.reconfigureLimits = exports.mergeConfig = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = void 0;
|
|
68891
69543
|
const config_1 = require_config$2();
|
|
68892
|
-
const core_1 = require_src$
|
|
69544
|
+
const core_1 = require_src$12();
|
|
68893
69545
|
exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
|
|
68894
69546
|
exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
|
|
68895
69547
|
/**
|
|
@@ -68930,7 +69582,7 @@ var require_BatchSpanProcessorBase$1 = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
68930
69582
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68931
69583
|
exports.BatchSpanProcessorBase = void 0;
|
|
68932
69584
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
68933
|
-
const core_1 = require_src$
|
|
69585
|
+
const core_1 = require_src$12();
|
|
68934
69586
|
/**
|
|
68935
69587
|
* Implementation of the {@link SpanProcessor} that batches spans exported by
|
|
68936
69588
|
* the SDK then pushes them to the exporter pipeline.
|
|
@@ -69115,7 +69767,7 @@ var require_RandomIdGenerator$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69115
69767
|
}));
|
|
69116
69768
|
//#endregion
|
|
69117
69769
|
//#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$
|
|
69770
|
+
var require_node$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69119
69771
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69120
69772
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;
|
|
69121
69773
|
var BatchSpanProcessor_1 = require_BatchSpanProcessor$1();
|
|
@@ -69135,10 +69787,10 @@ var require_node$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69135
69787
|
}));
|
|
69136
69788
|
//#endregion
|
|
69137
69789
|
//#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$
|
|
69790
|
+
var require_platform$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69139
69791
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69140
69792
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;
|
|
69141
|
-
var node_1 = require_node$
|
|
69793
|
+
var node_1 = require_node$7();
|
|
69142
69794
|
Object.defineProperty(exports, "BatchSpanProcessor", {
|
|
69143
69795
|
enumerable: true,
|
|
69144
69796
|
get: function() {
|
|
@@ -69158,10 +69810,10 @@ var require_Tracer$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69158
69810
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69159
69811
|
exports.Tracer = void 0;
|
|
69160
69812
|
const api = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
69161
|
-
const core_1 = require_src$
|
|
69813
|
+
const core_1 = require_src$12();
|
|
69162
69814
|
const Span_1 = require_Span$1();
|
|
69163
69815
|
const utility_1 = require_utility$1();
|
|
69164
|
-
const platform_1 = require_platform$
|
|
69816
|
+
const platform_1 = require_platform$7();
|
|
69165
69817
|
/**
|
|
69166
69818
|
* This class represents a basic tracer.
|
|
69167
69819
|
*/
|
|
@@ -69280,7 +69932,7 @@ var require_Tracer$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69280
69932
|
var require_MultiSpanProcessor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69281
69933
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69282
69934
|
exports.MultiSpanProcessor = void 0;
|
|
69283
|
-
const core_1 = require_src$
|
|
69935
|
+
const core_1 = require_src$12();
|
|
69284
69936
|
/**
|
|
69285
69937
|
* Implementation of the {@link SpanProcessor} that simply forwards all
|
|
69286
69938
|
* received events to a list of {@link SpanProcessor}s.
|
|
@@ -69325,8 +69977,8 @@ var require_MultiSpanProcessor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69325
69977
|
var require_BasicTracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69326
69978
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69327
69979
|
exports.BasicTracerProvider = exports.ForceFlushState = void 0;
|
|
69328
|
-
const core_1 = require_src$
|
|
69329
|
-
const resources_1 = require_src$
|
|
69980
|
+
const core_1 = require_src$12();
|
|
69981
|
+
const resources_1 = require_src$11();
|
|
69330
69982
|
const Tracer_1 = require_Tracer$1();
|
|
69331
69983
|
const config_1 = require_config$2();
|
|
69332
69984
|
const MultiSpanProcessor_1 = require_MultiSpanProcessor$1();
|
|
@@ -69404,7 +70056,7 @@ var require_BasicTracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69404
70056
|
var require_ConsoleSpanExporter$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69405
70057
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69406
70058
|
exports.ConsoleSpanExporter = void 0;
|
|
69407
|
-
const core_1 = require_src$
|
|
70059
|
+
const core_1 = require_src$12();
|
|
69408
70060
|
/**
|
|
69409
70061
|
* This is implementation of {@link SpanExporter} that prints spans to the
|
|
69410
70062
|
* console. This class can be used for diagnostic purposes.
|
|
@@ -69472,7 +70124,7 @@ var require_ConsoleSpanExporter$1 = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
69472
70124
|
var require_InMemorySpanExporter$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69473
70125
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69474
70126
|
exports.InMemorySpanExporter = void 0;
|
|
69475
|
-
const core_1 = require_src$
|
|
70127
|
+
const core_1 = require_src$12();
|
|
69476
70128
|
/**
|
|
69477
70129
|
* This class can be used for testing purposes. It stores the exported spans
|
|
69478
70130
|
* in a list in memory that can be retrieved using the `getFinishedSpans()`
|
|
@@ -69519,7 +70171,7 @@ var require_SimpleSpanProcessor$1 = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
69519
70171
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69520
70172
|
exports.SimpleSpanProcessor = void 0;
|
|
69521
70173
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
69522
|
-
const core_1 = require_src$
|
|
70174
|
+
const core_1 = require_src$12();
|
|
69523
70175
|
/**
|
|
69524
70176
|
* An implementation of the {@link SpanProcessor} that converts the {@link Span}
|
|
69525
70177
|
* to {@link ReadableSpan} and passes it to the configured exporter.
|
|
@@ -69583,7 +70235,7 @@ var require_NoopSpanProcessor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69583
70235
|
}));
|
|
69584
70236
|
//#endregion
|
|
69585
70237
|
//#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$
|
|
70238
|
+
var require_src$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69587
70239
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69588
70240
|
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
70241
|
var BasicTracerProvider_1 = require_BasicTracerProvider();
|
|
@@ -69593,7 +70245,7 @@ var require_src$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69593
70245
|
return BasicTracerProvider_1.BasicTracerProvider;
|
|
69594
70246
|
}
|
|
69595
70247
|
});
|
|
69596
|
-
var platform_1 = require_platform$
|
|
70248
|
+
var platform_1 = require_platform$7();
|
|
69597
70249
|
Object.defineProperty(exports, "BatchSpanProcessor", {
|
|
69598
70250
|
enumerable: true,
|
|
69599
70251
|
get: function() {
|
|
@@ -69675,10 +70327,10 @@ var require_src$9 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69675
70327
|
var require_NodeTracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69676
70328
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69677
70329
|
exports.NodeTracerProvider = void 0;
|
|
69678
|
-
const context_async_hooks_1 = require_src$
|
|
69679
|
-
const sdk_trace_base_1 = require_src$
|
|
70330
|
+
const context_async_hooks_1 = require_src$13();
|
|
70331
|
+
const sdk_trace_base_1 = require_src$10();
|
|
69680
70332
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
69681
|
-
const core_1 = require_src$
|
|
70333
|
+
const core_1 = require_src$12();
|
|
69682
70334
|
function setupContextManager(contextManager) {
|
|
69683
70335
|
if (contextManager === null) return;
|
|
69684
70336
|
if (contextManager === void 0) {
|
|
@@ -69726,7 +70378,7 @@ var require_NodeTracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69726
70378
|
}));
|
|
69727
70379
|
//#endregion
|
|
69728
70380
|
//#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$
|
|
70381
|
+
var import_src$5 = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69730
70382
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69731
70383
|
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
70384
|
var NodeTracerProvider_1 = require_NodeTracerProvider();
|
|
@@ -69736,7 +70388,7 @@ var import_src$4 = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69736
70388
|
return NodeTracerProvider_1.NodeTracerProvider;
|
|
69737
70389
|
}
|
|
69738
70390
|
});
|
|
69739
|
-
var sdk_trace_base_1 = require_src$
|
|
70391
|
+
var sdk_trace_base_1 = require_src$10();
|
|
69740
70392
|
Object.defineProperty(exports, "AlwaysOffSampler", {
|
|
69741
70393
|
enumerable: true,
|
|
69742
70394
|
get: function() {
|
|
@@ -69953,7 +70605,7 @@ var require_globalThis$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69953
70605
|
}));
|
|
69954
70606
|
//#endregion
|
|
69955
70607
|
//#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$
|
|
70608
|
+
var require_node$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69957
70609
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69958
70610
|
exports._globalThis = void 0;
|
|
69959
70611
|
var globalThis_1 = require_globalThis$1();
|
|
@@ -69966,10 +70618,10 @@ var require_node$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69966
70618
|
}));
|
|
69967
70619
|
//#endregion
|
|
69968
70620
|
//#region ../../node_modules/.pnpm/@opentelemetry+api-logs@0.208.0/node_modules/@opentelemetry/api-logs/build/src/platform/index.js
|
|
69969
|
-
var require_platform$
|
|
70621
|
+
var require_platform$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69970
70622
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69971
70623
|
exports._globalThis = void 0;
|
|
69972
|
-
var node_1 = require_node$
|
|
70624
|
+
var node_1 = require_node$6();
|
|
69973
70625
|
Object.defineProperty(exports, "_globalThis", {
|
|
69974
70626
|
enumerable: true,
|
|
69975
70627
|
get: function() {
|
|
@@ -69982,7 +70634,7 @@ var require_platform$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69982
70634
|
var require_global_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
69983
70635
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69984
70636
|
exports.API_BACKWARDS_COMPATIBILITY_VERSION = exports.makeGetter = exports._global = exports.GLOBAL_LOGS_API_KEY = void 0;
|
|
69985
|
-
const platform_1 = require_platform$
|
|
70637
|
+
const platform_1 = require_platform$6();
|
|
69986
70638
|
exports.GLOBAL_LOGS_API_KEY = Symbol.for("io.opentelemetry.js.api.logs");
|
|
69987
70639
|
exports._global = platform_1._globalThis;
|
|
69988
70640
|
/**
|
|
@@ -70054,7 +70706,7 @@ var require_logs$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70054
70706
|
}));
|
|
70055
70707
|
//#endregion
|
|
70056
70708
|
//#region ../../node_modules/.pnpm/@opentelemetry+api-logs@0.208.0/node_modules/@opentelemetry/api-logs/build/src/index.js
|
|
70057
|
-
var require_src$
|
|
70709
|
+
var require_src$8 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70058
70710
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70059
70711
|
exports.logs = exports.ProxyLoggerProvider = exports.NoopLogger = exports.NOOP_LOGGER = exports.SeverityNumber = void 0;
|
|
70060
70712
|
var LogRecord_1 = require_LogRecord();
|
|
@@ -70092,7 +70744,7 @@ var require_LogRecordImpl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70092
70744
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70093
70745
|
exports.LogRecordImpl = void 0;
|
|
70094
70746
|
const api = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
70095
|
-
const core_1 = require_src$
|
|
70747
|
+
const core_1 = require_src$12();
|
|
70096
70748
|
var LogRecordImpl = class {
|
|
70097
70749
|
hrTime;
|
|
70098
70750
|
hrTimeObserved;
|
|
@@ -70269,7 +70921,7 @@ var require_Logger = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70269
70921
|
var require_config$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70270
70922
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70271
70923
|
exports.reconfigureLimits = exports.loadDefaultConfig = void 0;
|
|
70272
|
-
const core_1 = require_src$
|
|
70924
|
+
const core_1 = require_src$12();
|
|
70273
70925
|
function loadDefaultConfig() {
|
|
70274
70926
|
return {
|
|
70275
70927
|
forceFlushTimeoutMillis: 3e4,
|
|
@@ -70321,7 +70973,7 @@ var require_NoopLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
70321
70973
|
var require_MultiLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70322
70974
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70323
70975
|
exports.MultiLogRecordProcessor = void 0;
|
|
70324
|
-
const core_1 = require_src$
|
|
70976
|
+
const core_1 = require_src$12();
|
|
70325
70977
|
/**
|
|
70326
70978
|
* Implementation of the {@link LogRecordProcessor} that simply forwards all
|
|
70327
70979
|
* received events to a list of {@link LogRecordProcessor}s.
|
|
@@ -70380,9 +71032,9 @@ var require_LoggerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70380
71032
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70381
71033
|
exports.LoggerProvider = exports.DEFAULT_LOGGER_NAME = void 0;
|
|
70382
71034
|
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$
|
|
71035
|
+
const api_logs_1 = require_src$8();
|
|
71036
|
+
const resources_1 = require_src$11();
|
|
71037
|
+
const core_1 = require_src$12();
|
|
70386
71038
|
const Logger_1 = require_Logger();
|
|
70387
71039
|
const config_1 = require_config$1();
|
|
70388
71040
|
const LoggerProviderSharedState_1 = require_LoggerProviderSharedState();
|
|
@@ -70450,7 +71102,7 @@ var require_LoggerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70450
71102
|
var require_ConsoleLogRecordExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70451
71103
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70452
71104
|
exports.ConsoleLogRecordExporter = void 0;
|
|
70453
|
-
const core_1 = require_src$
|
|
71105
|
+
const core_1 = require_src$12();
|
|
70454
71106
|
/**
|
|
70455
71107
|
* This is implementation of {@link LogRecordExporter} that prints LogRecords to the
|
|
70456
71108
|
* console. This class can be used for diagnostic purposes.
|
|
@@ -70507,7 +71159,7 @@ var require_ConsoleLogRecordExporter = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
70507
71159
|
var require_SimpleLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70508
71160
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70509
71161
|
exports.SimpleLogRecordProcessor = void 0;
|
|
70510
|
-
const core_1 = require_src$
|
|
71162
|
+
const core_1 = require_src$12();
|
|
70511
71163
|
/**
|
|
70512
71164
|
* An implementation of the {@link LogRecordProcessor} interface that exports
|
|
70513
71165
|
* each {@link LogRecord} as it is emitted.
|
|
@@ -70556,7 +71208,7 @@ var require_SimpleLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
70556
71208
|
var require_InMemoryLogRecordExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70557
71209
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70558
71210
|
exports.InMemoryLogRecordExporter = void 0;
|
|
70559
|
-
const core_1 = require_src$
|
|
71211
|
+
const core_1 = require_src$12();
|
|
70560
71212
|
/**
|
|
70561
71213
|
* This class can be used for testing purposes. It stores the exported LogRecords
|
|
70562
71214
|
* in a list in memory that can be retrieved using the `getFinishedLogRecords()`
|
|
@@ -70597,7 +71249,7 @@ var require_BatchLogRecordProcessorBase = /* @__PURE__ */ __commonJSMin(((export
|
|
|
70597
71249
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70598
71250
|
exports.BatchLogRecordProcessorBase = void 0;
|
|
70599
71251
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
70600
|
-
const core_1 = require_src$
|
|
71252
|
+
const core_1 = require_src$12();
|
|
70601
71253
|
var BatchLogRecordProcessorBase = class {
|
|
70602
71254
|
_exporter;
|
|
70603
71255
|
_maxExportBatchSize;
|
|
@@ -70714,7 +71366,7 @@ var require_BatchLogRecordProcessor = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
70714
71366
|
}));
|
|
70715
71367
|
//#endregion
|
|
70716
71368
|
//#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$
|
|
71369
|
+
var require_node$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70718
71370
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70719
71371
|
exports.BatchLogRecordProcessor = void 0;
|
|
70720
71372
|
var BatchLogRecordProcessor_1 = require_BatchLogRecordProcessor();
|
|
@@ -70727,10 +71379,10 @@ var require_node$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70727
71379
|
}));
|
|
70728
71380
|
//#endregion
|
|
70729
71381
|
//#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$
|
|
71382
|
+
var require_platform$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70731
71383
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70732
71384
|
exports.BatchLogRecordProcessor = void 0;
|
|
70733
|
-
var node_1 = require_node$
|
|
71385
|
+
var node_1 = require_node$5();
|
|
70734
71386
|
Object.defineProperty(exports, "BatchLogRecordProcessor", {
|
|
70735
71387
|
enumerable: true,
|
|
70736
71388
|
get: function() {
|
|
@@ -70740,7 +71392,7 @@ var require_platform$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70740
71392
|
}));
|
|
70741
71393
|
//#endregion
|
|
70742
71394
|
//#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$
|
|
71395
|
+
var require_src$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70744
71396
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70745
71397
|
exports.BatchLogRecordProcessor = exports.InMemoryLogRecordExporter = exports.SimpleLogRecordProcessor = exports.ConsoleLogRecordExporter = exports.LoggerProvider = void 0;
|
|
70746
71398
|
var LoggerProvider_1 = require_LoggerProvider();
|
|
@@ -70771,7 +71423,7 @@ var require_src$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70771
71423
|
return InMemoryLogRecordExporter_1.InMemoryLogRecordExporter;
|
|
70772
71424
|
}
|
|
70773
71425
|
});
|
|
70774
|
-
var platform_1 = require_platform$
|
|
71426
|
+
var platform_1 = require_platform$5();
|
|
70775
71427
|
Object.defineProperty(exports, "BatchLogRecordProcessor", {
|
|
70776
71428
|
enumerable: true,
|
|
70777
71429
|
get: function() {
|
|
@@ -70781,8 +71433,8 @@ var require_src$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70781
71433
|
}));
|
|
70782
71434
|
//#endregion
|
|
70783
71435
|
//#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$
|
|
71436
|
+
var import_src$7 = require_src$8();
|
|
71437
|
+
var import_src$8 = /* @__PURE__ */ __toESM(require_src$7(), 1);
|
|
70786
71438
|
const bigint1e9 = /*#__PURE__*/ BigInt(1e9);
|
|
70787
71439
|
/** @internal */
|
|
70788
71440
|
const nanosToHrTime = (timestamp) => {
|
|
@@ -71272,7 +71924,7 @@ var require_sdk_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
71272
71924
|
}));
|
|
71273
71925
|
//#endregion
|
|
71274
71926
|
//#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$
|
|
71927
|
+
var require_node$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
71276
71928
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71277
71929
|
exports.otperformance = exports.SDK_INFO = exports._globalThis = exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getBooleanFromEnv = exports.getStringFromEnv = void 0;
|
|
71278
71930
|
var environment_1 = require_environment();
|
|
@@ -71321,10 +71973,10 @@ var require_node$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
71321
71973
|
}));
|
|
71322
71974
|
//#endregion
|
|
71323
71975
|
//#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$
|
|
71976
|
+
var require_platform$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
71325
71977
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71326
71978
|
exports.getStringListFromEnv = exports.getNumberFromEnv = exports.getStringFromEnv = exports.getBooleanFromEnv = exports.otperformance = exports._globalThis = exports.SDK_INFO = void 0;
|
|
71327
|
-
var node_1 = require_node$
|
|
71979
|
+
var node_1 = require_node$4();
|
|
71328
71980
|
Object.defineProperty(exports, "SDK_INFO", {
|
|
71329
71981
|
enumerable: true,
|
|
71330
71982
|
get: function() {
|
|
@@ -71373,7 +72025,7 @@ var require_platform$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
71373
72025
|
var require_time = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
71374
72026
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71375
72027
|
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$
|
|
72028
|
+
const platform_1 = require_platform$4();
|
|
71377
72029
|
const NANOSECOND_DIGITS = 9;
|
|
71378
72030
|
const MILLISECONDS_TO_NANOSECONDS = Math.pow(10, 6);
|
|
71379
72031
|
const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);
|
|
@@ -72218,7 +72870,7 @@ var require_exporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
72218
72870
|
}));
|
|
72219
72871
|
//#endregion
|
|
72220
72872
|
//#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$
|
|
72873
|
+
var require_src$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
72222
72874
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72223
72875
|
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
72876
|
exports.internal = void 0;
|
|
@@ -72369,7 +73021,7 @@ var require_src$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
72369
73021
|
return utils_1.parseKeyPairsIntoRecord;
|
|
72370
73022
|
}
|
|
72371
73023
|
});
|
|
72372
|
-
var platform_1 = require_platform$
|
|
73024
|
+
var platform_1 = require_platform$4();
|
|
72373
73025
|
Object.defineProperty(exports, "SDK_INFO", {
|
|
72374
73026
|
enumerable: true,
|
|
72375
73027
|
get: function() {
|
|
@@ -72587,7 +73239,7 @@ var require_ResourceImpl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
72587
73239
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72588
73240
|
exports.defaultResource = exports.emptyResource = exports.resourceFromDetectedResource = exports.resourceFromAttributes = void 0;
|
|
72589
73241
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
72590
|
-
const core_1 = require_src$
|
|
73242
|
+
const core_1 = require_src$6();
|
|
72591
73243
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
72592
73244
|
const default_service_name_1 = require_default_service_name();
|
|
72593
73245
|
const utils_1 = require_utils$3();
|
|
@@ -72726,7 +73378,7 @@ var require_EnvDetector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
72726
73378
|
exports.envDetector = void 0;
|
|
72727
73379
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
72728
73380
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
72729
|
-
const core_1 = require_src$
|
|
73381
|
+
const core_1 = require_src$6();
|
|
72730
73382
|
/**
|
|
72731
73383
|
* EnvDetector can be used to detect the presence of and create a Resource
|
|
72732
73384
|
* from the OTEL_RESOURCE_ATTRIBUTES environment variable.
|
|
@@ -73275,7 +73927,7 @@ var require_ServiceInstanceIdDetector = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
73275
73927
|
}));
|
|
73276
73928
|
//#endregion
|
|
73277
73929
|
//#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$
|
|
73930
|
+
var require_node$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
73279
73931
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73280
73932
|
exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = void 0;
|
|
73281
73933
|
var HostDetector_1 = require_HostDetector();
|
|
@@ -73309,10 +73961,10 @@ var require_node$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
73309
73961
|
}));
|
|
73310
73962
|
//#endregion
|
|
73311
73963
|
//#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$
|
|
73964
|
+
var require_platform$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
73313
73965
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73314
73966
|
exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = void 0;
|
|
73315
|
-
var node_1 = require_node$
|
|
73967
|
+
var node_1 = require_node$3();
|
|
73316
73968
|
Object.defineProperty(exports, "hostDetector", {
|
|
73317
73969
|
enumerable: true,
|
|
73318
73970
|
get: function() {
|
|
@@ -73363,7 +74015,7 @@ var require_detectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
73363
74015
|
return EnvDetector_1.envDetector;
|
|
73364
74016
|
}
|
|
73365
74017
|
});
|
|
73366
|
-
var platform_1 = require_platform$
|
|
74018
|
+
var platform_1 = require_platform$3();
|
|
73367
74019
|
Object.defineProperty(exports, "hostDetector", {
|
|
73368
74020
|
enumerable: true,
|
|
73369
74021
|
get: function() {
|
|
@@ -73398,7 +74050,7 @@ var require_detectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
73398
74050
|
}));
|
|
73399
74051
|
//#endregion
|
|
73400
74052
|
//#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$
|
|
74053
|
+
var require_src$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
73402
74054
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73403
74055
|
exports.defaultServiceName = exports.emptyResource = exports.defaultResource = exports.resourceFromAttributes = exports.serviceInstanceIdDetector = exports.processDetector = exports.osDetector = exports.hostDetector = exports.envDetector = exports.detectResources = void 0;
|
|
73404
74056
|
var detect_resources_1 = require_detect_resources();
|
|
@@ -73468,7 +74120,7 @@ var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
73468
74120
|
}));
|
|
73469
74121
|
//#endregion
|
|
73470
74122
|
//#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$
|
|
74123
|
+
var import_src$9 = /* @__PURE__ */ __toESM(require_src$5(), 1);
|
|
73472
74124
|
init_esm$1();
|
|
73473
74125
|
/**
|
|
73474
74126
|
* Service tag for OpenTelemetry metadata attached to emitted telemetry.
|
|
@@ -73536,7 +74188,7 @@ const layerFromEnv = (additionalAttributes) => effect(Resource, gen(function* ()
|
|
|
73536
74188
|
});
|
|
73537
74189
|
}));
|
|
73538
74190
|
if (serviceName._tag === "Some") attributes[ATTR_SERVICE_NAME] = serviceName.value;
|
|
73539
|
-
return import_src$
|
|
74191
|
+
return import_src$9.resourceFromAttributes({
|
|
73540
74192
|
...attributes,
|
|
73541
74193
|
...additionalAttributes
|
|
73542
74194
|
});
|
|
@@ -73577,13 +74229,13 @@ var OtelLoggerProvider = class extends (/*#__PURE__*/ Service$1()("@effect/opent
|
|
|
73577
74229
|
*/
|
|
73578
74230
|
const logLevelToSeverityNumber = (level) => {
|
|
73579
74231
|
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$
|
|
74232
|
+
case "Trace": return import_src$7.SeverityNumber.TRACE;
|
|
74233
|
+
case "Debug": return import_src$7.SeverityNumber.DEBUG;
|
|
74234
|
+
case "Info": return import_src$7.SeverityNumber.INFO;
|
|
74235
|
+
case "Warn": return import_src$7.SeverityNumber.WARN;
|
|
74236
|
+
case "Error": return import_src$7.SeverityNumber.ERROR;
|
|
74237
|
+
case "Fatal": return import_src$7.SeverityNumber.FATAL;
|
|
74238
|
+
default: return import_src$7.SeverityNumber.UNSPECIFIED;
|
|
73587
74239
|
}
|
|
73588
74240
|
};
|
|
73589
74241
|
/**
|
|
@@ -73647,7 +74299,7 @@ const layer$4 = (options) => layer$12([make$1], { mergeWithExisting: options.mer
|
|
|
73647
74299
|
*/
|
|
73648
74300
|
const layerLoggerProvider = (processor, config) => effect(OtelLoggerProvider, gen(function* () {
|
|
73649
74301
|
const resource = yield* Resource;
|
|
73650
|
-
return yield* acquireRelease(sync(() => new import_src$
|
|
74302
|
+
return yield* acquireRelease(sync(() => new import_src$8.LoggerProvider({
|
|
73651
74303
|
...config ?? void 0,
|
|
73652
74304
|
processors: ensure(processor),
|
|
73653
74305
|
resource
|
|
@@ -74951,7 +75603,7 @@ var require_LastValue = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
74951
75603
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74952
75604
|
exports.LastValueAggregator = exports.LastValueAccumulation = void 0;
|
|
74953
75605
|
const types_1 = require_types$1();
|
|
74954
|
-
const core_1 = require_src$
|
|
75606
|
+
const core_1 = require_src$12();
|
|
74955
75607
|
const MetricData_1 = require_MetricData();
|
|
74956
75608
|
var LastValueAccumulation = class {
|
|
74957
75609
|
startTime;
|
|
@@ -75438,7 +76090,7 @@ var require_PeriodicExportingMetricReader = /* @__PURE__ */ __commonJSMin(((expo
|
|
|
75438
76090
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75439
76091
|
exports.PeriodicExportingMetricReader = void 0;
|
|
75440
76092
|
const api = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
75441
|
-
const core_1 = require_src$
|
|
76093
|
+
const core_1 = require_src$12();
|
|
75442
76094
|
const MetricReader_1 = require_MetricReader();
|
|
75443
76095
|
const utils_1 = require_utils$1();
|
|
75444
76096
|
/**
|
|
@@ -75510,7 +76162,7 @@ var require_PeriodicExportingMetricReader = /* @__PURE__ */ __commonJSMin(((expo
|
|
|
75510
76162
|
var require_InMemoryMetricExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
75511
76163
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75512
76164
|
exports.InMemoryMetricExporter = void 0;
|
|
75513
|
-
const core_1 = require_src$
|
|
76165
|
+
const core_1 = require_src$12();
|
|
75514
76166
|
/**
|
|
75515
76167
|
* In-memory Metrics Exporter is a Push Metric Exporter
|
|
75516
76168
|
* which accumulates metrics data in the local memory and
|
|
@@ -75562,7 +76214,7 @@ var require_InMemoryMetricExporter = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
75562
76214
|
var require_ConsoleMetricExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
75563
76215
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75564
76216
|
exports.ConsoleMetricExporter = void 0;
|
|
75565
|
-
const core_1 = require_src$
|
|
76217
|
+
const core_1 = require_src$12();
|
|
75566
76218
|
const AggregationSelector_1 = require_AggregationSelector();
|
|
75567
76219
|
exports.ConsoleMetricExporter = class ConsoleMetricExporter {
|
|
75568
76220
|
_shutdown = false;
|
|
@@ -75667,7 +76319,7 @@ var require_Instruments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
75667
76319
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75668
76320
|
exports.isObservableInstrument = exports.ObservableUpDownCounterInstrument = exports.ObservableGaugeInstrument = exports.ObservableCounterInstrument = exports.ObservableInstrument = exports.HistogramInstrument = exports.GaugeInstrument = exports.CounterInstrument = exports.UpDownCounterInstrument = exports.SyncInstrument = void 0;
|
|
75669
76321
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
75670
|
-
const core_1 = require_src$
|
|
76322
|
+
const core_1 = require_src$12();
|
|
75671
76323
|
var SyncInstrument = class {
|
|
75672
76324
|
_writableMetricStorage;
|
|
75673
76325
|
_descriptor;
|
|
@@ -76740,7 +77392,7 @@ var require_MeterProviderSharedState = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
76740
77392
|
var require_MetricCollector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
76741
77393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76742
77394
|
exports.MetricCollector = void 0;
|
|
76743
|
-
const core_1 = require_src$
|
|
77395
|
+
const core_1 = require_src$12();
|
|
76744
77396
|
/**
|
|
76745
77397
|
* An internal opaque interface that the MetricReader receives as
|
|
76746
77398
|
* MetricProducer. It acts as the storage key to the internal metric stream
|
|
@@ -77012,7 +77664,7 @@ var require_MeterProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
77012
77664
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77013
77665
|
exports.MeterProvider = void 0;
|
|
77014
77666
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
77015
|
-
const resources_1 = require_src$
|
|
77667
|
+
const resources_1 = require_src$11();
|
|
77016
77668
|
const MeterProviderSharedState_1 = require_MeterProviderSharedState();
|
|
77017
77669
|
const MetricCollector_1 = require_MetricCollector();
|
|
77018
77670
|
const View_1 = require_View();
|
|
@@ -77080,7 +77732,7 @@ var require_MeterProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
77080
77732
|
}));
|
|
77081
77733
|
//#endregion
|
|
77082
77734
|
//#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$
|
|
77735
|
+
var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
77084
77736
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77085
77737
|
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
77738
|
var AggregationTemporality_1 = require_AggregationTemporality();
|
|
@@ -77168,7 +77820,7 @@ var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
77168
77820
|
}));
|
|
77169
77821
|
//#endregion
|
|
77170
77822
|
//#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$
|
|
77823
|
+
var import_src$6 = require_src$4();
|
|
77172
77824
|
const sdkName = "@effect/opentelemetry/Metrics";
|
|
77173
77825
|
/** @internal */
|
|
77174
77826
|
var MetricProducerImpl = class MetricProducerImpl {
|
|
@@ -77212,7 +77864,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77212
77864
|
metricDataByName.set(data.descriptor.name, data);
|
|
77213
77865
|
};
|
|
77214
77866
|
const isDelta = this.temporality === "delta";
|
|
77215
|
-
const aggregationTemporality = isDelta ? import_src$
|
|
77867
|
+
const aggregationTemporality = isDelta ? import_src$6.AggregationTemporality.DELTA : import_src$6.AggregationTemporality.CUMULATIVE;
|
|
77216
77868
|
const intervalStartTime = isDelta ? this.previousExportTimeNanos : this.startTimeNanos;
|
|
77217
77869
|
for (let i = 0, len = snapshot.length; i < len; i++) {
|
|
77218
77870
|
const state = snapshot[i];
|
|
@@ -77248,7 +77900,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77248
77900
|
};
|
|
77249
77901
|
if (metricDataByName.has(state.id)) metricDataByName.get(state.id).dataPoints.push(dataPoint);
|
|
77250
77902
|
else addMetricData({
|
|
77251
|
-
dataPointType: import_src$
|
|
77903
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77252
77904
|
descriptor,
|
|
77253
77905
|
isMonotonic: state.state.incremental,
|
|
77254
77906
|
aggregationTemporality,
|
|
@@ -77266,9 +77918,9 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77266
77918
|
};
|
|
77267
77919
|
if (metricDataByName.has(state.id)) metricDataByName.get(state.id).dataPoints.push(dataPoint);
|
|
77268
77920
|
else addMetricData({
|
|
77269
|
-
dataPointType: import_src$
|
|
77921
|
+
dataPointType: import_src$6.DataPointType.GAUGE,
|
|
77270
77922
|
descriptor,
|
|
77271
|
-
aggregationTemporality: import_src$
|
|
77923
|
+
aggregationTemporality: import_src$6.AggregationTemporality.CUMULATIVE,
|
|
77272
77924
|
dataPoints: [dataPoint]
|
|
77273
77925
|
});
|
|
77274
77926
|
break;
|
|
@@ -77325,7 +77977,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77325
77977
|
};
|
|
77326
77978
|
if (metricDataByName.has(state.id)) metricDataByName.get(state.id).dataPoints.push(dataPoint);
|
|
77327
77979
|
else addMetricData({
|
|
77328
|
-
dataPointType: import_src$
|
|
77980
|
+
dataPointType: import_src$6.DataPointType.HISTOGRAM,
|
|
77329
77981
|
descriptor,
|
|
77330
77982
|
aggregationTemporality,
|
|
77331
77983
|
dataPoints: [dataPoint]
|
|
@@ -77362,7 +78014,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77362
78014
|
else {
|
|
77363
78015
|
const descriptor = descriptorFromState(state, attributes);
|
|
77364
78016
|
addMetricData({
|
|
77365
|
-
dataPointType: import_src$
|
|
78017
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77366
78018
|
descriptor,
|
|
77367
78019
|
aggregationTemporality,
|
|
77368
78020
|
isMonotonic: true,
|
|
@@ -77431,7 +78083,7 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77431
78083
|
} else {
|
|
77432
78084
|
const descriptor = descriptorFromState(state, attributes);
|
|
77433
78085
|
addMetricData({
|
|
77434
|
-
dataPointType: import_src$
|
|
78086
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77435
78087
|
descriptor: {
|
|
77436
78088
|
...descriptor,
|
|
77437
78089
|
name: `${descriptor.name}_quantiles`
|
|
@@ -77441,12 +78093,12 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77441
78093
|
dataPoints
|
|
77442
78094
|
});
|
|
77443
78095
|
addMetricData({
|
|
77444
|
-
dataPointType: import_src$
|
|
78096
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77445
78097
|
descriptor: {
|
|
77446
78098
|
name: `${state.id}_count`,
|
|
77447
78099
|
description: state.description ?? "",
|
|
77448
78100
|
unit: "1",
|
|
77449
|
-
type: import_src$
|
|
78101
|
+
type: import_src$6.InstrumentType.COUNTER,
|
|
77450
78102
|
valueType: ValueType.INT,
|
|
77451
78103
|
advice: {}
|
|
77452
78104
|
},
|
|
@@ -77455,12 +78107,12 @@ var MetricProducerImpl = class MetricProducerImpl {
|
|
|
77455
78107
|
dataPoints: [countDataPoint]
|
|
77456
78108
|
});
|
|
77457
78109
|
addMetricData({
|
|
77458
|
-
dataPointType: import_src$
|
|
78110
|
+
dataPointType: import_src$6.DataPointType.SUM,
|
|
77459
78111
|
descriptor: {
|
|
77460
78112
|
name: `${state.id}_sum`,
|
|
77461
78113
|
description: state.description ?? "",
|
|
77462
78114
|
unit: "1",
|
|
77463
|
-
type: import_src$
|
|
78115
|
+
type: import_src$6.InstrumentType.COUNTER,
|
|
77464
78116
|
valueType: ValueType.DOUBLE,
|
|
77465
78117
|
advice: {}
|
|
77466
78118
|
},
|
|
@@ -77509,11 +78161,11 @@ const descriptorFromState = (state, attributes) => {
|
|
|
77509
78161
|
};
|
|
77510
78162
|
const instrumentTypeFromSnapshot = (state) => {
|
|
77511
78163
|
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$
|
|
78164
|
+
case "Histogram": return import_src$6.InstrumentType.HISTOGRAM;
|
|
78165
|
+
case "Gauge": return import_src$6.InstrumentType.OBSERVABLE_GAUGE;
|
|
78166
|
+
case "Frequency": return import_src$6.InstrumentType.COUNTER;
|
|
78167
|
+
case "Counter": return state.state.incremental ? import_src$6.InstrumentType.COUNTER : import_src$6.InstrumentType.UP_DOWN_COUNTER;
|
|
78168
|
+
case "Summary": return import_src$6.InstrumentType.COUNTER;
|
|
77517
78169
|
}
|
|
77518
78170
|
};
|
|
77519
78171
|
const determineValueType = (state) => {
|
|
@@ -77833,7 +78485,7 @@ const populateContext = (context, span, annotations) => span instanceof OtelSpan
|
|
|
77833
78485
|
const layerTracerProvider = (processor, config) => effect(OtelTracerProvider, gen(function* () {
|
|
77834
78486
|
const resource = yield* Resource;
|
|
77835
78487
|
return yield* acquireRelease(sync(() => {
|
|
77836
|
-
return new import_src$
|
|
78488
|
+
return new import_src$5.NodeTracerProvider({
|
|
77837
78489
|
...config ?? void 0,
|
|
77838
78490
|
resource,
|
|
77839
78491
|
spanProcessors: Array.isArray(processor) ? processor : [processor]
|
|
@@ -78022,9 +78674,9 @@ var init_logging_response_handler = __esmMin((() => {
|
|
|
78022
78674
|
function createOtlpExportDelegate(components, settings) {
|
|
78023
78675
|
return new OTLPExportDelegate(components.transport, components.serializer, createLoggingPartialSuccessResponseHandler(), components.promiseHandler, settings.timeout);
|
|
78024
78676
|
}
|
|
78025
|
-
var import_src$
|
|
78677
|
+
var import_src$4, OTLPExportDelegate;
|
|
78026
78678
|
var init_otlp_export_delegate = __esmMin((() => {
|
|
78027
|
-
import_src$
|
|
78679
|
+
import_src$4 = require_src$12();
|
|
78028
78680
|
init_types();
|
|
78029
78681
|
init_logging_response_handler();
|
|
78030
78682
|
init_esm$2();
|
|
@@ -78047,7 +78699,7 @@ var init_otlp_export_delegate = __esmMin((() => {
|
|
|
78047
78699
|
this._diagLogger.debug("items to be sent", internalRepresentation);
|
|
78048
78700
|
if (this._promiseQueue.hasReachedLimit()) {
|
|
78049
78701
|
resultCallback({
|
|
78050
|
-
code: import_src$
|
|
78702
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78051
78703
|
error: /* @__PURE__ */ new Error("Concurrent export limit reached")
|
|
78052
78704
|
});
|
|
78053
78705
|
return;
|
|
@@ -78055,7 +78707,7 @@ var init_otlp_export_delegate = __esmMin((() => {
|
|
|
78055
78707
|
const serializedRequest = this._serializer.serializeRequest(internalRepresentation);
|
|
78056
78708
|
if (serializedRequest == null) {
|
|
78057
78709
|
resultCallback({
|
|
78058
|
-
code: import_src$
|
|
78710
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78059
78711
|
error: /* @__PURE__ */ new Error("Nothing to send")
|
|
78060
78712
|
});
|
|
78061
78713
|
return;
|
|
@@ -78067,24 +78719,24 @@ var init_otlp_export_delegate = __esmMin((() => {
|
|
|
78067
78719
|
} catch (e) {
|
|
78068
78720
|
this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?", e, response.data);
|
|
78069
78721
|
}
|
|
78070
|
-
resultCallback({ code: import_src$
|
|
78722
|
+
resultCallback({ code: import_src$4.ExportResultCode.SUCCESS });
|
|
78071
78723
|
return;
|
|
78072
78724
|
} else if (response.status === "failure" && response.error) {
|
|
78073
78725
|
resultCallback({
|
|
78074
|
-
code: import_src$
|
|
78726
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78075
78727
|
error: response.error
|
|
78076
78728
|
});
|
|
78077
78729
|
return;
|
|
78078
78730
|
} else if (response.status === "retryable") resultCallback({
|
|
78079
|
-
code: import_src$
|
|
78731
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78080
78732
|
error: new OTLPExporterError("Export failed with retryable status")
|
|
78081
78733
|
});
|
|
78082
78734
|
else resultCallback({
|
|
78083
|
-
code: import_src$
|
|
78735
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78084
78736
|
error: new OTLPExporterError("Export failed with unknown error")
|
|
78085
78737
|
});
|
|
78086
78738
|
}, (reason) => resultCallback({
|
|
78087
|
-
code: import_src$
|
|
78739
|
+
code: import_src$4.ExportResultCode.FAILED,
|
|
78088
78740
|
error: reason
|
|
78089
78741
|
})));
|
|
78090
78742
|
}
|
|
@@ -93466,7 +94118,7 @@ var require_hex_to_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
93466
94118
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
93467
94119
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
93468
94120
|
exports.getOtlpEncoder = exports.encodeAsString = exports.encodeAsLongBits = exports.toLongBits = exports.hrTimeToNanos = void 0;
|
|
93469
|
-
const core_1 = require_src$
|
|
94121
|
+
const core_1 = require_src$12();
|
|
93470
94122
|
const hex_to_binary_1 = require_hex_to_binary();
|
|
93471
94123
|
function hrTimeToNanos(hrTime) {
|
|
93472
94124
|
const NANOSECONDS = BigInt(1e9);
|
|
@@ -93739,7 +94391,7 @@ var require_internal$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
93739
94391
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
93740
94392
|
exports.createExportMetricsServiceRequest = exports.toMetric = exports.toScopeMetrics = exports.toResourceMetrics = void 0;
|
|
93741
94393
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
93742
|
-
const sdk_metrics_1 = require_src$
|
|
94394
|
+
const sdk_metrics_1 = require_src$4();
|
|
93743
94395
|
const internal_types_1 = require_internal_types();
|
|
93744
94396
|
const utils_1 = require_utils();
|
|
93745
94397
|
const internal_1 = require_internal$3();
|
|
@@ -94149,7 +94801,7 @@ var require_json = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94149
94801
|
}));
|
|
94150
94802
|
//#endregion
|
|
94151
94803
|
//#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$
|
|
94804
|
+
var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
94153
94805
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94154
94806
|
exports.JsonTraceSerializer = exports.JsonMetricsSerializer = exports.JsonLogsSerializer = exports.ProtobufTraceSerializer = exports.ProtobufMetricsSerializer = exports.ProtobufLogsSerializer = void 0;
|
|
94155
94807
|
var protobuf_1 = require_protobuf$2();
|
|
@@ -94509,7 +95161,7 @@ var init_otlp_http_export_delegate = __esmMin((() => {
|
|
|
94509
95161
|
//#endregion
|
|
94510
95162
|
//#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
95163
|
function parseAndValidateTimeoutFromEnv(timeoutEnvVar) {
|
|
94512
|
-
const envTimeout = (0, import_src$
|
|
95164
|
+
const envTimeout = (0, import_src$3.getNumberFromEnv)(timeoutEnvVar);
|
|
94513
95165
|
if (envTimeout != null) {
|
|
94514
95166
|
if (Number.isFinite(envTimeout) && envTimeout > 0) return envTimeout;
|
|
94515
95167
|
diag.warn(`Configuration: ${timeoutEnvVar} is invalid, expected number greater than 0 (actual: ${envTimeout})`);
|
|
@@ -94521,7 +95173,7 @@ function getTimeoutFromEnv(signalIdentifier) {
|
|
|
94521
95173
|
return specificTimeout ?? nonSpecificTimeout;
|
|
94522
95174
|
}
|
|
94523
95175
|
function parseAndValidateCompressionFromEnv(compressionEnvVar) {
|
|
94524
|
-
const compression = (0, import_src$
|
|
95176
|
+
const compression = (0, import_src$3.getStringFromEnv)(compressionEnvVar)?.trim();
|
|
94525
95177
|
if (compression == null || compression === "none" || compression === "gzip") return compression;
|
|
94526
95178
|
diag.warn(`Configuration: ${compressionEnvVar} is invalid, expected 'none' or 'gzip' (actual: '${compression}')`);
|
|
94527
95179
|
}
|
|
@@ -94536,20 +95188,20 @@ function getSharedConfigurationFromEnvironment(signalIdentifier) {
|
|
|
94536
95188
|
compression: getCompressionFromEnv(signalIdentifier)
|
|
94537
95189
|
};
|
|
94538
95190
|
}
|
|
94539
|
-
var import_src$
|
|
95191
|
+
var import_src$3;
|
|
94540
95192
|
var init_shared_env_configuration = __esmMin((() => {
|
|
94541
|
-
import_src$
|
|
95193
|
+
import_src$3 = require_src$12();
|
|
94542
95194
|
init_esm$2();
|
|
94543
95195
|
}));
|
|
94544
95196
|
//#endregion
|
|
94545
95197
|
//#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
95198
|
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$
|
|
95199
|
+
const signalSpecificRawHeaders = (0, import_src$2.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${signalIdentifier}_HEADERS`);
|
|
95200
|
+
const nonSignalSpecificRawHeaders = (0, import_src$2.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS");
|
|
95201
|
+
const signalSpecificHeaders = (0, import_src$2.parseKeyPairsIntoRecord)(signalSpecificRawHeaders);
|
|
95202
|
+
const nonSignalSpecificHeaders = (0, import_src$2.parseKeyPairsIntoRecord)(nonSignalSpecificRawHeaders);
|
|
94551
95203
|
if (Object.keys(signalSpecificHeaders).length === 0 && Object.keys(nonSignalSpecificHeaders).length === 0) return;
|
|
94552
|
-
return Object.assign({}, (0, import_src$
|
|
95204
|
+
return Object.assign({}, (0, import_src$2.parseKeyPairsIntoRecord)(nonSignalSpecificRawHeaders), (0, import_src$2.parseKeyPairsIntoRecord)(signalSpecificRawHeaders));
|
|
94553
95205
|
}
|
|
94554
95206
|
function appendRootPathToUrlIfNeeded(url) {
|
|
94555
95207
|
try {
|
|
@@ -94577,18 +95229,18 @@ function appendResourcePathToUrl(url, path) {
|
|
|
94577
95229
|
return url;
|
|
94578
95230
|
}
|
|
94579
95231
|
function getNonSpecificUrlFromEnv(signalResourcePath) {
|
|
94580
|
-
const envUrl = (0, import_src$
|
|
95232
|
+
const envUrl = (0, import_src$2.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");
|
|
94581
95233
|
if (envUrl === void 0) return;
|
|
94582
95234
|
return appendResourcePathToUrl(envUrl, signalResourcePath);
|
|
94583
95235
|
}
|
|
94584
95236
|
function getSpecificUrlFromEnv(signalIdentifier) {
|
|
94585
|
-
const envUrl = (0, import_src$
|
|
95237
|
+
const envUrl = (0, import_src$2.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${signalIdentifier}_ENDPOINT`);
|
|
94586
95238
|
if (envUrl === void 0) return;
|
|
94587
95239
|
return appendRootPathToUrlIfNeeded(envUrl);
|
|
94588
95240
|
}
|
|
94589
95241
|
function readFileFromEnv(signalSpecificEnvVar, nonSignalSpecificEnvVar, warningMessage) {
|
|
94590
|
-
const signalSpecificPath = (0, import_src$
|
|
94591
|
-
const nonSignalSpecificPath = (0, import_src$
|
|
95242
|
+
const signalSpecificPath = (0, import_src$2.getStringFromEnv)(signalSpecificEnvVar);
|
|
95243
|
+
const nonSignalSpecificPath = (0, import_src$2.getStringFromEnv)(nonSignalSpecificEnvVar);
|
|
94592
95244
|
const filePath = signalSpecificPath ?? nonSignalSpecificPath;
|
|
94593
95245
|
if (filePath != null) try {
|
|
94594
95246
|
return fs.readFileSync(path$1.resolve(process.cwd(), filePath));
|
|
@@ -94626,9 +95278,9 @@ function getNodeHttpConfigurationFromEnvironment(signalIdentifier, signalResourc
|
|
|
94626
95278
|
})
|
|
94627
95279
|
};
|
|
94628
95280
|
}
|
|
94629
|
-
var import_src$
|
|
95281
|
+
var import_src$2;
|
|
94630
95282
|
var init_otlp_node_http_env_configuration = __esmMin((() => {
|
|
94631
|
-
import_src$
|
|
95283
|
+
import_src$2 = require_src$12();
|
|
94632
95284
|
init_esm$2();
|
|
94633
95285
|
init_shared_env_configuration();
|
|
94634
95286
|
init_shared_configuration();
|
|
@@ -94701,7 +95353,7 @@ var require_OTLPTraceExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94701
95353
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94702
95354
|
exports.OTLPTraceExporter = void 0;
|
|
94703
95355
|
const otlp_exporter_base_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
94704
|
-
const otlp_transformer_1 = require_src$
|
|
95356
|
+
const otlp_transformer_1 = require_src$3();
|
|
94705
95357
|
const node_http_1 = (init_index_node_http(), __toCommonJS(index_node_http_exports));
|
|
94706
95358
|
/**
|
|
94707
95359
|
* Collector Trace Exporter for Node
|
|
@@ -94715,7 +95367,7 @@ var require_OTLPTraceExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94715
95367
|
}));
|
|
94716
95368
|
//#endregion
|
|
94717
95369
|
//#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$
|
|
95370
|
+
var require_node$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
94719
95371
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94720
95372
|
exports.OTLPTraceExporter = void 0;
|
|
94721
95373
|
var OTLPTraceExporter_1 = require_OTLPTraceExporter();
|
|
@@ -94728,10 +95380,10 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94728
95380
|
}));
|
|
94729
95381
|
//#endregion
|
|
94730
95382
|
//#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$
|
|
95383
|
+
var require_platform$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
94732
95384
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94733
95385
|
exports.OTLPTraceExporter = void 0;
|
|
94734
|
-
var node_1 = require_node$
|
|
95386
|
+
var node_1 = require_node$2();
|
|
94735
95387
|
Object.defineProperty(exports, "OTLPTraceExporter", {
|
|
94736
95388
|
enumerable: true,
|
|
94737
95389
|
get: function() {
|
|
@@ -94741,10 +95393,10 @@ var require_platform$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94741
95393
|
}));
|
|
94742
95394
|
//#endregion
|
|
94743
95395
|
//#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$
|
|
95396
|
+
var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
94745
95397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94746
95398
|
exports.OTLPTraceExporter = void 0;
|
|
94747
|
-
var platform_1 = require_platform$
|
|
95399
|
+
var platform_1 = require_platform$2();
|
|
94748
95400
|
Object.defineProperty(exports, "OTLPTraceExporter", {
|
|
94749
95401
|
enumerable: true,
|
|
94750
95402
|
get: function() {
|
|
@@ -94814,7 +95466,7 @@ var require_Span = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
94814
95466
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94815
95467
|
exports.SpanImpl = void 0;
|
|
94816
95468
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
94817
|
-
const core_1 = require_src$
|
|
95469
|
+
const core_1 = require_src$6();
|
|
94818
95470
|
const semantic_conventions_1 = (init_esm$1(), __toCommonJS(esm_exports$1));
|
|
94819
95471
|
const enums_1 = require_enums();
|
|
94820
95472
|
const inspect_1 = require_inspect();
|
|
@@ -95315,7 +95967,7 @@ var require_Tracer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95315
95967
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95316
95968
|
exports.Tracer = void 0;
|
|
95317
95969
|
const api = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
95318
|
-
const core_1 = require_src$
|
|
95970
|
+
const core_1 = require_src$6();
|
|
95319
95971
|
const Span_1 = require_Span();
|
|
95320
95972
|
const TracerMetrics_1 = require_TracerMetrics();
|
|
95321
95973
|
const version_1 = require_version();
|
|
@@ -95440,7 +96092,7 @@ var require_Tracer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95440
96092
|
var require_MultiSpanProcessor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
95441
96093
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95442
96094
|
exports.MultiSpanProcessor = void 0;
|
|
95443
|
-
const core_1 = require_src$
|
|
96095
|
+
const core_1 = require_src$6();
|
|
95444
96096
|
/**
|
|
95445
96097
|
* Implementation of the {@link SpanProcessor} that simply forwards all
|
|
95446
96098
|
* received events to a list of {@link SpanProcessor}s.
|
|
@@ -95523,7 +96175,7 @@ var require_ParentBasedSampler = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95523
96175
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95524
96176
|
exports.ParentBasedSampler = void 0;
|
|
95525
96177
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
95526
|
-
const core_1 = require_src$
|
|
96178
|
+
const core_1 = require_src$6();
|
|
95527
96179
|
const AlwaysOffSampler_1 = require_AlwaysOffSampler();
|
|
95528
96180
|
const AlwaysOnSampler_1 = require_AlwaysOnSampler();
|
|
95529
96181
|
/**
|
|
@@ -95632,7 +96284,7 @@ var require_BatchSpanProcessorBase = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
95632
96284
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95633
96285
|
exports.BatchSpanProcessorBase = void 0;
|
|
95634
96286
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
95635
|
-
const core_1 = require_src$
|
|
96287
|
+
const core_1 = require_src$6();
|
|
95636
96288
|
const SpanProcessorMetrics_1 = require_SpanProcessorMetrics();
|
|
95637
96289
|
const semconv_1 = require_semconv();
|
|
95638
96290
|
/**
|
|
@@ -95828,7 +96480,7 @@ var require_RandomIdGenerator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95828
96480
|
}));
|
|
95829
96481
|
//#endregion
|
|
95830
96482
|
//#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) => {
|
|
96483
|
+
var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
95832
96484
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95833
96485
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;
|
|
95834
96486
|
var BatchSpanProcessor_1 = require_BatchSpanProcessor();
|
|
@@ -95848,10 +96500,10 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95848
96500
|
}));
|
|
95849
96501
|
//#endregion
|
|
95850
96502
|
//#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) => {
|
|
96503
|
+
var require_platform$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
95852
96504
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95853
96505
|
exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;
|
|
95854
|
-
var node_1 = require_node();
|
|
96506
|
+
var node_1 = require_node$1();
|
|
95855
96507
|
Object.defineProperty(exports, "BatchSpanProcessor", {
|
|
95856
96508
|
enumerable: true,
|
|
95857
96509
|
get: function() {
|
|
@@ -95871,12 +96523,12 @@ var require_TracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95871
96523
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95872
96524
|
exports.TracerProvider = void 0;
|
|
95873
96525
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
95874
|
-
const resources_1 = require_src$
|
|
96526
|
+
const resources_1 = require_src$5();
|
|
95875
96527
|
const Tracer_1 = require_Tracer();
|
|
95876
96528
|
const MultiSpanProcessor_1 = require_MultiSpanProcessor();
|
|
95877
96529
|
const ParentBasedSampler_1 = require_ParentBasedSampler();
|
|
95878
96530
|
const AlwaysOnSampler_1 = require_AlwaysOnSampler();
|
|
95879
|
-
const platform_1 = require_platform();
|
|
96531
|
+
const platform_1 = require_platform$1();
|
|
95880
96532
|
const inspect_1 = require_inspect();
|
|
95881
96533
|
var ForceFlushState;
|
|
95882
96534
|
(function(ForceFlushState) {
|
|
@@ -95976,7 +96628,7 @@ var require_TracerProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
95976
96628
|
var require_ConsoleSpanExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
95977
96629
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95978
96630
|
exports.ConsoleSpanExporter = void 0;
|
|
95979
|
-
const core_1 = require_src$
|
|
96631
|
+
const core_1 = require_src$6();
|
|
95980
96632
|
/**
|
|
95981
96633
|
* This is implementation of {@link SpanExporter} that prints spans to the
|
|
95982
96634
|
* console. This class can be used for diagnostic purposes.
|
|
@@ -96044,7 +96696,7 @@ var require_ConsoleSpanExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96044
96696
|
var require_InMemorySpanExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96045
96697
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96046
96698
|
exports.InMemorySpanExporter = void 0;
|
|
96047
|
-
const core_1 = require_src$
|
|
96699
|
+
const core_1 = require_src$6();
|
|
96048
96700
|
/**
|
|
96049
96701
|
* This class can be used for testing purposes. It stores the exported spans
|
|
96050
96702
|
* in a list in memory that can be retrieved using the `getFinishedSpans()`
|
|
@@ -96091,7 +96743,7 @@ var require_SimpleSpanProcessor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96091
96743
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96092
96744
|
exports.SimpleSpanProcessor = void 0;
|
|
96093
96745
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
96094
|
-
const core_1 = require_src$
|
|
96746
|
+
const core_1 = require_src$6();
|
|
96095
96747
|
const SpanProcessorMetrics_1 = require_SpanProcessorMetrics();
|
|
96096
96748
|
const semconv_1 = require_semconv();
|
|
96097
96749
|
/**
|
|
@@ -96245,7 +96897,7 @@ var require_TraceIdRatioBasedSampler = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
96245
96897
|
}));
|
|
96246
96898
|
//#endregion
|
|
96247
96899
|
//#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) => {
|
|
96900
|
+
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96249
96901
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96250
96902
|
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
96903
|
var TracerProvider_1 = require_TracerProvider();
|
|
@@ -96255,7 +96907,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96255
96907
|
return TracerProvider_1.TracerProvider;
|
|
96256
96908
|
}
|
|
96257
96909
|
});
|
|
96258
|
-
var platform_1 = require_platform();
|
|
96910
|
+
var platform_1 = require_platform$1();
|
|
96259
96911
|
Object.defineProperty(exports, "BatchSpanProcessor", {
|
|
96260
96912
|
enumerable: true,
|
|
96261
96913
|
get: function() {
|
|
@@ -96345,8 +96997,8 @@ var require_config = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96345
96997
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96346
96998
|
exports.buildSamplerFromEnv = exports.loadDefaultConfig = void 0;
|
|
96347
96999
|
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
96348
|
-
const core_1 = require_src$
|
|
96349
|
-
const sdk_trace_1 = require_src();
|
|
97000
|
+
const core_1 = require_src$6();
|
|
97001
|
+
const sdk_trace_1 = require_src$1();
|
|
96350
97002
|
var TracesSamplerValues;
|
|
96351
97003
|
(function(TracesSamplerValues) {
|
|
96352
97004
|
TracesSamplerValues["AlwaysOff"] = "always_off";
|
|
@@ -96418,7 +97070,7 @@ var require_config = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96418
97070
|
var require_utility = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96419
97071
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96420
97072
|
exports.reconfigureLimits = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = void 0;
|
|
96421
|
-
const core_1 = require_src$
|
|
97073
|
+
const core_1 = require_src$6();
|
|
96422
97074
|
exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
|
|
96423
97075
|
exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
|
|
96424
97076
|
/**
|
|
@@ -96445,10 +97097,10 @@ var require_utility = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96445
97097
|
var require_BasicTracerProvider_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96446
97098
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96447
97099
|
exports.BasicTracerProvider = void 0;
|
|
96448
|
-
const core_1 = require_src$
|
|
97100
|
+
const core_1 = require_src$6();
|
|
96449
97101
|
const config_1 = require_config();
|
|
96450
97102
|
const utility_1 = require_utility();
|
|
96451
|
-
const sdk_trace_1 = require_src();
|
|
97103
|
+
const sdk_trace_1 = require_src$1();
|
|
96452
97104
|
/**
|
|
96453
97105
|
* A TracerProvider implementation that reads configuration defaults from
|
|
96454
97106
|
* OTEL_* environment variables per
|
|
@@ -96468,8 +97120,8 @@ var require_BasicTracerProvider_shim = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
96468
97120
|
var require_BatchSpanProcessor_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96469
97121
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96470
97122
|
exports.BatchSpanProcessor = void 0;
|
|
96471
|
-
const core_1 = require_src$
|
|
96472
|
-
const sdk_trace_1 = require_src();
|
|
97123
|
+
const core_1 = require_src$6();
|
|
97124
|
+
const sdk_trace_1 = require_src$1();
|
|
96473
97125
|
/**
|
|
96474
97126
|
* A BatchSpanProcessor that applies `OTEL_*` environment variable fallbacks per
|
|
96475
97127
|
* https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
|
|
@@ -96499,7 +97151,7 @@ var require_BatchSpanProcessor_shim = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
96499
97151
|
var require_SimpleSpanProcessor_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
96500
97152
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96501
97153
|
exports.SimpleSpanProcessor = void 0;
|
|
96502
|
-
const sdk_trace_1 = require_src();
|
|
97154
|
+
const sdk_trace_1 = require_src$1();
|
|
96503
97155
|
/**
|
|
96504
97156
|
* A SimpleSpanProcessor with the old constructor call signature that
|
|
96505
97157
|
* takes just a single exporter argument. This version does not support
|
|
@@ -96538,7 +97190,7 @@ var require_index_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96538
97190
|
return SimpleSpanProcessor_shim_1.SimpleSpanProcessor;
|
|
96539
97191
|
}
|
|
96540
97192
|
});
|
|
96541
|
-
var sdk_trace_1 = require_src();
|
|
97193
|
+
var sdk_trace_1 = require_src$1();
|
|
96542
97194
|
Object.defineProperty(exports, "ConsoleSpanExporter", {
|
|
96543
97195
|
enumerable: true,
|
|
96544
97196
|
get: function() {
|
|
@@ -96597,10 +97249,10 @@ var require_index_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
96597
97249
|
//#endregion
|
|
96598
97250
|
//#region ../stryker-js-plugin-runtime/dist/index.mjs
|
|
96599
97251
|
init_esm$2();
|
|
96600
|
-
var import_src = require_src$
|
|
97252
|
+
var import_src$1 = require_src$2();
|
|
96601
97253
|
var import_index_shim = require_index_shim();
|
|
96602
97254
|
const CURRENT_VERSION = "00";
|
|
96603
|
-
const serializedTraceState = (traceState) => filter$
|
|
97255
|
+
const serializedTraceState = (traceState) => filter$3(map$12(fromUndefinedOr(traceState), (state) => state.serialize()), (serialized) => serialized.length > 0);
|
|
96604
97256
|
const traceStateField = (traceState) => match$6(serializedTraceState(traceState), {
|
|
96605
97257
|
onNone: () => ({}),
|
|
96606
97258
|
onSome: (serialized) => ({ traceState: serialized })
|
|
@@ -96686,7 +97338,7 @@ const tracesUrl = (endpoint) => {
|
|
|
96686
97338
|
};
|
|
96687
97339
|
const otlpLayer = (serviceName, endpoint) => layer$1(() => ({
|
|
96688
97340
|
resource: { serviceName },
|
|
96689
|
-
spanProcessor: new import_index_shim.SimpleSpanProcessor(new import_src.OTLPTraceExporter({ url: tracesUrl(endpoint) }))
|
|
97341
|
+
spanProcessor: new import_index_shim.SimpleSpanProcessor(new import_src$1.OTLPTraceExporter({ url: tracesUrl(endpoint) }))
|
|
96690
97342
|
}));
|
|
96691
97343
|
unwrap$4(gen(function* () {
|
|
96692
97344
|
if (!(yield* boolean$3("OTEL_ENABLED").pipe(withDefault$2(false)))) return empty$7;
|
|
@@ -97309,12 +97961,12 @@ const collectUnserializables = (groups) => {
|
|
|
97309
97961
|
const describeUnserializableArray = (value) => collectUnserializables(value.map((child, index) => describeUnserializableChild(child, index.toString())));
|
|
97310
97962
|
const describeUnserializableRecord = (value) => collectUnserializables(Object.entries(value).map(([key, child]) => describeUnserializableChild(child, key)));
|
|
97311
97963
|
const isPlainObjectValue = (value) => !Array.isArray(value) && value.constructor === Object;
|
|
97312
|
-
const classNameOf = (value$
|
|
97964
|
+
const classNameOf = (value$9) => value(value$9.constructor).pipe(when(defined, (ctor) => ctor.name), orElse(() => "Object"));
|
|
97313
97965
|
const describeUnserializableInstance = (value) => [{
|
|
97314
97966
|
path: [],
|
|
97315
97967
|
reason: `Value is an instance of "${classNameOf(value)}", this detail will get lost in translation during serialization`
|
|
97316
97968
|
}];
|
|
97317
|
-
const describeUnserializableObject = (value$
|
|
97969
|
+
const describeUnserializableObject = (value$10) => value(value$10).pipe(when(isArrayValue, describeUnserializableArray), when(isPlainObjectValue, describeUnserializableRecord), orElse(describeUnserializableInstance));
|
|
97318
97970
|
const NON_JSON_PRIMITIVE_TYPES = [
|
|
97319
97971
|
"bigint",
|
|
97320
97972
|
"function",
|
|
@@ -97719,7 +98371,7 @@ function findConfigFile(configFileName) {
|
|
|
97719
98371
|
return value(configFileName).pipe(when(string$5, (fileName) => configFileFor(fileName)), orElse(() => discoverConfigFile()));
|
|
97720
98372
|
}
|
|
97721
98373
|
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$
|
|
98374
|
+
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
98375
|
function loadOptionsFromConfigFile(cliOptions, configEnv) {
|
|
97724
98376
|
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
98377
|
}
|
|
@@ -98529,7 +99181,7 @@ function createPureMatcher(pattern, allowHiddenFiles, basePath) {
|
|
|
98529
99181
|
return value(isExcludedHiddenFile(normalizedFile, base, allowHiddenFiles, patternHasDot)).pipe(when(true, () => false), orElse(() => regex.test(normalizedFile)));
|
|
98530
99182
|
};
|
|
98531
99183
|
}
|
|
98532
|
-
const rangeListOf = (mutate) => filter$
|
|
99184
|
+
const rangeListOf = (mutate) => filter$3(fromUndefinedOr(mutate), Array.isArray);
|
|
98533
99185
|
function unionPair(first, second) {
|
|
98534
99186
|
const ranges = all$2([rangeListOf(first.mutate), rangeListOf(second.mutate)]);
|
|
98535
99187
|
return match$6(ranges, {
|
|
@@ -98745,7 +99397,7 @@ function readOriginal(file) {
|
|
|
98745
99397
|
});
|
|
98746
99398
|
}
|
|
98747
99399
|
function writeInPlace(file) {
|
|
98748
|
-
const content = filter$
|
|
99400
|
+
const content = filter$3(fromUndefinedOr(file.content), () => hasChanges(file));
|
|
98749
99401
|
return match$6(content, {
|
|
98750
99402
|
onNone: () => void_$1,
|
|
98751
99403
|
onSome: (text) => gen(function* () {
|
|
@@ -99657,6 +100309,29 @@ const admitMutationTest = Workflow_exports.make(MutationTestCommand, (command) =
|
|
|
99657
100309
|
allowEmpty: true
|
|
99658
100310
|
}, () => succeed$8(MutationTestNoTests.make({}))), orElse(() => succeed$8(MutationTestProceed.make({})))));
|
|
99659
100311
|
//#endregion
|
|
100312
|
+
//#region src/checker-mutant-wire.ts
|
|
100313
|
+
const CheckerMutantFromMutant = Mutant.pipe(decodeTo(CheckerMutantWire, transform$2({
|
|
100314
|
+
decode: (m) => ({
|
|
100315
|
+
id: m.id,
|
|
100316
|
+
fileName: m.fileName,
|
|
100317
|
+
mutatorName: m.mutatorName,
|
|
100318
|
+
replacement: m.replacement,
|
|
100319
|
+
location: m.location
|
|
100320
|
+
}),
|
|
100321
|
+
encode: (w) => Mutant.make({
|
|
100322
|
+
id: w.id,
|
|
100323
|
+
fileName: w.fileName,
|
|
100324
|
+
mutatorName: w.mutatorName,
|
|
100325
|
+
replacement: w.replacement,
|
|
100326
|
+
location: w.location
|
|
100327
|
+
})
|
|
100328
|
+
})));
|
|
100329
|
+
const wireRecordOf = (mutant) => mapError$2(decodeUnknownResult(CheckerMutantFromMutant)(mutant), (error) => ({
|
|
100330
|
+
id: mutant.id,
|
|
100331
|
+
fileName: mutant.fileName,
|
|
100332
|
+
reason: error.message
|
|
100333
|
+
}));
|
|
100334
|
+
//#endregion
|
|
99660
100335
|
//#region src/admit-checker-answer.workflow.ts
|
|
99661
100336
|
var CheckerAnsweredUnrequested = class extends TaggedError()("CheckerAnsweredUnrequested", {
|
|
99662
100337
|
checkerName: String$1,
|
|
@@ -99724,6 +100399,19 @@ const evaluateCheckResult = (command) => {
|
|
|
99724
100399
|
};
|
|
99725
100400
|
const admitCheckerAnswer = Workflow_exports.make(CheckerCommand, (command) => value(command.phase).pipe(when("group", () => evaluateGroup(command)), when("check", () => evaluateCheckResult(command)), exhaustive));
|
|
99726
100401
|
//#endregion
|
|
100402
|
+
//#region src/metrics.ts
|
|
100403
|
+
const checkerDuration = timer("stryker.checker.duration", { description: "Checker worker RPC duration in milliseconds" });
|
|
100404
|
+
const checkerMutantsChecked = counter("stryker.checker.mutants.checked", { description: "Total number of mutants a checker worker answered for" });
|
|
100405
|
+
const checkerMutantsSkipped = counter("stryker.checker.mutants.skipped", { description: "Total number of mutants dropped because they cannot be described to a checker" });
|
|
100406
|
+
const checkerRpcFailures = counter("stryker.checker.rpc_failures", {
|
|
100407
|
+
description: "Checker worker RPC calls that did not complete, excluding interruptions",
|
|
100408
|
+
incremental: true
|
|
100409
|
+
});
|
|
100410
|
+
const checkerProcessCrashes = counter("stryker.checker.process_crashes", {
|
|
100411
|
+
description: "Checker worker processes that never became usable",
|
|
100412
|
+
incremental: true
|
|
100413
|
+
});
|
|
100414
|
+
//#endregion
|
|
99727
100415
|
//#region src/Checker.ts
|
|
99728
100416
|
/**
|
|
99729
100417
|
* Checker — the Checker capability.
|
|
@@ -99839,16 +100527,20 @@ const makeCheckerChildProcess = (params) => gen(function* () {
|
|
|
99839
100527
|
execArgv: [...params.execArgv],
|
|
99840
100528
|
optionsJson,
|
|
99841
100529
|
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)));
|
|
100530
|
+
}).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)));
|
|
100531
|
+
const recordCheckerCall = (spanName, checkerName, mutants, call) => call.pipe(withSpan(spanName, { attributes: {
|
|
100532
|
+
"stryker.checker.name": checkerName,
|
|
100533
|
+
"stryker.mutants.count": mutants.length
|
|
100534
|
+
} }), 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
100535
|
return {
|
|
99844
|
-
check: (checkerName, mutants) => client.check({
|
|
100536
|
+
check: (checkerName, mutants) => recordCheckerCall("stryker.checker.check", checkerName, mutants, client.check({
|
|
99845
100537
|
checkerName,
|
|
99846
100538
|
mutants: [...mutants]
|
|
99847
|
-
})
|
|
99848
|
-
group: (checkerName, mutants) => client.group({
|
|
100539
|
+
})),
|
|
100540
|
+
group: (checkerName, mutants) => recordCheckerCall("stryker.checker.group", checkerName, mutants, client.group({
|
|
99849
100541
|
checkerName,
|
|
99850
100542
|
mutants: [...mutants]
|
|
99851
|
-
})
|
|
100543
|
+
}))
|
|
99852
100544
|
};
|
|
99853
100545
|
});
|
|
99854
100546
|
const createCheckerFactory = (options, fileDescriptions, workerEntrypoint, idGenerator, workingDirectory) => makeCheckerChildProcess({
|
|
@@ -99879,6 +100571,69 @@ const writeGroupOutcome = (plans, checkerName, outcome) => match$5(outcome, {
|
|
|
99879
100571
|
onFailure: (error) => fail(error),
|
|
99880
100572
|
onSuccess: (decision) => writeGroupDecision(plans, checkerName, decision)
|
|
99881
100573
|
});
|
|
100574
|
+
const partitionMutantsForWire = (plans) => {
|
|
100575
|
+
const wire = [];
|
|
100576
|
+
const undescribable = [];
|
|
100577
|
+
plans.forEach((plan) => match$5(wireRecordOf(plan.mutant), {
|
|
100578
|
+
onSuccess: (wireMutant) => {
|
|
100579
|
+
wire.push(wireMutant);
|
|
100580
|
+
},
|
|
100581
|
+
onFailure: (refused) => {
|
|
100582
|
+
undescribable.push(refused);
|
|
100583
|
+
}
|
|
100584
|
+
}));
|
|
100585
|
+
return {
|
|
100586
|
+
wire,
|
|
100587
|
+
undescribable
|
|
100588
|
+
};
|
|
100589
|
+
};
|
|
100590
|
+
const compileErrorAnswersOf = (undescribable) => Object.fromEntries(undescribable.map((mutant) => [mutant.id, {
|
|
100591
|
+
status: "compileError",
|
|
100592
|
+
reason: mutant.reason
|
|
100593
|
+
}]));
|
|
100594
|
+
const singletonGroupsOf = (undescribable) => undescribable.map((mutant) => [mutant.id]);
|
|
100595
|
+
const undescribableIdsOf = (undescribable) => new Set(undescribable.map((mutant) => mutant.id));
|
|
100596
|
+
const lookupOf = (partitioned) => ({
|
|
100597
|
+
wireById: new Map(partitioned.wire.map((mutant) => [mutant.id, mutant])),
|
|
100598
|
+
undescribableById: new Map(partitioned.undescribable.map((mutant) => [mutant.id, mutant]))
|
|
100599
|
+
});
|
|
100600
|
+
const selectedFromLookup = (plans, lookup) => {
|
|
100601
|
+
const wire = [];
|
|
100602
|
+
const undescribable = [];
|
|
100603
|
+
plans.forEach((plan) => {
|
|
100604
|
+
match$6(fromUndefinedOr(lookup.wireById.get(plan.mutant.id)), {
|
|
100605
|
+
onSome: (wired) => {
|
|
100606
|
+
wire.push(wired);
|
|
100607
|
+
},
|
|
100608
|
+
onNone: () => match$6(fromUndefinedOr(lookup.undescribableById.get(plan.mutant.id)), {
|
|
100609
|
+
onSome: (refused) => {
|
|
100610
|
+
undescribable.push(refused);
|
|
100611
|
+
},
|
|
100612
|
+
onNone: () => {
|
|
100613
|
+
match$5(wireRecordOf(plan.mutant), {
|
|
100614
|
+
onSuccess: (wired) => {
|
|
100615
|
+
wire.push(wired);
|
|
100616
|
+
},
|
|
100617
|
+
onFailure: (refused) => {
|
|
100618
|
+
undescribable.push(refused);
|
|
100619
|
+
}
|
|
100620
|
+
});
|
|
100621
|
+
}
|
|
100622
|
+
})
|
|
100623
|
+
});
|
|
100624
|
+
});
|
|
100625
|
+
return {
|
|
100626
|
+
wire,
|
|
100627
|
+
undescribable
|
|
100628
|
+
};
|
|
100629
|
+
};
|
|
100630
|
+
const SKIPPED_IDS_IN_WARNING = 5;
|
|
100631
|
+
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), {
|
|
100632
|
+
onNone: () => "",
|
|
100633
|
+
onSome: (count) => `, +${count - SKIPPED_IDS_IN_WARNING} more`
|
|
100634
|
+
})}`;
|
|
100635
|
+
const refusalReasonsOf = (undescribable) => [...new Set(undescribable.map((mutant) => mutant.reason))].join("; ");
|
|
100636
|
+
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
100637
|
/**
|
|
99883
100638
|
* Ask a checker about run plans and get run plans back.
|
|
99884
100639
|
*
|
|
@@ -99887,13 +100642,26 @@ const writeGroupOutcome = (plans, checkerName, outcome) => match$5(outcome, {
|
|
|
99887
100642
|
* project the plans down, call the checker, and hand the answers to the pure decision
|
|
99888
100643
|
* that joins them back. The join is where the work is, and it is pure.
|
|
99889
100644
|
*/
|
|
99890
|
-
const checkPlans = (checker, checkerName, plans) => {
|
|
100645
|
+
const checkPlans = (checker, checkerName, plans, lookup) => {
|
|
99891
100646
|
return Cell_exports.layer({
|
|
99892
|
-
read: (command) =>
|
|
99893
|
-
|
|
99894
|
-
|
|
99895
|
-
|
|
99896
|
-
|
|
100647
|
+
read: (command) => gen(function* () {
|
|
100648
|
+
const partitioned = match$6(fromUndefinedOr(command.lookup), {
|
|
100649
|
+
onSome: (known) => selectedFromLookup(command.plans, known),
|
|
100650
|
+
onNone: () => partitionMutantsForWire(command.plans)
|
|
100651
|
+
});
|
|
100652
|
+
yield* logSkippedMutants(command.checkerName, partitioned.undescribable);
|
|
100653
|
+
if (partitioned.undescribable.length > 0) yield* update(checkerMutantsSkipped, partitioned.undescribable.length);
|
|
100654
|
+
yield* annotateCurrentSpan({ "stryker.checker.skipped_mutants_count": partitioned.undescribable.length });
|
|
100655
|
+
const answers = yield* command.checker.check(command.checkerName, partitioned.wire);
|
|
100656
|
+
return {
|
|
100657
|
+
checkerName: command.checkerName,
|
|
100658
|
+
requestedIds: command.plans.map((plan) => plan.mutant.id),
|
|
100659
|
+
answers: {
|
|
100660
|
+
...compileErrorAnswersOf(partitioned.undescribable),
|
|
100661
|
+
...answers
|
|
100662
|
+
}
|
|
100663
|
+
};
|
|
100664
|
+
}),
|
|
99897
100665
|
decode: (raw) => succeed$8(CheckerCommand.make({
|
|
99898
100666
|
checkerName: raw.checkerName,
|
|
99899
100667
|
requestedIds: [...raw.requestedIds],
|
|
@@ -99906,19 +100674,29 @@ const checkPlans = (checker, checkerName, plans) => {
|
|
|
99906
100674
|
}).run({
|
|
99907
100675
|
checker,
|
|
99908
100676
|
checkerName,
|
|
99909
|
-
plans
|
|
100677
|
+
plans,
|
|
100678
|
+
lookup
|
|
99910
100679
|
});
|
|
99911
100680
|
};
|
|
99912
100681
|
/**
|
|
99913
100682
|
* Ask a checker how to group run plans, and get groups of run plans back.
|
|
99914
100683
|
*/
|
|
99915
|
-
const groupPlans = (checker, checkerName, plans) => {
|
|
100684
|
+
const groupPlans = (checker, checkerName, plans, lookup) => {
|
|
99916
100685
|
return Cell_exports.layer({
|
|
99917
|
-
read: (command) =>
|
|
99918
|
-
|
|
99919
|
-
|
|
99920
|
-
|
|
99921
|
-
|
|
100686
|
+
read: (command) => gen(function* () {
|
|
100687
|
+
const partitioned = match$6(fromUndefinedOr(command.lookup), {
|
|
100688
|
+
onSome: (known) => selectedFromLookup(command.plans, known),
|
|
100689
|
+
onNone: () => partitionMutantsForWire(command.plans)
|
|
100690
|
+
});
|
|
100691
|
+
yield* annotateCurrentSpan({ "stryker.checker.skipped_mutants_count": partitioned.undescribable.length });
|
|
100692
|
+
const undescribableIds = undescribableIdsOf(partitioned.undescribable);
|
|
100693
|
+
const withoutSkipped = (yield* command.checker.group(command.checkerName, partitioned.wire)).map((group) => group.filter((id) => !undescribableIds.has(id))).filter((group) => group.length > 0);
|
|
100694
|
+
return {
|
|
100695
|
+
checkerName: command.checkerName,
|
|
100696
|
+
requestedIds: command.plans.map((plan) => plan.mutant.id),
|
|
100697
|
+
idGroups: [...singletonGroupsOf(partitioned.undescribable), ...withoutSkipped]
|
|
100698
|
+
};
|
|
100699
|
+
}),
|
|
99922
100700
|
decode: (raw) => succeed$8(CheckerCommand.make({
|
|
99923
100701
|
checkerName: raw.checkerName,
|
|
99924
100702
|
requestedIds: [...raw.requestedIds],
|
|
@@ -99931,46 +100709,15 @@ const groupPlans = (checker, checkerName, plans) => {
|
|
|
99931
100709
|
}).run({
|
|
99932
100710
|
checker,
|
|
99933
100711
|
checkerName,
|
|
99934
|
-
plans
|
|
100712
|
+
plans,
|
|
100713
|
+
lookup
|
|
99935
100714
|
});
|
|
99936
100715
|
};
|
|
99937
100716
|
const checkGroupedPlans = (checker, checkerName, plans) => gen(function* () {
|
|
99938
|
-
const
|
|
99939
|
-
|
|
99940
|
-
});
|
|
99941
|
-
//#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)
|
|
100717
|
+
const lookup = lookupOf(partitionMutantsForWire(plans));
|
|
100718
|
+
const groups = yield* groupPlans(checker, checkerName, plans, lookup);
|
|
100719
|
+
return (yield* forEach$1(groups, (group) => checkPlans(checker, checkerName, group, lookup), { concurrency: 1 })).flat();
|
|
99950
100720
|
});
|
|
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
100721
|
//#endregion
|
|
99975
100722
|
//#region src/report-assembly.ts
|
|
99976
100723
|
const extensionOf = (fileName) => {
|
|
@@ -100443,7 +101190,7 @@ function buildVerdictEnvelope(report, mode, signal, runId, basePath, pathService
|
|
|
100443
101190
|
runId,
|
|
100444
101191
|
mode,
|
|
100445
101192
|
signal,
|
|
100446
|
-
score: getOrNull(filter$
|
|
101193
|
+
score: getOrNull(filter$3(some(metrics.mutationScore), (score) => metrics.totalMutants > 0 && Number.isFinite(score))),
|
|
100447
101194
|
thresholds: {
|
|
100448
101195
|
high: report.thresholds.high,
|
|
100449
101196
|
low: report.thresholds.low,
|
|
@@ -100459,7 +101206,7 @@ function buildVerdictEnvelope(report, mode, signal, runId, basePath, pathService
|
|
|
100459
101206
|
ignored: metrics.ignored,
|
|
100460
101207
|
pending: metrics.pending
|
|
100461
101208
|
},
|
|
100462
|
-
reportFile: getOrNull(map$12(filter$
|
|
101209
|
+
reportFile: getOrNull(map$12(filter$3(fromUndefinedOr(jsonReporterFileName), () => metrics.totalMutants > 0), (fileName) => normalizeFileName(pathService.relative(basePath, fileName)))),
|
|
100463
101210
|
mutants: actionableMutants(report.files)
|
|
100464
101211
|
};
|
|
100465
101212
|
}
|
|
@@ -100721,25 +101468,6 @@ const rememberedResultsOf = (mutants, remembered) => {
|
|
|
100721
101468
|
onSome: (mutant) => [rememberedResultOf(mutant, entry)]
|
|
100722
101469
|
}));
|
|
100723
101470
|
};
|
|
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
101471
|
const VALID_MUTANT_STATUS_SET = /* @__PURE__ */ new Set([
|
|
100744
101472
|
"Killed",
|
|
100745
101473
|
"Survived",
|
|
@@ -100757,6 +101485,8 @@ const toReportedMutant = (mutant) => Object.assign(mutant, {
|
|
|
100757
101485
|
coveredBy: mutant.coveredBy,
|
|
100758
101486
|
static: mutant.static
|
|
100759
101487
|
});
|
|
101488
|
+
const CHECKER_ACQUIRE_RETRIES = 2;
|
|
101489
|
+
const isCheckerCrash = (error) => value(error).pipe(tag("ChildProcessCrashedError", "OutOfMemoryError", () => true), orElse(() => false));
|
|
100760
101490
|
const makeCheckerPool = (prev, idGenerator) => value(prev.options.checkers.length === 0).pipe(when(true, () => as(void_$1, void 0)), orElse(() => make$12({
|
|
100761
101491
|
acquire: forEach$1(prev.options.checkers, (checker) => gen(function* () {
|
|
100762
101492
|
const resolved = yield* resolveConfiguredWorkerSpawn({
|
|
@@ -100767,7 +101497,10 @@ const makeCheckerPool = (prev, idGenerator) => value(prev.options.checkers.lengt
|
|
|
100767
101497
|
const service = yield* createCheckerFactory({
|
|
100768
101498
|
...prev.options,
|
|
100769
101499
|
checkers: [checker]
|
|
100770
|
-
}, prev.project.fileDescriptions, resolved.spawn.entrypoint, idGenerator, prev.sandbox.workingDirectory)
|
|
101500
|
+
}, prev.project.fileDescriptions, resolved.spawn.entrypoint, idGenerator, prev.sandbox.workingDirectory).pipe(retry({
|
|
101501
|
+
times: CHECKER_ACQUIRE_RETRIES,
|
|
101502
|
+
while: isCheckerCrash
|
|
101503
|
+
}));
|
|
100771
101504
|
return {
|
|
100772
101505
|
checkerName: resolved.name,
|
|
100773
101506
|
checker: service
|
|
@@ -100790,6 +101523,28 @@ const checkPlansWithConfiguredCheckers = (checkerPool, plans, reporting) => matc
|
|
|
100790
101523
|
}).pipe(as(checked.filter(([, result]) => result.status === "passed").map(([plan]) => plan))))));
|
|
100791
101524
|
}))
|
|
100792
101525
|
});
|
|
101526
|
+
const isPlannable = (mutant) => isSuccess$1(wireRecordOf(mutant));
|
|
101527
|
+
const DROPPED_IDS_IN_WARNING = 5;
|
|
101528
|
+
const partitionPlannable = (mutants) => {
|
|
101529
|
+
const plannable = [];
|
|
101530
|
+
const dropped = [];
|
|
101531
|
+
mutants.forEach((mutant) => {
|
|
101532
|
+
if (isPlannable(mutant)) plannable.push(mutant);
|
|
101533
|
+
else dropped.push(mutant);
|
|
101534
|
+
});
|
|
101535
|
+
return {
|
|
101536
|
+
plannable,
|
|
101537
|
+
dropped
|
|
101538
|
+
};
|
|
101539
|
+
};
|
|
101540
|
+
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), {
|
|
101541
|
+
onNone: () => "",
|
|
101542
|
+
onSome: (count) => `, +${count - DROPPED_IDS_IN_WARNING} more`
|
|
101543
|
+
})}`;
|
|
101544
|
+
const reportDroppedMutants = (dropped) => value(dropped.length).pipe(when(0, () => void_$1), orElse(() => gen(function* () {
|
|
101545
|
+
yield* update(checkerMutantsSkipped, dropped.length);
|
|
101546
|
+
yield* logWarning(`${dropped.length} mutant(s) cannot be described to a checker and were left out of the run (${droppedIdsOf(dropped)})`);
|
|
101547
|
+
})));
|
|
100793
101548
|
const mutationTestCell$1 = Cell_exports.layer({
|
|
100794
101549
|
read: (command) => gen(function* () {
|
|
100795
101550
|
yield* Scope;
|
|
@@ -100803,156 +101558,147 @@ const mutationTestCell$1 = Cell_exports.layer({
|
|
|
100803
101558
|
})),
|
|
100804
101559
|
decide: admitMutationTest,
|
|
100805
101560
|
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* () {
|
|
101561
|
+
write: (outcome, raw) => {
|
|
101562
|
+
const { dropped, plannable: plannableMutants } = partitionPlannable(raw.prev.mutants);
|
|
101563
|
+
return withPhaseSpan("mutationTest", {
|
|
101564
|
+
mutantCount: raw.prev.mutants.length,
|
|
101565
|
+
skippedMutantCount: dropped.length,
|
|
101566
|
+
testCount: raw.prev.dryRunResult.tests.length
|
|
101567
|
+
}, () => gen(function* () {
|
|
101568
|
+
yield* reportDroppedMutants(dropped);
|
|
101569
|
+
const decision = yield* match$5(outcome, {
|
|
101570
|
+
onFailure: (err) => fail(StageError.make({
|
|
101571
|
+
stage: err.stage,
|
|
101572
|
+
reason: err.reason,
|
|
101573
|
+
cause: err
|
|
101574
|
+
})),
|
|
101575
|
+
onSuccess: (d) => succeed$4(d)
|
|
101576
|
+
});
|
|
101577
|
+
return yield* value(decision).pipe(tag("MutationTestDryRunOnly", () => gen(function* () {
|
|
101578
|
+
const env = yield* RunEnvironment;
|
|
101579
|
+
const queue = yield* RunEvents;
|
|
100850
101580
|
const nowEmit = yield* currentTimeMillis;
|
|
101581
|
+
yield* offer(queue, PhaseEntered.make({
|
|
101582
|
+
phase: "mutation-test",
|
|
101583
|
+
elapsedMs: nowEmit - env.runStartedAt
|
|
101584
|
+
}));
|
|
101585
|
+
yield* logInfo("The dry-run has been completed successfully. No mutations have been executed.");
|
|
101586
|
+
return {
|
|
101587
|
+
results: [],
|
|
101588
|
+
verdict: null
|
|
101589
|
+
};
|
|
101590
|
+
})), tag("MutationTestNoTests", () => gen(function* () {
|
|
101591
|
+
const env = yield* RunEnvironment;
|
|
100851
101592
|
const queue = yield* RunEvents;
|
|
101593
|
+
const now = yield* currentTimeMillis;
|
|
101594
|
+
const elapsed = millis(now - env.runStartedAt);
|
|
101595
|
+
yield* logInfo(`Done in ${format$1(elapsed)}.`);
|
|
101596
|
+
const nowEmit = yield* currentTimeMillis;
|
|
100852
101597
|
yield* offer(queue, PhaseEntered.make({
|
|
100853
101598
|
phase: "mutation-test",
|
|
100854
101599
|
elapsedMs: nowEmit - env.runStartedAt
|
|
100855
101600
|
}));
|
|
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
101601
|
return {
|
|
100937
|
-
|
|
100938
|
-
|
|
100939
|
-
location: toSchemaLocation(result.location)
|
|
101602
|
+
results: [],
|
|
101603
|
+
verdict: null
|
|
100940
101604
|
};
|
|
100941
|
-
}
|
|
100942
|
-
|
|
100943
|
-
|
|
100944
|
-
|
|
100945
|
-
|
|
100946
|
-
|
|
100947
|
-
|
|
100948
|
-
|
|
100949
|
-
|
|
100950
|
-
|
|
100951
|
-
|
|
100952
|
-
|
|
100953
|
-
|
|
100954
|
-
const
|
|
100955
|
-
|
|
101605
|
+
})), tag("MutationTestProceed", () => gen(function* () {
|
|
101606
|
+
const prev = raw.prev;
|
|
101607
|
+
const env = yield* RunEnvironment;
|
|
101608
|
+
yield* gen(function* () {
|
|
101609
|
+
const nowEmit = yield* currentTimeMillis;
|
|
101610
|
+
const queue = yield* RunEvents;
|
|
101611
|
+
yield* offer(queue, PhaseEntered.make({
|
|
101612
|
+
phase: "mutation-test",
|
|
101613
|
+
elapsedMs: nowEmit - env.runStartedAt
|
|
101614
|
+
}));
|
|
101615
|
+
});
|
|
101616
|
+
const idGenerator = yield* IdGenerator;
|
|
101617
|
+
const checkerPool = yield* makeCheckerPool(prev, idGenerator);
|
|
101618
|
+
const testRunnerContext = {
|
|
101619
|
+
options: prev.options,
|
|
101620
|
+
fileDescriptions: prev.project.fileDescriptions,
|
|
101621
|
+
sandboxWorkingDirectory: prev.sandbox.workingDirectory,
|
|
101622
|
+
idGenerator,
|
|
101623
|
+
retire: void_$1,
|
|
101624
|
+
testFiles: prev.project.testFiles.map((file) => prev.sandbox.sandboxFileFor(file))
|
|
101625
|
+
};
|
|
101626
|
+
const testRunnerPool = yield* make$12({
|
|
101627
|
+
acquire: buildTestRunner(testRunnerContext, suspend$3(() => {
|
|
101628
|
+
const runnerConfigured = prev.options.testRunner;
|
|
101629
|
+
const runnerLabel = value(runnerConfigured).pipe(when(isCustomTestRunner, (runner) => runner.plugin), orElse((name) => name));
|
|
101630
|
+
return resolveConfiguredWorkerSpawn({
|
|
101631
|
+
loaded: prev.loadedPlugins,
|
|
101632
|
+
kind: "TestRunner",
|
|
101633
|
+
configured: runnerConfigured
|
|
101634
|
+
}).pipe(mapError(missingWorkerEntry("mutationTest", "test runner", runnerLabel)), flatMap$1(({ spawn }) => makeChildProcessTestRunner({
|
|
101635
|
+
options: prev.options,
|
|
101636
|
+
fileDescriptions: prev.project.fileDescriptions,
|
|
101637
|
+
sandboxWorkingDirectory: prev.sandbox.workingDirectory,
|
|
101638
|
+
workerEntrypoint: spawn.entrypoint,
|
|
101639
|
+
idGenerator
|
|
101640
|
+
})));
|
|
101641
|
+
})),
|
|
101642
|
+
size: prev.concurrency.testRunners
|
|
101643
|
+
});
|
|
101644
|
+
const reporting = makeMutationReportingService({
|
|
101645
|
+
reporterStage: prev.reporterStage,
|
|
101646
|
+
options: prev.options,
|
|
101647
|
+
project: prev.project,
|
|
101648
|
+
testCoverage: prev.testCoverage,
|
|
101649
|
+
runId: env.runId,
|
|
101650
|
+
resolvedMode: env.resolvedMode,
|
|
101651
|
+
sandboxDirectory: prev.sandbox.workingDirectory,
|
|
101652
|
+
basePath: env.basePath
|
|
101653
|
+
});
|
|
101654
|
+
const sandboxFileByName = Object.fromEntries([...keys$2(prev.project.filesToMutate)].map((name) => [name, prev.sandbox.sandboxFileFor(name)]));
|
|
101655
|
+
const currentRelativeFiles = yield* readCurrentRelativeFiles(prev.project, env.basePath);
|
|
101656
|
+
const incremental = incrementalDiff({
|
|
101657
|
+
currentMutants: plannableMutants,
|
|
101658
|
+
testCoverage: prev.testCoverage,
|
|
101659
|
+
incrementalReport: prev.project.incrementalReport,
|
|
101660
|
+
currentRelativeFiles,
|
|
101661
|
+
basePath: env.basePath,
|
|
101662
|
+
force: prev.options.force
|
|
101663
|
+
});
|
|
101664
|
+
const rememberedResults = rememberedResultsOf(plannableMutants, incremental.remembered);
|
|
101665
|
+
yield* when$2(logInfo(`Incremental mode: reusing ${rememberedResults.length} mutant result(s), running ${incremental.mutants.length} mutant(s).`), succeed$4(rememberedResults.length > 0));
|
|
101666
|
+
const { runPlans, earlyResults: noCoverageResults } = partitionRunPlans(yield* decidePlans(incremental.mutants, prev.testCoverage, {
|
|
101667
|
+
disableBail: prev.options.disableBail,
|
|
101668
|
+
timeoutMS: prev.options.timeoutMS,
|
|
101669
|
+
timeoutFactor: prev.options.timeoutFactor,
|
|
101670
|
+
ignoreStatic: prev.options.ignoreStatic
|
|
101671
|
+
}, toMillis(prev.timeOverhead), void 0, sandboxFileByName));
|
|
101672
|
+
const sortedPlans = sortRunPlans(runPlans);
|
|
101673
|
+
const allPlansForReporter = [...sortedPlans];
|
|
101674
|
+
yield* offerReporterEvent(prev.reporterStage, MutationTestingPlanReady.make({
|
|
101675
|
+
total: allPlansForReporter.length + noCoverageResults.length + rememberedResults.length,
|
|
101676
|
+
plans: allPlansForReporter.map((plan) => ({
|
|
101677
|
+
mutantId: plan.mutant.id,
|
|
101678
|
+
plan: plan.plan,
|
|
101679
|
+
netTime: plan.netTime,
|
|
101680
|
+
reloadEnvironment: plan.runOptions.reloadEnvironment
|
|
101681
|
+
}))
|
|
101682
|
+
})).pipe(ignoreCause);
|
|
101683
|
+
{
|
|
101684
|
+
const queue2 = yield* RunEvents;
|
|
101685
|
+
yield* offer(queue2, PlanKnown.make({ total: allPlansForReporter.length + noCoverageResults.length }));
|
|
101686
|
+
}
|
|
101687
|
+
const passedPlans = yield* checkPlansWithConfiguredCheckers(checkerPool, sortedPlans, reporting);
|
|
101688
|
+
const testRunnerStream = fromIterable$4(passedPlans);
|
|
101689
|
+
const plannedTotal = allPlansForReporter.length + noCoverageResults.length + rememberedResults.length;
|
|
101690
|
+
const pathService = yield* Path;
|
|
101691
|
+
const progressQueue = yield* RunEvents;
|
|
101692
|
+
const completedRef = yield* make$11(0);
|
|
101693
|
+
const preparedStreamableOf = (result) => {
|
|
101694
|
+
if (!isMutantStatus(result.status)) return;
|
|
101695
|
+
return {
|
|
101696
|
+
status: result.status,
|
|
101697
|
+
file: reportFileName(pathService.relative(env.basePath, result.fileName)),
|
|
101698
|
+
location: toSchemaLocation(result.location)
|
|
101699
|
+
};
|
|
101700
|
+
};
|
|
101701
|
+
const toStreamEvent = (result, completed, prepared) => MutantTested.make({
|
|
100956
101702
|
id: result.id,
|
|
100957
101703
|
status: prepared.status,
|
|
100958
101704
|
file: prepared.file,
|
|
@@ -100961,71 +101707,85 @@ const mutationTestCell$1 = Cell_exports.layer({
|
|
|
100961
101707
|
replacement: result.replacement,
|
|
100962
101708
|
completed,
|
|
100963
101709
|
total: plannedTotal
|
|
101710
|
+
});
|
|
101711
|
+
const offerFinished = (result, prepared) => gen(function* () {
|
|
101712
|
+
if (prepared === void 0) return;
|
|
101713
|
+
const completed = yield* updateAndGet(completedRef, (n) => n + 1);
|
|
101714
|
+
yield* offer(progressQueue, RunMutantTested.make({
|
|
101715
|
+
id: result.id,
|
|
101716
|
+
status: prepared.status,
|
|
101717
|
+
file: prepared.file,
|
|
101718
|
+
location: prepared.location,
|
|
101719
|
+
mutator: result.mutatorName,
|
|
101720
|
+
replacement: result.replacement,
|
|
101721
|
+
completed,
|
|
101722
|
+
total: plannedTotal
|
|
101723
|
+
}));
|
|
101724
|
+
return completed;
|
|
101725
|
+
});
|
|
101726
|
+
const reportStreamTested = (result, completed, prepared) => offerReporterEvent(prev.reporterStage, toStreamEvent(result, completed, prepared)).pipe(catchCause((cause) => logWarning("Reporter stream failed handling mutantTested", cause)));
|
|
101727
|
+
const offerStreamTested = (result, completed, prepared) => match$6(all$2([fromNullishOr(completed), fromNullishOr(prepared)]), {
|
|
101728
|
+
onNone: () => void_$1,
|
|
101729
|
+
onSome: ([done, streamable]) => reportStreamTested(result, done, streamable)
|
|
101730
|
+
});
|
|
101731
|
+
const announceSettledMutant = (result) => gen(function* () {
|
|
101732
|
+
const prepared = preparedStreamableOf(result);
|
|
101733
|
+
const completed = yield* offerFinished(result, prepared);
|
|
101734
|
+
yield* offerStreamTested(result, completed, prepared);
|
|
101735
|
+
});
|
|
101736
|
+
yield* forEach$1([...rememberedResults, ...noCoverageResults], announceSettledMutant, {
|
|
101737
|
+
concurrency: 1,
|
|
101738
|
+
discard: true
|
|
101739
|
+
});
|
|
101740
|
+
const completedMutants = yield* make$11([...rememberedResults, ...noCoverageResults]);
|
|
101741
|
+
const checkpointGate = yield* make$34(1);
|
|
101742
|
+
yield* reporting.checkpoint(yield* get$1(completedMutants)).pipe(catchCause((cause) => logWarning("Failed to persist the mutation checkpoint", cause)));
|
|
101743
|
+
const persist = (result) => checkpointGate.withPermits(1)(gen(function* () {
|
|
101744
|
+
const next = yield* updateAndGet(completedMutants, (prev) => [...prev, result]);
|
|
101745
|
+
yield* reporting.checkpoint(next).pipe(catchCause((cause) => logWarning("Failed to persist the mutation checkpoint", cause)));
|
|
100964
101746
|
}));
|
|
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)))
|
|
101747
|
+
const runResults = yield* withPhaseSpan("mutationTest.batch", {
|
|
101748
|
+
total: plannedTotal,
|
|
101749
|
+
testRunners: prev.concurrency.testRunners
|
|
101750
|
+
}, () => mapEffect$1(testRunnerStream, (plan) => scoped(gen(function* () {
|
|
101751
|
+
const pool = testRunnerPool;
|
|
101752
|
+
const runner = yield* get$2(pool);
|
|
101753
|
+
const result = yield* runner.mutantRun(plan.runOptions).pipe(catchTags({
|
|
101754
|
+
OutOfMemoryError: (error) => flatMap$1(invalidate(pool, runner), () => fail(error)),
|
|
101755
|
+
ChildProcessCrashedError: (error) => flatMap$1(invalidate(pool, runner), () => fail(error))
|
|
101756
|
+
}));
|
|
101757
|
+
const reported = yield* reporting.reportMutantRunResult(toReportedMutant(plan.mutant), result);
|
|
101758
|
+
const prepared = preparedStreamableOf(reported);
|
|
101759
|
+
const finished = yield* offerFinished(reported, prepared);
|
|
101760
|
+
yield* offerStreamTested(reported, finished, prepared);
|
|
101761
|
+
yield* persist(reported);
|
|
101762
|
+
return reported;
|
|
101763
|
+
})), { concurrency: Math.max(1, prev.concurrency.testRunners) }).pipe(runCollect, map$7((chunk) => [...chunk])));
|
|
101764
|
+
const allResults = [
|
|
101765
|
+
...rememberedResults,
|
|
101766
|
+
...noCoverageResults,
|
|
101767
|
+
...runResults
|
|
101768
|
+
];
|
|
101769
|
+
const outcomeResult = yield* reporting.reportAll(allResults);
|
|
101770
|
+
const doneNow = yield* currentTimeMillis;
|
|
101771
|
+
const elapsed = millis(doneNow - env.runStartedAt);
|
|
101772
|
+
yield* logInfo(`Done in ${format$1(elapsed)}.`);
|
|
101773
|
+
return outcomeResult;
|
|
101774
|
+
})), exhaustive);
|
|
101775
|
+
})).pipe(mapError((cause) => value(cause).pipe(tag("StageError", (stage) => stage), tag("CheckerAnsweredUnrequested", (breach) => StageError.make({
|
|
101776
|
+
stage: "mutationTest",
|
|
101777
|
+
reason: `Checker "${breach.checkerName}" answered about mutants it was not asked about (${breach.phase} phase): ${breach.unrequestedIds.join(", ")}`,
|
|
101778
|
+
cause: breach
|
|
101779
|
+
})), tag("CheckerSkippedRequested", (breach) => StageError.make({
|
|
101780
|
+
stage: "mutationTest",
|
|
101781
|
+
reason: `Checker "${breach.checkerName}" skipped requested mutants (${breach.phase} phase): ${breach.missingIds.join(", ")}`,
|
|
101782
|
+
cause: breach
|
|
101783
|
+
})), tag("ChildProcessCrashedError", "OutOfMemoryError", "PlatformError", "TestRunnerFailed", () => StageError.make({
|
|
101784
|
+
stage: "mutationTest",
|
|
101785
|
+
reason: "Mutation testing failed",
|
|
101786
|
+
cause
|
|
101787
|
+
})), exhaustive)));
|
|
101788
|
+
}
|
|
101029
101789
|
});
|
|
101030
101790
|
//#endregion
|
|
101031
101791
|
//#region src/reporter-output.ts
|
|
@@ -102131,7 +102891,7 @@ const emitHelpEnvelope = (stream, help) => offer(stream.queue, HelpRendered.make
|
|
|
102131
102891
|
code: 0,
|
|
102132
102892
|
help
|
|
102133
102893
|
}));
|
|
102134
|
-
const helpPayload = (ok, captured) => filter$
|
|
102894
|
+
const helpPayload = (ok, captured) => filter$3(some(captured), () => ok.help || captured.length > 0);
|
|
102135
102895
|
const emitNullScoreVerdictWhenOpen = (stream, mode, basePath, pathService) => gen(function* () {
|
|
102136
102896
|
if (!stream.isOpen()) return;
|
|
102137
102897
|
yield* emitNullScoreVerdict(stream, mode, (yield* defaultOptions$2).thresholds, {}, basePath, pathService);
|
|
@@ -102930,50 +103690,233 @@ const runStrykerCli = (input, createRunEventStream) => gen(function* () {
|
|
|
102930
103690
|
})));
|
|
102931
103691
|
});
|
|
102932
103692
|
//#endregion
|
|
103693
|
+
//#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
|
|
103694
|
+
var require_OTLPMetricExporterOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103695
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103696
|
+
exports.AggregationTemporalityPreference = void 0;
|
|
103697
|
+
(function(AggregationTemporalityPreference) {
|
|
103698
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["DELTA"] = 0] = "DELTA";
|
|
103699
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["CUMULATIVE"] = 1] = "CUMULATIVE";
|
|
103700
|
+
AggregationTemporalityPreference[AggregationTemporalityPreference["LOWMEMORY"] = 2] = "LOWMEMORY";
|
|
103701
|
+
})(exports.AggregationTemporalityPreference || (exports.AggregationTemporalityPreference = {}));
|
|
103702
|
+
}));
|
|
103703
|
+
//#endregion
|
|
103704
|
+
//#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
|
|
103705
|
+
var require_OTLPMetricExporterBase = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103706
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103707
|
+
exports.OTLPMetricExporterBase = exports.LowMemoryTemporalitySelector = exports.DeltaTemporalitySelector = exports.CumulativeTemporalitySelector = void 0;
|
|
103708
|
+
const core_1 = require_src$12();
|
|
103709
|
+
const sdk_metrics_1 = require_src$4();
|
|
103710
|
+
const OTLPMetricExporterOptions_1 = require_OTLPMetricExporterOptions();
|
|
103711
|
+
const otlp_exporter_base_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
103712
|
+
const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
|
|
103713
|
+
const CumulativeTemporalitySelector = () => sdk_metrics_1.AggregationTemporality.CUMULATIVE;
|
|
103714
|
+
exports.CumulativeTemporalitySelector = CumulativeTemporalitySelector;
|
|
103715
|
+
const DeltaTemporalitySelector = (instrumentType) => {
|
|
103716
|
+
switch (instrumentType) {
|
|
103717
|
+
case sdk_metrics_1.InstrumentType.COUNTER:
|
|
103718
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_COUNTER:
|
|
103719
|
+
case sdk_metrics_1.InstrumentType.GAUGE:
|
|
103720
|
+
case sdk_metrics_1.InstrumentType.HISTOGRAM:
|
|
103721
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_GAUGE: return sdk_metrics_1.AggregationTemporality.DELTA;
|
|
103722
|
+
case sdk_metrics_1.InstrumentType.UP_DOWN_COUNTER:
|
|
103723
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER: return sdk_metrics_1.AggregationTemporality.CUMULATIVE;
|
|
103724
|
+
}
|
|
103725
|
+
};
|
|
103726
|
+
exports.DeltaTemporalitySelector = DeltaTemporalitySelector;
|
|
103727
|
+
const LowMemoryTemporalitySelector = (instrumentType) => {
|
|
103728
|
+
switch (instrumentType) {
|
|
103729
|
+
case sdk_metrics_1.InstrumentType.COUNTER:
|
|
103730
|
+
case sdk_metrics_1.InstrumentType.HISTOGRAM: return sdk_metrics_1.AggregationTemporality.DELTA;
|
|
103731
|
+
case sdk_metrics_1.InstrumentType.GAUGE:
|
|
103732
|
+
case sdk_metrics_1.InstrumentType.UP_DOWN_COUNTER:
|
|
103733
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:
|
|
103734
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_COUNTER:
|
|
103735
|
+
case sdk_metrics_1.InstrumentType.OBSERVABLE_GAUGE: return sdk_metrics_1.AggregationTemporality.CUMULATIVE;
|
|
103736
|
+
}
|
|
103737
|
+
};
|
|
103738
|
+
exports.LowMemoryTemporalitySelector = LowMemoryTemporalitySelector;
|
|
103739
|
+
function chooseTemporalitySelectorFromEnvironment() {
|
|
103740
|
+
const configuredTemporality = ((0, core_1.getStringFromEnv)("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE") ?? "cumulative").toLowerCase();
|
|
103741
|
+
if (configuredTemporality === "cumulative") return exports.CumulativeTemporalitySelector;
|
|
103742
|
+
if (configuredTemporality === "delta") return exports.DeltaTemporalitySelector;
|
|
103743
|
+
if (configuredTemporality === "lowmemory") return exports.LowMemoryTemporalitySelector;
|
|
103744
|
+
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.`);
|
|
103745
|
+
return exports.CumulativeTemporalitySelector;
|
|
103746
|
+
}
|
|
103747
|
+
function chooseTemporalitySelector(temporalityPreference) {
|
|
103748
|
+
if (temporalityPreference != null) {
|
|
103749
|
+
if (temporalityPreference === OTLPMetricExporterOptions_1.AggregationTemporalityPreference.DELTA) return exports.DeltaTemporalitySelector;
|
|
103750
|
+
else if (temporalityPreference === OTLPMetricExporterOptions_1.AggregationTemporalityPreference.LOWMEMORY) return exports.LowMemoryTemporalitySelector;
|
|
103751
|
+
return exports.CumulativeTemporalitySelector;
|
|
103752
|
+
}
|
|
103753
|
+
return chooseTemporalitySelectorFromEnvironment();
|
|
103754
|
+
}
|
|
103755
|
+
const DEFAULT_AGGREGATION = Object.freeze({ type: sdk_metrics_1.AggregationType.DEFAULT });
|
|
103756
|
+
function chooseAggregationSelector(config) {
|
|
103757
|
+
return config?.aggregationPreference ?? (() => DEFAULT_AGGREGATION);
|
|
103758
|
+
}
|
|
103759
|
+
var OTLPMetricExporterBase = class extends otlp_exporter_base_1.OTLPExporterBase {
|
|
103760
|
+
_aggregationTemporalitySelector;
|
|
103761
|
+
_aggregationSelector;
|
|
103762
|
+
constructor(delegate, config) {
|
|
103763
|
+
super(delegate);
|
|
103764
|
+
this._aggregationSelector = chooseAggregationSelector(config);
|
|
103765
|
+
this._aggregationTemporalitySelector = chooseTemporalitySelector(config?.temporalityPreference);
|
|
103766
|
+
}
|
|
103767
|
+
selectAggregation(instrumentType) {
|
|
103768
|
+
return this._aggregationSelector(instrumentType);
|
|
103769
|
+
}
|
|
103770
|
+
selectAggregationTemporality(instrumentType) {
|
|
103771
|
+
return this._aggregationTemporalitySelector(instrumentType);
|
|
103772
|
+
}
|
|
103773
|
+
};
|
|
103774
|
+
exports.OTLPMetricExporterBase = OTLPMetricExporterBase;
|
|
103775
|
+
}));
|
|
103776
|
+
//#endregion
|
|
103777
|
+
//#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
|
|
103778
|
+
var require_OTLPMetricExporter = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103779
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103780
|
+
exports.OTLPMetricExporter = void 0;
|
|
103781
|
+
const OTLPMetricExporterBase_1 = require_OTLPMetricExporterBase();
|
|
103782
|
+
const otlp_transformer_1 = require_src$3();
|
|
103783
|
+
const node_http_1 = (init_index_node_http(), __toCommonJS(index_node_http_exports));
|
|
103784
|
+
/**
|
|
103785
|
+
* OTLP Metric Exporter for Node.js
|
|
103786
|
+
*/
|
|
103787
|
+
var OTLPMetricExporter = class extends OTLPMetricExporterBase_1.OTLPMetricExporterBase {
|
|
103788
|
+
constructor(config) {
|
|
103789
|
+
super((0, node_http_1.createOtlpHttpExportDelegate)((0, node_http_1.convertLegacyHttpOptions)(config ?? {}, "METRICS", "v1/metrics", { "Content-Type": "application/json" }), otlp_transformer_1.JsonMetricsSerializer), config);
|
|
103790
|
+
}
|
|
103791
|
+
};
|
|
103792
|
+
exports.OTLPMetricExporter = OTLPMetricExporter;
|
|
103793
|
+
}));
|
|
103794
|
+
//#endregion
|
|
103795
|
+
//#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
|
|
103796
|
+
var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103797
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103798
|
+
exports.OTLPMetricExporter = void 0;
|
|
103799
|
+
var OTLPMetricExporter_1 = require_OTLPMetricExporter();
|
|
103800
|
+
Object.defineProperty(exports, "OTLPMetricExporter", {
|
|
103801
|
+
enumerable: true,
|
|
103802
|
+
get: function() {
|
|
103803
|
+
return OTLPMetricExporter_1.OTLPMetricExporter;
|
|
103804
|
+
}
|
|
103805
|
+
});
|
|
103806
|
+
}));
|
|
103807
|
+
//#endregion
|
|
103808
|
+
//#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
|
|
103809
|
+
var require_platform = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103810
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103811
|
+
exports.OTLPMetricExporter = void 0;
|
|
103812
|
+
var node_1 = require_node();
|
|
103813
|
+
Object.defineProperty(exports, "OTLPMetricExporter", {
|
|
103814
|
+
enumerable: true,
|
|
103815
|
+
get: function() {
|
|
103816
|
+
return node_1.OTLPMetricExporter;
|
|
103817
|
+
}
|
|
103818
|
+
});
|
|
103819
|
+
}));
|
|
103820
|
+
//#endregion
|
|
102933
103821
|
//#region src/platform/telemetry.ts
|
|
102934
|
-
|
|
103822
|
+
var import_src = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
103823
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103824
|
+
exports.OTLPMetricExporterBase = exports.LowMemoryTemporalitySelector = exports.DeltaTemporalitySelector = exports.CumulativeTemporalitySelector = exports.AggregationTemporalityPreference = exports.OTLPMetricExporter = void 0;
|
|
103825
|
+
var platform_1 = require_platform();
|
|
103826
|
+
Object.defineProperty(exports, "OTLPMetricExporter", {
|
|
103827
|
+
enumerable: true,
|
|
103828
|
+
get: function() {
|
|
103829
|
+
return platform_1.OTLPMetricExporter;
|
|
103830
|
+
}
|
|
103831
|
+
});
|
|
103832
|
+
var OTLPMetricExporterOptions_1 = require_OTLPMetricExporterOptions();
|
|
103833
|
+
Object.defineProperty(exports, "AggregationTemporalityPreference", {
|
|
103834
|
+
enumerable: true,
|
|
103835
|
+
get: function() {
|
|
103836
|
+
return OTLPMetricExporterOptions_1.AggregationTemporalityPreference;
|
|
103837
|
+
}
|
|
103838
|
+
});
|
|
103839
|
+
var OTLPMetricExporterBase_1 = require_OTLPMetricExporterBase();
|
|
103840
|
+
Object.defineProperty(exports, "CumulativeTemporalitySelector", {
|
|
103841
|
+
enumerable: true,
|
|
103842
|
+
get: function() {
|
|
103843
|
+
return OTLPMetricExporterBase_1.CumulativeTemporalitySelector;
|
|
103844
|
+
}
|
|
103845
|
+
});
|
|
103846
|
+
Object.defineProperty(exports, "DeltaTemporalitySelector", {
|
|
103847
|
+
enumerable: true,
|
|
103848
|
+
get: function() {
|
|
103849
|
+
return OTLPMetricExporterBase_1.DeltaTemporalitySelector;
|
|
103850
|
+
}
|
|
103851
|
+
});
|
|
103852
|
+
Object.defineProperty(exports, "LowMemoryTemporalitySelector", {
|
|
103853
|
+
enumerable: true,
|
|
103854
|
+
get: function() {
|
|
103855
|
+
return OTLPMetricExporterBase_1.LowMemoryTemporalitySelector;
|
|
103856
|
+
}
|
|
103857
|
+
});
|
|
103858
|
+
Object.defineProperty(exports, "OTLPMetricExporterBase", {
|
|
103859
|
+
enumerable: true,
|
|
103860
|
+
get: function() {
|
|
103861
|
+
return OTLPMetricExporterBase_1.OTLPMetricExporterBase;
|
|
103862
|
+
}
|
|
103863
|
+
});
|
|
103864
|
+
})))();
|
|
102935
103865
|
const EXPORT_TIMEOUT_MILLIS = 5e3;
|
|
103866
|
+
const SHUTDOWN_TIMEOUT = millis(6e3);
|
|
102936
103867
|
const withBestEffortShutdown = (self, shutdownTimeout) => effectContext(acquireRelease(gen(function* () {
|
|
102937
103868
|
const scope = yield* make$39();
|
|
102938
103869
|
return {
|
|
102939
103870
|
context: yield* buildWithScope(self, scope),
|
|
102940
103871
|
scope
|
|
102941
103872
|
};
|
|
102942
|
-
}), ({ scope }) => close(scope, void_$2).pipe(interruptible, timeoutOption(shutdownTimeout), ignoreCause)).pipe(map$7(({ context }) => context)));
|
|
103873
|
+
}), ({ 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
103874
|
const PROCESSOR_BY_KIND = {
|
|
102944
103875
|
batch: (exporter) => new import_index_shim.BatchSpanProcessor(exporter),
|
|
102945
103876
|
simple: (exporter) => new import_index_shim.SimpleSpanProcessor(exporter)
|
|
102946
103877
|
};
|
|
102947
103878
|
const TRACES_PATH = "/v1/traces";
|
|
102948
|
-
const
|
|
103879
|
+
const METRICS_PATH = "/v1/metrics";
|
|
103880
|
+
const DEFAULT_METRIC_EXPORT_INTERVAL_MILLIS = 6e4;
|
|
103881
|
+
const SIGNAL_PATH = /\/(?:v1|v1\/(?:traces|metrics))$/u;
|
|
103882
|
+
const urlFor = (endpoint, path) => match$6(fromUndefinedOr(endpoint), {
|
|
102949
103883
|
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
|
-
}
|
|
103884
|
+
onSome: (base) => `${base.replace(/\/+$/u, "").replace(SIGNAL_PATH, "")}${path}`
|
|
102954
103885
|
});
|
|
102955
|
-
const
|
|
103886
|
+
const resourceUrlFor = (endpoint, path) => value(urlFor(endpoint, path)).pipe(when(void 0, () => ({ timeoutMillis: EXPORT_TIMEOUT_MILLIS })), orElse((url) => ({
|
|
102956
103887
|
url,
|
|
102957
103888
|
timeoutMillis: EXPORT_TIMEOUT_MILLIS
|
|
102958
103889
|
})));
|
|
103890
|
+
const exporterOptionsFor = (endpoint) => resourceUrlFor(endpoint, TRACES_PATH);
|
|
102959
103891
|
const otlpTelemetryLayer = (options) => {
|
|
102960
|
-
const exporter = new import_src.OTLPTraceExporter(exporterOptionsFor(options.endpoint));
|
|
103892
|
+
const exporter = new import_src$1.OTLPTraceExporter(exporterOptionsFor(options.endpoint));
|
|
103893
|
+
const metricReader = new import_src$6.PeriodicExportingMetricReader({
|
|
103894
|
+
exporter: new import_src.OTLPMetricExporter({
|
|
103895
|
+
...resourceUrlFor(options.endpoint, METRICS_PATH),
|
|
103896
|
+
temporalityPreference: import_src.AggregationTemporalityPreference.CUMULATIVE
|
|
103897
|
+
}),
|
|
103898
|
+
exportIntervalMillis: options.metricExportIntervalMillis ?? DEFAULT_METRIC_EXPORT_INTERVAL_MILLIS
|
|
103899
|
+
});
|
|
102961
103900
|
return withBestEffortShutdown(layer$1(() => ({
|
|
102962
103901
|
resource: { serviceName: options.serviceName },
|
|
103902
|
+
metricReader,
|
|
102963
103903
|
spanProcessor: value(options.processor ?? "simple").pipe(when("batch", (kind) => PROCESSOR_BY_KIND[kind](exporter)), orElse((kind) => PROCESSOR_BY_KIND[kind](exporter)))
|
|
102964
103904
|
})), SHUTDOWN_TIMEOUT);
|
|
102965
103905
|
};
|
|
102966
103906
|
const telemetryLayer = unwrap$4(all([
|
|
102967
103907
|
boolean$3("OTEL_ENABLED").pipe(withDefault$2(false)),
|
|
102968
103908
|
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"))
|
|
103909
|
+
string$4("OTEL_EXPORTER_OTLP_ENDPOINT").pipe(withDefault$2("http://127.0.0.1:4318")),
|
|
103910
|
+
number("OTEL_METRIC_EXPORT_INTERVAL").pipe(withDefault$2(DEFAULT_METRIC_EXPORT_INTERVAL_MILLIS))
|
|
102970
103911
|
]).pipe(orElseSucceed(() => [
|
|
102971
103912
|
false,
|
|
102972
103913
|
"stryker-js",
|
|
102973
|
-
"http://127.0.0.1:4318"
|
|
102974
|
-
|
|
103914
|
+
"http://127.0.0.1:4318",
|
|
103915
|
+
DEFAULT_METRIC_EXPORT_INTERVAL_MILLIS
|
|
103916
|
+
]), map$7(([enabled, serviceName, endpoint, metricExportIntervalMillis]) => value(enabled).pipe(when(true, () => otlpTelemetryLayer({
|
|
102975
103917
|
serviceName,
|
|
102976
|
-
endpoint
|
|
103918
|
+
endpoint,
|
|
103919
|
+
metricExportIntervalMillis
|
|
102977
103920
|
})), orElse(() => empty$7)))));
|
|
102978
103921
|
//#endregion
|
|
102979
103922
|
//#region src/bin/main.ts
|