clanka 0.10.1 → 0.11.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 +26 -0
- package/dist/AgentExecutor.test.js +24 -4
- package/dist/AgentExecutor.test.js.map +1 -1
- package/dist/AgentSkills.test.js +0 -1
- package/dist/AgentSkills.test.js.map +1 -1
- package/dist/AgentSubagents.test.js +16 -6
- package/dist/AgentSubagents.test.js.map +1 -1
- package/dist/bin/{Effect-2jPlJ8eu.mjs → Effect-zUBunSAW.mjs} +70 -67
- package/dist/bin/Effect-zUBunSAW.mjs.map +1 -0
- package/dist/bin/{McpClient-1W508adc.mjs → McpClient-CnP2P7c9.mjs} +19 -19
- package/dist/bin/{McpClient-1W508adc.mjs.map → McpClient-CnP2P7c9.mjs.map} +1 -1
- package/dist/bin/{OutputFormatter-BFAv48k9.mjs → OutputFormatter-BPdc6RmH.mjs} +3 -3
- package/dist/bin/{OutputFormatter-BFAv48k9.mjs.map → OutputFormatter-BPdc6RmH.mjs.map} +1 -1
- package/dist/bin/{Schema-D-7VuCiC.mjs → Schema-C2Y2y3tU.mjs} +243 -94
- package/dist/bin/Schema-C2Y2y3tU.mjs.map +1 -0
- package/dist/bin/{SemanticSearch-Cb8aqvGv.mjs → SemanticSearch-BKZxP19F.mjs} +26 -20
- package/dist/bin/SemanticSearch-BKZxP19F.mjs.map +1 -0
- package/dist/bin/{Stream-DEu2tfCV.mjs → Stream-BvmRbTMu.mjs} +44 -27
- package/dist/bin/Stream-BvmRbTMu.mjs.map +1 -0
- package/dist/bin/cli.mjs +2870 -2818
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/bin/{index.min-CI3qqohw.mjs → index.min-DbZbUHX3.mjs} +3 -3
- package/dist/bin/index.min-DbZbUHX3.mjs.map +1 -0
- package/dist/bin/turndown.cjs-DK29wZw3.mjs.map +1 -1
- package/dist/cli.js +23 -6
- package/dist/cli.js.map +1 -1
- package/package.json +14 -14
- package/src/AgentExecutor.test.ts +31 -5
- package/src/AgentSkills.test.ts +0 -1
- package/src/AgentSubagents.test.ts +20 -6
- package/src/cli.ts +46 -8
- package/dist/bin/Effect-2jPlJ8eu.mjs.map +0 -1
- package/dist/bin/Schema-D-7VuCiC.mjs.map +0 -1
- package/dist/bin/SemanticSearch-Cb8aqvGv.mjs.map +0 -1
- package/dist/bin/Stream-DEu2tfCV.mjs.map +0 -1
- package/dist/bin/index.min-CI3qqohw.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $t as try_, Ba as isDuration, Bo as isLessThan$1, Co as isNone,
|
|
2
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1
|
+
import { $t as try_, As as optimize, Ba as isDuration, Bo as isLessThan$1, Co as isNone, Do as map$4, Ds as combine, Ea as fail$1, Eo as liftThrowable, Es as array, F as failCauseSync, Fa as succeed$1, Fo as Date$3, Fs as hasProperty, Go as strictEqual, H as fnUntracedEager, Hi as resolveConcurrency, Hn as IllegalArgumentError, Ho as make$10, Io as Number$4, Is as isBigInt, It as runSyncExit, Ja as seconds, Jo as Error$3, Js as isObject, Ka as nanos, Kt as suspend$1, L as flatMap, Lo as String$4, Ls as isBoolean, M as exit, Ma as isSuccess$1, Mo as some, Ms as structure, N as fail$2, Na as map$6, Ni as iterateConcurrent, Ns as structureKeys, Oa as flatMap$1, Oo as match, Os as hash, Pa as match$1, Pi as iterateEager, Po as BigInt$4, Ps as symbol, Qa as Reference, Qi as encode$1, Qs as isTagged, Qt as tryPromise, R as flatMapEager, Ra as fromInputUnsafe, Ri as map$2, Ro as isGreaterThan$1, Rs as isError, Ss as asEquivalence, To as isSome, Ts as symbol$1, Uo as Tuple$1, Us as isNotNullish, Ut as succeed$3, Va as isFinite$2, Vo as isLessThanOrEqualTo$1, Vs as isNever$1, Wa as millis, Wo as make$9, Ws as isNotUndefined, Wt as succeedNone, Xa as toSeconds, Xo as TaggedError$2, Xs as isPropertyKey, Y as fromResult, Yn as die$1, Yo as PipeInspectableProto, Ys as isObjectKeyword, Zo as args, Zs as isString$1, _i as effectIsExit, _s as formatPath, aa as empty$4, ar as isCause, bo as getOrNull, bs as redact$2, ci as void_$1, cr as isReason, cs as getStackTraceLimit, ct as mapBothEager, dc as memoizeIdempotent, dr as makeFailReason, dt as mapErrorEager, ec as isUnknown, fa as isArrayNonEmpty, fo as filter, fr as makeInterruptReason, fs as NodeInspectSymbol, gi as currentTimeMillis$1, go as fromNullOr, gs as formatJson, hc as pipeArguments, ho as flatten, hs as formatDate, ii as isExit, ja as isFailure, js as string$1, k as die, ka as getOrThrow, ko as none, ks as number$1, lc as identity, li as ClockRef, ls as setStackTraceLimit, lt as mapEager, m as catchCause, ma as isReadonlyArrayNonEmpty, mc as Prototype, ms as format$1, ni as failCause, no as get, oi as isSuccess, on as void_$2, os as assignProperties, pc as Class$2, pr as map$5, qa as negativeInfinity, qs as isNumber, ra as append, sc as dual, si as succeed$2, sr as isFailReason, ss as assignProperty$1, ti as fail$3, to as empty$3, tr as fromReasons, ua as fromIterable$1, uc as memoize, ur as makeDieReason, us as BaseProto, va as makeEquivalence$3, vs as formatPropertyKey, wo as isOption, ws as equals, xs as symbolRedactable, ya as map$3, ys as currentFiberTypeId, za as infinity, zi as monotonicTimeNanos$1, zo as isGreaterThanOrEqualTo$1, zs as isFunction } from "./Effect-zUBunSAW.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Tuple.js
|
|
3
3
|
const makeEquivalence$2 = Tuple$1;
|
|
4
4
|
//#endregion
|
|
5
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
5
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Record.js
|
|
6
6
|
const has = dual(2, (self, key) => Object.hasOwn(self, key));
|
|
7
7
|
const map$1 = dual(2, (self, f) => {
|
|
8
8
|
const out = { ...self };
|
|
@@ -20,7 +20,7 @@ const makeEquivalence$1 = (equivalence) => {
|
|
|
20
20
|
return (self, that) => is(self, that) && is(that, self);
|
|
21
21
|
};
|
|
22
22
|
//#endregion
|
|
23
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
23
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Data.js
|
|
24
24
|
const Class$1 = class extends Class$2 {
|
|
25
25
|
constructor(props) {
|
|
26
26
|
super();
|
|
@@ -51,22 +51,22 @@ function taggedMatch() {
|
|
|
51
51
|
const Error$2 = Error$3;
|
|
52
52
|
const TaggedError$1 = TaggedError$2;
|
|
53
53
|
//#endregion
|
|
54
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
54
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/EncodingError.js
|
|
55
55
|
const EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
56
56
|
var EncodingError = class extends TaggedError$1("EncodingError") {
|
|
57
57
|
[EncodingErrorTypeId] = EncodingErrorTypeId;
|
|
58
58
|
};
|
|
59
59
|
//#endregion
|
|
60
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
60
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Clock.js
|
|
61
61
|
const Clock = ClockRef;
|
|
62
62
|
const currentTimeMillis = currentTimeMillis$1;
|
|
63
63
|
const monotonicTimeNanos = monotonicTimeNanos$1;
|
|
64
64
|
//#endregion
|
|
65
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
66
|
-
const TypeId$
|
|
65
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/dateTime.js
|
|
66
|
+
const TypeId$12 = "~effect/DateTime";
|
|
67
67
|
const TimeZoneTypeId = "~effect/DateTime/TimeZone";
|
|
68
|
-
const Proto$
|
|
69
|
-
[TypeId$
|
|
68
|
+
const Proto$4 = {
|
|
69
|
+
[TypeId$12]: TypeId$12,
|
|
70
70
|
pipe() {
|
|
71
71
|
return pipeArguments(this, arguments);
|
|
72
72
|
},
|
|
@@ -78,7 +78,7 @@ const Proto$3 = {
|
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
const ProtoUtc = {
|
|
81
|
-
...Proto$
|
|
81
|
+
...Proto$4,
|
|
82
82
|
_tag: "Utc",
|
|
83
83
|
[symbol]() {
|
|
84
84
|
return number$1(this.epochMilliseconds);
|
|
@@ -91,7 +91,7 @@ const ProtoUtc = {
|
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
const ProtoZoned = {
|
|
94
|
-
...Proto$
|
|
94
|
+
...Proto$4,
|
|
95
95
|
_tag: "Zoned",
|
|
96
96
|
[symbol]() {
|
|
97
97
|
return combine(number$1(this.epochMilliseconds))(hash(this.zone));
|
|
@@ -149,7 +149,7 @@ const ProtoTimeZoneOffset = {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
-
const isDateTime$1 = (u) => hasProperty(u, TypeId$
|
|
152
|
+
const isDateTime$1 = (u) => hasProperty(u, TypeId$12);
|
|
153
153
|
const isTimeZone = (u) => hasProperty(u, TimeZoneTypeId);
|
|
154
154
|
const isUtc$1 = (self) => self._tag === "Utc";
|
|
155
155
|
const makeUtc = (epochMillis) => {
|
|
@@ -179,7 +179,7 @@ const makeUnsafe$1 = (input) => {
|
|
|
179
179
|
return fromDateUnsafe$1(new Date(input));
|
|
180
180
|
};
|
|
181
181
|
const hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input);
|
|
182
|
-
const make$
|
|
182
|
+
const make$8 = liftThrowable(makeUnsafe$1);
|
|
183
183
|
const now$1 = map$2(currentTimeMillis, makeUtc);
|
|
184
184
|
const toUtc$1 = (self) => makeUtc(self.epochMilliseconds);
|
|
185
185
|
const toDateUtc$1 = (self) => new Date(self.epochMilliseconds);
|
|
@@ -233,7 +233,7 @@ const formatIsoOffset = (self) => {
|
|
|
233
233
|
};
|
|
234
234
|
const formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
|
|
235
235
|
//#endregion
|
|
236
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
236
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/redacted.js
|
|
237
237
|
const redactedRegistry = new WeakMap();
|
|
238
238
|
const value$1 = (self) => {
|
|
239
239
|
if (redactedRegistry.has(self)) return redactedRegistry.get(self);
|
|
@@ -241,17 +241,17 @@ const value$1 = (self) => {
|
|
|
241
241
|
};
|
|
242
242
|
const stringOrRedacted = (val) => typeof val === "string" ? val : value$1(val);
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
245
|
-
const TypeId$
|
|
246
|
-
const isRedacted = (u) => hasProperty(u, TypeId$
|
|
247
|
-
const make$
|
|
248
|
-
const self = Object.create(Proto$
|
|
244
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Redacted.js
|
|
245
|
+
const TypeId$11 = "~effect/Redacted";
|
|
246
|
+
const isRedacted = (u) => hasProperty(u, TypeId$11);
|
|
247
|
+
const make$7 = (value, options) => {
|
|
248
|
+
const self = Object.create(Proto$3);
|
|
249
249
|
if (options?.label) self.label = options.label;
|
|
250
250
|
redactedRegistry.set(self, value);
|
|
251
251
|
return self;
|
|
252
252
|
};
|
|
253
|
-
const Proto$
|
|
254
|
-
[TypeId$
|
|
253
|
+
const Proto$3 = {
|
|
254
|
+
[TypeId$11]: { _A: (_) => _ },
|
|
255
255
|
label: void 0,
|
|
256
256
|
...PipeInspectableProto,
|
|
257
257
|
toJSON() {
|
|
@@ -268,12 +268,12 @@ const Proto$2 = {
|
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
const value = value$1;
|
|
271
|
-
const makeEquivalence = (isEquivalent) => make$
|
|
271
|
+
const makeEquivalence = (isEquivalent) => make$9((x, y) => isEquivalent(value(x), value(y)));
|
|
272
272
|
//#endregion
|
|
273
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
274
|
-
const TypeId$
|
|
273
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/BigDecimal.js
|
|
274
|
+
const TypeId$10 = "~effect/BigDecimal";
|
|
275
275
|
const BigDecimalProto = {
|
|
276
|
-
[TypeId$
|
|
276
|
+
[TypeId$10]: TypeId$10,
|
|
277
277
|
[symbol]() {
|
|
278
278
|
const normalized = normalize(this);
|
|
279
279
|
return combine(string$1(String(normalized.value)), number$1(normalized.scale));
|
|
@@ -298,8 +298,8 @@ const BigDecimalProto = {
|
|
|
298
298
|
return pipeArguments(this, arguments);
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
|
-
const isBigDecimal = (u) => hasProperty(u, TypeId$
|
|
302
|
-
const make$
|
|
301
|
+
const isBigDecimal = (u) => hasProperty(u, TypeId$10);
|
|
302
|
+
const make$6 = (value, scale) => {
|
|
303
303
|
if (!Number.isSafeInteger(scale)) throw new RangeError(`Scale must be a safe integer, got ${scale}`);
|
|
304
304
|
const o = Object.create(BigDecimalProto);
|
|
305
305
|
o.value = value;
|
|
@@ -307,7 +307,7 @@ const make$5 = (value, scale) => {
|
|
|
307
307
|
return o;
|
|
308
308
|
};
|
|
309
309
|
const makeNormalized = (value, scale) => {
|
|
310
|
-
const o = make$
|
|
310
|
+
const o = make$6(value, scale);
|
|
311
311
|
o.normalized = o;
|
|
312
312
|
return o;
|
|
313
313
|
};
|
|
@@ -350,7 +350,7 @@ const compare = (self, that) => {
|
|
|
350
350
|
const powerOfTen = comparisonPowersOfTen[absoluteScaleDifference] ??= bigint10 ** BigInt(absoluteScaleDifference);
|
|
351
351
|
return scaleDifference > 0 ? compareBigInt(self.value, that.value * powerOfTen) : compareBigInt(self.value * powerOfTen, that.value);
|
|
352
352
|
};
|
|
353
|
-
const Order = make$
|
|
353
|
+
const Order = make$10(compare);
|
|
354
354
|
const sign = (n) => n.value === bigint0 ? 0 : n.value < bigint0 ? -1 : 1;
|
|
355
355
|
const format = (n) => {
|
|
356
356
|
const normalized = normalize(n);
|
|
@@ -374,12 +374,12 @@ const toExponential = (n) => {
|
|
|
374
374
|
};
|
|
375
375
|
const isZero = (n) => n.value === bigint0;
|
|
376
376
|
//#endregion
|
|
377
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
377
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/DateTime.js
|
|
378
378
|
const isDateTime = isDateTime$1;
|
|
379
379
|
const isUtc = isUtc$1;
|
|
380
380
|
const fromDateUnsafe = fromDateUnsafe$1;
|
|
381
381
|
const makeUnsafe = makeUnsafe$1;
|
|
382
|
-
const make$
|
|
382
|
+
const make$5 = make$8;
|
|
383
383
|
const now = now$1;
|
|
384
384
|
const toUtc = toUtc$1;
|
|
385
385
|
const toDateUtc = toDateUtc$1;
|
|
@@ -388,7 +388,7 @@ const removeTime = removeTime$1;
|
|
|
388
388
|
const formatIso = formatIso$1;
|
|
389
389
|
const formatIsoDate = formatIsoDate$1;
|
|
390
390
|
//#endregion
|
|
391
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
391
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/Base64.js
|
|
392
392
|
const encode = (input) => encodeBytes(typeof input === "string" ? encoder$1.encode(input) : input);
|
|
393
393
|
const decode = (str) => {
|
|
394
394
|
const stripped = stripCrlf(str);
|
|
@@ -459,9 +459,9 @@ const getCode = (charCode) => {
|
|
|
459
459
|
return codes[charCode];
|
|
460
460
|
};
|
|
461
461
|
//#endregion
|
|
462
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
463
|
-
const TypeId$
|
|
464
|
-
const isCookies = (u) => hasProperty(u, TypeId$
|
|
462
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/Cookies.js
|
|
463
|
+
const TypeId$9 = "~effect/http/Cookies";
|
|
464
|
+
const isCookies = (u) => hasProperty(u, TypeId$9);
|
|
465
465
|
const CookieTypeId = "~effect/http/Cookies/Cookie";
|
|
466
466
|
const isCookie = (u) => hasProperty(u, CookieTypeId);
|
|
467
467
|
const CookieErrorTypeId = "~effect/http/Cookies/CookieError";
|
|
@@ -478,8 +478,8 @@ var CookiesError = class CookiesError extends TaggedError$1("CookiesError") {
|
|
|
478
478
|
return this.reason._tag;
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
|
-
const Proto$
|
|
482
|
-
[TypeId$
|
|
481
|
+
const Proto$2 = {
|
|
482
|
+
[TypeId$9]: TypeId$9,
|
|
483
483
|
...BaseProto,
|
|
484
484
|
toJSON() {
|
|
485
485
|
return {
|
|
@@ -492,7 +492,7 @@ const Proto$1 = {
|
|
|
492
492
|
}
|
|
493
493
|
};
|
|
494
494
|
const fromReadonlyRecord = (cookies) => {
|
|
495
|
-
const self = Object.create(Proto$
|
|
495
|
+
const self = Object.create(Proto$2);
|
|
496
496
|
self.cookies = cookies;
|
|
497
497
|
return self;
|
|
498
498
|
};
|
|
@@ -594,7 +594,7 @@ function parseSetCookie(header) {
|
|
|
594
594
|
options: Object.keys(options).length > 0 ? options : void 0
|
|
595
595
|
});
|
|
596
596
|
}
|
|
597
|
-
const empty$
|
|
597
|
+
const empty$2 = fromIterable([]);
|
|
598
598
|
const fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
599
599
|
const cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
600
600
|
const cookieDomainRegExp = /^[\u0009\u0020-\u003a\u003c-\u007e\u0080-\u00ff]+$/;
|
|
@@ -684,7 +684,93 @@ const tryDecodeURIComponent = (str) => {
|
|
|
684
684
|
}
|
|
685
685
|
};
|
|
686
686
|
//#endregion
|
|
687
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
687
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/Headers.js
|
|
688
|
+
const TypeId$8 = Symbol.for("~effect/http/Headers");
|
|
689
|
+
const Proto$1 = Object.defineProperties(Object.create(null), {
|
|
690
|
+
[TypeId$8]: { value: TypeId$8 },
|
|
691
|
+
[symbolRedactable]: { value(context) {
|
|
692
|
+
return redact$1(this, get(context, CurrentRedactedNames$1));
|
|
693
|
+
} },
|
|
694
|
+
toJSON: { value() {
|
|
695
|
+
return redact$2(this);
|
|
696
|
+
} },
|
|
697
|
+
[symbol$1]: { value(that) {
|
|
698
|
+
return Equivalence$1(this, that);
|
|
699
|
+
} },
|
|
700
|
+
[symbol]: { value() {
|
|
701
|
+
return structure(this);
|
|
702
|
+
} },
|
|
703
|
+
toString: { value: BaseProto.toString },
|
|
704
|
+
[NodeInspectSymbol]: { value: BaseProto[NodeInspectSymbol] }
|
|
705
|
+
});
|
|
706
|
+
const make$4 = (input) => Object.assign(Object.create(Proto$1), input);
|
|
707
|
+
const Equivalence$1 = makeEquivalence$1(strictEqual());
|
|
708
|
+
const empty$1 = Object.create(Proto$1);
|
|
709
|
+
const fromInput$1 = (input) => {
|
|
710
|
+
if (input === void 0) return empty$1;
|
|
711
|
+
else if (Symbol.iterator in input) {
|
|
712
|
+
const out = Object.create(Proto$1);
|
|
713
|
+
for (const [k, v] of input) out[k.toLowerCase()] = v;
|
|
714
|
+
return out;
|
|
715
|
+
}
|
|
716
|
+
const out = Object.create(Proto$1);
|
|
717
|
+
for (const [k, v] of Object.entries(input)) if (Array.isArray(v)) out[k.toLowerCase()] = v.join(", ");
|
|
718
|
+
else if (v !== void 0) out[k.toLowerCase()] = v;
|
|
719
|
+
return out;
|
|
720
|
+
};
|
|
721
|
+
const fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto$1);
|
|
722
|
+
const set = dual(3, (self, key, value) => {
|
|
723
|
+
const out = make$4(self);
|
|
724
|
+
out[key.toLowerCase()] = value;
|
|
725
|
+
return out;
|
|
726
|
+
});
|
|
727
|
+
const setAll$1 = dual(2, (self, headers) => make$4({
|
|
728
|
+
...self,
|
|
729
|
+
...fromInput$1(headers)
|
|
730
|
+
}));
|
|
731
|
+
const merge = dual(2, (self, headers) => {
|
|
732
|
+
const out = make$4(self);
|
|
733
|
+
Object.assign(out, headers);
|
|
734
|
+
return out;
|
|
735
|
+
});
|
|
736
|
+
const remove = dual(2, (self, key) => {
|
|
737
|
+
const out = make$4(self);
|
|
738
|
+
delete out[key.toLowerCase()];
|
|
739
|
+
return out;
|
|
740
|
+
});
|
|
741
|
+
const redact$1 = dual(2, (self, key) => {
|
|
742
|
+
const out = { ...self };
|
|
743
|
+
const modify = (key) => {
|
|
744
|
+
if (typeof key === "string") {
|
|
745
|
+
const k = key.toLowerCase();
|
|
746
|
+
if (k in self) out[k] = make$7(self[k]);
|
|
747
|
+
} else for (const name in self) if (name.search(key) !== -1) out[name] = make$7(self[name]);
|
|
748
|
+
};
|
|
749
|
+
if (Array.isArray(key)) for (let i = 0; i < key.length; i++) modify(key[i]);
|
|
750
|
+
else modify(key);
|
|
751
|
+
return out;
|
|
752
|
+
});
|
|
753
|
+
const isRedactedName$1 = (name, patterns) => {
|
|
754
|
+
const lowerName = name.toLowerCase();
|
|
755
|
+
for (let i = 0; i < patterns.length; i++) {
|
|
756
|
+
const pattern = patterns[i];
|
|
757
|
+
if (typeof pattern === "string") {
|
|
758
|
+
if (pattern.toLowerCase() === lowerName) return true;
|
|
759
|
+
} else if (name.search(pattern) !== -1) return true;
|
|
760
|
+
}
|
|
761
|
+
return false;
|
|
762
|
+
};
|
|
763
|
+
const CurrentRedactedNames$1 = Reference("effect/Headers/CurrentRedactedNames", { defaultValue: () => [
|
|
764
|
+
"authorization",
|
|
765
|
+
"cookie",
|
|
766
|
+
"set-cookie",
|
|
767
|
+
"x-api-key"
|
|
768
|
+
] });
|
|
769
|
+
//#endregion
|
|
770
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/internal/urlParams.js
|
|
771
|
+
const unwrap = (value$6) => typeof value$6 === "string" ? value$6 : value(value$6);
|
|
772
|
+
//#endregion
|
|
773
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/UrlParams.js
|
|
688
774
|
const TypeId$7 = "~effect/http/UrlParams";
|
|
689
775
|
const isUrlParams = (u) => hasProperty(u, TypeId$7);
|
|
690
776
|
const Proto = {
|
|
@@ -693,12 +779,15 @@ const Proto = {
|
|
|
693
779
|
[Symbol.iterator]() {
|
|
694
780
|
return this.params[Symbol.iterator]();
|
|
695
781
|
},
|
|
696
|
-
|
|
782
|
+
[symbolRedactable](context) {
|
|
697
783
|
return {
|
|
698
784
|
_id: "UrlParams",
|
|
699
|
-
params: Object.fromEntries(this
|
|
785
|
+
params: Object.fromEntries(redact(this, get(context, CurrentRedactedNames)))
|
|
700
786
|
};
|
|
701
787
|
},
|
|
788
|
+
toJSON() {
|
|
789
|
+
return redact$2(this);
|
|
790
|
+
},
|
|
702
791
|
[symbol$1](that) {
|
|
703
792
|
return Equivalence(this, that);
|
|
704
793
|
},
|
|
@@ -725,15 +814,16 @@ const fromInputNested = (input) => {
|
|
|
725
814
|
const entries = typeof input[Symbol.iterator] === "function" ? fromIterable$1(input) : Object.entries(input);
|
|
726
815
|
const out = [];
|
|
727
816
|
for (const [key, value] of entries) if (Array.isArray(value)) {
|
|
728
|
-
for (let i = 0; i < value.length; i++) if (value[i] !== void 0) out.push([key,
|
|
729
|
-
} else if (value !== null && typeof value === "object") {
|
|
817
|
+
for (let i = 0; i < value.length; i++) if (value[i] !== void 0) out.push([key, coerce(value[i])]);
|
|
818
|
+
} else if (value !== null && typeof value === "object" && !isRedacted(value)) {
|
|
730
819
|
const nested = fromInputNested(value);
|
|
731
820
|
for (const [k, v] of nested) out.push([[key, ...typeof k === "string" ? [k] : k], v]);
|
|
732
|
-
} else if (value !== void 0) out.push([key,
|
|
821
|
+
} else if (value !== void 0) out.push([key, coerce(value)]);
|
|
733
822
|
return out;
|
|
734
823
|
};
|
|
735
|
-
const
|
|
736
|
-
const
|
|
824
|
+
const coerce = (value) => isRedacted(value) ? value : String(value);
|
|
825
|
+
const Equivalence = make$9((a, b) => arrayEquivalence(a.params, b.params));
|
|
826
|
+
const arrayEquivalence = makeEquivalence$3(makeEquivalence$2([strictEqual(), asEquivalence()]));
|
|
737
827
|
const empty = make$3([]);
|
|
738
828
|
const setAll = dual(2, (self, input) => {
|
|
739
829
|
const params = fromInput(input).params.slice();
|
|
@@ -745,20 +835,77 @@ const setAll = dual(2, (self, input) => {
|
|
|
745
835
|
}
|
|
746
836
|
return make$3(params);
|
|
747
837
|
});
|
|
748
|
-
const toString = (input) => new URLSearchParams(fromInput(input).params).toString();
|
|
838
|
+
const toString = (input) => new URLSearchParams(fromInput(input).params.map(([key, value]) => [key, unwrap(value)])).toString();
|
|
749
839
|
const toRecord = (self) => {
|
|
750
840
|
const out = {};
|
|
751
|
-
for (const [k,
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
841
|
+
for (const [k, v] of self.params) {
|
|
842
|
+
const value = unwrap(v);
|
|
843
|
+
if (!Object.hasOwn(out, k)) assignProperty$1(out, k, value);
|
|
844
|
+
else {
|
|
845
|
+
const current = out[k];
|
|
846
|
+
if (typeof current === "string") assignProperty$1(out, k, [current, value]);
|
|
847
|
+
else current.push(value);
|
|
848
|
+
}
|
|
756
849
|
}
|
|
757
850
|
return out;
|
|
758
851
|
};
|
|
759
852
|
const toReadonlyRecord = toRecord;
|
|
853
|
+
const redact = dual(2, (self, key) => {
|
|
854
|
+
const patterns = Array.isArray(key) ? key : [key];
|
|
855
|
+
return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName(name, patterns) ? make$7(value) : value]);
|
|
856
|
+
});
|
|
857
|
+
const isRedactedName = isRedactedName$1;
|
|
858
|
+
const redactUrl = (url, redactedNames = currentRedactedNames()) => {
|
|
859
|
+
if (url.includes("@")) url = redactUserinfo(url);
|
|
860
|
+
const queryStart = url.indexOf("?");
|
|
861
|
+
if (queryStart === -1 || redactedNames.length === 0) return url;
|
|
862
|
+
const hashStart = url.indexOf("#");
|
|
863
|
+
if (hashStart !== -1 && hashStart < queryStart) return url;
|
|
864
|
+
const queryEnd = hashStart === -1 ? url.length : hashStart;
|
|
865
|
+
return url.slice(0, queryStart + 1) + redactQuery(url.slice(queryStart + 1, queryEnd), redactedNames) + url.slice(queryEnd);
|
|
866
|
+
};
|
|
867
|
+
const authorityStart = /^(?:(https?|ftp|wss?):[/\\]*|[a-z][a-z\d+.-]*:\/\/|[/\\]{2,})/i;
|
|
868
|
+
const specialAuthorityEnd = /[/\\?#]/;
|
|
869
|
+
const authorityEnd = /[/?#]/;
|
|
870
|
+
const redactUserinfo = (url) => {
|
|
871
|
+
let normalized = "";
|
|
872
|
+
const offsets = [];
|
|
873
|
+
for (let i = 0; i < url.length; i++) {
|
|
874
|
+
const code = url.charCodeAt(i);
|
|
875
|
+
if (code === 9 || code === 10 || code === 13 || normalized === "" && code <= 32) continue;
|
|
876
|
+
normalized += url[i];
|
|
877
|
+
offsets.push(i);
|
|
878
|
+
}
|
|
879
|
+
const authority = authorityStart.exec(normalized);
|
|
880
|
+
if (authority === null) return url;
|
|
881
|
+
const start = authority[0].length;
|
|
882
|
+
const special = authority[1] !== void 0 || !authority[0].includes(":");
|
|
883
|
+
const rest = normalized.slice(start);
|
|
884
|
+
const end = rest.search(special ? specialAuthorityEnd : authorityEnd);
|
|
885
|
+
const userinfoEnd = (end === -1 ? rest : rest.slice(0, end)).lastIndexOf("@");
|
|
886
|
+
return userinfoEnd === -1 ? url : url.slice(0, offsets[start]) + "REDACTED:REDACTED" + url.slice(offsets[start + userinfoEnd]);
|
|
887
|
+
};
|
|
888
|
+
const redactQuery = (query, redactedNames) => query.split("&").map((part) => {
|
|
889
|
+
const index = part.indexOf("=");
|
|
890
|
+
return index !== -1 && isRedactedName(decodeQueryKey(part.slice(0, index)), redactedNames) ? part.slice(0, index + 1) + "REDACTED" : part;
|
|
891
|
+
}).join("&");
|
|
892
|
+
const decodeQueryKey = (key) => {
|
|
893
|
+
if (!key.includes("%") && !key.includes("+")) return key;
|
|
894
|
+
try {
|
|
895
|
+
return decodeURIComponent(key.replace(/\+/g, " "));
|
|
896
|
+
} catch {
|
|
897
|
+
return key;
|
|
898
|
+
}
|
|
899
|
+
};
|
|
900
|
+
const currentRedactedNames = () => get(globalThis["~effect/Fiber/currentFiber"]?.context ?? empty$3(), CurrentRedactedNames);
|
|
901
|
+
const CurrentRedactedNames = Reference("effect/http/UrlParams/CurrentRedactedNames", { defaultValue: () => [
|
|
902
|
+
"AWSAccessKeyId",
|
|
903
|
+
"Signature",
|
|
904
|
+
"sig",
|
|
905
|
+
"X-Goog-Signature"
|
|
906
|
+
] });
|
|
760
907
|
//#endregion
|
|
761
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
908
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/annotations.js
|
|
762
909
|
function resolve$1(ast) {
|
|
763
910
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
764
911
|
}
|
|
@@ -805,7 +952,7 @@ const annotationExcludedKeys = new Set([
|
|
|
805
952
|
"toCodecArbitrary"
|
|
806
953
|
]);
|
|
807
954
|
//#endregion
|
|
808
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
955
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/parser.js
|
|
809
956
|
const missing = Symbol();
|
|
810
957
|
const succeed = succeed$2;
|
|
811
958
|
const missingExit = succeed(missing);
|
|
@@ -813,7 +960,7 @@ const sameExit = succeed(missing);
|
|
|
813
960
|
const toOption = (value) => value === missing ? none() : some(value);
|
|
814
961
|
const fromOptionExit = (option) => option._tag === "None" ? missingExit : succeed(option.value);
|
|
815
962
|
//#endregion
|
|
816
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
963
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaIssue.js
|
|
817
964
|
const TypeId$6 = "~effect/SchemaIssue/Issue";
|
|
818
965
|
function isIssue(u) {
|
|
819
966
|
return hasProperty(u, TypeId$6) && u[TypeId$6] === TypeId$6;
|
|
@@ -1026,7 +1173,7 @@ function findMessage(issue) {
|
|
|
1026
1173
|
if (typeof message === "string") return message;
|
|
1027
1174
|
}
|
|
1028
1175
|
//#endregion
|
|
1029
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1176
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/cause.js
|
|
1030
1177
|
function getSchemaIssue(cause) {
|
|
1031
1178
|
let issue;
|
|
1032
1179
|
for (const reason of cause.reasons) {
|
|
@@ -1041,7 +1188,7 @@ function getSchemaIssueOrThrow(cause, message) {
|
|
|
1041
1188
|
return issue;
|
|
1042
1189
|
}
|
|
1043
1190
|
//#endregion
|
|
1044
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1191
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaGetter.js
|
|
1045
1192
|
const runGetter = (self, input, options) => {
|
|
1046
1193
|
switch (self._tag) {
|
|
1047
1194
|
case "Passthrough": return succeed$3(input);
|
|
@@ -1162,14 +1309,14 @@ function decodeBase64() {
|
|
|
1162
1309
|
}
|
|
1163
1310
|
function dateTimeUtcFromInput$1() {
|
|
1164
1311
|
return transformEffect$1((input, options) => {
|
|
1165
|
-
return match(make$
|
|
1312
|
+
return match(make$5(input), {
|
|
1166
1313
|
onNone: () => fail$2(new InvalidValue({ message: "Invalid DateTime input" }, input, options)),
|
|
1167
1314
|
onSome: (dt) => succeed$3(toUtc(dt))
|
|
1168
1315
|
});
|
|
1169
1316
|
});
|
|
1170
1317
|
}
|
|
1171
1318
|
//#endregion
|
|
1172
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1319
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaTransformation.js
|
|
1173
1320
|
const Middleware = class extends Class$2 {
|
|
1174
1321
|
_tag = "Middleware";
|
|
1175
1322
|
decode;
|
|
@@ -1285,7 +1432,7 @@ function fromJsonString$1(options) {
|
|
|
1285
1432
|
return new Transformation(parseJson(options ?? {}), stringifyJson(options));
|
|
1286
1433
|
}
|
|
1287
1434
|
//#endregion
|
|
1288
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
1435
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaAST.js
|
|
1289
1436
|
function makeGuard(tag) {
|
|
1290
1437
|
return (ast) => ast._tag === tag;
|
|
1291
1438
|
}
|
|
@@ -1852,7 +1999,7 @@ const Objects = class extends ASTNodeImpl {
|
|
|
1852
1999
|
}
|
|
1853
2000
|
}
|
|
1854
2001
|
else if (parseIndexes) {
|
|
1855
|
-
const keyPairs = empty$
|
|
2002
|
+
const keyPairs = empty$4();
|
|
1856
2003
|
for (let i = 0; i < indexCount; i++) {
|
|
1857
2004
|
const index = indexes[i];
|
|
1858
2005
|
const keys = indexKeys?.[i] ?? (index.is.parameter === string ? Object.keys(record) : getIndexSignatureKeys(record, index.is.parameter, options));
|
|
@@ -2814,7 +2961,7 @@ const StringTree = new Declaration([], () => (input, ast, options) => isStringTr
|
|
|
2814
2961
|
});
|
|
2815
2962
|
const unknownToStringTree = new Link(StringTree, passthrough());
|
|
2816
2963
|
//#endregion
|
|
2817
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
2964
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/interpreter.js
|
|
2818
2965
|
const flatMapTransformation = (result, current, f) => result === sameExit ? f(current) : flatMapEager(result, f);
|
|
2819
2966
|
function compileTransformation(transformation) {
|
|
2820
2967
|
if (transformation._tag === "Middleware") return (result, current, options) => {
|
|
@@ -2946,7 +3093,7 @@ function compile(ast, compile, compileField, base, specialize) {
|
|
|
2946
3093
|
};
|
|
2947
3094
|
}
|
|
2948
3095
|
//#endregion
|
|
2949
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
3096
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/compilerRegistry.js
|
|
2950
3097
|
const invalid = Symbol();
|
|
2951
3098
|
const cache = new WeakMap();
|
|
2952
3099
|
let compiler;
|
|
@@ -3034,7 +3181,7 @@ function resolve(ast) {
|
|
|
3034
3181
|
return entry;
|
|
3035
3182
|
}
|
|
3036
3183
|
//#endregion
|
|
3037
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
3184
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaParser.js
|
|
3038
3185
|
function makeEffect(schema) {
|
|
3039
3186
|
const ast = schema.ast;
|
|
3040
3187
|
let parser;
|
|
@@ -3133,7 +3280,7 @@ function run(ast) {
|
|
|
3133
3280
|
function parserResult(result, input) {
|
|
3134
3281
|
if (result === sameExit) return succeed$3(input);
|
|
3135
3282
|
if (!effectIsExit(result)) return flatMapEager(result, getValue);
|
|
3136
|
-
return result[args] === missing ? getValue(missing) : result;
|
|
3283
|
+
return result["~effect/Effect/args"] === missing ? getValue(missing) : result;
|
|
3137
3284
|
}
|
|
3138
3285
|
function runWithCompiler(compiler, ast) {
|
|
3139
3286
|
let parser;
|
|
@@ -3141,7 +3288,7 @@ function runWithCompiler(compiler, ast) {
|
|
|
3141
3288
|
const result = (parser ??= compiler(ast))(input, options ?? defaultParseOptions);
|
|
3142
3289
|
if (result === sameExit) return succeed$3(input);
|
|
3143
3290
|
if (!effectIsExit(result)) return flatMapEager(result, getValue);
|
|
3144
|
-
return result[args] === missing ? getValue(missing) : result;
|
|
3291
|
+
return result["~effect/Effect/args"] === missing ? getValue(missing) : result;
|
|
3145
3292
|
};
|
|
3146
3293
|
}
|
|
3147
3294
|
function asExit(parser) {
|
|
@@ -3188,7 +3335,7 @@ function makeConstructorSync(ast) {
|
|
|
3188
3335
|
const normalCompiler = (ast) => resolve(ast).parser;
|
|
3189
3336
|
const constructorCompiler = (ast) => resolve(ast).makeEffect;
|
|
3190
3337
|
//#endregion
|
|
3191
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
3338
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/make.js
|
|
3192
3339
|
const TypeId$3 = "~effect/Schema/Schema";
|
|
3193
3340
|
const RebuildOptions = Symbol();
|
|
3194
3341
|
const SchemaProto = {
|
|
@@ -3243,7 +3390,7 @@ function make$1(ast, options) {
|
|
|
3243
3390
|
return self;
|
|
3244
3391
|
}
|
|
3245
3392
|
//#endregion
|
|
3246
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
3393
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/JsonPointer.js
|
|
3247
3394
|
function escapeToken(token) {
|
|
3248
3395
|
return token.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
3249
3396
|
}
|
|
@@ -3270,7 +3417,7 @@ function parseUriFragment(fragment) {
|
|
|
3270
3417
|
return pointer === void 0 ? void 0 : pointer.length === 0 ? [] : pointer.slice(1).split("/").map(unescapeToken);
|
|
3271
3418
|
}
|
|
3272
3419
|
//#endregion
|
|
3273
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
3420
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/JsonSchema.js
|
|
3274
3421
|
function getReferenceKey($ref) {
|
|
3275
3422
|
const path = $ref.startsWith("#") ? parseUriFragment($ref) : void 0;
|
|
3276
3423
|
return path !== void 0 && path.length === 2 && path[0] === "$defs" ? path[1] : void 0;
|
|
@@ -3366,7 +3513,7 @@ const OPEN_API_30_TO_2020_COLLISIONS = [
|
|
|
3366
3513
|
"then"
|
|
3367
3514
|
];
|
|
3368
3515
|
//#endregion
|
|
3369
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
3516
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toCodec.js
|
|
3370
3517
|
function toCodecJson$1(schema) {
|
|
3371
3518
|
return make$1(toCodecJsonAST(schema.ast), { schema });
|
|
3372
3519
|
}
|
|
@@ -3492,17 +3639,17 @@ const toCodecStringTreeAST = applyToSelfOrLastLinkEncodingIdempotent((ast) => {
|
|
|
3492
3639
|
return out;
|
|
3493
3640
|
}, { stopAt: isCodecArrayFromSingleLink });
|
|
3494
3641
|
//#endregion
|
|
3495
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
3642
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/RegExp.js
|
|
3496
3643
|
const RegExp$1 = globalThis.RegExp;
|
|
3497
3644
|
const escape = (string) => string.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
3498
3645
|
//#endregion
|
|
3499
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
3646
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/errors.js
|
|
3500
3647
|
function errorWithPath(message, path) {
|
|
3501
3648
|
if (path.length > 0) message += `\n at ${formatPath(path)}`;
|
|
3502
3649
|
return new Error(message);
|
|
3503
3650
|
}
|
|
3504
3651
|
//#endregion
|
|
3505
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
3652
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
|
|
3506
3653
|
function formatDefinitionReference(key) {
|
|
3507
3654
|
return `#/$defs/${formatUriFragmentToken(key)}`;
|
|
3508
3655
|
}
|
|
@@ -4071,7 +4218,7 @@ function toJsonSchemaDocument$1(document, options) {
|
|
|
4071
4218
|
};
|
|
4072
4219
|
}
|
|
4073
4220
|
//#endregion
|
|
4074
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4221
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toRepresentation.js
|
|
4075
4222
|
const defaultReferencePolicy = ({ identifier }) => identifier;
|
|
4076
4223
|
function annotationsField(annotations) {
|
|
4077
4224
|
return annotations === void 0 ? void 0 : { annotations };
|
|
@@ -4335,7 +4482,7 @@ function toRepresentations(asts, options) {
|
|
|
4335
4482
|
}
|
|
4336
4483
|
}
|
|
4337
4484
|
//#endregion
|
|
4338
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4485
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Struct.js
|
|
4339
4486
|
const omit = dual(2, (self, keys) => {
|
|
4340
4487
|
return buildStruct(self, (k, v) => !hasPropertyKey(keys, k) ? [k, v] : void 0);
|
|
4341
4488
|
});
|
|
@@ -4359,13 +4506,13 @@ function buildStruct(source, f) {
|
|
|
4359
4506
|
return out;
|
|
4360
4507
|
}
|
|
4361
4508
|
//#endregion
|
|
4362
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4509
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schemaError.js
|
|
4363
4510
|
const SchemaErrorTypeId = "~effect/Schema/SchemaError";
|
|
4364
4511
|
function isSchemaError$1(u) {
|
|
4365
4512
|
return hasProperty(u, "~effect/Schema/SchemaError") && u["~effect/Schema/SchemaError"] === "~effect/Schema/SchemaError";
|
|
4366
4513
|
}
|
|
4367
4514
|
//#endregion
|
|
4368
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4515
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/net/NetAddress.js
|
|
4369
4516
|
const TypeId$2 = "~effect/net/NetAddress";
|
|
4370
4517
|
const ipv4Value = (self) => self.value;
|
|
4371
4518
|
const ipv6Words = (self) => self;
|
|
@@ -4627,7 +4774,7 @@ const UnixPathProto = {
|
|
|
4627
4774
|
}
|
|
4628
4775
|
};
|
|
4629
4776
|
//#endregion
|
|
4630
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4777
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/net/Host.js
|
|
4631
4778
|
const TypeId$1 = "~effect/net/Host";
|
|
4632
4779
|
const labelPattern = /^[a-z0-9_](?:[a-z0-9_-]{0,61}[a-z0-9_])?$/;
|
|
4633
4780
|
const numericLabel = /^(?:\d+|0x[0-9a-f]*)$/;
|
|
@@ -4669,7 +4816,7 @@ const formatHostPort = (self) => {
|
|
|
4669
4816
|
return host.includes(":") ? `[${host}]:${self.port}` : `${host}:${self.port}`;
|
|
4670
4817
|
};
|
|
4671
4818
|
//#endregion
|
|
4672
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4819
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/net/Dns.js
|
|
4673
4820
|
const RecordTypeId = "~effect/net/Dns/DnsRecord";
|
|
4674
4821
|
const isUint8 = (u) => Number.isInteger(u) && u >= 0 && u <= 255;
|
|
4675
4822
|
const isUint16 = (u) => Number.isInteger(u) && u >= 0 && u <= 65535;
|
|
@@ -4807,7 +4954,7 @@ const formatRecord = (self) => {
|
|
|
4807
4954
|
}
|
|
4808
4955
|
};
|
|
4809
4956
|
//#endregion
|
|
4810
|
-
//#region node_modules/.pnpm/effect@4.0.
|
|
4957
|
+
//#region node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Schema.js
|
|
4811
4958
|
const TypeId = TypeId$3;
|
|
4812
4959
|
function declareConstructor() {
|
|
4813
4960
|
return (typeParameters, run, annotations) => {
|
|
@@ -4920,6 +5067,7 @@ const Unknown = make(unknown);
|
|
|
4920
5067
|
const Null = make(null_);
|
|
4921
5068
|
const Undefined = make(undefined_);
|
|
4922
5069
|
const String$1 = make(string);
|
|
5070
|
+
const StringForLiteralAutocomplete = String$1;
|
|
4923
5071
|
const Number$1 = make(number);
|
|
4924
5072
|
const Boolean = make(boolean);
|
|
4925
5073
|
const BigInt$1 = make(bigInt);
|
|
@@ -5046,6 +5194,7 @@ function withConstructorDefault(defaultValue) {
|
|
|
5046
5194
|
return (schema) => make(withConstructorDefault$1(schema.ast, defaultValue), { schema });
|
|
5047
5195
|
}
|
|
5048
5196
|
function toIssueEffect(self) {
|
|
5197
|
+
if (effectIsExit(self) && self._tag === "Success") return self;
|
|
5049
5198
|
return catchCause(self, (cause) => failCauseSync(() => map$5(cause, (error) => error.issue)));
|
|
5050
5199
|
}
|
|
5051
5200
|
function withDecodingDefaultKey(defaultValue, options) {
|
|
@@ -5958,7 +6107,7 @@ function Cause(error, defect) {
|
|
|
5958
6107
|
}
|
|
5959
6108
|
function dateTimeUtcFromInput() {
|
|
5960
6109
|
return transformEffect$1((input, options) => {
|
|
5961
|
-
return match(make$
|
|
6110
|
+
return match(make$5(input), {
|
|
5962
6111
|
onNone: () => fail$2(new InvalidValue({ message: "Invalid DateTime input" }, input, options)),
|
|
5963
6112
|
onSome: (dt) => succeed$3(toUtc(dt))
|
|
5964
6113
|
});
|
|
@@ -5966,7 +6115,7 @@ function dateTimeUtcFromInput() {
|
|
|
5966
6115
|
}
|
|
5967
6116
|
const dateTimeUtcFromString = transformEffect({
|
|
5968
6117
|
decode: (s, options) => {
|
|
5969
|
-
return match(make$
|
|
6118
|
+
return match(make$5(s), {
|
|
5970
6119
|
onNone: () => fail$2(new InvalidValue({ expected: "a valid UTC DateTime string" }, s, options)),
|
|
5971
6120
|
onSome: (result) => succeed$3(toUtc(result))
|
|
5972
6121
|
});
|
|
@@ -6235,7 +6384,7 @@ const UrlParams = declare(isUrlParams, {
|
|
|
6235
6384
|
toEquivalence: () => Equivalence,
|
|
6236
6385
|
toCodec: () => link()(ArraySchema(Tuple([String$1, String$1])), transform({
|
|
6237
6386
|
decode: make$3,
|
|
6238
|
-
encode: (self) => self.params
|
|
6387
|
+
encode: (self) => self.params.map(([key, value]) => [key, unwrap(value)])
|
|
6239
6388
|
}))
|
|
6240
6389
|
});
|
|
6241
6390
|
const RecordFromUrlParams = UrlParams.pipe(decodeTo(Record(String$1, Union([String$1, NonEmptyArray(String$1)])), transform({
|
|
@@ -6245,7 +6394,7 @@ const RecordFromUrlParams = UrlParams.pipe(decodeTo(Record(String$1, Union([Stri
|
|
|
6245
6394
|
function OptionFromOptional(schema) {
|
|
6246
6395
|
return optional(schema).pipe(decodeTo(Option(toType(schema)), optionFromOptional()));
|
|
6247
6396
|
}
|
|
6248
|
-
function Redacted(value$
|
|
6397
|
+
function Redacted(value$4, options) {
|
|
6249
6398
|
const label = typeof options?.label === "string" ? options.label : void 0;
|
|
6250
6399
|
const disallowJsonEncode = options?.disallowJsonEncode === true;
|
|
6251
6400
|
const normalizedOptions = label !== void 0 ? disallowJsonEncode ? {
|
|
@@ -6253,11 +6402,11 @@ function Redacted(value$3, options) {
|
|
|
6253
6402
|
disallowJsonEncode: true
|
|
6254
6403
|
} : { label } : disallowJsonEncode ? { disallowJsonEncode: true } : void 0;
|
|
6255
6404
|
const decodeLabel = label !== void 0 ? decodeUnknownEffect$1(Literal(label)) : void 0;
|
|
6256
|
-
const schema = declareConstructor()([value$
|
|
6405
|
+
const schema = declareConstructor()([value$4], ([value$3]) => (input, ast, poptions) => {
|
|
6257
6406
|
if (isRedacted(input)) {
|
|
6258
6407
|
const label = decodeLabel !== void 0 ? mapErrorEager(decodeLabel(input.label, poptions), (issue) => new Pointer(["label"], issue)) : void_$2;
|
|
6259
|
-
return flatMapEager(label, () => mapBothEager(decodeUnknownEffect$1(value$
|
|
6260
|
-
onSuccess: (value) => make$
|
|
6408
|
+
return flatMapEager(label, () => mapBothEager(decodeUnknownEffect$1(value$3)(value(input), poptions), {
|
|
6409
|
+
onSuccess: (value) => make$7(value, { label: input.label }),
|
|
6261
6410
|
onFailure: () => {
|
|
6262
6411
|
return new Composite(ast, [new Pointer(["value"], new InvalidValue(void 0, input, poptions))], input, poptions);
|
|
6263
6412
|
}
|
|
@@ -6275,13 +6424,13 @@ function Redacted(value$3, options) {
|
|
|
6275
6424
|
importDeclarations: [`import * as Redacted from "effect/Redacted"`]
|
|
6276
6425
|
}),
|
|
6277
6426
|
expected: "Redacted",
|
|
6278
|
-
toCodecJson: ([value$
|
|
6279
|
-
decode: transform$1((e) => make$
|
|
6427
|
+
toCodecJson: ([value$5]) => link()(value$5, {
|
|
6428
|
+
decode: transform$1((e) => make$7(e, { label })),
|
|
6280
6429
|
encode: disallowJsonEncode ? forbidden((oe) => "Cannot serialize Redacted" + (isSome(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform$1(value)
|
|
6281
6430
|
}),
|
|
6282
6431
|
toEquivalence: ([value]) => makeEquivalence(value)
|
|
6283
6432
|
});
|
|
6284
|
-
return make(schema.ast, { value: value$
|
|
6433
|
+
return make(schema.ast, { value: value$4 });
|
|
6285
6434
|
}
|
|
6286
6435
|
const immerable = globalThis.Symbol.for("immer-draftable");
|
|
6287
6436
|
const payloadToken = {};
|
|
@@ -6432,6 +6581,6 @@ const MutableJson = make(annotate(MutableJson$1, { toCode: () => ({
|
|
|
6432
6581
|
Type: "Schema.MutableJson"
|
|
6433
6582
|
}) }));
|
|
6434
6583
|
//#endregion
|
|
6435
|
-
export {
|
|
6584
|
+
export { brand as $, now as $n, Objects as $t, Option as A, CurrentRedactedNames as An, optional as At, TaggedClass as B, fromRecordUnsafe as Bn, withDecodingDefault as Bt, Natural as C, dateTimeUtcFromInput$1 as Cn, isPattern as Ct, Null as D, transformEffect$1 as Dn, make as Dt, NonEmptyString as E, transform$1 as En, isSchemaError as Et, SchemaError as F, toString as Fn, toCodecStringTree as Ft, URL$1 as G, setAll$1 as Gn, _is as Gt, TaggedUnion as H, merge as Hn, evolve as Ht, String$1 as I, unwrap as In, toEncoded as It, Uint8ArrayFromBase64 as J, decode as Jn, encodeEffect$1 as Jt, URLFromString as K, empty$2 as Kn, decodeEffect$1 as Kt, StringForLiteralAutocomplete as L, CurrentRedactedNames$1 as Ln, toJsonSchemaDocument as Lt, OptionFromOptional as M, fromInput as Mn, suspend as Mt, Record as N, redactUrl as Nn, tag as Nt, NullOr as O, InvalidValue as On, makeFilter as Ot, Redacted as P, setAll as Pn, toCodecJson as Pt, Void as Q, fromDateUnsafe as Qn, Literal$1 as Qt, Struct as R, empty$1 as Rn, toType as Rt, MutableJson as S, transformOptional as Sn, isMinLength as St, NonEmptyArray as T, passthrough$1 as Tn, isSchema as Tt, TrueLiterals as U, remove as Un, omit as Ut, TaggedError as V, isRedactedName$1 as Vn, withDecodingDefaultKey as Vt, Tuple as W, set as Wn, getReferenceKey as Wt, Union as X, formatIso as Xn, Filter as Xt, UndefinedOr as Y, encode as Yn, Arrays as Yt, Unknown as Z, formatIsoDate as Zn, FilterGroup as Zt, Int as _, unknown as _n, isLessThanOrEqualTo as _t, BooleanLiterals as a, isNever as an, Clock as ar, decodeUnknownEffect as at, Literal as b, transform as bn, isMaxProperties as bt, DateTimeUtcFromDate as c, null_ as cn, Error$2 as cr, encodeEffect as ct, Defect as d, resolveAt as dn, taggedEnum as dr, fromJsonString as dt, PropertySignature as en, removeTime as er, check as et, Duration as f, resolveDescription as fn, assignProperty as fr, instanceOf as ft, Finite as g, toType$1 as gn, isInt as gt, FalseLiterals as h, toEncoded$1 as hn, isGreaterThanOrEqualTo as ht, BooleanFromBit as i, decodeTo$1 as in, stringOrRedacted as ir, decodeTo as it, OptionFromNullOr as j, empty as jn, optionalKey as jt, Number$1 as k, Pointer as kn, mutable as kt, DateTimeUtcFromMillis as l, optionalKey$1 as ln, TaggedClass$1 as lr, encodeTo as lt, Exit as m, string as mn, isFinite as mt, ArraySchema as n, Union$1 as nn, make$7 as nr, decodeEffect as nt, Class as o, isOptional as on, monotonicTimeNanos as or, decodeUnknownOption as ot, Error$1 as p, resolveIdentifier as pn, map$1 as pr, is as pt, Uint8Array$1 as q, fromSetCookie as qn, decodeUnknownEffect$1 as qt, Boolean as r, applyToSelfOrLastLinkEncoding as rn, value as rr, decodeSync as rt, DateTimeUtc as s, mapOrSame as sn, EncodingError as sr, decodeUnknownSync as st, Any as t, Suspend as tn, isRedacted as tr, declare as tt, DateTimeUtcFromString as u, replaceChecks as un, TaggedError$1 as ur, encodeUnknownEffect as ut, Json as v, Transformation as vn, isMaxCodePoints as vt, Never as w, map as wn, isPropertyNames as wt, Literals as x, transformEffect as xn, isMinCodePoints as xt, JsonObject as y, passthrough as yn, isMaxLength as yt, StructWithRest as z, fromInput$1 as zn, withConstructorDefault as zt };
|
|
6436
6585
|
|
|
6437
|
-
//# sourceMappingURL=Schema-
|
|
6586
|
+
//# sourceMappingURL=Schema-C2Y2y3tU.mjs.map
|