@effect/language-service 0.54.0 → 0.55.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 +2 -0
- package/cli.js +442 -305
- package/cli.js.map +1 -1
- package/effect-lsp-patch-utils.js +158 -21
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +180 -43
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +158 -21
- package/transform.js.map +1 -1
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm
|
|
3
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Function.js
|
|
4
4
|
var isFunction = (input) => typeof input === "function";
|
|
5
5
|
var dual = function(arity, body) {
|
|
6
6
|
if (typeof arity === "function") {
|
|
@@ -98,7 +98,7 @@ function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
// node_modules/.pnpm
|
|
101
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Equivalence.js
|
|
102
102
|
var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
103
103
|
var array = (item) => make((self, that) => {
|
|
104
104
|
if (self.length !== that.length) {
|
|
@@ -113,7 +113,7 @@ var array = (item) => make((self, that) => {
|
|
|
113
113
|
return true;
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
// node_modules/.pnpm
|
|
116
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/GlobalValue.js
|
|
117
117
|
var globalStoreId = `effect/GlobalValue`;
|
|
118
118
|
var globalStore;
|
|
119
119
|
var globalValue = (id, compute) => {
|
|
@@ -127,7 +127,7 @@ var globalValue = (id, compute) => {
|
|
|
127
127
|
return globalStore.get(id);
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
// node_modules/.pnpm
|
|
130
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Predicate.js
|
|
131
131
|
var isString = (input) => typeof input === "string";
|
|
132
132
|
var isNumber = (input) => typeof input === "number";
|
|
133
133
|
var isBoolean = (input) => typeof input === "boolean";
|
|
@@ -138,10 +138,10 @@ var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) &&
|
|
|
138
138
|
var isTagged = /* @__PURE__ */ dual(2, (self, tag) => hasProperty(self, "_tag") && self["_tag"] === tag);
|
|
139
139
|
var isRecord = (input) => isRecordOrArray(input) && !Array.isArray(input);
|
|
140
140
|
|
|
141
|
-
// node_modules/.pnpm
|
|
141
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/errors.js
|
|
142
142
|
var getBugErrorMessage = (message) => `BUG: ${message} - please report an issue at https://github.com/Effect-TS/effect/issues`;
|
|
143
143
|
|
|
144
|
-
// node_modules/.pnpm
|
|
144
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Utils.js
|
|
145
145
|
var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
|
|
146
146
|
var GenKindImpl = class {
|
|
147
147
|
value;
|
|
@@ -263,7 +263,7 @@ var internalCall = isNotOptimizedAway ? standard.effect_internal_function : forc
|
|
|
263
263
|
var genConstructor = function* () {
|
|
264
264
|
}.constructor;
|
|
265
265
|
|
|
266
|
-
// node_modules/.pnpm
|
|
266
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Hash.js
|
|
267
267
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
|
|
268
268
|
var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
|
|
269
269
|
var hash = (self) => {
|
|
@@ -369,7 +369,7 @@ var cached = function() {
|
|
|
369
369
|
return hash2;
|
|
370
370
|
};
|
|
371
371
|
|
|
372
|
-
// node_modules/.pnpm
|
|
372
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Equal.js
|
|
373
373
|
var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
|
|
374
374
|
function equals() {
|
|
375
375
|
if (arguments.length === 1) {
|
|
@@ -423,7 +423,7 @@ function compareBoth(self, that) {
|
|
|
423
423
|
var isEqual = (u) => hasProperty(u, symbol2);
|
|
424
424
|
var equivalence = () => equals;
|
|
425
425
|
|
|
426
|
-
// node_modules/.pnpm
|
|
426
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Inspectable.js
|
|
427
427
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
428
428
|
var toJSON = (x) => {
|
|
429
429
|
try {
|
|
@@ -481,7 +481,7 @@ var redact = (u) => {
|
|
|
481
481
|
return u;
|
|
482
482
|
};
|
|
483
483
|
|
|
484
|
-
// node_modules/.pnpm
|
|
484
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Pipeable.js
|
|
485
485
|
var pipeArguments = (self, args2) => {
|
|
486
486
|
switch (args2.length) {
|
|
487
487
|
case 0:
|
|
@@ -514,16 +514,16 @@ var pipeArguments = (self, args2) => {
|
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
516
|
|
|
517
|
-
// node_modules/.pnpm
|
|
517
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/opCodes/effect.js
|
|
518
518
|
var OP_COMMIT = "Commit";
|
|
519
519
|
var OP_FAILURE = "Failure";
|
|
520
520
|
var OP_WITH_RUNTIME = "WithRuntime";
|
|
521
521
|
|
|
522
|
-
// node_modules/.pnpm
|
|
523
|
-
var moduleVersion = "3.
|
|
522
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/version.js
|
|
523
|
+
var moduleVersion = "3.19.0";
|
|
524
524
|
var getCurrentVersion = () => moduleVersion;
|
|
525
525
|
|
|
526
|
-
// node_modules/.pnpm
|
|
526
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/effectable.js
|
|
527
527
|
var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
|
|
528
528
|
var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
|
|
529
529
|
var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
|
|
@@ -610,7 +610,7 @@ var StructuralCommitPrototype = {
|
|
|
610
610
|
...StructuralPrototype
|
|
611
611
|
};
|
|
612
612
|
|
|
613
|
-
// node_modules/.pnpm
|
|
613
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/option.js
|
|
614
614
|
var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
|
|
615
615
|
var CommonProto = {
|
|
616
616
|
...EffectPrototype,
|
|
@@ -668,7 +668,7 @@ var some = (value) => {
|
|
|
668
668
|
return a;
|
|
669
669
|
};
|
|
670
670
|
|
|
671
|
-
// node_modules/.pnpm
|
|
671
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/either.js
|
|
672
672
|
var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
|
|
673
673
|
var CommonProto2 = {
|
|
674
674
|
...EffectPrototype,
|
|
@@ -730,7 +730,7 @@ var right = (right3) => {
|
|
|
730
730
|
return a;
|
|
731
731
|
};
|
|
732
732
|
|
|
733
|
-
// node_modules/.pnpm
|
|
733
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Either.js
|
|
734
734
|
var right2 = right;
|
|
735
735
|
var left2 = left;
|
|
736
736
|
var isLeft2 = isLeft;
|
|
@@ -738,16 +738,16 @@ var isRight2 = isRight;
|
|
|
738
738
|
var map = /* @__PURE__ */ dual(2, (self, f) => isRight2(self) ? right2(f(self.right)) : left2(self.left));
|
|
739
739
|
var getOrElse = /* @__PURE__ */ dual(2, (self, onLeft) => isLeft2(self) ? onLeft(self.left) : self.right);
|
|
740
740
|
|
|
741
|
-
// node_modules/.pnpm
|
|
741
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/array.js
|
|
742
742
|
var isNonEmptyArray = (self) => self.length > 0;
|
|
743
743
|
|
|
744
|
-
// node_modules/.pnpm
|
|
744
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Order.js
|
|
745
745
|
var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
|
|
746
746
|
var string2 = /* @__PURE__ */ make2((self, that) => self < that ? -1 : 1);
|
|
747
747
|
var number2 = /* @__PURE__ */ make2((self, that) => self < that ? -1 : 1);
|
|
748
748
|
var mapInput = /* @__PURE__ */ dual(2, (self, f) => make2((b1, b2) => self(f(b1), f(b2))));
|
|
749
749
|
|
|
750
|
-
// node_modules/.pnpm
|
|
750
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Option.js
|
|
751
751
|
var none2 = () => none;
|
|
752
752
|
var some2 = some;
|
|
753
753
|
var isNone2 = isNone;
|
|
@@ -758,7 +758,7 @@ var fromNullable = (nullableValue) => nullableValue == null ? none2() : some2(nu
|
|
|
758
758
|
var getOrUndefined = /* @__PURE__ */ getOrElse2(constUndefined);
|
|
759
759
|
var map2 = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : some2(f(self.value)));
|
|
760
760
|
|
|
761
|
-
// node_modules/.pnpm
|
|
761
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Record.js
|
|
762
762
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
763
763
|
const out = {
|
|
764
764
|
...self
|
|
@@ -770,7 +770,7 @@ var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
770
770
|
});
|
|
771
771
|
var keys = (self) => Object.keys(self);
|
|
772
772
|
|
|
773
|
-
// node_modules/.pnpm
|
|
773
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Array.js
|
|
774
774
|
var fromIterable = (collection) => Array.isArray(collection) ? collection : Array.from(collection);
|
|
775
775
|
var append = /* @__PURE__ */ dual(2, (self, last) => [...self, last]);
|
|
776
776
|
var appendAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable(self).concat(fromIterable(that)));
|
|
@@ -3739,6 +3739,7 @@ function make3(ts, tsUtils, typeChecker, typeCheckerUtils, program) {
|
|
|
3739
3739
|
);
|
|
3740
3740
|
return {
|
|
3741
3741
|
isNodeReferenceToEffectModuleApi,
|
|
3742
|
+
isNodeReferenceToEffectSchemaModuleApi,
|
|
3742
3743
|
effectType,
|
|
3743
3744
|
strictEffectType,
|
|
3744
3745
|
layerType,
|
|
@@ -4195,7 +4196,7 @@ var catchUnfailableEffect = createDiagnostic({
|
|
|
4195
4196
|
})
|
|
4196
4197
|
});
|
|
4197
4198
|
|
|
4198
|
-
// node_modules/.pnpm
|
|
4199
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Chunk.js
|
|
4199
4200
|
var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Chunk");
|
|
4200
4201
|
function copy(src, srcPos, dest, destPos, len) {
|
|
4201
4202
|
for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
|
|
@@ -4491,14 +4492,14 @@ var isNonEmpty = (self) => self.length > 0;
|
|
|
4491
4492
|
var unsafeHead = (self) => unsafeGet2(self, 0);
|
|
4492
4493
|
var headNonEmpty2 = unsafeHead;
|
|
4493
4494
|
|
|
4494
|
-
// node_modules/.pnpm
|
|
4495
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/hashMap/config.js
|
|
4495
4496
|
var SIZE = 5;
|
|
4496
4497
|
var BUCKET_SIZE = /* @__PURE__ */ Math.pow(2, SIZE);
|
|
4497
4498
|
var MASK = BUCKET_SIZE - 1;
|
|
4498
4499
|
var MAX_INDEX_NODE = BUCKET_SIZE / 2;
|
|
4499
4500
|
var MIN_ARRAY_NODE = BUCKET_SIZE / 4;
|
|
4500
4501
|
|
|
4501
|
-
// node_modules/.pnpm
|
|
4502
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/hashMap/bitwise.js
|
|
4502
4503
|
function popcount(x) {
|
|
4503
4504
|
x -= x >> 1 & 1431655765;
|
|
4504
4505
|
x = (x & 858993459) + (x >> 2 & 858993459);
|
|
@@ -4517,13 +4518,13 @@ function fromBitmap(bitmap, bit) {
|
|
|
4517
4518
|
return popcount(bitmap & bit - 1);
|
|
4518
4519
|
}
|
|
4519
4520
|
|
|
4520
|
-
// node_modules/.pnpm
|
|
4521
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/stack.js
|
|
4521
4522
|
var make5 = (value, previous) => ({
|
|
4522
4523
|
value,
|
|
4523
4524
|
previous
|
|
4524
4525
|
});
|
|
4525
4526
|
|
|
4526
|
-
// node_modules/.pnpm
|
|
4527
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/hashMap/array.js
|
|
4527
4528
|
function arrayUpdate(mutate3, at, v, arr) {
|
|
4528
4529
|
let out = arr;
|
|
4529
4530
|
if (!mutate3) {
|
|
@@ -4568,7 +4569,7 @@ function arraySpliceIn(mutate3, at, v, arr) {
|
|
|
4568
4569
|
return out;
|
|
4569
4570
|
}
|
|
4570
4571
|
|
|
4571
|
-
// node_modules/.pnpm
|
|
4572
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/hashMap/node.js
|
|
4572
4573
|
var EmptyNode = class _EmptyNode {
|
|
4573
4574
|
_tag = "EmptyNode";
|
|
4574
4575
|
modify(edit, _shift, f, hash2, key, size4) {
|
|
@@ -4803,7 +4804,7 @@ function mergeLeaves(edit, shift, h1, n1, h2, n2) {
|
|
|
4803
4804
|
}
|
|
4804
4805
|
}
|
|
4805
4806
|
|
|
4806
|
-
// node_modules/.pnpm
|
|
4807
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/hashMap.js
|
|
4807
4808
|
var HashMapSymbolKey = "effect/HashMap";
|
|
4808
4809
|
var HashMapTypeId = /* @__PURE__ */ Symbol.for(HashMapSymbolKey);
|
|
4809
4810
|
var HashMapProto = {
|
|
@@ -5015,7 +5016,7 @@ var reduce2 = /* @__PURE__ */ dual(3, (self, zero2, f) => {
|
|
|
5015
5016
|
return zero2;
|
|
5016
5017
|
});
|
|
5017
5018
|
|
|
5018
|
-
// node_modules/.pnpm
|
|
5019
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/hashSet.js
|
|
5019
5020
|
var HashSetSymbolKey = "effect/HashSet";
|
|
5020
5021
|
var HashSetTypeId = /* @__PURE__ */ Symbol.for(HashSetSymbolKey);
|
|
5021
5022
|
var HashSetProto = {
|
|
@@ -5077,13 +5078,13 @@ var union2 = /* @__PURE__ */ dual(2, (self, that) => mutate(empty4(), (set2) =>
|
|
|
5077
5078
|
}));
|
|
5078
5079
|
var forEach2 = /* @__PURE__ */ dual(2, (self, f) => forEach(self._keyMap, (_, k) => f(k)));
|
|
5079
5080
|
|
|
5080
|
-
// node_modules/.pnpm
|
|
5081
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/HashSet.js
|
|
5081
5082
|
var empty5 = empty4;
|
|
5082
5083
|
var size3 = size2;
|
|
5083
5084
|
var add2 = add;
|
|
5084
5085
|
var union3 = union2;
|
|
5085
5086
|
|
|
5086
|
-
// node_modules/.pnpm
|
|
5087
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/data.js
|
|
5087
5088
|
var ArrayProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Array.prototype), {
|
|
5088
5089
|
[symbol]() {
|
|
5089
5090
|
return cached(this, array2(this));
|
|
@@ -5106,7 +5107,7 @@ var Structural = /* @__PURE__ */ (function() {
|
|
|
5106
5107
|
return Structural2;
|
|
5107
5108
|
})();
|
|
5108
5109
|
|
|
5109
|
-
// node_modules/.pnpm
|
|
5110
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/opCodes/cause.js
|
|
5110
5111
|
var OP_DIE = "Die";
|
|
5111
5112
|
var OP_EMPTY = "Empty";
|
|
5112
5113
|
var OP_FAIL = "Fail";
|
|
@@ -5114,7 +5115,7 @@ var OP_INTERRUPT = "Interrupt";
|
|
|
5114
5115
|
var OP_PARALLEL = "Parallel";
|
|
5115
5116
|
var OP_SEQUENTIAL = "Sequential";
|
|
5116
5117
|
|
|
5117
|
-
// node_modules/.pnpm
|
|
5118
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/cause.js
|
|
5118
5119
|
var CauseSymbolKey = "effect/Cause";
|
|
5119
5120
|
var CauseTypeId = /* @__PURE__ */ Symbol.for(CauseSymbolKey);
|
|
5120
5121
|
var variance = {
|
|
@@ -5546,7 +5547,7 @@ var prettyErrors = (cause) => reduceWithContext(cause, void 0, {
|
|
|
5546
5547
|
sequentialCase: (_, l, r) => [...l, ...r]
|
|
5547
5548
|
});
|
|
5548
5549
|
|
|
5549
|
-
// node_modules/.pnpm
|
|
5550
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/singleShotGen.js
|
|
5550
5551
|
var SingleShotGen3 = class _SingleShotGen {
|
|
5551
5552
|
self;
|
|
5552
5553
|
called = false;
|
|
@@ -5576,7 +5577,7 @@ var SingleShotGen3 = class _SingleShotGen {
|
|
|
5576
5577
|
}
|
|
5577
5578
|
};
|
|
5578
5579
|
|
|
5579
|
-
// node_modules/.pnpm
|
|
5580
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/core.js
|
|
5580
5581
|
var EffectTypeId2 = /* @__PURE__ */ Symbol.for("effect/Effect");
|
|
5581
5582
|
var EffectPrimitive = class {
|
|
5582
5583
|
_op;
|
|
@@ -5860,7 +5861,7 @@ var currentSpanFromFiber = (fiber) => {
|
|
|
5860
5861
|
return span !== void 0 && span._tag === "Span" ? some2(span) : none2();
|
|
5861
5862
|
};
|
|
5862
5863
|
|
|
5863
|
-
// node_modules/.pnpm
|
|
5864
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Data.js
|
|
5864
5865
|
var Class2 = Structural;
|
|
5865
5866
|
var Error2 = /* @__PURE__ */ (function() {
|
|
5866
5867
|
const plainArgsSymbol = /* @__PURE__ */ Symbol.for("effect/Data/Error/plainArgs");
|
|
@@ -5898,10 +5899,10 @@ var TaggedError = (tag) => {
|
|
|
5898
5899
|
return O.BaseEffectError;
|
|
5899
5900
|
};
|
|
5900
5901
|
|
|
5901
|
-
// node_modules/.pnpm
|
|
5902
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/encoding/common.js
|
|
5902
5903
|
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
5903
5904
|
|
|
5904
|
-
// node_modules/.pnpm
|
|
5905
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/encoding/base64.js
|
|
5905
5906
|
var encode = (bytes) => {
|
|
5906
5907
|
const length = bytes.length;
|
|
5907
5908
|
let result = "";
|
|
@@ -5927,13 +5928,13 @@ var encode = (bytes) => {
|
|
|
5927
5928
|
};
|
|
5928
5929
|
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", "+", "/"];
|
|
5929
5930
|
|
|
5930
|
-
// node_modules/.pnpm
|
|
5931
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/encoding/base64Url.js
|
|
5931
5932
|
var encode2 = (data) => encode(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
5932
5933
|
|
|
5933
|
-
// node_modules/.pnpm
|
|
5934
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Encoding.js
|
|
5934
5935
|
var encodeBase64Url = (input) => typeof input === "string" ? encode2(encoder.encode(input)) : encode2(input);
|
|
5935
5936
|
|
|
5936
|
-
// node_modules/.pnpm
|
|
5937
|
+
// node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Graph.js
|
|
5937
5938
|
var TypeId4 = "~effect/Graph";
|
|
5938
5939
|
var Edge = class extends Class2 {
|
|
5939
5940
|
};
|
|
@@ -8043,6 +8044,140 @@ Nested Effect-able types may be intended if you plan to later manually flatten o
|
|
|
8043
8044
|
})
|
|
8044
8045
|
});
|
|
8045
8046
|
|
|
8047
|
+
// src/diagnostics/runEffectInsideEffect.ts
|
|
8048
|
+
var runEffectInsideEffect = createDiagnostic({
|
|
8049
|
+
name: "runEffectInsideEffect",
|
|
8050
|
+
code: 32,
|
|
8051
|
+
severity: "suggestion",
|
|
8052
|
+
apply: fn("runEffectInsideEffect.apply")(function* (sourceFile, report) {
|
|
8053
|
+
const ts = yield* service(TypeScriptApi);
|
|
8054
|
+
const typeParser = yield* service(TypeParser);
|
|
8055
|
+
const nodeToVisit = [];
|
|
8056
|
+
const appendNodeToVisit = (node) => {
|
|
8057
|
+
nodeToVisit.push(node);
|
|
8058
|
+
return void 0;
|
|
8059
|
+
};
|
|
8060
|
+
ts.forEachChild(sourceFile, appendNodeToVisit);
|
|
8061
|
+
while (nodeToVisit.length > 0) {
|
|
8062
|
+
const node = nodeToVisit.shift();
|
|
8063
|
+
ts.forEachChild(node, appendNodeToVisit);
|
|
8064
|
+
if (!ts.isCallExpression(node)) continue;
|
|
8065
|
+
const isEffectRunCall = yield* pipe(
|
|
8066
|
+
typeParser.isNodeReferenceToEffectModuleApi("runPromise")(node.expression),
|
|
8067
|
+
orElse2(() => typeParser.isNodeReferenceToEffectModuleApi("runSync")(node.expression)),
|
|
8068
|
+
orElse2(() => typeParser.isNodeReferenceToEffectModuleApi("runFork")(node.expression)),
|
|
8069
|
+
orElse2(() => typeParser.isNodeReferenceToEffectModuleApi("runCallback")(node.expression)),
|
|
8070
|
+
option
|
|
8071
|
+
);
|
|
8072
|
+
if (isNone2(isEffectRunCall)) continue;
|
|
8073
|
+
let currentParent = node.parent;
|
|
8074
|
+
let nodeIntroduceScope = void 0;
|
|
8075
|
+
while (currentParent) {
|
|
8076
|
+
const possiblyEffectGen = currentParent;
|
|
8077
|
+
if (!nodeIntroduceScope) {
|
|
8078
|
+
if (ts.isFunctionExpression(possiblyEffectGen) || ts.isFunctionDeclaration(possiblyEffectGen) || ts.isMethodDeclaration(possiblyEffectGen) || ts.isArrowFunction(possiblyEffectGen)) {
|
|
8079
|
+
nodeIntroduceScope = possiblyEffectGen;
|
|
8080
|
+
continue;
|
|
8081
|
+
}
|
|
8082
|
+
}
|
|
8083
|
+
const isInEffectGen = yield* pipe(
|
|
8084
|
+
typeParser.effectGen(possiblyEffectGen),
|
|
8085
|
+
orElse2(() => typeParser.effectFnUntracedGen(possiblyEffectGen)),
|
|
8086
|
+
orElse2(() => typeParser.effectFnGen(possiblyEffectGen)),
|
|
8087
|
+
option
|
|
8088
|
+
);
|
|
8089
|
+
if (isSome2(isInEffectGen)) {
|
|
8090
|
+
const nodeText = sourceFile.text.substring(
|
|
8091
|
+
ts.getTokenPosOfNode(node.expression, sourceFile),
|
|
8092
|
+
node.expression.end
|
|
8093
|
+
);
|
|
8094
|
+
const messageText = nodeIntroduceScope && nodeIntroduceScope !== isInEffectGen.value.generatorFunction ? `Using ${nodeText} inside an Effect is not recommended. The same runtime should generally be used instead to run child effects.
|
|
8095
|
+
Consider extracting the Runtime by using for example Effect.runtime and then use Runtime.run* with the extracted runtime instead.` : `Using ${nodeText} inside an Effect is not recommended. Effects inside generators can usually just be yielded.`;
|
|
8096
|
+
report({
|
|
8097
|
+
location: node.expression,
|
|
8098
|
+
messageText,
|
|
8099
|
+
fixes: []
|
|
8100
|
+
});
|
|
8101
|
+
}
|
|
8102
|
+
currentParent = currentParent.parent;
|
|
8103
|
+
}
|
|
8104
|
+
}
|
|
8105
|
+
})
|
|
8106
|
+
});
|
|
8107
|
+
|
|
8108
|
+
// src/diagnostics/schemaUnionOfLiterals.ts
|
|
8109
|
+
var schemaUnionOfLiterals = createDiagnostic({
|
|
8110
|
+
name: "schemaUnionOfLiterals",
|
|
8111
|
+
code: 33,
|
|
8112
|
+
severity: "off",
|
|
8113
|
+
apply: fn("schemaUnionOfLiterals.apply")(function* (sourceFile, report) {
|
|
8114
|
+
const ts = yield* service(TypeScriptApi);
|
|
8115
|
+
const typeParser = yield* service(TypeParser);
|
|
8116
|
+
const nodeToVisit = [];
|
|
8117
|
+
const appendNodeToVisit = (node) => {
|
|
8118
|
+
nodeToVisit.push(node);
|
|
8119
|
+
return void 0;
|
|
8120
|
+
};
|
|
8121
|
+
ts.forEachChild(sourceFile, appendNodeToVisit);
|
|
8122
|
+
while (nodeToVisit.length > 0) {
|
|
8123
|
+
const node = nodeToVisit.shift();
|
|
8124
|
+
if (ts.isCallExpression(node)) {
|
|
8125
|
+
const isSchemaUnionCall = yield* pipe(
|
|
8126
|
+
typeParser.isNodeReferenceToEffectSchemaModuleApi("Union")(node.expression),
|
|
8127
|
+
orElse2(() => void_)
|
|
8128
|
+
);
|
|
8129
|
+
if (isSchemaUnionCall) {
|
|
8130
|
+
const args2 = fromIterable(node.arguments);
|
|
8131
|
+
if (args2.length >= 2) {
|
|
8132
|
+
const allAreCallExpressions = args2.every((arg) => ts.isCallExpression(arg));
|
|
8133
|
+
if (allAreCallExpressions) {
|
|
8134
|
+
const literalChecks = args2.map((arg) => {
|
|
8135
|
+
const callArg = arg;
|
|
8136
|
+
return pipe(
|
|
8137
|
+
typeParser.isNodeReferenceToEffectSchemaModuleApi("Literal")(callArg.expression),
|
|
8138
|
+
map5(() => callArg)
|
|
8139
|
+
);
|
|
8140
|
+
});
|
|
8141
|
+
const allLiteralsResult = yield* pipe(
|
|
8142
|
+
all(...literalChecks),
|
|
8143
|
+
option
|
|
8144
|
+
);
|
|
8145
|
+
if (allLiteralsResult._tag === "Some") {
|
|
8146
|
+
const allLiteralValues = [];
|
|
8147
|
+
for (const literalCall of allLiteralsResult.value) {
|
|
8148
|
+
for (const arg of literalCall.arguments) {
|
|
8149
|
+
allLiteralValues.push(arg);
|
|
8150
|
+
}
|
|
8151
|
+
}
|
|
8152
|
+
const firstLiteralCall = allLiteralsResult.value[0];
|
|
8153
|
+
const schemaLiteralExpression = firstLiteralCall.expression;
|
|
8154
|
+
report({
|
|
8155
|
+
location: node,
|
|
8156
|
+
messageText: "A Schema.Union of multiple Schema.Literal calls can be simplified to a single Schema.Literal call.",
|
|
8157
|
+
fixes: [{
|
|
8158
|
+
fixName: "schemaUnionOfLiterals_fix",
|
|
8159
|
+
description: "Replace with a single Schema.Literal call",
|
|
8160
|
+
apply: gen(function* () {
|
|
8161
|
+
const changeTracker = yield* service(ChangeTracker);
|
|
8162
|
+
const newNode = ts.factory.createCallExpression(
|
|
8163
|
+
schemaLiteralExpression,
|
|
8164
|
+
void 0,
|
|
8165
|
+
allLiteralValues
|
|
8166
|
+
);
|
|
8167
|
+
changeTracker.replaceNode(sourceFile, node, newNode);
|
|
8168
|
+
})
|
|
8169
|
+
}]
|
|
8170
|
+
});
|
|
8171
|
+
}
|
|
8172
|
+
}
|
|
8173
|
+
}
|
|
8174
|
+
}
|
|
8175
|
+
}
|
|
8176
|
+
ts.forEachChild(node, appendNodeToVisit);
|
|
8177
|
+
}
|
|
8178
|
+
})
|
|
8179
|
+
});
|
|
8180
|
+
|
|
8046
8181
|
// src/diagnostics/scopeInLayerEffect.ts
|
|
8047
8182
|
var scopeInLayerEffect = createDiagnostic({
|
|
8048
8183
|
name: "scopeInLayerEffect",
|
|
@@ -8596,7 +8731,9 @@ var diagnostics = [
|
|
|
8596
8731
|
deterministicKeys,
|
|
8597
8732
|
missedPipeableOpportunity,
|
|
8598
8733
|
strictEffectProvide,
|
|
8599
|
-
unknownInEffectCatch
|
|
8734
|
+
unknownInEffectCatch,
|
|
8735
|
+
runEffectInsideEffect,
|
|
8736
|
+
schemaUnionOfLiterals
|
|
8600
8737
|
];
|
|
8601
8738
|
|
|
8602
8739
|
// src/completions/effectDiagnosticsComment.ts
|