codexuse-cli 6.3.0 → 6.4.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/dist/index.js +882 -581
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1685,20 +1685,20 @@ var require_parse_async = __commonJS({
|
|
|
1685
1685
|
const index2 = 0;
|
|
1686
1686
|
const blocksize = opts.blocksize || 40960;
|
|
1687
1687
|
const parser = new TOMLParser();
|
|
1688
|
-
return new Promise((
|
|
1689
|
-
setImmediate(parseAsyncNext, index2, blocksize,
|
|
1688
|
+
return new Promise((resolve3, reject) => {
|
|
1689
|
+
setImmediate(parseAsyncNext, index2, blocksize, resolve3, reject);
|
|
1690
1690
|
});
|
|
1691
|
-
function parseAsyncNext(index3, blocksize2,
|
|
1691
|
+
function parseAsyncNext(index3, blocksize2, resolve3, reject) {
|
|
1692
1692
|
if (index3 >= str.length) {
|
|
1693
1693
|
try {
|
|
1694
|
-
return
|
|
1694
|
+
return resolve3(parser.finish());
|
|
1695
1695
|
} catch (err) {
|
|
1696
1696
|
return reject(prettyError(err, str));
|
|
1697
1697
|
}
|
|
1698
1698
|
}
|
|
1699
1699
|
try {
|
|
1700
1700
|
parser.parse(str.slice(index3, index3 + blocksize2));
|
|
1701
|
-
setImmediate(parseAsyncNext, index3 + blocksize2, blocksize2,
|
|
1701
|
+
setImmediate(parseAsyncNext, index3 + blocksize2, blocksize2, resolve3, reject);
|
|
1702
1702
|
} catch (err) {
|
|
1703
1703
|
reject(prettyError(err, str));
|
|
1704
1704
|
}
|
|
@@ -1724,7 +1724,7 @@ var require_parse_stream = __commonJS({
|
|
|
1724
1724
|
function parseReadable(stm) {
|
|
1725
1725
|
const parser = new TOMLParser();
|
|
1726
1726
|
stm.setEncoding("utf8");
|
|
1727
|
-
return new Promise((
|
|
1727
|
+
return new Promise((resolve3, reject) => {
|
|
1728
1728
|
let readable;
|
|
1729
1729
|
let ended = false;
|
|
1730
1730
|
let errored = false;
|
|
@@ -1732,7 +1732,7 @@ var require_parse_stream = __commonJS({
|
|
|
1732
1732
|
ended = true;
|
|
1733
1733
|
if (readable) return;
|
|
1734
1734
|
try {
|
|
1735
|
-
|
|
1735
|
+
resolve3(parser.finish());
|
|
1736
1736
|
} catch (err) {
|
|
1737
1737
|
reject(err);
|
|
1738
1738
|
}
|
|
@@ -2557,7 +2557,7 @@ function describeError(error) {
|
|
|
2557
2557
|
return error instanceof Error ? error.message : String(error);
|
|
2558
2558
|
}
|
|
2559
2559
|
function sleep(ms) {
|
|
2560
|
-
return new Promise((
|
|
2560
|
+
return new Promise((resolve3) => setTimeout(resolve3, ms));
|
|
2561
2561
|
}
|
|
2562
2562
|
function matchesErrorChain(error, predicate) {
|
|
2563
2563
|
if (!error || typeof error !== "object") {
|
|
@@ -2810,8 +2810,8 @@ function withStatement(db, sql, task) {
|
|
|
2810
2810
|
async function withWriteQueue(dbPath, task) {
|
|
2811
2811
|
const previous = writeQueueByDbPath.get(dbPath) ?? Promise.resolve();
|
|
2812
2812
|
let release;
|
|
2813
|
-
const current = new Promise((
|
|
2814
|
-
release =
|
|
2813
|
+
const current = new Promise((resolve3) => {
|
|
2814
|
+
release = resolve3;
|
|
2815
2815
|
});
|
|
2816
2816
|
writeQueueByDbPath.set(dbPath, current);
|
|
2817
2817
|
await previous;
|
|
@@ -3411,8 +3411,8 @@ async function withCloudSyncTransaction(userDataDir, mode, operation) {
|
|
|
3411
3411
|
}
|
|
3412
3412
|
const previous = operationTails.get(target) ?? Promise.resolve();
|
|
3413
3413
|
let finish;
|
|
3414
|
-
const turn = new Promise((
|
|
3415
|
-
finish =
|
|
3414
|
+
const turn = new Promise((resolve3) => {
|
|
3415
|
+
finish = resolve3;
|
|
3416
3416
|
});
|
|
3417
3417
|
operationTails.set(target, turn);
|
|
3418
3418
|
await previous;
|
|
@@ -5120,9 +5120,9 @@ async function ensureInitialized() {
|
|
|
5120
5120
|
);
|
|
5121
5121
|
attempt.catch(() => void 0);
|
|
5122
5122
|
let deadlineTimer;
|
|
5123
|
-
const deadline = new Promise((
|
|
5123
|
+
const deadline = new Promise((resolve3) => {
|
|
5124
5124
|
deadlineTimer = setTimeout(
|
|
5125
|
-
() =>
|
|
5125
|
+
() => resolve3(READ_TOO_SLOW),
|
|
5126
5126
|
PERSISTENCE_READ_DEADLINE_MS
|
|
5127
5127
|
);
|
|
5128
5128
|
});
|
|
@@ -5153,8 +5153,8 @@ async function withWriteLock(task) {
|
|
|
5153
5153
|
}
|
|
5154
5154
|
const previous = writeLock;
|
|
5155
5155
|
let release;
|
|
5156
|
-
writeLock = new Promise((
|
|
5157
|
-
release =
|
|
5156
|
+
writeLock = new Promise((resolve3) => {
|
|
5157
|
+
release = resolve3;
|
|
5158
5158
|
});
|
|
5159
5159
|
await previous;
|
|
5160
5160
|
try {
|
|
@@ -6873,7 +6873,7 @@ function evaluateCodexCliStatus() {
|
|
|
6873
6873
|
return evaluateExternalStatus();
|
|
6874
6874
|
}
|
|
6875
6875
|
function runVersionPreflight(cliPath) {
|
|
6876
|
-
return new Promise((
|
|
6876
|
+
return new Promise((resolve3) => {
|
|
6877
6877
|
const useNode = /\.(?:c|m)?js$/i.test(cliPath);
|
|
6878
6878
|
const child = (0, import_node_child_process2.spawn)(
|
|
6879
6879
|
useNode ? process.execPath : cliPath,
|
|
@@ -6891,7 +6891,7 @@ function runVersionPreflight(cliPath) {
|
|
|
6891
6891
|
}
|
|
6892
6892
|
settled = true;
|
|
6893
6893
|
clearTimeout(timeout2);
|
|
6894
|
-
|
|
6894
|
+
resolve3(version);
|
|
6895
6895
|
};
|
|
6896
6896
|
const collect = (chunk) => {
|
|
6897
6897
|
if (output.length < 1024) {
|
|
@@ -7279,7 +7279,7 @@ function uniqueSorted(values2) {
|
|
|
7279
7279
|
return Array.from(new Set(values2)).sort((a, b) => a.localeCompare(b));
|
|
7280
7280
|
}
|
|
7281
7281
|
async function runCommand(command, args2, timeoutMs = 3e3) {
|
|
7282
|
-
return new Promise((
|
|
7282
|
+
return new Promise((resolve3, reject) => {
|
|
7283
7283
|
const child = (0, import_node_child_process4.spawn)(command, args2, {
|
|
7284
7284
|
stdio: ["ignore", "pipe", "pipe"],
|
|
7285
7285
|
env: buildCodexChildEnv()
|
|
@@ -7303,10 +7303,10 @@ async function runCommand(command, args2, timeoutMs = 3e3) {
|
|
|
7303
7303
|
child.on("close", (code) => {
|
|
7304
7304
|
clearTimeout(timeout2);
|
|
7305
7305
|
if (code !== 0 && !stdout.trim() && stderr.trim()) {
|
|
7306
|
-
|
|
7306
|
+
resolve3({ stdout: stderr, exitCode: code });
|
|
7307
7307
|
return;
|
|
7308
7308
|
}
|
|
7309
|
-
|
|
7309
|
+
resolve3({ stdout, exitCode: code });
|
|
7310
7310
|
});
|
|
7311
7311
|
});
|
|
7312
7312
|
}
|
|
@@ -7996,7 +7996,7 @@ function logInfo(...args2) {
|
|
|
7996
7996
|
console.info(...args2);
|
|
7997
7997
|
}
|
|
7998
7998
|
|
|
7999
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
7999
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Pipeable.js
|
|
8000
8000
|
var pipeArguments = (self, args2) => {
|
|
8001
8001
|
switch (args2.length) {
|
|
8002
8002
|
case 0:
|
|
@@ -8040,7 +8040,7 @@ var Class = /* @__PURE__ */ (function() {
|
|
|
8040
8040
|
return PipeableBase;
|
|
8041
8041
|
})();
|
|
8042
8042
|
|
|
8043
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8043
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Function.js
|
|
8044
8044
|
var dual = function(arity, body) {
|
|
8045
8045
|
if (typeof arity === "function") {
|
|
8046
8046
|
return function() {
|
|
@@ -8091,28 +8091,28 @@ function pipe(a, ...args2) {
|
|
|
8091
8091
|
return pipeArguments(a, args2);
|
|
8092
8092
|
}
|
|
8093
8093
|
function memoize(f) {
|
|
8094
|
-
const
|
|
8094
|
+
const cache2 = /* @__PURE__ */ new WeakMap();
|
|
8095
8095
|
return (a) => {
|
|
8096
|
-
const cached2 =
|
|
8096
|
+
const cached2 = cache2.get(a);
|
|
8097
8097
|
if (cached2 !== void 0) return cached2;
|
|
8098
8098
|
const result2 = f(a);
|
|
8099
|
-
|
|
8099
|
+
cache2.set(a, result2);
|
|
8100
8100
|
return result2;
|
|
8101
8101
|
};
|
|
8102
8102
|
}
|
|
8103
8103
|
function memoizeIdempotent(f) {
|
|
8104
|
-
const
|
|
8104
|
+
const cache2 = /* @__PURE__ */ new WeakMap();
|
|
8105
8105
|
return (a) => {
|
|
8106
|
-
const cached2 =
|
|
8106
|
+
const cached2 = cache2.get(a);
|
|
8107
8107
|
if (cached2 !== void 0) return cached2;
|
|
8108
8108
|
const result2 = f(a);
|
|
8109
|
-
|
|
8110
|
-
|
|
8109
|
+
cache2.set(a, result2);
|
|
8110
|
+
cache2.set(result2, result2);
|
|
8111
8111
|
return result2;
|
|
8112
8112
|
};
|
|
8113
8113
|
}
|
|
8114
8114
|
|
|
8115
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8115
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/equal.js
|
|
8116
8116
|
var getAllObjectKeys = (obj) => {
|
|
8117
8117
|
const keys4 = new Set(Reflect.ownKeys(obj));
|
|
8118
8118
|
if (obj.constructor === Object) return keys4;
|
|
@@ -8135,7 +8135,7 @@ var getAllObjectKeys = (obj) => {
|
|
|
8135
8135
|
};
|
|
8136
8136
|
var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
8137
8137
|
|
|
8138
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8138
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Predicate.js
|
|
8139
8139
|
function isString(input) {
|
|
8140
8140
|
return typeof input === "string";
|
|
8141
8141
|
}
|
|
@@ -8180,7 +8180,7 @@ function isError(input) {
|
|
|
8180
8180
|
return input instanceof Error;
|
|
8181
8181
|
}
|
|
8182
8182
|
|
|
8183
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8183
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Hash.js
|
|
8184
8184
|
var symbol = "~effect/Hash";
|
|
8185
8185
|
var hash = (self) => {
|
|
8186
8186
|
switch (typeof self) {
|
|
@@ -8294,7 +8294,7 @@ function withVisitedTracking(obj, fn2) {
|
|
|
8294
8294
|
return result2;
|
|
8295
8295
|
}
|
|
8296
8296
|
|
|
8297
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8297
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Equal.js
|
|
8298
8298
|
var symbol2 = "~effect/Equal";
|
|
8299
8299
|
function equals() {
|
|
8300
8300
|
if (arguments.length === 1) {
|
|
@@ -8486,7 +8486,7 @@ function makeCompareSet(equivalence) {
|
|
|
8486
8486
|
var compareSets = /* @__PURE__ */ makeCompareSet(compareBoth);
|
|
8487
8487
|
var isEqual = (u) => hasProperty(u, symbol2);
|
|
8488
8488
|
|
|
8489
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8489
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Reducer.js
|
|
8490
8490
|
function make(combine2, initialValue, combineAll) {
|
|
8491
8491
|
return {
|
|
8492
8492
|
combine: combine2,
|
|
@@ -8501,7 +8501,7 @@ function make(combine2, initialValue, combineAll) {
|
|
|
8501
8501
|
};
|
|
8502
8502
|
}
|
|
8503
8503
|
|
|
8504
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8504
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Equivalence.js
|
|
8505
8505
|
var make2 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
8506
8506
|
var isStrictEquivalent = (x, y) => x === y;
|
|
8507
8507
|
var strictEqual = () => isStrictEquivalent;
|
|
@@ -8537,10 +8537,10 @@ function Struct(fields) {
|
|
|
8537
8537
|
});
|
|
8538
8538
|
}
|
|
8539
8539
|
|
|
8540
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8540
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/array.js
|
|
8541
8541
|
var isArrayNonEmpty = (self) => self.length > 0;
|
|
8542
8542
|
|
|
8543
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8543
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/record.js
|
|
8544
8544
|
function assignProperty(self, key, value3) {
|
|
8545
8545
|
if (key === "__proto__") {
|
|
8546
8546
|
Object.defineProperty(self, key, {
|
|
@@ -8562,14 +8562,14 @@ function assignProperties(self, source) {
|
|
|
8562
8562
|
}
|
|
8563
8563
|
}
|
|
8564
8564
|
|
|
8565
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8565
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Combiner.js
|
|
8566
8566
|
function make3(combine2) {
|
|
8567
8567
|
return {
|
|
8568
8568
|
combine: combine2
|
|
8569
8569
|
};
|
|
8570
8570
|
}
|
|
8571
8571
|
|
|
8572
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8572
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Redactable.js
|
|
8573
8573
|
var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Redactable");
|
|
8574
8574
|
var isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
8575
8575
|
function redact(u) {
|
|
@@ -8591,7 +8591,7 @@ var emptyContext = {
|
|
|
8591
8591
|
}
|
|
8592
8592
|
};
|
|
8593
8593
|
|
|
8594
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8594
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Formatter.js
|
|
8595
8595
|
function format(input, options) {
|
|
8596
8596
|
const space = options?.space ?? 0;
|
|
8597
8597
|
const ancestors = /* @__PURE__ */ new WeakSet();
|
|
@@ -8707,7 +8707,7 @@ function formatJson(input, options) {
|
|
|
8707
8707
|
}, options?.space) ?? "null";
|
|
8708
8708
|
}
|
|
8709
8709
|
|
|
8710
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8710
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Inspectable.js
|
|
8711
8711
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
8712
8712
|
var toJson = (input) => {
|
|
8713
8713
|
try {
|
|
@@ -8760,7 +8760,7 @@ var Class2 = class {
|
|
|
8760
8760
|
}
|
|
8761
8761
|
};
|
|
8762
8762
|
|
|
8763
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8763
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/stackTraceLimit.js
|
|
8764
8764
|
var isStackTraceLimitWritable = () => {
|
|
8765
8765
|
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
8766
8766
|
if (desc === void 0) {
|
|
@@ -8777,7 +8777,7 @@ var setStackTraceLimit = (value3) => {
|
|
|
8777
8777
|
}
|
|
8778
8778
|
};
|
|
8779
8779
|
|
|
8780
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8780
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Utils.js
|
|
8781
8781
|
var SingleShotGen = class _SingleShotGen {
|
|
8782
8782
|
called = false;
|
|
8783
8783
|
self;
|
|
@@ -8837,7 +8837,7 @@ var pickInternalCall = () => {
|
|
|
8837
8837
|
};
|
|
8838
8838
|
var internalCall = /* @__PURE__ */ pickInternalCall();
|
|
8839
8839
|
|
|
8840
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
8840
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/core.js
|
|
8841
8841
|
var EffectTypeId = `~effect/Effect`;
|
|
8842
8842
|
var ExitTypeId = `~effect/Exit`;
|
|
8843
8843
|
var effectVariance = {
|
|
@@ -9189,7 +9189,7 @@ var DoneVoid = {
|
|
|
9189
9189
|
value: void 0
|
|
9190
9190
|
};
|
|
9191
9191
|
|
|
9192
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9192
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/option.js
|
|
9193
9193
|
var TypeId = "~effect/Option";
|
|
9194
9194
|
var CommonProto = {
|
|
9195
9195
|
[TypeId]: {
|
|
@@ -9255,7 +9255,7 @@ var SomeImpl = function(value3) {
|
|
|
9255
9255
|
SomeImpl.prototype = SomeProto;
|
|
9256
9256
|
var some = (value3) => new SomeImpl(value3);
|
|
9257
9257
|
|
|
9258
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9258
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/result.js
|
|
9259
9259
|
var TypeId2 = "~effect/Result";
|
|
9260
9260
|
var CommonProto2 = {
|
|
9261
9261
|
[TypeId2]: {
|
|
@@ -9322,7 +9322,7 @@ var SuccessImpl = function(success) {
|
|
|
9322
9322
|
SuccessImpl.prototype = SuccessProto;
|
|
9323
9323
|
var succeed = (success) => new SuccessImpl(success);
|
|
9324
9324
|
|
|
9325
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9325
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Order.js
|
|
9326
9326
|
function make4(compare2) {
|
|
9327
9327
|
return (self, that) => self === that ? 0 : compare2(self, that);
|
|
9328
9328
|
}
|
|
@@ -9352,7 +9352,7 @@ var isGreaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
|
|
|
9352
9352
|
var isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
|
|
9353
9353
|
var isGreaterThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== -1);
|
|
9354
9354
|
|
|
9355
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9355
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Option.js
|
|
9356
9356
|
var none2 = () => none;
|
|
9357
9357
|
var some2 = some;
|
|
9358
9358
|
var isOption2 = isOption;
|
|
@@ -9360,8 +9360,8 @@ var isNone2 = isNone;
|
|
|
9360
9360
|
var isSome2 = isSome;
|
|
9361
9361
|
var match = /* @__PURE__ */ dual(2, (self, {
|
|
9362
9362
|
onNone,
|
|
9363
|
-
onSome
|
|
9364
|
-
}) => isNone2(self) ? onNone() :
|
|
9363
|
+
onSome
|
|
9364
|
+
}) => isNone2(self) ? onNone() : onSome(self.value));
|
|
9365
9365
|
var getOrElse = /* @__PURE__ */ dual(2, (self, onNone) => isNone2(self) ? onNone() : self.value);
|
|
9366
9366
|
var fromNullishOr = (a) => a == null ? none2() : some2(a);
|
|
9367
9367
|
var fromUndefinedOr = (a) => a === void 0 ? none2() : some2(a);
|
|
@@ -9380,7 +9380,7 @@ var flatMap = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : f(s
|
|
|
9380
9380
|
var flatten = /* @__PURE__ */ flatMap(identity);
|
|
9381
9381
|
var filter = /* @__PURE__ */ dual(2, (self, predicate) => isNone2(self) ? none2() : predicate(self.value) ? some2(self.value) : none2());
|
|
9382
9382
|
|
|
9383
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9383
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Result.js
|
|
9384
9384
|
var succeed2 = succeed;
|
|
9385
9385
|
var fail2 = fail;
|
|
9386
9386
|
var isResult2 = isResult;
|
|
@@ -9402,10 +9402,10 @@ var getOrThrowWith = /* @__PURE__ */ dual(2, (self, onFailure) => {
|
|
|
9402
9402
|
var getOrThrow = /* @__PURE__ */ getOrThrowWith(identity);
|
|
9403
9403
|
var flatMap2 = /* @__PURE__ */ dual(2, (self, f) => isFailure2(self) ? fail2(self.failure) : f(self.success));
|
|
9404
9404
|
|
|
9405
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9405
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Tuple.js
|
|
9406
9406
|
var makeEquivalence = Tuple;
|
|
9407
9407
|
|
|
9408
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9408
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Iterable.js
|
|
9409
9409
|
var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
|
|
9410
9410
|
let i = 0;
|
|
9411
9411
|
for (const a of self) {
|
|
@@ -9424,7 +9424,7 @@ var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
9424
9424
|
return none2();
|
|
9425
9425
|
});
|
|
9426
9426
|
|
|
9427
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9427
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Record.js
|
|
9428
9428
|
var has = /* @__PURE__ */ dual(2, (self, key) => Object.hasOwn(self, key));
|
|
9429
9429
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
9430
9430
|
const out = {
|
|
@@ -9449,7 +9449,7 @@ var makeEquivalence2 = (equivalence) => {
|
|
|
9449
9449
|
return (self, that) => is3(self, that) && is3(that, self);
|
|
9450
9450
|
};
|
|
9451
9451
|
|
|
9452
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9452
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Array.js
|
|
9453
9453
|
var Array2 = globalThis.Array;
|
|
9454
9454
|
var fromIterable = (collection) => Array2.isArray(collection) ? collection : Array2.from(collection);
|
|
9455
9455
|
var append = /* @__PURE__ */ dual(2, (self, last) => [...self, last]);
|
|
@@ -9494,7 +9494,7 @@ var dedupe = (self) => {
|
|
|
9494
9494
|
return out;
|
|
9495
9495
|
};
|
|
9496
9496
|
|
|
9497
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9497
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/BigDecimal.js
|
|
9498
9498
|
var FINITE_INT_REGEXP = /^[+-]?\d+$/;
|
|
9499
9499
|
var TypeId3 = "~effect/BigDecimal";
|
|
9500
9500
|
var BigDecimalProto = {
|
|
@@ -9687,7 +9687,7 @@ var toExponential = (n) => {
|
|
|
9687
9687
|
var isZero = (n) => n.value === bigint0;
|
|
9688
9688
|
var isNegative = (n) => n.value < bigint0;
|
|
9689
9689
|
|
|
9690
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9690
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/BigInt.js
|
|
9691
9691
|
var BigInt3 = globalThis.BigInt;
|
|
9692
9692
|
var toNumber = (b) => {
|
|
9693
9693
|
if (b > BigInt3(Number.MAX_SAFE_INTEGER) || b < BigInt3(Number.MIN_SAFE_INTEGER)) {
|
|
@@ -9696,13 +9696,13 @@ var toNumber = (b) => {
|
|
|
9696
9696
|
return some2(Number(b));
|
|
9697
9697
|
};
|
|
9698
9698
|
|
|
9699
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9699
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Effectable.js
|
|
9700
9700
|
var Prototype2 = (options) => makePrimitiveProto({
|
|
9701
9701
|
op: options.label,
|
|
9702
9702
|
[evaluate]: options.evaluate
|
|
9703
9703
|
});
|
|
9704
9704
|
|
|
9705
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9705
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Context.js
|
|
9706
9706
|
var ServiceTypeId = "~effect/Context/Service";
|
|
9707
9707
|
var Service = function() {
|
|
9708
9708
|
function KeyClass() {
|
|
@@ -9879,7 +9879,7 @@ var serviceNotFoundError = (service2) => {
|
|
|
9879
9879
|
};
|
|
9880
9880
|
var Reference = Service;
|
|
9881
9881
|
|
|
9882
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
9882
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Duration.js
|
|
9883
9883
|
var TypeId5 = "~effect/Duration";
|
|
9884
9884
|
var bigint02 = /* @__PURE__ */ BigInt(0);
|
|
9885
9885
|
var bigint12 = /* @__PURE__ */ BigInt(1);
|
|
@@ -10144,7 +10144,7 @@ var Equivalence2 = (self, that) => matchPair(self, that, {
|
|
|
10144
10144
|
});
|
|
10145
10145
|
var equals3 = /* @__PURE__ */ dual(2, (self, that) => Equivalence2(self, that));
|
|
10146
10146
|
|
|
10147
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
10147
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Scheduler.js
|
|
10148
10148
|
var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
|
|
10149
10149
|
fiberCached: true,
|
|
10150
10150
|
defaultValue: () => new MixedScheduler()
|
|
@@ -10288,7 +10288,7 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
|
|
|
10288
10288
|
defaultValue: () => false
|
|
10289
10289
|
});
|
|
10290
10290
|
|
|
10291
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
10291
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Data.js
|
|
10292
10292
|
var Class3 = class extends Class {
|
|
10293
10293
|
constructor(props) {
|
|
10294
10294
|
super();
|
|
@@ -10300,7 +10300,7 @@ var Class3 = class extends Class {
|
|
|
10300
10300
|
var Error3 = Error2;
|
|
10301
10301
|
var TaggedError2 = TaggedError;
|
|
10302
10302
|
|
|
10303
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
10303
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Encoding.js
|
|
10304
10304
|
var EncodingErrorTypeId = "~effect/Encoding/EncodingError";
|
|
10305
10305
|
var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
|
|
10306
10306
|
/**
|
|
@@ -10472,14 +10472,14 @@ var fromHexChar = (byte) => {
|
|
|
10472
10472
|
throw new TypeError("Invalid input");
|
|
10473
10473
|
};
|
|
10474
10474
|
|
|
10475
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
10475
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Tracer.js
|
|
10476
10476
|
var ParentSpanKey = "effect/Tracer/ParentSpan";
|
|
10477
10477
|
var TracerKey = "effect/Tracer";
|
|
10478
10478
|
|
|
10479
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
10479
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/metric.js
|
|
10480
10480
|
var FiberRuntimeMetricsKey = "effect/Metric/FiberRuntimeMetrics";
|
|
10481
10481
|
|
|
10482
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
10482
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/references.js
|
|
10483
10483
|
var CurrentStackFrame = /* @__PURE__ */ Reference("effect/References/CurrentStackFrame", {
|
|
10484
10484
|
fiberCached: true,
|
|
10485
10485
|
defaultValue: constUndefined
|
|
@@ -10497,7 +10497,7 @@ var MinimumLogLevel = /* @__PURE__ */ Reference("effect/References/MinimumLogLev
|
|
|
10497
10497
|
defaultValue: () => "Info"
|
|
10498
10498
|
});
|
|
10499
10499
|
|
|
10500
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
10500
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/effect.js
|
|
10501
10501
|
var Interrupt = class extends ReasonBase {
|
|
10502
10502
|
constructor(fiberId2, annotations = constEmptyAnnotations) {
|
|
10503
10503
|
super("Interrupt", annotations, "Interrupted");
|
|
@@ -10848,13 +10848,13 @@ var FiberImpl = class {
|
|
|
10848
10848
|
current = failCause(this._interruptedCause);
|
|
10849
10849
|
}
|
|
10850
10850
|
this.currentOpCount++;
|
|
10851
|
-
const
|
|
10852
|
-
if (!yielding && !
|
|
10851
|
+
const cache2 = this.cache;
|
|
10852
|
+
if (!yielding && !cache2.preventYield && cache2.scheduler.shouldYield(this)) {
|
|
10853
10853
|
yielding = true;
|
|
10854
10854
|
const prev = current;
|
|
10855
10855
|
current = flatMap3(yieldNow, () => prev);
|
|
10856
10856
|
}
|
|
10857
|
-
current =
|
|
10857
|
+
current = cache2.tracerContext ? cache2.tracerContext(current, this) : current[evaluate](this);
|
|
10858
10858
|
if (current === Yield) {
|
|
10859
10859
|
const yielded = this._yielded;
|
|
10860
10860
|
if (ExitTypeId in yielded) {
|
|
@@ -10914,11 +10914,11 @@ var FiberImpl = class {
|
|
|
10914
10914
|
this.context = context2;
|
|
10915
10915
|
if (previous !== void 0 && hasSameCache(previous, context2)) return;
|
|
10916
10916
|
const root = context2.cacheRoot;
|
|
10917
|
-
const
|
|
10918
|
-
if (this.cache !== void 0 && this.cache.scheduler !==
|
|
10917
|
+
const cache2 = root._fiberCache ??= makeFiberContextCache(context2);
|
|
10918
|
+
if (this.cache !== void 0 && this.cache.scheduler !== cache2.scheduler) {
|
|
10919
10919
|
this._dispatcher = void 0;
|
|
10920
10920
|
}
|
|
10921
|
-
this.cache =
|
|
10921
|
+
this.cache = cache2;
|
|
10922
10922
|
}
|
|
10923
10923
|
get currentSpanLocal() {
|
|
10924
10924
|
const span = this.cache.span;
|
|
@@ -11517,8 +11517,8 @@ var runPromiseExitWith = (context2) => {
|
|
|
11517
11517
|
const runFork3 = runForkWith(context2);
|
|
11518
11518
|
return (effect, options) => {
|
|
11519
11519
|
const fiber2 = runFork3(effect, options);
|
|
11520
|
-
return new Promise((
|
|
11521
|
-
fiber2.addObserver((exit3) =>
|
|
11520
|
+
return new Promise((resolve3) => {
|
|
11521
|
+
fiber2.addObserver((exit3) => resolve3(exit3));
|
|
11522
11522
|
});
|
|
11523
11523
|
};
|
|
11524
11524
|
};
|
|
@@ -11617,11 +11617,12 @@ var logLevelColors = {
|
|
|
11617
11617
|
Fatal: [colors.bgBrightRed, colors.black]
|
|
11618
11618
|
};
|
|
11619
11619
|
|
|
11620
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
11620
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Cause.js
|
|
11621
11621
|
var isCause2 = isCause;
|
|
11622
11622
|
var isReason = isCauseReason;
|
|
11623
11623
|
var isFailReason2 = isFailReason;
|
|
11624
11624
|
var fromReasons = causeFromReasons;
|
|
11625
|
+
var die2 = causeDie;
|
|
11625
11626
|
var makeFailReason = (error) => new Fail(error);
|
|
11626
11627
|
var makeDieReason = (defect) => new Die(defect);
|
|
11627
11628
|
var makeInterruptReason2 = makeInterruptReason;
|
|
@@ -11629,7 +11630,7 @@ var map6 = causeMap;
|
|
|
11629
11630
|
var pretty = causePretty;
|
|
11630
11631
|
var IllegalArgumentError2 = IllegalArgumentError;
|
|
11631
11632
|
|
|
11632
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
11633
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Exit.js
|
|
11633
11634
|
var isExit2 = isExit;
|
|
11634
11635
|
var succeed4 = exitSucceed;
|
|
11635
11636
|
var failCause2 = exitFailCause;
|
|
@@ -11638,7 +11639,7 @@ var void_2 = exitVoid;
|
|
|
11638
11639
|
var isSuccess3 = exitIsSuccess;
|
|
11639
11640
|
var isFailure3 = exitIsFailure;
|
|
11640
11641
|
|
|
11641
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
11642
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/dateTime.js
|
|
11642
11643
|
var TypeId6 = "~effect/DateTime";
|
|
11643
11644
|
var TimeZoneTypeId = "~effect/DateTime/TimeZone";
|
|
11644
11645
|
var Proto2 = {
|
|
@@ -12025,7 +12026,7 @@ var formatIsoOffset = (self) => {
|
|
|
12025
12026
|
};
|
|
12026
12027
|
var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
|
|
12027
12028
|
|
|
12028
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12029
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Number.js
|
|
12029
12030
|
var Number3 = globalThis.Number;
|
|
12030
12031
|
var remainder = /* @__PURE__ */ dual(2, (self, divisor) => {
|
|
12031
12032
|
const selfString = self.toString();
|
|
@@ -12064,18 +12065,18 @@ function toScientificInteger(n) {
|
|
|
12064
12065
|
return [coefficient, globalThis.Number(scientific.slice(eIndex + 1)) - digits.length + 1];
|
|
12065
12066
|
}
|
|
12066
12067
|
|
|
12067
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12068
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/String.js
|
|
12068
12069
|
var String2 = globalThis.String;
|
|
12069
12070
|
var trim = (self) => self.trim();
|
|
12070
12071
|
|
|
12071
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12072
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Effect.js
|
|
12072
12073
|
var tryPromise2 = tryPromise;
|
|
12073
12074
|
var succeed5 = succeed3;
|
|
12074
12075
|
var succeedNone2 = succeedNone;
|
|
12075
12076
|
var void_3 = void_;
|
|
12076
12077
|
var fail5 = fail3;
|
|
12077
12078
|
var failCauseSync2 = failCauseSync;
|
|
12078
|
-
var
|
|
12079
|
+
var die3 = die;
|
|
12079
12080
|
var try_2 = try_;
|
|
12080
12081
|
var fromResult2 = fromResult;
|
|
12081
12082
|
var flatMap4 = flatMap3;
|
|
@@ -12093,7 +12094,7 @@ var flatMapEager2 = flatMapEager;
|
|
|
12093
12094
|
var catchEager2 = catchEager;
|
|
12094
12095
|
var fnUntracedEager2 = fnUntracedEager;
|
|
12095
12096
|
|
|
12096
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12097
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/annotations.js
|
|
12097
12098
|
function resolve(ast) {
|
|
12098
12099
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
12099
12100
|
}
|
|
@@ -12116,7 +12117,7 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
|
12116
12117
|
});
|
|
12117
12118
|
var annotationExcludedKeys = /* @__PURE__ */ new Set([SENTINELS_ANNOTATION_KEY, STRUCTURAL_ANNOTATION_KEY, "representation", "arbitraryConstraint", "brands", "toJsonSchema", "toCode", "toEquivalence", "toFormatter", "toCodec", "toCodecJson", "toCodecStringTree", "toCodecIso", "toCodecArbitrary"]);
|
|
12118
12119
|
|
|
12119
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12120
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/parser.js
|
|
12120
12121
|
var missing = /* @__PURE__ */ Symbol();
|
|
12121
12122
|
var succeed6 = succeed4;
|
|
12122
12123
|
var missingExit = /* @__PURE__ */ succeed6(missing);
|
|
@@ -12124,7 +12125,7 @@ var sameExit = /* @__PURE__ */ succeed6(missing);
|
|
|
12124
12125
|
var toOption = (value3) => value3 === missing ? none2() : some2(value3);
|
|
12125
12126
|
var fromOptionExit = (option2) => option2._tag === "None" ? missingExit : succeed6(option2.value);
|
|
12126
12127
|
|
|
12127
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12128
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/SchemaIssue.js
|
|
12128
12129
|
var TypeId7 = "~effect/SchemaIssue/Issue";
|
|
12129
12130
|
function isIssue(u) {
|
|
12130
12131
|
return hasProperty(u, TypeId7) && u[TypeId7] === TypeId7;
|
|
@@ -12467,7 +12468,7 @@ function findMessage(issue) {
|
|
|
12467
12468
|
if (typeof message === "string") return message;
|
|
12468
12469
|
}
|
|
12469
12470
|
|
|
12470
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12471
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/cause.js
|
|
12471
12472
|
function getSchemaIssue(cause) {
|
|
12472
12473
|
let issue;
|
|
12473
12474
|
for (const reason of cause.reasons) {
|
|
@@ -12488,7 +12489,7 @@ function getSchemaIssueOrThrow(cause, message) {
|
|
|
12488
12489
|
return issue;
|
|
12489
12490
|
}
|
|
12490
12491
|
|
|
12491
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12492
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/DateTime.js
|
|
12492
12493
|
var isDateTime2 = isDateTime;
|
|
12493
12494
|
var isTimeZone2 = isTimeZone;
|
|
12494
12495
|
var isTimeZoneOffset2 = isTimeZoneOffset;
|
|
@@ -12511,28 +12512,10 @@ var toEpochMillis2 = toEpochMillis;
|
|
|
12511
12512
|
var formatIso2 = formatIso;
|
|
12512
12513
|
var formatIsoZoned2 = formatIsoZoned;
|
|
12513
12514
|
|
|
12514
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12515
|
-
var
|
|
12516
|
-
run;
|
|
12517
|
-
constructor(run2) {
|
|
12518
|
-
super();
|
|
12519
|
-
this.run = run2;
|
|
12520
|
-
}
|
|
12521
|
-
map(f) {
|
|
12522
|
-
return new Getter((oe, options) => this.run(oe, options).pipe(mapEager2(map(f))));
|
|
12523
|
-
}
|
|
12524
|
-
compose(other) {
|
|
12525
|
-
if (isPassthrough(this)) {
|
|
12526
|
-
return other;
|
|
12527
|
-
}
|
|
12528
|
-
if (isPassthrough(other)) {
|
|
12529
|
-
return this;
|
|
12530
|
-
}
|
|
12531
|
-
return new Getter((oe, options) => this.run(oe, options).pipe(flatMapEager2((ot) => other.run(ot, options))));
|
|
12532
|
-
}
|
|
12533
|
-
};
|
|
12515
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/SchemaGetter.js
|
|
12516
|
+
var makeGetter = (fields) => Object.assign(Object.create(Prototype), fields);
|
|
12534
12517
|
function fail6(f) {
|
|
12535
|
-
return
|
|
12518
|
+
return transformOptionalEffect((oe, options) => fail5(f(oe, options)));
|
|
12536
12519
|
}
|
|
12537
12520
|
function forbidden(message) {
|
|
12538
12521
|
return fail6((oe, options) => {
|
|
@@ -12543,30 +12526,41 @@ function forbidden(message) {
|
|
|
12543
12526
|
});
|
|
12544
12527
|
}
|
|
12545
12528
|
var forbiddenEncoding = /* @__PURE__ */ forbidden(() => "Encoding is not supported");
|
|
12546
|
-
var passthrough_ = /* @__PURE__ */
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
}
|
|
12529
|
+
var passthrough_ = /* @__PURE__ */ makeGetter({
|
|
12530
|
+
_tag: "Passthrough"
|
|
12531
|
+
});
|
|
12550
12532
|
function passthrough() {
|
|
12551
12533
|
return passthrough_;
|
|
12552
12534
|
}
|
|
12553
|
-
function onSome(f) {
|
|
12554
|
-
return new Getter((oe, options) => isNone2(oe) ? succeedNone2 : f(oe.value, options));
|
|
12555
|
-
}
|
|
12556
12535
|
function transform(f) {
|
|
12557
|
-
return
|
|
12536
|
+
return makeGetter({
|
|
12537
|
+
_tag: "Transform",
|
|
12538
|
+
transform: f
|
|
12539
|
+
});
|
|
12558
12540
|
}
|
|
12559
12541
|
function transformEffect(f) {
|
|
12560
|
-
return
|
|
12542
|
+
return makeGetter({
|
|
12543
|
+
_tag: "TransformEffect",
|
|
12544
|
+
transform: f
|
|
12545
|
+
});
|
|
12561
12546
|
}
|
|
12562
12547
|
function transformOptional(f) {
|
|
12563
|
-
return
|
|
12548
|
+
return makeGetter({
|
|
12549
|
+
_tag: "TransformOptional",
|
|
12550
|
+
transform: f
|
|
12551
|
+
});
|
|
12552
|
+
}
|
|
12553
|
+
function transformOptionalEffect(f) {
|
|
12554
|
+
return makeGetter({
|
|
12555
|
+
_tag: "TransformOptionalEffect",
|
|
12556
|
+
transform: f
|
|
12557
|
+
});
|
|
12564
12558
|
}
|
|
12565
12559
|
function omit() {
|
|
12566
|
-
return
|
|
12560
|
+
return transformOptional(() => none2());
|
|
12567
12561
|
}
|
|
12568
12562
|
function withDefault(defaultValue) {
|
|
12569
|
-
return
|
|
12563
|
+
return transformOptionalEffect((o) => {
|
|
12570
12564
|
const filtered = filter(o, isNotUndefined);
|
|
12571
12565
|
return isSome2(filtered) ? succeed5(filtered) : mapEager2(defaultValue, some2);
|
|
12572
12566
|
});
|
|
@@ -12587,21 +12581,21 @@ function trim2() {
|
|
|
12587
12581
|
return transform(trim);
|
|
12588
12582
|
}
|
|
12589
12583
|
function parseJson(options) {
|
|
12590
|
-
return
|
|
12591
|
-
try: () =>
|
|
12584
|
+
return transformEffect((input, parseOptions) => try_2({
|
|
12585
|
+
try: () => JSON.parse(input, options?.reviver),
|
|
12592
12586
|
catch: () => new InvalidValue({
|
|
12593
12587
|
expected: "a valid JSON string"
|
|
12594
12588
|
}, input, parseOptions)
|
|
12595
12589
|
}));
|
|
12596
12590
|
}
|
|
12597
12591
|
function stringifyJson(options) {
|
|
12598
|
-
return
|
|
12592
|
+
return transformEffect((input, parseOptions) => try_2({
|
|
12599
12593
|
try: () => {
|
|
12600
12594
|
const output = JSON.stringify(input, options?.replacer, options?.space);
|
|
12601
12595
|
if (output === void 0) {
|
|
12602
12596
|
throw new TypeError("Value cannot be represented as JSON");
|
|
12603
12597
|
}
|
|
12604
|
-
return
|
|
12598
|
+
return output;
|
|
12605
12599
|
},
|
|
12606
12600
|
catch: () => new InvalidValue({
|
|
12607
12601
|
expected: "a JSON-serializable value"
|
|
@@ -12791,7 +12785,7 @@ function collectBracketPathEntries(isLeaf) {
|
|
|
12791
12785
|
};
|
|
12792
12786
|
}
|
|
12793
12787
|
|
|
12794
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12788
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/ByteSize.js
|
|
12795
12789
|
var bigint03 = /* @__PURE__ */ BigInt(0);
|
|
12796
12790
|
var bigint13 = /* @__PURE__ */ BigInt(1);
|
|
12797
12791
|
var decimalBase = /* @__PURE__ */ BigInt(1e3);
|
|
@@ -12886,7 +12880,7 @@ var fromNumber = (input) => {
|
|
|
12886
12880
|
}
|
|
12887
12881
|
return make10(BigInt(input));
|
|
12888
12882
|
};
|
|
12889
|
-
var
|
|
12883
|
+
var fromStringUnsafe = (input) => {
|
|
12890
12884
|
const match7 = /^\s*(\d+)(?:\.(\d+))?\s*([A-Za-z]+)\s*$/.exec(input);
|
|
12891
12885
|
if (match7 === null) return invalid2(`unsupported syntax ${JSON.stringify(input)}`);
|
|
12892
12886
|
const unit = unitsByName.get(match7[3]);
|
|
@@ -12899,6 +12893,7 @@ var parse2 = (input) => {
|
|
|
12899
12893
|
}
|
|
12900
12894
|
return make10(numerator / scale);
|
|
12901
12895
|
};
|
|
12896
|
+
var fromString2 = /* @__PURE__ */ liftThrowable(fromStringUnsafe);
|
|
12902
12897
|
var fromInputUnsafe2 = (input) => {
|
|
12903
12898
|
switch (typeof input) {
|
|
12904
12899
|
case "bigint":
|
|
@@ -12907,7 +12902,7 @@ var fromInputUnsafe2 = (input) => {
|
|
|
12907
12902
|
case "number":
|
|
12908
12903
|
return fromNumber(input);
|
|
12909
12904
|
case "string":
|
|
12910
|
-
return
|
|
12905
|
+
return fromStringUnsafe(input);
|
|
12911
12906
|
}
|
|
12912
12907
|
return invalid2(`unsupported input ${input}`);
|
|
12913
12908
|
};
|
|
@@ -12917,12 +12912,13 @@ var isByteSize = (input) => typeof input === "bigint" && input >= bigint03;
|
|
|
12917
12912
|
var toBigInt = (self) => self;
|
|
12918
12913
|
var toNumber2 = toNumber;
|
|
12919
12914
|
|
|
12920
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
12921
|
-
var Middleware = class {
|
|
12915
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/SchemaTransformation.js
|
|
12916
|
+
var Middleware = class extends Class {
|
|
12922
12917
|
_tag = "Middleware";
|
|
12923
12918
|
decode;
|
|
12924
12919
|
encode;
|
|
12925
12920
|
constructor(decode2, encode2) {
|
|
12921
|
+
super();
|
|
12926
12922
|
this.decode = decode2;
|
|
12927
12923
|
this.encode = encode2;
|
|
12928
12924
|
}
|
|
@@ -12931,26 +12927,24 @@ var Middleware = class {
|
|
|
12931
12927
|
}
|
|
12932
12928
|
};
|
|
12933
12929
|
var TypeId8 = "~effect/SchemaTransformation/Transformation";
|
|
12934
|
-
var Transformation = class {
|
|
12930
|
+
var Transformation = class extends Class {
|
|
12935
12931
|
[TypeId8] = TypeId8;
|
|
12936
12932
|
_tag = "Transformation";
|
|
12937
12933
|
decode;
|
|
12938
12934
|
encode;
|
|
12939
12935
|
constructor(decode2, encode2) {
|
|
12936
|
+
super();
|
|
12940
12937
|
this.decode = decode2;
|
|
12941
12938
|
this.encode = encode2;
|
|
12942
12939
|
}
|
|
12943
12940
|
flip() {
|
|
12944
12941
|
return new Transformation(this.encode, this.decode);
|
|
12945
12942
|
}
|
|
12946
|
-
compose(other) {
|
|
12947
|
-
return new Transformation(this.decode.compose(other.decode), other.encode.compose(this.encode));
|
|
12948
|
-
}
|
|
12949
12943
|
};
|
|
12950
12944
|
function isTransformation(u) {
|
|
12951
12945
|
return hasProperty(u, TypeId8) && u[TypeId8] === TypeId8;
|
|
12952
12946
|
}
|
|
12953
|
-
var
|
|
12947
|
+
var makeTransformation = (options) => {
|
|
12954
12948
|
if (isTransformation(options)) {
|
|
12955
12949
|
return options;
|
|
12956
12950
|
}
|
|
@@ -12977,7 +12971,7 @@ var bigintFromString = /* @__PURE__ */ new Transformation(/* @__PURE__ */ BigInt
|
|
|
12977
12971
|
var dateFromString = /* @__PURE__ */ new Transformation(/* @__PURE__ */ Date3(), /* @__PURE__ */ transform(formatDate));
|
|
12978
12972
|
var dateFromMillis = /* @__PURE__ */ new Transformation(/* @__PURE__ */ Date3(), /* @__PURE__ */ transform((date) => date.getTime()));
|
|
12979
12973
|
var byteSizeFromString = /* @__PURE__ */ transformEffect2({
|
|
12980
|
-
decode: (input, options) => match(
|
|
12974
|
+
decode: (input, options) => match(fromString2(input), {
|
|
12981
12975
|
onNone: () => fail5(new InvalidValue({
|
|
12982
12976
|
expected: "a valid ByteSize string"
|
|
12983
12977
|
}, input, options)),
|
|
@@ -13111,7 +13105,7 @@ function fromJsonString(options) {
|
|
|
13111
13105
|
var fromFormData = /* @__PURE__ */ new Transformation(/* @__PURE__ */ decodeFormData(), /* @__PURE__ */ encodeFormData());
|
|
13112
13106
|
var fromURLSearchParams = /* @__PURE__ */ new Transformation(/* @__PURE__ */ decodeURLSearchParams(), /* @__PURE__ */ encodeURLSearchParams());
|
|
13113
13107
|
|
|
13114
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
13108
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/SchemaAST.js
|
|
13115
13109
|
function makeGuard(tag2) {
|
|
13116
13110
|
return (ast) => ast._tag === tag2;
|
|
13117
13111
|
}
|
|
@@ -13397,9 +13391,9 @@ var TemplateLiteral = class extends ASTNodeImpl {
|
|
|
13397
13391
|
this.suffixLengths = suffixLengths;
|
|
13398
13392
|
}
|
|
13399
13393
|
/** @internal */
|
|
13400
|
-
getParser(
|
|
13394
|
+
getParser(compile2) {
|
|
13401
13395
|
const tuple2 = new Arrays(false, this.parts.map(partFromString), []);
|
|
13402
|
-
const parser =
|
|
13396
|
+
const parser = compile2(decodeTo(string2, tuple2, templateLiteralTransformation(this)));
|
|
13403
13397
|
return (input, options) => {
|
|
13404
13398
|
if (input === missing) return missingExit;
|
|
13405
13399
|
const result2 = parser(input, options);
|
|
@@ -13645,7 +13639,7 @@ var Arrays = class extends ASTNodeImpl {
|
|
|
13645
13639
|
}
|
|
13646
13640
|
}
|
|
13647
13641
|
/** @internal */
|
|
13648
|
-
getParser(
|
|
13642
|
+
getParser(compile2, compileField2 = compile2) {
|
|
13649
13643
|
const ast = this;
|
|
13650
13644
|
let elements;
|
|
13651
13645
|
let rest;
|
|
@@ -13669,11 +13663,11 @@ var Arrays = class extends ASTNodeImpl {
|
|
|
13669
13663
|
if (!elements) {
|
|
13670
13664
|
elements = ast.elements.map((ast2) => ({
|
|
13671
13665
|
ast: ast2,
|
|
13672
|
-
parser:
|
|
13666
|
+
parser: compileField2(ast2)
|
|
13673
13667
|
}));
|
|
13674
13668
|
rest = ast.rest.map((ast2) => ({
|
|
13675
13669
|
ast: ast2,
|
|
13676
|
-
parser:
|
|
13670
|
+
parser: compileField2(ast2)
|
|
13677
13671
|
}));
|
|
13678
13672
|
}
|
|
13679
13673
|
const len = input.length;
|
|
@@ -13730,30 +13724,31 @@ var Arrays = class extends ASTNodeImpl {
|
|
|
13730
13724
|
return "array";
|
|
13731
13725
|
}
|
|
13732
13726
|
};
|
|
13727
|
+
function stepArray(s, item, exit3, i) {
|
|
13728
|
+
if (exit3._tag === "Failure") {
|
|
13729
|
+
return wrapPropertyKeyIssue(s, s.ast, i, exit3);
|
|
13730
|
+
}
|
|
13731
|
+
const value3 = exit3 === sameExit ? item : exit3[args];
|
|
13732
|
+
if (value3 !== missing) {
|
|
13733
|
+
s.output[i] = value3;
|
|
13734
|
+
} else {
|
|
13735
|
+
const p = s.getParser(s.tailThreshold, i);
|
|
13736
|
+
if (isOptional(p.ast)) return;
|
|
13737
|
+
const issue = new Pointer([i], new MissingKey(p.ast.context?.annotations));
|
|
13738
|
+
if (s.options.errors === "all") {
|
|
13739
|
+
if (s.issues) s.issues.push(issue);
|
|
13740
|
+
else s.issues = [issue];
|
|
13741
|
+
} else {
|
|
13742
|
+
return fail4(new Composite(s.ast, [issue], s.input, s.options));
|
|
13743
|
+
}
|
|
13744
|
+
}
|
|
13745
|
+
}
|
|
13733
13746
|
var parseArrayOptions = {
|
|
13734
13747
|
onItem(s, item, i) {
|
|
13735
13748
|
const value3 = i < s.len ? item : missing;
|
|
13736
13749
|
return s.getParser(s.tailThreshold, i).parser(value3, s.options);
|
|
13737
13750
|
},
|
|
13738
|
-
step
|
|
13739
|
-
if (exit3._tag === "Failure") {
|
|
13740
|
-
return wrapPropertyKeyIssue(s, s.ast, i, exit3);
|
|
13741
|
-
}
|
|
13742
|
-
const value3 = exit3 === sameExit ? item : exit3[args];
|
|
13743
|
-
if (value3 !== missing) {
|
|
13744
|
-
s.output[i] = value3;
|
|
13745
|
-
} else {
|
|
13746
|
-
const p = s.getParser(s.tailThreshold, i);
|
|
13747
|
-
if (isOptional(p.ast)) return;
|
|
13748
|
-
const issue = new Pointer([i], new MissingKey(p.ast.context?.annotations));
|
|
13749
|
-
if (s.options.errors === "all") {
|
|
13750
|
-
if (s.issues) s.issues.push(issue);
|
|
13751
|
-
else s.issues = [issue];
|
|
13752
|
-
} else {
|
|
13753
|
-
return fail4(new Composite(s.ast, [issue], s.input, s.options));
|
|
13754
|
-
}
|
|
13755
|
-
}
|
|
13756
|
-
}
|
|
13751
|
+
step: stepArray
|
|
13757
13752
|
};
|
|
13758
13753
|
var parseArray = /* @__PURE__ */ iterateEager()(parseArrayOptions);
|
|
13759
13754
|
var parseArrayConcurrent = /* @__PURE__ */ iterateConcurrent()(parseArrayOptions);
|
|
@@ -13871,7 +13866,7 @@ var Objects = class extends ASTNodeImpl {
|
|
|
13871
13866
|
}
|
|
13872
13867
|
}
|
|
13873
13868
|
/** @internal */
|
|
13874
|
-
getParser(
|
|
13869
|
+
getParser(compile2, compileField2 = compile2) {
|
|
13875
13870
|
const ast = this;
|
|
13876
13871
|
const expectedKeys = [];
|
|
13877
13872
|
for (const ps of ast.propertySignatures) {
|
|
@@ -13924,14 +13919,14 @@ var Objects = class extends ASTNodeImpl {
|
|
|
13924
13919
|
const compileMembers = () => {
|
|
13925
13920
|
if (!properties) {
|
|
13926
13921
|
properties = ast.propertySignatures.map((ps) => ({
|
|
13927
|
-
parser:
|
|
13922
|
+
parser: compileField2(ps.type),
|
|
13928
13923
|
name: ps.name,
|
|
13929
13924
|
type: ps.type
|
|
13930
13925
|
}));
|
|
13931
13926
|
indexes = indexCount ? ast.indexSignatures.map((is3) => ({
|
|
13932
13927
|
is: is3,
|
|
13933
|
-
parserKey:
|
|
13934
|
-
parserValue:
|
|
13928
|
+
parserKey: compile2(parameterFromPropertyKey(is3.parameter)),
|
|
13929
|
+
parserValue: compileField2(is3.type)
|
|
13935
13930
|
})) : void 0;
|
|
13936
13931
|
}
|
|
13937
13932
|
return properties;
|
|
@@ -13993,10 +13988,10 @@ var Objects = class extends ASTNodeImpl {
|
|
|
13993
13988
|
if (indexCount && concurrency === 1) {
|
|
13994
13989
|
for (let i = 0; i < indexCount; i++) {
|
|
13995
13990
|
const index2 = indexes[i];
|
|
13996
|
-
const
|
|
13991
|
+
const parse3 = index2.is.parameter === string2 ? parseStringIndex : parseIndex;
|
|
13997
13992
|
const keys4 = indexKeys?.[i] ?? (index2.is.parameter === string2 ? Object.keys(record2) : getIndexSignatureKeys(record2, index2.is.parameter, options));
|
|
13998
13993
|
for (let j = 0; j < keys4.length; j++) {
|
|
13999
|
-
const eff =
|
|
13994
|
+
const eff = parse3(state, keys4[j], index2);
|
|
14000
13995
|
if (!effectIsExit(eff)) yield* eff;
|
|
14001
13996
|
else if (eff._tag === "Failure") return yield* eff;
|
|
14002
13997
|
}
|
|
@@ -14067,7 +14062,7 @@ var Objects = class extends ASTNodeImpl {
|
|
|
14067
14062
|
if (terminal) return terminal;
|
|
14068
14063
|
}
|
|
14069
14064
|
} catch (error) {
|
|
14070
|
-
return
|
|
14065
|
+
return die3(error);
|
|
14071
14066
|
}
|
|
14072
14067
|
return succeed6(out);
|
|
14073
14068
|
};
|
|
@@ -14422,24 +14417,24 @@ var Union = class extends ASTNodeImpl {
|
|
|
14422
14417
|
this.encodingChecks = encodingChecks;
|
|
14423
14418
|
}
|
|
14424
14419
|
/** @internal */
|
|
14425
|
-
getParser(
|
|
14420
|
+
getParser(compile2, compileField2) {
|
|
14426
14421
|
const ast = this;
|
|
14427
14422
|
return (input, options) => {
|
|
14428
14423
|
if (input === missing) {
|
|
14429
14424
|
return missingExit;
|
|
14430
14425
|
}
|
|
14431
|
-
const candidates = getCandidates(input, ast.types,
|
|
14426
|
+
const candidates = getCandidates(input, ast.types, compileField2 !== void 0);
|
|
14432
14427
|
if (candidates.length === 0) {
|
|
14433
14428
|
return fail5(new AnyOf(ast, [], input, options));
|
|
14434
14429
|
}
|
|
14435
14430
|
if (candidates.length === 1) {
|
|
14436
|
-
const result2 =
|
|
14431
|
+
const result2 = compile2(candidates[0])(input, options);
|
|
14437
14432
|
if (result2._tag === "Success") return result2;
|
|
14438
14433
|
return effectIsExit(result2) ? failSingleUnionCandidate(ast, result2.cause, input, options) : catchCause2(result2, (cause) => failSingleUnionCandidate(ast, cause, input, options));
|
|
14439
14434
|
}
|
|
14440
14435
|
const state = {
|
|
14441
14436
|
ast,
|
|
14442
|
-
compile,
|
|
14437
|
+
compile: compile2,
|
|
14443
14438
|
input,
|
|
14444
14439
|
out: void 0,
|
|
14445
14440
|
successes: ast.options?.mode === "oneOf" ? [] : void 0,
|
|
@@ -14557,9 +14552,9 @@ var Suspend = class extends ASTNodeImpl {
|
|
|
14557
14552
|
this.thunk = () => ast ??= thunk();
|
|
14558
14553
|
}
|
|
14559
14554
|
/** @internal */
|
|
14560
|
-
getParser(
|
|
14555
|
+
getParser(compile2) {
|
|
14561
14556
|
let parser;
|
|
14562
|
-
return (input, options) => (parser ??=
|
|
14557
|
+
return (input, options) => (parser ??= compile2(this.thunk()))(input, options);
|
|
14563
14558
|
}
|
|
14564
14559
|
/** @internal */
|
|
14565
14560
|
recur(recur2) {
|
|
@@ -14810,9 +14805,7 @@ var mutableKey = /* @__PURE__ */ memoizeIdempotent((ast) => {
|
|
|
14810
14805
|
});
|
|
14811
14806
|
var mutableKeyLastLink = /* @__PURE__ */ applyToLastLink(mutableKey);
|
|
14812
14807
|
function withConstructorDefault(ast, defaultValue) {
|
|
14813
|
-
const
|
|
14814
|
-
const constructorDefault = new Link(unknown, transformation);
|
|
14815
|
-
const context2 = ast.context ? new Context(ast.context.isOptional, ast.context.isMutable, constructorDefault, ast.context.annotations) : new Context(false, false, constructorDefault);
|
|
14808
|
+
const context2 = ast.context ? new Context(ast.context.isOptional, ast.context.isMutable, defaultValue, ast.context.annotations) : new Context(false, false, defaultValue);
|
|
14816
14809
|
return replaceContext(ast, context2);
|
|
14817
14810
|
}
|
|
14818
14811
|
function decodeTo(from, to, transformation) {
|
|
@@ -15125,7 +15118,7 @@ function isStringTreeLeaf(u) {
|
|
|
15125
15118
|
return u === void 0 || typeof u === "string";
|
|
15126
15119
|
}
|
|
15127
15120
|
function isTree(u, isLeaf) {
|
|
15128
|
-
const
|
|
15121
|
+
const cache2 = /* @__PURE__ */ new WeakMap();
|
|
15129
15122
|
const stack = [];
|
|
15130
15123
|
outer: while (true) {
|
|
15131
15124
|
if (typeof u !== "object" || u === null) {
|
|
@@ -15134,7 +15127,7 @@ function isTree(u, isLeaf) {
|
|
|
15134
15127
|
}
|
|
15135
15128
|
} else {
|
|
15136
15129
|
const value3 = u;
|
|
15137
|
-
const cached2 =
|
|
15130
|
+
const cached2 = cache2.get(value3);
|
|
15138
15131
|
if (cached2 === false) {
|
|
15139
15132
|
return false;
|
|
15140
15133
|
}
|
|
@@ -15146,7 +15139,7 @@ function isTree(u, isLeaf) {
|
|
|
15146
15139
|
return false;
|
|
15147
15140
|
}
|
|
15148
15141
|
}
|
|
15149
|
-
|
|
15142
|
+
cache2.set(value3, false);
|
|
15150
15143
|
stack.push({
|
|
15151
15144
|
value: value3,
|
|
15152
15145
|
keys: isArray2 ? value3.length : Object.keys(value3),
|
|
@@ -15166,7 +15159,7 @@ function isTree(u, isLeaf) {
|
|
|
15166
15159
|
u = frame.value[keys4[frame.index++]];
|
|
15167
15160
|
continue outer;
|
|
15168
15161
|
}
|
|
15169
|
-
|
|
15162
|
+
cache2.set(frame.value, true);
|
|
15170
15163
|
stack.pop();
|
|
15171
15164
|
}
|
|
15172
15165
|
return true;
|
|
@@ -15201,7 +15194,7 @@ var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast, options)
|
|
|
15201
15194
|
});
|
|
15202
15195
|
var unknownToStringTree = /* @__PURE__ */ new Link(StringTree, /* @__PURE__ */ passthrough2());
|
|
15203
15196
|
|
|
15204
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
15197
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Chunk.js
|
|
15205
15198
|
var TypeId10 = "~effect/Chunk";
|
|
15206
15199
|
function copy(src, srcPos, dest, destPos, len) {
|
|
15207
15200
|
for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
|
|
@@ -15385,7 +15378,7 @@ var getUnsafe2 = /* @__PURE__ */ dual(2, (self, index2) => {
|
|
|
15385
15378
|
});
|
|
15386
15379
|
var size = (self) => self.length;
|
|
15387
15380
|
|
|
15388
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
15381
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Schema.js
|
|
15389
15382
|
var Schema_exports = {};
|
|
15390
15383
|
__export(Schema_exports, {
|
|
15391
15384
|
Any: () => Any2,
|
|
@@ -15445,20 +15438,36 @@ __export(Schema_exports, {
|
|
|
15445
15438
|
IpAddressFromString: () => IpAddressFromString,
|
|
15446
15439
|
IpInterface: () => IpInterface,
|
|
15447
15440
|
IpInterfaceFromString: () => IpInterfaceFromString,
|
|
15441
|
+
IpLinkLocalAddress: () => IpLinkLocalAddress,
|
|
15442
|
+
IpLinkLocalAddressFromString: () => IpLinkLocalAddressFromString,
|
|
15443
|
+
IpLoopbackAddress: () => IpLoopbackAddress,
|
|
15444
|
+
IpLoopbackAddressFromString: () => IpLoopbackAddressFromString,
|
|
15445
|
+
IpMulticastAddress: () => IpMulticastAddress,
|
|
15446
|
+
IpMulticastAddressFromString: () => IpMulticastAddressFromString,
|
|
15448
15447
|
IpNetwork: () => IpNetwork,
|
|
15449
15448
|
IpNetworkFromString: () => IpNetworkFromString,
|
|
15449
|
+
IpUnicastAddress: () => IpUnicastAddress,
|
|
15450
|
+
IpUnicastAddressFromString: () => IpUnicastAddressFromString,
|
|
15451
|
+
IpUnspecifiedAddress: () => IpUnspecifiedAddress,
|
|
15452
|
+
IpUnspecifiedAddressFromString: () => IpUnspecifiedAddressFromString,
|
|
15450
15453
|
Ipv4Address: () => Ipv4Address,
|
|
15451
15454
|
Ipv4AddressFromString: () => Ipv4AddressFromString,
|
|
15455
|
+
Ipv4BroadcastAddress: () => Ipv4BroadcastAddress,
|
|
15456
|
+
Ipv4BroadcastAddressFromString: () => Ipv4BroadcastAddressFromString,
|
|
15452
15457
|
Ipv4Interface: () => Ipv4Interface,
|
|
15453
15458
|
Ipv4InterfaceFromString: () => Ipv4InterfaceFromString,
|
|
15454
15459
|
Ipv4Network: () => Ipv4Network,
|
|
15455
15460
|
Ipv4NetworkFromString: () => Ipv4NetworkFromString,
|
|
15461
|
+
Ipv4PrivateAddress: () => Ipv4PrivateAddress,
|
|
15462
|
+
Ipv4PrivateAddressFromString: () => Ipv4PrivateAddressFromString,
|
|
15456
15463
|
Ipv6Address: () => Ipv6Address,
|
|
15457
15464
|
Ipv6AddressFromString: () => Ipv6AddressFromString,
|
|
15458
15465
|
Ipv6Interface: () => Ipv6Interface,
|
|
15459
15466
|
Ipv6InterfaceFromString: () => Ipv6InterfaceFromString,
|
|
15460
15467
|
Ipv6Network: () => Ipv6Network,
|
|
15461
15468
|
Ipv6NetworkFromString: () => Ipv6NetworkFromString,
|
|
15469
|
+
Ipv6UniqueLocalAddress: () => Ipv6UniqueLocalAddress,
|
|
15470
|
+
Ipv6UniqueLocalAddressFromString: () => Ipv6UniqueLocalAddressFromString,
|
|
15462
15471
|
Json: () => Json2,
|
|
15463
15472
|
JsonFromUrlParamsField: () => JsonFromUrlParamsField,
|
|
15464
15473
|
JsonObject: () => JsonObject,
|
|
@@ -15466,6 +15475,16 @@ __export(Schema_exports, {
|
|
|
15466
15475
|
Literals: () => Literals,
|
|
15467
15476
|
MacAddress: () => MacAddress,
|
|
15468
15477
|
MacAddressFromString: () => MacAddressFromString,
|
|
15478
|
+
MacBroadcastAddress: () => MacBroadcastAddress,
|
|
15479
|
+
MacBroadcastAddressFromString: () => MacBroadcastAddressFromString,
|
|
15480
|
+
MacLocallyAdministeredAddress: () => MacLocallyAdministeredAddress,
|
|
15481
|
+
MacLocallyAdministeredAddressFromString: () => MacLocallyAdministeredAddressFromString,
|
|
15482
|
+
MacMulticastAddress: () => MacMulticastAddress,
|
|
15483
|
+
MacMulticastAddressFromString: () => MacMulticastAddressFromString,
|
|
15484
|
+
MacUnicastAddress: () => MacUnicastAddress,
|
|
15485
|
+
MacUnicastAddressFromString: () => MacUnicastAddressFromString,
|
|
15486
|
+
MacUniversallyAdministeredAddress: () => MacUniversallyAdministeredAddress,
|
|
15487
|
+
MacUniversallyAdministeredAddressFromString: () => MacUniversallyAdministeredAddressFromString,
|
|
15469
15488
|
MutableJson: () => MutableJson2,
|
|
15470
15489
|
Natural: () => Natural,
|
|
15471
15490
|
Never: () => Never2,
|
|
@@ -15650,7 +15669,7 @@ __export(Schema_exports, {
|
|
|
15650
15669
|
isUppercased: () => isUppercased,
|
|
15651
15670
|
link: () => link,
|
|
15652
15671
|
linkDecoding: () => linkDecoding,
|
|
15653
|
-
make: () =>
|
|
15672
|
+
make: () => make21,
|
|
15654
15673
|
makeFilter: () => makeFilter2,
|
|
15655
15674
|
makeFilterGroup: () => makeFilterGroup,
|
|
15656
15675
|
makeIsBetween: () => makeIsBetween,
|
|
@@ -15705,7 +15724,7 @@ __export(Schema_exports, {
|
|
|
15705
15724
|
withDecodingDefaultTypeKey: () => withDecodingDefaultTypeKey
|
|
15706
15725
|
});
|
|
15707
15726
|
|
|
15708
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
15727
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/hashMap.js
|
|
15709
15728
|
var HashMapTypeId = "~effect/HashMap";
|
|
15710
15729
|
var SHIFT = 5;
|
|
15711
15730
|
var BUCKET_SIZE = 1 << SHIFT;
|
|
@@ -16349,14 +16368,14 @@ var entries = (self) => {
|
|
|
16349
16368
|
};
|
|
16350
16369
|
var size2 = (self) => self.size;
|
|
16351
16370
|
|
|
16352
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
16371
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/HashMap.js
|
|
16353
16372
|
var isHashMap2 = isHashMap;
|
|
16354
16373
|
var fromIterable4 = fromIterable3;
|
|
16355
16374
|
var entries2 = entries;
|
|
16356
16375
|
var toEntries = (self) => Array.from(entries2(self));
|
|
16357
16376
|
var size3 = size2;
|
|
16358
16377
|
|
|
16359
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
16378
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/hashSet.js
|
|
16360
16379
|
var HashSetTypeId = "~effect/HashSet";
|
|
16361
16380
|
var HashSetProto = {
|
|
16362
16381
|
[symbol]() {
|
|
@@ -16410,12 +16429,12 @@ var every2 = (self, predicate) => {
|
|
|
16410
16429
|
return true;
|
|
16411
16430
|
};
|
|
16412
16431
|
|
|
16413
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
16432
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/HashSet.js
|
|
16414
16433
|
var fromIterable6 = fromIterable5;
|
|
16415
16434
|
var isHashSet2 = isHashSet;
|
|
16416
16435
|
var size5 = size4;
|
|
16417
16436
|
|
|
16418
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
16437
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/graph.js
|
|
16419
16438
|
var TypeId11 = "~effect/Graph";
|
|
16420
16439
|
var isGraph = (u) => hasProperty(u, TypeId11);
|
|
16421
16440
|
var toImpl = (graph) => graph;
|
|
@@ -16481,7 +16500,7 @@ var ProtoGraph = {
|
|
|
16481
16500
|
return pipeArguments(this, arguments);
|
|
16482
16501
|
}
|
|
16483
16502
|
};
|
|
16484
|
-
var
|
|
16503
|
+
var make13 = (type, mutable3) => {
|
|
16485
16504
|
const graph = Object.create(ProtoGraph);
|
|
16486
16505
|
graph.type = type;
|
|
16487
16506
|
graph.mutable = mutable3;
|
|
@@ -16512,7 +16531,7 @@ var snapshot = (graph) => {
|
|
|
16512
16531
|
};
|
|
16513
16532
|
};
|
|
16514
16533
|
var hydrate = (snapshot2) => {
|
|
16515
|
-
const graph =
|
|
16534
|
+
const graph = make13(snapshot2.type, false);
|
|
16516
16535
|
for (const node of snapshot2.nodes) {
|
|
16517
16536
|
graph.nodes.set(node.index, node.data);
|
|
16518
16537
|
graph.adjacency.set(node.index, []);
|
|
@@ -16537,7 +16556,258 @@ var hydrate = (snapshot2) => {
|
|
|
16537
16556
|
return graph;
|
|
16538
16557
|
};
|
|
16539
16558
|
|
|
16540
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
16559
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/interpreter.js
|
|
16560
|
+
var flatMapTransformation = (result2, current, f) => result2 === sameExit ? f(current) : flatMapEager2(result2, f);
|
|
16561
|
+
function compileTransformation(transformation) {
|
|
16562
|
+
if (transformation._tag === "Middleware") {
|
|
16563
|
+
return (result2, current, options) => {
|
|
16564
|
+
const transformed = result2 === sameExit ? transformation.decode(succeed6(toOption(current)), options) : transformation.decode(mapEager2(result2, toOption), options);
|
|
16565
|
+
return fromOptionalEffect(transformed);
|
|
16566
|
+
};
|
|
16567
|
+
}
|
|
16568
|
+
const getter = transformation.decode;
|
|
16569
|
+
switch (getter._tag) {
|
|
16570
|
+
case "Passthrough":
|
|
16571
|
+
return (result2, current) => result2 === sameExit ? succeed6(current) : result2;
|
|
16572
|
+
case "Transform": {
|
|
16573
|
+
const transform3 = (value3) => value3 === missing ? missingExit : succeed6(getter.transform(value3));
|
|
16574
|
+
return (result2, current) => flatMapTransformation(result2, current, transform3);
|
|
16575
|
+
}
|
|
16576
|
+
case "TransformOptional": {
|
|
16577
|
+
const transform3 = (value3) => fromOptionExit(getter.transform(toOption(value3)));
|
|
16578
|
+
return (result2, current) => flatMapTransformation(result2, current, transform3);
|
|
16579
|
+
}
|
|
16580
|
+
case "TransformEffect":
|
|
16581
|
+
return (result2, current, options) => flatMapTransformation(result2, current, (value3) => value3 === missing ? missingExit : getter.transform(value3, options));
|
|
16582
|
+
case "TransformOptionalEffect":
|
|
16583
|
+
return (result2, current, options) => flatMapTransformation(result2, current, (value3) => fromOptionalEffect(getter.transform(toOption(value3), options)));
|
|
16584
|
+
}
|
|
16585
|
+
}
|
|
16586
|
+
var fromOptionalEffect = (effect) => flatMapEager2(effect, fromOptionExit);
|
|
16587
|
+
var wrapEncoding = (ast, input, options, effect) => catchCause2(effect, (cause) => failCauseSync2(() => map6(cause, (issue) => new Encoding(ast, issue, input, options))));
|
|
16588
|
+
function makeConstructorParser(descriptor2, compile2) {
|
|
16589
|
+
const transform3 = compileTransformation(descriptor2.link.transformation);
|
|
16590
|
+
let sourceParser;
|
|
16591
|
+
return (input, options) => {
|
|
16592
|
+
if (input === missing) return missingExit;
|
|
16593
|
+
if (descriptor2.isConstructed(input)) return sameExit;
|
|
16594
|
+
const result2 = (sourceParser ??= compile2(descriptor2.link.to))(input, options);
|
|
16595
|
+
return transform3(result2, input, options);
|
|
16596
|
+
};
|
|
16597
|
+
}
|
|
16598
|
+
function withDefault2(ast, parser) {
|
|
16599
|
+
const defaultValue = ast.context.constructorDefault;
|
|
16600
|
+
return (input, options) => {
|
|
16601
|
+
if (input !== missing && input !== void 0) return parser(input, options);
|
|
16602
|
+
const result2 = defaultValue;
|
|
16603
|
+
if (effectIsExit(result2) && result2._tag === "Success") {
|
|
16604
|
+
const local = parser(result2[args], options);
|
|
16605
|
+
return local === sameExit ? result2 : local;
|
|
16606
|
+
}
|
|
16607
|
+
return flatMapEager2(wrapEncoding(ast, input, options, result2), (value3) => {
|
|
16608
|
+
const local = parser(value3, options);
|
|
16609
|
+
return local === sameExit ? succeed6(value3) : local;
|
|
16610
|
+
});
|
|
16611
|
+
};
|
|
16612
|
+
}
|
|
16613
|
+
function compileField(ast, compile2) {
|
|
16614
|
+
const parser = compile2(ast);
|
|
16615
|
+
return ast.context?.constructorDefault === void 0 ? parser : withDefault2(ast, parser);
|
|
16616
|
+
}
|
|
16617
|
+
function compile(ast, compile2, compileField2, base, specialize) {
|
|
16618
|
+
if (ast._tag === "Declaration") {
|
|
16619
|
+
for (const parameter of ast.typeParameters) compile2(parameter);
|
|
16620
|
+
}
|
|
16621
|
+
const descriptor2 = compileField2 ? getConstructorDescriptor(ast) : void 0;
|
|
16622
|
+
const parser = descriptor2 ? makeConstructorParser(descriptor2, compile2) : base ?? ast.getParser(compile2, compileField2);
|
|
16623
|
+
const checks = ast.checks;
|
|
16624
|
+
const links = ast.encoding;
|
|
16625
|
+
const transformations = links?.map((link3) => compileTransformation(link3.transformation));
|
|
16626
|
+
const encodingChecks = ast.encodingChecks;
|
|
16627
|
+
if (!links && !checks && !encodingChecks) {
|
|
16628
|
+
return parser;
|
|
16629
|
+
}
|
|
16630
|
+
let encodingParsers;
|
|
16631
|
+
const parseChecks = (input, options) => {
|
|
16632
|
+
let result2 = parser(input, options);
|
|
16633
|
+
if (encodingChecks && !options.disableChecks) {
|
|
16634
|
+
if (effectIsExit(result2)) {
|
|
16635
|
+
if (result2._tag === "Success") {
|
|
16636
|
+
const output = result2 === sameExit ? input : result2[args];
|
|
16637
|
+
if (input !== missing && output !== missing) {
|
|
16638
|
+
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
16639
|
+
if (issues) {
|
|
16640
|
+
result2 = fail5(new Composite(ast, issues, input, options));
|
|
16641
|
+
}
|
|
16642
|
+
}
|
|
16643
|
+
}
|
|
16644
|
+
} else {
|
|
16645
|
+
result2 = flatMap4(result2, (value3) => {
|
|
16646
|
+
if (input !== missing && value3 !== missing) {
|
|
16647
|
+
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
16648
|
+
if (issues) {
|
|
16649
|
+
return fail5(new Composite(ast, issues, input, options));
|
|
16650
|
+
}
|
|
16651
|
+
}
|
|
16652
|
+
return succeed5(value3);
|
|
16653
|
+
});
|
|
16654
|
+
}
|
|
16655
|
+
}
|
|
16656
|
+
if (checks && !options.disableChecks) {
|
|
16657
|
+
if (effectIsExit(result2)) {
|
|
16658
|
+
if (result2._tag === "Success") {
|
|
16659
|
+
const value3 = result2 === sameExit ? input : result2[args];
|
|
16660
|
+
if (value3 === missing) return result2;
|
|
16661
|
+
const issues = collectIssues(checks, value3, void 0, ast, options);
|
|
16662
|
+
if (issues) {
|
|
16663
|
+
result2 = fail5(new Composite(ast, issues, value3, options));
|
|
16664
|
+
}
|
|
16665
|
+
}
|
|
16666
|
+
} else {
|
|
16667
|
+
result2 = flatMap4(result2, (value3) => {
|
|
16668
|
+
if (value3 !== missing) {
|
|
16669
|
+
const issues = collectIssues(checks, value3, void 0, ast, options);
|
|
16670
|
+
if (issues) {
|
|
16671
|
+
return fail5(new Composite(ast, issues, value3, options));
|
|
16672
|
+
}
|
|
16673
|
+
}
|
|
16674
|
+
return succeed5(value3);
|
|
16675
|
+
});
|
|
16676
|
+
}
|
|
16677
|
+
}
|
|
16678
|
+
return result2;
|
|
16679
|
+
};
|
|
16680
|
+
const parseLocal = specialize === void 0 ? parseChecks : specialize(parseChecks);
|
|
16681
|
+
if (!links) {
|
|
16682
|
+
return parseLocal;
|
|
16683
|
+
}
|
|
16684
|
+
return (input, options) => {
|
|
16685
|
+
const parsers = encodingParsers ??= links.map((link3) => compile2(link3.to));
|
|
16686
|
+
let current = input;
|
|
16687
|
+
let result2 = parsers[parsers.length - 1](input, options);
|
|
16688
|
+
for (let i = links.length - 1; i >= 0; i--) {
|
|
16689
|
+
result2 = transformations[i](result2, current, options);
|
|
16690
|
+
if (i !== 0) {
|
|
16691
|
+
const next = parsers[i - 1];
|
|
16692
|
+
if (result2._tag === "Success") {
|
|
16693
|
+
current = result2[args];
|
|
16694
|
+
result2 = next(current, options);
|
|
16695
|
+
} else {
|
|
16696
|
+
result2 = flatMapEager2(result2, (value3) => {
|
|
16697
|
+
const nextResult = next(value3, options);
|
|
16698
|
+
return nextResult === sameExit ? succeed6(value3) : nextResult;
|
|
16699
|
+
});
|
|
16700
|
+
}
|
|
16701
|
+
}
|
|
16702
|
+
}
|
|
16703
|
+
if (result2._tag === "Success") {
|
|
16704
|
+
const value3 = result2[args];
|
|
16705
|
+
const local = parseLocal(value3, options);
|
|
16706
|
+
return local === sameExit ? result2 : local;
|
|
16707
|
+
}
|
|
16708
|
+
result2 = wrapEncoding(ast, input, options, result2);
|
|
16709
|
+
return flatMapEager2(result2, (value3) => {
|
|
16710
|
+
const local = parseLocal(value3, options);
|
|
16711
|
+
return local === sameExit ? succeed6(value3) : local;
|
|
16712
|
+
});
|
|
16713
|
+
};
|
|
16714
|
+
}
|
|
16715
|
+
|
|
16716
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/compilerRegistry.js
|
|
16717
|
+
var invalid3 = /* @__PURE__ */ Symbol();
|
|
16718
|
+
var cache = /* @__PURE__ */ new WeakMap();
|
|
16719
|
+
var compiler;
|
|
16720
|
+
var compilerAdaptersEnabled = false;
|
|
16721
|
+
var decodeChild = (ast) => compilerAdaptersEnabled ? lazyParser(resolve2, ast, "parser") : resolve2(ast).parser;
|
|
16722
|
+
var makeChild = (ast) => compilerAdaptersEnabled ? lazyParser(resolve2, ast, "makeEffect") : resolve2(ast).makeEffect;
|
|
16723
|
+
var makeField = (ast) => compileField(ast, makeChild);
|
|
16724
|
+
var InterpretedEntry = class {
|
|
16725
|
+
ast;
|
|
16726
|
+
constructor(ast) {
|
|
16727
|
+
this.ast = ast;
|
|
16728
|
+
}
|
|
16729
|
+
get decodeEffect() {
|
|
16730
|
+
return this.cachedDecodeEffect ??= compile(this.ast, decodeChild);
|
|
16731
|
+
}
|
|
16732
|
+
get parser() {
|
|
16733
|
+
return this.decodeEffect;
|
|
16734
|
+
}
|
|
16735
|
+
get makeEffect() {
|
|
16736
|
+
return this.cachedMakeEffect ??= compile(this.ast, makeChild, makeField);
|
|
16737
|
+
}
|
|
16738
|
+
};
|
|
16739
|
+
var CompilerEntry = class extends InterpretedEntry {
|
|
16740
|
+
compiled;
|
|
16741
|
+
resolve;
|
|
16742
|
+
constructor(ast, compiled, resolve3) {
|
|
16743
|
+
super(ast);
|
|
16744
|
+
this.compiled = compiled;
|
|
16745
|
+
this.resolve = resolve3;
|
|
16746
|
+
}
|
|
16747
|
+
save(key, value3) {
|
|
16748
|
+
Object.defineProperty(this, key, {
|
|
16749
|
+
value: value3
|
|
16750
|
+
});
|
|
16751
|
+
return value3;
|
|
16752
|
+
}
|
|
16753
|
+
operation(key) {
|
|
16754
|
+
const compiled = this.compiled;
|
|
16755
|
+
return typeof compiled === "function" ? compiled(this.ast, this.resolve, key) : compiled?.[key];
|
|
16756
|
+
}
|
|
16757
|
+
get is() {
|
|
16758
|
+
return this.save("is", this.operation("is"));
|
|
16759
|
+
}
|
|
16760
|
+
get decode() {
|
|
16761
|
+
return this.save("decode", this.operation("decode"));
|
|
16762
|
+
}
|
|
16763
|
+
get make() {
|
|
16764
|
+
return this.save("make", this.operation("make"));
|
|
16765
|
+
}
|
|
16766
|
+
get decodeEffect() {
|
|
16767
|
+
return this.save("decodeEffect", this.operation("decodeEffect") ?? compile(this.ast, (ast) => lazyParser(this.resolve, ast, "parser")));
|
|
16768
|
+
}
|
|
16769
|
+
get parser() {
|
|
16770
|
+
const decode2 = this.decode;
|
|
16771
|
+
return decode2 === void 0 ? this.decodeEffect : this.save("parser", withDecode(decode2, () => this.decodeEffect));
|
|
16772
|
+
}
|
|
16773
|
+
get makeEffect() {
|
|
16774
|
+
const makeEffect2 = this.operation("makeEffect");
|
|
16775
|
+
if (makeEffect2 !== void 0) return this.save("makeEffect", makeEffect2);
|
|
16776
|
+
const child = (ast) => lazyParser(this.resolve, ast, "makeEffect");
|
|
16777
|
+
return this.save("makeEffect", compile(this.ast, child, (ast) => compileField(ast, child)));
|
|
16778
|
+
}
|
|
16779
|
+
};
|
|
16780
|
+
function withDecode(fastDecode, decodeEffect3) {
|
|
16781
|
+
let detailed;
|
|
16782
|
+
return (input, options) => {
|
|
16783
|
+
if (input !== missing) {
|
|
16784
|
+
try {
|
|
16785
|
+
const value3 = fastDecode(input, options);
|
|
16786
|
+
if (value3 !== invalid3) return value3 === input ? sameExit : succeed6(value3);
|
|
16787
|
+
} catch (error) {
|
|
16788
|
+
return die3(error);
|
|
16789
|
+
}
|
|
16790
|
+
}
|
|
16791
|
+
return (detailed ??= decodeEffect3())(input, options);
|
|
16792
|
+
};
|
|
16793
|
+
}
|
|
16794
|
+
function lazyParser(resolve3, ast, operation) {
|
|
16795
|
+
const entry = resolve3(ast);
|
|
16796
|
+
if (entry.compiled === void 0 || Object.hasOwn(entry, operation)) {
|
|
16797
|
+
return entry[operation];
|
|
16798
|
+
}
|
|
16799
|
+
let parser;
|
|
16800
|
+
return (input, options) => (parser ??= entry[operation])(input, options);
|
|
16801
|
+
}
|
|
16802
|
+
function resolve2(ast) {
|
|
16803
|
+
const cached2 = cache.get(ast);
|
|
16804
|
+
if (cached2 !== void 0) return cached2;
|
|
16805
|
+
const entry = compiler === void 0 ? new InterpretedEntry(ast) : new CompilerEntry(ast, compiler(ast, resolve2), resolve2);
|
|
16806
|
+
cache.set(ast, entry);
|
|
16807
|
+
return entry;
|
|
16808
|
+
}
|
|
16809
|
+
|
|
16810
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/SchemaParser.js
|
|
16541
16811
|
function makeEffect(schema) {
|
|
16542
16812
|
const ast = schema.ast;
|
|
16543
16813
|
let parser;
|
|
@@ -16561,33 +16831,52 @@ function makeOption(schema) {
|
|
|
16561
16831
|
return none2();
|
|
16562
16832
|
};
|
|
16563
16833
|
}
|
|
16564
|
-
function
|
|
16565
|
-
|
|
16566
|
-
return (input, options) => {
|
|
16567
|
-
const exit3 = runSyncExit2(parser(input, options));
|
|
16568
|
-
if (isSuccess3(exit3)) {
|
|
16569
|
-
return exit3.value;
|
|
16570
|
-
}
|
|
16571
|
-
const issue = getSchemaIssueOrThrow(exit3.cause, "Constructor adapter can only throw schema issues");
|
|
16572
|
-
throw new Error("Schema validation failed", {
|
|
16573
|
-
cause: issue
|
|
16574
|
-
});
|
|
16575
|
-
};
|
|
16834
|
+
function make14(schema) {
|
|
16835
|
+
return makeConstructorSync(toType(schema.ast));
|
|
16576
16836
|
}
|
|
16577
16837
|
function is(schema) {
|
|
16578
16838
|
return _is(schema.ast);
|
|
16579
16839
|
}
|
|
16580
|
-
function
|
|
16581
|
-
|
|
16840
|
+
function makeIs(ast) {
|
|
16841
|
+
if (!compilerAdaptersEnabled) {
|
|
16842
|
+
const parser2 = asExit(run(ast));
|
|
16843
|
+
return (input) => {
|
|
16844
|
+
const exit3 = parser2(input, defaultParseOptions);
|
|
16845
|
+
if (isSuccess3(exit3)) return true;
|
|
16846
|
+
getSchemaIssueOrThrow(exit3.cause, "Type guard adapter can only return false for schema issues");
|
|
16847
|
+
return false;
|
|
16848
|
+
};
|
|
16849
|
+
}
|
|
16850
|
+
const entry = resolve2(ast);
|
|
16851
|
+
const guard = entry.is;
|
|
16852
|
+
if (guard !== void 0) {
|
|
16853
|
+
return (input) => {
|
|
16854
|
+
try {
|
|
16855
|
+
return guard(input, defaultParseOptions);
|
|
16856
|
+
} catch (error) {
|
|
16857
|
+
getSchemaIssueOrThrow(die2(error), "Type guard adapter can only return false for schema issues");
|
|
16858
|
+
return false;
|
|
16859
|
+
}
|
|
16860
|
+
};
|
|
16861
|
+
}
|
|
16862
|
+
const parser = entry.parser;
|
|
16582
16863
|
return (input) => {
|
|
16583
|
-
const exit3 = parser(input, defaultParseOptions);
|
|
16584
|
-
if (isSuccess3(exit3))
|
|
16585
|
-
return true;
|
|
16586
|
-
}
|
|
16864
|
+
const exit3 = runSyncExit2(parserResult(parser(input, defaultParseOptions), input));
|
|
16865
|
+
if (isSuccess3(exit3)) return true;
|
|
16587
16866
|
getSchemaIssueOrThrow(exit3.cause, "Type guard adapter can only return false for schema issues");
|
|
16588
16867
|
return false;
|
|
16589
16868
|
};
|
|
16590
16869
|
}
|
|
16870
|
+
function _is(ast) {
|
|
16871
|
+
const typeAST = toType(ast);
|
|
16872
|
+
let guard = (input) => {
|
|
16873
|
+
guard = makeIs(typeAST);
|
|
16874
|
+
return guard(input);
|
|
16875
|
+
};
|
|
16876
|
+
return (input) => {
|
|
16877
|
+
return guard(input);
|
|
16878
|
+
};
|
|
16879
|
+
}
|
|
16591
16880
|
function _issue(ast) {
|
|
16592
16881
|
const parser = run(ast);
|
|
16593
16882
|
return (input, options) => {
|
|
@@ -16624,7 +16913,7 @@ function decodeUnknownResult(schema, options) {
|
|
|
16624
16913
|
return asResult(decodeUnknownEffect(schema, options));
|
|
16625
16914
|
}
|
|
16626
16915
|
function decodeUnknownSync(schema, options) {
|
|
16627
|
-
return asSync(decodeUnknownEffect(schema, options));
|
|
16916
|
+
return compilerAdaptersEnabled ? makeSync(schema.ast, options) : asSync(decodeUnknownEffect(schema, options));
|
|
16628
16917
|
}
|
|
16629
16918
|
var decodeSync = decodeUnknownSync;
|
|
16630
16919
|
function encodeUnknownEffect(schema, options) {
|
|
@@ -16643,7 +16932,7 @@ function encodeUnknownResult(schema, options) {
|
|
|
16643
16932
|
return asResult(encodeUnknownEffect(schema, options));
|
|
16644
16933
|
}
|
|
16645
16934
|
function encodeUnknownSync(schema, options) {
|
|
16646
|
-
return asSync(encodeUnknownEffect(schema, options));
|
|
16935
|
+
return compilerAdaptersEnabled ? makeSync(flip2(schema.ast), options) : asSync(encodeUnknownEffect(schema, options));
|
|
16647
16936
|
}
|
|
16648
16937
|
var encodeSync = encodeUnknownSync;
|
|
16649
16938
|
var mergeParseOptions = (options, overrideOptions) => overrideOptions ? {
|
|
@@ -16659,10 +16948,19 @@ var getValue = (value3) => {
|
|
|
16659
16948
|
function run(ast) {
|
|
16660
16949
|
return runWithCompiler(normalCompiler, ast);
|
|
16661
16950
|
}
|
|
16662
|
-
function
|
|
16951
|
+
function parserResult(result2, input) {
|
|
16952
|
+
if (result2 === sameExit) {
|
|
16953
|
+
return succeed5(input);
|
|
16954
|
+
}
|
|
16955
|
+
if (!effectIsExit(result2)) {
|
|
16956
|
+
return flatMapEager2(result2, getValue);
|
|
16957
|
+
}
|
|
16958
|
+
return result2[args] === missing ? getValue(missing) : result2;
|
|
16959
|
+
}
|
|
16960
|
+
function runWithCompiler(compiler2, ast) {
|
|
16663
16961
|
let parser;
|
|
16664
16962
|
return (input, options) => {
|
|
16665
|
-
const result2 = (parser ??=
|
|
16963
|
+
const result2 = (parser ??= compiler2(ast))(input, options ?? defaultParseOptions);
|
|
16666
16964
|
if (result2 === sameExit) {
|
|
16667
16965
|
return succeed5(input);
|
|
16668
16966
|
}
|
|
@@ -16696,6 +16994,32 @@ function asResult(parser) {
|
|
|
16696
16994
|
return fail2(getSchemaIssueOrThrow(exit3.cause, "Result adapter can only return schema issues"));
|
|
16697
16995
|
};
|
|
16698
16996
|
}
|
|
16997
|
+
function makeSync(ast, options) {
|
|
16998
|
+
let run2;
|
|
16999
|
+
return (input, overrideOptions) => (run2 ??= makeSyncEntry(resolve2(ast), options))(input, overrideOptions);
|
|
17000
|
+
}
|
|
17001
|
+
function makeSyncEntry(entry, options) {
|
|
17002
|
+
const decode2 = entry.decode;
|
|
17003
|
+
let detailed;
|
|
17004
|
+
const run2 = decode2 === void 0 ? (input, parseOptions = defaultParseOptions) => (detailed ??= makeDetailedSync(entry))(input, parseOptions) : (input, parseOptions = defaultParseOptions) => {
|
|
17005
|
+
if (input === missing) {
|
|
17006
|
+
return (detailed ??= makeDetailedSync(entry))(input, parseOptions);
|
|
17007
|
+
}
|
|
17008
|
+
let output;
|
|
17009
|
+
try {
|
|
17010
|
+
output = decode2(input, parseOptions);
|
|
17011
|
+
} catch (error) {
|
|
17012
|
+
getSchemaIssueOrThrow(die2(error), "Sync adapter can only throw schema issues");
|
|
17013
|
+
throw error;
|
|
17014
|
+
}
|
|
17015
|
+
if (output !== invalid3) return output;
|
|
17016
|
+
return (detailed ??= makeDetailedSync(entry))(input, parseOptions);
|
|
17017
|
+
};
|
|
17018
|
+
return options === void 0 ? run2 : (input, overrideOptions) => run2(input, mergeParseOptions(options, overrideOptions));
|
|
17019
|
+
}
|
|
17020
|
+
function makeDetailedSync(entry) {
|
|
17021
|
+
return asSync(runWithCompiler(() => entry.decodeEffect, entry.ast));
|
|
17022
|
+
}
|
|
16699
17023
|
function asSync(parser) {
|
|
16700
17024
|
const parserExit = asExit(parser);
|
|
16701
17025
|
return (input, options) => {
|
|
@@ -16709,128 +17033,46 @@ function asSync(parser) {
|
|
|
16709
17033
|
});
|
|
16710
17034
|
};
|
|
16711
17035
|
}
|
|
16712
|
-
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
16716
|
-
return ast.context?.constructorDefault ? compileDefaulted(ast) : constructorCompiler(ast);
|
|
16717
|
-
}
|
|
16718
|
-
function applyTransformation(result2, current, transformation, options) {
|
|
16719
|
-
let transformed;
|
|
16720
|
-
if (effectIsExit(result2) && result2._tag === "Success") {
|
|
16721
|
-
const optional3 = toOption(result2 === sameExit ? current : result2[args]);
|
|
16722
|
-
transformed = transformation._tag === "Transformation" ? transformation.decode.run(optional3, options) : transformation.decode(succeed6(optional3), options);
|
|
16723
|
-
} else if (transformation._tag === "Transformation") {
|
|
16724
|
-
transformed = flatMapEager2(result2, (value3) => transformation.decode.run(toOption(value3), options));
|
|
16725
|
-
} else {
|
|
16726
|
-
transformed = transformation.decode(mapEager2(result2, toOption), options);
|
|
17036
|
+
function runSync2(effect, message) {
|
|
17037
|
+
const exit3 = runSyncExit2(effect);
|
|
17038
|
+
if (isSuccess3(exit3)) {
|
|
17039
|
+
return exit3.value;
|
|
16727
17040
|
}
|
|
16728
|
-
|
|
16729
|
-
|
|
16730
|
-
|
|
16731
|
-
|
|
16732
|
-
return (input, options) => {
|
|
16733
|
-
if (input === missing) return missingExit;
|
|
16734
|
-
if (descriptor2.isConstructed(input)) return sameExit;
|
|
16735
|
-
const result2 = (sourceParser ??= compile(descriptor2.link.to))(input, options);
|
|
16736
|
-
return applyTransformation(result2, input, descriptor2.link.transformation, options);
|
|
16737
|
-
};
|
|
17041
|
+
const issue = getSchemaIssueOrThrow(exit3.cause, message);
|
|
17042
|
+
throw new Error("Schema validation failed", {
|
|
17043
|
+
cause: issue
|
|
17044
|
+
});
|
|
16738
17045
|
}
|
|
16739
|
-
function
|
|
16740
|
-
|
|
16741
|
-
|
|
16742
|
-
const checks = ast.checks;
|
|
16743
|
-
const links = constructorDefault ? ast.encoding ? [...ast.encoding, constructorDefault] : [constructorDefault] : ast.encoding;
|
|
16744
|
-
const encodingChecks = ast.encodingChecks;
|
|
16745
|
-
if (!links && !checks && !encodingChecks) {
|
|
16746
|
-
return parser;
|
|
16747
|
-
}
|
|
16748
|
-
let encodingParsers;
|
|
16749
|
-
const parseLocal = (input, options) => {
|
|
16750
|
-
let result2 = parser(input, options);
|
|
16751
|
-
if (encodingChecks && !options.disableChecks) {
|
|
16752
|
-
if (effectIsExit(result2)) {
|
|
16753
|
-
if (result2._tag === "Success") {
|
|
16754
|
-
const output = result2 === sameExit ? input : result2[args];
|
|
16755
|
-
if (input !== missing && output !== missing) {
|
|
16756
|
-
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
16757
|
-
if (issues) {
|
|
16758
|
-
result2 = fail5(new Composite(ast, issues, input, options));
|
|
16759
|
-
}
|
|
16760
|
-
}
|
|
16761
|
-
}
|
|
16762
|
-
} else {
|
|
16763
|
-
result2 = flatMap4(result2, (value3) => {
|
|
16764
|
-
if (input !== missing && value3 !== missing) {
|
|
16765
|
-
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
16766
|
-
if (issues) {
|
|
16767
|
-
return fail5(new Composite(ast, issues, input, options));
|
|
16768
|
-
}
|
|
16769
|
-
}
|
|
16770
|
-
return succeed5(value3);
|
|
16771
|
-
});
|
|
16772
|
-
}
|
|
16773
|
-
}
|
|
16774
|
-
if (checks && !options.disableChecks) {
|
|
16775
|
-
if (effectIsExit(result2)) {
|
|
16776
|
-
if (result2._tag === "Success") {
|
|
16777
|
-
const value3 = result2 === sameExit ? input : result2[args];
|
|
16778
|
-
if (value3 === missing) return result2;
|
|
16779
|
-
const issues = collectIssues(checks, value3, void 0, ast, options);
|
|
16780
|
-
if (issues) {
|
|
16781
|
-
result2 = fail5(new Composite(ast, issues, value3, options));
|
|
16782
|
-
}
|
|
16783
|
-
}
|
|
16784
|
-
} else {
|
|
16785
|
-
result2 = flatMap4(result2, (value3) => {
|
|
16786
|
-
if (value3 !== missing) {
|
|
16787
|
-
const issues = collectIssues(checks, value3, void 0, ast, options);
|
|
16788
|
-
if (issues) {
|
|
16789
|
-
return fail5(new Composite(ast, issues, value3, options));
|
|
16790
|
-
}
|
|
16791
|
-
}
|
|
16792
|
-
return succeed5(value3);
|
|
16793
|
-
});
|
|
16794
|
-
}
|
|
16795
|
-
}
|
|
16796
|
-
return result2;
|
|
16797
|
-
};
|
|
16798
|
-
if (!links) {
|
|
16799
|
-
return parseLocal;
|
|
16800
|
-
}
|
|
17046
|
+
function makeConstructorSync(ast) {
|
|
17047
|
+
let entry;
|
|
17048
|
+
let parser;
|
|
16801
17049
|
return (input, options) => {
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
}
|
|
17050
|
+
entry ??= resolve2(ast);
|
|
17051
|
+
const parseOptions = options?.disableChecks ? options.parseOptions ? {
|
|
17052
|
+
...options.parseOptions,
|
|
17053
|
+
disableChecks: true
|
|
17054
|
+
} : {
|
|
17055
|
+
disableChecks: true
|
|
17056
|
+
} : options?.parseOptions ?? defaultParseOptions;
|
|
17057
|
+
const make22 = entry.make;
|
|
17058
|
+
if (make22 !== void 0 && input !== missing) {
|
|
17059
|
+
let output;
|
|
17060
|
+
try {
|
|
17061
|
+
output = make22(input, parseOptions);
|
|
17062
|
+
} catch (error) {
|
|
17063
|
+
getSchemaIssueOrThrow(die2(error), "Constructor adapter can only throw schema issues");
|
|
17064
|
+
throw error;
|
|
16818
17065
|
}
|
|
17066
|
+
if (output !== invalid3 && output !== missing) return output;
|
|
16819
17067
|
}
|
|
16820
|
-
|
|
16821
|
-
|
|
16822
|
-
const local = parseLocal(value3, options);
|
|
16823
|
-
return local === sameExit ? result2 : local;
|
|
16824
|
-
}
|
|
16825
|
-
result2 = catchCause2(result2, (cause) => failCauseSync2(() => map6(cause, (issue) => new Encoding(ast, issue, input, options))));
|
|
16826
|
-
return flatMapEager2(result2, (value3) => {
|
|
16827
|
-
const local = parseLocal(value3, options);
|
|
16828
|
-
return local === sameExit ? succeed6(value3) : local;
|
|
16829
|
-
});
|
|
17068
|
+
const result2 = (parser ??= entry.makeEffect)(input, parseOptions);
|
|
17069
|
+
return runSync2(parserResult(result2, input), "Constructor adapter can only throw schema issues");
|
|
16830
17070
|
};
|
|
16831
17071
|
}
|
|
17072
|
+
var normalCompiler = (ast) => resolve2(ast).parser;
|
|
17073
|
+
var constructorCompiler = (ast) => resolve2(ast).makeEffect;
|
|
16832
17074
|
|
|
16833
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
17075
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/make.js
|
|
16834
17076
|
var TypeId12 = "~effect/Schema/Schema";
|
|
16835
17077
|
var SchemaProto = {
|
|
16836
17078
|
[TypeId12]: TypeId12,
|
|
@@ -16847,7 +17089,7 @@ var SchemaProto = {
|
|
|
16847
17089
|
return this.rebuild(appendChecks(this.ast, checks));
|
|
16848
17090
|
}
|
|
16849
17091
|
};
|
|
16850
|
-
function
|
|
17092
|
+
function make15(ast, options) {
|
|
16851
17093
|
function Schema() {
|
|
16852
17094
|
}
|
|
16853
17095
|
const self = Object.setPrototypeOf(Schema, SchemaProto);
|
|
@@ -16859,14 +17101,14 @@ function make16(ast, options) {
|
|
|
16859
17101
|
Object.assign(self, options);
|
|
16860
17102
|
}
|
|
16861
17103
|
self.ast = ast;
|
|
16862
|
-
self.rebuild = (ast2) =>
|
|
17104
|
+
self.rebuild = (ast2) => make15(ast2, options);
|
|
16863
17105
|
self.makeEffect = makeEffect(self);
|
|
16864
|
-
self.make =
|
|
17106
|
+
self.make = make14(self);
|
|
16865
17107
|
self.makeOption = makeOption(self);
|
|
16866
17108
|
return self;
|
|
16867
17109
|
}
|
|
16868
17110
|
|
|
16869
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
17111
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/JsonPointer.js
|
|
16870
17112
|
function escapeToken(token) {
|
|
16871
17113
|
return token.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
16872
17114
|
}
|
|
@@ -16896,7 +17138,7 @@ function formatUriFragment(path23) {
|
|
|
16896
17138
|
return path23.reduce((fragment, token) => `${fragment}/${formatUriFragmentToken(token)}`, "#");
|
|
16897
17139
|
}
|
|
16898
17140
|
|
|
16899
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
17141
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/JsonSchema.js
|
|
16900
17142
|
var META_SCHEMA_URI_DRAFT_07 = "http://json-schema.org/draft-07/schema#";
|
|
16901
17143
|
var META_SCHEMA_URI_DRAFT_2020_12 = "https://json-schema.org/draft/2020-12/schema";
|
|
16902
17144
|
function isMetaSchemaUri(value3, uri) {
|
|
@@ -17256,9 +17498,9 @@ function convertLegacyId(source, out, targetKey, dialect) {
|
|
|
17256
17498
|
}
|
|
17257
17499
|
}
|
|
17258
17500
|
|
|
17259
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
17501
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/toCodec.js
|
|
17260
17502
|
function toCodecJson(schema) {
|
|
17261
|
-
return
|
|
17503
|
+
return make15(toCodecJsonAST(schema.ast), {
|
|
17262
17504
|
schema
|
|
17263
17505
|
});
|
|
17264
17506
|
}
|
|
@@ -17314,7 +17556,7 @@ function toCodecJsonASTStep(ast, recur2) {
|
|
|
17314
17556
|
if (!isFunction(getLink)) {
|
|
17315
17557
|
return replaceEncoding(ast, [unknownToJson]);
|
|
17316
17558
|
}
|
|
17317
|
-
const typeParameters = ast.typeParameters.map((tp) =>
|
|
17559
|
+
const typeParameters = ast.typeParameters.map((tp) => make15(toEncoded(tp)));
|
|
17318
17560
|
const link3 = getLink(typeParameters);
|
|
17319
17561
|
return link3 === void 0 ? ast : replaceEncoding(ast, [mapLink(link3, recur2)]);
|
|
17320
17562
|
}
|
|
@@ -17349,7 +17591,7 @@ function toCodecJsonASTStep(ast, recur2) {
|
|
|
17349
17591
|
return ast;
|
|
17350
17592
|
}
|
|
17351
17593
|
function toCodecIso(schema) {
|
|
17352
|
-
return
|
|
17594
|
+
return make15(toCodecIsoAST(toType(schema.ast)));
|
|
17353
17595
|
}
|
|
17354
17596
|
var toCodecIsoAST = /* @__PURE__ */ memoize((ast) => {
|
|
17355
17597
|
const out = toCodecIsoASTStep(ast, toCodecIsoAST);
|
|
@@ -17360,7 +17602,7 @@ function toCodecIsoASTStep(ast, recur2) {
|
|
|
17360
17602
|
case "Declaration": {
|
|
17361
17603
|
const getLink = ast.annotations?.toCodecIso ?? ast.annotations?.toCodec;
|
|
17362
17604
|
if (isFunction(getLink)) {
|
|
17363
|
-
const link3 = getLink(ast.typeParameters.map((tp) =>
|
|
17605
|
+
const link3 = getLink(ast.typeParameters.map((tp) => make15(tp)));
|
|
17364
17606
|
return replaceEncoding(ast, [mapLink(link3, recur2)]);
|
|
17365
17607
|
}
|
|
17366
17608
|
return ast;
|
|
@@ -17374,12 +17616,12 @@ function toCodecIsoASTStep(ast, recur2) {
|
|
|
17374
17616
|
return ast;
|
|
17375
17617
|
}
|
|
17376
17618
|
function toCodecStringTree(schema) {
|
|
17377
|
-
return
|
|
17619
|
+
return make15(toCodecStringTreeAST(schema.ast), {
|
|
17378
17620
|
schema
|
|
17379
17621
|
});
|
|
17380
17622
|
}
|
|
17381
17623
|
function toCodecArrayFromSingle(schema) {
|
|
17382
|
-
return
|
|
17624
|
+
return make15(toCodecArrayFromSingleAST(schema.ast));
|
|
17383
17625
|
}
|
|
17384
17626
|
var toStringTreeReorder = /* @__PURE__ */ makeReorder((ast) => {
|
|
17385
17627
|
switch (ast._tag) {
|
|
@@ -17397,7 +17639,7 @@ var toStringTreeReorder = /* @__PURE__ */ makeReorder((ast) => {
|
|
|
17397
17639
|
function toCodecStringTreeASTStep(ast, recur2, onMissingAnnotation) {
|
|
17398
17640
|
switch (ast._tag) {
|
|
17399
17641
|
case "Declaration": {
|
|
17400
|
-
const typeParameters = ast.typeParameters.map((tp) =>
|
|
17642
|
+
const typeParameters = ast.typeParameters.map((tp) => make15(recur2(toEncoded(tp))));
|
|
17401
17643
|
const getStringTreeLink = ast.annotations?.toCodecStringTree;
|
|
17402
17644
|
if (isFunction(getStringTreeLink)) {
|
|
17403
17645
|
const link4 = getStringTreeLink(typeParameters);
|
|
@@ -17475,11 +17717,11 @@ function toCodecArrayFromSingleASTStep(ast) {
|
|
|
17475
17717
|
return ast._tag === "Declaration" || ast._tag === "Arrays" || ast._tag === "Objects" || ast._tag === "Union" || ast._tag === "Suspend" ? ast.recur(toCodecArrayFromSingleAST) : ast;
|
|
17476
17718
|
}
|
|
17477
17719
|
|
|
17478
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
17720
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/RegExp.js
|
|
17479
17721
|
var RegExp2 = globalThis.RegExp;
|
|
17480
17722
|
var escape = (string3) => string3.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
17481
17723
|
|
|
17482
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
17724
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/errors.js
|
|
17483
17725
|
function errorWithPath(message, path23) {
|
|
17484
17726
|
if (path23.length > 0) {
|
|
17485
17727
|
message += `
|
|
@@ -17488,7 +17730,7 @@ function errorWithPath(message, path23) {
|
|
|
17488
17730
|
return new Error(message);
|
|
17489
17731
|
}
|
|
17490
17732
|
|
|
17491
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
17733
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
|
|
17492
17734
|
function formatDefinitionReference(key) {
|
|
17493
17735
|
return `#/$defs/${formatUriFragmentToken(key)}`;
|
|
17494
17736
|
}
|
|
@@ -18073,7 +18315,7 @@ function toJsonSchemaDocument(document, options) {
|
|
|
18073
18315
|
};
|
|
18074
18316
|
}
|
|
18075
18317
|
|
|
18076
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
18318
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/toRepresentation.js
|
|
18077
18319
|
var defaultReferencePolicy = ({
|
|
18078
18320
|
identifier: identifier2
|
|
18079
18321
|
}) => identifier2;
|
|
@@ -18390,7 +18632,7 @@ function toRepresentations(asts, options) {
|
|
|
18390
18632
|
}
|
|
18391
18633
|
}
|
|
18392
18634
|
|
|
18393
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
18635
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/standardSchema.js
|
|
18394
18636
|
function makeStandardResult(exit3) {
|
|
18395
18637
|
return isSuccess3(exit3) ? exit3.value : {
|
|
18396
18638
|
issues: [{
|
|
@@ -18420,9 +18662,9 @@ function toStandardSchemaV1(self, options) {
|
|
|
18420
18662
|
if (exit3) {
|
|
18421
18663
|
return makeStandardResult(exit3);
|
|
18422
18664
|
}
|
|
18423
|
-
return new Promise((
|
|
18665
|
+
return new Promise((resolve3) => {
|
|
18424
18666
|
fiber2.addObserver((exit4) => {
|
|
18425
|
-
|
|
18667
|
+
resolve3(makeStandardResult(exit4));
|
|
18426
18668
|
});
|
|
18427
18669
|
});
|
|
18428
18670
|
};
|
|
@@ -18490,7 +18732,7 @@ function toStandardJSONSchemaV1(self) {
|
|
|
18490
18732
|
});
|
|
18491
18733
|
}
|
|
18492
18734
|
|
|
18493
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
18735
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/JsonPatch.js
|
|
18494
18736
|
function get3(oldValue, newValue) {
|
|
18495
18737
|
const patches = [];
|
|
18496
18738
|
getLoop(oldValue, newValue, "", patches);
|
|
@@ -18671,7 +18913,7 @@ function rebuildFromStack(stack, newParent) {
|
|
|
18671
18913
|
return acc;
|
|
18672
18914
|
}
|
|
18673
18915
|
|
|
18674
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
18916
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/toDifferJsonPatch.js
|
|
18675
18917
|
function toDifferJsonPatch(schema) {
|
|
18676
18918
|
const serializer = toCodecJson(schema);
|
|
18677
18919
|
const get5 = encodeSync(serializer);
|
|
@@ -18688,7 +18930,7 @@ function toDifferJsonPatch(schema) {
|
|
|
18688
18930
|
};
|
|
18689
18931
|
}
|
|
18690
18932
|
|
|
18691
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
18933
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/toEncoderXml.js
|
|
18692
18934
|
function toEncoderXml(codec, options) {
|
|
18693
18935
|
const rootName = resolveIdentifier(codec.ast) ?? resolveTitle(codec.ast);
|
|
18694
18936
|
const serialize = encodeEffect(toCodecStringTree(codec));
|
|
@@ -18787,7 +19029,7 @@ var xml = {
|
|
|
18787
19029
|
}
|
|
18788
19030
|
};
|
|
18789
19031
|
|
|
18790
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
19032
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/toEquivalence.js
|
|
18791
19033
|
var toEquivalence = /* @__PURE__ */ memoize((ast) => {
|
|
18792
19034
|
return recur(ast, []);
|
|
18793
19035
|
});
|
|
@@ -18970,7 +19212,7 @@ function causeEquivalence(error, defect) {
|
|
|
18970
19212
|
return (a, b) => reasons(a.reasons, b.reasons);
|
|
18971
19213
|
}
|
|
18972
19214
|
|
|
18973
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
19215
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/toFormatter.js
|
|
18974
19216
|
function causeReasonToFormatter(error, defect) {
|
|
18975
19217
|
return (reason) => {
|
|
18976
19218
|
switch (reason._tag) {
|
|
@@ -19175,7 +19417,7 @@ function toFormatter(ast, options) {
|
|
|
19175
19417
|
}
|
|
19176
19418
|
}
|
|
19177
19419
|
|
|
19178
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
19420
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Struct.js
|
|
19179
19421
|
var Struct_exports = {};
|
|
19180
19422
|
__export(Struct_exports, {
|
|
19181
19423
|
Record: () => Record,
|
|
@@ -19281,12 +19523,12 @@ function Record(keys4, value3) {
|
|
|
19281
19523
|
return out;
|
|
19282
19524
|
}
|
|
19283
19525
|
|
|
19284
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
19526
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Optic.js
|
|
19285
19527
|
function makeIso(get5, set3) {
|
|
19286
|
-
return
|
|
19528
|
+
return make16(primitiveNode("Iso", get5, set3));
|
|
19287
19529
|
}
|
|
19288
19530
|
function makeLens(get5, replace) {
|
|
19289
|
-
return
|
|
19531
|
+
return make16(primitiveNode("Lens", get5, replace));
|
|
19290
19532
|
}
|
|
19291
19533
|
function primitiveNode(kind, get5, set3) {
|
|
19292
19534
|
return [{
|
|
@@ -19341,7 +19583,7 @@ var CheckNode = class {
|
|
|
19341
19583
|
this.get = (s) => runChecks(checks, s);
|
|
19342
19584
|
}
|
|
19343
19585
|
};
|
|
19344
|
-
function
|
|
19586
|
+
function compose2(a, b) {
|
|
19345
19587
|
if (a.length === 0) return b;
|
|
19346
19588
|
if (b.length === 0) return a;
|
|
19347
19589
|
const nodes = a.slice();
|
|
@@ -19359,7 +19601,7 @@ function compose(a, b) {
|
|
|
19359
19601
|
return nodes;
|
|
19360
19602
|
}
|
|
19361
19603
|
function makeOptional(getResult, set3) {
|
|
19362
|
-
return
|
|
19604
|
+
return make16(primitiveNode("Optional", getResult, set3));
|
|
19363
19605
|
}
|
|
19364
19606
|
var OptionalImpl = class {
|
|
19365
19607
|
/** @internal */
|
|
@@ -19378,13 +19620,13 @@ var OptionalImpl = class {
|
|
|
19378
19620
|
return (s) => getOrElse2(flatMap2(this.getResult(s), (a) => this.replaceResult(f(a), s)), () => s);
|
|
19379
19621
|
}
|
|
19380
19622
|
compose(that) {
|
|
19381
|
-
return
|
|
19623
|
+
return make16(compose2(this.node, that.node));
|
|
19382
19624
|
}
|
|
19383
19625
|
key(key) {
|
|
19384
|
-
return
|
|
19626
|
+
return make16(compose2(this.node, [new PathNode([key])]));
|
|
19385
19627
|
}
|
|
19386
19628
|
optionalKey(key) {
|
|
19387
|
-
return
|
|
19629
|
+
return make16(compose2(this.node, primitiveNode("Lens", (s) => s[key], (a, s) => {
|
|
19388
19630
|
const copy2 = cloneShallow(s);
|
|
19389
19631
|
if (a === void 0) {
|
|
19390
19632
|
if (Array.isArray(copy2) && (typeof key === "number" || typeof key === "string" && isCanonicalArrayIndex(key))) {
|
|
@@ -19399,20 +19641,20 @@ var OptionalImpl = class {
|
|
|
19399
19641
|
})));
|
|
19400
19642
|
}
|
|
19401
19643
|
check(...checks) {
|
|
19402
|
-
return
|
|
19644
|
+
return make16(compose2(this.node, [new CheckNode(checks)]));
|
|
19403
19645
|
}
|
|
19404
19646
|
refine(refinement, annotations) {
|
|
19405
|
-
return
|
|
19647
|
+
return make16(compose2(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations)])]));
|
|
19406
19648
|
}
|
|
19407
19649
|
tag(tag2) {
|
|
19408
19650
|
const err = fail2(new InvalidValue({
|
|
19409
19651
|
expected: `${JSON.stringify(tag2)} tag`
|
|
19410
19652
|
}));
|
|
19411
|
-
return
|
|
19653
|
+
return make16(compose2(this.node, primitiveNode("Prism", (s) => s._tag === tag2 ? succeed2(s) : err, identity)));
|
|
19412
19654
|
}
|
|
19413
19655
|
at(key, ..._rest) {
|
|
19414
19656
|
const err = fail2(new Pointer([key], new MissingKey(void 0)));
|
|
19415
|
-
return
|
|
19657
|
+
return make16(compose2(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
|
|
19416
19658
|
if (Object.hasOwn(s, key)) {
|
|
19417
19659
|
const copy2 = cloneShallow(s);
|
|
19418
19660
|
assignProperty(copy2, key, a);
|
|
@@ -19518,7 +19760,7 @@ var PrismImpl = class extends OptionalImpl {
|
|
|
19518
19760
|
return (s) => getOrElse2(map2(this.getResult(s), (a) => this.set(f(a))), () => s);
|
|
19519
19761
|
}
|
|
19520
19762
|
};
|
|
19521
|
-
function
|
|
19763
|
+
function make16(node) {
|
|
19522
19764
|
let op = node[0] ?? identityOperation;
|
|
19523
19765
|
if (node.length > 1) {
|
|
19524
19766
|
const kind = node.reduce((kind2, step) => composeKind(kind2, step.kind), "Iso");
|
|
@@ -19622,12 +19864,12 @@ function composeKind(a, b) {
|
|
|
19622
19864
|
if (b === "Iso" || a === b) return a;
|
|
19623
19865
|
return "Optional";
|
|
19624
19866
|
}
|
|
19625
|
-
var identityIso = /* @__PURE__ */
|
|
19867
|
+
var identityIso = /* @__PURE__ */ make16([]);
|
|
19626
19868
|
function id() {
|
|
19627
19869
|
return identityIso;
|
|
19628
19870
|
}
|
|
19629
19871
|
|
|
19630
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
19872
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schema/toIso.js
|
|
19631
19873
|
function toIso(schema) {
|
|
19632
19874
|
const serializer = toCodecIso(schema);
|
|
19633
19875
|
return makeIso(encodeSync(serializer), decodeSync(serializer));
|
|
@@ -19639,13 +19881,13 @@ function toIsoFocus(_) {
|
|
|
19639
19881
|
return id();
|
|
19640
19882
|
}
|
|
19641
19883
|
|
|
19642
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
19884
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/schemaError.js
|
|
19643
19885
|
var SchemaErrorTypeId = "~effect/Schema/SchemaError";
|
|
19644
19886
|
function isSchemaError(u) {
|
|
19645
19887
|
return hasProperty(u, SchemaErrorTypeId) && u[SchemaErrorTypeId] === SchemaErrorTypeId;
|
|
19646
19888
|
}
|
|
19647
19889
|
|
|
19648
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
19890
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/internal/redacted.js
|
|
19649
19891
|
var redactedRegistry = /* @__PURE__ */ new WeakMap();
|
|
19650
19892
|
var value = (self) => {
|
|
19651
19893
|
if (redactedRegistry.has(self)) {
|
|
@@ -19655,10 +19897,10 @@ var value = (self) => {
|
|
|
19655
19897
|
}
|
|
19656
19898
|
};
|
|
19657
19899
|
|
|
19658
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
19900
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Redacted.js
|
|
19659
19901
|
var TypeId13 = "~effect/Redacted";
|
|
19660
19902
|
var isRedacted = (u) => hasProperty(u, TypeId13);
|
|
19661
|
-
var
|
|
19903
|
+
var make17 = (value3, options) => {
|
|
19662
19904
|
const self = Object.create(Proto3);
|
|
19663
19905
|
if (options?.label) {
|
|
19664
19906
|
self.label = options.label;
|
|
@@ -19688,7 +19930,7 @@ var Proto3 = {
|
|
|
19688
19930
|
var value2 = value;
|
|
19689
19931
|
var makeEquivalence6 = (isEquivalent) => make2((x, y) => isEquivalent(value2(x), value2(y)));
|
|
19690
19932
|
|
|
19691
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
19933
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/unstable/http/Cookies.js
|
|
19692
19934
|
var TypeId14 = "~effect/http/Cookies";
|
|
19693
19935
|
var isCookies = (u) => hasProperty(u, TypeId14);
|
|
19694
19936
|
var CookieTypeId = "~effect/http/Cookies/Cookie";
|
|
@@ -20009,7 +20251,7 @@ var tryDecodeURIComponent = (str) => {
|
|
|
20009
20251
|
}
|
|
20010
20252
|
};
|
|
20011
20253
|
|
|
20012
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
20254
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/unstable/http/Headers.js
|
|
20013
20255
|
var TypeId15 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
|
|
20014
20256
|
var isHeaders = (u) => hasProperty(u, TypeId15);
|
|
20015
20257
|
var Proto5 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
|
|
@@ -20073,12 +20315,12 @@ var redact2 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
|
20073
20315
|
if (typeof key2 === "string") {
|
|
20074
20316
|
const k = key2.toLowerCase();
|
|
20075
20317
|
if (k in self) {
|
|
20076
|
-
out[k] =
|
|
20318
|
+
out[k] = make17(self[k]);
|
|
20077
20319
|
}
|
|
20078
20320
|
} else {
|
|
20079
20321
|
for (const name in self) {
|
|
20080
20322
|
if (name.search(key2) !== -1) {
|
|
20081
|
-
out[name] =
|
|
20323
|
+
out[name] = make17(self[name]);
|
|
20082
20324
|
}
|
|
20083
20325
|
}
|
|
20084
20326
|
}
|
|
@@ -20096,7 +20338,7 @@ var CurrentRedactedNames = /* @__PURE__ */ Reference("effect/Headers/CurrentReda
|
|
|
20096
20338
|
defaultValue: () => ["authorization", "cookie", "set-cookie", "x-api-key"]
|
|
20097
20339
|
});
|
|
20098
20340
|
|
|
20099
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
20341
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/unstable/http/UrlParams.js
|
|
20100
20342
|
var TypeId16 = "~effect/http/UrlParams";
|
|
20101
20343
|
var isUrlParams = (u) => hasProperty(u, TypeId16);
|
|
20102
20344
|
var Proto6 = {
|
|
@@ -20118,7 +20360,7 @@ var Proto6 = {
|
|
|
20118
20360
|
return array(this.params.flat());
|
|
20119
20361
|
}
|
|
20120
20362
|
};
|
|
20121
|
-
var
|
|
20363
|
+
var make18 = (params) => {
|
|
20122
20364
|
const self = Object.create(Proto6);
|
|
20123
20365
|
self.params = params;
|
|
20124
20366
|
return self;
|
|
@@ -20137,7 +20379,7 @@ var fromInput4 = (input) => {
|
|
|
20137
20379
|
out.push(parsed[i]);
|
|
20138
20380
|
}
|
|
20139
20381
|
}
|
|
20140
|
-
return
|
|
20382
|
+
return make18(out);
|
|
20141
20383
|
};
|
|
20142
20384
|
var fromInputNested = (input) => {
|
|
20143
20385
|
const entries3 = typeof input[Symbol.iterator] === "function" ? fromIterable(input) : Object.entries(input);
|
|
@@ -20181,7 +20423,7 @@ var toRecord2 = (self) => {
|
|
|
20181
20423
|
};
|
|
20182
20424
|
var toReadonlyRecord = toRecord2;
|
|
20183
20425
|
|
|
20184
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
20426
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/unstable/net/NetAddress.js
|
|
20185
20427
|
var TypeId17 = "~effect/net/NetAddress";
|
|
20186
20428
|
var getBytes = (self) => self.bytes;
|
|
20187
20429
|
var NetAddressError = class extends (/* @__PURE__ */ TaggedError2("NetAddressError")) {
|
|
@@ -20353,9 +20595,9 @@ var parseIpv6Segments = (input) => {
|
|
|
20353
20595
|
if (halves.length === 1 ? explicit !== 8 : explicit >= 8) {
|
|
20354
20596
|
return addressError(input, halves.length === 1 ? "expected eight segments" : "compression must replace at least one segment");
|
|
20355
20597
|
}
|
|
20356
|
-
const
|
|
20357
|
-
const parsedHead = head2.map(
|
|
20358
|
-
const parsedTail = tail.map(
|
|
20598
|
+
const parse3 = (part) => /^[0-9a-fA-F]{1,4}$/.test(part) ? Number.parseInt(part, 16) : void 0;
|
|
20599
|
+
const parsedHead = head2.map(parse3);
|
|
20600
|
+
const parsedTail = tail.map(parse3);
|
|
20359
20601
|
if (parsedHead.some((part) => part === void 0) || parsedTail.some((part) => part === void 0)) {
|
|
20360
20602
|
return addressError(input, "segments must contain one through four hexadecimal digits");
|
|
20361
20603
|
}
|
|
@@ -20382,6 +20624,11 @@ var ipv6ToSegments = (self) => {
|
|
|
20382
20624
|
};
|
|
20383
20625
|
var ipv6ToOctets = (self) => Array.from(getBytes(self));
|
|
20384
20626
|
var formatMacAddress = (self) => Array.from(getBytes(self), (byte) => byte.toString(16).padStart(2, "0")).join(":");
|
|
20627
|
+
var isMacBroadcast = (self) => getBytes(self).every((byte) => byte === 255);
|
|
20628
|
+
var isMacMulticast = (self) => (getBytes(self)[0] & 1) !== 0;
|
|
20629
|
+
var isMacUnicast = (self) => (getBytes(self)[0] & 1) === 0;
|
|
20630
|
+
var isMacLocallyAdministered = (self) => (getBytes(self)[0] & 2) !== 0;
|
|
20631
|
+
var isMacUniversallyAdministered = (self) => (getBytes(self)[0] & 2) === 0;
|
|
20385
20632
|
var formatIp = (self) => {
|
|
20386
20633
|
if (isIpv4Address(self)) return ipv4ToOctets(self).join(".");
|
|
20387
20634
|
const segments = ipv6ToSegments(self);
|
|
@@ -20407,6 +20654,38 @@ var formatIp = (self) => {
|
|
|
20407
20654
|
const tail = segments.slice(bestStart + bestLength).map((segment) => segment.toString(16)).join(":");
|
|
20408
20655
|
return `${head2}::${tail}`;
|
|
20409
20656
|
};
|
|
20657
|
+
var isUnspecified = (self) => getBytes(self).every((byte) => byte === 0);
|
|
20658
|
+
var isLoopback = (self) => {
|
|
20659
|
+
if (isIpv4Address(self)) return getBytes(self)[0] === 127;
|
|
20660
|
+
const bytes2 = getBytes(self);
|
|
20661
|
+
for (let index2 = 0; index2 < 15; index2++) {
|
|
20662
|
+
if (bytes2[index2] !== 0) return false;
|
|
20663
|
+
}
|
|
20664
|
+
return bytes2[15] === 1;
|
|
20665
|
+
};
|
|
20666
|
+
var isMulticast = (self) => {
|
|
20667
|
+
if (isMacAddress(self)) return isMacMulticast(self);
|
|
20668
|
+
if (isIpv4Address(self)) return getBytes(self)[0] >> 4 === 14;
|
|
20669
|
+
return getBytes(self)[0] === 255;
|
|
20670
|
+
};
|
|
20671
|
+
var isBroadcast = (self) => isMacAddress(self) ? isMacBroadcast(self) : getBytes(self).every((byte) => byte === 255);
|
|
20672
|
+
var isUnicast = (self) => {
|
|
20673
|
+
if (isMacAddress(self)) return isMacUnicast(self);
|
|
20674
|
+
return !isMulticast(self) && !isUnspecified(self) && (!isIpv4Address(self) || !isBroadcast(self));
|
|
20675
|
+
};
|
|
20676
|
+
var isLinkLocal = (self) => {
|
|
20677
|
+
if (isIpv4Address(self)) {
|
|
20678
|
+
const bytes3 = getBytes(self);
|
|
20679
|
+
return bytes3[0] === 169 && bytes3[1] === 254;
|
|
20680
|
+
}
|
|
20681
|
+
const bytes2 = getBytes(self);
|
|
20682
|
+
return bytes2[0] === 254 && (bytes2[1] & 192) === 128;
|
|
20683
|
+
};
|
|
20684
|
+
var isPrivate = (self) => {
|
|
20685
|
+
const bytes2 = getBytes(self);
|
|
20686
|
+
return bytes2[0] === 10 || bytes2[0] === 172 && (bytes2[1] & 240) === 16 || bytes2[0] === 192 && bytes2[1] === 168;
|
|
20687
|
+
};
|
|
20688
|
+
var isUniqueLocal = (self) => (getBytes(self)[0] & 254) === 252;
|
|
20410
20689
|
var isIpv4Mapped = (self) => {
|
|
20411
20690
|
const bytes2 = getBytes(self);
|
|
20412
20691
|
for (let index2 = 0; index2 < 10; index2++) {
|
|
@@ -20523,10 +20802,10 @@ var inetAddressFromString = (input) => {
|
|
|
20523
20802
|
}) : inetAddressV4(address, Number(portText));
|
|
20524
20803
|
});
|
|
20525
20804
|
};
|
|
20805
|
+
var formatHost = (self) => formatIp(self.address) + (isInetAddressV6(self) && self.scopeId !== 0 ? `%${self.scopeId}` : "");
|
|
20526
20806
|
var formatInet = (self) => {
|
|
20527
|
-
|
|
20528
|
-
|
|
20529
|
-
return `[${formatIp(self.address)}${scope2}]:${self.port}`;
|
|
20807
|
+
const host = formatHost(self);
|
|
20808
|
+
return isInetAddressV4(self) ? `${host}:${self.port}` : `[${host}]:${self.port}`;
|
|
20530
20809
|
};
|
|
20531
20810
|
var UnixPathProto = {
|
|
20532
20811
|
_tag: "UnixPathAddress",
|
|
@@ -20553,7 +20832,7 @@ var unixPathAddress = (path23) => {
|
|
|
20553
20832
|
return Object.freeze(self);
|
|
20554
20833
|
};
|
|
20555
20834
|
|
|
20556
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
20835
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/unstable/net/IpInterface.js
|
|
20557
20836
|
var TypeId18 = "~effect/net/IpInterface";
|
|
20558
20837
|
var isIpv4Interface = (u) => isIpInterface(u) && isIpv4Address(u.address);
|
|
20559
20838
|
var isIpv6Interface = (u) => isIpInterface(u) && isIpv6Address(u.address);
|
|
@@ -20581,7 +20860,7 @@ var interfaceError = (input, message) => fail2(new NetAddressError({
|
|
|
20581
20860
|
input,
|
|
20582
20861
|
message
|
|
20583
20862
|
}));
|
|
20584
|
-
var
|
|
20863
|
+
var make19 = (address, prefixLength) => {
|
|
20585
20864
|
const max4 = width(address);
|
|
20586
20865
|
if (!Number.isInteger(prefixLength) || prefixLength < 0 || prefixLength > max4) {
|
|
20587
20866
|
return interfaceError(address, `prefix length must be an integer from 0 through ${max4}`);
|
|
@@ -20612,12 +20891,12 @@ var parseAddressWithPrefix = (input, options) => {
|
|
|
20612
20891
|
prefixLength: Number(prefix)
|
|
20613
20892
|
});
|
|
20614
20893
|
};
|
|
20615
|
-
var ipv4FromString2 = (input, options) => flatMap2(parseAddressWithPrefix(input, options), (parts) => flatMap2(ipv4FromString(parts.address), (address) =>
|
|
20616
|
-
var ipv6FromString2 = (input, options) => flatMap2(parseAddressWithPrefix(input, options), (parts) => flatMap2(ipv6FromString(parts.address), (address) =>
|
|
20617
|
-
var
|
|
20894
|
+
var ipv4FromString2 = (input, options) => flatMap2(parseAddressWithPrefix(input, options), (parts) => flatMap2(ipv4FromString(parts.address), (address) => make19(address, parts.prefixLength ?? width(address))));
|
|
20895
|
+
var ipv6FromString2 = (input, options) => flatMap2(parseAddressWithPrefix(input, options), (parts) => flatMap2(ipv6FromString(parts.address), (address) => make19(address, parts.prefixLength ?? width(address))));
|
|
20896
|
+
var fromString3 = (input, options) => flatMap2(parseAddressWithPrefix(input, options), (parts) => flatMap2(ipFromString(parts.address), (address) => make19(address, parts.prefixLength ?? width(address))));
|
|
20618
20897
|
var format4 = (self) => `${formatIp(self.address)}/${self.prefixLength}`;
|
|
20619
20898
|
|
|
20620
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
20899
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/unstable/net/IpNetwork.js
|
|
20621
20900
|
var TypeId19 = "~effect/net/IpNetwork";
|
|
20622
20901
|
var isIpv4Network = (u) => isIpNetwork(u) && isIpv4Address(u.address);
|
|
20623
20902
|
var isIpv6Network = (u) => isIpNetwork(u) && isIpv6Address(u.address);
|
|
@@ -20658,8 +20937,8 @@ var maskBytes = (bytes2, prefixLength) => {
|
|
|
20658
20937
|
return 0;
|
|
20659
20938
|
});
|
|
20660
20939
|
};
|
|
20661
|
-
var
|
|
20662
|
-
return flatMap2(
|
|
20940
|
+
var make20 = (address, prefixLength) => {
|
|
20941
|
+
return flatMap2(make19(address, prefixLength), (value3) => {
|
|
20663
20942
|
const bytes2 = toBytes(address);
|
|
20664
20943
|
const masked = maskBytes(bytes2, prefixLength);
|
|
20665
20944
|
if (bytes2.some((byte, index2) => byte !== masked[index2])) {
|
|
@@ -20674,25 +20953,25 @@ var make21 = (address, prefixLength) => {
|
|
|
20674
20953
|
var ipv4FromString3 = (input) => {
|
|
20675
20954
|
return flatMap2(ipv4FromString2(input, {
|
|
20676
20955
|
prefix: "required"
|
|
20677
|
-
}), (value3) =>
|
|
20956
|
+
}), (value3) => make20(value3.address, value3.prefixLength));
|
|
20678
20957
|
};
|
|
20679
20958
|
var ipv6FromString3 = (input) => {
|
|
20680
20959
|
return flatMap2(ipv6FromString2(input, {
|
|
20681
20960
|
prefix: "required"
|
|
20682
|
-
}), (value3) =>
|
|
20961
|
+
}), (value3) => make20(value3.address, value3.prefixLength));
|
|
20683
20962
|
};
|
|
20684
|
-
var
|
|
20685
|
-
return flatMap2(
|
|
20963
|
+
var fromString4 = (input) => {
|
|
20964
|
+
return flatMap2(fromString3(input, {
|
|
20686
20965
|
prefix: "required"
|
|
20687
|
-
}), (value3) =>
|
|
20966
|
+
}), (value3) => make20(value3.address, value3.prefixLength));
|
|
20688
20967
|
};
|
|
20689
20968
|
var format5 = (self) => `${formatIp(self.address)}/${self.prefixLength}`;
|
|
20690
20969
|
|
|
20691
|
-
// ../../node_modules/.bun/effect@4.0.0-rc.
|
|
20970
|
+
// ../../node_modules/.bun/effect@4.0.0-rc.117/node_modules/effect/dist/Schema.js
|
|
20692
20971
|
var TypeId20 = TypeId12;
|
|
20693
20972
|
function declareConstructor() {
|
|
20694
20973
|
return (typeParameters, run2, annotations) => {
|
|
20695
|
-
return
|
|
20974
|
+
return make21(new Declaration(typeParameters.map(getAST), (typeParameters2) => run2(typeParameters2.map((ast) => make21(ast))), annotations));
|
|
20696
20975
|
};
|
|
20697
20976
|
}
|
|
20698
20977
|
function declare(is3, annotations) {
|
|
@@ -20861,29 +21140,29 @@ function encodeUnknownSync2(schema, options) {
|
|
|
20861
21140
|
};
|
|
20862
21141
|
}
|
|
20863
21142
|
var encodeSync2 = encodeUnknownSync2;
|
|
20864
|
-
var
|
|
21143
|
+
var make21 = make15;
|
|
20865
21144
|
function isSchema(u) {
|
|
20866
21145
|
return hasProperty(u, TypeId20) && u[TypeId20] === TypeId20;
|
|
20867
21146
|
}
|
|
20868
|
-
var optionalKey2 = /* @__PURE__ */ lambda((schema) =>
|
|
21147
|
+
var optionalKey2 = /* @__PURE__ */ lambda((schema) => make21(optionalKey(schema.ast), {
|
|
20869
21148
|
schema
|
|
20870
21149
|
}));
|
|
20871
21150
|
var requiredKey = /* @__PURE__ */ lambda((self) => self.schema);
|
|
20872
21151
|
var optional2 = /* @__PURE__ */ lambda((self) => {
|
|
20873
21152
|
const schema = UndefinedOr(self);
|
|
20874
|
-
return
|
|
21153
|
+
return make21(optional(self.ast), {
|
|
20875
21154
|
schema
|
|
20876
21155
|
});
|
|
20877
21156
|
});
|
|
20878
21157
|
var required = /* @__PURE__ */ lambda((self) => self.schema.members[0]);
|
|
20879
|
-
var mutableKey2 = /* @__PURE__ */ lambda((schema) =>
|
|
21158
|
+
var mutableKey2 = /* @__PURE__ */ lambda((schema) => make21(mutableKey(schema.ast), {
|
|
20880
21159
|
schema
|
|
20881
21160
|
}));
|
|
20882
21161
|
var readonlyKey = /* @__PURE__ */ lambda((self) => self.schema);
|
|
20883
|
-
var toType2 = /* @__PURE__ */ lambda((schema) =>
|
|
21162
|
+
var toType2 = /* @__PURE__ */ lambda((schema) => make21(toType(schema.ast), {
|
|
20884
21163
|
schema
|
|
20885
21164
|
}));
|
|
20886
|
-
var toEncoded2 = /* @__PURE__ */ lambda((schema) =>
|
|
21165
|
+
var toEncoded2 = /* @__PURE__ */ lambda((schema) => make21(toEncoded(schema.ast), {
|
|
20887
21166
|
schema
|
|
20888
21167
|
}));
|
|
20889
21168
|
var FlipTypeId = "~effect/Schema/flip";
|
|
@@ -20894,13 +21173,13 @@ function flip3(schema) {
|
|
|
20894
21173
|
if (isFlip$(schema)) {
|
|
20895
21174
|
return schema.schema.rebuild(flip2(schema.ast));
|
|
20896
21175
|
}
|
|
20897
|
-
return
|
|
21176
|
+
return make21(flip2(schema.ast), {
|
|
20898
21177
|
[FlipTypeId]: FlipTypeId,
|
|
20899
21178
|
schema
|
|
20900
21179
|
});
|
|
20901
21180
|
}
|
|
20902
21181
|
function Literal2(literal) {
|
|
20903
|
-
const out =
|
|
21182
|
+
const out = make21(new Literal(literal), {
|
|
20904
21183
|
literal,
|
|
20905
21184
|
transform(to) {
|
|
20906
21185
|
return out.pipe(decodeTo2(Literal2(to), {
|
|
@@ -20915,37 +21194,37 @@ function templateLiteralParts(parts) {
|
|
|
20915
21194
|
return parts.map((part) => isSchema(part) ? part.ast : new Literal(part));
|
|
20916
21195
|
}
|
|
20917
21196
|
function TemplateLiteral2(parts) {
|
|
20918
|
-
return
|
|
21197
|
+
return make21(new TemplateLiteral(templateLiteralParts(parts)), {
|
|
20919
21198
|
parts
|
|
20920
21199
|
});
|
|
20921
21200
|
}
|
|
20922
21201
|
function TemplateLiteralParser(parts) {
|
|
20923
|
-
return
|
|
21202
|
+
return make21(templateLiteralParser(templateLiteralParts(parts)), {
|
|
20924
21203
|
parts
|
|
20925
21204
|
});
|
|
20926
21205
|
}
|
|
20927
21206
|
function Enum2(enums) {
|
|
20928
|
-
return
|
|
21207
|
+
return make21(new Enum(Object.keys(enums).filter((key) => typeof enums[enums[key]] !== "number").map((key) => [key, enums[key]])), {
|
|
20929
21208
|
enums
|
|
20930
21209
|
});
|
|
20931
21210
|
}
|
|
20932
|
-
var Never2 = /* @__PURE__ */
|
|
20933
|
-
var Any2 = /* @__PURE__ */
|
|
20934
|
-
var Unknown2 = /* @__PURE__ */
|
|
20935
|
-
var Null2 = /* @__PURE__ */
|
|
20936
|
-
var Undefined2 = /* @__PURE__ */
|
|
20937
|
-
var String5 = /* @__PURE__ */
|
|
20938
|
-
var Number6 = /* @__PURE__ */
|
|
20939
|
-
var Boolean3 = /* @__PURE__ */
|
|
20940
|
-
var Symbol3 = /* @__PURE__ */
|
|
20941
|
-
var BigInt6 = /* @__PURE__ */
|
|
20942
|
-
var Void2 = /* @__PURE__ */
|
|
20943
|
-
var ObjectKeyword2 = /* @__PURE__ */
|
|
21211
|
+
var Never2 = /* @__PURE__ */ make21(never2);
|
|
21212
|
+
var Any2 = /* @__PURE__ */ make21(any);
|
|
21213
|
+
var Unknown2 = /* @__PURE__ */ make21(unknown);
|
|
21214
|
+
var Null2 = /* @__PURE__ */ make21(null_);
|
|
21215
|
+
var Undefined2 = /* @__PURE__ */ make21(undefined_2);
|
|
21216
|
+
var String5 = /* @__PURE__ */ make21(string2);
|
|
21217
|
+
var Number6 = /* @__PURE__ */ make21(number2);
|
|
21218
|
+
var Boolean3 = /* @__PURE__ */ make21(boolean);
|
|
21219
|
+
var Symbol3 = /* @__PURE__ */ make21(symbol3);
|
|
21220
|
+
var BigInt6 = /* @__PURE__ */ make21(bigInt);
|
|
21221
|
+
var Void2 = /* @__PURE__ */ make21(void_4);
|
|
21222
|
+
var ObjectKeyword2 = /* @__PURE__ */ make21(objectKeyword);
|
|
20944
21223
|
function UniqueSymbol2(symbol4) {
|
|
20945
|
-
return
|
|
21224
|
+
return make21(new UniqueSymbol(symbol4));
|
|
20946
21225
|
}
|
|
20947
21226
|
function makeStruct(ast, fields) {
|
|
20948
|
-
return
|
|
21227
|
+
return make21(ast, {
|
|
20949
21228
|
fields,
|
|
20950
21229
|
mapFields(f, options) {
|
|
20951
21230
|
const fields2 = f(this.fields);
|
|
@@ -21021,19 +21300,19 @@ function extendTo(fields, derive) {
|
|
|
21021
21300
|
};
|
|
21022
21301
|
}
|
|
21023
21302
|
function Record2(key, value3) {
|
|
21024
|
-
return
|
|
21303
|
+
return make21(record(key.ast, value3.ast), {
|
|
21025
21304
|
key,
|
|
21026
21305
|
value: value3
|
|
21027
21306
|
});
|
|
21028
21307
|
}
|
|
21029
21308
|
function StructWithRest(schema, records) {
|
|
21030
|
-
return
|
|
21309
|
+
return make21(structWithRest(schema.ast, records.map(getAST)), {
|
|
21031
21310
|
schema,
|
|
21032
21311
|
records
|
|
21033
21312
|
});
|
|
21034
21313
|
}
|
|
21035
21314
|
function makeTuple(ast, elements) {
|
|
21036
|
-
return
|
|
21315
|
+
return make21(ast, {
|
|
21037
21316
|
elements,
|
|
21038
21317
|
mapElements(f, options) {
|
|
21039
21318
|
const elements2 = f(this.elements);
|
|
@@ -21045,12 +21324,12 @@ function Tuple2(elements) {
|
|
|
21045
21324
|
return makeTuple(tuple(elements), elements);
|
|
21046
21325
|
}
|
|
21047
21326
|
function TupleWithRest(schema, rest) {
|
|
21048
|
-
return
|
|
21327
|
+
return make21(tupleWithRest(schema.ast, rest.map(getAST)), {
|
|
21049
21328
|
schema,
|
|
21050
21329
|
rest
|
|
21051
21330
|
});
|
|
21052
21331
|
}
|
|
21053
|
-
var ArraySchema = /* @__PURE__ */ lambda((schema) =>
|
|
21332
|
+
var ArraySchema = /* @__PURE__ */ lambda((schema) => make21(new Arrays(false, [], [schema.ast]), {
|
|
21054
21333
|
value: schema
|
|
21055
21334
|
}));
|
|
21056
21335
|
function withArrayLengthConstraints(self, minimum, maximum) {
|
|
@@ -21061,7 +21340,7 @@ function withArrayLengthConstraints(self, minimum, maximum) {
|
|
|
21061
21340
|
if (maximum !== void 0) return self.check(isMaxLength(maximum));
|
|
21062
21341
|
return self;
|
|
21063
21342
|
}
|
|
21064
|
-
var NonEmptyArray = /* @__PURE__ */ lambda((schema) =>
|
|
21343
|
+
var NonEmptyArray = /* @__PURE__ */ lambda((schema) => make21(new Arrays(false, [schema.ast], [schema.ast]), {
|
|
21065
21344
|
value: schema
|
|
21066
21345
|
}));
|
|
21067
21346
|
function ArrayEnsure(schema) {
|
|
@@ -21071,7 +21350,7 @@ function ArrayEnsure(schema) {
|
|
|
21071
21350
|
decode: (value3) => [value3],
|
|
21072
21351
|
encode: ([value3]) => value3
|
|
21073
21352
|
}))(schema);
|
|
21074
|
-
return
|
|
21353
|
+
return make21(Union2([one, many]).pipe(decodeTo2(to)).ast, {
|
|
21075
21354
|
from: Union2([schema, many]),
|
|
21076
21355
|
to
|
|
21077
21356
|
});
|
|
@@ -21079,11 +21358,11 @@ function ArrayEnsure(schema) {
|
|
|
21079
21358
|
function UniqueArray(item) {
|
|
21080
21359
|
return ArraySchema(item).check(isUnique());
|
|
21081
21360
|
}
|
|
21082
|
-
var mutable2 = /* @__PURE__ */ lambda((schema) =>
|
|
21361
|
+
var mutable2 = /* @__PURE__ */ lambda((schema) => make21(mutable(schema.ast), {
|
|
21083
21362
|
schema
|
|
21084
21363
|
}));
|
|
21085
21364
|
function makeUnion(ast, members) {
|
|
21086
|
-
return
|
|
21365
|
+
return make21(ast, {
|
|
21087
21366
|
members,
|
|
21088
21367
|
mapMembers(f, options) {
|
|
21089
21368
|
const members2 = f(this.members);
|
|
@@ -21096,7 +21375,7 @@ function Union2(members, options) {
|
|
|
21096
21375
|
}
|
|
21097
21376
|
function Literals(literals) {
|
|
21098
21377
|
const members = literals.map(Literal2);
|
|
21099
|
-
return
|
|
21378
|
+
return make21(union(members, void 0, void 0), {
|
|
21100
21379
|
literals,
|
|
21101
21380
|
members,
|
|
21102
21381
|
mapMembers(f) {
|
|
@@ -21114,18 +21393,18 @@ var NullOr = /* @__PURE__ */ lambda((self) => Union2([self, Null2]));
|
|
|
21114
21393
|
var UndefinedOr = /* @__PURE__ */ lambda((self) => Union2([self, Undefined2]));
|
|
21115
21394
|
var NullishOr = /* @__PURE__ */ lambda((self) => Union2([self, Null2, Undefined2]));
|
|
21116
21395
|
function suspend2(f) {
|
|
21117
|
-
return
|
|
21396
|
+
return make21(new Suspend(() => f().ast));
|
|
21118
21397
|
}
|
|
21119
21398
|
function check(...checks) {
|
|
21120
21399
|
return (self) => self.check(...checks);
|
|
21121
21400
|
}
|
|
21122
21401
|
function refine(refinement, annotations) {
|
|
21123
|
-
return (schema) =>
|
|
21402
|
+
return (schema) => make21(appendChecks(schema.ast, [makeFilterByGuard(refinement, annotations)]), {
|
|
21124
21403
|
schema
|
|
21125
21404
|
});
|
|
21126
21405
|
}
|
|
21127
21406
|
function brand2(identifier2) {
|
|
21128
|
-
return (schema) =>
|
|
21407
|
+
return (schema) => make21(brand(schema.ast, identifier2), {
|
|
21129
21408
|
schema,
|
|
21130
21409
|
identifier: identifier2
|
|
21131
21410
|
});
|
|
@@ -21136,12 +21415,12 @@ function fromBrand(identifier2, ctor) {
|
|
|
21136
21415
|
};
|
|
21137
21416
|
}
|
|
21138
21417
|
function middlewareDecoding2(decode2) {
|
|
21139
|
-
return (schema) =>
|
|
21418
|
+
return (schema) => make21(middlewareDecoding(schema.ast, new Middleware(decode2, identity)), {
|
|
21140
21419
|
schema
|
|
21141
21420
|
});
|
|
21142
21421
|
}
|
|
21143
21422
|
function middlewareEncoding2(encode2) {
|
|
21144
|
-
return (schema) =>
|
|
21423
|
+
return (schema) => make21(middlewareEncoding(schema.ast, new Middleware(identity, encode2)), {
|
|
21145
21424
|
schema
|
|
21146
21425
|
});
|
|
21147
21426
|
}
|
|
@@ -21159,7 +21438,7 @@ function catchEncodingWithContext(f) {
|
|
|
21159
21438
|
}
|
|
21160
21439
|
function decodeTo2(to, transformation) {
|
|
21161
21440
|
return (from) => {
|
|
21162
|
-
return
|
|
21441
|
+
return make21(decodeTo(from.ast, to.ast, transformation ? makeTransformation(transformation) : passthrough2()), {
|
|
21163
21442
|
from,
|
|
21164
21443
|
to
|
|
21165
21444
|
});
|
|
@@ -21193,7 +21472,7 @@ function encode(transformation) {
|
|
|
21193
21472
|
};
|
|
21194
21473
|
}
|
|
21195
21474
|
function withConstructorDefault2(defaultValue) {
|
|
21196
|
-
return (schema) =>
|
|
21475
|
+
return (schema) => make21(withConstructorDefault(schema.ast, defaultValue), {
|
|
21197
21476
|
schema
|
|
21198
21477
|
});
|
|
21199
21478
|
}
|
|
@@ -21329,7 +21608,7 @@ function TaggedUnion(casesByTag) {
|
|
|
21329
21608
|
match: match7,
|
|
21330
21609
|
matchOrElse
|
|
21331
21610
|
} = toTaggedUnion("_tag")(union5);
|
|
21332
|
-
return
|
|
21611
|
+
return make21(union5.ast, {
|
|
21333
21612
|
cases,
|
|
21334
21613
|
isAnyOf,
|
|
21335
21614
|
guards,
|
|
@@ -21345,7 +21624,7 @@ function instanceOf(constructor, annotations) {
|
|
|
21345
21624
|
}
|
|
21346
21625
|
function link() {
|
|
21347
21626
|
return (encodeTo2, transformation) => {
|
|
21348
|
-
return new Link(encodeTo2.ast,
|
|
21627
|
+
return new Link(encodeTo2.ast, makeTransformation(transformation));
|
|
21349
21628
|
};
|
|
21350
21629
|
}
|
|
21351
21630
|
var makeFilter2 = makeFilter;
|
|
@@ -21678,7 +21957,7 @@ function isUncapitalized(annotations) {
|
|
|
21678
21957
|
...annotations
|
|
21679
21958
|
});
|
|
21680
21959
|
}
|
|
21681
|
-
var Finite = /* @__PURE__ */
|
|
21960
|
+
var Finite = /* @__PURE__ */ make21(finite);
|
|
21682
21961
|
var isFinite3 = isFinite2;
|
|
21683
21962
|
function makeIsGreaterThan(options) {
|
|
21684
21963
|
const gt = isGreaterThan(options.order);
|
|
@@ -22543,7 +22822,7 @@ function ReadonlyMap(key, value3) {
|
|
|
22543
22822
|
encode: (map11) => [...map11.entries()]
|
|
22544
22823
|
}))
|
|
22545
22824
|
});
|
|
22546
|
-
return
|
|
22825
|
+
return make21(schema.ast, {
|
|
22547
22826
|
key,
|
|
22548
22827
|
value: value3
|
|
22549
22828
|
});
|
|
@@ -22577,7 +22856,7 @@ function ReadonlySet(value3) {
|
|
|
22577
22856
|
encode: (set3) => [...set3.values()]
|
|
22578
22857
|
}))
|
|
22579
22858
|
});
|
|
22580
|
-
return
|
|
22859
|
+
return make21(schema.ast, {
|
|
22581
22860
|
value: value3
|
|
22582
22861
|
});
|
|
22583
22862
|
}
|
|
@@ -22762,7 +23041,7 @@ var NumberFromString = /* @__PURE__ */ String5.annotate({
|
|
|
22762
23041
|
var FiniteFromString = /* @__PURE__ */ String5.annotate({
|
|
22763
23042
|
expected: "a string that will be decoded as a finite number"
|
|
22764
23043
|
}).pipe(/* @__PURE__ */ decodeTo2(Finite, numberFromString));
|
|
22765
|
-
var BigIntFromString = /* @__PURE__ */
|
|
23044
|
+
var BigIntFromString = /* @__PURE__ */ make21(bigIntString).pipe(/* @__PURE__ */ decodeTo2(BigInt6, bigintFromString));
|
|
22766
23045
|
var Trimmed = /* @__PURE__ */ String5.check(/* @__PURE__ */ isTrimmed());
|
|
22767
23046
|
var Trim = /* @__PURE__ */ String5.annotate({
|
|
22768
23047
|
expected: "a string that will be decoded as a trimmed string"
|
|
@@ -22854,48 +23133,6 @@ var isBetweenBigDecimal = /* @__PURE__ */ makeIsBetween({
|
|
|
22854
23133
|
var BigDecimalString = /* @__PURE__ */ String5.annotate({
|
|
22855
23134
|
expected: "a string that will be decoded as a BigDecimal"
|
|
22856
23135
|
});
|
|
22857
|
-
var arbitraryBigDecimalMaxScale = 20;
|
|
22858
|
-
function bigIntArbitrarySchema(minimum, maximum) {
|
|
22859
|
-
if (minimum !== void 0 && maximum !== void 0) {
|
|
22860
|
-
return BigInt6.check(isBetweenBigInt({
|
|
22861
|
-
minimum,
|
|
22862
|
-
maximum
|
|
22863
|
-
}));
|
|
22864
|
-
}
|
|
22865
|
-
if (minimum !== void 0) return BigInt6.check(isGreaterThanOrEqualToBigInt(minimum));
|
|
22866
|
-
if (maximum !== void 0) return BigInt6.check(isLessThanOrEqualToBigInt(maximum));
|
|
22867
|
-
return BigInt6;
|
|
22868
|
-
}
|
|
22869
|
-
function bigDecimalValueAtScale(value3, scale) {
|
|
22870
|
-
return value3.value * globalThis.BigInt(10) ** globalThis.BigInt(scale - value3.scale);
|
|
22871
|
-
}
|
|
22872
|
-
function bigDecimalArbitrarySchema(constraint) {
|
|
22873
|
-
if (constraint?.minimum === void 0 && constraint?.maximum === void 0) {
|
|
22874
|
-
return Struct3({
|
|
22875
|
-
value: BigInt6,
|
|
22876
|
-
scale: Int.check(isBetween2({
|
|
22877
|
-
minimum: 0,
|
|
22878
|
-
maximum: arbitraryBigDecimalMaxScale
|
|
22879
|
-
}))
|
|
22880
|
-
});
|
|
22881
|
-
}
|
|
22882
|
-
const scale = Math.max(arbitraryBigDecimalMaxScale, constraint.minimum?.scale ?? 0, constraint.maximum?.scale ?? 0, constraint.exclusiveMinimum === true && constraint.minimum !== void 0 ? constraint.minimum.scale + 1 : 0, constraint.exclusiveMaximum === true && constraint.maximum !== void 0 ? constraint.maximum.scale + 1 : 0);
|
|
22883
|
-
const minimum = constraint.minimum === void 0 ? void 0 : bigDecimalValueAtScale(constraint.minimum, scale) + (constraint.exclusiveMinimum === true ? globalThis.BigInt(1) : globalThis.BigInt(0));
|
|
22884
|
-
const maximum = constraint.maximum === void 0 ? void 0 : bigDecimalValueAtScale(constraint.maximum, scale) - (constraint.exclusiveMaximum === true ? globalThis.BigInt(1) : globalThis.BigInt(0));
|
|
22885
|
-
if (minimum !== void 0 && maximum !== void 0 && minimum > maximum) {
|
|
22886
|
-
return Struct3({
|
|
22887
|
-
value: BigInt6,
|
|
22888
|
-
scale: Int.check(isBetween2({
|
|
22889
|
-
minimum: 0,
|
|
22890
|
-
maximum: arbitraryBigDecimalMaxScale
|
|
22891
|
-
}))
|
|
22892
|
-
});
|
|
22893
|
-
}
|
|
22894
|
-
return Struct3({
|
|
22895
|
-
value: bigIntArbitrarySchema(minimum, maximum),
|
|
22896
|
-
scale: Literal2(scale)
|
|
22897
|
-
});
|
|
22898
|
-
}
|
|
22899
23136
|
var BigDecimal = /* @__PURE__ */ declare(isBigDecimal, {
|
|
22900
23137
|
representation: {
|
|
22901
23138
|
id: "effect/schema/BigDecimal",
|
|
@@ -22907,12 +23144,6 @@ var BigDecimal = /* @__PURE__ */ declare(isBigDecimal, {
|
|
|
22907
23144
|
importDeclarations: [`import * as BigDecimal from "effect/BigDecimal"`]
|
|
22908
23145
|
}),
|
|
22909
23146
|
expected: "BigDecimal",
|
|
22910
|
-
toCodecArbitrary: ({
|
|
22911
|
-
constraint
|
|
22912
|
-
}) => linkDecoding()(bigDecimalArbitrarySchema(constraint), transform(({
|
|
22913
|
-
scale,
|
|
22914
|
-
value: value3
|
|
22915
|
-
}) => make5(value3, scale))),
|
|
22916
23147
|
toCodecJson: () => link()(BigDecimalString, bigDecimalFromString),
|
|
22917
23148
|
toFormatter: () => (bd) => format2(bd)
|
|
22918
23149
|
});
|
|
@@ -22992,10 +23223,28 @@ function CauseReason(error, defect) {
|
|
|
22992
23223
|
return makeInterruptReason2(e.fiberId);
|
|
22993
23224
|
}
|
|
22994
23225
|
},
|
|
22995
|
-
encode:
|
|
23226
|
+
encode: (reason) => {
|
|
23227
|
+
switch (reason._tag) {
|
|
23228
|
+
case "Fail":
|
|
23229
|
+
return {
|
|
23230
|
+
_tag: "Fail",
|
|
23231
|
+
error: reason.error
|
|
23232
|
+
};
|
|
23233
|
+
case "Die":
|
|
23234
|
+
return {
|
|
23235
|
+
_tag: "Die",
|
|
23236
|
+
defect: reason.defect
|
|
23237
|
+
};
|
|
23238
|
+
case "Interrupt":
|
|
23239
|
+
return {
|
|
23240
|
+
_tag: "Interrupt",
|
|
23241
|
+
fiberId: reason.fiberId
|
|
23242
|
+
};
|
|
23243
|
+
}
|
|
23244
|
+
}
|
|
22996
23245
|
}))
|
|
22997
23246
|
});
|
|
22998
|
-
return
|
|
23247
|
+
return make21(schema.ast, {
|
|
22999
23248
|
error,
|
|
23000
23249
|
defect
|
|
23001
23250
|
});
|
|
@@ -23032,7 +23281,7 @@ function Cause(error, defect) {
|
|
|
23032
23281
|
}) => failures
|
|
23033
23282
|
}))
|
|
23034
23283
|
});
|
|
23035
|
-
return
|
|
23284
|
+
return make21(schema.ast, {
|
|
23036
23285
|
error,
|
|
23037
23286
|
defect
|
|
23038
23287
|
});
|
|
@@ -23074,7 +23323,7 @@ function Chunk(value3) {
|
|
|
23074
23323
|
}) => chunkLink(withArrayLengthConstraints(ArraySchema(value4), constraint?.minLength, constraint?.maxLength)),
|
|
23075
23324
|
toEquivalence: ([value4]) => makeEquivalence4(value4)
|
|
23076
23325
|
});
|
|
23077
|
-
return
|
|
23326
|
+
return make21(schema.ast, {
|
|
23078
23327
|
value: value3
|
|
23079
23328
|
});
|
|
23080
23329
|
}
|
|
@@ -23273,9 +23522,9 @@ var DateTimeZoned = /* @__PURE__ */ declare((u) => isDateTime2(u) && isZoned2(u)
|
|
|
23273
23522
|
toEquivalence: () => Equivalence4
|
|
23274
23523
|
});
|
|
23275
23524
|
var DateTimeZonedFromString = /* @__PURE__ */ DateTimeZonedString.pipe(/* @__PURE__ */ decodeTo2(DateTimeZoned, dateTimeZonedFromString));
|
|
23276
|
-
var netAddressFromString = (declaration,
|
|
23525
|
+
var netAddressFromString = (declaration, parse3, encode2, identifier2) => String5.pipe(decodeTo2(declaration, transformEffect2({
|
|
23277
23526
|
decode: (input, options) => {
|
|
23278
|
-
const result2 =
|
|
23527
|
+
const result2 = parse3(input);
|
|
23279
23528
|
return isSuccess2(result2) ? succeed5(result2.success) : fail5(new InvalidValue({
|
|
23280
23529
|
message: result2.failure.message
|
|
23281
23530
|
}, input, options));
|
|
@@ -23300,6 +23549,37 @@ var IpAddress = /* @__PURE__ */ declare(isIpAddress, {
|
|
|
23300
23549
|
identifier: "IpAddress"
|
|
23301
23550
|
});
|
|
23302
23551
|
var IpAddressFromString = /* @__PURE__ */ netAddressFromString(IpAddress, ipFromString, formatIp, "IpAddressFromString");
|
|
23552
|
+
var netAddressRefinement = (schema, guard, expected, identifier2) => refine(guard, {
|
|
23553
|
+
expected
|
|
23554
|
+
})(schema).annotate({
|
|
23555
|
+
identifier: identifier2
|
|
23556
|
+
});
|
|
23557
|
+
var IpMulticastAddress = /* @__PURE__ */ netAddressRefinement(IpAddress, isMulticast, "a multicast address", "IpMulticastAddress");
|
|
23558
|
+
var IpMulticastAddressFromString = /* @__PURE__ */ netAddressRefinement(IpAddressFromString, isMulticast, "a multicast address", "IpMulticastAddressFromString");
|
|
23559
|
+
var MacMulticastAddress = /* @__PURE__ */ netAddressRefinement(MacAddress, isMulticast, "a multicast address", "MacMulticastAddress");
|
|
23560
|
+
var MacMulticastAddressFromString = /* @__PURE__ */ netAddressRefinement(MacAddressFromString, isMulticast, "a multicast address", "MacMulticastAddressFromString");
|
|
23561
|
+
var IpUnicastAddress = /* @__PURE__ */ netAddressRefinement(IpAddress, isUnicast, "a unicast address", "IpUnicastAddress");
|
|
23562
|
+
var IpUnicastAddressFromString = /* @__PURE__ */ netAddressRefinement(IpAddressFromString, isUnicast, "a unicast address", "IpUnicastAddressFromString");
|
|
23563
|
+
var MacUnicastAddress = /* @__PURE__ */ netAddressRefinement(MacAddress, isMacUnicast, "a unicast address", "MacUnicastAddress");
|
|
23564
|
+
var MacUnicastAddressFromString = /* @__PURE__ */ netAddressRefinement(MacAddressFromString, isMacUnicast, "a unicast address", "MacUnicastAddressFromString");
|
|
23565
|
+
var Ipv4BroadcastAddress = /* @__PURE__ */ netAddressRefinement(Ipv4Address, isBroadcast, "a broadcast address", "Ipv4BroadcastAddress");
|
|
23566
|
+
var Ipv4BroadcastAddressFromString = /* @__PURE__ */ netAddressRefinement(Ipv4AddressFromString, isBroadcast, "a broadcast address", "Ipv4BroadcastAddressFromString");
|
|
23567
|
+
var MacBroadcastAddress = /* @__PURE__ */ netAddressRefinement(MacAddress, isMacBroadcast, "a broadcast address", "MacBroadcastAddress");
|
|
23568
|
+
var MacBroadcastAddressFromString = /* @__PURE__ */ netAddressRefinement(MacAddressFromString, isMacBroadcast, "a broadcast address", "MacBroadcastAddressFromString");
|
|
23569
|
+
var IpLoopbackAddress = /* @__PURE__ */ netAddressRefinement(IpAddress, isLoopback, "a loopback address", "IpLoopbackAddress");
|
|
23570
|
+
var IpLoopbackAddressFromString = /* @__PURE__ */ netAddressRefinement(IpAddressFromString, isLoopback, "a loopback address", "IpLoopbackAddressFromString");
|
|
23571
|
+
var IpLinkLocalAddress = /* @__PURE__ */ netAddressRefinement(IpAddress, isLinkLocal, "a link-local address", "IpLinkLocalAddress");
|
|
23572
|
+
var IpLinkLocalAddressFromString = /* @__PURE__ */ netAddressRefinement(IpAddressFromString, isLinkLocal, "a link-local address", "IpLinkLocalAddressFromString");
|
|
23573
|
+
var IpUnspecifiedAddress = /* @__PURE__ */ netAddressRefinement(IpAddress, isUnspecified, "an unspecified address", "IpUnspecifiedAddress");
|
|
23574
|
+
var IpUnspecifiedAddressFromString = /* @__PURE__ */ netAddressRefinement(IpAddressFromString, isUnspecified, "an unspecified address", "IpUnspecifiedAddressFromString");
|
|
23575
|
+
var Ipv4PrivateAddress = /* @__PURE__ */ netAddressRefinement(Ipv4Address, isPrivate, "a private address", "Ipv4PrivateAddress");
|
|
23576
|
+
var Ipv4PrivateAddressFromString = /* @__PURE__ */ netAddressRefinement(Ipv4AddressFromString, isPrivate, "a private address", "Ipv4PrivateAddressFromString");
|
|
23577
|
+
var Ipv6UniqueLocalAddress = /* @__PURE__ */ netAddressRefinement(Ipv6Address, isUniqueLocal, "a unique-local address", "Ipv6UniqueLocalAddress");
|
|
23578
|
+
var Ipv6UniqueLocalAddressFromString = /* @__PURE__ */ netAddressRefinement(Ipv6AddressFromString, isUniqueLocal, "a unique-local address", "Ipv6UniqueLocalAddressFromString");
|
|
23579
|
+
var MacLocallyAdministeredAddress = /* @__PURE__ */ netAddressRefinement(MacAddress, isMacLocallyAdministered, "a locally administered address", "MacLocallyAdministeredAddress");
|
|
23580
|
+
var MacLocallyAdministeredAddressFromString = /* @__PURE__ */ netAddressRefinement(MacAddressFromString, isMacLocallyAdministered, "a locally administered address", "MacLocallyAdministeredAddressFromString");
|
|
23581
|
+
var MacUniversallyAdministeredAddress = /* @__PURE__ */ netAddressRefinement(MacAddress, isMacUniversallyAdministered, "a universally administered address", "MacUniversallyAdministeredAddress");
|
|
23582
|
+
var MacUniversallyAdministeredAddressFromString = /* @__PURE__ */ netAddressRefinement(MacAddressFromString, isMacUniversallyAdministered, "a universally administered address", "MacUniversallyAdministeredAddressFromString");
|
|
23303
23583
|
var Ipv4Interface = /* @__PURE__ */ declare(isIpv4Interface, {
|
|
23304
23584
|
identifier: "Ipv4Interface"
|
|
23305
23585
|
});
|
|
@@ -23311,7 +23591,7 @@ var Ipv6InterfaceFromString = /* @__PURE__ */ netAddressFromString(Ipv6Interface
|
|
|
23311
23591
|
var IpInterface = /* @__PURE__ */ declare(isIpInterface, {
|
|
23312
23592
|
identifier: "IpInterface"
|
|
23313
23593
|
});
|
|
23314
|
-
var IpInterfaceFromString = /* @__PURE__ */ netAddressFromString(IpInterface,
|
|
23594
|
+
var IpInterfaceFromString = /* @__PURE__ */ netAddressFromString(IpInterface, fromString3, format4, "IpInterfaceFromString");
|
|
23315
23595
|
var Ipv4Network = /* @__PURE__ */ declare(isIpv4Network, {
|
|
23316
23596
|
identifier: "Ipv4Network"
|
|
23317
23597
|
});
|
|
@@ -23323,7 +23603,7 @@ var Ipv6NetworkFromString = /* @__PURE__ */ netAddressFromString(Ipv6Network, ip
|
|
|
23323
23603
|
var IpNetwork = /* @__PURE__ */ declare(isIpNetwork, {
|
|
23324
23604
|
identifier: "IpNetwork"
|
|
23325
23605
|
});
|
|
23326
|
-
var IpNetworkFromString = /* @__PURE__ */ netAddressFromString(IpNetwork,
|
|
23606
|
+
var IpNetworkFromString = /* @__PURE__ */ netAddressFromString(IpNetwork, fromString4, format5, "IpNetworkFromString");
|
|
23327
23607
|
var InetAddressV4 = /* @__PURE__ */ declare(isInetAddressV4, {
|
|
23328
23608
|
identifier: "InetAddressV4"
|
|
23329
23609
|
});
|
|
@@ -23482,7 +23762,7 @@ function Exit(value3, error, defect) {
|
|
|
23482
23762
|
}
|
|
23483
23763
|
}))
|
|
23484
23764
|
});
|
|
23485
|
-
return
|
|
23765
|
+
return make21(schema.ast, {
|
|
23486
23766
|
value: value3,
|
|
23487
23767
|
error,
|
|
23488
23768
|
defect
|
|
@@ -23620,7 +23900,7 @@ function Graph(type, node, edge) {
|
|
|
23620
23900
|
}) => graphToArbitrary(type, node2, edge2),
|
|
23621
23901
|
toEquivalence: ([node2, edge2]) => graphToEquivalence(node2, edge2)
|
|
23622
23902
|
});
|
|
23623
|
-
return
|
|
23903
|
+
return make21(schema.ast, {
|
|
23624
23904
|
type,
|
|
23625
23905
|
node,
|
|
23626
23906
|
edge
|
|
@@ -23664,7 +23944,7 @@ function HashMap(key, value3) {
|
|
|
23664
23944
|
}) => hashMapLink(withArrayLengthConstraints(ArraySchema(Tuple2([key2, value4])).check(isUniqueKey()), constraint?.minSize, constraint?.maxSize)),
|
|
23665
23945
|
toEquivalence: ([key2, value4]) => makeCompareMap(key2, value4)
|
|
23666
23946
|
});
|
|
23667
|
-
return
|
|
23947
|
+
return make21(schema.ast, {
|
|
23668
23948
|
key,
|
|
23669
23949
|
value: value3
|
|
23670
23950
|
});
|
|
@@ -23706,7 +23986,7 @@ function HashSet(value3) {
|
|
|
23706
23986
|
}) => hashSetLink(withArrayLengthConstraints(ArraySchema(value4).check(isUnique()), constraint?.minSize, constraint?.maxSize)),
|
|
23707
23987
|
toEquivalence: ([value4]) => makeCompareSet(value4)
|
|
23708
23988
|
});
|
|
23709
|
-
return
|
|
23989
|
+
return make21(schema.ast, {
|
|
23710
23990
|
value: value3
|
|
23711
23991
|
});
|
|
23712
23992
|
}
|
|
@@ -23750,7 +24030,7 @@ function Option(value3) {
|
|
|
23750
24030
|
}
|
|
23751
24031
|
}))
|
|
23752
24032
|
});
|
|
23753
|
-
return
|
|
24033
|
+
return make21(schema.ast, {
|
|
23754
24034
|
value: value3
|
|
23755
24035
|
});
|
|
23756
24036
|
}
|
|
@@ -23831,7 +24111,7 @@ var UrlParams = /* @__PURE__ */ declare(isUrlParams, {
|
|
|
23831
24111
|
expected: "UrlParams",
|
|
23832
24112
|
toEquivalence: () => Equivalence7,
|
|
23833
24113
|
toCodec: () => link()(ArraySchema(Tuple2([String5, String5])), transform2({
|
|
23834
|
-
decode:
|
|
24114
|
+
decode: make18,
|
|
23835
24115
|
encode: (self) => self.params
|
|
23836
24116
|
}))
|
|
23837
24117
|
});
|
|
@@ -23840,7 +24120,7 @@ var JsonFromUrlParamsField = (field, options) => UrlParams.pipe(decodeTo2(fromJs
|
|
|
23840
24120
|
onNone: () => fail5(new Pointer([field], new MissingKey(void 0))),
|
|
23841
24121
|
onSome: succeed5
|
|
23842
24122
|
}),
|
|
23843
|
-
encode: (value3) => succeed5(
|
|
24123
|
+
encode: (value3) => succeed5(make18([[field, value3]]))
|
|
23844
24124
|
})));
|
|
23845
24125
|
var RecordFromUrlParams = /* @__PURE__ */ UrlParams.pipe(/* @__PURE__ */ decodeTo2(/* @__PURE__ */ Record2(String5, /* @__PURE__ */ Union2([String5, /* @__PURE__ */ NonEmptyArray(String5)])), /* @__PURE__ */ transform2({
|
|
23846
24126
|
decode: toReadonlyRecord,
|
|
@@ -23876,7 +24156,9 @@ function Redacted(value3, options) {
|
|
|
23876
24156
|
if (isRedacted(input)) {
|
|
23877
24157
|
const label2 = decodeLabel !== void 0 ? mapErrorEager2(decodeLabel(input.label, poptions), (issue) => new Pointer(["label"], issue)) : void_3;
|
|
23878
24158
|
return flatMapEager2(label2, () => mapBothEager2(decodeUnknownEffect(value4)(value2(input), poptions), {
|
|
23879
|
-
onSuccess: () =>
|
|
24159
|
+
onSuccess: (value5) => make17(value5, {
|
|
24160
|
+
label: input.label
|
|
24161
|
+
}),
|
|
23880
24162
|
onFailure: () => {
|
|
23881
24163
|
return new Composite(ast, [new Pointer(["value"], new InvalidValue(void 0, input, poptions))], input, poptions);
|
|
23882
24164
|
}
|
|
@@ -23897,14 +24179,14 @@ function Redacted(value3, options) {
|
|
|
23897
24179
|
}),
|
|
23898
24180
|
expected: "Redacted",
|
|
23899
24181
|
toCodecJson: ([value4]) => link()(value4, {
|
|
23900
|
-
decode: transform((e) =>
|
|
24182
|
+
decode: transform((e) => make17(e, {
|
|
23901
24183
|
label
|
|
23902
24184
|
})),
|
|
23903
24185
|
encode: disallowJsonEncode ? forbidden((oe) => "Cannot serialize Redacted" + (isSome2(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform(value2)
|
|
23904
24186
|
}),
|
|
23905
24187
|
toEquivalence: ([value4]) => makeEquivalence6(value4)
|
|
23906
24188
|
});
|
|
23907
|
-
return
|
|
24189
|
+
return make21(schema.ast, {
|
|
23908
24190
|
value: value3
|
|
23909
24191
|
});
|
|
23910
24192
|
}
|
|
@@ -23913,7 +24195,7 @@ function RedactedFromValue(value3, options) {
|
|
|
23913
24195
|
label: options?.label,
|
|
23914
24196
|
disallowJsonEncode: options?.disallowEncode
|
|
23915
24197
|
}), {
|
|
23916
|
-
decode: transform((t) =>
|
|
24198
|
+
decode: transform((t) => make17(t, {
|
|
23917
24199
|
label: options?.label
|
|
23918
24200
|
})),
|
|
23919
24201
|
encode: options?.disallowEncode ? forbidden((oe) => "Cannot encode Redacted" + (isSome2(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform(value2)
|
|
@@ -23966,7 +24248,7 @@ function Result(success, failure) {
|
|
|
23966
24248
|
}
|
|
23967
24249
|
}))
|
|
23968
24250
|
});
|
|
23969
|
-
return
|
|
24251
|
+
return make21(schema.ast, {
|
|
23970
24252
|
success,
|
|
23971
24253
|
failure
|
|
23972
24254
|
});
|
|
@@ -24007,7 +24289,7 @@ function makeClass(Inherited, identifier2, struct2, annotations, proto) {
|
|
|
24007
24289
|
return getClassSchema(this).rebuild(ast);
|
|
24008
24290
|
}
|
|
24009
24291
|
static make(input, options) {
|
|
24010
|
-
return
|
|
24292
|
+
return make14(getClassSchema(this))(input ?? {}, options);
|
|
24011
24293
|
}
|
|
24012
24294
|
static makeOption(input, options) {
|
|
24013
24295
|
return makeOption(getClassSchema(this))(input ?? {}, options);
|
|
@@ -24066,7 +24348,7 @@ function getClassSchemaFactory(from, identifier2, annotations) {
|
|
|
24066
24348
|
const ClassTypeId = getClassTypeId(identifier2);
|
|
24067
24349
|
const isClassValue = (input) => input instanceof self || hasProperty(input, ClassTypeId);
|
|
24068
24350
|
const transformation = getClassTransformation(self);
|
|
24069
|
-
const to =
|
|
24351
|
+
const to = make21(new Declaration([from.ast], () => (input, ast, options) => {
|
|
24070
24352
|
return isClassValue(input) ? succeed5(input) : fail5(new InvalidType(ast, input, options));
|
|
24071
24353
|
}, {
|
|
24072
24354
|
identifier: identifier2,
|
|
@@ -24166,8 +24448,8 @@ function toIsoFocus2(schema) {
|
|
|
24166
24448
|
}
|
|
24167
24449
|
function overrideToCodecIso(to, transformation) {
|
|
24168
24450
|
return (schema) => {
|
|
24169
|
-
return
|
|
24170
|
-
toCodecIso: () => new Link(to.ast,
|
|
24451
|
+
return make21(annotate(schema.ast, {
|
|
24452
|
+
toCodecIso: () => new Link(to.ast, makeTransformation(transformation))
|
|
24171
24453
|
}), {
|
|
24172
24454
|
schema
|
|
24173
24455
|
});
|
|
@@ -24181,7 +24463,7 @@ function Tree(node) {
|
|
|
24181
24463
|
const Tree2 = Union2([node, ArraySchema(Tree$ref), Record2(String5, Tree$ref)]);
|
|
24182
24464
|
return Tree2;
|
|
24183
24465
|
}
|
|
24184
|
-
var Json2 = /* @__PURE__ */
|
|
24466
|
+
var Json2 = /* @__PURE__ */ make21(/* @__PURE__ */ annotate(Json, {
|
|
24185
24467
|
toCode: () => ({
|
|
24186
24468
|
runtime: "Schema.Json",
|
|
24187
24469
|
Type: "Schema.Json"
|
|
@@ -24194,7 +24476,7 @@ var JsonError = /* @__PURE__ */ Struct3({
|
|
|
24194
24476
|
stack: /* @__PURE__ */ optionalKey2(String5),
|
|
24195
24477
|
cause: /* @__PURE__ */ optionalKey2(Json2)
|
|
24196
24478
|
});
|
|
24197
|
-
var MutableJson2 = /* @__PURE__ */
|
|
24479
|
+
var MutableJson2 = /* @__PURE__ */ make21(/* @__PURE__ */ annotate(MutableJson, {
|
|
24198
24480
|
toCode: () => ({
|
|
24199
24481
|
runtime: "Schema.MutableJson",
|
|
24200
24482
|
Type: "Schema.MutableJson"
|
|
@@ -24383,6 +24665,9 @@ var RPC_METHODS = {
|
|
|
24383
24665
|
officialCodexSetAutoControl: "officialCodex.setAutoControl",
|
|
24384
24666
|
telegramBridgeGetStatus: "telegramBridge.getStatus",
|
|
24385
24667
|
telegramBridgeTestToken: "telegramBridge.testToken",
|
|
24668
|
+
computerUseGetStatus: "computerUse.getStatus",
|
|
24669
|
+
computerUseSetHarness: "computerUse.setHarness",
|
|
24670
|
+
computerUseEnableBrowser: "computerUse.enableBrowser",
|
|
24386
24671
|
codexConfigGet: "codexConfig.get",
|
|
24387
24672
|
codexConfigSaveRaw: "codexConfig.saveRaw",
|
|
24388
24673
|
codexConfigUpdate: "codexConfig.update",
|
|
@@ -24654,6 +24939,18 @@ var DesktopRpcRequestBody = Schema_exports.Union([
|
|
|
24654
24939
|
RPC_METHODS.telegramBridgeTestToken,
|
|
24655
24940
|
Schema_exports.Struct({ token: Schema_exports.Union([Schema_exports.String, Schema_exports.Null]) })
|
|
24656
24941
|
),
|
|
24942
|
+
tagRequestBody(
|
|
24943
|
+
RPC_METHODS.computerUseGetStatus,
|
|
24944
|
+
Schema_exports.Struct({ probe: Schema_exports.Boolean })
|
|
24945
|
+
),
|
|
24946
|
+
tagRequestBody(
|
|
24947
|
+
RPC_METHODS.computerUseSetHarness,
|
|
24948
|
+
Schema_exports.Struct({
|
|
24949
|
+
harness: Schema_exports.Union([Schema_exports.Literal("claude"), Schema_exports.Literal("omp")]),
|
|
24950
|
+
enabled: Schema_exports.Boolean
|
|
24951
|
+
})
|
|
24952
|
+
),
|
|
24953
|
+
tagRequestBody(RPC_METHODS.computerUseEnableBrowser, Schema_exports.Struct({})),
|
|
24657
24954
|
tagRequestBody(
|
|
24658
24955
|
RPC_METHODS.codexConfigGet,
|
|
24659
24956
|
Schema_exports.Struct({
|
|
@@ -25305,14 +25602,14 @@ async function stopChildAndWait(child) {
|
|
|
25305
25602
|
if (child.exitCode !== null || child.signalCode !== null) {
|
|
25306
25603
|
return;
|
|
25307
25604
|
}
|
|
25308
|
-
const wait = () => new Promise((
|
|
25605
|
+
const wait = () => new Promise((resolve3) => {
|
|
25309
25606
|
let settled = false;
|
|
25310
25607
|
const finish = (exited2) => {
|
|
25311
25608
|
if (settled) return;
|
|
25312
25609
|
settled = true;
|
|
25313
25610
|
clearTimeout(timer);
|
|
25314
25611
|
child.off("close", onClose);
|
|
25315
|
-
|
|
25612
|
+
resolve3(exited2);
|
|
25316
25613
|
};
|
|
25317
25614
|
const onClose = () => finish(true);
|
|
25318
25615
|
const timer = setTimeout(() => finish(false), CHILD_EXIT_TIMEOUT_MS);
|
|
@@ -25435,10 +25732,10 @@ function createRpcMessageReader(rl) {
|
|
|
25435
25732
|
if (closedError) {
|
|
25436
25733
|
return Promise.reject(closedError);
|
|
25437
25734
|
}
|
|
25438
|
-
return new Promise((
|
|
25735
|
+
return new Promise((resolve3, reject) => {
|
|
25439
25736
|
const waiter = {
|
|
25440
25737
|
predicate: () => true,
|
|
25441
|
-
resolve:
|
|
25738
|
+
resolve: resolve3,
|
|
25442
25739
|
reject,
|
|
25443
25740
|
timer: setTimeout(
|
|
25444
25741
|
() => {
|
|
@@ -25472,10 +25769,10 @@ function createRpcMessageReader(rl) {
|
|
|
25472
25769
|
if (closedError) {
|
|
25473
25770
|
return Promise.reject(closedError);
|
|
25474
25771
|
}
|
|
25475
|
-
return new Promise((
|
|
25772
|
+
return new Promise((resolve3, reject) => {
|
|
25476
25773
|
const waiter = {
|
|
25477
25774
|
predicate,
|
|
25478
|
-
resolve:
|
|
25775
|
+
resolve: resolve3,
|
|
25479
25776
|
reject,
|
|
25480
25777
|
timer: setTimeout(
|
|
25481
25778
|
() => {
|
|
@@ -25728,7 +26025,7 @@ async function hasExternalOpenFileHandle(filePath) {
|
|
|
25728
26025
|
return false;
|
|
25729
26026
|
}
|
|
25730
26027
|
const lsofCommand = process.platform === "darwin" ? "/usr/sbin/lsof" : "lsof";
|
|
25731
|
-
return new Promise((
|
|
26028
|
+
return new Promise((resolve3) => {
|
|
25732
26029
|
const child = (0, import_node_child_process5.spawn)(lsofCommand, ["-F", "p", "--", filePath], {
|
|
25733
26030
|
stdio: ["ignore", "pipe", "ignore"]
|
|
25734
26031
|
});
|
|
@@ -25738,7 +26035,7 @@ async function hasExternalOpenFileHandle(filePath) {
|
|
|
25738
26035
|
if (settled) return;
|
|
25739
26036
|
settled = true;
|
|
25740
26037
|
clearTimeout(timer);
|
|
25741
|
-
|
|
26038
|
+
resolve3(result2);
|
|
25742
26039
|
};
|
|
25743
26040
|
const timer = setTimeout(() => {
|
|
25744
26041
|
child.kill("SIGKILL");
|
|
@@ -25875,8 +26172,8 @@ async function acquireCodexAuthFileLock(filePath) {
|
|
|
25875
26172
|
const queueKey = import_node_path11.default.resolve(filePath);
|
|
25876
26173
|
const predecessor = authFileLockQueues.get(queueKey) ?? Promise.resolve();
|
|
25877
26174
|
let finishTurn;
|
|
25878
|
-
const turn = new Promise((
|
|
25879
|
-
finishTurn =
|
|
26175
|
+
const turn = new Promise((resolve3) => {
|
|
26176
|
+
finishTurn = resolve3;
|
|
25880
26177
|
});
|
|
25881
26178
|
authFileLockQueues.set(queueKey, turn);
|
|
25882
26179
|
await predecessor;
|
|
@@ -25985,7 +26282,7 @@ function isRpcResponseForRequest(message, requestId) {
|
|
|
25985
26282
|
return Object.prototype.hasOwnProperty.call(message, "result") || Object.prototype.hasOwnProperty.call(message, "error");
|
|
25986
26283
|
}
|
|
25987
26284
|
async function readRpcResponseById(rl, requestId, timeoutMs) {
|
|
25988
|
-
return new Promise((
|
|
26285
|
+
return new Promise((resolve3, reject) => {
|
|
25989
26286
|
const timer = setTimeout(
|
|
25990
26287
|
() => {
|
|
25991
26288
|
cleanup();
|
|
@@ -26015,7 +26312,7 @@ async function readRpcResponseById(rl, requestId, timeoutMs) {
|
|
|
26015
26312
|
return;
|
|
26016
26313
|
}
|
|
26017
26314
|
cleanup();
|
|
26018
|
-
|
|
26315
|
+
resolve3(parsed);
|
|
26019
26316
|
};
|
|
26020
26317
|
rl.on("line", onLine);
|
|
26021
26318
|
rl.on("close", onClose);
|
|
@@ -26899,7 +27196,7 @@ var OFFICIAL_CODEX_APP_NAMES = [
|
|
|
26899
27196
|
"Codex.app"
|
|
26900
27197
|
];
|
|
26901
27198
|
function sleep3(ms) {
|
|
26902
|
-
return new Promise((
|
|
27199
|
+
return new Promise((resolve3) => setTimeout(resolve3, ms));
|
|
26903
27200
|
}
|
|
26904
27201
|
function logOfficialCodexTakeoverPhase(trace, candidate, phase, context2 = {}) {
|
|
26905
27202
|
console.warn("[official-codex-takeover]", {
|
|
@@ -30502,7 +30799,7 @@ function isBridgeInstallDrift(value3) {
|
|
|
30502
30799
|
return reason === "bridge-command-runtime-missing" || reason === "bridge-health-missing" || reason === "bridge-health-degraded" || reason === "bridge-binding-missing";
|
|
30503
30800
|
}
|
|
30504
30801
|
async function runCdpCommandSequence(debuggerUrl, commands, timeoutMs = CODEX_CDP_REQUEST_TIMEOUT_MS) {
|
|
30505
|
-
return await new Promise((
|
|
30802
|
+
return await new Promise((resolve3, reject) => {
|
|
30506
30803
|
const ws = new WebSocket(debuggerUrl);
|
|
30507
30804
|
const results = [];
|
|
30508
30805
|
let commandIndex = 0;
|
|
@@ -30523,7 +30820,7 @@ async function runCdpCommandSequence(debuggerUrl, commands, timeoutMs = CODEX_CD
|
|
|
30523
30820
|
const sendNext = () => {
|
|
30524
30821
|
currentCommand = commands[commandIndex] ?? null;
|
|
30525
30822
|
if (!currentCommand) {
|
|
30526
|
-
settle(() =>
|
|
30823
|
+
settle(() => resolve3(results));
|
|
30527
30824
|
return;
|
|
30528
30825
|
}
|
|
30529
30826
|
requestId += 1;
|
|
@@ -30577,7 +30874,7 @@ async function verifyCdpBindingRoundTrip(debuggerUrl) {
|
|
|
30577
30874
|
)});
|
|
30578
30875
|
return true;
|
|
30579
30876
|
})()`;
|
|
30580
|
-
return await new Promise((
|
|
30877
|
+
return await new Promise((resolve3) => {
|
|
30581
30878
|
const ws = new WebSocket(debuggerUrl);
|
|
30582
30879
|
let settled = false;
|
|
30583
30880
|
let evaluateSent = false;
|
|
@@ -30594,7 +30891,7 @@ async function verifyCdpBindingRoundTrip(debuggerUrl) {
|
|
|
30594
30891
|
ws.close();
|
|
30595
30892
|
} catch {
|
|
30596
30893
|
}
|
|
30597
|
-
|
|
30894
|
+
resolve3(ok);
|
|
30598
30895
|
};
|
|
30599
30896
|
const send = (id2, method, params) => {
|
|
30600
30897
|
ws.send(JSON.stringify({ id: id2, method, params }));
|
|
@@ -30956,8 +31253,8 @@ async function startOfficialCodexBridgeActionListenerOnce(args2) {
|
|
|
30956
31253
|
bridgeActionListenerProfiles.delete(args2.debuggerUrl);
|
|
30957
31254
|
const waiters = bridgeActionListenerHealthWaiters.get(args2.debuggerUrl);
|
|
30958
31255
|
bridgeActionListenerHealthWaiters.delete(args2.debuggerUrl);
|
|
30959
|
-
for (const
|
|
30960
|
-
|
|
31256
|
+
for (const resolve3 of waiters?.values() ?? []) {
|
|
31257
|
+
resolve3(false);
|
|
30961
31258
|
}
|
|
30962
31259
|
bridgeActionListenerSilentCloses.add(existingListener);
|
|
30963
31260
|
try {
|
|
@@ -30971,8 +31268,8 @@ async function startOfficialCodexBridgeActionListenerOnce(args2) {
|
|
|
30971
31268
|
return false;
|
|
30972
31269
|
}
|
|
30973
31270
|
let resolveReady;
|
|
30974
|
-
const ready = new Promise((
|
|
30975
|
-
resolveReady =
|
|
31271
|
+
const ready = new Promise((resolve3) => {
|
|
31272
|
+
resolveReady = resolve3;
|
|
30976
31273
|
});
|
|
30977
31274
|
bridgeActionListenerReady.set(args2.debuggerUrl, ready);
|
|
30978
31275
|
let ws;
|
|
@@ -31027,8 +31324,8 @@ async function startOfficialCodexBridgeActionListenerOnce(args2) {
|
|
|
31027
31324
|
bridgeActionListenerProfiles.delete(args2.debuggerUrl);
|
|
31028
31325
|
const waiters = bridgeActionListenerHealthWaiters.get(args2.debuggerUrl);
|
|
31029
31326
|
bridgeActionListenerHealthWaiters.delete(args2.debuggerUrl);
|
|
31030
|
-
for (const
|
|
31031
|
-
|
|
31327
|
+
for (const resolve3 of waiters?.values() ?? []) {
|
|
31328
|
+
resolve3(false);
|
|
31032
31329
|
}
|
|
31033
31330
|
}
|
|
31034
31331
|
settleReady(false);
|
|
@@ -31066,17 +31363,17 @@ async function startOfficialCodexBridgeActionListenerOnce(args2) {
|
|
|
31066
31363
|
};
|
|
31067
31364
|
bridgeActionListenerVerifiers.set(args2.debuggerUrl, async () => {
|
|
31068
31365
|
const id2 = (0, import_node_crypto13.randomUUID)();
|
|
31069
|
-
return await new Promise((
|
|
31366
|
+
return await new Promise((resolve3) => {
|
|
31070
31367
|
const waiters = bridgeActionListenerHealthWaiters.get(args2.debuggerUrl) ?? /* @__PURE__ */ new Map();
|
|
31071
31368
|
bridgeActionListenerHealthWaiters.set(args2.debuggerUrl, waiters);
|
|
31072
31369
|
const timeout2 = setTimeout(() => {
|
|
31073
31370
|
waiters.delete(id2);
|
|
31074
|
-
|
|
31371
|
+
resolve3(false);
|
|
31075
31372
|
}, CODEX_CDP_REQUEST_TIMEOUT_MS);
|
|
31076
31373
|
waiters.set(id2, (ok) => {
|
|
31077
31374
|
clearTimeout(timeout2);
|
|
31078
31375
|
waiters.delete(id2);
|
|
31079
|
-
|
|
31376
|
+
resolve3(ok);
|
|
31080
31377
|
});
|
|
31081
31378
|
if (send("Runtime.evaluate", {
|
|
31082
31379
|
expression: `window[${JSON.stringify(CODEXUSE_BRIDGE_BINDING_NAME)}](${JSON.stringify(
|
|
@@ -31086,7 +31383,7 @@ async function startOfficialCodexBridgeActionListenerOnce(args2) {
|
|
|
31086
31383
|
}) === null) {
|
|
31087
31384
|
clearTimeout(timeout2);
|
|
31088
31385
|
waiters.delete(id2);
|
|
31089
|
-
|
|
31386
|
+
resolve3(false);
|
|
31090
31387
|
}
|
|
31091
31388
|
});
|
|
31092
31389
|
});
|
|
@@ -31555,7 +31852,7 @@ async function waitForBridgeStateAfterLaunch(instance) {
|
|
|
31555
31852
|
const deadline = Date.now() + CODEX_BRIDGE_LAUNCH_WAIT_MS;
|
|
31556
31853
|
let latest = await refreshBridgeStateIfNeeded(instance, true, true, true, true);
|
|
31557
31854
|
while (latest.bridgeStatus !== "healthy" && Date.now() < deadline) {
|
|
31558
|
-
await new Promise((
|
|
31855
|
+
await new Promise((resolve3) => setTimeout(resolve3, POLL_INTERVAL_MS));
|
|
31559
31856
|
latest = await refreshBridgeStateIfNeeded(
|
|
31560
31857
|
{
|
|
31561
31858
|
...instance,
|
|
@@ -31584,15 +31881,15 @@ async function waitForCdpTargetAfterLaunch(cdpPort) {
|
|
|
31584
31881
|
if (Date.now() >= deadline) {
|
|
31585
31882
|
return null;
|
|
31586
31883
|
}
|
|
31587
|
-
await new Promise((
|
|
31884
|
+
await new Promise((resolve3) => setTimeout(resolve3, POLL_INTERVAL_MS));
|
|
31588
31885
|
}
|
|
31589
31886
|
}
|
|
31590
31887
|
async function waitForBridgeStateAfterReload(instance) {
|
|
31591
31888
|
const deadline = Date.now() + CODEX_BRIDGE_LAUNCH_WAIT_MS;
|
|
31592
|
-
await new Promise((
|
|
31889
|
+
await new Promise((resolve3) => setTimeout(resolve3, POLL_INTERVAL_MS));
|
|
31593
31890
|
let latest = await refreshBridgeStateIfNeeded(instance, true, true, true, true);
|
|
31594
31891
|
while (latest.bridgeStatus !== "healthy" && Date.now() < deadline) {
|
|
31595
|
-
await new Promise((
|
|
31892
|
+
await new Promise((resolve3) => setTimeout(resolve3, POLL_INTERVAL_MS));
|
|
31596
31893
|
latest = await refreshBridgeStateIfNeeded(
|
|
31597
31894
|
{
|
|
31598
31895
|
...instance,
|
|
@@ -31690,7 +31987,7 @@ async function recordOfficialCodexActivity(input) {
|
|
|
31690
31987
|
}
|
|
31691
31988
|
}
|
|
31692
31989
|
function runCommand2(command, args2, timeoutMs = COMMAND_TIMEOUT_MS) {
|
|
31693
|
-
return new Promise((
|
|
31990
|
+
return new Promise((resolve3) => {
|
|
31694
31991
|
const child = (0, import_node_child_process6.spawn)(command, args2, {
|
|
31695
31992
|
stdio: ["ignore", "pipe", "pipe"]
|
|
31696
31993
|
});
|
|
@@ -31709,7 +32006,7 @@ function runCommand2(command, args2, timeoutMs = COMMAND_TIMEOUT_MS) {
|
|
|
31709
32006
|
});
|
|
31710
32007
|
child.on("error", (error) => {
|
|
31711
32008
|
clearTimeout(timer);
|
|
31712
|
-
|
|
32009
|
+
resolve3({
|
|
31713
32010
|
code: -1,
|
|
31714
32011
|
stdout,
|
|
31715
32012
|
stderr: error instanceof Error ? error.message : String(error),
|
|
@@ -31718,7 +32015,7 @@ function runCommand2(command, args2, timeoutMs = COMMAND_TIMEOUT_MS) {
|
|
|
31718
32015
|
});
|
|
31719
32016
|
child.on("close", (code) => {
|
|
31720
32017
|
clearTimeout(timer);
|
|
31721
|
-
|
|
32018
|
+
resolve3({ code, stdout, stderr, timedOut });
|
|
31722
32019
|
});
|
|
31723
32020
|
});
|
|
31724
32021
|
}
|
|
@@ -31975,7 +32272,7 @@ async function waitForNewMainPid(candidate, previousPids, cdpPort, telemetryLabe
|
|
|
31975
32272
|
if (matches.length > 1) {
|
|
31976
32273
|
return null;
|
|
31977
32274
|
}
|
|
31978
|
-
await new Promise((
|
|
32275
|
+
await new Promise((resolve3) => setTimeout(resolve3, POLL_INTERVAL_MS));
|
|
31979
32276
|
}
|
|
31980
32277
|
return null;
|
|
31981
32278
|
}
|
|
@@ -31990,7 +32287,7 @@ async function waitForAppServerPid(mainPid, profileHome) {
|
|
|
31990
32287
|
if (pid !== null) {
|
|
31991
32288
|
return pid;
|
|
31992
32289
|
}
|
|
31993
|
-
await new Promise((
|
|
32290
|
+
await new Promise((resolve3) => setTimeout(resolve3, POLL_INTERVAL_MS));
|
|
31994
32291
|
}
|
|
31995
32292
|
return null;
|
|
31996
32293
|
}
|
|
@@ -32003,7 +32300,7 @@ async function waitForAttestedProcessEpoch(args2) {
|
|
|
32003
32300
|
}
|
|
32004
32301
|
} catch {
|
|
32005
32302
|
}
|
|
32006
|
-
await new Promise((
|
|
32303
|
+
await new Promise((resolve3) => setTimeout(resolve3, POLL_INTERVAL_MS));
|
|
32007
32304
|
}
|
|
32008
32305
|
return false;
|
|
32009
32306
|
}
|
|
@@ -32025,7 +32322,7 @@ async function waitForProcessEpochsExit(expectedRows, timeoutMs) {
|
|
|
32025
32322
|
if (remaining.size === 0) {
|
|
32026
32323
|
return [];
|
|
32027
32324
|
}
|
|
32028
|
-
await new Promise((
|
|
32325
|
+
await new Promise((resolve3) => setTimeout(resolve3, POLL_INTERVAL_MS));
|
|
32029
32326
|
}
|
|
32030
32327
|
return Array.from(remaining.values());
|
|
32031
32328
|
}
|
|
@@ -32630,14 +32927,14 @@ async function openCodexWithProfileHome(candidate, profileHome, profileName, pre
|
|
|
32630
32927
|
}
|
|
32631
32928
|
child.unref();
|
|
32632
32929
|
const spawnError = await new Promise(
|
|
32633
|
-
(
|
|
32930
|
+
(resolve3) => {
|
|
32634
32931
|
let settled = false;
|
|
32635
32932
|
const settle = (reason) => {
|
|
32636
32933
|
if (settled) {
|
|
32637
32934
|
return;
|
|
32638
32935
|
}
|
|
32639
32936
|
settled = true;
|
|
32640
|
-
|
|
32937
|
+
resolve3(reason);
|
|
32641
32938
|
};
|
|
32642
32939
|
child.once(
|
|
32643
32940
|
"error",
|
|
@@ -32775,10 +33072,14 @@ function officialCodexAppPriority(appPath) {
|
|
|
32775
33072
|
const priority = OFFICIAL_CODEX_APP_NAMES.indexOf(import_node_path14.default.basename(appPath));
|
|
32776
33073
|
return priority >= 0 ? priority : OFFICIAL_CODEX_APP_NAMES.length;
|
|
32777
33074
|
}
|
|
33075
|
+
function hasBundledCodexCli(appPath) {
|
|
33076
|
+
const resources = import_node_path14.default.join(appPath, "Contents", "Resources");
|
|
33077
|
+
return (0, import_node_fs10.existsSync)(import_node_path14.default.join(resources, "codex")) || (0, import_node_fs10.existsSync)(import_node_path14.default.join(resources, "codex-cli", "bin", "codex"));
|
|
33078
|
+
}
|
|
32778
33079
|
async function collectCodexAppCandidates(rawPaths) {
|
|
32779
33080
|
const candidates = [];
|
|
32780
33081
|
for (const appPath of rawPaths) {
|
|
32781
|
-
if (!(0, import_node_fs10.existsSync)(appPath) || !OFFICIAL_CODEX_APP_NAMES.includes(import_node_path14.default.basename(appPath)) || !(
|
|
33082
|
+
if (!(0, import_node_fs10.existsSync)(appPath) || !OFFICIAL_CODEX_APP_NAMES.includes(import_node_path14.default.basename(appPath)) || !hasBundledCodexCli(appPath)) {
|
|
32782
33083
|
continue;
|
|
32783
33084
|
}
|
|
32784
33085
|
const bundleId = await readBundleString(appPath, "CFBundleIdentifier");
|
|
@@ -35041,8 +35342,8 @@ function notificationMatchesProcessEpoch(notification, epoch) {
|
|
|
35041
35342
|
function waitForOfficialCodexAccountLoginNotification(observedAfter, processEpoch) {
|
|
35042
35343
|
let settled = false;
|
|
35043
35344
|
let resolvePromise;
|
|
35044
|
-
const promise2 = new Promise((
|
|
35045
|
-
resolvePromise =
|
|
35345
|
+
const promise2 = new Promise((resolve3) => {
|
|
35346
|
+
resolvePromise = resolve3;
|
|
35046
35347
|
});
|
|
35047
35348
|
const finish = (value3) => {
|
|
35048
35349
|
if (settled) return;
|
|
@@ -43438,8 +43739,8 @@ async function runCodexLogin(mode, envOverrides = {}) {
|
|
|
43438
43739
|
env: { ...process.env, ...envOverrides },
|
|
43439
43740
|
shell
|
|
43440
43741
|
});
|
|
43441
|
-
const exitCode = await new Promise((
|
|
43442
|
-
child.on("close", (code) =>
|
|
43742
|
+
const exitCode = await new Promise((resolve3) => {
|
|
43743
|
+
child.on("close", (code) => resolve3(code ?? 0));
|
|
43443
43744
|
});
|
|
43444
43745
|
if (exitCode !== 0) {
|
|
43445
43746
|
throw new Error(`Codex CLI login failed (exit code ${exitCode}).`);
|
|
@@ -43501,7 +43802,7 @@ function compareCandidates(left, right) {
|
|
|
43501
43802
|
}
|
|
43502
43803
|
async function runCommand3(codexPath, args2, timeoutMs) {
|
|
43503
43804
|
const command = buildCodexCommand2(codexPath, args2);
|
|
43504
|
-
return new Promise((
|
|
43805
|
+
return new Promise((resolve3) => {
|
|
43505
43806
|
const child = (0, import_node_child_process9.spawn)(command.command, command.args, {
|
|
43506
43807
|
env: process.env,
|
|
43507
43808
|
shell: command.shell,
|
|
@@ -43518,7 +43819,7 @@ async function runCommand3(codexPath, args2, timeoutMs) {
|
|
|
43518
43819
|
}
|
|
43519
43820
|
settled = true;
|
|
43520
43821
|
clearTimeout(timer);
|
|
43521
|
-
|
|
43822
|
+
resolve3({ code, stdout, stderr, timedOut });
|
|
43522
43823
|
};
|
|
43523
43824
|
timer = setTimeout(() => {
|
|
43524
43825
|
timedOut = true;
|
|
@@ -43596,9 +43897,9 @@ async function runCodexWithProfile(manager, profileName, codexArgs) {
|
|
|
43596
43897
|
shell: command.shell,
|
|
43597
43898
|
stdio: "inherit"
|
|
43598
43899
|
});
|
|
43599
|
-
const childResult = new Promise((
|
|
43900
|
+
const childResult = new Promise((resolve3, reject) => {
|
|
43600
43901
|
child.once("error", reject);
|
|
43601
|
-
child.once("close", (code, signal) =>
|
|
43902
|
+
child.once("close", (code, signal) => resolve3({ code, signal }));
|
|
43602
43903
|
});
|
|
43603
43904
|
void childResult.catch(() => void 0);
|
|
43604
43905
|
const relaySignal = (signal) => {
|
|
@@ -43893,8 +44194,8 @@ async function acquireOfficialCodexSwitchIntent(input) {
|
|
|
43893
44194
|
}
|
|
43894
44195
|
let resolvePending = () => void 0;
|
|
43895
44196
|
const pendingAcquisition = {
|
|
43896
|
-
promise: new Promise((
|
|
43897
|
-
resolvePending =
|
|
44197
|
+
promise: new Promise((resolve3) => {
|
|
44198
|
+
resolvePending = resolve3;
|
|
43898
44199
|
}),
|
|
43899
44200
|
resolve: () => resolvePending(),
|
|
43900
44201
|
error: null
|
|
@@ -45303,8 +45604,8 @@ async function coordinateCliOfficialCodexProfileSwitch(options) {
|
|
|
45303
45604
|
)) {
|
|
45304
45605
|
return "completed";
|
|
45305
45606
|
}
|
|
45306
|
-
await new Promise((
|
|
45307
|
-
wakeNotificationWaiter =
|
|
45607
|
+
await new Promise((resolve3) => {
|
|
45608
|
+
wakeNotificationWaiter = resolve3;
|
|
45308
45609
|
});
|
|
45309
45610
|
}
|
|
45310
45611
|
};
|
|
@@ -45674,7 +45975,7 @@ async function runAutoRollPass(manager, options) {
|
|
|
45674
45975
|
};
|
|
45675
45976
|
}
|
|
45676
45977
|
function delay2(ms) {
|
|
45677
|
-
return new Promise((
|
|
45978
|
+
return new Promise((resolve3) => setTimeout(resolve3, ms));
|
|
45678
45979
|
}
|
|
45679
45980
|
async function handleProfileCommand(args2, version) {
|
|
45680
45981
|
const split = splitPassthroughArgs(args2);
|
|
@@ -46242,7 +46543,7 @@ function requireCloudSyncPassphrase(value3) {
|
|
|
46242
46543
|
return normalized;
|
|
46243
46544
|
}
|
|
46244
46545
|
async function deriveKey(passphrase, salt, params = SCRYPT_PARAMS) {
|
|
46245
|
-
return new Promise((
|
|
46546
|
+
return new Promise((resolve3, reject) => {
|
|
46246
46547
|
(0, import_node_crypto19.scrypt)(passphrase, salt, params.keyLength, {
|
|
46247
46548
|
N: params.N,
|
|
46248
46549
|
r: params.r,
|
|
@@ -46253,7 +46554,7 @@ async function deriveKey(passphrase, salt, params = SCRYPT_PARAMS) {
|
|
|
46253
46554
|
reject(error);
|
|
46254
46555
|
return;
|
|
46255
46556
|
}
|
|
46256
|
-
|
|
46557
|
+
resolve3(Buffer.from(key));
|
|
46257
46558
|
});
|
|
46258
46559
|
});
|
|
46259
46560
|
}
|
|
@@ -47106,7 +47407,7 @@ async function ensureCliStorageReady() {
|
|
|
47106
47407
|
}
|
|
47107
47408
|
|
|
47108
47409
|
// src/app/main.ts
|
|
47109
|
-
var VERSION = true ? "6.
|
|
47410
|
+
var VERSION = true ? "6.4.0" : "0.0.0";
|
|
47110
47411
|
async function runCli() {
|
|
47111
47412
|
const args2 = process.argv.slice(2);
|
|
47112
47413
|
if (args2.length === 0) {
|