@effect/language-service 0.84.3 → 0.85.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/README.md +11 -0
- package/cli.js +819 -165
- package/cli.js.map +1 -1
- package/effect-lsp-patch-utils.js +449 -44
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +459 -54
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/schema.json +132 -0
- package/transform.js +449 -44
- package/transform.js.map +1 -1
package/cli.js
CHANGED
|
@@ -12333,7 +12333,7 @@ var require_dist3 = __commonJS({
|
|
|
12333
12333
|
}
|
|
12334
12334
|
});
|
|
12335
12335
|
|
|
12336
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12336
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Pipeable.js
|
|
12337
12337
|
var pipeArguments = (self, args3) => {
|
|
12338
12338
|
switch (args3.length) {
|
|
12339
12339
|
case 0:
|
|
@@ -12377,7 +12377,7 @@ var Class = /* @__PURE__ */ (function() {
|
|
|
12377
12377
|
return PipeableBase;
|
|
12378
12378
|
})();
|
|
12379
12379
|
|
|
12380
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12380
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Function.js
|
|
12381
12381
|
var dual = function(arity, body) {
|
|
12382
12382
|
if (typeof arity === "function") {
|
|
12383
12383
|
return function() {
|
|
@@ -12439,7 +12439,7 @@ function memoize(f) {
|
|
|
12439
12439
|
};
|
|
12440
12440
|
}
|
|
12441
12441
|
|
|
12442
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12442
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/equal.js
|
|
12443
12443
|
var getAllObjectKeys = (obj) => {
|
|
12444
12444
|
const keys2 = new Set(Reflect.ownKeys(obj));
|
|
12445
12445
|
if (obj.constructor === Object) return keys2;
|
|
@@ -12462,7 +12462,7 @@ var getAllObjectKeys = (obj) => {
|
|
|
12462
12462
|
};
|
|
12463
12463
|
var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
12464
12464
|
|
|
12465
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12465
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Predicate.js
|
|
12466
12466
|
function isString(input) {
|
|
12467
12467
|
return typeof input === "string";
|
|
12468
12468
|
}
|
|
@@ -12511,7 +12511,7 @@ function isIterable(input) {
|
|
|
12511
12511
|
return hasProperty(input, Symbol.iterator) || isString(input);
|
|
12512
12512
|
}
|
|
12513
12513
|
|
|
12514
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12514
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Hash.js
|
|
12515
12515
|
var symbol = "~effect/interfaces/Hash";
|
|
12516
12516
|
var hash = (self) => {
|
|
12517
12517
|
switch (typeof self) {
|
|
@@ -12630,7 +12630,7 @@ function withVisitedTracking(obj, fn4) {
|
|
|
12630
12630
|
return result3;
|
|
12631
12631
|
}
|
|
12632
12632
|
|
|
12633
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12633
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Equal.js
|
|
12634
12634
|
var symbol2 = "~effect/interfaces/Equal";
|
|
12635
12635
|
function equals() {
|
|
12636
12636
|
if (arguments.length === 1) {
|
|
@@ -12792,7 +12792,7 @@ var compareSets = /* @__PURE__ */ makeCompareSet(compareBoth);
|
|
|
12792
12792
|
var isEqual = (u) => hasProperty(u, symbol2);
|
|
12793
12793
|
var asEquivalence = () => equals;
|
|
12794
12794
|
|
|
12795
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12795
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Redactable.js
|
|
12796
12796
|
var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Inspectable/redactable");
|
|
12797
12797
|
var isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
12798
12798
|
function redact(u) {
|
|
@@ -12811,7 +12811,7 @@ var emptyServiceMap = {
|
|
|
12811
12811
|
}
|
|
12812
12812
|
};
|
|
12813
12813
|
|
|
12814
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12814
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Formatter.js
|
|
12815
12815
|
function format(input, options) {
|
|
12816
12816
|
const space = options?.space ?? 0;
|
|
12817
12817
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
@@ -12899,7 +12899,7 @@ function formatJson(input, options) {
|
|
|
12899
12899
|
return out;
|
|
12900
12900
|
}
|
|
12901
12901
|
|
|
12902
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12902
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Inspectable.js
|
|
12903
12903
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
12904
12904
|
var toJson = (input) => {
|
|
12905
12905
|
try {
|
|
@@ -12959,7 +12959,7 @@ var Class2 = class {
|
|
|
12959
12959
|
}
|
|
12960
12960
|
};
|
|
12961
12961
|
|
|
12962
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
12962
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Utils.js
|
|
12963
12963
|
var SingleShotGen = class _SingleShotGen {
|
|
12964
12964
|
called = false;
|
|
12965
12965
|
self;
|
|
@@ -13002,7 +13002,7 @@ var forced = {
|
|
|
13002
13002
|
var isNotOptimizedAway = /* @__PURE__ */ standard[InternalTypeId](() => new Error().stack)?.includes(InternalTypeId) === true;
|
|
13003
13003
|
var internalCall = isNotOptimizedAway ? standard[InternalTypeId] : forced[InternalTypeId];
|
|
13004
13004
|
|
|
13005
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13005
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/core.js
|
|
13006
13006
|
var EffectTypeId = `~effect/Effect`;
|
|
13007
13007
|
var ExitTypeId = `~effect/Exit`;
|
|
13008
13008
|
var effectVariance = {
|
|
@@ -13371,10 +13371,10 @@ var done = (value2) => {
|
|
|
13371
13371
|
return exitFail(Done(value2));
|
|
13372
13372
|
};
|
|
13373
13373
|
|
|
13374
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13374
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/array.js
|
|
13375
13375
|
var isArrayNonEmpty = (self) => self.length > 0;
|
|
13376
13376
|
|
|
13377
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13377
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/option.js
|
|
13378
13378
|
var TypeId = "~effect/data/Option";
|
|
13379
13379
|
var CommonProto = {
|
|
13380
13380
|
[TypeId]: {
|
|
@@ -13445,7 +13445,7 @@ var some = (value2) => {
|
|
|
13445
13445
|
return a;
|
|
13446
13446
|
};
|
|
13447
13447
|
|
|
13448
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13448
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/result.js
|
|
13449
13449
|
var TypeId2 = "~effect/data/Result";
|
|
13450
13450
|
var CommonProto2 = {
|
|
13451
13451
|
[TypeId2]: {
|
|
@@ -13516,7 +13516,7 @@ var succeed = (success) => {
|
|
|
13516
13516
|
return a;
|
|
13517
13517
|
};
|
|
13518
13518
|
|
|
13519
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13519
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Order.js
|
|
13520
13520
|
function make(compare) {
|
|
13521
13521
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
13522
13522
|
}
|
|
@@ -13540,7 +13540,7 @@ var combine2 = /* @__PURE__ */ dual(2, (self, that) => make((a1, a2) => {
|
|
|
13540
13540
|
var mapInput = /* @__PURE__ */ dual(2, (self, f) => make((b1, b2) => self(f(b1), f(b2))));
|
|
13541
13541
|
var isGreaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
|
|
13542
13542
|
|
|
13543
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13543
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Option.js
|
|
13544
13544
|
var none2 = () => none;
|
|
13545
13545
|
var some2 = some;
|
|
13546
13546
|
var isNone2 = isNone;
|
|
@@ -13559,7 +13559,7 @@ var flatMap = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : f(s
|
|
|
13559
13559
|
var filter = /* @__PURE__ */ dual(2, (self, predicate) => isNone2(self) ? none2() : predicate(self.value) ? some2(self.value) : none2());
|
|
13560
13560
|
var liftPredicate = /* @__PURE__ */ dual(2, (b, predicate) => predicate(b) ? some2(b) : none2());
|
|
13561
13561
|
|
|
13562
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13562
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Result.js
|
|
13563
13563
|
var succeed2 = succeed;
|
|
13564
13564
|
var fail2 = fail;
|
|
13565
13565
|
var isFailure2 = isFailure;
|
|
@@ -13572,7 +13572,7 @@ var match2 = /* @__PURE__ */ dual(2, (self, {
|
|
|
13572
13572
|
}) => isFailure2(self) ? onFailure(self.failure) : onSuccess(self.success));
|
|
13573
13573
|
var getOrElse2 = /* @__PURE__ */ dual(2, (self, onFailure) => isFailure2(self) ? onFailure(self.failure) : self.success);
|
|
13574
13574
|
|
|
13575
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13575
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Iterable.js
|
|
13576
13576
|
var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
|
|
13577
13577
|
let i = 0;
|
|
13578
13578
|
for (const a of self) {
|
|
@@ -13591,7 +13591,7 @@ var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
13591
13591
|
return none2();
|
|
13592
13592
|
});
|
|
13593
13593
|
|
|
13594
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13594
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Record.js
|
|
13595
13595
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
13596
13596
|
const out = {
|
|
13597
13597
|
...self
|
|
@@ -13603,7 +13603,7 @@ var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
13603
13603
|
});
|
|
13604
13604
|
var keys = (self) => Object.keys(self);
|
|
13605
13605
|
|
|
13606
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13606
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Array.js
|
|
13607
13607
|
var Array2 = globalThis.Array;
|
|
13608
13608
|
var fromIterable = (collection) => Array2.isArray(collection) ? collection : Array2.from(collection);
|
|
13609
13609
|
var match3 = /* @__PURE__ */ dual(2, (self, {
|
|
@@ -13742,7 +13742,7 @@ var dedupeWith = /* @__PURE__ */ dual(2, (self, isEquivalent) => {
|
|
|
13742
13742
|
var dedupe = (self) => dedupeWith(self, asEquivalence());
|
|
13743
13743
|
var join = /* @__PURE__ */ dual(2, (self, sep) => fromIterable(self).join(sep));
|
|
13744
13744
|
|
|
13745
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13745
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Duration.js
|
|
13746
13746
|
var TypeId3 = "~effect/time/Duration";
|
|
13747
13747
|
var bigint0 = /* @__PURE__ */ BigInt(0);
|
|
13748
13748
|
var bigint1e3 = /* @__PURE__ */ BigInt(1e3);
|
|
@@ -13973,7 +13973,7 @@ var Equivalence = (self, that) => matchPair(self, that, {
|
|
|
13973
13973
|
});
|
|
13974
13974
|
var equals2 = /* @__PURE__ */ dual(2, (self, that) => Equivalence(self, that));
|
|
13975
13975
|
|
|
13976
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13976
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Filter.js
|
|
13977
13977
|
var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
13978
13978
|
const leftOut = left(input);
|
|
13979
13979
|
if (isFailure2(leftOut)) return fail2(input);
|
|
@@ -13986,7 +13986,7 @@ var toOption = (self) => (input) => {
|
|
|
13986
13986
|
return isFailure2(result3) ? none2() : some2(result3.success);
|
|
13987
13987
|
};
|
|
13988
13988
|
|
|
13989
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
13989
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/ServiceMap.js
|
|
13990
13990
|
var ServiceTypeId = "~effect/ServiceMap/Service";
|
|
13991
13991
|
var Service = function() {
|
|
13992
13992
|
const prevLimit = Error.stackTraceLimit;
|
|
@@ -14020,10 +14020,7 @@ var Service = function() {
|
|
|
14020
14020
|
};
|
|
14021
14021
|
};
|
|
14022
14022
|
var ServiceProto = {
|
|
14023
|
-
[ServiceTypeId]:
|
|
14024
|
-
_Service: (_) => _,
|
|
14025
|
-
_Identifier: (_) => _
|
|
14026
|
-
},
|
|
14023
|
+
[ServiceTypeId]: ServiceTypeId,
|
|
14027
14024
|
...PipeInspectableProto,
|
|
14028
14025
|
...YieldableProto,
|
|
14029
14026
|
toJSON() {
|
|
@@ -14171,7 +14168,7 @@ var withMapUnsafe = (self, f) => {
|
|
|
14171
14168
|
};
|
|
14172
14169
|
var Reference = Service;
|
|
14173
14170
|
|
|
14174
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14171
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Scheduler.js
|
|
14175
14172
|
var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
|
|
14176
14173
|
defaultValue: () => new MixedScheduler()
|
|
14177
14174
|
});
|
|
@@ -14282,7 +14279,7 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
|
|
|
14282
14279
|
defaultValue: () => false
|
|
14283
14280
|
});
|
|
14284
14281
|
|
|
14285
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14282
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Tracer.js
|
|
14286
14283
|
var ParentSpanKey = "effect/Tracer/ParentSpan";
|
|
14287
14284
|
var ParentSpan = class extends (/* @__PURE__ */ Service()(ParentSpanKey)) {
|
|
14288
14285
|
};
|
|
@@ -14362,7 +14359,10 @@ var randomHexString = /* @__PURE__ */ (function() {
|
|
|
14362
14359
|
};
|
|
14363
14360
|
})();
|
|
14364
14361
|
|
|
14365
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14362
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/metric.js
|
|
14363
|
+
var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
|
|
14364
|
+
|
|
14365
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/references.js
|
|
14366
14366
|
var CurrentConcurrency = /* @__PURE__ */ Reference("effect/References/CurrentConcurrency", {
|
|
14367
14367
|
defaultValue: () => "unbounded"
|
|
14368
14368
|
});
|
|
@@ -14394,10 +14394,7 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
|
|
|
14394
14394
|
defaultValue: () => []
|
|
14395
14395
|
});
|
|
14396
14396
|
|
|
14397
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14398
|
-
var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
|
|
14399
|
-
|
|
14400
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.38/node_modules/effect/dist/internal/tracer.js
|
|
14397
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/tracer.js
|
|
14401
14398
|
var makeStackCleaner = (line) => (stack) => {
|
|
14402
14399
|
let cache;
|
|
14403
14400
|
return () => {
|
|
@@ -14412,10 +14409,10 @@ var makeStackCleaner = (line) => (stack) => {
|
|
|
14412
14409
|
};
|
|
14413
14410
|
};
|
|
14414
14411
|
|
|
14415
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14412
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/version.js
|
|
14416
14413
|
var version = "dev";
|
|
14417
14414
|
|
|
14418
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
14415
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/effect.js
|
|
14419
14416
|
var Interrupt = class extends ReasonBase {
|
|
14420
14417
|
fiberId;
|
|
14421
14418
|
constructor(fiberId2, annotations = constEmptyAnnotations) {
|
|
@@ -15343,7 +15340,7 @@ var exitPrimitive = /* @__PURE__ */ makePrimitive({
|
|
|
15343
15340
|
return succeed3(exit3 ?? exitFailCause(cause));
|
|
15344
15341
|
}
|
|
15345
15342
|
});
|
|
15346
|
-
var timeoutOrElse = /* @__PURE__ */ dual(2, (self, options) => raceFirst(self, flatMap3(sleep(options.duration), options.
|
|
15343
|
+
var timeoutOrElse = /* @__PURE__ */ dual(2, (self, options) => raceFirst(self, flatMap3(sleep(options.duration), options.orElse)));
|
|
15347
15344
|
var ScopeTypeId = "~effect/Scope";
|
|
15348
15345
|
var ScopeCloseableTypeId = "~effect/Scope/Closeable";
|
|
15349
15346
|
var scopeTag = /* @__PURE__ */ Service("effect/Scope");
|
|
@@ -15699,6 +15696,9 @@ var runForkWith = (services3) => (effect2, options) => {
|
|
|
15699
15696
|
fiber2.addObserver(() => options.signal.removeEventListener("abort", abort));
|
|
15700
15697
|
}
|
|
15701
15698
|
}
|
|
15699
|
+
if (options?.onFiberStart) {
|
|
15700
|
+
options.onFiberStart(fiber2);
|
|
15701
|
+
}
|
|
15702
15702
|
return fiber2;
|
|
15703
15703
|
};
|
|
15704
15704
|
var fiberRunIn = /* @__PURE__ */ dual(2, (self, scope3) => {
|
|
@@ -16129,7 +16129,7 @@ var tracerLogger = /* @__PURE__ */ loggerMake(({
|
|
|
16129
16129
|
span.event(toStringUnknown(Array.isArray(message) && message.length === 1 ? message[0] : message), clock.currentTimeNanosUnsafe(), attributes);
|
|
16130
16130
|
});
|
|
16131
16131
|
|
|
16132
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16132
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Cause.js
|
|
16133
16133
|
var fail4 = causeFail;
|
|
16134
16134
|
var hasInterruptsOnly2 = hasInterruptsOnly;
|
|
16135
16135
|
var squash = causeSquash;
|
|
@@ -16142,7 +16142,7 @@ var Done2 = Done;
|
|
|
16142
16142
|
var done2 = done;
|
|
16143
16143
|
var UnknownError2 = UnknownError;
|
|
16144
16144
|
|
|
16145
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16145
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Exit.js
|
|
16146
16146
|
var succeed4 = exitSucceed;
|
|
16147
16147
|
var failCause2 = exitFailCause;
|
|
16148
16148
|
var fail5 = exitFail;
|
|
@@ -16151,7 +16151,7 @@ var isSuccess3 = exitIsSuccess;
|
|
|
16151
16151
|
var match6 = exitMatch;
|
|
16152
16152
|
var getSuccess2 = exitGetSuccess;
|
|
16153
16153
|
|
|
16154
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16154
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Deferred.js
|
|
16155
16155
|
var TypeId5 = "~effect/Deferred";
|
|
16156
16156
|
var DeferredProto = {
|
|
16157
16157
|
[TypeId5]: {
|
|
@@ -16193,7 +16193,10 @@ var doneUnsafe = (self, effect2) => {
|
|
|
16193
16193
|
return true;
|
|
16194
16194
|
};
|
|
16195
16195
|
|
|
16196
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16196
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/References.js
|
|
16197
|
+
var MinimumLogLevel2 = MinimumLogLevel;
|
|
16198
|
+
|
|
16199
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Scope.js
|
|
16197
16200
|
var Scope = scopeTag;
|
|
16198
16201
|
var makeUnsafe3 = scopeMakeUnsafe;
|
|
16199
16202
|
var provide = provideScope;
|
|
@@ -16202,7 +16205,7 @@ var addFinalizer2 = scopeAddFinalizer;
|
|
|
16202
16205
|
var forkUnsafe2 = scopeForkUnsafe;
|
|
16203
16206
|
var close = scopeClose;
|
|
16204
16207
|
|
|
16205
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16208
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Layer.js
|
|
16206
16209
|
var TypeId6 = "~effect/Layer";
|
|
16207
16210
|
var MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
16208
16211
|
var LayerProto = {
|
|
@@ -16292,7 +16295,7 @@ var merge2 = /* @__PURE__ */ dual(2, (self, that) => mergeAll2(self, ...Array.is
|
|
|
16292
16295
|
var provideWith = (self, that, f) => fromBuild((memoMap, scope3) => flatMap3(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope3) : that.build(memoMap, scope3), (context) => self.build(memoMap, scope3).pipe(provideServices(context), map5((merged) => f(merged, context)))));
|
|
16293
16296
|
var provideMerge = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, (self2, that2) => merge(that2, self2)));
|
|
16294
16297
|
|
|
16295
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16298
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Data.js
|
|
16296
16299
|
var Class3 = class extends Class {
|
|
16297
16300
|
constructor(props) {
|
|
16298
16301
|
super();
|
|
@@ -16328,15 +16331,15 @@ function taggedMatch() {
|
|
|
16328
16331
|
var Error3 = Error2;
|
|
16329
16332
|
var TaggedError2 = TaggedError;
|
|
16330
16333
|
|
|
16331
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16334
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Number.js
|
|
16332
16335
|
var Number3 = globalThis.Number;
|
|
16333
16336
|
var Order = Number2;
|
|
16334
16337
|
|
|
16335
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16338
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/String.js
|
|
16336
16339
|
var String3 = globalThis.String;
|
|
16337
16340
|
var Order2 = String2;
|
|
16338
16341
|
|
|
16339
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16342
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Pull.js
|
|
16340
16343
|
var catchDone = /* @__PURE__ */ dual(2, (effect2, f) => catchCauseFilter(effect2, filterDoneLeftover, (l) => f(l)));
|
|
16341
16344
|
var isDoneCause = (cause) => cause.reasons.some(isDoneFailure);
|
|
16342
16345
|
var isDoneFailure = (failure) => failure._tag === "Fail" && isDone2(failure.error);
|
|
@@ -16347,11 +16350,11 @@ var doneExitFromCause = (cause) => {
|
|
|
16347
16350
|
return !isFailure2(halt) ? succeed4(halt.success.value) : failCause2(halt.failure);
|
|
16348
16351
|
};
|
|
16349
16352
|
|
|
16350
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16353
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/layer.js
|
|
16351
16354
|
var provideLayer = (self, layer11, options) => scopedWith((scope3) => flatMap3(options?.local ? buildWithMemoMap(layer11, makeMemoMapUnsafe(), scope3) : buildWithScope(layer11, scope3), (context) => provideServices(self, context)));
|
|
16352
16355
|
var provide2 = /* @__PURE__ */ dual((args3) => isEffect(args3[0]), (self, source, options) => isServiceMap(source) ? provideServices(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll2(...source) : source, options));
|
|
16353
16356
|
|
|
16354
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16357
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Effect.js
|
|
16355
16358
|
var isEffect2 = isEffect;
|
|
16356
16359
|
var forEach2 = forEach;
|
|
16357
16360
|
var whileLoop2 = whileLoop;
|
|
@@ -16442,7 +16445,7 @@ var flatMapEager2 = flatMapEager;
|
|
|
16442
16445
|
var catchEager2 = catchEager;
|
|
16443
16446
|
var fnUntracedEager2 = fnUntracedEager;
|
|
16444
16447
|
|
|
16445
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16448
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Runtime.js
|
|
16446
16449
|
var defaultTeardown = (exit3, onExit4) => {
|
|
16447
16450
|
if (isSuccess3(exit3)) return onExit4(0);
|
|
16448
16451
|
if (hasInterruptsOnly2(exit3.cause)) return onExit4(130);
|
|
@@ -16488,7 +16491,7 @@ var getErrorReported = (u) => {
|
|
|
16488
16491
|
return true;
|
|
16489
16492
|
};
|
|
16490
16493
|
|
|
16491
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
16494
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/NodeRuntime.js
|
|
16492
16495
|
var runMain = /* @__PURE__ */ makeRunMain(({
|
|
16493
16496
|
fiber: fiber2,
|
|
16494
16497
|
teardown
|
|
@@ -16515,10 +16518,10 @@ var runMain = /* @__PURE__ */ makeRunMain(({
|
|
|
16515
16518
|
process.on("SIGTERM", onSigint);
|
|
16516
16519
|
});
|
|
16517
16520
|
|
|
16518
|
-
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.
|
|
16521
|
+
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.43_effect@4.0.0-beta.43_ioredis@5.10.0/node_modules/@effect/platform-node/dist/NodeRuntime.js
|
|
16519
16522
|
var runMain2 = runMain;
|
|
16520
16523
|
|
|
16521
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16524
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/record.js
|
|
16522
16525
|
function set(self, key, value2) {
|
|
16523
16526
|
if (key === "__proto__") {
|
|
16524
16527
|
Object.defineProperty(self, key, {
|
|
@@ -16533,7 +16536,7 @@ function set(self, key, value2) {
|
|
|
16533
16536
|
return self;
|
|
16534
16537
|
}
|
|
16535
16538
|
|
|
16536
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16539
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/schema/annotations.js
|
|
16537
16540
|
function resolve(ast) {
|
|
16538
16541
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
16539
16542
|
}
|
|
@@ -16547,11 +16550,11 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
|
16547
16550
|
return ast.getExpected(getExpected);
|
|
16548
16551
|
});
|
|
16549
16552
|
|
|
16550
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16553
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/RegExp.js
|
|
16551
16554
|
var RegExp2 = globalThis.RegExp;
|
|
16552
16555
|
var escape = (string6) => string6.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
16553
16556
|
|
|
16554
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16557
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Encoding.js
|
|
16555
16558
|
var EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
16556
16559
|
var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
|
|
16557
16560
|
/**
|
|
@@ -16637,10 +16640,10 @@ function getBase64Code(charCode) {
|
|
|
16637
16640
|
var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
|
|
16638
16641
|
var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
|
|
16639
16642
|
|
|
16640
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16643
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/redacted.js
|
|
16641
16644
|
var redactedRegistry = /* @__PURE__ */ new WeakMap();
|
|
16642
16645
|
|
|
16643
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16646
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Redacted.js
|
|
16644
16647
|
var TypeId7 = "~effect/data/Redacted";
|
|
16645
16648
|
var isRedacted = (u) => hasProperty(u, TypeId7);
|
|
16646
16649
|
var make5 = (value2, options) => {
|
|
@@ -16671,7 +16674,7 @@ var Proto2 = {
|
|
|
16671
16674
|
}
|
|
16672
16675
|
};
|
|
16673
16676
|
|
|
16674
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
16677
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/SchemaIssue.js
|
|
16675
16678
|
var TypeId8 = "~effect/SchemaIssue/Issue";
|
|
16676
16679
|
function isIssue(u) {
|
|
16677
16680
|
return hasProperty(u, TypeId8);
|
|
@@ -17005,7 +17008,7 @@ function formatOption(actual) {
|
|
|
17005
17008
|
return format(actual.value);
|
|
17006
17009
|
}
|
|
17007
17010
|
|
|
17008
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17011
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/SchemaGetter.js
|
|
17009
17012
|
var Getter = class _Getter extends Class {
|
|
17010
17013
|
run;
|
|
17011
17014
|
constructor(run6) {
|
|
@@ -17079,7 +17082,7 @@ function decodeBase642() {
|
|
|
17079
17082
|
})).asEffect());
|
|
17080
17083
|
}
|
|
17081
17084
|
|
|
17082
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17085
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/SchemaTransformation.js
|
|
17083
17086
|
var TypeId9 = "~effect/SchemaTransformation/Transformation";
|
|
17084
17087
|
var Transformation = class _Transformation {
|
|
17085
17088
|
[TypeId9] = TypeId9;
|
|
@@ -17147,7 +17150,7 @@ var urlFromString = /* @__PURE__ */ transformOrFail2({
|
|
|
17147
17150
|
var uint8ArrayFromBase64String = /* @__PURE__ */ new Transformation(/* @__PURE__ */ decodeBase642(), /* @__PURE__ */ encodeBase642());
|
|
17148
17151
|
var fromJsonString = /* @__PURE__ */ new Transformation(/* @__PURE__ */ parseJson(), /* @__PURE__ */ stringifyJson());
|
|
17149
17152
|
|
|
17150
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
17153
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/SchemaAST.js
|
|
17151
17154
|
function makeGuard(tag2) {
|
|
17152
17155
|
return (ast) => ast._tag === tag2;
|
|
17153
17156
|
}
|
|
@@ -18408,7 +18411,7 @@ var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast) => isStr
|
|
|
18408
18411
|
});
|
|
18409
18412
|
var unknownToStringTree = /* @__PURE__ */ new Link(StringTree, /* @__PURE__ */ passthrough2());
|
|
18410
18413
|
|
|
18411
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18414
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Brand.js
|
|
18412
18415
|
function nominal() {
|
|
18413
18416
|
return Object.assign((input) => input, {
|
|
18414
18417
|
option: (input) => some2(input),
|
|
@@ -18417,7 +18420,7 @@ function nominal() {
|
|
|
18417
18420
|
});
|
|
18418
18421
|
}
|
|
18419
18422
|
|
|
18420
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18423
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/PlatformError.js
|
|
18421
18424
|
var TypeId11 = "~effect/platform/PlatformError";
|
|
18422
18425
|
var BadArgument = class extends (/* @__PURE__ */ TaggedError2("BadArgument")) {
|
|
18423
18426
|
/**
|
|
@@ -18459,15 +18462,15 @@ var PlatformError = class extends (/* @__PURE__ */ TaggedError2("PlatformError")
|
|
|
18459
18462
|
var systemError = (options) => new PlatformError(new SystemError(options));
|
|
18460
18463
|
var badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
18461
18464
|
|
|
18462
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18465
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Fiber.js
|
|
18463
18466
|
var TypeId12 = `~effect/Fiber/${version}`;
|
|
18464
18467
|
var interrupt3 = fiberInterrupt;
|
|
18465
18468
|
var runIn = fiberRunIn;
|
|
18466
18469
|
|
|
18467
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18470
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Latch.js
|
|
18468
18471
|
var makeUnsafe4 = makeLatchUnsafe;
|
|
18469
18472
|
|
|
18470
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18473
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/MutableList.js
|
|
18471
18474
|
var Empty = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
|
|
18472
18475
|
var make8 = () => ({
|
|
18473
18476
|
head: void 0,
|
|
@@ -18538,7 +18541,7 @@ var take = (self) => {
|
|
|
18538
18541
|
return message;
|
|
18539
18542
|
};
|
|
18540
18543
|
|
|
18541
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18544
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/MutableRef.js
|
|
18542
18545
|
var TypeId13 = "~effect/MutableRef";
|
|
18543
18546
|
var MutableRefProto = {
|
|
18544
18547
|
[TypeId13]: TypeId13,
|
|
@@ -18556,7 +18559,7 @@ var make9 = (value2) => {
|
|
|
18556
18559
|
return ref;
|
|
18557
18560
|
};
|
|
18558
18561
|
|
|
18559
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18562
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Queue.js
|
|
18560
18563
|
var TypeId14 = "~effect/Queue";
|
|
18561
18564
|
var EnqueueTypeId = "~effect/Queue/Enqueue";
|
|
18562
18565
|
var DequeueTypeId = "~effect/Queue/Dequeue";
|
|
@@ -18820,7 +18823,7 @@ var finalize = (self, exit3) => {
|
|
|
18820
18823
|
openState.awaiters.clear();
|
|
18821
18824
|
};
|
|
18822
18825
|
|
|
18823
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18826
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Semaphore.js
|
|
18824
18827
|
var makeUnsafe5 = (permits) => new SemaphoreImpl(permits);
|
|
18825
18828
|
var SemaphoreImpl = class {
|
|
18826
18829
|
waiters = /* @__PURE__ */ new Set();
|
|
@@ -18905,7 +18908,7 @@ var SemaphoreImpl = class {
|
|
|
18905
18908
|
}
|
|
18906
18909
|
};
|
|
18907
18910
|
|
|
18908
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
18911
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Channel.js
|
|
18909
18912
|
var TypeId15 = "~effect/Channel";
|
|
18910
18913
|
var isChannel = (u) => hasProperty(u, TypeId15);
|
|
18911
18914
|
var ChannelProto = {
|
|
@@ -19068,7 +19071,7 @@ var runFold = /* @__PURE__ */ dual(3, (self, initial, f) => suspend2(() => {
|
|
|
19068
19071
|
}));
|
|
19069
19072
|
var toPullScoped = (self, scope3) => toTransform(self)(done2(), scope3);
|
|
19070
19073
|
|
|
19071
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19074
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/stream.js
|
|
19072
19075
|
var TypeId16 = "~effect/Stream";
|
|
19073
19076
|
var streamVariance = {
|
|
19074
19077
|
_R: identity,
|
|
@@ -19087,7 +19090,7 @@ var fromChannel = (channel) => {
|
|
|
19087
19090
|
return self;
|
|
19088
19091
|
};
|
|
19089
19092
|
|
|
19090
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19093
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Sink.js
|
|
19091
19094
|
var TypeId17 = "~effect/Sink";
|
|
19092
19095
|
var endVoid = /* @__PURE__ */ succeed6([void 0]);
|
|
19093
19096
|
var sinkVariance = {
|
|
@@ -19124,7 +19127,7 @@ var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap4(f)
|
|
|
19124
19127
|
}), catchDone(() => endVoid)));
|
|
19125
19128
|
var unwrap2 = (effect2) => fromChannel2(unwrap(map6(effect2, toChannel)));
|
|
19126
19129
|
|
|
19127
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19130
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/rcRef.js
|
|
19128
19131
|
var TypeId18 = "~effect/RcRef";
|
|
19129
19132
|
var stateEmpty = {
|
|
19130
19133
|
_tag: "Empty"
|
|
@@ -19222,11 +19225,11 @@ var get3 = /* @__PURE__ */ fnUntraced2(function* (self_) {
|
|
|
19222
19225
|
return state.value;
|
|
19223
19226
|
});
|
|
19224
19227
|
|
|
19225
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19228
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/RcRef.js
|
|
19226
19229
|
var make12 = make11;
|
|
19227
19230
|
var get4 = get3;
|
|
19228
19231
|
|
|
19229
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19232
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Stream.js
|
|
19230
19233
|
var TypeId19 = "~effect/Stream";
|
|
19231
19234
|
var isStream = (u) => hasProperty(u, TypeId19);
|
|
19232
19235
|
var fromChannel3 = fromChannel;
|
|
@@ -19278,7 +19281,7 @@ var runCollect = (self) => runFold(self.channel, () => [], (acc, chunk) => {
|
|
|
19278
19281
|
});
|
|
19279
19282
|
var mkString = (self) => runFold(self.channel, () => "", (acc, chunk) => acc + chunk.join(""));
|
|
19280
19283
|
|
|
19281
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19284
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/FileSystem.js
|
|
19282
19285
|
var TypeId20 = "~effect/platform/FileSystem";
|
|
19283
19286
|
var Size = (bytes) => typeof bytes === "bigint" ? bytes : BigInt(bytes);
|
|
19284
19287
|
var bigint1024 = /* @__PURE__ */ BigInt(1024);
|
|
@@ -19340,7 +19343,7 @@ var FileDescriptor = /* @__PURE__ */ nominal();
|
|
|
19340
19343
|
var WatchBackend = class extends (/* @__PURE__ */ Service()("effect/platform/FileSystem/WatchBackend")) {
|
|
19341
19344
|
};
|
|
19342
19345
|
|
|
19343
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19346
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Path.js
|
|
19344
19347
|
var TypeId21 = "~effect/platform/Path";
|
|
19345
19348
|
var Path = /* @__PURE__ */ Service("effect/Path");
|
|
19346
19349
|
function normalizeStringPosix(path4, allowAboveRoot) {
|
|
@@ -19808,7 +19811,7 @@ var posixImpl = /* @__PURE__ */ Path.of({
|
|
|
19808
19811
|
toNamespacedPath: identity
|
|
19809
19812
|
});
|
|
19810
19813
|
|
|
19811
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19814
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/process/ChildProcessSpawner.js
|
|
19812
19815
|
var ExitCode = /* @__PURE__ */ nominal();
|
|
19813
19816
|
var ProcessId = /* @__PURE__ */ nominal();
|
|
19814
19817
|
var HandleTypeId = "~effect/ChildProcessSpawner/ChildProcessHandle";
|
|
@@ -19838,7 +19841,7 @@ var make14 = (spawn2) => {
|
|
|
19838
19841
|
var ChildProcessSpawner = class extends (/* @__PURE__ */ Service()("effect/process/ChildProcessSpawner")) {
|
|
19839
19842
|
};
|
|
19840
19843
|
|
|
19841
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
19844
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/process/ChildProcess.js
|
|
19842
19845
|
var TypeId22 = "~effect/unstable/process/ChildProcess";
|
|
19843
19846
|
var Proto3 = {
|
|
19844
19847
|
...PipeInspectableProto,
|
|
@@ -19961,10 +19964,10 @@ var splitByWhitespaces = (template, rawTemplate) => {
|
|
|
19961
19964
|
};
|
|
19962
19965
|
var concatTokens = (prevTokens, nextTokens, isSeparated) => isSeparated || prevTokens.length === 0 || nextTokens.length === 0 ? [...prevTokens, ...nextTokens] : [...prevTokens.slice(0, -1), `${prevTokens.at(-1)}${nextTokens.at(0)}`, ...nextTokens.slice(1)];
|
|
19963
19966
|
|
|
19964
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
19967
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
19965
19968
|
var NodeChildProcess = __toESM(require("child_process"), 1);
|
|
19966
19969
|
|
|
19967
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
19970
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/internal/utils.js
|
|
19968
19971
|
var handleErrnoException = (module2, method) => (err, [path4]) => {
|
|
19969
19972
|
let reason = "Unknown";
|
|
19970
19973
|
switch (err.code) {
|
|
@@ -20000,7 +20003,7 @@ var handleErrnoException = (module2, method) => (err, [path4]) => {
|
|
|
20000
20003
|
});
|
|
20001
20004
|
};
|
|
20002
20005
|
|
|
20003
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
20006
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/NodeSink.js
|
|
20004
20007
|
var fromWritable = (options) => fromChannel2(mapDone(fromWritableChannel(options), (_) => [_]));
|
|
20005
20008
|
var fromWritableChannel = (options) => fromTransform((pull) => {
|
|
20006
20009
|
const writable = options.evaluate();
|
|
@@ -20040,7 +20043,7 @@ var pullIntoWritable = (options) => options.pull.pipe(flatMap4((chunk) => {
|
|
|
20040
20043
|
});
|
|
20041
20044
|
}) : identity);
|
|
20042
20045
|
|
|
20043
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
20046
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/NodeStream.js
|
|
20044
20047
|
var import_node_stream = require("stream");
|
|
20045
20048
|
var fromReadable = (options) => fromChannel3(fromReadableChannel(options));
|
|
20046
20049
|
var fromReadableChannel = (options) => fromTransform((_, scope3) => readableToPullUnsafe({
|
|
@@ -20098,7 +20101,7 @@ var readableToPullUnsafe = (options) => {
|
|
|
20098
20101
|
};
|
|
20099
20102
|
var defaultOnError = (error2) => new UnknownError2(error2);
|
|
20100
20103
|
|
|
20101
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
20104
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
20102
20105
|
var toError = (error2) => error2 instanceof globalThis.Error ? error2 : new globalThis.Error(String(error2));
|
|
20103
20106
|
var toPlatformError = (method, error2, command) => {
|
|
20104
20107
|
const {
|
|
@@ -20342,7 +20345,7 @@ var make17 = /* @__PURE__ */ gen2(function* () {
|
|
|
20342
20345
|
const killSignal = options?.killSignal ?? "SIGTERM";
|
|
20343
20346
|
return isUndefined(options?.forceKillAfter) ? kill(command, childProcess, killSignal) : timeoutOrElse2(kill(command, childProcess, killSignal), {
|
|
20344
20347
|
duration: options.forceKillAfter,
|
|
20345
|
-
|
|
20348
|
+
orElse: () => kill(command, childProcess, "SIGKILL")
|
|
20346
20349
|
});
|
|
20347
20350
|
};
|
|
20348
20351
|
const getSourceStream = (handle, from) => {
|
|
@@ -20510,7 +20513,7 @@ var flattenCommand = (command) => {
|
|
|
20510
20513
|
};
|
|
20511
20514
|
};
|
|
20512
20515
|
|
|
20513
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
20516
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
|
|
20514
20517
|
var Crypto = __toESM(require("crypto"), 1);
|
|
20515
20518
|
var NFS = __toESM(require("fs"), 1);
|
|
20516
20519
|
var OS = __toESM(require("os"), 1);
|
|
@@ -20885,10 +20888,10 @@ var makeFileSystem = /* @__PURE__ */ map6(/* @__PURE__ */ serviceOption2(WatchBa
|
|
|
20885
20888
|
}));
|
|
20886
20889
|
var layer2 = /* @__PURE__ */ effect(FileSystem)(makeFileSystem);
|
|
20887
20890
|
|
|
20888
|
-
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.
|
|
20891
|
+
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.43_effect@4.0.0-beta.43_ioredis@5.10.0/node_modules/@effect/platform-node/dist/NodeFileSystem.js
|
|
20889
20892
|
var layer3 = layer2;
|
|
20890
20893
|
|
|
20891
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
20894
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/NodePath.js
|
|
20892
20895
|
var NodePath = __toESM(require("path"), 1);
|
|
20893
20896
|
var NodeUrl = __toESM(require("url"), 1);
|
|
20894
20897
|
var fromFileUrl2 = (url) => try_2({
|
|
@@ -20926,10 +20929,10 @@ var layer4 = /* @__PURE__ */ succeed5(Path)({
|
|
|
20926
20929
|
toFileUrl: toFileUrl2
|
|
20927
20930
|
});
|
|
20928
20931
|
|
|
20929
|
-
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.
|
|
20932
|
+
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.43_effect@4.0.0-beta.43_ioredis@5.10.0/node_modules/@effect/platform-node/dist/NodePath.js
|
|
20930
20933
|
var layer5 = layer4;
|
|
20931
20934
|
|
|
20932
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
20935
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Stdio.js
|
|
20933
20936
|
var TypeId23 = "~effect/Stdio";
|
|
20934
20937
|
var Stdio = /* @__PURE__ */ Service(TypeId23);
|
|
20935
20938
|
var make18 = (options) => ({
|
|
@@ -20937,7 +20940,7 @@ var make18 = (options) => ({
|
|
|
20937
20940
|
...options
|
|
20938
20941
|
});
|
|
20939
20942
|
|
|
20940
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
20943
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/NodeStdio.js
|
|
20941
20944
|
var layer6 = /* @__PURE__ */ succeed5(Stdio, /* @__PURE__ */ make18({
|
|
20942
20945
|
args: /* @__PURE__ */ sync2(() => process.argv.slice(2)),
|
|
20943
20946
|
stdout: (options) => fromWritable({
|
|
@@ -20972,13 +20975,13 @@ var layer6 = /* @__PURE__ */ succeed5(Stdio, /* @__PURE__ */ make18({
|
|
|
20972
20975
|
})
|
|
20973
20976
|
}));
|
|
20974
20977
|
|
|
20975
|
-
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.
|
|
20978
|
+
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.43_effect@4.0.0-beta.43_ioredis@5.10.0/node_modules/@effect/platform-node/dist/NodeStdio.js
|
|
20976
20979
|
var layer7 = layer6;
|
|
20977
20980
|
|
|
20978
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
20981
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Struct.js
|
|
20979
20982
|
var lambda = (f) => f;
|
|
20980
20983
|
|
|
20981
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
20984
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/SchemaParser.js
|
|
20982
20985
|
var recurDefaults = /* @__PURE__ */ memoize((ast) => {
|
|
20983
20986
|
switch (ast._tag) {
|
|
20984
20987
|
case "Declaration": {
|
|
@@ -21116,7 +21119,7 @@ var recur = /* @__PURE__ */ memoize((ast) => {
|
|
|
21116
21119
|
};
|
|
21117
21120
|
});
|
|
21118
21121
|
|
|
21119
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
21122
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/schema/schema.js
|
|
21120
21123
|
var TypeId24 = "~effect/Schema/Schema";
|
|
21121
21124
|
var SchemaProto = {
|
|
21122
21125
|
[TypeId24]: TypeId24,
|
|
@@ -21145,7 +21148,7 @@ function make19(ast, options) {
|
|
|
21145
21148
|
return self;
|
|
21146
21149
|
}
|
|
21147
21150
|
|
|
21148
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
21151
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/internal/schema/to-codec.js
|
|
21149
21152
|
function makeReorder(getPriority) {
|
|
21150
21153
|
return (types) => {
|
|
21151
21154
|
const indexMap = /* @__PURE__ */ new Map();
|
|
@@ -21166,7 +21169,7 @@ function makeReorder(getPriority) {
|
|
|
21166
21169
|
};
|
|
21167
21170
|
}
|
|
21168
21171
|
|
|
21169
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
21172
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Schema.js
|
|
21170
21173
|
var TypeId25 = TypeId24;
|
|
21171
21174
|
function declareConstructor() {
|
|
21172
21175
|
return (typeParameters, run6, annotations) => {
|
|
@@ -21267,7 +21270,7 @@ function makeTuple(ast, elements) {
|
|
|
21267
21270
|
function Tuple(elements) {
|
|
21268
21271
|
return makeTuple(tuple(elements), elements);
|
|
21269
21272
|
}
|
|
21270
|
-
var
|
|
21273
|
+
var ArraySchema = /* @__PURE__ */ lambda((schema) => make20(new Arrays(false, [], [schema.ast]), {
|
|
21271
21274
|
schema
|
|
21272
21275
|
}));
|
|
21273
21276
|
function makeUnion(ast, members) {
|
|
@@ -21556,7 +21559,7 @@ var FormData2 = /* @__PURE__ */ instanceOf(globalThis.FormData, {
|
|
|
21556
21559
|
Type: `globalThis.FormData`
|
|
21557
21560
|
},
|
|
21558
21561
|
expected: "FormData",
|
|
21559
|
-
toCodecJson: () => link3()(
|
|
21562
|
+
toCodecJson: () => link3()(ArraySchema(Tuple([String6, Union2([Struct({
|
|
21560
21563
|
_tag: tag("String"),
|
|
21561
21564
|
value: String6
|
|
21562
21565
|
}), Struct({
|
|
@@ -21838,7 +21841,7 @@ function onSerializerEnsureArray(ast) {
|
|
|
21838
21841
|
}
|
|
21839
21842
|
}
|
|
21840
21843
|
|
|
21841
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
21844
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Terminal.js
|
|
21842
21845
|
var TypeId26 = "~effect/platform/Terminal";
|
|
21843
21846
|
var QuitErrorTypeId = "effect/platform/Terminal/QuitError";
|
|
21844
21847
|
var QuitError = class extends (/* @__PURE__ */ ErrorClass("QuitError")({
|
|
@@ -21856,7 +21859,7 @@ var make21 = (impl) => Terminal.of({
|
|
|
21856
21859
|
[TypeId26]: TypeId26
|
|
21857
21860
|
});
|
|
21858
21861
|
|
|
21859
|
-
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.
|
|
21862
|
+
// ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.43_effect@4.0.0-beta.43/node_modules/@effect/platform-node-shared/dist/NodeTerminal.js
|
|
21860
21863
|
var readline = __toESM(require("readline"), 1);
|
|
21861
21864
|
var make22 = /* @__PURE__ */ fnUntraced2(function* (shouldQuit = defaultShouldQuit) {
|
|
21862
21865
|
const stdin = process.stdin;
|
|
@@ -21927,13 +21930,13 @@ function defaultShouldQuit(input) {
|
|
|
21927
21930
|
return input.key.ctrl && (input.key.name === "c" || input.key.name === "d");
|
|
21928
21931
|
}
|
|
21929
21932
|
|
|
21930
|
-
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.
|
|
21933
|
+
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.43_effect@4.0.0-beta.43_ioredis@5.10.0/node_modules/@effect/platform-node/dist/NodeTerminal.js
|
|
21931
21934
|
var layer9 = layer8;
|
|
21932
21935
|
|
|
21933
|
-
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.
|
|
21936
|
+
// ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.43_effect@4.0.0-beta.43_ioredis@5.10.0/node_modules/@effect/platform-node/dist/NodeServices.js
|
|
21934
21937
|
var layer10 = /* @__PURE__ */ provideMerge(layer, /* @__PURE__ */ mergeAll2(layer3, layer5, layer7, layer9));
|
|
21935
21938
|
|
|
21936
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
21939
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Console.js
|
|
21937
21940
|
var Console = ConsoleRef;
|
|
21938
21941
|
var consoleWith = (f) => withFiber((fiber2) => f(fiber2.getRef(Console)));
|
|
21939
21942
|
var error = (...args3) => consoleWith((console2) => sync(() => {
|
|
@@ -21943,7 +21946,7 @@ var log = (...args3) => consoleWith((console2) => sync(() => {
|
|
|
21943
21946
|
console2.log(...args3);
|
|
21944
21947
|
}));
|
|
21945
21948
|
|
|
21946
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
21949
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/ConfigProvider.js
|
|
21947
21950
|
var import_meta = {};
|
|
21948
21951
|
function makeValue(value2) {
|
|
21949
21952
|
return {
|
|
@@ -22036,7 +22039,7 @@ function trieNodeAt(root, path4) {
|
|
|
22036
22039
|
return node;
|
|
22037
22040
|
}
|
|
22038
22041
|
|
|
22039
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
22042
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Config.js
|
|
22040
22043
|
var TypeId27 = "~effect/Config";
|
|
22041
22044
|
var ConfigError = class {
|
|
22042
22045
|
_tag = "ConfigError";
|
|
@@ -22124,7 +22127,7 @@ function succeed8(value2) {
|
|
|
22124
22127
|
return make24(() => succeed6(value2));
|
|
22125
22128
|
}
|
|
22126
22129
|
|
|
22127
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
22130
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/CliError.js
|
|
22128
22131
|
var CliError_exports = {};
|
|
22129
22132
|
__export(CliError_exports, {
|
|
22130
22133
|
DuplicateOption: () => DuplicateOption,
|
|
@@ -22142,8 +22145,8 @@ var isCliError = (u) => hasProperty(u, TypeId28);
|
|
|
22142
22145
|
var UnrecognizedOption = class extends (/* @__PURE__ */ ErrorClass(`${TypeId28}/UnrecognizedOption`)({
|
|
22143
22146
|
_tag: /* @__PURE__ */ tag("UnrecognizedOption"),
|
|
22144
22147
|
option: String6,
|
|
22145
|
-
command: /* @__PURE__ */ optional(/* @__PURE__ */
|
|
22146
|
-
suggestions: /* @__PURE__ */
|
|
22148
|
+
command: /* @__PURE__ */ optional(/* @__PURE__ */ ArraySchema(String6)),
|
|
22149
|
+
suggestions: /* @__PURE__ */ ArraySchema(String6)
|
|
22147
22150
|
})) {
|
|
22148
22151
|
/**
|
|
22149
22152
|
* @since 4.0.0
|
|
@@ -22232,8 +22235,8 @@ var InvalidValue2 = class extends (/* @__PURE__ */ ErrorClass(`${TypeId28}/Inval
|
|
|
22232
22235
|
var UnknownSubcommand = class extends (/* @__PURE__ */ ErrorClass(`${TypeId28}/UnknownSubcommand`)({
|
|
22233
22236
|
_tag: /* @__PURE__ */ tag("UnknownSubcommand"),
|
|
22234
22237
|
subcommand: String6,
|
|
22235
|
-
parent: /* @__PURE__ */ optional(/* @__PURE__ */
|
|
22236
|
-
suggestions: /* @__PURE__ */
|
|
22238
|
+
parent: /* @__PURE__ */ optional(/* @__PURE__ */ ArraySchema(String6)),
|
|
22239
|
+
suggestions: /* @__PURE__ */ ArraySchema(String6)
|
|
22237
22240
|
})) {
|
|
22238
22241
|
/**
|
|
22239
22242
|
* @since 4.0.0
|
|
@@ -22262,8 +22265,8 @@ var UserError = class extends (/* @__PURE__ */ ErrorClass(`${TypeId28}/UserError
|
|
|
22262
22265
|
var NonShowHelpErrors = /* @__PURE__ */ Union2([UnrecognizedOption, DuplicateOption, MissingOption, MissingArgument, InvalidValue2, UnknownSubcommand, UserError]);
|
|
22263
22266
|
var ShowHelp = class extends (/* @__PURE__ */ ErrorClass(`${TypeId28}/ShowHelp`)({
|
|
22264
22267
|
_tag: /* @__PURE__ */ tag("ShowHelp"),
|
|
22265
|
-
commandPath: /* @__PURE__ */
|
|
22266
|
-
errors: /* @__PURE__ */
|
|
22268
|
+
commandPath: /* @__PURE__ */ ArraySchema(String6),
|
|
22269
|
+
errors: /* @__PURE__ */ ArraySchema(NonShowHelpErrors)
|
|
22267
22270
|
})) {
|
|
22268
22271
|
[TypeId28] = TypeId28;
|
|
22269
22272
|
[errorExitCode] = this.errors.length ? 1 : 0;
|
|
@@ -22273,7 +22276,7 @@ var ShowHelp = class extends (/* @__PURE__ */ ErrorClass(`${TypeId28}/ShowHelp`)
|
|
|
22273
22276
|
}
|
|
22274
22277
|
};
|
|
22275
22278
|
|
|
22276
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
22279
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/Primitive.js
|
|
22277
22280
|
var Ini = __toESM(require_ini(), 1);
|
|
22278
22281
|
var Toml = __toESM(require_toml(), 1);
|
|
22279
22282
|
var Yaml = __toESM(require_dist(), 1);
|
|
@@ -22424,7 +22427,7 @@ var getTypeName = (primitive) => {
|
|
|
22424
22427
|
};
|
|
22425
22428
|
var getChoiceKeys = (primitive) => primitive._tag === "Choice" ? primitive.choiceKeys : void 0;
|
|
22426
22429
|
|
|
22427
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
22430
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/ansi.js
|
|
22428
22431
|
var ESC = "\x1B[";
|
|
22429
22432
|
var BEL = "\x07";
|
|
22430
22433
|
var SEP = ";";
|
|
@@ -22481,7 +22484,7 @@ var eraseLines = (rows) => {
|
|
|
22481
22484
|
return command;
|
|
22482
22485
|
};
|
|
22483
22486
|
|
|
22484
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
22487
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/Prompt.js
|
|
22485
22488
|
var TypeId30 = "~effect/cli/Prompt";
|
|
22486
22489
|
var defaultFigures = {
|
|
22487
22490
|
arrowUp: "\u2191",
|
|
@@ -23178,7 +23181,7 @@ var renderMultiSelectChoices = (state, options, figures2, renderOptions) => {
|
|
|
23178
23181
|
const isSelected = state.selectedIndices.has(choiceIndex);
|
|
23179
23182
|
const checkbox = isSelected ? figures2.checkboxOn : figures2.checkboxOff;
|
|
23180
23183
|
const annotatedCheckbox = isHighlighted && renderOptions?.plain !== true ? annotate2(checkbox, cyanBright) : checkbox;
|
|
23181
|
-
const title = choice4.title;
|
|
23184
|
+
const title = isHighlighted && renderOptions?.plain !== true ? annotate2(choice4.title, cyanBright) : choice4.title;
|
|
23182
23185
|
const description = renderChoiceDescription(choice4, isHighlighted, renderOptions);
|
|
23183
23186
|
documents.push(prefix + " " + annotatedCheckbox + " " + title + " " + description);
|
|
23184
23187
|
}
|
|
@@ -23486,7 +23489,7 @@ var entriesToDisplay = (cursor, total, maxVisible) => {
|
|
|
23486
23489
|
};
|
|
23487
23490
|
};
|
|
23488
23491
|
|
|
23489
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
23492
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/Param.js
|
|
23490
23493
|
var TypeId31 = "~effect/cli/Param";
|
|
23491
23494
|
var argumentKind = "argument";
|
|
23492
23495
|
var flagKind = "flag";
|
|
@@ -23914,7 +23917,7 @@ var getParamMetadata = (param) => {
|
|
|
23914
23917
|
});
|
|
23915
23918
|
};
|
|
23916
23919
|
|
|
23917
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
23920
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/CliOutput.js
|
|
23918
23921
|
var Formatter = /* @__PURE__ */ Reference("effect/cli/CliOutput", {
|
|
23919
23922
|
defaultValue: () => defaultFormatter2()
|
|
23920
23923
|
});
|
|
@@ -24106,7 +24109,7 @@ var formatHelpDocImpl = (doc, colors2) => {
|
|
|
24106
24109
|
return sections.join("\n");
|
|
24107
24110
|
};
|
|
24108
24111
|
|
|
24109
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24112
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/Command.js
|
|
24110
24113
|
var Command_exports = {};
|
|
24111
24114
|
__export(Command_exports, {
|
|
24112
24115
|
annotate: () => annotate3,
|
|
@@ -24129,7 +24132,7 @@ __export(Command_exports, {
|
|
|
24129
24132
|
withSubcommands: () => withSubcommands
|
|
24130
24133
|
});
|
|
24131
24134
|
|
|
24132
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24135
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/completions/bash.js
|
|
24133
24136
|
var escapeForBash = (s) => s.replace(/'/g, "'\\''");
|
|
24134
24137
|
var sanitizeFunctionName = (s) => s.replace(/[^a-zA-Z0-9_]/g, "_");
|
|
24135
24138
|
var flagNamesForWordlist = (flag) => {
|
|
@@ -24291,7 +24294,7 @@ var generate = (executableName, descriptor) => {
|
|
|
24291
24294
|
return lines2.join("\n");
|
|
24292
24295
|
};
|
|
24293
24296
|
|
|
24294
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24297
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/completions/fish.js
|
|
24295
24298
|
var escapeFishString = (s) => s.replace(/'/g, "\\'");
|
|
24296
24299
|
var subcommandCondition = (parentPath, childSubcommandNames) => {
|
|
24297
24300
|
if (parentPath.length === 0) {
|
|
@@ -24459,7 +24462,7 @@ var generate2 = (executableName, descriptor) => {
|
|
|
24459
24462
|
return lines2.join("\n");
|
|
24460
24463
|
};
|
|
24461
24464
|
|
|
24462
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24465
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/completions/zsh.js
|
|
24463
24466
|
var escapeZsh = (s) => s.replace(/\\/g, "\\\\").replace(/'/g, "'\\''").replace(/:/g, "\\:");
|
|
24464
24467
|
var sanitize = (s) => s.replace(/[^a-zA-Z0-9_]/g, "_");
|
|
24465
24468
|
var allForms = (flag) => {
|
|
@@ -24617,7 +24620,7 @@ var generate3 = (executableName, descriptor) => {
|
|
|
24617
24620
|
return lines2.join("\n");
|
|
24618
24621
|
};
|
|
24619
24622
|
|
|
24620
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24623
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/Completions.js
|
|
24621
24624
|
var generate4 = (executableName, shell, descriptor) => {
|
|
24622
24625
|
switch (shell) {
|
|
24623
24626
|
case "bash":
|
|
@@ -24629,7 +24632,7 @@ var generate4 = (executableName, shell, descriptor) => {
|
|
|
24629
24632
|
}
|
|
24630
24633
|
};
|
|
24631
24634
|
|
|
24632
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24635
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/Flag.js
|
|
24633
24636
|
var Flag_exports = {};
|
|
24634
24637
|
__export(Flag_exports, {
|
|
24635
24638
|
atLeast: () => atLeast2,
|
|
@@ -24702,7 +24705,7 @@ var orElse4 = /* @__PURE__ */ dual(2, (self, that) => orElse3(self, that));
|
|
|
24702
24705
|
var orElseResult2 = /* @__PURE__ */ dual(2, (self, that) => orElseResult(self, that));
|
|
24703
24706
|
var withSchema2 = /* @__PURE__ */ dual(2, (self, schema) => withSchema(self, schema));
|
|
24704
24707
|
|
|
24705
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24708
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/config.js
|
|
24706
24709
|
var ConfigInternalTypeId = "~effect/cli/Command/Config/Internal";
|
|
24707
24710
|
var parseConfig = (config2) => {
|
|
24708
24711
|
const orderedParams = [];
|
|
@@ -24806,7 +24809,7 @@ var reconstructTree = (tree, results) => {
|
|
|
24806
24809
|
}
|
|
24807
24810
|
};
|
|
24808
24811
|
|
|
24809
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24812
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/command.js
|
|
24810
24813
|
var TypeId32 = "~effect/cli/Command";
|
|
24811
24814
|
var toImpl = (self) => self;
|
|
24812
24815
|
var Proto8 = {
|
|
@@ -24922,10 +24925,20 @@ var toFlagDoc = (single) => {
|
|
|
24922
24925
|
name: single.name,
|
|
24923
24926
|
aliases: formattedAliases,
|
|
24924
24927
|
type: single.typeName ?? getTypeName(single.primitiveType),
|
|
24925
|
-
description: single.description,
|
|
24928
|
+
description: appendChoiceKeys(single.description, getChoiceKeys(single.primitiveType)),
|
|
24926
24929
|
required: single.primitiveType._tag !== "Boolean"
|
|
24927
24930
|
};
|
|
24928
24931
|
};
|
|
24932
|
+
var appendChoiceKeys = (description, choiceKeys) => {
|
|
24933
|
+
if (choiceKeys === void 0 || choiceKeys.length === 0) {
|
|
24934
|
+
return description;
|
|
24935
|
+
}
|
|
24936
|
+
const choiceSuffix = `(choices: ${choiceKeys.join(", ")})`;
|
|
24937
|
+
return match(description, {
|
|
24938
|
+
onNone: () => some2(choiceSuffix),
|
|
24939
|
+
onSome: (value2) => some2(`${value2} ${choiceSuffix}`)
|
|
24940
|
+
});
|
|
24941
|
+
};
|
|
24929
24942
|
var makeParser = (cfg) => fnUntraced2(function* (input) {
|
|
24930
24943
|
const parsedArgs = {
|
|
24931
24944
|
flags: input.flags,
|
|
@@ -24976,7 +24989,7 @@ var checkForDuplicateFlags = (parent, subcommands, options) => {
|
|
|
24976
24989
|
}
|
|
24977
24990
|
};
|
|
24978
24991
|
|
|
24979
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
24992
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/completions/CommandDescriptor.js
|
|
24980
24993
|
var toFlagType = (single) => {
|
|
24981
24994
|
const tag2 = single.primitiveType._tag;
|
|
24982
24995
|
switch (tag2) {
|
|
@@ -25099,7 +25112,7 @@ var fromCommand = (cmd) => {
|
|
|
25099
25112
|
};
|
|
25100
25113
|
};
|
|
25101
25114
|
|
|
25102
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25115
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/help.js
|
|
25103
25116
|
var dedupeGlobalFlags = (flags) => {
|
|
25104
25117
|
const seen = /* @__PURE__ */ new Set();
|
|
25105
25118
|
const deduped = [];
|
|
@@ -25198,7 +25211,7 @@ var getHelpForCommandPath = (command, commandPath, builtIns) => gen2(function* (
|
|
|
25198
25211
|
};
|
|
25199
25212
|
});
|
|
25200
25213
|
|
|
25201
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25214
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/GlobalFlag.js
|
|
25202
25215
|
var action = (options) => ({
|
|
25203
25216
|
_tag: "Action",
|
|
25204
25217
|
flag: options.flag,
|
|
@@ -25250,7 +25263,7 @@ var LogLevel = /* @__PURE__ */ setting("log-level")({
|
|
|
25250
25263
|
});
|
|
25251
25264
|
var BuiltIns = [Help, Version, Completions, LogLevel];
|
|
25252
25265
|
|
|
25253
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25266
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/lexer.js
|
|
25254
25267
|
function lex(argv) {
|
|
25255
25268
|
const endIndex = argv.indexOf("--");
|
|
25256
25269
|
if (endIndex === -1) {
|
|
@@ -25311,7 +25324,7 @@ var lexTokens = (args3) => {
|
|
|
25311
25324
|
return tokens;
|
|
25312
25325
|
};
|
|
25313
25326
|
|
|
25314
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25327
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/auto-suggest.js
|
|
25315
25328
|
var levenshtein = (a, b) => {
|
|
25316
25329
|
const m = a.length;
|
|
25317
25330
|
const n = b.length;
|
|
@@ -25335,7 +25348,7 @@ var suggest = (input, candidates) => {
|
|
|
25335
25348
|
return distances.filter(([d]) => d === minDistance).map(([, c]) => c);
|
|
25336
25349
|
};
|
|
25337
25350
|
|
|
25338
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25351
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/internal/parser.js
|
|
25339
25352
|
var getCommandPath = (parsedInput) => match(parsedInput.subcommand, {
|
|
25340
25353
|
onNone: () => [],
|
|
25341
25354
|
onSome: (subcommand) => [subcommand.name, ...getCommandPath(subcommand.parsedInput)]
|
|
@@ -25619,7 +25632,7 @@ var scanCommandLevel = (tokens, context) => {
|
|
|
25619
25632
|
return toLeafResult(state);
|
|
25620
25633
|
};
|
|
25621
25634
|
|
|
25622
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
25635
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/unstable/cli/Command.js
|
|
25623
25636
|
var isCommand = (u) => hasProperty(u, TypeId32);
|
|
25624
25637
|
var make25 = (name, config2, handler) => {
|
|
25625
25638
|
const parsedConfig = parseConfig(config2 ?? {});
|
|
@@ -25933,7 +25946,7 @@ var runWith2 = (command, config2) => {
|
|
|
25933
25946
|
program = provideService2(program, LogLevel, logLevel);
|
|
25934
25947
|
const services3 = match(logLevel, {
|
|
25935
25948
|
onNone: () => empty2(),
|
|
25936
|
-
onSome: (level) => make3(
|
|
25949
|
+
onSome: (level) => make3(MinimumLogLevel2, level)
|
|
25937
25950
|
});
|
|
25938
25951
|
yield* provideServices2(program, services3);
|
|
25939
25952
|
}, catchFilter2((error2) => isCliError(error2) && error2._tag === "ShowHelp" ? succeed2(error2) : fail2(error2), (error2) => andThen2(showHelp(command, error2), fail6(error2))), catchFilter2((e) => isQuitError(e) ? succeed2(e) : fail2(e), (_) => interrupt2));
|
|
@@ -25942,7 +25955,7 @@ var runWith2 = (command, config2) => {
|
|
|
25942
25955
|
// package.json
|
|
25943
25956
|
var package_default = {
|
|
25944
25957
|
name: "@effect/language-service",
|
|
25945
|
-
version: "0.
|
|
25958
|
+
version: "0.85.0",
|
|
25946
25959
|
publishConfig: {
|
|
25947
25960
|
access: "public",
|
|
25948
25961
|
directory: "dist"
|
|
@@ -25985,16 +25998,16 @@ var package_default = {
|
|
|
25985
25998
|
perf: "tsx test/perf.ts"
|
|
25986
25999
|
},
|
|
25987
26000
|
devDependencies: {
|
|
25988
|
-
"@effect/platform-node": "^4.0.0-beta.
|
|
26001
|
+
"@effect/platform-node": "^4.0.0-beta.43",
|
|
25989
26002
|
"@types/pako": "^2.0.4",
|
|
25990
26003
|
"@typescript-eslint/project-service": "^8.52.0",
|
|
25991
|
-
effect: "^4.0.0-beta.
|
|
26004
|
+
effect: "^4.0.0-beta.43",
|
|
25992
26005
|
pako: "^2.1.0",
|
|
25993
26006
|
"ts-patch": "^3.3.0"
|
|
25994
26007
|
}
|
|
25995
26008
|
};
|
|
25996
26009
|
|
|
25997
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
26010
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.43/node_modules/effect/dist/Graph.js
|
|
25998
26011
|
var TypeId33 = "~effect/collections/Graph";
|
|
25999
26012
|
var Edge = class extends Class3 {
|
|
26000
26013
|
};
|
|
@@ -29664,33 +29677,33 @@ function make26(ts, tsUtils, typeChecker, typeCheckerUtils, program) {
|
|
|
29664
29677
|
),
|
|
29665
29678
|
([Identifier, Service2]) => ({ Identifier, Service: Service2 })
|
|
29666
29679
|
);
|
|
29667
|
-
const serviceVarianceStruct = (type, atLocation) => map12(
|
|
29668
|
-
all3(
|
|
29669
|
-
varianceStructInvariantType(type, atLocation, "_Identifier"),
|
|
29670
|
-
varianceStructInvariantType(type, atLocation, "_Service")
|
|
29671
|
-
),
|
|
29672
|
-
([Identifier, Service2]) => ({ Identifier, Service: Service2 })
|
|
29673
|
-
);
|
|
29674
29680
|
const serviceType = cachedBy(
|
|
29675
29681
|
fn3("TypeParser.serviceType")(function* (type, atLocation) {
|
|
29682
|
+
if (supportedEffect() !== "v4") return yield* typeParserIssue("v4 only");
|
|
29676
29683
|
yield* pipeableType(type, atLocation);
|
|
29677
|
-
const
|
|
29678
|
-
|
|
29679
|
-
|
|
29680
|
-
if (propertiesSymbols.length === 0) {
|
|
29681
|
-
return yield* typeParserIssue("Type has no tag variance struct", type, atLocation);
|
|
29684
|
+
const typeIdSymbol = typeChecker.getPropertyOfType(type, "~effect/ServiceMap/Service");
|
|
29685
|
+
if (!typeIdSymbol) {
|
|
29686
|
+
return yield* typeParserIssue("Type has no service key type id", type, atLocation);
|
|
29682
29687
|
}
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
29688
|
+
const identifierSymbol = typeChecker.getPropertyOfType(type, "Identifier");
|
|
29689
|
+
if (!identifierSymbol) {
|
|
29690
|
+
return yield* typeParserIssue("Type has no 'Identifier' property", type, atLocation);
|
|
29691
|
+
}
|
|
29692
|
+
const serviceSymbol = typeChecker.getPropertyOfType(type, "Service");
|
|
29693
|
+
if (!serviceSymbol) {
|
|
29694
|
+
return yield* typeParserIssue("Type has no 'Service' property", type, atLocation);
|
|
29695
|
+
}
|
|
29696
|
+
return {
|
|
29697
|
+
Identifier: typeChecker.getTypeOfSymbolAtLocation(identifierSymbol, atLocation),
|
|
29698
|
+
Service: typeChecker.getTypeOfSymbolAtLocation(serviceSymbol, atLocation)
|
|
29699
|
+
};
|
|
29688
29700
|
}),
|
|
29689
29701
|
"TypeParser.serviceType",
|
|
29690
29702
|
(type) => type
|
|
29691
29703
|
);
|
|
29692
29704
|
const contextTag = cachedBy(
|
|
29693
29705
|
fn3("TypeParser.contextTag")(function* (type, atLocation) {
|
|
29706
|
+
if (supportedEffect() !== "v3") return yield* typeParserIssue("v3 only");
|
|
29694
29707
|
yield* pipeableType(type, atLocation);
|
|
29695
29708
|
const propertiesSymbols = typeChecker.getPropertiesOfType(type).filter(
|
|
29696
29709
|
(_) => _.flags & ts.SymbolFlags.Property && !(_.flags & ts.SymbolFlags.Optional) && _.valueDeclaration
|
|
@@ -29831,6 +29844,19 @@ function make26(ts, tsUtils, typeChecker, typeCheckerUtils, program) {
|
|
|
29831
29844
|
"TypeParser.promiseLike",
|
|
29832
29845
|
(type) => type
|
|
29833
29846
|
);
|
|
29847
|
+
const promiseType = cachedBy(
|
|
29848
|
+
function(type, atLocation) {
|
|
29849
|
+
const promiseSymbol = typeChecker.resolveName("Promise", void 0, ts.SymbolFlags.Type, false);
|
|
29850
|
+
if (!promiseSymbol) return typeParserIssue("global Promise type not found", type, atLocation);
|
|
29851
|
+
const globalPromiseType = typeChecker.getDeclaredTypeOfSymbol(promiseSymbol);
|
|
29852
|
+
if (type === globalPromiseType || "target" in type && type.target === globalPromiseType || typeChecker.isTypeAssignableTo(type, globalPromiseType)) {
|
|
29853
|
+
return succeed9(type);
|
|
29854
|
+
}
|
|
29855
|
+
return typeParserIssue("type is not a Promise", type, atLocation);
|
|
29856
|
+
},
|
|
29857
|
+
"TypeParser.promiseType",
|
|
29858
|
+
(type) => type
|
|
29859
|
+
);
|
|
29834
29860
|
const extendsSchemaClass = cachedBy(
|
|
29835
29861
|
fn3("TypeParser.extendsSchemaClass")(function* (atLocation) {
|
|
29836
29862
|
if (!atLocation.name) {
|
|
@@ -30850,6 +30876,7 @@ function make26(ts, tsUtils, typeChecker, typeCheckerUtils, program) {
|
|
|
30850
30876
|
singleArgCall,
|
|
30851
30877
|
scopeType,
|
|
30852
30878
|
promiseLike,
|
|
30879
|
+
promiseType,
|
|
30853
30880
|
extendsEffectTag,
|
|
30854
30881
|
extendsEffectService,
|
|
30855
30882
|
extendsServiceMapService,
|
|
@@ -33433,6 +33460,37 @@ var anyUnknownInErrorContext = createDiagnostic({
|
|
|
33433
33460
|
})
|
|
33434
33461
|
});
|
|
33435
33462
|
|
|
33463
|
+
// src/diagnostics/asyncFunction.ts
|
|
33464
|
+
var asyncFunction = createDiagnostic({
|
|
33465
|
+
name: "asyncFunction",
|
|
33466
|
+
code: 69,
|
|
33467
|
+
description: "Warns when declaring async functions and suggests using Effect values and Effect.gen for async control flow",
|
|
33468
|
+
group: "effectNative",
|
|
33469
|
+
severity: "off",
|
|
33470
|
+
fixable: false,
|
|
33471
|
+
supportedEffect: ["v3", "v4"],
|
|
33472
|
+
apply: fn3("asyncFunction.apply")(function* (sourceFile, report) {
|
|
33473
|
+
const ts = yield* service2(TypeScriptApi);
|
|
33474
|
+
const hasAsyncModifier = (node) => ts.getModifiers(node)?.some((modifier) => modifier.kind === ts.SyntaxKind.AsyncKeyword) === true;
|
|
33475
|
+
const visit = (node) => {
|
|
33476
|
+
if (!ts.isFunctionDeclaration(node) && !ts.isFunctionExpression(node) && !ts.isArrowFunction(node) && !ts.isMethodDeclaration(node)) {
|
|
33477
|
+
ts.forEachChild(node, visit);
|
|
33478
|
+
return void 0;
|
|
33479
|
+
}
|
|
33480
|
+
if (hasAsyncModifier(node)) {
|
|
33481
|
+
report({
|
|
33482
|
+
location: node,
|
|
33483
|
+
messageText: "This code declares an async function, consider representing this async control flow with Effect values and `Effect.gen`.",
|
|
33484
|
+
fixes: []
|
|
33485
|
+
});
|
|
33486
|
+
}
|
|
33487
|
+
ts.forEachChild(node, visit);
|
|
33488
|
+
return void 0;
|
|
33489
|
+
};
|
|
33490
|
+
ts.forEachChild(sourceFile, visit);
|
|
33491
|
+
})
|
|
33492
|
+
});
|
|
33493
|
+
|
|
33436
33494
|
// src/diagnostics/catchAllToMapError.ts
|
|
33437
33495
|
var catchAllToMapError = createDiagnostic({
|
|
33438
33496
|
name: "catchAllToMapError",
|
|
@@ -33661,6 +33719,59 @@ var classSelfMismatch = createDiagnostic({
|
|
|
33661
33719
|
})
|
|
33662
33720
|
});
|
|
33663
33721
|
|
|
33722
|
+
// src/diagnostics/cryptoRandomUUIDInEffect.ts
|
|
33723
|
+
var makeCryptoRandomUUIDApply = (checkInEffect) => fn3(`cryptoRandomUUID${checkInEffect ? "InEffect" : ""}.apply`)(function* (sourceFile, report) {
|
|
33724
|
+
const ts = yield* service2(TypeScriptApi);
|
|
33725
|
+
const typeChecker = yield* service2(TypeCheckerApi);
|
|
33726
|
+
const typeCheckerUtils = yield* service2(TypeCheckerUtils);
|
|
33727
|
+
const typeParser = yield* service2(TypeParser);
|
|
33728
|
+
const cryptoSymbol = typeChecker.resolveName("crypto", void 0, ts.SymbolFlags.Value, false);
|
|
33729
|
+
if (!cryptoSymbol) return;
|
|
33730
|
+
const nodeToVisit = [];
|
|
33731
|
+
const appendNodeToVisit = (node) => {
|
|
33732
|
+
nodeToVisit.push(node);
|
|
33733
|
+
return void 0;
|
|
33734
|
+
};
|
|
33735
|
+
ts.forEachChild(sourceFile, appendNodeToVisit);
|
|
33736
|
+
while (nodeToVisit.length > 0) {
|
|
33737
|
+
const node = nodeToVisit.shift();
|
|
33738
|
+
ts.forEachChild(node, appendNodeToVisit);
|
|
33739
|
+
if (!ts.isCallExpression(node) || !ts.isPropertyAccessExpression(node.expression) || ts.idText(node.expression.name) !== "randomUUID") continue;
|
|
33740
|
+
const symbol4 = typeChecker.getSymbolAtLocation(node.expression.expression);
|
|
33741
|
+
if (!symbol4) continue;
|
|
33742
|
+
if (typeCheckerUtils.resolveToGlobalSymbol(symbol4) !== cryptoSymbol) continue;
|
|
33743
|
+
const { inEffect } = yield* typeParser.findEnclosingScopes(node);
|
|
33744
|
+
if (inEffect !== checkInEffect) continue;
|
|
33745
|
+
report({
|
|
33746
|
+
location: node,
|
|
33747
|
+
messageText: checkInEffect ? "This Effect code uses `crypto.randomUUID()`, prefer the Effect `Random` module instead because it uses Effect-injected randomness rather than the `crypto` module behind the scenes." : "This code uses `crypto.randomUUID()`, prefer the Effect `Random` module instead because it uses Effect-injected randomness rather than the `crypto` module behind the scenes.",
|
|
33748
|
+
fixes: []
|
|
33749
|
+
});
|
|
33750
|
+
}
|
|
33751
|
+
});
|
|
33752
|
+
var cryptoRandomUUIDInEffect = createDiagnostic({
|
|
33753
|
+
name: "cryptoRandomUUIDInEffect",
|
|
33754
|
+
code: 67,
|
|
33755
|
+
description: "Warns when using crypto.randomUUID() inside Effect generators instead of the Effect Random module, which uses Effect-injected randomness rather than the crypto module behind the scenes",
|
|
33756
|
+
group: "effectNative",
|
|
33757
|
+
severity: "off",
|
|
33758
|
+
fixable: false,
|
|
33759
|
+
supportedEffect: ["v4"],
|
|
33760
|
+
apply: makeCryptoRandomUUIDApply(true)
|
|
33761
|
+
});
|
|
33762
|
+
|
|
33763
|
+
// src/diagnostics/cryptoRandomUUID.ts
|
|
33764
|
+
var cryptoRandomUUID = createDiagnostic({
|
|
33765
|
+
name: "cryptoRandomUUID",
|
|
33766
|
+
code: 66,
|
|
33767
|
+
description: "Warns when using crypto.randomUUID() outside Effect generators instead of the Effect Random module, which uses Effect-injected randomness rather than the crypto module behind the scenes",
|
|
33768
|
+
group: "effectNative",
|
|
33769
|
+
severity: "off",
|
|
33770
|
+
fixable: false,
|
|
33771
|
+
supportedEffect: ["v4"],
|
|
33772
|
+
apply: makeCryptoRandomUUIDApply(false)
|
|
33773
|
+
});
|
|
33774
|
+
|
|
33664
33775
|
// src/core/KeyBuilder.ts
|
|
33665
33776
|
var makeKeyBuilder = fn3("KeyBuilder")(
|
|
33666
33777
|
function* (sourceFile) {
|
|
@@ -33878,6 +33989,40 @@ ${versions.map((version2) => `- found ${version2} at ${resolvedPackages[packageN
|
|
|
33878
33989
|
})
|
|
33879
33990
|
});
|
|
33880
33991
|
|
|
33992
|
+
// src/diagnostics/effectDoNotation.ts
|
|
33993
|
+
var effectDoNotation = createDiagnostic({
|
|
33994
|
+
name: "effectDoNotation",
|
|
33995
|
+
code: 73,
|
|
33996
|
+
description: "Suggests using Effect.gen or Effect.fn instead of the Effect.Do notation helpers",
|
|
33997
|
+
group: "style",
|
|
33998
|
+
severity: "off",
|
|
33999
|
+
fixable: false,
|
|
34000
|
+
supportedEffect: ["v3", "v4"],
|
|
34001
|
+
apply: fn3("effectDoNotation.apply")(function* (sourceFile, report) {
|
|
34002
|
+
const ts = yield* service2(TypeScriptApi);
|
|
34003
|
+
const typeParser = yield* service2(TypeParser);
|
|
34004
|
+
const nodeToVisit = [];
|
|
34005
|
+
const appendNodeToVisit = (node) => {
|
|
34006
|
+
nodeToVisit.push(node);
|
|
34007
|
+
return void 0;
|
|
34008
|
+
};
|
|
34009
|
+
ts.forEachChild(sourceFile, appendNodeToVisit);
|
|
34010
|
+
while (nodeToVisit.length > 0) {
|
|
34011
|
+
const node = nodeToVisit.shift();
|
|
34012
|
+
const isReference2 = yield* orUndefined(typeParser.isNodeReferenceToEffectModuleApi("Do")(node));
|
|
34013
|
+
if (isReference2) {
|
|
34014
|
+
report({
|
|
34015
|
+
location: node,
|
|
34016
|
+
messageText: "This uses the Effect do emulation. `Effect.gen` or `Effect.fn` achieve the same result with native JS scopes.",
|
|
34017
|
+
fixes: []
|
|
34018
|
+
});
|
|
34019
|
+
continue;
|
|
34020
|
+
}
|
|
34021
|
+
ts.forEachChild(node, appendNodeToVisit);
|
|
34022
|
+
}
|
|
34023
|
+
})
|
|
34024
|
+
});
|
|
34025
|
+
|
|
33881
34026
|
// src/diagnostics/effectFnIife.ts
|
|
33882
34027
|
var effectFnIife = createDiagnostic({
|
|
33883
34028
|
name: "effectFnIife",
|
|
@@ -34824,6 +34969,43 @@ var effectInVoidSuccess = createDiagnostic({
|
|
|
34824
34969
|
})
|
|
34825
34970
|
});
|
|
34826
34971
|
|
|
34972
|
+
// src/diagnostics/effectMapFlatten.ts
|
|
34973
|
+
var effectMapFlatten = createDiagnostic({
|
|
34974
|
+
name: "effectMapFlatten",
|
|
34975
|
+
code: 74,
|
|
34976
|
+
description: "Suggests using Effect.flatMap instead of Effect.map followed by Effect.flatten in piping flows",
|
|
34977
|
+
group: "style",
|
|
34978
|
+
severity: "suggestion",
|
|
34979
|
+
fixable: false,
|
|
34980
|
+
supportedEffect: ["v3", "v4"],
|
|
34981
|
+
apply: fn3("effectMapFlatten.apply")(function* (sourceFile, report) {
|
|
34982
|
+
const typeParser = yield* service2(TypeParser);
|
|
34983
|
+
const flows = yield* typeParser.pipingFlows(false)(sourceFile);
|
|
34984
|
+
for (const flow2 of flows) {
|
|
34985
|
+
for (let index = 0; index < flow2.transformations.length - 1; index++) {
|
|
34986
|
+
const mapTransformation = flow2.transformations[index];
|
|
34987
|
+
const flattenTransformation = flow2.transformations[index + 1];
|
|
34988
|
+
if (!mapTransformation || !flattenTransformation || !mapTransformation?.args || flattenTransformation?.args || mapTransformation.kind !== "pipe" && mapTransformation.kind !== "pipeable" || flattenTransformation.kind !== mapTransformation.kind) {
|
|
34989
|
+
continue;
|
|
34990
|
+
}
|
|
34991
|
+
const isMapCall = yield* orUndefined(
|
|
34992
|
+
typeParser.isNodeReferenceToEffectModuleApi("map")(mapTransformation.callee)
|
|
34993
|
+
);
|
|
34994
|
+
const isFlattenCall = yield* orUndefined(
|
|
34995
|
+
typeParser.isNodeReferenceToEffectModuleApi("flatten")(flattenTransformation.callee)
|
|
34996
|
+
);
|
|
34997
|
+
if (isMapCall && isFlattenCall) {
|
|
34998
|
+
report({
|
|
34999
|
+
location: flattenTransformation.callee,
|
|
35000
|
+
messageText: "`Effect.map` + `Effect.flatten` is the same as `Effect.flatMap` that expresses the same steps more directly.",
|
|
35001
|
+
fixes: []
|
|
35002
|
+
});
|
|
35003
|
+
}
|
|
35004
|
+
}
|
|
35005
|
+
}
|
|
35006
|
+
})
|
|
35007
|
+
});
|
|
35008
|
+
|
|
34827
35009
|
// src/diagnostics/effectMapVoid.ts
|
|
34828
35010
|
var effectMapVoid = createDiagnostic({
|
|
34829
35011
|
name: "effectMapVoid",
|
|
@@ -35091,6 +35273,7 @@ var genericEffectServices = createDiagnostic({
|
|
|
35091
35273
|
for (const [type, reportAt] of typesToCheck) {
|
|
35092
35274
|
yield* pipe(
|
|
35093
35275
|
typeParser.contextTag(type, node),
|
|
35276
|
+
orElse5(() => typeParser.serviceType(type, node)),
|
|
35094
35277
|
map12(() => {
|
|
35095
35278
|
report({
|
|
35096
35279
|
location: reportAt,
|
|
@@ -35854,6 +36037,55 @@ var layerMergeAllWithDependencies = createDiagnostic({
|
|
|
35854
36037
|
})
|
|
35855
36038
|
});
|
|
35856
36039
|
|
|
36040
|
+
// src/diagnostics/lazyPromiseInEffectSync.ts
|
|
36041
|
+
var lazyPromiseInEffectSync = createDiagnostic({
|
|
36042
|
+
name: "lazyPromiseInEffectSync",
|
|
36043
|
+
code: 70,
|
|
36044
|
+
description: "Warns when Effect.sync lazily returns a Promise instead of using an async Effect constructor",
|
|
36045
|
+
group: "antipattern",
|
|
36046
|
+
severity: "warning",
|
|
36047
|
+
fixable: false,
|
|
36048
|
+
supportedEffect: ["v3", "v4"],
|
|
36049
|
+
apply: fn3("lazyPromiseInEffectSync.apply")(function* (sourceFile, report) {
|
|
36050
|
+
const ts = yield* service2(TypeScriptApi);
|
|
36051
|
+
const typeChecker = yield* service2(TypeCheckerApi);
|
|
36052
|
+
const typeCheckerUtils = yield* service2(TypeCheckerUtils);
|
|
36053
|
+
const typeParser = yield* service2(TypeParser);
|
|
36054
|
+
const nodeToVisit = [];
|
|
36055
|
+
const appendNodeToVisit = (node) => {
|
|
36056
|
+
nodeToVisit.push(node);
|
|
36057
|
+
return void 0;
|
|
36058
|
+
};
|
|
36059
|
+
ts.forEachChild(sourceFile, appendNodeToVisit);
|
|
36060
|
+
while (nodeToVisit.length > 0) {
|
|
36061
|
+
const node = nodeToVisit.shift();
|
|
36062
|
+
ts.forEachChild(node, appendNodeToVisit);
|
|
36063
|
+
if (!ts.isCallExpression(node)) continue;
|
|
36064
|
+
const isSyncCall = yield* orUndefined(
|
|
36065
|
+
typeParser.isNodeReferenceToEffectModuleApi("sync")(node.expression)
|
|
36066
|
+
);
|
|
36067
|
+
if (!isSyncCall) continue;
|
|
36068
|
+
const lazyArg = node.arguments[0];
|
|
36069
|
+
if (!lazyArg) continue;
|
|
36070
|
+
const lazyArgType = typeCheckerUtils.getTypeAtLocation(lazyArg);
|
|
36071
|
+
if (!lazyArgType) continue;
|
|
36072
|
+
const entries2 = typeCheckerUtils.unrollUnionMembers(lazyArgType).flatMap(
|
|
36073
|
+
(member) => typeChecker.getSignaturesOfType(member, ts.SignatureKind.Call).map(
|
|
36074
|
+
(signature) => typeParser.promiseType(typeChecker.getReturnTypeOfSignature(signature), lazyArg)
|
|
36075
|
+
)
|
|
36076
|
+
);
|
|
36077
|
+
if (entries2.length === 0) continue;
|
|
36078
|
+
const promiseReturn = yield* orUndefined(firstSuccessOf(entries2));
|
|
36079
|
+
if (!promiseReturn) continue;
|
|
36080
|
+
report({
|
|
36081
|
+
location: lazyArg,
|
|
36082
|
+
messageText: "This `Effect.sync` thunk returns a Promise. Use `Effect.promise` or `Effect.tryPromise` to represent async work.",
|
|
36083
|
+
fixes: []
|
|
36084
|
+
});
|
|
36085
|
+
}
|
|
36086
|
+
})
|
|
36087
|
+
});
|
|
36088
|
+
|
|
35857
36089
|
// src/diagnostics/leakingRequirements.ts
|
|
35858
36090
|
var leakingRequirements = createDiagnostic({
|
|
35859
36091
|
name: "leakingRequirements",
|
|
@@ -36787,6 +37019,74 @@ var multipleEffectProvide = createDiagnostic({
|
|
|
36787
37019
|
})
|
|
36788
37020
|
});
|
|
36789
37021
|
|
|
37022
|
+
// src/diagnostics/nestedEffectGenYield.ts
|
|
37023
|
+
var nestedEffectGenYield = createDiagnostic({
|
|
37024
|
+
name: "nestedEffectGenYield",
|
|
37025
|
+
code: 71,
|
|
37026
|
+
description: "Warns when yielding a nested bare Effect.gen inside an existing Effect generator context",
|
|
37027
|
+
group: "style",
|
|
37028
|
+
severity: "off",
|
|
37029
|
+
fixable: false,
|
|
37030
|
+
supportedEffect: ["v3", "v4"],
|
|
37031
|
+
apply: fn3("nestedEffectGenYield.apply")(function* (sourceFile, report) {
|
|
37032
|
+
const ts = yield* service2(TypeScriptApi);
|
|
37033
|
+
const typeParser = yield* service2(TypeParser);
|
|
37034
|
+
const nodeToVisit = [];
|
|
37035
|
+
const appendNodeToVisit = (node) => {
|
|
37036
|
+
nodeToVisit.push(node);
|
|
37037
|
+
return void 0;
|
|
37038
|
+
};
|
|
37039
|
+
ts.forEachChild(sourceFile, appendNodeToVisit);
|
|
37040
|
+
while (nodeToVisit.length > 0) {
|
|
37041
|
+
const node = nodeToVisit.shift();
|
|
37042
|
+
ts.forEachChild(node, appendNodeToVisit);
|
|
37043
|
+
if (!ts.isYieldExpression(node) || !node.asteriskToken || !node.expression) continue;
|
|
37044
|
+
const { inEffect } = yield* typeParser.findEnclosingScopes(node);
|
|
37045
|
+
if (!inEffect) continue;
|
|
37046
|
+
const bareNestedEffectGen = yield* orUndefined(typeParser.effectGen(node.expression));
|
|
37047
|
+
if (!bareNestedEffectGen) continue;
|
|
37048
|
+
report({
|
|
37049
|
+
location: node.expression,
|
|
37050
|
+
messageText: "This `yield*` is applied to a nested `Effect.gen(...)` that can be inlined in the parent Effect generator context.",
|
|
37051
|
+
fixes: []
|
|
37052
|
+
});
|
|
37053
|
+
}
|
|
37054
|
+
})
|
|
37055
|
+
});
|
|
37056
|
+
|
|
37057
|
+
// src/diagnostics/newPromise.ts
|
|
37058
|
+
var newPromise = createDiagnostic({
|
|
37059
|
+
name: "newPromise",
|
|
37060
|
+
code: 68,
|
|
37061
|
+
description: "Warns when constructing promises with new Promise instead of using Effect APIs",
|
|
37062
|
+
group: "effectNative",
|
|
37063
|
+
severity: "off",
|
|
37064
|
+
fixable: false,
|
|
37065
|
+
supportedEffect: ["v3", "v4"],
|
|
37066
|
+
apply: fn3("newPromise.apply")(function* (sourceFile, report) {
|
|
37067
|
+
const ts = yield* service2(TypeScriptApi);
|
|
37068
|
+
const typeChecker = yield* service2(TypeCheckerApi);
|
|
37069
|
+
const typeCheckerUtils = yield* service2(TypeCheckerUtils);
|
|
37070
|
+
const promiseSymbol = typeChecker.resolveName("Promise", void 0, ts.SymbolFlags.Value, false);
|
|
37071
|
+
if (!promiseSymbol) return;
|
|
37072
|
+
const visit = (node) => {
|
|
37073
|
+
if (ts.isNewExpression(node)) {
|
|
37074
|
+
const symbol4 = typeChecker.getSymbolAtLocation(node.expression);
|
|
37075
|
+
if (symbol4 && typeCheckerUtils.resolveToGlobalSymbol(symbol4) === promiseSymbol) {
|
|
37076
|
+
report({
|
|
37077
|
+
location: node,
|
|
37078
|
+
messageText: "This code constructs `new Promise(...)`, prefer Effect APIs such as `Effect.async`, `Effect.promise`, or `Effect.tryPromise` instead of manual Promise construction.",
|
|
37079
|
+
fixes: []
|
|
37080
|
+
});
|
|
37081
|
+
}
|
|
37082
|
+
}
|
|
37083
|
+
ts.forEachChild(node, visit);
|
|
37084
|
+
return void 0;
|
|
37085
|
+
};
|
|
37086
|
+
ts.forEachChild(sourceFile, visit);
|
|
37087
|
+
})
|
|
37088
|
+
});
|
|
37089
|
+
|
|
36790
37090
|
// src/diagnostics/nodeBuiltinImport.ts
|
|
36791
37091
|
var moduleAlternativesV3 = /* @__PURE__ */ new Map([
|
|
36792
37092
|
["fs", { alternative: "FileSystem", module: "fs", package: "@effect/platform" }],
|
|
@@ -37130,6 +37430,14 @@ var effectModuleMigrationDb = {
|
|
|
37130
37430
|
"yieldNow": asUnchanged,
|
|
37131
37431
|
"zip": asUnchanged,
|
|
37132
37432
|
"zipWith": asUnchanged,
|
|
37433
|
+
"annotateLogsScoped": asUnchanged,
|
|
37434
|
+
"awaitAllChildren": asUnchanged,
|
|
37435
|
+
"bind": asUnchanged,
|
|
37436
|
+
"bindTo": asUnchanged,
|
|
37437
|
+
"Do": asUnchanged,
|
|
37438
|
+
"let": asUnchanged,
|
|
37439
|
+
"partition": asUnchanged,
|
|
37440
|
+
"validate": asUnchanged,
|
|
37133
37441
|
// Renamed APIs (v3 name → v4 name)
|
|
37134
37442
|
"catchAll": asRenamedSameBehaviour("catch"),
|
|
37135
37443
|
"catchAllCause": asRenamedSameBehaviour("catchCause"),
|
|
@@ -37149,14 +37457,6 @@ var effectModuleMigrationDb = {
|
|
|
37149
37457
|
"serviceOptional": asRenamedSameBehaviour("serviceOption"),
|
|
37150
37458
|
"tapErrorCause": asRenamedSameBehaviour("tapCause"),
|
|
37151
37459
|
// Removed APIs
|
|
37152
|
-
"annotateLogsScoped": asUnchanged,
|
|
37153
|
-
"awaitAllChildren": asUnchanged,
|
|
37154
|
-
"bind": asUnchanged,
|
|
37155
|
-
"bindTo": asUnchanged,
|
|
37156
|
-
"Do": asUnchanged,
|
|
37157
|
-
"let": asUnchanged,
|
|
37158
|
-
"partition": asUnchanged,
|
|
37159
|
-
"validate": asUnchanged,
|
|
37160
37460
|
"catchSomeDefect": asRemoved(
|
|
37161
37461
|
"Use Effect.catchDefect or Effect.matchCause to handle specific defects."
|
|
37162
37462
|
),
|
|
@@ -38021,6 +38321,63 @@ var preferSchemaOverJson = createDiagnostic({
|
|
|
38021
38321
|
})
|
|
38022
38322
|
});
|
|
38023
38323
|
|
|
38324
|
+
// src/diagnostics/processEnvInEffect.ts
|
|
38325
|
+
var isEnvPropertyAccess = (tsApi, node) => tsApi.isPropertyAccessExpression(node) && tsApi.idText(node.name) === "env";
|
|
38326
|
+
var isProcessEnvMemberAccess = (tsApi, node) => (tsApi.isPropertyAccessExpression(node) || tsApi.isElementAccessExpression(node)) && isEnvPropertyAccess(tsApi, node.expression);
|
|
38327
|
+
var makeProcessEnvApply = (checkInEffect) => fn3(`processEnv${checkInEffect ? "InEffect" : ""}.apply`)(function* (sourceFile, report) {
|
|
38328
|
+
const ts = yield* service2(TypeScriptApi);
|
|
38329
|
+
const typeChecker = yield* service2(TypeCheckerApi);
|
|
38330
|
+
const typeCheckerUtils = yield* service2(TypeCheckerUtils);
|
|
38331
|
+
const typeParser = yield* service2(TypeParser);
|
|
38332
|
+
const processSymbol = typeChecker.resolveName("process", void 0, ts.SymbolFlags.Value, false);
|
|
38333
|
+
if (!processSymbol) return;
|
|
38334
|
+
const nodeToVisit = [];
|
|
38335
|
+
const appendNodeToVisit = (node) => {
|
|
38336
|
+
nodeToVisit.push(node);
|
|
38337
|
+
return void 0;
|
|
38338
|
+
};
|
|
38339
|
+
ts.forEachChild(sourceFile, appendNodeToVisit);
|
|
38340
|
+
while (nodeToVisit.length > 0) {
|
|
38341
|
+
const node = nodeToVisit.shift();
|
|
38342
|
+
ts.forEachChild(node, appendNodeToVisit);
|
|
38343
|
+
if (!isProcessEnvMemberAccess(ts, node)) continue;
|
|
38344
|
+
const processNode = node.expression.expression;
|
|
38345
|
+
if (!ts.isIdentifier(processNode) || ts.idText(processNode) !== "process") continue;
|
|
38346
|
+
const symbol4 = typeChecker.getSymbolAtLocation(processNode);
|
|
38347
|
+
if (!symbol4) continue;
|
|
38348
|
+
if (typeCheckerUtils.resolveToGlobalSymbol(symbol4) !== processSymbol) continue;
|
|
38349
|
+
const { inEffect } = yield* typeParser.findEnclosingScopes(node);
|
|
38350
|
+
if (inEffect !== checkInEffect) continue;
|
|
38351
|
+
report({
|
|
38352
|
+
location: node,
|
|
38353
|
+
messageText: checkInEffect ? "This Effect code reads from `process.env`, environment configuration in Effect code is represented through `Config` from Effect." : "This code reads from `process.env`, environment configuration is represented through `Config` from Effect.",
|
|
38354
|
+
fixes: []
|
|
38355
|
+
});
|
|
38356
|
+
}
|
|
38357
|
+
});
|
|
38358
|
+
var processEnvInEffect = createDiagnostic({
|
|
38359
|
+
name: "processEnvInEffect",
|
|
38360
|
+
code: 65,
|
|
38361
|
+
description: "Warns when reading process.env inside Effect generators instead of using Effect Config",
|
|
38362
|
+
group: "effectNative",
|
|
38363
|
+
severity: "off",
|
|
38364
|
+
fixable: false,
|
|
38365
|
+
supportedEffect: ["v3", "v4"],
|
|
38366
|
+
apply: makeProcessEnvApply(true)
|
|
38367
|
+
});
|
|
38368
|
+
|
|
38369
|
+
// src/diagnostics/processEnv.ts
|
|
38370
|
+
var processEnv = createDiagnostic({
|
|
38371
|
+
name: "processEnv",
|
|
38372
|
+
code: 64,
|
|
38373
|
+
description: "Warns when reading process.env outside Effect generators instead of using Effect Config",
|
|
38374
|
+
group: "effectNative",
|
|
38375
|
+
severity: "off",
|
|
38376
|
+
fixable: false,
|
|
38377
|
+
supportedEffect: ["v3", "v4"],
|
|
38378
|
+
apply: makeProcessEnvApply(false)
|
|
38379
|
+
});
|
|
38380
|
+
|
|
38024
38381
|
// src/diagnostics/redundantSchemaTagIdentifier.ts
|
|
38025
38382
|
var redundantSchemaTagIdentifier = createDiagnostic({
|
|
38026
38383
|
name: "redundantSchemaTagIdentifier",
|
|
@@ -38958,6 +39315,56 @@ var unknownInEffectCatch = createDiagnostic({
|
|
|
38958
39315
|
})
|
|
38959
39316
|
});
|
|
38960
39317
|
|
|
39318
|
+
// src/diagnostics/unnecessaryArrowBlock.ts
|
|
39319
|
+
var unnecessaryArrowBlock = createDiagnostic({
|
|
39320
|
+
name: "unnecessaryArrowBlock",
|
|
39321
|
+
code: 72,
|
|
39322
|
+
description: "Suggests using a concise arrow body when the block only returns an expression",
|
|
39323
|
+
group: "style",
|
|
39324
|
+
severity: "off",
|
|
39325
|
+
fixable: true,
|
|
39326
|
+
supportedEffect: ["v3", "v4"],
|
|
39327
|
+
apply: fn3("unnecessaryArrowBlock.apply")(function* (sourceFile, report) {
|
|
39328
|
+
const ts = yield* service2(TypeScriptApi);
|
|
39329
|
+
const nodeToVisit = [];
|
|
39330
|
+
const appendNodeToVisit = (node) => {
|
|
39331
|
+
nodeToVisit.push(node);
|
|
39332
|
+
return void 0;
|
|
39333
|
+
};
|
|
39334
|
+
ts.forEachChild(sourceFile, appendNodeToVisit);
|
|
39335
|
+
while (nodeToVisit.length > 0) {
|
|
39336
|
+
const node = nodeToVisit.shift();
|
|
39337
|
+
ts.forEachChild(node, appendNodeToVisit);
|
|
39338
|
+
if (!ts.isArrowFunction(node) || !ts.isBlock(node.body)) continue;
|
|
39339
|
+
if (node.body.statements.length !== 1) continue;
|
|
39340
|
+
const [statement] = node.body.statements;
|
|
39341
|
+
if (!ts.isReturnStatement(statement) || !statement.expression) continue;
|
|
39342
|
+
const returnedExpression = statement.expression;
|
|
39343
|
+
report({
|
|
39344
|
+
location: node.body,
|
|
39345
|
+
messageText: "This arrow function block only returns an expression and can use a concise body.",
|
|
39346
|
+
fixes: [{
|
|
39347
|
+
fixName: "unnecessaryArrowBlock_fix",
|
|
39348
|
+
description: "Use a concise arrow body",
|
|
39349
|
+
apply: gen3(function* () {
|
|
39350
|
+
const changeTracker = yield* service2(ChangeTracker);
|
|
39351
|
+
const replacementNode = ts.factory.updateArrowFunction(
|
|
39352
|
+
node,
|
|
39353
|
+
node.modifiers,
|
|
39354
|
+
node.typeParameters,
|
|
39355
|
+
node.parameters,
|
|
39356
|
+
node.type,
|
|
39357
|
+
node.equalsGreaterThanToken,
|
|
39358
|
+
ts.factory.createParenthesizedExpression(returnedExpression)
|
|
39359
|
+
);
|
|
39360
|
+
changeTracker.replaceNode(sourceFile, node, replacementNode);
|
|
39361
|
+
})
|
|
39362
|
+
}]
|
|
39363
|
+
});
|
|
39364
|
+
}
|
|
39365
|
+
})
|
|
39366
|
+
});
|
|
39367
|
+
|
|
38961
39368
|
// src/diagnostics/unnecessaryEffectGen.ts
|
|
38962
39369
|
var unnecessaryEffectGen = createDiagnostic({
|
|
38963
39370
|
name: "unnecessaryEffectGen",
|
|
@@ -39258,12 +39665,17 @@ var unsupportedServiceAccessors = createDiagnostic({
|
|
|
39258
39665
|
var diagnostics = [
|
|
39259
39666
|
outdatedApi,
|
|
39260
39667
|
anyUnknownInErrorContext,
|
|
39668
|
+
asyncFunction,
|
|
39261
39669
|
instanceOfSchema,
|
|
39262
39670
|
catchAllToMapError,
|
|
39263
39671
|
catchUnfailableEffect,
|
|
39264
39672
|
classSelfMismatch,
|
|
39673
|
+
cryptoRandomUUID,
|
|
39674
|
+
cryptoRandomUUIDInEffect,
|
|
39265
39675
|
duplicatePackage,
|
|
39676
|
+
effectDoNotation,
|
|
39266
39677
|
effectFnImplicitAny,
|
|
39678
|
+
effectMapFlatten,
|
|
39267
39679
|
effectGenUsesAdapter,
|
|
39268
39680
|
missingEffectContext,
|
|
39269
39681
|
missingEffectError,
|
|
@@ -39272,6 +39684,8 @@ var diagnostics = [
|
|
|
39272
39684
|
floatingEffect,
|
|
39273
39685
|
effectInFailure,
|
|
39274
39686
|
missingStarInYieldEffectGen,
|
|
39687
|
+
newPromise,
|
|
39688
|
+
lazyPromiseInEffectSync,
|
|
39275
39689
|
unnecessaryEffectGen,
|
|
39276
39690
|
unnecessaryFailYieldableError,
|
|
39277
39691
|
missingReturnYieldStar,
|
|
@@ -39280,6 +39694,8 @@ var diagnostics = [
|
|
|
39280
39694
|
genericEffectServices,
|
|
39281
39695
|
globalFetch,
|
|
39282
39696
|
globalFetchInEffect,
|
|
39697
|
+
processEnv,
|
|
39698
|
+
processEnvInEffect,
|
|
39283
39699
|
returnEffectInGen,
|
|
39284
39700
|
tryCatchInEffectGen,
|
|
39285
39701
|
importFromBarrel,
|
|
@@ -39297,6 +39713,8 @@ var diagnostics = [
|
|
|
39297
39713
|
strictEffectProvide,
|
|
39298
39714
|
unknownInEffectCatch,
|
|
39299
39715
|
runEffectInsideEffect,
|
|
39716
|
+
nestedEffectGenYield,
|
|
39717
|
+
unnecessaryArrowBlock,
|
|
39300
39718
|
schemaUnionOfLiterals,
|
|
39301
39719
|
schemaStructWithTag,
|
|
39302
39720
|
globalErrorInEffectCatch,
|
|
@@ -39351,9 +39769,15 @@ var metadata_default = {
|
|
|
39351
39769
|
name: "effect-native",
|
|
39352
39770
|
description: "Enable all Effect-native diagnostics at warning level.",
|
|
39353
39771
|
diagnosticSeverity: {
|
|
39772
|
+
asyncFunction: "warning",
|
|
39354
39773
|
instanceOfSchema: "warning",
|
|
39774
|
+
cryptoRandomUUID: "warning",
|
|
39775
|
+
cryptoRandomUUIDInEffect: "warning",
|
|
39776
|
+
newPromise: "warning",
|
|
39355
39777
|
globalFetch: "warning",
|
|
39356
39778
|
globalFetchInEffect: "warning",
|
|
39779
|
+
processEnv: "warning",
|
|
39780
|
+
processEnvInEffect: "warning",
|
|
39357
39781
|
preferSchemaOverJson: "warning",
|
|
39358
39782
|
extendsNativeError: "warning",
|
|
39359
39783
|
nodeBuiltinImport: "warning",
|
|
@@ -39890,6 +40314,27 @@ var metadata_default = {
|
|
|
39890
40314
|
]
|
|
39891
40315
|
}
|
|
39892
40316
|
},
|
|
40317
|
+
{
|
|
40318
|
+
name: "lazyPromiseInEffectSync",
|
|
40319
|
+
group: "antipattern",
|
|
40320
|
+
description: "Warns when Effect.sync lazily returns a Promise instead of using an async Effect constructor",
|
|
40321
|
+
defaultSeverity: "warning",
|
|
40322
|
+
fixable: false,
|
|
40323
|
+
supportedEffect: [
|
|
40324
|
+
"v3",
|
|
40325
|
+
"v4"
|
|
40326
|
+
],
|
|
40327
|
+
preview: {
|
|
40328
|
+
sourceText: 'import { Effect } from "effect"\n\nexport const preview = Effect.sync(() => Promise.resolve(1))\n',
|
|
40329
|
+
diagnostics: [
|
|
40330
|
+
{
|
|
40331
|
+
start: 68,
|
|
40332
|
+
end: 92,
|
|
40333
|
+
text: "This `Effect.sync` thunk returns a Promise. Use `Effect.promise` or `Effect.tryPromise` to represent async work. effect(lazyPromiseInEffectSync)"
|
|
40334
|
+
}
|
|
40335
|
+
]
|
|
40336
|
+
}
|
|
40337
|
+
},
|
|
39893
40338
|
{
|
|
39894
40339
|
name: "leakingRequirements",
|
|
39895
40340
|
group: "antipattern",
|
|
@@ -40077,6 +40522,67 @@ var metadata_default = {
|
|
|
40077
40522
|
]
|
|
40078
40523
|
}
|
|
40079
40524
|
},
|
|
40525
|
+
{
|
|
40526
|
+
name: "asyncFunction",
|
|
40527
|
+
group: "effectNative",
|
|
40528
|
+
description: "Warns when declaring async functions and suggests using Effect values and Effect.gen for async control flow",
|
|
40529
|
+
defaultSeverity: "off",
|
|
40530
|
+
fixable: false,
|
|
40531
|
+
supportedEffect: [
|
|
40532
|
+
"v3",
|
|
40533
|
+
"v4"
|
|
40534
|
+
],
|
|
40535
|
+
preview: {
|
|
40536
|
+
sourceText: "\nexport const preview = async () => {\n await Promise.resolve(1)\n}\n",
|
|
40537
|
+
diagnostics: [
|
|
40538
|
+
{
|
|
40539
|
+
start: 24,
|
|
40540
|
+
end: 66,
|
|
40541
|
+
text: "This code declares an async function, consider representing this async control flow with Effect values and `Effect.gen`. effect(asyncFunction)"
|
|
40542
|
+
}
|
|
40543
|
+
]
|
|
40544
|
+
}
|
|
40545
|
+
},
|
|
40546
|
+
{
|
|
40547
|
+
name: "cryptoRandomUUID",
|
|
40548
|
+
group: "effectNative",
|
|
40549
|
+
description: "Warns when using crypto.randomUUID() outside Effect generators instead of the Effect Random module, which uses Effect-injected randomness rather than the crypto module behind the scenes",
|
|
40550
|
+
defaultSeverity: "off",
|
|
40551
|
+
fixable: false,
|
|
40552
|
+
supportedEffect: [
|
|
40553
|
+
"v4"
|
|
40554
|
+
],
|
|
40555
|
+
preview: {
|
|
40556
|
+
sourceText: "\nexport const preview = crypto.randomUUID()\n",
|
|
40557
|
+
diagnostics: [
|
|
40558
|
+
{
|
|
40559
|
+
start: 24,
|
|
40560
|
+
end: 43,
|
|
40561
|
+
text: "This code uses `crypto.randomUUID()`, prefer the Effect `Random` module instead because it uses Effect-injected randomness rather than the `crypto` module behind the scenes. effect(cryptoRandomUUID)"
|
|
40562
|
+
}
|
|
40563
|
+
]
|
|
40564
|
+
}
|
|
40565
|
+
},
|
|
40566
|
+
{
|
|
40567
|
+
name: "cryptoRandomUUIDInEffect",
|
|
40568
|
+
group: "effectNative",
|
|
40569
|
+
description: "Warns when using crypto.randomUUID() inside Effect generators instead of the Effect Random module, which uses Effect-injected randomness rather than the crypto module behind the scenes",
|
|
40570
|
+
defaultSeverity: "off",
|
|
40571
|
+
fixable: false,
|
|
40572
|
+
supportedEffect: [
|
|
40573
|
+
"v4"
|
|
40574
|
+
],
|
|
40575
|
+
preview: {
|
|
40576
|
+
sourceText: 'import { Effect } from "effect"\n\nexport const preview = Effect.gen(function*() {\n return crypto.randomUUID()\n})\n',
|
|
40577
|
+
diagnostics: [
|
|
40578
|
+
{
|
|
40579
|
+
start: 90,
|
|
40580
|
+
end: 109,
|
|
40581
|
+
text: "This Effect code uses `crypto.randomUUID()`, prefer the Effect `Random` module instead because it uses Effect-injected randomness rather than the `crypto` module behind the scenes. effect(cryptoRandomUUIDInEffect)"
|
|
40582
|
+
}
|
|
40583
|
+
]
|
|
40584
|
+
}
|
|
40585
|
+
},
|
|
40080
40586
|
{
|
|
40081
40587
|
name: "extendsNativeError",
|
|
40082
40588
|
group: "effectNative",
|
|
@@ -40323,6 +40829,27 @@ var metadata_default = {
|
|
|
40323
40829
|
]
|
|
40324
40830
|
}
|
|
40325
40831
|
},
|
|
40832
|
+
{
|
|
40833
|
+
name: "newPromise",
|
|
40834
|
+
group: "effectNative",
|
|
40835
|
+
description: "Warns when constructing promises with new Promise instead of using Effect APIs",
|
|
40836
|
+
defaultSeverity: "off",
|
|
40837
|
+
fixable: false,
|
|
40838
|
+
supportedEffect: [
|
|
40839
|
+
"v3",
|
|
40840
|
+
"v4"
|
|
40841
|
+
],
|
|
40842
|
+
preview: {
|
|
40843
|
+
sourceText: "\nexport const preview = new Promise<number>((resolve) => resolve(1))\n",
|
|
40844
|
+
diagnostics: [
|
|
40845
|
+
{
|
|
40846
|
+
start: 24,
|
|
40847
|
+
end: 68,
|
|
40848
|
+
text: "This code constructs `new Promise(...)`, prefer Effect APIs such as `Effect.async`, `Effect.promise`, or `Effect.tryPromise` instead of manual Promise construction. effect(newPromise)"
|
|
40849
|
+
}
|
|
40850
|
+
]
|
|
40851
|
+
}
|
|
40852
|
+
},
|
|
40326
40853
|
{
|
|
40327
40854
|
name: "nodeBuiltinImport",
|
|
40328
40855
|
group: "effectNative",
|
|
@@ -40371,6 +40898,48 @@ export const preview = Effect.gen(function*() {
|
|
|
40371
40898
|
]
|
|
40372
40899
|
}
|
|
40373
40900
|
},
|
|
40901
|
+
{
|
|
40902
|
+
name: "processEnv",
|
|
40903
|
+
group: "effectNative",
|
|
40904
|
+
description: "Warns when reading process.env outside Effect generators instead of using Effect Config",
|
|
40905
|
+
defaultSeverity: "off",
|
|
40906
|
+
fixable: false,
|
|
40907
|
+
supportedEffect: [
|
|
40908
|
+
"v3",
|
|
40909
|
+
"v4"
|
|
40910
|
+
],
|
|
40911
|
+
preview: {
|
|
40912
|
+
sourceText: '/// <reference types="node" />\n\nexport const preview = process.env.PORT\n',
|
|
40913
|
+
diagnostics: [
|
|
40914
|
+
{
|
|
40915
|
+
start: 55,
|
|
40916
|
+
end: 71,
|
|
40917
|
+
text: "This code reads from `process.env`, environment configuration is represented through `Config` from Effect. effect(processEnv)"
|
|
40918
|
+
}
|
|
40919
|
+
]
|
|
40920
|
+
}
|
|
40921
|
+
},
|
|
40922
|
+
{
|
|
40923
|
+
name: "processEnvInEffect",
|
|
40924
|
+
group: "effectNative",
|
|
40925
|
+
description: "Warns when reading process.env inside Effect generators instead of using Effect Config",
|
|
40926
|
+
defaultSeverity: "off",
|
|
40927
|
+
fixable: false,
|
|
40928
|
+
supportedEffect: [
|
|
40929
|
+
"v3",
|
|
40930
|
+
"v4"
|
|
40931
|
+
],
|
|
40932
|
+
preview: {
|
|
40933
|
+
sourceText: '/// <reference types="node" />\nimport { Effect } from "effect"\n\nexport const preview = Effect.gen(function*() {\n return process.env.PORT\n})\n',
|
|
40934
|
+
diagnostics: [
|
|
40935
|
+
{
|
|
40936
|
+
start: 121,
|
|
40937
|
+
end: 137,
|
|
40938
|
+
text: "This Effect code reads from `process.env`, environment configuration in Effect code is represented through `Config` from Effect. effect(processEnvInEffect)"
|
|
40939
|
+
}
|
|
40940
|
+
]
|
|
40941
|
+
}
|
|
40942
|
+
},
|
|
40374
40943
|
{
|
|
40375
40944
|
name: "catchAllToMapError",
|
|
40376
40945
|
group: "style",
|
|
@@ -40413,6 +40982,27 @@ export const preview = Effect.gen(function*() {
|
|
|
40413
40982
|
]
|
|
40414
40983
|
}
|
|
40415
40984
|
},
|
|
40985
|
+
{
|
|
40986
|
+
name: "effectDoNotation",
|
|
40987
|
+
group: "style",
|
|
40988
|
+
description: "Suggests using Effect.gen or Effect.fn instead of the Effect.Do notation helpers",
|
|
40989
|
+
defaultSeverity: "off",
|
|
40990
|
+
fixable: false,
|
|
40991
|
+
supportedEffect: [
|
|
40992
|
+
"v3",
|
|
40993
|
+
"v4"
|
|
40994
|
+
],
|
|
40995
|
+
preview: {
|
|
40996
|
+
sourceText: 'import { Effect } from "effect"\nimport { pipe } from "effect/Function"\n\nexport const preview = pipe(\n Effect.Do,\n Effect.bind("a", () => Effect.succeed(1)),\n Effect.let("b", ({ a }) => a + 1),\n Effect.bind("c", ({ b }) => Effect.succeed(b.toString()))\n)\n',
|
|
40997
|
+
diagnostics: [
|
|
40998
|
+
{
|
|
40999
|
+
start: 103,
|
|
41000
|
+
end: 112,
|
|
41001
|
+
text: "This uses the Effect do emulation. `Effect.gen` or `Effect.fn` achieve the same result with native JS scopes. effect(effectDoNotation)"
|
|
41002
|
+
}
|
|
41003
|
+
]
|
|
41004
|
+
}
|
|
41005
|
+
},
|
|
40416
41006
|
{
|
|
40417
41007
|
name: "effectFnOpportunity",
|
|
40418
41008
|
group: "style",
|
|
@@ -40434,6 +41024,27 @@ export const preview = Effect.gen(function*() {
|
|
|
40434
41024
|
]
|
|
40435
41025
|
}
|
|
40436
41026
|
},
|
|
41027
|
+
{
|
|
41028
|
+
name: "effectMapFlatten",
|
|
41029
|
+
group: "style",
|
|
41030
|
+
description: "Suggests using Effect.flatMap instead of Effect.map followed by Effect.flatten in piping flows",
|
|
41031
|
+
defaultSeverity: "suggestion",
|
|
41032
|
+
fixable: false,
|
|
41033
|
+
supportedEffect: [
|
|
41034
|
+
"v3",
|
|
41035
|
+
"v4"
|
|
41036
|
+
],
|
|
41037
|
+
preview: {
|
|
41038
|
+
sourceText: 'import { Effect } from "effect"\n\nexport const preview = Effect.succeed(1).pipe(\n Effect.map((n) => Effect.succeed(n + 1)),\n Effect.flatten\n)\n',
|
|
41039
|
+
diagnostics: [
|
|
41040
|
+
{
|
|
41041
|
+
start: 126,
|
|
41042
|
+
end: 140,
|
|
41043
|
+
text: "`Effect.map` + `Effect.flatten` is the same as `Effect.flatMap` that expresses the same steps more directly. effect(effectMapFlatten)"
|
|
41044
|
+
}
|
|
41045
|
+
]
|
|
41046
|
+
}
|
|
41047
|
+
},
|
|
40437
41048
|
{
|
|
40438
41049
|
name: "effectMapVoid",
|
|
40439
41050
|
group: "style",
|
|
@@ -40538,6 +41149,27 @@ export const preview = Effect.gen(function*() {
|
|
|
40538
41149
|
]
|
|
40539
41150
|
}
|
|
40540
41151
|
},
|
|
41152
|
+
{
|
|
41153
|
+
name: "nestedEffectGenYield",
|
|
41154
|
+
group: "style",
|
|
41155
|
+
description: "Warns when yielding a nested bare Effect.gen inside an existing Effect generator context",
|
|
41156
|
+
defaultSeverity: "off",
|
|
41157
|
+
fixable: false,
|
|
41158
|
+
supportedEffect: [
|
|
41159
|
+
"v3",
|
|
41160
|
+
"v4"
|
|
41161
|
+
],
|
|
41162
|
+
preview: {
|
|
41163
|
+
sourceText: 'import { Effect } from "effect"\n\nexport const preview = Effect.gen(function*() {\n yield* Effect.gen(function*() {\n return 1\n })\n})\n',
|
|
41164
|
+
diagnostics: [
|
|
41165
|
+
{
|
|
41166
|
+
start: 90,
|
|
41167
|
+
end: 132,
|
|
41168
|
+
text: "This `yield*` is applied to a nested `Effect.gen(...)` that can be inlined in the parent Effect generator context. effect(nestedEffectGenYield)"
|
|
41169
|
+
}
|
|
41170
|
+
]
|
|
41171
|
+
}
|
|
41172
|
+
},
|
|
40541
41173
|
{
|
|
40542
41174
|
name: "redundantSchemaTagIdentifier",
|
|
40543
41175
|
group: "style",
|
|
@@ -40646,6 +41278,27 @@ export const preview = Effect.gen(function*() {
|
|
|
40646
41278
|
]
|
|
40647
41279
|
}
|
|
40648
41280
|
},
|
|
41281
|
+
{
|
|
41282
|
+
name: "unnecessaryArrowBlock",
|
|
41283
|
+
group: "style",
|
|
41284
|
+
description: "Suggests using a concise arrow body when the block only returns an expression",
|
|
41285
|
+
defaultSeverity: "off",
|
|
41286
|
+
fixable: true,
|
|
41287
|
+
supportedEffect: [
|
|
41288
|
+
"v3",
|
|
41289
|
+
"v4"
|
|
41290
|
+
],
|
|
41291
|
+
preview: {
|
|
41292
|
+
sourceText: "export const preview = (value: string) => {\n return value.trim()\n}\n",
|
|
41293
|
+
diagnostics: [
|
|
41294
|
+
{
|
|
41295
|
+
start: 42,
|
|
41296
|
+
end: 67,
|
|
41297
|
+
text: "This arrow function block only returns an expression and can use a concise body. effect(unnecessaryArrowBlock)"
|
|
41298
|
+
}
|
|
41299
|
+
]
|
|
41300
|
+
}
|
|
41301
|
+
},
|
|
40649
41302
|
{
|
|
40650
41303
|
name: "unnecessaryEffectGen",
|
|
40651
41304
|
group: "style",
|
|
@@ -42428,6 +43081,7 @@ function collectExportedItems(sourceFile, tsInstance, typeChecker, maxSymbolDept
|
|
|
42428
43081
|
const declaration = declarations && declarations.length > 0 ? declarations[0] : sourceFile;
|
|
42429
43082
|
const contextTagResult = yield* pipe(
|
|
42430
43083
|
typeParser.contextTag(type, declaration),
|
|
43084
|
+
orElse5(() => typeParser.serviceType(type, declaration)),
|
|
42431
43085
|
option4
|
|
42432
43086
|
);
|
|
42433
43087
|
if (isSome2(contextTagResult)) {
|