@pmelab/gtd 64.1.0 → 64.1.2
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/.claude-plugin/plugin.json +1 -1
- package/README.md +9 -7
- package/dist/chunks/{flows-B7ZRCe-B.mjs → flows-dnIE_qbe.mjs} +7 -13
- package/dist/chunks/{rolldown-runtime-D7D4PA-g.mjs → rolldown-runtime-D8jQpDG7.mjs} +1 -2
- package/dist/chunks/{steering-Cem5i6Xl.mjs → steering-CQzL-lX1.mjs} +124 -187
- package/dist/chunks/{testkit-DfWZQCWQ.mjs → testkit-D539mnDI.mjs} +353 -496
- package/dist/chunks/{wire-CPNSm_9N.mjs → wire-CaPJ9Tme.mjs} +12 -24
- package/dist/flows.mjs +1 -2
- package/dist/gtd.bundle.mjs +878 -1767
- package/dist/gtd.core.mjs +190 -182
- package/dist/steering.mjs +1 -2
- package/dist/testkit/gherkin.mjs +3 -5
- package/dist/testkit.mjs +2 -2
- package/dist/web/main.css +1 -1
- package/dist/web/main.js +359 -401
- package/dist/wire.mjs +1 -2
- package/dist/workflow-kit.mjs +6 -10
- package/package.json +19 -32
- package/src/edge/Edge.test.ts +1 -1
- package/src/edge/Edge.ts +1 -1
- package/src/emit/GitScript.test.ts +1 -1
- package/src/flows/runtime.test.ts +1 -1
- package/src/replay/Replay.test.ts +21 -7
- package/src/steering/Blocks.test.ts +3 -1
- package/src/steering/Blocks.ts +14 -6
- package/src/steering/SteeringFormat.ts +5 -0
- package/src/steering/qa.test.ts +3 -3
- package/src/steering/qa.ts +1 -1
- package/src/steering/review.test.ts +26 -1
- package/src/step/LandStep.ts +1 -1
- package/src/twins/GitTiers.ts +1 -1
- package/src/wire/BeatPlain.ts +3 -3
- package/src/wire/Select.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as moveScript, D as revertScript, E as restoreScript, H as installContext, K as markedOptions, O as showScript, S as checkScript, T as removeScript, Y as protocolMismatch, i as configure, k as writeScript$1, n as configProblems, o as isFactoryWorkflow, p as numeric, s as answered, t as flows_exports, x as applyScript } from "./flows-
|
|
2
|
-
import { M as renderFormat, O as ACCESS_REFUSAL, a as renderScriptJson, d as renderLandPlain, f as DEMAND_BRIEFING, g as statusOf, h as renderBeatJson, i as judgeJson, k as PIN_PATH, l as noopText, m as beatDocument, n as resolveSession, o as scriptFields, p as renderBeatPlain, r as selectPath, s as landFields, t as globMatches, u as renderLandJson, v as beatKindOf, y as demandOf } from "./wire-
|
|
3
|
-
import { F as headingSectionBodies, I as formatFinding, a as sections, c as openThreads, d as formatFromSpec, i as sectionBodies, l as steeringFormatFor, o as threads, r as openQuestions, s as BUILT_IN_MODE_NAMES, t as parseCodeThreads, u as unansweredQuestions } from "./steering-
|
|
1
|
+
import { C as moveScript, D as revertScript, E as restoreScript, H as installContext, K as markedOptions, O as showScript, S as checkScript, T as removeScript, Y as protocolMismatch, i as configure, k as writeScript$1, n as configProblems, o as isFactoryWorkflow, p as numeric, s as answered, t as flows_exports, x as applyScript } from "./flows-dnIE_qbe.mjs";
|
|
2
|
+
import { M as renderFormat, O as ACCESS_REFUSAL, a as renderScriptJson, d as renderLandPlain, f as DEMAND_BRIEFING, g as statusOf, h as renderBeatJson, i as judgeJson, k as PIN_PATH, l as noopText, m as beatDocument, n as resolveSession, o as scriptFields, p as renderBeatPlain, r as selectPath, s as landFields, t as globMatches, u as renderLandJson, v as beatKindOf, y as demandOf } from "./wire-CaPJ9Tme.mjs";
|
|
3
|
+
import { F as headingSectionBodies, I as formatFinding, a as sections, c as openThreads, d as formatFromSpec, i as sectionBodies, l as steeringFormatFor, o as threads, r as openQuestions, s as BUILT_IN_MODE_NAMES, t as parseCodeThreads, u as unansweredQuestions } from "./steering-CQzL-lX1.mjs";
|
|
4
4
|
import { createRequire, isBuiltin } from "node:module";
|
|
5
5
|
import * as Crypto from "node:crypto";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
@@ -18,7 +18,7 @@ import { lstatSync, mkdirSync, readFileSync, readlinkSync, realpathSync, renameS
|
|
|
18
18
|
import { PassThrough, finished } from "node:stream";
|
|
19
19
|
import * as Path from "node:path";
|
|
20
20
|
import "vitest";
|
|
21
|
-
|
|
21
|
+
// node_modules/effect/dist/Pipeable.js
|
|
22
22
|
/**
|
|
23
23
|
* The `Pipeable` module defines the shared interface and implementation helpers
|
|
24
24
|
* for values that support Effect-style method chaining with `.pipe(...)`.
|
|
@@ -123,8 +123,7 @@ const Class$1 = /*#__PURE__*/ function() {
|
|
|
123
123
|
PipeableBase.prototype = Prototype$1;
|
|
124
124
|
return PipeableBase;
|
|
125
125
|
}();
|
|
126
|
-
|
|
127
|
-
//#region node_modules/effect/dist/Function.js
|
|
126
|
+
// node_modules/effect/dist/Function.js
|
|
128
127
|
/**
|
|
129
128
|
* Creates a function that can be called in data-first style or data-last
|
|
130
129
|
* (`pipe`-friendly) style.
|
|
@@ -418,8 +417,7 @@ function memoizeIdempotent(f) {
|
|
|
418
417
|
return result;
|
|
419
418
|
};
|
|
420
419
|
}
|
|
421
|
-
|
|
422
|
-
//#region node_modules/effect/dist/internal/equal.js
|
|
420
|
+
// node_modules/effect/dist/internal/equal.js
|
|
423
421
|
/** @internal */
|
|
424
422
|
const getAllObjectKeys = (obj) => {
|
|
425
423
|
const keys = new Set(Reflect.ownKeys(obj));
|
|
@@ -453,8 +451,7 @@ const bufferBytes = (buffer) => {
|
|
|
453
451
|
return;
|
|
454
452
|
}
|
|
455
453
|
};
|
|
456
|
-
|
|
457
|
-
//#region node_modules/effect/dist/internal/hash.js
|
|
454
|
+
// node_modules/effect/dist/internal/hash.js
|
|
458
455
|
/**
|
|
459
456
|
* Back-edge count used to avoid caching entry-point-dependent hashes.
|
|
460
457
|
*
|
|
@@ -465,8 +462,7 @@ let backEdges = 0;
|
|
|
465
462
|
const addBackEdge = () => {
|
|
466
463
|
backEdges++;
|
|
467
464
|
};
|
|
468
|
-
|
|
469
|
-
//#region node_modules/effect/dist/Predicate.js
|
|
465
|
+
// node_modules/effect/dist/Predicate.js
|
|
470
466
|
/**
|
|
471
467
|
* Defines runtime checks for values.
|
|
472
468
|
*
|
|
@@ -900,8 +896,7 @@ const isTagged = /*#__PURE__*/ dual(2, (self, tag) => hasProperty(self, "_tag")
|
|
|
900
896
|
function isIterable(input) {
|
|
901
897
|
return hasProperty(input, Symbol.iterator) || isString$1(input);
|
|
902
898
|
}
|
|
903
|
-
|
|
904
|
-
//#region node_modules/effect/dist/Hash.js
|
|
899
|
+
// node_modules/effect/dist/Hash.js
|
|
905
900
|
/**
|
|
906
901
|
* Computes Effect hash values and defines the interface for objects that want
|
|
907
902
|
* to provide their own hash implementation. Hashes are small numeric
|
|
@@ -1299,8 +1294,7 @@ const hashSet = /*#__PURE__*/ unordered(setSeed, (element) => combine(setSeed, h
|
|
|
1299
1294
|
const randomHashCache = /*#__PURE__*/ new WeakMap();
|
|
1300
1295
|
const hashCache = /*#__PURE__*/ new WeakMap();
|
|
1301
1296
|
const visitedObjects = /*#__PURE__*/ new WeakSet();
|
|
1302
|
-
|
|
1303
|
-
//#region node_modules/effect/dist/Equal.js
|
|
1297
|
+
// node_modules/effect/dist/Equal.js
|
|
1304
1298
|
/**
|
|
1305
1299
|
* Defines the unique string identifier for the `Equal` interface.
|
|
1306
1300
|
*
|
|
@@ -1495,8 +1489,7 @@ const equalEntries = (self, that) => compareBoth(self[0], that[0]) && compareBot
|
|
|
1495
1489
|
* @since 2.0.0
|
|
1496
1490
|
*/
|
|
1497
1491
|
const isEqual = (u) => hasProperty(u, symbol);
|
|
1498
|
-
|
|
1499
|
-
//#region node_modules/effect/dist/Redactable.js
|
|
1492
|
+
// node_modules/effect/dist/Redactable.js
|
|
1500
1493
|
/**
|
|
1501
1494
|
* Defines the symbol used to identify objects that implement the {@link Redactable}
|
|
1502
1495
|
* protocol.
|
|
@@ -1618,8 +1611,7 @@ const emptyContext$1 = {
|
|
|
1618
1611
|
return pipeArguments(this, arguments);
|
|
1619
1612
|
}
|
|
1620
1613
|
};
|
|
1621
|
-
|
|
1622
|
-
//#region node_modules/effect/dist/Formatter.js
|
|
1614
|
+
// node_modules/effect/dist/Formatter.js
|
|
1623
1615
|
/**
|
|
1624
1616
|
* Formats JavaScript values into readable strings.
|
|
1625
1617
|
*
|
|
@@ -1905,8 +1897,7 @@ function isJsonPrimitiveWrapper(object) {
|
|
|
1905
1897
|
} catch {}
|
|
1906
1898
|
return false;
|
|
1907
1899
|
}
|
|
1908
|
-
|
|
1909
|
-
//#region node_modules/effect/dist/Inspectable.js
|
|
1900
|
+
// node_modules/effect/dist/Inspectable.js
|
|
1910
1901
|
/**
|
|
1911
1902
|
* Controls how values appear in logs and debugging output.
|
|
1912
1903
|
*
|
|
@@ -2059,8 +2050,7 @@ const BaseProto = {
|
|
|
2059
2050
|
return format$1(this.toJSON());
|
|
2060
2051
|
}
|
|
2061
2052
|
};
|
|
2062
|
-
|
|
2063
|
-
//#region node_modules/effect/dist/internal/stackTraceLimit.js
|
|
2053
|
+
// node_modules/effect/dist/internal/stackTraceLimit.js
|
|
2064
2054
|
/**
|
|
2065
2055
|
* Check if `Error.stackTraceLimit` is writable.
|
|
2066
2056
|
* Returns `false` if the property is frozen, non-writable, or `Error` is non-extensible.
|
|
@@ -2091,8 +2081,7 @@ const getStackTraceLimit = () => Error.stackTraceLimit;
|
|
|
2091
2081
|
const setStackTraceLimit = (value) => {
|
|
2092
2082
|
if (canWriteStackTraceLimit) Error.stackTraceLimit = value;
|
|
2093
2083
|
};
|
|
2094
|
-
|
|
2095
|
-
//#region node_modules/effect/dist/Utils.js
|
|
2084
|
+
// node_modules/effect/dist/Utils.js
|
|
2096
2085
|
/**
|
|
2097
2086
|
* Yields its wrapped value exactly once, then completes with the value sent
|
|
2098
2087
|
* back in.
|
|
@@ -2174,8 +2163,7 @@ const pickInternalCall = () => {
|
|
|
2174
2163
|
};
|
|
2175
2164
|
/** @internal */
|
|
2176
2165
|
const internalCall = /*#__PURE__*/ pickInternalCall();
|
|
2177
|
-
|
|
2178
|
-
//#region node_modules/effect/dist/internal/record.js
|
|
2166
|
+
// node_modules/effect/dist/internal/record.js
|
|
2179
2167
|
/** @internal */
|
|
2180
2168
|
function assignProperty(self, key, value) {
|
|
2181
2169
|
if (key === "__proto__") Object.defineProperty(self, key, {
|
|
@@ -2194,8 +2182,7 @@ function assignProperties(self, source) {
|
|
|
2194
2182
|
}
|
|
2195
2183
|
for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProperty(self, key, source[key]);
|
|
2196
2184
|
}
|
|
2197
|
-
|
|
2198
|
-
//#region node_modules/effect/dist/internal/core.js
|
|
2185
|
+
// node_modules/effect/dist/internal/core.js
|
|
2199
2186
|
/** @internal */
|
|
2200
2187
|
const EffectTypeId = `~effect/Effect`;
|
|
2201
2188
|
/** @internal */
|
|
@@ -2248,7 +2235,7 @@ const EffectProto = {
|
|
|
2248
2235
|
return {
|
|
2249
2236
|
_id: "Effect",
|
|
2250
2237
|
op: this[identifier],
|
|
2251
|
-
...args in this ? { args: this[args] } : void 0
|
|
2238
|
+
..."~effect/Effect/args" in this ? { args: this[args] } : void 0
|
|
2252
2239
|
};
|
|
2253
2240
|
}
|
|
2254
2241
|
};
|
|
@@ -2432,7 +2419,7 @@ function defaultEvaluate(_fiber) {
|
|
|
2432
2419
|
const makePrimitiveProto = (options) => ({
|
|
2433
2420
|
...EffectProto,
|
|
2434
2421
|
[identifier]: options.op,
|
|
2435
|
-
[evaluate$1]: options[evaluate
|
|
2422
|
+
[evaluate$1]: options["~effect/Effect/evaluate"] ?? defaultEvaluate,
|
|
2436
2423
|
[contA]: options[contA],
|
|
2437
2424
|
[contE]: options[contE],
|
|
2438
2425
|
[contAll]: options[contAll]
|
|
@@ -2468,7 +2455,7 @@ const makeExit = (options) => {
|
|
|
2468
2455
|
};
|
|
2469
2456
|
},
|
|
2470
2457
|
[symbol](that) {
|
|
2471
|
-
return isExit(that) && that._tag === this._tag && equals$1(this[args], that[args]);
|
|
2458
|
+
return isExit(that) && that._tag === this._tag && equals$1(this["~effect/Effect/args"], that["~effect/Effect/args"]);
|
|
2472
2459
|
},
|
|
2473
2460
|
[symbol$1]() {
|
|
2474
2461
|
return combine(string$1(options.op), hash(this[args]));
|
|
@@ -2494,7 +2481,7 @@ const exitSucceed = /*#__PURE__*/ makeExit({
|
|
|
2494
2481
|
/** @internal */
|
|
2495
2482
|
const StackTraceKey = { key: "effect/Cause/StackTrace" };
|
|
2496
2483
|
/** @internal */
|
|
2497
|
-
const InterruptorStackTrace
|
|
2484
|
+
const InterruptorStackTrace = { key: "effect/Cause/InterruptorStackTrace" };
|
|
2498
2485
|
/** @internal */
|
|
2499
2486
|
const exitFailCause = /*#__PURE__*/ makeExit({
|
|
2500
2487
|
op: "Failure",
|
|
@@ -2575,7 +2562,6 @@ const TaggedError$1 = (tag) => {
|
|
|
2575
2562
|
Base.prototype.name = tag;
|
|
2576
2563
|
return Base;
|
|
2577
2564
|
};
|
|
2578
|
-
TaggedError$1("NoSuchElementError");
|
|
2579
2565
|
/** @internal */
|
|
2580
2566
|
const DoneTypeId = "~effect/Cause/Done";
|
|
2581
2567
|
/** @internal */
|
|
@@ -2600,8 +2586,7 @@ const done$2 = (value) => {
|
|
|
2600
2586
|
if (value === void 0) return doneVoid;
|
|
2601
2587
|
return exitFail(Done$1(value));
|
|
2602
2588
|
};
|
|
2603
|
-
|
|
2604
|
-
//#region node_modules/effect/dist/Effectable.js
|
|
2589
|
+
// node_modules/effect/dist/Effectable.js
|
|
2605
2590
|
/**
|
|
2606
2591
|
* Create a low-level `Effect` prototype.
|
|
2607
2592
|
*
|
|
@@ -2626,8 +2611,7 @@ const Prototype = (options) => makePrimitiveProto({
|
|
|
2626
2611
|
op: options.label,
|
|
2627
2612
|
[evaluate$1]: options.evaluate
|
|
2628
2613
|
});
|
|
2629
|
-
|
|
2630
|
-
//#region node_modules/effect/dist/internal/option.js
|
|
2614
|
+
// node_modules/effect/dist/internal/option.js
|
|
2631
2615
|
/**
|
|
2632
2616
|
* @since 2.0.0
|
|
2633
2617
|
*/
|
|
@@ -2697,8 +2681,7 @@ const SomeImpl = function(value) {
|
|
|
2697
2681
|
SomeImpl.prototype = SomeProto;
|
|
2698
2682
|
/** @internal */
|
|
2699
2683
|
const some$1 = (value) => new SomeImpl(value);
|
|
2700
|
-
|
|
2701
|
-
//#region node_modules/effect/dist/internal/result.js
|
|
2684
|
+
// node_modules/effect/dist/internal/result.js
|
|
2702
2685
|
const TypeId$26 = "~effect/Result";
|
|
2703
2686
|
const CommonProto = {
|
|
2704
2687
|
[TypeId$26]: {
|
|
@@ -2771,8 +2754,7 @@ const SuccessImpl = function(success) {
|
|
|
2771
2754
|
SuccessImpl.prototype = SuccessProto;
|
|
2772
2755
|
/** @internal */
|
|
2773
2756
|
const succeed$6 = (success) => new SuccessImpl(success);
|
|
2774
|
-
|
|
2775
|
-
//#region node_modules/effect/dist/Order.js
|
|
2757
|
+
// node_modules/effect/dist/Order.js
|
|
2776
2758
|
/**
|
|
2777
2759
|
* Defines comparison functions for ordered values.
|
|
2778
2760
|
*
|
|
@@ -3051,8 +3033,7 @@ const isLessThanOrEqualTo$1 = (O) => dual(2, (self, that) => O(self, that) !== 1
|
|
|
3051
3033
|
* @since 4.0.0
|
|
3052
3034
|
*/
|
|
3053
3035
|
const isGreaterThanOrEqualTo$1 = (O) => dual(2, (self, that) => O(self, that) !== -1);
|
|
3054
|
-
|
|
3055
|
-
//#region node_modules/effect/dist/Option.js
|
|
3036
|
+
// node_modules/effect/dist/Option.js
|
|
3056
3037
|
/**
|
|
3057
3038
|
* Creates an `Option` representing the absence of a value.
|
|
3058
3039
|
*
|
|
@@ -3399,8 +3380,7 @@ const map$6 = /*#__PURE__*/ dual(2, (self, f) => isNone(self) ? none() : some(f(
|
|
|
3399
3380
|
* @since 2.0.0
|
|
3400
3381
|
*/
|
|
3401
3382
|
const flatMap$4 = /*#__PURE__*/ dual(2, (self, f) => isNone(self) ? none() : f(self.value));
|
|
3402
|
-
|
|
3403
|
-
//#region node_modules/effect/dist/Context.js
|
|
3383
|
+
// node_modules/effect/dist/Context.js
|
|
3404
3384
|
/**
|
|
3405
3385
|
* Runtime type identifier attached to `Context` service keys and used by
|
|
3406
3386
|
* `isKey` to recognize them.
|
|
@@ -4069,15 +4049,13 @@ const mergeAll$1 = (...ctxs) => {
|
|
|
4069
4049
|
* @since 3.11.0
|
|
4070
4050
|
*/
|
|
4071
4051
|
const Reference = Service;
|
|
4072
|
-
|
|
4073
|
-
//#region node_modules/effect/dist/internal/array.js
|
|
4052
|
+
// node_modules/effect/dist/internal/array.js
|
|
4074
4053
|
/**
|
|
4075
4054
|
* @since 2.0.0
|
|
4076
4055
|
*/
|
|
4077
4056
|
/** @internal */
|
|
4078
4057
|
const isArrayNonEmpty$1 = (self) => self.length > 0;
|
|
4079
|
-
|
|
4080
|
-
//#region node_modules/effect/dist/internal/count.js
|
|
4058
|
+
// node_modules/effect/dist/internal/count.js
|
|
4081
4059
|
/**
|
|
4082
4060
|
* Normalizes a collection count to a non-negative integer. `NaN` and
|
|
4083
4061
|
* non-positive values become `0`; positive infinity is preserved.
|
|
@@ -4085,8 +4063,7 @@ const isArrayNonEmpty$1 = (self) => self.length > 0;
|
|
|
4085
4063
|
* @internal
|
|
4086
4064
|
*/
|
|
4087
4065
|
const normalize$2 = (n) => n > 0 ? Math.floor(n) : 0;
|
|
4088
|
-
|
|
4089
|
-
//#region node_modules/effect/dist/Result.js
|
|
4066
|
+
// node_modules/effect/dist/Result.js
|
|
4090
4067
|
/**
|
|
4091
4068
|
* Creates a `Result` holding a `Success` value.
|
|
4092
4069
|
*
|
|
@@ -4237,8 +4214,7 @@ const getOrThrow = /*#__PURE__*/ (/* @__PURE__ */ dual(2, (self, onFailure) => {
|
|
|
4237
4214
|
if (isSuccess$1(self)) return self.success;
|
|
4238
4215
|
throw onFailure(self.failure);
|
|
4239
4216
|
}))(identity);
|
|
4240
|
-
|
|
4241
|
-
//#region node_modules/effect/dist/Array.js
|
|
4217
|
+
// node_modules/effect/dist/Array.js
|
|
4242
4218
|
/**
|
|
4243
4219
|
* Exposes the global array constructor.
|
|
4244
4220
|
*
|
|
@@ -4467,8 +4443,7 @@ const of = (a) => [a];
|
|
|
4467
4443
|
* @since 2.0.0
|
|
4468
4444
|
*/
|
|
4469
4445
|
const map$3 = /*#__PURE__*/ dual(2, (self, f) => self.map(f));
|
|
4470
|
-
|
|
4471
|
-
//#region node_modules/effect/dist/Duration.js
|
|
4446
|
+
// node_modules/effect/dist/Duration.js
|
|
4472
4447
|
const TypeId$24 = "~effect/Duration";
|
|
4473
4448
|
const bigint0$2 = /*#__PURE__*/ BigInt(0);
|
|
4474
4449
|
const bigint1$2 = /*#__PURE__*/ BigInt(1);
|
|
@@ -4671,17 +4646,18 @@ const DurationProto = {
|
|
|
4671
4646
|
};
|
|
4672
4647
|
const make$18 = (input) => {
|
|
4673
4648
|
const duration = Object.create(DurationProto);
|
|
4674
|
-
if (typeof input === "number")
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4649
|
+
if (typeof input === "number") {
|
|
4650
|
+
if (isNaN(input) || input === 0 || Object.is(input, -0)) duration.value = zeroDurationValue;
|
|
4651
|
+
else if (!Number.isFinite(input)) duration.value = input > 0 ? infinityDurationValue : negativeInfinityDurationValue;
|
|
4652
|
+
else if (!Number.isInteger(input)) duration.value = {
|
|
4653
|
+
_tag: "Nanos",
|
|
4654
|
+
nanos: roundMillisToNanos(input)
|
|
4655
|
+
};
|
|
4656
|
+
else duration.value = {
|
|
4657
|
+
_tag: "Millis",
|
|
4658
|
+
millis: input
|
|
4659
|
+
};
|
|
4660
|
+
} else if (input === bigint0$2) duration.value = zeroDurationValue;
|
|
4685
4661
|
else duration.value = {
|
|
4686
4662
|
_tag: "Nanos",
|
|
4687
4663
|
nanos: input
|
|
@@ -4941,8 +4917,7 @@ const Equivalence$3 = (self, that) => matchPair(self, that, {
|
|
|
4941
4917
|
* @since 2.0.0
|
|
4942
4918
|
*/
|
|
4943
4919
|
const equals = /*#__PURE__*/ dual(2, (self, that) => Equivalence$3(self, that));
|
|
4944
|
-
|
|
4945
|
-
//#region node_modules/effect/dist/Scheduler.js
|
|
4920
|
+
// node_modules/effect/dist/Scheduler.js
|
|
4946
4921
|
/**
|
|
4947
4922
|
* Controls how runnable Effect fiber tasks are dispatched.
|
|
4948
4923
|
*
|
|
@@ -5265,21 +5240,7 @@ const Error$1 = Error$2;
|
|
|
5265
5240
|
* @since 2.0.0
|
|
5266
5241
|
*/
|
|
5267
5242
|
const TaggedError = TaggedError$1;
|
|
5268
|
-
|
|
5269
|
-
//#endregion
|
|
5270
|
-
//#region node_modules/effect/dist/Tracer.js
|
|
5271
|
-
/**
|
|
5272
|
-
* Defines the low-level tracing model used by Effect.
|
|
5273
|
-
*
|
|
5274
|
-
* A span records the lifetime of an operation, including its name, parent,
|
|
5275
|
-
* attributes, links, annotations, sampling decision, kind, and completion
|
|
5276
|
-
* status. The module also defines the tracer service, parent-span context,
|
|
5277
|
-
* external span support, trace propagation settings, and the default in-memory
|
|
5278
|
-
* span implementation.
|
|
5279
|
-
*
|
|
5280
|
-
* @stability stable
|
|
5281
|
-
* @since 2.0.0
|
|
5282
|
-
*/
|
|
5243
|
+
// node_modules/effect/dist/Tracer.js
|
|
5283
5244
|
/**
|
|
5284
5245
|
* Defines the string key for the parent-span context service.
|
|
5285
5246
|
*
|
|
@@ -5302,7 +5263,6 @@ TaggedError("EncodingError");
|
|
|
5302
5263
|
* @since 4.0.0
|
|
5303
5264
|
*/
|
|
5304
5265
|
const ParentSpanKey = "effect/Tracer/ParentSpan";
|
|
5305
|
-
Service()(ParentSpanKey, { fiberCached: true });
|
|
5306
5266
|
/**
|
|
5307
5267
|
* Defines the string key for the active tracer context reference.
|
|
5308
5268
|
*
|
|
@@ -5316,12 +5276,10 @@ Service()(ParentSpanKey, { fiberCached: true });
|
|
|
5316
5276
|
* @since 4.0.0
|
|
5317
5277
|
*/
|
|
5318
5278
|
const TracerKey = "effect/Tracer";
|
|
5319
|
-
|
|
5320
|
-
//#region node_modules/effect/dist/internal/metric.js
|
|
5279
|
+
// node_modules/effect/dist/internal/metric.js
|
|
5321
5280
|
/** @internal */
|
|
5322
5281
|
const FiberRuntimeMetricsKey = "effect/Metric/FiberRuntimeMetrics";
|
|
5323
|
-
|
|
5324
|
-
//#region node_modules/effect/dist/internal/references.js
|
|
5282
|
+
// node_modules/effect/dist/internal/references.js
|
|
5325
5283
|
/** @internal */
|
|
5326
5284
|
const CurrentStackFrame = /*#__PURE__*/ Reference("effect/References/CurrentStackFrame", {
|
|
5327
5285
|
fiberCached: true,
|
|
@@ -5348,8 +5306,7 @@ const MinimumLogLevel = /*#__PURE__*/ Reference("effect/References/MinimumLogLev
|
|
|
5348
5306
|
const UnhandledLogLevel = /*#__PURE__*/ Reference("effect/References/UnhandledLogLevel", { defaultValue: () => "Error" });
|
|
5349
5307
|
/** @internal */
|
|
5350
5308
|
const CurrentLogSpans = /*#__PURE__*/ Reference("effect/References/CurrentLogSpans", { defaultValue: () => [] });
|
|
5351
|
-
|
|
5352
|
-
//#region node_modules/effect/dist/internal/effect.js
|
|
5309
|
+
// node_modules/effect/dist/internal/effect.js
|
|
5353
5310
|
/** @internal */
|
|
5354
5311
|
var Interrupt = class extends ReasonBase {
|
|
5355
5312
|
constructor(fiberId, annotations = constEmptyAnnotations) {
|
|
@@ -5507,7 +5464,7 @@ const interruptCauseStack = (error, interrupts) => {
|
|
|
5507
5464
|
const out = [`${error.name}: ${error.message}`];
|
|
5508
5465
|
for (const current of interrupts) {
|
|
5509
5466
|
const fiberId = current.fiberId !== void 0 ? `#${current.fiberId}` : "unknown";
|
|
5510
|
-
const frame = current.annotations.get(InterruptorStackTrace
|
|
5467
|
+
const frame = current.annotations.get(InterruptorStackTrace.key);
|
|
5511
5468
|
out.push(` at fiber (${fiberId})`);
|
|
5512
5469
|
if (frame) out.push(currentStackTrace(frame));
|
|
5513
5470
|
}
|
|
@@ -5608,8 +5565,10 @@ var FiberImpl = class {
|
|
|
5608
5565
|
if (this.cache.stackFrame) cause = causeAnnotate(cause, make$19(StackTraceKey, this.cache.stackFrame));
|
|
5609
5566
|
if (annotations) cause = causeAnnotate(cause, annotations);
|
|
5610
5567
|
this._interruptedCause = this._interruptedCause ? causeAddInterrupts(this._interruptedCause, cause) : cause;
|
|
5611
|
-
if (this.interruptible)
|
|
5612
|
-
|
|
5568
|
+
if (this.interruptible) {
|
|
5569
|
+
if (this._running) this._deferredInterrupt = true;
|
|
5570
|
+
else this.evaluate(failCause$3(this._interruptedCause));
|
|
5571
|
+
}
|
|
5613
5572
|
}
|
|
5614
5573
|
pollUnsafe() {
|
|
5615
5574
|
return this._exit;
|
|
@@ -5675,7 +5634,7 @@ var FiberImpl = class {
|
|
|
5675
5634
|
current = cache.tracerContext ? cache.tracerContext(current, this) : current[evaluate$1](this);
|
|
5676
5635
|
if (current === Yield) {
|
|
5677
5636
|
const yielded = this._yielded;
|
|
5678
|
-
if (
|
|
5637
|
+
if ("~effect/Exit" in yielded) {
|
|
5679
5638
|
this._deferredInterrupt = false;
|
|
5680
5639
|
this._yielded = void 0;
|
|
5681
5640
|
return yielded;
|
|
@@ -5687,7 +5646,7 @@ var FiberImpl = class {
|
|
|
5687
5646
|
return Yield;
|
|
5688
5647
|
}
|
|
5689
5648
|
} catch (error) {
|
|
5690
|
-
if (!hasProperty(current, evaluate
|
|
5649
|
+
if (!hasProperty(current, "~effect/Effect/evaluate")) return exitDie(`Fiber.runLoop: Not a valid effect: ${String(current)}`);
|
|
5691
5650
|
current = exitDie(error);
|
|
5692
5651
|
}
|
|
5693
5652
|
} finally {
|
|
@@ -5772,7 +5731,7 @@ const fiberMiddleware = { interruptChildren: void 0 };
|
|
|
5772
5731
|
const fiberStackAnnotations = (fiber) => {
|
|
5773
5732
|
if (!fiber.cache.stackFrame) return void 0;
|
|
5774
5733
|
const annotations = /* @__PURE__ */ new Map();
|
|
5775
|
-
annotations.set(InterruptorStackTrace
|
|
5734
|
+
annotations.set(InterruptorStackTrace.key, fiber.cache.stackFrame);
|
|
5776
5735
|
return makeUnsafe$5(annotations);
|
|
5777
5736
|
};
|
|
5778
5737
|
/** @internal */
|
|
@@ -5859,7 +5818,7 @@ const yieldNow = /*#__PURE__*/ (/* @__PURE__ */ makePrimitive({
|
|
|
5859
5818
|
fiber.currentDispatcher.scheduleTask(() => {
|
|
5860
5819
|
if (resumed) return;
|
|
5861
5820
|
fiber.evaluate(exitVoid);
|
|
5862
|
-
}, this[args] ?? 0);
|
|
5821
|
+
}, this["~effect/Effect/args"] ?? 0);
|
|
5863
5822
|
return fiber.yieldWith(() => {
|
|
5864
5823
|
resumed = true;
|
|
5865
5824
|
});
|
|
@@ -6083,7 +6042,7 @@ const continuationMarksStack = /*#__PURE__*/ (() => {
|
|
|
6083
6042
|
setStackTraceLimit(1);
|
|
6084
6043
|
const error = /*#__PURE__*/ probe[marker]();
|
|
6085
6044
|
setStackTraceLimit(limit);
|
|
6086
|
-
return error.stack?.includes("[as
|
|
6045
|
+
return error.stack?.includes("[as " + marker + "]") === true;
|
|
6087
6046
|
})();
|
|
6088
6047
|
const mapCont = function(value, fiber) {
|
|
6089
6048
|
const f = this.payload;
|
|
@@ -6592,14 +6551,14 @@ const whileLoop$1 = /*#__PURE__*/ makePrimitive({
|
|
|
6592
6551
|
op: "While",
|
|
6593
6552
|
[contA](value, fiber) {
|
|
6594
6553
|
this[args].step(value);
|
|
6595
|
-
if (this[args].while()) {
|
|
6554
|
+
if (this["~effect/Effect/args"].while()) {
|
|
6596
6555
|
fiber._stack.push(this);
|
|
6597
6556
|
return this[args].body();
|
|
6598
6557
|
}
|
|
6599
6558
|
return exitVoid;
|
|
6600
6559
|
},
|
|
6601
6560
|
[evaluate$1](fiber) {
|
|
6602
|
-
if (this[args].while()) {
|
|
6561
|
+
if (this["~effect/Effect/args"].while()) {
|
|
6603
6562
|
fiber._stack.push(this);
|
|
6604
6563
|
return this[args].body();
|
|
6605
6564
|
}
|
|
@@ -6785,10 +6744,12 @@ const fiberScopeFinalizer = (fiber) => () => withFiber$1((current) => current ==
|
|
|
6785
6744
|
/** @internal */
|
|
6786
6745
|
const forkIn$1 = /*#__PURE__*/ dual((args) => isEffect(args[0]), (self, scope, options) => withFiber$1((parent) => {
|
|
6787
6746
|
const fiber = scope.state._tag === "Closed" ? new FiberImpl(parent.context) : forkUnsafe$1(parent, self, options?.startImmediately, true, options?.uninterruptible);
|
|
6788
|
-
if (!fiber._exit)
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6747
|
+
if (!fiber._exit) {
|
|
6748
|
+
if (scope.state._tag !== "Closed") {
|
|
6749
|
+
scopeAddFinalizerUnsafe(scope, fiber, fiberScopeFinalizer(fiber));
|
|
6750
|
+
fiber.addObserver(() => scopeRemoveFinalizerUnsafe(scope, fiber));
|
|
6751
|
+
} else fiber.interruptUnsafe(parent.id, fiberStackAnnotations(parent));
|
|
6752
|
+
}
|
|
6792
6753
|
return succeed$4(fiber);
|
|
6793
6754
|
}));
|
|
6794
6755
|
/** @internal */
|
|
@@ -6798,11 +6759,13 @@ const runForkWith = (context) => (effect, options) => {
|
|
|
6798
6759
|
const fiber = new FiberImpl(options?.scheduler ? add$1(context, Scheduler, options.scheduler) : context, options?.uninterruptible !== true);
|
|
6799
6760
|
fiber.evaluate(effect);
|
|
6800
6761
|
if (fiber._exit) return fiber;
|
|
6801
|
-
if (options?.signal)
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6762
|
+
if (options?.signal) {
|
|
6763
|
+
if (options.signal.aborted) fiber.interruptUnsafe();
|
|
6764
|
+
else {
|
|
6765
|
+
const abort = () => fiber.interruptUnsafe();
|
|
6766
|
+
options.signal.addEventListener("abort", abort, { once: true });
|
|
6767
|
+
fiber.addObserver(() => options.signal.removeEventListener("abort", abort));
|
|
6768
|
+
}
|
|
6806
6769
|
}
|
|
6807
6770
|
if (options?.onFiberStart) options.onFiberStart(fiber);
|
|
6808
6771
|
return fiber;
|
|
@@ -6975,13 +6938,10 @@ const wallTimeNanos = /*#__PURE__*/ function() {
|
|
|
6975
6938
|
return origin + monotonic;
|
|
6976
6939
|
};
|
|
6977
6940
|
}();
|
|
6978
|
-
TaggedError$1("TimeoutError");
|
|
6979
|
-
TaggedError$1("IllegalArgumentError");
|
|
6980
|
-
TaggedError$1("ExceededCapacityError");
|
|
6981
6941
|
/** @internal */
|
|
6982
6942
|
const AsyncFiberErrorTypeId = "~effect/Cause/AsyncFiberError";
|
|
6983
6943
|
/** @internal */
|
|
6984
|
-
var AsyncFiberError = class extends TaggedError$1("AsyncFiberError") {
|
|
6944
|
+
var AsyncFiberError = class extends (/*#__PURE__*/ TaggedError$1("AsyncFiberError")) {
|
|
6985
6945
|
[AsyncFiberErrorTypeId] = AsyncFiberErrorTypeId;
|
|
6986
6946
|
constructor(fiber) {
|
|
6987
6947
|
super({
|
|
@@ -6993,7 +6953,7 @@ var AsyncFiberError = class extends TaggedError$1("AsyncFiberError") {
|
|
|
6993
6953
|
/** @internal */
|
|
6994
6954
|
const UnknownErrorTypeId = "~effect/Cause/UnknownError";
|
|
6995
6955
|
/** @internal */
|
|
6996
|
-
var UnknownError$1 = class extends TaggedError$1("UnknownError") {
|
|
6956
|
+
var UnknownError$1 = class extends (/*#__PURE__*/ TaggedError$1("UnknownError")) {
|
|
6997
6957
|
[UnknownErrorTypeId] = UnknownErrorTypeId;
|
|
6998
6958
|
constructor(cause, message) {
|
|
6999
6959
|
super({
|
|
@@ -7124,20 +7084,7 @@ const tracerLogger = /*#__PURE__*/ loggerMake(({ cause, fiber, logLevel, message
|
|
|
7124
7084
|
if (cause.reasons.length > 0) attributes["effect.cause"] = causePretty(cause);
|
|
7125
7085
|
span.event(toStringUnknown(Array.isArray(message) && message.length === 1 ? message[0] : message), clock.currentTimeNanosUnsafe(), attributes);
|
|
7126
7086
|
});
|
|
7127
|
-
|
|
7128
|
-
//#region node_modules/effect/dist/Cause.js
|
|
7129
|
-
/**
|
|
7130
|
-
* Records the full reason an `Effect` failed.
|
|
7131
|
-
*
|
|
7132
|
-
* A `Cause<E>` can contain typed failures, unexpected defects, interruptions,
|
|
7133
|
-
* and annotations. Keeping those details together lets code inspect or format
|
|
7134
|
-
* failures without first collapsing them to a single error value. This module
|
|
7135
|
-
* includes the `Cause` and `Reason` data types, helpers for building and
|
|
7136
|
-
* checking causes, and small error types used by several Effect APIs.
|
|
7137
|
-
*
|
|
7138
|
-
* @stability stable
|
|
7139
|
-
* @since 2.0.0
|
|
7140
|
-
*/
|
|
7087
|
+
// node_modules/effect/dist/Cause.js
|
|
7141
7088
|
/**
|
|
7142
7089
|
* Checks whether an arbitrary value is a `Cause`.
|
|
7143
7090
|
*
|
|
@@ -7441,10 +7388,7 @@ const done$1 = done$2;
|
|
|
7441
7388
|
* @since 4.0.0
|
|
7442
7389
|
*/
|
|
7443
7390
|
const UnknownError = UnknownError$1;
|
|
7444
|
-
|
|
7445
|
-
Service()("effect/Cause/InterruptorStackTrace");
|
|
7446
|
-
//#endregion
|
|
7447
|
-
//#region node_modules/effect/dist/Exit.js
|
|
7391
|
+
// node_modules/effect/dist/Exit.js
|
|
7448
7392
|
/**
|
|
7449
7393
|
* Creates a successful Exit containing the given value.
|
|
7450
7394
|
*
|
|
@@ -7762,8 +7706,7 @@ const doneUnsafe = (self, effect) => {
|
|
|
7762
7706
|
}
|
|
7763
7707
|
return true;
|
|
7764
7708
|
};
|
|
7765
|
-
|
|
7766
|
-
//#region node_modules/effect/dist/Scope.js
|
|
7709
|
+
// node_modules/effect/dist/Scope.js
|
|
7767
7710
|
/**
|
|
7768
7711
|
* Controls how long resources stay open.
|
|
7769
7712
|
*
|
|
@@ -7960,8 +7903,7 @@ const forkUnsafe = scopeForkUnsafe;
|
|
|
7960
7903
|
* @since 2.0.0
|
|
7961
7904
|
*/
|
|
7962
7905
|
const close = scopeClose;
|
|
7963
|
-
|
|
7964
|
-
//#region node_modules/effect/dist/Layer.js
|
|
7906
|
+
// node_modules/effect/dist/Layer.js
|
|
7965
7907
|
const TypeId$22 = "~effect/Layer";
|
|
7966
7908
|
const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
7967
7909
|
const makeMemoMapEntry = (memoMap, layer) => {
|
|
@@ -8180,7 +8122,7 @@ const forkMemoMapUnsafe = (parent) => new MemoMapImpl(parent);
|
|
|
8180
8122
|
* @category services
|
|
8181
8123
|
* @since 3.13.0
|
|
8182
8124
|
*/
|
|
8183
|
-
var CurrentMemoMap = class CurrentMemoMap extends Service()("effect/Layer/CurrentMemoMap") {
|
|
8125
|
+
var CurrentMemoMap = class CurrentMemoMap extends (/*#__PURE__*/ Service()("effect/Layer/CurrentMemoMap")) {
|
|
8184
8126
|
static forkOrCreate(self) {
|
|
8185
8127
|
const current = getOrUndefined(self, CurrentMemoMap);
|
|
8186
8128
|
return current ? forkMemoMapUnsafe(current) : makeMemoMapUnsafe();
|
|
@@ -8721,8 +8663,7 @@ const provideMerge = /*#__PURE__*/ dual(2, (self, that) => provideWith(self, tha
|
|
|
8721
8663
|
* @since 2.0.0
|
|
8722
8664
|
*/
|
|
8723
8665
|
const flatMap$1 = /*#__PURE__*/ dual(2, (self, f) => fromBuild((memoMap, scope) => flatMap$2(self.build(memoMap, scope), (context) => f(context).build(memoMap, scope))));
|
|
8724
|
-
|
|
8725
|
-
//#region node_modules/effect/dist/internal/dateTime.js
|
|
8666
|
+
// node_modules/effect/dist/internal/dateTime.js
|
|
8726
8667
|
/** @internal */
|
|
8727
8668
|
const TypeId$21 = "~effect/DateTime";
|
|
8728
8669
|
/** @internal */
|
|
@@ -8751,8 +8692,7 @@ const ProtoTimeZone = {
|
|
|
8751
8692
|
({ ...ProtoTimeZone });
|
|
8752
8693
|
/** @internal */
|
|
8753
8694
|
const toDateUtc$1 = (self) => new Date(self.epochMilliseconds);
|
|
8754
|
-
|
|
8755
|
-
//#region node_modules/effect/dist/Pull.js
|
|
8695
|
+
// node_modules/effect/dist/Pull.js
|
|
8756
8696
|
/**
|
|
8757
8697
|
* Models one low-level pull step for stream-like consumers.
|
|
8758
8698
|
*
|
|
@@ -8929,13 +8869,11 @@ const matchEffect$1 = /*#__PURE__*/ dual(2, (self, options) => matchCauseEffect$
|
|
|
8929
8869
|
return !isFailure(halt) ? options.onDone(halt.success.value) : options.onFailure(halt.failure);
|
|
8930
8870
|
}
|
|
8931
8871
|
}));
|
|
8932
|
-
|
|
8933
|
-
//#region node_modules/effect/dist/internal/layer.js
|
|
8872
|
+
// node_modules/effect/dist/internal/layer.js
|
|
8934
8873
|
const provideLayer = (self, layer, options) => scopedWith$1((scope) => flatMap$2(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext(self, context)));
|
|
8935
8874
|
/** @internal */
|
|
8936
8875
|
const provide$1 = /*#__PURE__*/ dual((args) => isEffect(args[0]), (self, source, options) => isContext(source) ? provideContext(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
|
|
8937
|
-
|
|
8938
|
-
//#region node_modules/effect/dist/Effect.js
|
|
8876
|
+
// node_modules/effect/dist/Effect.js
|
|
8939
8877
|
/**
|
|
8940
8878
|
* Combines an iterable or record of effects into one effect whose success shape
|
|
8941
8879
|
* follows the input.
|
|
@@ -11550,7 +11488,6 @@ const runSyncExit = runSyncExit$1;
|
|
|
11550
11488
|
* @since 3.12.0
|
|
11551
11489
|
*/
|
|
11552
11490
|
const fnUntraced = fnUntraced$1;
|
|
11553
|
-
Service()("effect/Effect/Transaction");
|
|
11554
11491
|
/**
|
|
11555
11492
|
* Converts an error-first callback API into a function that returns an
|
|
11556
11493
|
* `Effect`.
|
|
@@ -11721,8 +11658,7 @@ const flatMapEager = flatMapEager$1;
|
|
|
11721
11658
|
* @since 4.0.0
|
|
11722
11659
|
*/
|
|
11723
11660
|
const fnUntracedEager = fnUntracedEager$1;
|
|
11724
|
-
|
|
11725
|
-
//#region node_modules/effect/dist/MutableList.js
|
|
11661
|
+
// node_modules/effect/dist/MutableList.js
|
|
11726
11662
|
/**
|
|
11727
11663
|
* Mutable lists for collecting ordered values and draining them from the front.
|
|
11728
11664
|
* A `MutableList<A>` can append values to the end, prepend values to the
|
|
@@ -11941,13 +11877,13 @@ const take$1 = (self) => {
|
|
|
11941
11877
|
if (self.head.mutable) self.head.array[self.head.offset] = void 0;
|
|
11942
11878
|
self.head.offset++;
|
|
11943
11879
|
self.length--;
|
|
11944
|
-
if (self.head.offset === self.head.array.length)
|
|
11945
|
-
|
|
11946
|
-
|
|
11880
|
+
if (self.head.offset === self.head.array.length) {
|
|
11881
|
+
if (self.head.next) self.head = self.head.next;
|
|
11882
|
+
else clear(self);
|
|
11883
|
+
} else compactHead(self);
|
|
11947
11884
|
return message;
|
|
11948
11885
|
};
|
|
11949
|
-
|
|
11950
|
-
//#region node_modules/effect/dist/Queue.js
|
|
11886
|
+
// node_modules/effect/dist/Queue.js
|
|
11951
11887
|
const TypeId$20 = "~effect/Queue";
|
|
11952
11888
|
const EnqueueTypeId = "~effect/Queue/Enqueue";
|
|
11953
11889
|
const DequeueTypeId = "~effect/Queue/Dequeue";
|
|
@@ -12704,8 +12640,7 @@ const finalize = (self, exit) => {
|
|
|
12704
12640
|
for (const awaiter of openState.awaiters) awaiter(exit);
|
|
12705
12641
|
openState.awaiters.clear();
|
|
12706
12642
|
};
|
|
12707
|
-
|
|
12708
|
-
//#region node_modules/effect/dist/BigDecimal.js
|
|
12643
|
+
// node_modules/effect/dist/BigDecimal.js
|
|
12709
12644
|
/**
|
|
12710
12645
|
* Decimal numbers and arithmetic for cases where JavaScript `number` rounding
|
|
12711
12646
|
* is not precise enough. A `BigDecimal` stores digits as a `bigint` plus a
|
|
@@ -12842,12 +12777,14 @@ const zero = /*#__PURE__*/ makeNormalized(bigint0$1, 0);
|
|
|
12842
12777
|
* @since 2.0.0
|
|
12843
12778
|
*/
|
|
12844
12779
|
const normalize$1 = (self) => {
|
|
12845
|
-
if (self.normalized === void 0)
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
12780
|
+
if (self.normalized === void 0) {
|
|
12781
|
+
if (self.value === bigint0$1) self.normalized = zero;
|
|
12782
|
+
else {
|
|
12783
|
+
const digits = `${self.value}`;
|
|
12784
|
+
let end = digits.length;
|
|
12785
|
+
while (digits[end - 1] === "0") end--;
|
|
12786
|
+
self.normalized = makeNormalized(BigInt(digits.slice(0, end)), self.scale - (digits.length - end));
|
|
12787
|
+
}
|
|
12851
12788
|
}
|
|
12852
12789
|
return self.normalized;
|
|
12853
12790
|
};
|
|
@@ -12987,8 +12924,7 @@ const toExponential = (n) => {
|
|
|
12987
12924
|
* @since 2.0.0
|
|
12988
12925
|
*/
|
|
12989
12926
|
const isZero = (n) => n.value === bigint0$1;
|
|
12990
|
-
|
|
12991
|
-
//#region node_modules/effect/dist/BigInt.js
|
|
12927
|
+
// node_modules/effect/dist/BigInt.js
|
|
12992
12928
|
/**
|
|
12993
12929
|
* Exposes the global bigint constructor for JavaScript bigint coercion.
|
|
12994
12930
|
*
|
|
@@ -13052,8 +12988,7 @@ const toNumber = (b) => {
|
|
|
13052
12988
|
if (b > BigInt$4(Number.MAX_SAFE_INTEGER) || b < BigInt$4(Number.MIN_SAFE_INTEGER)) return none();
|
|
13053
12989
|
return some(Number(b));
|
|
13054
12990
|
};
|
|
13055
|
-
|
|
13056
|
-
//#region node_modules/effect/dist/ByteSize.js
|
|
12991
|
+
// node_modules/effect/dist/ByteSize.js
|
|
13057
12992
|
const bigint0 = /*#__PURE__*/ BigInt(0);
|
|
13058
12993
|
const bigint1 = /*#__PURE__*/ BigInt(1);
|
|
13059
12994
|
const decimalBase = /*#__PURE__*/ BigInt(1e3);
|
|
@@ -13299,12 +13234,9 @@ const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
|
|
|
13299
13234
|
const codes = /*#__PURE__*/ (/* @__PURE__ */ new Uint8Array(123)).fill(255);
|
|
13300
13235
|
for (let i = 0; i < 64; i++) codes[/*#__PURE__*/ alphabet.charCodeAt(i)] = i;
|
|
13301
13236
|
codes[/*#__PURE__*/ "=".charCodeAt(0)] = 0;
|
|
13302
|
-
Service()("effect/DateTime/CurrentTimeZone");
|
|
13303
|
-
TaggedError("CookiesError");
|
|
13304
13237
|
({ ...BaseProto });
|
|
13305
13238
|
({ ...BaseProto });
|
|
13306
|
-
|
|
13307
|
-
//#region node_modules/effect/dist/internal/redacted.js
|
|
13239
|
+
// node_modules/effect/dist/internal/redacted.js
|
|
13308
13240
|
/** @internal */
|
|
13309
13241
|
const redactedRegistry = /*#__PURE__*/ new WeakMap();
|
|
13310
13242
|
/** @internal */
|
|
@@ -13312,8 +13244,7 @@ const value$1 = (self) => {
|
|
|
13312
13244
|
if (redactedRegistry.has(self)) return redactedRegistry.get(self);
|
|
13313
13245
|
else throw new Error("Unable to get redacted value" + (self.label ? ` with label: "${self.label}"` : ""));
|
|
13314
13246
|
};
|
|
13315
|
-
|
|
13316
|
-
//#region node_modules/effect/dist/Redacted.js
|
|
13247
|
+
// node_modules/effect/dist/Redacted.js
|
|
13317
13248
|
/**
|
|
13318
13249
|
* Wraps sensitive values so normal output does not reveal them.
|
|
13319
13250
|
*
|
|
@@ -13431,22 +13362,8 @@ const Proto$3 = {
|
|
|
13431
13362
|
*/
|
|
13432
13363
|
const value = value$1;
|
|
13433
13364
|
BaseProto.toString, BaseProto[NodeInspectSymbol];
|
|
13434
|
-
TaggedError("HeaderParseError");
|
|
13435
13365
|
({ ...PipeInspectableProto });
|
|
13436
|
-
|
|
13437
|
-
const entries = typeof input[Symbol.iterator] === "function" ? fromIterable$1(input) : Object.entries(input);
|
|
13438
|
-
const out = [];
|
|
13439
|
-
for (const [key, value] of entries) if (Array.isArray(value)) {
|
|
13440
|
-
for (let i = 0; i < value.length; i++) if (value[i] !== void 0) out.push([key, coerce(value[i])]);
|
|
13441
|
-
} else if (value !== null && typeof value === "object" && !isRedacted(value)) {
|
|
13442
|
-
const nested = fromInputNested(value);
|
|
13443
|
-
for (const [k, v] of nested) out.push([[key, ...typeof k === "string" ? [k] : k], v]);
|
|
13444
|
-
} else if (value !== void 0) out.push([key, coerce(value)]);
|
|
13445
|
-
return out;
|
|
13446
|
-
};
|
|
13447
|
-
const coerce = (value) => isRedacted(value) ? value : String(value);
|
|
13448
|
-
//#endregion
|
|
13449
|
-
//#region node_modules/effect/dist/internal/schema/annotations.js
|
|
13366
|
+
// node_modules/effect/dist/internal/schema/annotations.js
|
|
13450
13367
|
/** @internal */
|
|
13451
13368
|
function resolve$3(ast) {
|
|
13452
13369
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
@@ -13461,8 +13378,7 @@ const getExpected = /*#__PURE__*/ memoize((ast) => {
|
|
|
13461
13378
|
if (typeof identifier === "string") return identifier;
|
|
13462
13379
|
return ast.getExpected(getExpected);
|
|
13463
13380
|
});
|
|
13464
|
-
|
|
13465
|
-
//#region node_modules/effect/dist/internal/schema/parser.js
|
|
13381
|
+
// node_modules/effect/dist/internal/schema/parser.js
|
|
13466
13382
|
/** @internal */
|
|
13467
13383
|
const missing = /*#__PURE__*/ Symbol();
|
|
13468
13384
|
/** @internal */
|
|
@@ -13475,8 +13391,7 @@ const sameExit = /*#__PURE__*/ succeed(missing);
|
|
|
13475
13391
|
const toOption = (value) => value === missing ? none() : some(value);
|
|
13476
13392
|
/** @internal */
|
|
13477
13393
|
const fromOptionExit = (option) => option._tag === "None" ? missingExit : succeed(option.value);
|
|
13478
|
-
|
|
13479
|
-
//#region node_modules/effect/dist/SchemaIssue.js
|
|
13394
|
+
// node_modules/effect/dist/SchemaIssue.js
|
|
13480
13395
|
/**
|
|
13481
13396
|
* Describes problems found while decoding, encoding, or checking data with
|
|
13482
13397
|
* schemas.
|
|
@@ -13959,9 +13874,7 @@ function formatIssue(issue, path, messageOverride) {
|
|
|
13959
13874
|
if (issue._tag === "Composite" || issue.issues.length > 0) return issue.issues.map((issue) => formatIssue(issue, path, messageOverride)).join("\n");
|
|
13960
13875
|
message = messageOverride ?? findMessage(issue) ?? getExpectedMessage(getExpected(issue.ast), issue);
|
|
13961
13876
|
break;
|
|
13962
|
-
default:
|
|
13963
|
-
message = messageOverride ?? defaultLeafHook(issue);
|
|
13964
|
-
break;
|
|
13877
|
+
default: message = messageOverride ?? defaultLeafHook(issue);
|
|
13965
13878
|
}
|
|
13966
13879
|
return path ? `${message}\n at ${path}` : message;
|
|
13967
13880
|
}
|
|
@@ -13971,8 +13884,7 @@ function findMessage(issue) {
|
|
|
13971
13884
|
const message = (issue._tag === "Filter" ? issue.filter.annotations : "annotations" in issue ? issue.annotations : issue.ast.annotations)?.[issue._tag === "MissingKey" ? "messageMissingKey" : issue._tag === "UnexpectedKey" ? "messageUnexpectedKey" : "message"];
|
|
13972
13885
|
if (typeof message === "string") return message;
|
|
13973
13886
|
}
|
|
13974
|
-
|
|
13975
|
-
//#region node_modules/effect/dist/internal/schema/cause.js
|
|
13887
|
+
// node_modules/effect/dist/internal/schema/cause.js
|
|
13976
13888
|
/** @internal */
|
|
13977
13889
|
function getSchemaIssue(cause) {
|
|
13978
13890
|
let issue;
|
|
@@ -13988,8 +13900,7 @@ function getSchemaIssueOrThrow(cause, message) {
|
|
|
13988
13900
|
if (issue === void 0) throw new Error(message, { cause });
|
|
13989
13901
|
return issue;
|
|
13990
13902
|
}
|
|
13991
|
-
|
|
13992
|
-
//#region node_modules/effect/dist/SchemaGetter.js
|
|
13903
|
+
// node_modules/effect/dist/SchemaGetter.js
|
|
13993
13904
|
const makeGetter = (fields) => Object.assign(Object.create(Prototype$1), fields);
|
|
13994
13905
|
const passthrough_$1 = /*#__PURE__*/ makeGetter({ _tag: "Passthrough" });
|
|
13995
13906
|
function passthrough$1() {
|
|
@@ -14100,8 +14011,7 @@ function String$3() {
|
|
|
14100
14011
|
function Number$3() {
|
|
14101
14012
|
return transform$1(globalThis.Number);
|
|
14102
14013
|
}
|
|
14103
|
-
|
|
14104
|
-
//#region node_modules/effect/dist/SchemaTransformation.js
|
|
14014
|
+
// node_modules/effect/dist/SchemaTransformation.js
|
|
14105
14015
|
/**
|
|
14106
14016
|
* Constructs schema middleware from its decode and encode functions.
|
|
14107
14017
|
*
|
|
@@ -14253,8 +14163,7 @@ function passthrough() {
|
|
|
14253
14163
|
* @since 4.0.0
|
|
14254
14164
|
*/
|
|
14255
14165
|
const numberFromString = /*#__PURE__*/ new Transformation(/*#__PURE__*/ Number$3(), /*#__PURE__*/ String$3());
|
|
14256
|
-
|
|
14257
|
-
//#region node_modules/effect/dist/SchemaAST.js
|
|
14166
|
+
// node_modules/effect/dist/SchemaAST.js
|
|
14258
14167
|
/**
|
|
14259
14168
|
* Represents Effect schemas as runtime trees.
|
|
14260
14169
|
*
|
|
@@ -14748,9 +14657,10 @@ const Arrays = class extends ASTNodeImpl {
|
|
|
14748
14657
|
if (ast.rest.length === 0 && len > elementLen) for (let i = elementLen; i < len; i++) {
|
|
14749
14658
|
const unexpected = new UnexpectedKey(ast, input[i], options);
|
|
14750
14659
|
const issue = new Pointer([i], unexpected);
|
|
14751
|
-
if (options.errors === "all")
|
|
14752
|
-
|
|
14753
|
-
|
|
14660
|
+
if (options.errors === "all") {
|
|
14661
|
+
if (state.issues) state.issues.push(issue);
|
|
14662
|
+
else state.issues = [issue];
|
|
14663
|
+
} else return fail$4(new Composite(ast, [issue], input, options));
|
|
14754
14664
|
}
|
|
14755
14665
|
if (state.issues) return fail$4(new Composite(ast, state.issues, input, options));
|
|
14756
14666
|
return succeed(state.output);
|
|
@@ -14829,9 +14739,10 @@ function stepArray(s, item, exit, i) {
|
|
|
14829
14739
|
const p = s.getParser(s.tailThreshold, i);
|
|
14830
14740
|
if (isOptional(p.ast)) return;
|
|
14831
14741
|
const issue = new Pointer([i], new MissingKey(p.ast.context?.annotations));
|
|
14832
|
-
if (s.options.errors === "all")
|
|
14833
|
-
|
|
14834
|
-
|
|
14742
|
+
if (s.options.errors === "all") {
|
|
14743
|
+
if (s.issues) s.issues.push(issue);
|
|
14744
|
+
else s.issues = [issue];
|
|
14745
|
+
} else return fail$6(new Composite(s.ast, [issue], s.input, s.options));
|
|
14835
14746
|
}
|
|
14836
14747
|
}
|
|
14837
14748
|
const parseArrayOptions = {
|
|
@@ -14849,9 +14760,10 @@ const wrapPropertyKeyIssue = (s, ast, key, exit) => {
|
|
|
14849
14760
|
const issue = getSchemaIssue(exit.cause);
|
|
14850
14761
|
if (issue === void 0) return failCause$2(map$1(exit.cause, (issue) => new Composite(ast, [new Pointer([key], issue)], s.input, s.options)));
|
|
14851
14762
|
const pointer = new Pointer([key], issue);
|
|
14852
|
-
if (s.options.errors === "all")
|
|
14853
|
-
|
|
14854
|
-
|
|
14763
|
+
if (s.options.errors === "all") {
|
|
14764
|
+
if (s.issues) s.issues.push(pointer);
|
|
14765
|
+
else s.issues = [pointer];
|
|
14766
|
+
} else return fail$6(new Composite(ast, [pointer], s.input, s.options));
|
|
14855
14767
|
};
|
|
14856
14768
|
/**
|
|
14857
14769
|
* floating point or integer, with optional exponent
|
|
@@ -15195,10 +15107,6 @@ function getAST(self) {
|
|
|
15195
15107
|
return self.ast;
|
|
15196
15108
|
}
|
|
15197
15109
|
/** @internal */
|
|
15198
|
-
function tuple(elements, checks = void 0) {
|
|
15199
|
-
return new Arrays(false, elements.map((e) => e.ast), [], void 0, checks);
|
|
15200
|
-
}
|
|
15201
|
-
/** @internal */
|
|
15202
15110
|
function union$1(members, options, checks) {
|
|
15203
15111
|
return new Union$1(members.map(getAST), options, void 0, checks);
|
|
15204
15112
|
}
|
|
@@ -15962,10 +15870,10 @@ const flip = /*#__PURE__*/ memoize((ast) => {
|
|
|
15962
15870
|
return "flip" in ast ? ast.flip(flip) : "recur" in ast ? ast.recur(flip) : ast;
|
|
15963
15871
|
});
|
|
15964
15872
|
function fromConst(ast, value) {
|
|
15965
|
-
const succeed$
|
|
15873
|
+
const succeed$8 = value === 0 ? sameExit : succeed(value);
|
|
15966
15874
|
return (input, options) => {
|
|
15967
15875
|
if (input === missing) return missingExit;
|
|
15968
|
-
if (input === value) return succeed$
|
|
15876
|
+
if (input === value) return succeed$8;
|
|
15969
15877
|
return fail$4(new InvalidType(ast, input, options));
|
|
15970
15878
|
};
|
|
15971
15879
|
}
|
|
@@ -16026,8 +15934,7 @@ function getConstructorDescriptor(ast) {
|
|
|
16026
15934
|
const getDescriptor = ast.annotations?.[CONSTRUCTOR_ANNOTATION_KEY];
|
|
16027
15935
|
return isFunction(getDescriptor) ? getDescriptor(ast.typeParameters) : void 0;
|
|
16028
15936
|
}
|
|
16029
|
-
|
|
16030
|
-
//#region node_modules/effect/dist/internal/schema/interpreter.js
|
|
15937
|
+
// node_modules/effect/dist/internal/schema/interpreter.js
|
|
16031
15938
|
const flatMapTransformation = (result, current, f) => result === sameExit ? f(current) : flatMapEager(result, f);
|
|
16032
15939
|
function compileTransformation(transformation) {
|
|
16033
15940
|
const apply = compileTransformationUnsafe(transformation);
|
|
@@ -16106,35 +16013,39 @@ function compile$1(ast, compile, compileField, base, specialize) {
|
|
|
16106
16013
|
const parseChecks = (input, options) => {
|
|
16107
16014
|
let result = parser(input, options);
|
|
16108
16015
|
try {
|
|
16109
|
-
if (encodingChecks && !options.disableChecks)
|
|
16110
|
-
if (result
|
|
16111
|
-
|
|
16112
|
-
|
|
16016
|
+
if (encodingChecks && !options.disableChecks) {
|
|
16017
|
+
if (effectIsExit(result)) {
|
|
16018
|
+
if (result._tag === "Success") {
|
|
16019
|
+
const output = result === sameExit ? input : result[args];
|
|
16020
|
+
if (input !== missing && output !== missing) {
|
|
16021
|
+
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
16022
|
+
if (issues) result = fail$4(new Composite(ast, issues, input, options));
|
|
16023
|
+
}
|
|
16024
|
+
}
|
|
16025
|
+
} else result = flatMap(result, (value) => {
|
|
16026
|
+
if (input !== missing && value !== missing) {
|
|
16113
16027
|
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
16114
|
-
if (issues)
|
|
16028
|
+
if (issues) return fail$4(new Composite(ast, issues, input, options));
|
|
16115
16029
|
}
|
|
16116
|
-
|
|
16117
|
-
|
|
16118
|
-
|
|
16119
|
-
|
|
16120
|
-
|
|
16121
|
-
|
|
16122
|
-
|
|
16123
|
-
|
|
16124
|
-
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
|
|
16133
|
-
|
|
16134
|
-
|
|
16135
|
-
}
|
|
16136
|
-
return succeed$1(value);
|
|
16137
|
-
});
|
|
16030
|
+
return succeed$1(value);
|
|
16031
|
+
});
|
|
16032
|
+
}
|
|
16033
|
+
if (checks && !options.disableChecks) {
|
|
16034
|
+
if (effectIsExit(result)) {
|
|
16035
|
+
if (result._tag === "Success") {
|
|
16036
|
+
const value = result === sameExit ? input : result[args];
|
|
16037
|
+
if (value === missing) return result;
|
|
16038
|
+
const issues = collectIssues(checks, value, void 0, ast, options);
|
|
16039
|
+
if (issues) result = fail$4(new Composite(ast, issues, value, options));
|
|
16040
|
+
}
|
|
16041
|
+
} else result = flatMap(result, (value) => {
|
|
16042
|
+
if (value !== missing) {
|
|
16043
|
+
const issues = collectIssues(checks, value, void 0, ast, options);
|
|
16044
|
+
if (issues) return fail$4(new Composite(ast, issues, value, options));
|
|
16045
|
+
}
|
|
16046
|
+
return succeed$1(value);
|
|
16047
|
+
});
|
|
16048
|
+
}
|
|
16138
16049
|
return result;
|
|
16139
16050
|
} catch (error) {
|
|
16140
16051
|
return die(error);
|
|
@@ -16171,8 +16082,7 @@ function compile$1(ast, compile, compileField, base, specialize) {
|
|
|
16171
16082
|
});
|
|
16172
16083
|
};
|
|
16173
16084
|
}
|
|
16174
|
-
|
|
16175
|
-
//#region node_modules/effect/dist/internal/schema/compilerRegistry.js
|
|
16085
|
+
// node_modules/effect/dist/internal/schema/compilerRegistry.js
|
|
16176
16086
|
/** @internal */
|
|
16177
16087
|
const invalid = /*#__PURE__*/ Symbol();
|
|
16178
16088
|
const cache = /*#__PURE__*/ new WeakMap();
|
|
@@ -16202,8 +16112,7 @@ function resolve$2(ast) {
|
|
|
16202
16112
|
cache.set(ast, entry);
|
|
16203
16113
|
return entry;
|
|
16204
16114
|
}
|
|
16205
|
-
|
|
16206
|
-
//#region node_modules/effect/dist/SchemaParser.js
|
|
16115
|
+
// node_modules/effect/dist/SchemaParser.js
|
|
16207
16116
|
/**
|
|
16208
16117
|
* Runs schemas against real values.
|
|
16209
16118
|
*
|
|
@@ -16343,7 +16252,7 @@ function run$2(ast) {
|
|
|
16343
16252
|
function parserResult(result, input) {
|
|
16344
16253
|
if (result === sameExit) return succeed$1(input);
|
|
16345
16254
|
if (!effectIsExit(result)) return flatMapEager(result, getValue);
|
|
16346
|
-
return result[args] === missing ? getValue(missing) : result;
|
|
16255
|
+
return result["~effect/Effect/args"] === missing ? getValue(missing) : result;
|
|
16347
16256
|
}
|
|
16348
16257
|
function runWithCompiler(compiler, ast) {
|
|
16349
16258
|
let parser;
|
|
@@ -16351,7 +16260,7 @@ function runWithCompiler(compiler, ast) {
|
|
|
16351
16260
|
const result = (parser ??= compiler(ast))(input, options ?? defaultParseOptions);
|
|
16352
16261
|
if (result === sameExit) return succeed$1(input);
|
|
16353
16262
|
if (!effectIsExit(result)) return flatMapEager(result, getValue);
|
|
16354
|
-
return result[args] === missing ? getValue(missing) : result;
|
|
16263
|
+
return result["~effect/Effect/args"] === missing ? getValue(missing) : result;
|
|
16355
16264
|
};
|
|
16356
16265
|
}
|
|
16357
16266
|
function runSync(effect, message) {
|
|
@@ -16387,8 +16296,7 @@ function constructSync(entry, input, options) {
|
|
|
16387
16296
|
}
|
|
16388
16297
|
const normalCompiler = (ast) => resolve$2(ast).parser;
|
|
16389
16298
|
const constructorCompiler = (ast) => resolve$2(ast).makeEffect;
|
|
16390
|
-
|
|
16391
|
-
//#region node_modules/effect/dist/internal/schema/make.js
|
|
16299
|
+
// node_modules/effect/dist/internal/schema/make.js
|
|
16392
16300
|
/** @internal */
|
|
16393
16301
|
const TypeId$11 = "~effect/Schema/Schema";
|
|
16394
16302
|
const RebuildOptions = /*#__PURE__*/ Symbol();
|
|
@@ -16444,8 +16352,7 @@ function make$8(ast, options) {
|
|
|
16444
16352
|
self.ast = ast;
|
|
16445
16353
|
return self;
|
|
16446
16354
|
}
|
|
16447
|
-
|
|
16448
|
-
//#region node_modules/effect/dist/Struct.js
|
|
16355
|
+
// node_modules/effect/dist/Struct.js
|
|
16449
16356
|
/**
|
|
16450
16357
|
* Wraps a plain function as a {@link Lambda} value so it can be used with
|
|
16451
16358
|
* {@link map}, {@link mapPick}, and {@link mapOmit}.
|
|
@@ -16484,10 +16391,8 @@ function make$8(ast, options) {
|
|
|
16484
16391
|
* @since 4.0.0
|
|
16485
16392
|
*/
|
|
16486
16393
|
const lambda = (f) => f;
|
|
16487
|
-
|
|
16488
|
-
//#region node_modules/effect/dist/internal/schemaError.js
|
|
16394
|
+
// node_modules/effect/dist/internal/schemaError.js
|
|
16489
16395
|
const SchemaErrorTypeId = "~effect/Schema/SchemaError";
|
|
16490
|
-
TaggedError("NetAddressError");
|
|
16491
16396
|
({ ...BaseProto });
|
|
16492
16397
|
({ ...BaseProto });
|
|
16493
16398
|
({ ...BaseProto });
|
|
@@ -16496,8 +16401,6 @@ TaggedError("NetAddressError");
|
|
|
16496
16401
|
({ ...BaseProto });
|
|
16497
16402
|
({ ...BaseProto });
|
|
16498
16403
|
({ ...BaseProto });
|
|
16499
|
-
TaggedError("DnsError");
|
|
16500
|
-
Service()("effect/net/Dns");
|
|
16501
16404
|
/**
|
|
16502
16405
|
* Error thrown or returned when schema decoding or encoding fails.
|
|
16503
16406
|
*
|
|
@@ -16529,7 +16432,7 @@ Service()("effect/net/Dns");
|
|
|
16529
16432
|
* @category errors
|
|
16530
16433
|
* @since 4.0.0
|
|
16531
16434
|
*/
|
|
16532
|
-
var SchemaError = class extends TaggedError("SchemaError") {
|
|
16435
|
+
var SchemaError = class extends (/*#__PURE__*/ TaggedError("SchemaError")) {
|
|
16533
16436
|
[SchemaErrorTypeId] = SchemaErrorTypeId;
|
|
16534
16437
|
constructor(issue) {
|
|
16535
16438
|
const stackTraceLimit = getStackTraceLimit();
|
|
@@ -16735,15 +16638,6 @@ function makeStruct(ast, fields) {
|
|
|
16735
16638
|
function Struct(fields) {
|
|
16736
16639
|
return makeStruct(struct(fields, void 0), fields);
|
|
16737
16640
|
}
|
|
16738
|
-
function makeTuple(ast, elements) {
|
|
16739
|
-
return make$7(ast, {
|
|
16740
|
-
elements,
|
|
16741
|
-
mapElements(f, options) {
|
|
16742
|
-
const elements = f(this.elements);
|
|
16743
|
-
return makeTuple(tuple(elements, options?.unsafePreserveChecks ? this.ast.checks : void 0), elements);
|
|
16744
|
-
}
|
|
16745
|
-
});
|
|
16746
|
-
}
|
|
16747
16641
|
/**
|
|
16748
16642
|
* @category constructors
|
|
16749
16643
|
* @since 4.0.0
|
|
@@ -16970,8 +16864,7 @@ globalThis.URL;
|
|
|
16970
16864
|
globalThis.File;
|
|
16971
16865
|
globalThis.URLSearchParams;
|
|
16972
16866
|
globalThis.Uint8Array;
|
|
16973
|
-
|
|
16974
|
-
//#region node_modules/effect/dist/Brand.js
|
|
16867
|
+
// node_modules/effect/dist/Brand.js
|
|
16975
16868
|
/**
|
|
16976
16869
|
* Returns a `Constructor` that **does not apply any runtime checks** and just
|
|
16977
16870
|
* returns the provided value.
|
|
@@ -16995,8 +16888,7 @@ function nominal() {
|
|
|
16995
16888
|
is: (_) => true
|
|
16996
16889
|
});
|
|
16997
16890
|
}
|
|
16998
|
-
|
|
16999
|
-
//#region node_modules/effect/dist/Latch.js
|
|
16891
|
+
// node_modules/effect/dist/Latch.js
|
|
17000
16892
|
/**
|
|
17001
16893
|
* Creates a `Latch` synchronously, outside of `Effect`.
|
|
17002
16894
|
*
|
|
@@ -17033,8 +16925,7 @@ function nominal() {
|
|
|
17033
16925
|
* @since 4.0.0
|
|
17034
16926
|
*/
|
|
17035
16927
|
const makeUnsafe = makeLatchUnsafe;
|
|
17036
|
-
|
|
17037
|
-
//#region node_modules/effect/dist/MutableRef.js
|
|
16928
|
+
// node_modules/effect/dist/MutableRef.js
|
|
17038
16929
|
/**
|
|
17039
16930
|
* Stores synchronous mutable state in a small reference object.
|
|
17040
16931
|
*
|
|
@@ -17102,8 +16993,7 @@ const make$6 = (value) => {
|
|
|
17102
16993
|
ref.current = value;
|
|
17103
16994
|
return ref;
|
|
17104
16995
|
};
|
|
17105
|
-
|
|
17106
|
-
//#region node_modules/effect/dist/Channel.js
|
|
16996
|
+
// node_modules/effect/dist/Channel.js
|
|
17107
16997
|
/**
|
|
17108
16998
|
* Provides low-level building blocks for streaming data through Effect.
|
|
17109
16999
|
*
|
|
@@ -17760,8 +17650,7 @@ const runFold = /*#__PURE__*/ dual(3, (self, initial, f) => suspend$2(() => {
|
|
|
17760
17650
|
* @since 4.0.0
|
|
17761
17651
|
*/
|
|
17762
17652
|
const toPullScoped = (self, scope) => toTransform(self)(done$1(), scope);
|
|
17763
|
-
|
|
17764
|
-
//#region node_modules/effect/dist/internal/glob.js
|
|
17653
|
+
// node_modules/effect/dist/internal/glob.js
|
|
17765
17654
|
const maxExpansions = 1e4;
|
|
17766
17655
|
const maxExpandedLength = 2 ** 22;
|
|
17767
17656
|
const maxBraceDepth = 64;
|
|
@@ -18119,9 +18008,7 @@ const step = (compiled, states, name) => {
|
|
|
18119
18008
|
case "Literal":
|
|
18120
18009
|
if (node.value === name) explicit.add(state + 1);
|
|
18121
18010
|
break;
|
|
18122
|
-
case "Wildcard":
|
|
18123
|
-
if (!root && matchWildcard(node, name, chars ??= Array.from(name), compiled.dot)) explicit.add(state + 1);
|
|
18124
|
-
break;
|
|
18011
|
+
case "Wildcard": if (!root && matchWildcard(node, name, chars ??= Array.from(name), compiled.dot)) explicit.add(state + 1);
|
|
18125
18012
|
}
|
|
18126
18013
|
}
|
|
18127
18014
|
return {
|
|
@@ -18226,8 +18113,7 @@ const walk = /*#__PURE__*/ fnUntraced(function* (fs, compiled, options) {
|
|
|
18226
18113
|
yield* directory("", compiled.initial, excludes.initial, true, out);
|
|
18227
18114
|
return out;
|
|
18228
18115
|
});
|
|
18229
|
-
|
|
18230
|
-
//#region node_modules/effect/dist/PlatformError.js
|
|
18116
|
+
// node_modules/effect/dist/PlatformError.js
|
|
18231
18117
|
/**
|
|
18232
18118
|
* Normalized errors for platform APIs.
|
|
18233
18119
|
*
|
|
@@ -18262,7 +18148,7 @@ const TypeId$6 = "~effect/PlatformError";
|
|
|
18262
18148
|
* @category errors
|
|
18263
18149
|
* @since 4.0.0
|
|
18264
18150
|
*/
|
|
18265
|
-
var BadArgument = class extends TaggedError("BadArgument") {
|
|
18151
|
+
var BadArgument = class extends (/*#__PURE__*/ TaggedError("BadArgument")) {
|
|
18266
18152
|
/**
|
|
18267
18153
|
* Formats the module, method, and optional description that rejected the argument.
|
|
18268
18154
|
*
|
|
@@ -18336,7 +18222,7 @@ var SystemError = class extends Error$1 {
|
|
|
18336
18222
|
* @category errors
|
|
18337
18223
|
* @since 4.0.0
|
|
18338
18224
|
*/
|
|
18339
|
-
var PlatformError = class extends TaggedError("PlatformError") {
|
|
18225
|
+
var PlatformError = class extends (/*#__PURE__*/ TaggedError("PlatformError")) {
|
|
18340
18226
|
constructor(reason) {
|
|
18341
18227
|
if ("cause" in reason) super({
|
|
18342
18228
|
reason,
|
|
@@ -18384,8 +18270,7 @@ const systemError = (options) => new PlatformError(new SystemError(options));
|
|
|
18384
18270
|
* @since 4.0.0
|
|
18385
18271
|
*/
|
|
18386
18272
|
const badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
18387
|
-
|
|
18388
|
-
//#region node_modules/effect/dist/internal/stream.js
|
|
18273
|
+
// node_modules/effect/dist/internal/stream.js
|
|
18389
18274
|
const TypeId$5 = "~effect/Stream";
|
|
18390
18275
|
const streamVariance = {
|
|
18391
18276
|
_R: identity,
|
|
@@ -18403,8 +18288,7 @@ Stream.prototype = {
|
|
|
18403
18288
|
};
|
|
18404
18289
|
/** @internal */
|
|
18405
18290
|
const fromChannel$2 = (channel) => new Stream(channel);
|
|
18406
|
-
|
|
18407
|
-
//#region node_modules/effect/dist/Sink.js
|
|
18291
|
+
// node_modules/effect/dist/Sink.js
|
|
18408
18292
|
const TypeId$4 = "~effect/Sink";
|
|
18409
18293
|
const endVoid = /*#__PURE__*/ succeed$1([void 0]);
|
|
18410
18294
|
const sinkVariance = {
|
|
@@ -18594,8 +18478,7 @@ const forEachArray = (f) => fromTransform((upstream) => upstream.pipe(flatMap(f)
|
|
|
18594
18478
|
* @since 2.0.0
|
|
18595
18479
|
*/
|
|
18596
18480
|
const unwrap$3 = (effect) => fromChannel$1(unwrap$4(map(effect, toChannel$1)));
|
|
18597
|
-
|
|
18598
|
-
//#region node_modules/effect/dist/Stream.js
|
|
18481
|
+
// node_modules/effect/dist/Stream.js
|
|
18599
18482
|
/**
|
|
18600
18483
|
* Describes effectful sources that emit values over time.
|
|
18601
18484
|
*
|
|
@@ -19161,8 +19044,7 @@ const runDrain = (self) => runDrain$1(self.channel);
|
|
|
19161
19044
|
* @since 2.0.0
|
|
19162
19045
|
*/
|
|
19163
19046
|
const mkString = (self) => runFold(self.channel, () => "", (acc, chunk) => acc + chunk.join(""));
|
|
19164
|
-
|
|
19165
|
-
//#region node_modules/effect/dist/FileSystem.js
|
|
19047
|
+
// node_modules/effect/dist/FileSystem.js
|
|
19166
19048
|
/**
|
|
19167
19049
|
* Defines the portable file system service for Effect programs.
|
|
19168
19050
|
*
|
|
@@ -19264,7 +19146,7 @@ const make$4 = (impl) => FileSystem.of({
|
|
|
19264
19146
|
if (offset) yield* file.seek(offset, "start");
|
|
19265
19147
|
const bytesToRead = options?.bytesToRead === void 0 ? void 0 : fromInputUnsafe(options.bytesToRead);
|
|
19266
19148
|
let totalBytesRead = BigInt(0);
|
|
19267
|
-
const chunkSize = Number(BigInt(options?.chunkSize ??
|
|
19149
|
+
const chunkSize = Number(BigInt(options?.chunkSize ?? 65536));
|
|
19268
19150
|
const readChunk = file.readAlloc(chunkSize);
|
|
19269
19151
|
return fromPull(succeed$1(flatMap(suspend$2(() => {
|
|
19270
19152
|
if (bytesToRead !== void 0 && bytesToRead <= totalBytesRead) return done$1();
|
|
@@ -19349,9 +19231,8 @@ const FileTypeId = "~effect/FileSystem/File";
|
|
|
19349
19231
|
* @category services
|
|
19350
19232
|
* @since 4.0.0
|
|
19351
19233
|
*/
|
|
19352
|
-
var WatchBackend = class extends Service()("effect/FileSystem/WatchBackend") {};
|
|
19353
|
-
|
|
19354
|
-
//#region node_modules/effect/dist/Path.js
|
|
19234
|
+
var WatchBackend = class extends (/*#__PURE__*/ Service()("effect/FileSystem/WatchBackend")) {};
|
|
19235
|
+
// node_modules/effect/dist/Path.js
|
|
19355
19236
|
/**
|
|
19356
19237
|
* Provides path operations through the Effect environment.
|
|
19357
19238
|
*
|
|
@@ -19590,9 +19471,10 @@ const resolve$1 = function resolve() {
|
|
|
19590
19471
|
resolvedAbsolute = path.charCodeAt(0) === 47;
|
|
19591
19472
|
}
|
|
19592
19473
|
resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
|
|
19593
|
-
if (resolvedAbsolute)
|
|
19594
|
-
|
|
19595
|
-
|
|
19474
|
+
if (resolvedAbsolute) {
|
|
19475
|
+
if (resolvedPath.length > 0) return "/" + resolvedPath;
|
|
19476
|
+
else return "/";
|
|
19477
|
+
} else if (resolvedPath.length > 0) return resolvedPath;
|
|
19596
19478
|
else return ".";
|
|
19597
19479
|
};
|
|
19598
19480
|
const CHAR_FORWARD_SLASH = 47;
|
|
@@ -19636,8 +19518,10 @@ const posixImpl = /*#__PURE__*/ make$3({
|
|
|
19636
19518
|
let joined;
|
|
19637
19519
|
for (let i = 0; i < arguments.length; ++i) {
|
|
19638
19520
|
const arg = arguments[i];
|
|
19639
|
-
if (arg.length > 0)
|
|
19640
|
-
|
|
19521
|
+
if (arg.length > 0) {
|
|
19522
|
+
if (joined === void 0) joined = arg;
|
|
19523
|
+
else joined += "/" + arg;
|
|
19524
|
+
}
|
|
19641
19525
|
}
|
|
19642
19526
|
if (joined === void 0) return ".";
|
|
19643
19527
|
return posixImpl.normalize(joined);
|
|
@@ -19673,8 +19557,10 @@ const posixImpl = /*#__PURE__*/ make$3({
|
|
|
19673
19557
|
else if (fromCode === 47) lastCommonSep = i;
|
|
19674
19558
|
}
|
|
19675
19559
|
let out = "";
|
|
19676
|
-
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) if (i === fromEnd || from.charCodeAt(i) === 47)
|
|
19677
|
-
|
|
19560
|
+
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) if (i === fromEnd || from.charCodeAt(i) === 47) {
|
|
19561
|
+
if (out.length === 0) out += "..";
|
|
19562
|
+
else out += "/..";
|
|
19563
|
+
}
|
|
19678
19564
|
if (out.length > 0) return out + to.slice(toStart + lastCommonSep);
|
|
19679
19565
|
else {
|
|
19680
19566
|
toStart += lastCommonSep;
|
|
@@ -19722,11 +19608,13 @@ const posixImpl = /*#__PURE__*/ make$3({
|
|
|
19722
19608
|
matchedSlash = false;
|
|
19723
19609
|
firstNonSlashEnd = i + 1;
|
|
19724
19610
|
}
|
|
19725
|
-
if (extIdx >= 0)
|
|
19726
|
-
if (
|
|
19727
|
-
|
|
19728
|
-
|
|
19729
|
-
|
|
19611
|
+
if (extIdx >= 0) {
|
|
19612
|
+
if (code === ext.charCodeAt(extIdx)) {
|
|
19613
|
+
if (--extIdx === -1) end = i;
|
|
19614
|
+
} else {
|
|
19615
|
+
extIdx = -1;
|
|
19616
|
+
end = firstNonSlashEnd;
|
|
19617
|
+
}
|
|
19730
19618
|
}
|
|
19731
19619
|
}
|
|
19732
19620
|
}
|
|
@@ -19819,8 +19707,10 @@ const posixImpl = /*#__PURE__*/ make$3({
|
|
|
19819
19707
|
} else if (startDot !== -1) preDotState = -1;
|
|
19820
19708
|
}
|
|
19821
19709
|
if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
19822
|
-
if (end !== -1)
|
|
19823
|
-
|
|
19710
|
+
if (end !== -1) {
|
|
19711
|
+
if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);
|
|
19712
|
+
else ret.base = ret.name = path.slice(startPart, end);
|
|
19713
|
+
}
|
|
19824
19714
|
} else {
|
|
19825
19715
|
if (startPart === 0 && isAbsolute) {
|
|
19826
19716
|
ret.name = path.slice(1, startDot);
|
|
@@ -19860,8 +19750,7 @@ const posixImpl = /*#__PURE__*/ make$3({
|
|
|
19860
19750
|
* @since 4.0.0
|
|
19861
19751
|
*/
|
|
19862
19752
|
const layer$4 = /*#__PURE__*/ succeed$2(Path$1)(posixImpl);
|
|
19863
|
-
|
|
19864
|
-
//#region node_modules/effect/dist/process/ChildProcessSpawner.js
|
|
19753
|
+
// node_modules/effect/dist/process/ChildProcessSpawner.js
|
|
19865
19754
|
/**
|
|
19866
19755
|
* Service boundary for starting and controlling child processes.
|
|
19867
19756
|
*
|
|
@@ -19937,9 +19826,8 @@ const make$2 = (spawn) => {
|
|
|
19937
19826
|
* @category services
|
|
19938
19827
|
* @since 4.0.0
|
|
19939
19828
|
*/
|
|
19940
|
-
var ChildProcessSpawner = class extends Service()("effect/process/ChildProcessSpawner") {};
|
|
19941
|
-
|
|
19942
|
-
//#region node_modules/effect/dist/process/CommandLine.js
|
|
19829
|
+
var ChildProcessSpawner = class extends (/*#__PURE__*/ Service()("effect/process/ChildProcessSpawner")) {};
|
|
19830
|
+
// node_modules/effect/dist/process/CommandLine.js
|
|
19943
19831
|
/**
|
|
19944
19832
|
* Builds command lines, the single strings that a shell or a Windows program
|
|
19945
19833
|
* turns back into arguments, and argument lists from templates. It is
|
|
@@ -19990,7 +19878,7 @@ var ChildProcessSpawner = class extends Service()("effect/process/ChildProcessSp
|
|
|
19990
19878
|
* @category errors
|
|
19991
19879
|
* @since 4.0.7
|
|
19992
19880
|
*/
|
|
19993
|
-
var CommandLineError = class extends TaggedError("CommandLineError") {};
|
|
19881
|
+
var CommandLineError = class extends (/*#__PURE__*/ TaggedError("CommandLineError")) {};
|
|
19994
19882
|
/**
|
|
19995
19883
|
* Renders a command for logs and error messages.
|
|
19996
19884
|
*
|
|
@@ -20210,16 +20098,18 @@ const parseTemplate$1 = (texts, values) => {
|
|
|
20210
20098
|
for (let i = 0; i < text.length; i++) {
|
|
20211
20099
|
const char = text[i];
|
|
20212
20100
|
const next = text[i + 1];
|
|
20213
|
-
if (quote === "'")
|
|
20214
|
-
|
|
20215
|
-
|
|
20216
|
-
else if (
|
|
20217
|
-
if (
|
|
20218
|
-
|
|
20219
|
-
|
|
20220
|
-
|
|
20221
|
-
|
|
20222
|
-
|
|
20101
|
+
if (quote === "'") {
|
|
20102
|
+
if (char === "'") quote = void 0;
|
|
20103
|
+
else word.push(char);
|
|
20104
|
+
} else if (quote === "\"") {
|
|
20105
|
+
if (char === "\"") quote = void 0;
|
|
20106
|
+
else if (char === "\\" && next !== void 0 && "$`\"\\\n".includes(next)) {
|
|
20107
|
+
if (next !== "\n") word.push(next);
|
|
20108
|
+
i++;
|
|
20109
|
+
} else if (char === "`") return error("UnsupportedSyntax", "Command substitution needs a shell");
|
|
20110
|
+
else if (char === "$" && next !== void 0 && quotedExpansionStart.test(next)) return error("UnsupportedSyntax", `The expansion "$${next}" needs a shell`);
|
|
20111
|
+
else word.push(char);
|
|
20112
|
+
} else if (isBlank(char)) endWord();
|
|
20223
20113
|
else if (char === "\\") {
|
|
20224
20114
|
if (next === void 0) return error("InvalidEscape", "A trailing backslash escapes nothing");
|
|
20225
20115
|
if (next !== "\n") {
|
|
@@ -20262,8 +20152,7 @@ const parseTemplate$1 = (texts, values) => {
|
|
|
20262
20152
|
endWord();
|
|
20263
20153
|
return succeed$5(words);
|
|
20264
20154
|
};
|
|
20265
|
-
|
|
20266
|
-
//#region node_modules/effect/dist/process/ChildProcess.js
|
|
20155
|
+
// node_modules/effect/dist/process/ChildProcess.js
|
|
20267
20156
|
/**
|
|
20268
20157
|
* Describes child processes before they are started.
|
|
20269
20158
|
*
|
|
@@ -20407,14 +20296,12 @@ const shellScript = (templates, expressions) => {
|
|
|
20407
20296
|
});
|
|
20408
20297
|
return script;
|
|
20409
20298
|
};
|
|
20410
|
-
|
|
20411
|
-
//#region src/platform/NodeRuntime.ts
|
|
20299
|
+
// src/platform/NodeRuntime.ts
|
|
20412
20300
|
const gzip = (source) => gzipSync(source, { level: 9 });
|
|
20413
20301
|
/** Compiles `source` as a script in this realm, reporting errors against `filename`. */
|
|
20414
20302
|
const compileScript = (source, filename) => runInThisContext(source, { filename });
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
const MAX_BUFFER = 256 * 1024 * 1024;
|
|
20303
|
+
// src/platform/NodeSync.ts
|
|
20304
|
+
const MAX_BUFFER = 268435456;
|
|
20418
20305
|
const isAbsent = (e) => {
|
|
20419
20306
|
const code = e.code;
|
|
20420
20307
|
return code === "ENOENT" || code === "ENOTDIR";
|
|
@@ -20463,8 +20350,7 @@ const nodeSyncIo = {
|
|
|
20463
20350
|
return hash.digest("hex");
|
|
20464
20351
|
}
|
|
20465
20352
|
};
|
|
20466
|
-
|
|
20467
|
-
//#region src/platform/Host.ts
|
|
20353
|
+
// src/platform/Host.ts
|
|
20468
20354
|
const toError$3 = (e) => e instanceof Error ? e : new Error(String(e));
|
|
20469
20355
|
/** `TMPDIR` when set and non-empty, else the host's own `fallback`. */
|
|
20470
20356
|
const scratchDirOf = (env, fallback) => {
|
|
@@ -20494,6 +20380,17 @@ const makeHostOps = (opts, proc) => {
|
|
|
20494
20380
|
...opts
|
|
20495
20381
|
};
|
|
20496
20382
|
};
|
|
20383
|
+
const nodeStdio = (proc = process) => ({
|
|
20384
|
+
stdout: (chunk) => {
|
|
20385
|
+
proc.stdout.write(chunk, () => {});
|
|
20386
|
+
},
|
|
20387
|
+
stderr: (chunk) => {
|
|
20388
|
+
proc.stderr.write(chunk);
|
|
20389
|
+
},
|
|
20390
|
+
exit: (code) => {
|
|
20391
|
+
proc.exitCode = code;
|
|
20392
|
+
}
|
|
20393
|
+
});
|
|
20497
20394
|
/** Every member not given in `opts` comes from Node: `proc`, its OS and its file system. */
|
|
20498
20395
|
var Host = class Host extends Service()("Host") {
|
|
20499
20396
|
static layer = (opts, proc = process) => succeed$2(Host, makeHostOps(opts, proc));
|
|
@@ -20503,8 +20400,7 @@ var Host = class Host extends Service()("Host") {
|
|
|
20503
20400
|
env: process.env
|
|
20504
20401
|
});
|
|
20505
20402
|
};
|
|
20506
|
-
|
|
20507
|
-
//#region src/platform/Git.ts
|
|
20403
|
+
// src/platform/Git.ts
|
|
20508
20404
|
const splitNul = (out) => out.split("\0").filter((s) => s.length > 0);
|
|
20509
20405
|
/**
|
|
20510
20406
|
* Parse a `git diff --name-status -z` token stream into `{ path, status }`
|
|
@@ -20772,8 +20668,7 @@ const makeLiveEffect = gen(function* () {
|
|
|
20772
20668
|
var GitService = class GitService extends Service()("GitService") {
|
|
20773
20669
|
static Live = effect(GitService, makeLiveEffect);
|
|
20774
20670
|
};
|
|
20775
|
-
|
|
20776
|
-
//#region src/platform/Workspace.ts
|
|
20671
|
+
// src/platform/Workspace.ts
|
|
20777
20672
|
const toError$2 = (e) => e instanceof Error ? e : new Error(String(e));
|
|
20778
20673
|
const HASH_CHUNK = 500;
|
|
20779
20674
|
const encoder$2 = new TextEncoder();
|
|
@@ -21100,9 +20995,10 @@ const makeWorkspaceOps = ({ root, pid }, git, commonDir, paths, io) => {
|
|
|
21100
20995
|
const stat = io.lstat(paths.join(root, path));
|
|
21101
20996
|
if (stat === void 0) entries.delete(path);
|
|
21102
20997
|
else if (stat.type === "symlink") entries.set(path, blobId(io.readLink(paths.join(root, path))));
|
|
21103
|
-
else if (stat.type === "directory")
|
|
21104
|
-
|
|
21105
|
-
|
|
20998
|
+
else if (stat.type === "directory") {
|
|
20999
|
+
if (io.lstat(paths.join(root, path, ".git")) === void 0) entries.delete(path);
|
|
21000
|
+
else entries.set(path, gitlinkOf(path));
|
|
21001
|
+
} else files.push(path);
|
|
21106
21002
|
}
|
|
21107
21003
|
for (let i = 0; i < files.length; i += HASH_CHUNK) {
|
|
21108
21004
|
const chunk = files.slice(i, i + HASH_CHUNK);
|
|
@@ -21163,8 +21059,7 @@ var Workspace = class Workspace extends Service()("Workspace") {
|
|
|
21163
21059
|
return makeWorkspaceOps(host, git, commonDir, paths, nodeSyncIo);
|
|
21164
21060
|
}));
|
|
21165
21061
|
};
|
|
21166
|
-
|
|
21167
|
-
//#region src/platform/Commentary.ts
|
|
21062
|
+
// src/platform/Commentary.ts
|
|
21168
21063
|
/**
|
|
21169
21064
|
* One line of stderr commentary — `narrate` is gated entirely by how the
|
|
21170
21065
|
* layer was built, never by the call site; `warn` is its ungated
|
|
@@ -21233,8 +21128,7 @@ const renderFailure = (error) => {
|
|
|
21233
21128
|
const message = error instanceof Error ? error.message : String(error);
|
|
21234
21129
|
return [/^gtd[: ]/.test(message) ? message : `gtd: ${message}`, ...(hasDetail(error) ? error.detail : []).map((line) => ` ${line}`)].join("\n");
|
|
21235
21130
|
};
|
|
21236
|
-
|
|
21237
|
-
//#region src/platform/CommandRunner.ts
|
|
21131
|
+
// src/platform/CommandRunner.ts
|
|
21238
21132
|
/**
|
|
21239
21133
|
* The subprocess port: run one shell command in the repo root, wait for it to
|
|
21240
21134
|
* finish, and get its combined output back as one string (a workflow
|
|
@@ -21275,8 +21169,7 @@ var CommandRunner = class CommandRunner extends Service()("CommandRunner") {
|
|
|
21275
21169
|
})).pipe(mapError((e) => e instanceof Error ? e : new Error(String(e)))) };
|
|
21276
21170
|
}));
|
|
21277
21171
|
};
|
|
21278
|
-
|
|
21279
|
-
//#region node_modules/@effect/platform-node-shared/dist/internal/nodeChildProcessSpawner.js
|
|
21172
|
+
// node_modules/@effect/platform-node-shared/dist/internal/nodeChildProcessSpawner.js
|
|
21280
21173
|
const buildSpawnOptions = (options, base, platform) => {
|
|
21281
21174
|
const detached = options.detached ?? platform !== "win32";
|
|
21282
21175
|
return {
|
|
@@ -21286,8 +21179,7 @@ const buildSpawnOptions = (options, base, platform) => {
|
|
|
21286
21179
|
windowsHide: options.windowsHide ?? !detached
|
|
21287
21180
|
};
|
|
21288
21181
|
};
|
|
21289
|
-
|
|
21290
|
-
//#region node_modules/@effect/platform-node-shared/dist/internal/utils.js
|
|
21182
|
+
// node_modules/@effect/platform-node-shared/dist/internal/utils.js
|
|
21291
21183
|
/** @internal */
|
|
21292
21184
|
const handleErrnoException = (module, method) => (err, [path]) => {
|
|
21293
21185
|
let reason = "Unknown";
|
|
@@ -21311,9 +21203,7 @@ const handleErrnoException = (module, method) => (err, [path]) => {
|
|
|
21311
21203
|
case "EBUSY":
|
|
21312
21204
|
reason = "Busy";
|
|
21313
21205
|
break;
|
|
21314
|
-
case "ELOOP":
|
|
21315
|
-
reason = "BadResource";
|
|
21316
|
-
break;
|
|
21206
|
+
case "ELOOP": reason = "BadResource";
|
|
21317
21207
|
}
|
|
21318
21208
|
return systemError({
|
|
21319
21209
|
_tag: reason,
|
|
@@ -21324,8 +21214,7 @@ const handleErrnoException = (module, method) => (err, [path]) => {
|
|
|
21324
21214
|
cause: err
|
|
21325
21215
|
});
|
|
21326
21216
|
};
|
|
21327
|
-
|
|
21328
|
-
//#region node_modules/@effect/platform-node-shared/dist/internal/stream.js
|
|
21217
|
+
// node_modules/@effect/platform-node-shared/dist/internal/stream.js
|
|
21329
21218
|
const destroyStream = (stream, cleanup, onDestroyed) => {
|
|
21330
21219
|
if (!("closed" in stream)) {
|
|
21331
21220
|
cleanup();
|
|
@@ -21352,8 +21241,7 @@ const destroyStream = (stream, cleanup, onDestroyed) => {
|
|
|
21352
21241
|
cleanup();
|
|
21353
21242
|
if (!stream.closed) stream.destroy();
|
|
21354
21243
|
};
|
|
21355
|
-
|
|
21356
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodeSink.js
|
|
21244
|
+
// node_modules/@effect/platform-node-shared/dist/NodeSink.js
|
|
21357
21245
|
/**
|
|
21358
21246
|
* Creates a `Sink` that writes chunks to a Node writable stream, respecting
|
|
21359
21247
|
* backpressure and mapping writable errors with `onError`. Unless `endOnDone`
|
|
@@ -21472,8 +21360,7 @@ const pullIntoWritable = (options) => withFiber((fiber) => {
|
|
|
21472
21360
|
} else removeErrorListener();
|
|
21473
21361
|
})));
|
|
21474
21362
|
});
|
|
21475
|
-
|
|
21476
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodeStream.js
|
|
21363
|
+
// node_modules/@effect/platform-node-shared/dist/NodeStream.js
|
|
21477
21364
|
/**
|
|
21478
21365
|
* Adapters between Node streams and Effect streams, channels, and readables.
|
|
21479
21366
|
*
|
|
@@ -21553,8 +21440,7 @@ const readableToPullUnsafe = (options) => {
|
|
|
21553
21440
|
})), pull);
|
|
21554
21441
|
};
|
|
21555
21442
|
const defaultOnError = (error) => new UnknownError(error);
|
|
21556
|
-
|
|
21557
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
21443
|
+
// node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
21558
21444
|
const toError$1 = (error) => error instanceof globalThis.Error ? error : new globalThis.Error(String(error));
|
|
21559
21445
|
const toPlatformError = (method, error, command) => {
|
|
21560
21446
|
const { commands } = flattenCommand(command);
|
|
@@ -21742,7 +21628,6 @@ const layer$3 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(fu
|
|
|
21742
21628
|
if (nodeStream && "allowHalfOpen" in nodeStream) nodeStream.allowHalfOpen = true;
|
|
21743
21629
|
setupOutput(fd, nodeStream, config.sink);
|
|
21744
21630
|
yield* setupInput(fd, nodeStream, config.stream);
|
|
21745
|
-
break;
|
|
21746
21631
|
}
|
|
21747
21632
|
}
|
|
21748
21633
|
return {
|
|
@@ -22062,7 +21947,6 @@ const flattenCommand = (command) => {
|
|
|
22062
21947
|
flatten(cmd.left);
|
|
22063
21948
|
pipeOptions.push(cmd.options);
|
|
22064
21949
|
flatten(cmd.right);
|
|
22065
|
-
break;
|
|
22066
21950
|
}
|
|
22067
21951
|
};
|
|
22068
21952
|
flatten(command);
|
|
@@ -22073,8 +21957,7 @@ const flattenCommand = (command) => {
|
|
|
22073
21957
|
pipeOptions
|
|
22074
21958
|
};
|
|
22075
21959
|
};
|
|
22076
|
-
|
|
22077
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
|
|
21960
|
+
// node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
|
|
22078
21961
|
/**
|
|
22079
21962
|
* Shared Node-compatible implementation of Effect's `FileSystem` service.
|
|
22080
21963
|
*
|
|
@@ -22505,8 +22388,7 @@ const makeFileSystem = /*#__PURE__*/ map(/*#__PURE__*/ serviceOption(WatchBacken
|
|
|
22505
22388
|
* @since 4.0.0
|
|
22506
22389
|
*/
|
|
22507
22390
|
const layer$2 = /*#__PURE__*/ effect(FileSystem)(makeFileSystem);
|
|
22508
|
-
|
|
22509
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodePath.js
|
|
22391
|
+
// node_modules/@effect/platform-node-shared/dist/NodePath.js
|
|
22510
22392
|
/**
|
|
22511
22393
|
* Node-backed provider for Effect's `Path` service.
|
|
22512
22394
|
*
|
|
@@ -22548,8 +22430,7 @@ provideMerge(layer$3, mergeAll(layer$2, /* @__PURE__ */ succeed$2(Path$1)(/*#__P
|
|
|
22548
22430
|
...Path,
|
|
22549
22431
|
.../*#__PURE__*/ fileUrlOps(void 0)
|
|
22550
22432
|
}))));
|
|
22551
|
-
|
|
22552
|
-
//#region src/platform/WorktreeState.ts
|
|
22433
|
+
// src/platform/WorktreeState.ts
|
|
22553
22434
|
const GITDIR_POINTER = /^gitdir:\s*(.+)$/m;
|
|
22554
22435
|
/**
|
|
22555
22436
|
* The worktree's own git dir, resolved via the filesystem rather than a `git`
|
|
@@ -22588,8 +22469,7 @@ const loopLogPath = gen(function* () {
|
|
|
22588
22469
|
const gitDir = yield* worktreeGitDir;
|
|
22589
22470
|
return path.join(gitDir, "gtd-loop.log");
|
|
22590
22471
|
});
|
|
22591
|
-
|
|
22592
|
-
//#region src/platform/RetainedHistory.ts
|
|
22472
|
+
// src/platform/RetainedHistory.ts
|
|
22593
22473
|
/** Per-worktree (`refs/worktree/gtd/*`) so linked worktrees sharing one `.git` don't clobber each other's retained history. */
|
|
22594
22474
|
const HISTORY_REF = "refs/worktree/gtd/history";
|
|
22595
22475
|
/** One ref per finished process, kept past the branch's deletion; distinct from the per-worktree `HISTORY_REF`. */
|
|
@@ -22677,8 +22557,7 @@ Uint32Array.from([
|
|
|
22677
22557
|
3329325298
|
|
22678
22558
|
]);
|
|
22679
22559
|
new TextEncoder();
|
|
22680
|
-
|
|
22681
|
-
//#region src/flags/index.ts
|
|
22560
|
+
// src/flags/index.ts
|
|
22682
22561
|
const FLAGS$1 = [];
|
|
22683
22562
|
const BOOL = {
|
|
22684
22563
|
"0": false,
|
|
@@ -22706,8 +22585,7 @@ const resolveFlags = (env, registry = FLAGS$1) => {
|
|
|
22706
22585
|
return out;
|
|
22707
22586
|
};
|
|
22708
22587
|
const flagSettings = (flags) => Object.fromEntries(Object.entries(flags).map(([name, on]) => [`flag_${name}`, on ? "1" : "0"]));
|
|
22709
|
-
|
|
22710
|
-
//#region src/install/Version.ts
|
|
22588
|
+
// src/install/Version.ts
|
|
22711
22589
|
const readPackageJson = (fromUrl) => {
|
|
22712
22590
|
let dir = new URL(".", fromUrl);
|
|
22713
22591
|
for (let i = 0; i < 5; i++) {
|
|
@@ -22723,8 +22601,7 @@ const readPackageJson = (fromUrl) => {
|
|
|
22723
22601
|
/** The global a pin's workflow registers itself under, ahead of the engine in the same file. */
|
|
22724
22602
|
const PIN_KEY = Symbol.for("@pmelab/gtd/pin");
|
|
22725
22603
|
const GTD_VERSION = globalThis[PIN_KEY]?.version ?? JSON.parse(readPackageJson(import.meta.url)).version;
|
|
22726
|
-
|
|
22727
|
-
//#region src/install/Install.ts
|
|
22604
|
+
// src/install/Install.ts
|
|
22728
22605
|
const WORKFLOWS_REPO = "https://github.com/pmelab/gtd-workflows";
|
|
22729
22606
|
const MINIMAL_DRIVER = `#!/usr/bin/env sh
|
|
22730
22607
|
set -eu
|
|
@@ -23406,8 +23283,7 @@ Any runtime works: the contract is \`--json\`/\`--json=<path>\` in, subprocesses
|
|
|
23406
23283
|
out.
|
|
23407
23284
|
`;
|
|
23408
23285
|
const renderBriefing = () => HEADER() + BEAT_PROTOCOL + JSON_FIELD_REFERENCE + DRIVER_OBLIGATIONS + RECOVERY + commandSuite() + EDITOR_INTEGRATION + PREREQUISITES;
|
|
23409
|
-
|
|
23410
|
-
//#region src/replay/Access.ts
|
|
23286
|
+
// src/replay/Access.ts
|
|
23411
23287
|
const UNRESTRICTED = {};
|
|
23412
23288
|
const withExtras = (globs, extras) => globs === void 0 ? null : [.../* @__PURE__ */ new Set([...globs, ...extras])];
|
|
23413
23289
|
/**
|
|
@@ -23434,8 +23310,7 @@ const accessShapeFault = (value) => {
|
|
|
23434
23310
|
};
|
|
23435
23311
|
const sameGlobs = (a, b) => a === void 0 || b === void 0 ? a === b : a.length === b.length && a.every((g, i) => g === b[i]);
|
|
23436
23312
|
const sameAccess = (a, b) => sameGlobs(a?.read, b?.read) && sameGlobs(a?.write, b?.write);
|
|
23437
|
-
|
|
23438
|
-
//#region src/replay/RefName.ts
|
|
23313
|
+
// src/replay/RefName.ts
|
|
23439
23314
|
const FORBIDDEN = /[\u0000- \u007f~^:?*[\\]/;
|
|
23440
23315
|
/** Why `name` cannot be (part of) a git ref name, or `undefined` when it can. */
|
|
23441
23316
|
const refNameFault = (name) => {
|
|
@@ -23450,8 +23325,7 @@ const refNameFault = (name) => {
|
|
|
23450
23325
|
if (part.endsWith(".lock")) return "a component ends with \".lock\"";
|
|
23451
23326
|
}
|
|
23452
23327
|
};
|
|
23453
|
-
|
|
23454
|
-
//#region src/replay/Tree.ts
|
|
23328
|
+
// src/replay/Tree.ts
|
|
23455
23329
|
const treeFromRecord = (files) => ({
|
|
23456
23330
|
paths: () => Object.keys(files).sort(),
|
|
23457
23331
|
read: (path) => Object.hasOwn(files, path) ? files[path] : void 0
|
|
@@ -23492,8 +23366,7 @@ const formatFault = (commits) => {
|
|
|
23492
23366
|
if (foreign === void 0) return void 0;
|
|
23493
23367
|
return `gtd: commit ${short$1(foreign.hash)} is written in history format ${foreign.format}, but this gtd reads formats ${OLDEST_READABLE_FORMAT} to 4 — run a gtd release that reads format ${foreign.format} to continue this process`;
|
|
23494
23368
|
};
|
|
23495
|
-
|
|
23496
|
-
//#region src/replay/Trailers.ts
|
|
23369
|
+
// src/replay/Trailers.ts
|
|
23497
23370
|
const TRANSITION_SEP = " → ";
|
|
23498
23371
|
const SUBJECT_RE = /^gtd\(([^()]+)\): (.+)$/;
|
|
23499
23372
|
/** `from` equal to `to` (or absent) collapses to the bare `gtd(<actor>): <to>` form. */
|
|
@@ -23694,8 +23567,7 @@ const formatCommitMessage = (spec) => {
|
|
|
23694
23567
|
];
|
|
23695
23568
|
return `${formatSubject(spec.actor, spec.to, spec.from)}\n\n${lines.join("\n")}`;
|
|
23696
23569
|
};
|
|
23697
|
-
|
|
23698
|
-
//#region src/replay/Replay.ts
|
|
23570
|
+
// src/replay/Replay.ts
|
|
23699
23571
|
const namesUnpin = (commit) => {
|
|
23700
23572
|
const unpin = pinStateIn(commit.parsed.format, "remove");
|
|
23701
23573
|
return unpin !== void 0 && commit.parsed.parsed?.to === unpin;
|
|
@@ -23974,7 +23846,8 @@ const replay = async (raw) => {
|
|
|
23974
23846
|
};
|
|
23975
23847
|
const resolveAccess = (memory) => resolveScoped(memory, (s) => s.access, input.configuredAccess, input.access);
|
|
23976
23848
|
const foldedAccessFor = (scopeAccess, file) => {
|
|
23977
|
-
|
|
23849
|
+
const threadPaths = scopeAccess?.read !== void 0 || scopeAccess?.write !== void 0 ? context.codeThreads().filter((t) => t.waitingOn === "agent").map((t) => t.path) : [];
|
|
23850
|
+
return foldAccess(scopeAccess, file, threadPaths);
|
|
23978
23851
|
};
|
|
23979
23852
|
const scopeAccessFault = () => {
|
|
23980
23853
|
for (const [i, s] of scopes.entries()) {
|
|
@@ -24283,16 +24156,14 @@ const replay = async (raw) => {
|
|
|
24283
24156
|
message: "gtd: the flow awaited something that is not a step — flow code may suspend only at steps"
|
|
24284
24157
|
};
|
|
24285
24158
|
};
|
|
24286
|
-
|
|
24287
|
-
//#region src/workflow/SteeringFormats.ts
|
|
24159
|
+
// src/workflow/SteeringFormats.ts
|
|
24288
24160
|
/** The unrendered `validate:` template a workflow compiler seeds for a built-in mode — quoted so a path with spaces survives interpolation. */
|
|
24289
24161
|
const seededValidateCommand = (mode) => `gtd check ${mode} "$GTD_FILE"`;
|
|
24290
24162
|
/** True when `command` is exactly `mode`'s seeded template (compared literally, not rendered) — distinguishes gtd's own seeding from a user override. */
|
|
24291
24163
|
const isSeededValidateCommand = (mode, command) => command === seededValidateCommand(mode);
|
|
24292
24164
|
/** The `validate:` command for a declared format: its spec travels on the command line, so `gtd check` loads no workflow to find it. */
|
|
24293
24165
|
const declaredValidateCommand = (mode, spec) => `gtd check ${mode} "$GTD_FILE" --spec '${spec.replace(/'/g, "'\\''")}'`;
|
|
24294
|
-
|
|
24295
|
-
//#region src/workflow/compile.ts
|
|
24166
|
+
// src/workflow/compile.ts
|
|
24296
24167
|
/**
|
|
24297
24168
|
* A `gtd.config.ts` `config` export (or its absence), checked and compiled. A
|
|
24298
24169
|
* malformed export compiles to nothing beyond the built-in modes, with every
|
|
@@ -24326,8 +24197,7 @@ const compileConfig = (value, origin) => {
|
|
|
24326
24197
|
diagnostics: []
|
|
24327
24198
|
};
|
|
24328
24199
|
};
|
|
24329
|
-
|
|
24330
|
-
//#region src/workflow/vars.ts
|
|
24200
|
+
// src/workflow/vars.ts
|
|
24331
24201
|
const PREFIX = "GTD_";
|
|
24332
24202
|
/** The live release flags as `flag_<name>` settings, provided by the CLI; absent means no flags. */
|
|
24333
24203
|
const StartFlags = Reference("StartFlags", { defaultValue: () => ({}) });
|
|
@@ -24390,8 +24260,7 @@ const SETTING_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
|
24390
24260
|
/** A name is written verbatim into a `Gtd-Var: <name>=<value>` trailer, so `=` or a newline would corrupt it. */
|
|
24391
24261
|
const isSettingName = (name) => SETTING_NAME.test(name);
|
|
24392
24262
|
const SETTING_NAME_RULE = "a setting name is a letter or \"_\", then letters, digits or \"_\"";
|
|
24393
|
-
|
|
24394
|
-
//#region src/workflow/discovery.ts
|
|
24263
|
+
// src/workflow/discovery.ts
|
|
24395
24264
|
const WORKFLOW_MODULE = "gtd.config.ts";
|
|
24396
24265
|
/**
|
|
24397
24266
|
* The file names gtd read repository settings from before `gtd.config.ts` took
|
|
@@ -24475,8 +24344,7 @@ var ConfigDiscovery = class ConfigDiscovery extends Service()("ConfigDiscovery")
|
|
|
24475
24344
|
return liveDiscovery(nodeSyncIo, yield* Path$1, (yield* Host).uid);
|
|
24476
24345
|
}));
|
|
24477
24346
|
};
|
|
24478
|
-
|
|
24479
|
-
//#region src/workflow/fingerprint.ts
|
|
24347
|
+
// src/workflow/fingerprint.ts
|
|
24480
24348
|
const HASH_LENGTH = 16;
|
|
24481
24349
|
const CONTROL_CHARACTER = /[\x00-\x1f\x7f-\x9f]/;
|
|
24482
24350
|
const realOr = (io, path) => {
|
|
@@ -24498,8 +24366,7 @@ const configFingerprint = (io, paths, files, root, read) => {
|
|
|
24498
24366
|
return fingerprint;
|
|
24499
24367
|
};
|
|
24500
24368
|
const changedConfigFiles = (recorded, current) => [.../* @__PURE__ */ new Set([...Object.keys(recorded), ...Object.keys(current)])].filter((path) => recorded[path] !== current[path]).sort();
|
|
24501
|
-
|
|
24502
|
-
//#region src/workflow/Diagnostic.ts
|
|
24369
|
+
// src/workflow/Diagnostic.ts
|
|
24503
24370
|
const compareSegment = (a, b) => {
|
|
24504
24371
|
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
24505
24372
|
if (typeof a === "number") return -1;
|
|
@@ -24539,8 +24406,7 @@ const dedupeDiagnostics = (diagnostics) => {
|
|
|
24539
24406
|
}
|
|
24540
24407
|
return out;
|
|
24541
24408
|
};
|
|
24542
|
-
|
|
24543
|
-
//#region src/workflow/load.ts
|
|
24409
|
+
// src/workflow/load.ts
|
|
24544
24410
|
const configError = (diagnostics) => new GtdError(`gtd: config:\n${diagnostics.filter((d) => d.severity === "error").map((d) => ` - ${formatDiagnostic(d)}`).join("\n")}`);
|
|
24545
24411
|
const failOnErrors = (diagnostics) => diagnostics.some((d) => d.severity === "error") ? fail$4(configError(diagnostics)) : void_;
|
|
24546
24412
|
const MIGRATION_DOC = "https://github.com/pmelab/gtd/blob/main/docs/configuration.md#migrating-from-gtdrc";
|
|
@@ -25240,8 +25106,7 @@ const firstStep = (loaded, head) => gen(function* () {
|
|
|
25240
25106
|
var ConfigService = class ConfigService extends Service()("ConfigService") {
|
|
25241
25107
|
static Live = succeed$2(ConfigService, { load });
|
|
25242
25108
|
};
|
|
25243
|
-
|
|
25244
|
-
//#region src/workflow/skills.ts
|
|
25109
|
+
// src/workflow/skills.ts
|
|
25245
25110
|
const fail = (origin, message) => new GtdError(`gtd: config:\n - ${origin}: ${message}`);
|
|
25246
25111
|
const checkShape = (value) => {
|
|
25247
25112
|
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error("skills export must return an object of scope -> skill names");
|
|
@@ -25251,7 +25116,7 @@ const checkShape = (value) => {
|
|
|
25251
25116
|
/** Every `config` key that names no known scope is a load error. */
|
|
25252
25117
|
const checkKeys = (configured, origin, known, section) => {
|
|
25253
25118
|
const sorted = [...known].sort();
|
|
25254
|
-
|
|
25119
|
+
const diagnostics = Object.keys(configured).filter((key) => !sorted.includes(key)).sort().map((key) => ({
|
|
25255
25120
|
severity: "error",
|
|
25256
25121
|
path: [
|
|
25257
25122
|
"config",
|
|
@@ -25260,7 +25125,8 @@ const checkKeys = (configured, origin, known, section) => {
|
|
|
25260
25125
|
],
|
|
25261
25126
|
message: `"${section}.${key}" is not a scope that runs a turn — known scopes: ${sorted.join(", ")}`,
|
|
25262
25127
|
origin
|
|
25263
|
-
}))
|
|
25128
|
+
}));
|
|
25129
|
+
return failOnErrors(diagnostics);
|
|
25264
25130
|
};
|
|
25265
25131
|
/**
|
|
25266
25132
|
* Skill lists for the settings actually in use. `config.skills` keys are
|
|
@@ -25296,8 +25162,7 @@ const resolveScopeAccess = (def, skills, vars) => gen(function* () {
|
|
|
25296
25162
|
yield* checkKeys(def.configuredAccess, def.skillsOrigin, known, "access");
|
|
25297
25163
|
return access;
|
|
25298
25164
|
});
|
|
25299
|
-
|
|
25300
|
-
//#region src/workflow/Workflow.ts
|
|
25165
|
+
// src/workflow/Workflow.ts
|
|
25301
25166
|
const knownModes = (def) => Object.keys(def.modes);
|
|
25302
25167
|
/**
|
|
25303
25168
|
* The engine a pin carries, as ES module source. Live, the `gtd.core.mjs` the
|
|
@@ -25331,8 +25196,7 @@ const pin = (module, root, version) => gen(function* () {
|
|
|
25331
25196
|
})) + core.replace(/^#!.*\n/, "");
|
|
25332
25197
|
return Buffer.concat([Buffer.from(`gtdpin 1 gtd ${version}\n`), gzip(source)]);
|
|
25333
25198
|
});
|
|
25334
|
-
|
|
25335
|
-
//#region src/emit/GitScript.ts
|
|
25199
|
+
// src/emit/GitScript.ts
|
|
25336
25200
|
const shellQuote = (value) => `'${value.replace(/'/g, "'\\''")}'`;
|
|
25337
25201
|
/**
|
|
25338
25202
|
* `--allow-empty` because gtd's workflow commits may be empty on purpose.
|
|
@@ -25498,8 +25362,7 @@ const ScriptSurface = { render: (steps) => {
|
|
|
25498
25362
|
const rendered = steps.map(renderLandStep);
|
|
25499
25363
|
return rendered.length === 0 ? "" : ["set -eu", ...rendered].join("\n\n");
|
|
25500
25364
|
} };
|
|
25501
|
-
|
|
25502
|
-
//#region src/emit/Emit.ts
|
|
25365
|
+
// src/emit/Emit.ts
|
|
25503
25366
|
/** Exits 0 when the declared steering file is absent — nothing to format or validate yet. An OR list, not `if`: its left side failing never trips `set -e`. */
|
|
25504
25367
|
const fileExistsGuard = (file) => `[ -f ${shellQuote(file)} ] || exit 0`;
|
|
25505
25368
|
/** A mode or `ui.format` command finds the file it works on in `$GTD_FILE`. */
|
|
@@ -25584,8 +25447,7 @@ const combinedScript = (required, optional) => {
|
|
|
25584
25447
|
`(\n${optional}\n) || ${PRESENTATION_FAILURE_WARNING}`
|
|
25585
25448
|
].join("\n");
|
|
25586
25449
|
};
|
|
25587
|
-
|
|
25588
|
-
//#region src/emit/OutcomeScript.ts
|
|
25450
|
+
// src/emit/OutcomeScript.ts
|
|
25589
25451
|
/**
|
|
25590
25452
|
* A `printf '<fmt>' <args...>` bash statement — `args` are already-valid bash
|
|
25591
25453
|
* tokens (a `shellQuote`d literal, a `"$(git …)"` substitution), never
|
|
@@ -25637,8 +25499,7 @@ const restoredOutcome = (to, state) => printfLine(FMT_RESTORED, [
|
|
|
25637
25499
|
`"$(git log -1 --format=%s ${shellQuote(to)})"`,
|
|
25638
25500
|
shellQuote(state)
|
|
25639
25501
|
]);
|
|
25640
|
-
|
|
25641
|
-
//#region src/emit/ModeContradiction.ts
|
|
25502
|
+
// src/emit/ModeContradiction.ts
|
|
25642
25503
|
/**
|
|
25643
25504
|
* Written for two readers at once, since gtd validate's exit code carries no
|
|
25644
25505
|
* second meaning to distinguish them: the agent (this is a CONFIGURATION BUG,
|
|
@@ -25682,10 +25543,10 @@ const buildModeContradictionCheck = (inputs) => {
|
|
|
25682
25543
|
* as a clean bill of health.
|
|
25683
25544
|
*/
|
|
25684
25545
|
const modeContradictionSkipNotice = (mode) => {
|
|
25685
|
-
|
|
25546
|
+
const message = `gtd: mode "${mode}" has an external validate: command — skipping the format/validate contradiction check`;
|
|
25547
|
+
return `printf '%s\\n' ${shellQuote(message)} >&2`;
|
|
25686
25548
|
};
|
|
25687
|
-
|
|
25688
|
-
//#region src/emit/SteeringMode.ts
|
|
25549
|
+
// src/emit/SteeringMode.ts
|
|
25689
25550
|
/**
|
|
25690
25551
|
* `format` alone (no live/external verdict) when there's no validator at
|
|
25691
25552
|
* all; a live in-process validator for a `"builtin"` validate OR a command
|
|
@@ -25842,17 +25703,17 @@ const modeContradictionSteps = (resolved) => gen(function* () {
|
|
|
25842
25703
|
* text for a driver to execute (`gtd renders; the driver executes`).
|
|
25843
25704
|
*/
|
|
25844
25705
|
const validateScriptFor = (resolved, file) => gen(function* () {
|
|
25845
|
-
|
|
25706
|
+
const steps = [
|
|
25846
25707
|
...yield* modeContradictionSteps(resolved),
|
|
25847
25708
|
{
|
|
25848
25709
|
kind: "command",
|
|
25849
25710
|
command: fileExistsGuard(file)
|
|
25850
25711
|
},
|
|
25851
25712
|
...modeCommandSteps(resolved, file)
|
|
25852
|
-
]
|
|
25713
|
+
];
|
|
25714
|
+
return { script: emitScripts(steps).required };
|
|
25853
25715
|
});
|
|
25854
|
-
|
|
25855
|
-
//#region src/step/planStep.ts
|
|
25716
|
+
// src/step/planStep.ts
|
|
25856
25717
|
/**
|
|
25857
25718
|
* At the human review gate an unconditional `gtd uncheck '<file>'` runs
|
|
25858
25719
|
* ahead of the commit, resetting every checkbox before `git add -A` picks it
|
|
@@ -25966,8 +25827,7 @@ const planStep = (snapshot, opts = {}) => {
|
|
|
25966
25827
|
]
|
|
25967
25828
|
};
|
|
25968
25829
|
};
|
|
25969
|
-
|
|
25970
|
-
//#region src/step/accessRefusal.ts
|
|
25830
|
+
// src/step/accessRefusal.ts
|
|
25971
25831
|
/**
|
|
25972
25832
|
* The landing refusal for changes outside `write`, or `undefined` when every
|
|
25973
25833
|
* path is allowed. `null` is unrestricted. The message is the fix prompt: gtd
|
|
@@ -25983,8 +25843,7 @@ const accessRefusal = (changes, write) => {
|
|
|
25983
25843
|
`allowed: ${write.length === 0 ? "(nothing)" : write.join(", ")}`
|
|
25984
25844
|
].join("\n");
|
|
25985
25845
|
};
|
|
25986
|
-
|
|
25987
|
-
//#region src/step/planStart.ts
|
|
25846
|
+
// src/step/planStart.ts
|
|
25988
25847
|
const refusal = (message) => ({
|
|
25989
25848
|
kind: "refusal",
|
|
25990
25849
|
message
|
|
@@ -26065,12 +25924,10 @@ const resolveBase = (commandLabel, value) => gen(function* () {
|
|
|
26065
25924
|
if (mergeBase.value === (yield* git.resolveRef("HEAD"))) return refusal(`${commandLabel}: nothing to review: HEAD has no commits beyond ${target}`);
|
|
26066
25925
|
return mergeBase.value;
|
|
26067
25926
|
});
|
|
26068
|
-
|
|
26069
|
-
//#region src/step/strayPaths.ts
|
|
25927
|
+
// src/step/strayPaths.ts
|
|
26070
25928
|
/** Globs use the `access.write` dialect (`globMatches`). */
|
|
26071
25929
|
const strayPaths = (touched, allow) => touched.filter((path) => !allow.some((glob) => globMatches(path, glob))).sort();
|
|
26072
|
-
|
|
26073
|
-
//#region src/edge/Edge.ts
|
|
25930
|
+
// src/edge/Edge.ts
|
|
26074
25931
|
const EMPTY_TREE$1 = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
26075
25932
|
const ACTORS = /* @__PURE__ */ new Set([
|
|
26076
25933
|
"agent",
|
|
@@ -26140,7 +25997,7 @@ const historyFormatFault = (history, location) => formatFault(history.slice(loca
|
|
|
26140
25997
|
format: parseCommitMessage(c.message).format
|
|
26141
25998
|
})));
|
|
26142
25999
|
/** Fails on a history in a format this gtd does not read, before anything acts on it. */
|
|
26143
|
-
const runOf = (history, location, closingHash
|
|
26000
|
+
const runOf = (history, location, closingHash) => {
|
|
26144
26001
|
const fault = historyFormatFault(history, location);
|
|
26145
26002
|
return fault === void 0 ? succeed$1(buildRun(history, location, closingHash)) : fail$4(new Error(fault));
|
|
26146
26003
|
};
|
|
@@ -27063,15 +26920,13 @@ const replayFinishedProcess = (config, run, hash, how) => gen(function* () {
|
|
|
27063
26920
|
...versionWarning !== void 0 ? { versionWarning } : {}
|
|
27064
26921
|
};
|
|
27065
26922
|
});
|
|
27066
|
-
|
|
27067
|
-
//#region src/cli/ToolCommands.ts
|
|
26923
|
+
// src/cli/ToolCommands.ts
|
|
27068
26924
|
/**
|
|
27069
26925
|
* The subcommands backed by a driver or tool. Core may not import those
|
|
27070
26926
|
* units, so the composition root provides them here.
|
|
27071
26927
|
*/
|
|
27072
26928
|
var ToolCommands = class extends Service()("ToolCommands") {};
|
|
27073
|
-
|
|
27074
|
-
//#region src/cli/Output.ts
|
|
26929
|
+
// src/cli/Output.ts
|
|
27075
26930
|
/**
|
|
27076
26931
|
* A command-level failure that should exit like a CLI usage error (2), not a
|
|
27077
26932
|
* generic runtime failure (1): an unknown `--json=<path>` selector, or a
|
|
@@ -27109,8 +26964,7 @@ const writeScript = (json, out, script, plain = script) => gen(function* () {
|
|
|
27109
26964
|
if (json.kind === "document") out.write(renderScriptJson(fields));
|
|
27110
26965
|
else yield* writeSelection(out, fields, json.path);
|
|
27111
26966
|
});
|
|
27112
|
-
|
|
27113
|
-
//#region src/cli/Strays.ts
|
|
26967
|
+
// src/cli/Strays.ts
|
|
27114
26968
|
const resolveSide = (git, side) => git.resolveRef(`${side}^{commit}`).pipe(mapError(() => new GtdError(`gtd strays: unknown revision '${side}'`)));
|
|
27115
26969
|
/** stdout carries the array alone; the summary is ungated stderr so a quiet run still explains its exit code, the per-path lines are narration. */
|
|
27116
26970
|
const runStraysCommand = (command, json, out) => gen(function* () {
|
|
@@ -27127,8 +26981,7 @@ const runStraysCommand = (command, json, out) => gen(function* () {
|
|
|
27127
26981
|
yield* narrator.warn(strays.length === 0 ? `gtd strays: no strays — ${total} touched files, all inside the allowlist` : `gtd strays: ${strays.length} of ${total} touched files outside the allowlist`);
|
|
27128
26982
|
return strays.length === 0 ? 0 : 10;
|
|
27129
26983
|
});
|
|
27130
|
-
|
|
27131
|
-
//#region src/cli/History.ts
|
|
26984
|
+
// src/cli/History.ts
|
|
27132
26985
|
/** Newest tip first. */
|
|
27133
26986
|
const historyEntries = gen(function* () {
|
|
27134
26987
|
const git = yield* GitService;
|
|
@@ -27186,12 +27039,13 @@ const runHistoryListCommand = (json, out) => gen(function* () {
|
|
|
27186
27039
|
const runHistoryShowCommand = (ref, json, out) => gen(function* () {
|
|
27187
27040
|
const entry = yield* resolveHistoryRef(ref, yield* historyEntries);
|
|
27188
27041
|
const trail = yield* historyTrail(entry.tip);
|
|
27189
|
-
|
|
27042
|
+
const document = {
|
|
27190
27043
|
ref: entry.ref,
|
|
27191
27044
|
entry: entry.entry,
|
|
27192
27045
|
branch: entry.branch,
|
|
27193
27046
|
...trail
|
|
27194
|
-
}
|
|
27047
|
+
};
|
|
27048
|
+
if (yield* writeJson(json, out, document)) return;
|
|
27195
27049
|
if (trail.versionWarning !== void 0) yield* (yield* Narrator).warn(trail.versionWarning);
|
|
27196
27050
|
const lines = [`${entry.ref} (branch ${entry.branch ?? "-"}, tip ${seven(entry.tip)})`];
|
|
27197
27051
|
for (const step of trail.steps) {
|
|
@@ -27204,8 +27058,7 @@ const runHistoryShowCommand = (ref, json, out) => gen(function* () {
|
|
|
27204
27058
|
});
|
|
27205
27059
|
/** Prints the script and never runs git: gtd's promise that it only decides and prints. */
|
|
27206
27060
|
const runHistoryFetchCommand = (remote, json, out) => writeScript(json, out, `${combinedScript(fetchHistoryRefs(remote), "")}\n`);
|
|
27207
|
-
|
|
27208
|
-
//#region src/cli/Metrics.ts
|
|
27061
|
+
// src/cli/Metrics.ts
|
|
27209
27062
|
const QUALITY$1 = ".gtd/QUALITY.md";
|
|
27210
27063
|
const LENS = /^((?:.*\.)?quality\.[^.]+)\.reviewing$/;
|
|
27211
27064
|
const inSeam = (step) => step.startsWith("seam.");
|
|
@@ -27397,8 +27250,7 @@ const runHistoryMetricsCommand = (refs, json, out) => gen(function* () {
|
|
|
27397
27250
|
lines.push(line(`total (${processes.length} processes)`, document.total));
|
|
27398
27251
|
out.write(`${lines.join("\n")}\n`);
|
|
27399
27252
|
});
|
|
27400
|
-
|
|
27401
|
-
//#region src/cli/Judges.ts
|
|
27253
|
+
// src/cli/Judges.ts
|
|
27402
27254
|
const FEEDBACK = ".gtd/FEEDBACK.md";
|
|
27403
27255
|
const QUALITY = ".gtd/QUALITY.md";
|
|
27404
27256
|
const REVIEW = ".gtd/REVIEW.md";
|
|
@@ -27748,7 +27600,7 @@ const runHistoryJudgesCommand = (refs, vars, jsonl, json, out) => gen(function*
|
|
|
27748
27600
|
}
|
|
27749
27601
|
const judges = calibrate(processes.flatMap((p) => p.judgments));
|
|
27750
27602
|
const whatIfs = Object.entries(vars).map(([name, value]) => whatIf(processes, name, value));
|
|
27751
|
-
|
|
27603
|
+
const document = {
|
|
27752
27604
|
processes: processes.map((p) => ({
|
|
27753
27605
|
ref: p.ref,
|
|
27754
27606
|
entry: p.entry,
|
|
@@ -27760,7 +27612,8 @@ const runHistoryJudgesCommand = (refs, vars, jsonl, json, out) => gen(function*
|
|
|
27760
27612
|
judges
|
|
27761
27613
|
},
|
|
27762
27614
|
whatIf: whatIfs
|
|
27763
|
-
}
|
|
27615
|
+
};
|
|
27616
|
+
if (yield* writeJson(json, out, document)) return;
|
|
27764
27617
|
if (processes.length === 0) {
|
|
27765
27618
|
out.write("no history refs; run gtd history fetch | sh to pull them\n");
|
|
27766
27619
|
return;
|
|
@@ -27773,8 +27626,7 @@ const runHistoryJudgesCommand = (refs, vars, jsonl, json, out) => gen(function*
|
|
|
27773
27626
|
}
|
|
27774
27627
|
out.write(`${lines.join("\n")}\n`);
|
|
27775
27628
|
});
|
|
27776
|
-
|
|
27777
|
-
//#region src/cli/Program.ts
|
|
27629
|
+
// src/cli/Program.ts
|
|
27778
27630
|
/** `needs: "none"` skips the repo-root guard — the server is keyed on file name, not workflow state. */
|
|
27779
27631
|
const runLspCommand = () => gen(function* () {
|
|
27780
27632
|
const { self } = yield* Host;
|
|
@@ -27816,7 +27668,8 @@ const EMPTY_TREE = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
|
27816
27668
|
/** Decides `gtd land`'s one transition without performing it. Refusals fail the Effect; a no-op returns `subject: null` and empty scripts. */
|
|
27817
27669
|
const planLanding = (opts = {}, current) => gen(function* () {
|
|
27818
27670
|
const rest = current ?? (yield* currentRest);
|
|
27819
|
-
const
|
|
27671
|
+
const snapshot = yield* snapshotFromRest(rest, opts.judge);
|
|
27672
|
+
const outcome = planStep(snapshot, opts);
|
|
27820
27673
|
if (outcome.kind === "refusal") return yield* fail$4(new Error(outcome.message));
|
|
27821
27674
|
if (outcome.kind === "noop") {
|
|
27822
27675
|
const required = ScriptSurface.render([{
|
|
@@ -27855,7 +27708,8 @@ const planLanding = (opts = {}, current) => gen(function* () {
|
|
|
27855
27708
|
* run has no commits to name.
|
|
27856
27709
|
*/
|
|
27857
27710
|
const runSummaryCommand = (out) => gen(function* () {
|
|
27858
|
-
const
|
|
27711
|
+
const run = yield* summaryRun;
|
|
27712
|
+
const { prompt } = yield* summaryFor(run);
|
|
27859
27713
|
if (prompt === void 0) return yield* fail$4(/* @__PURE__ */ new Error("gtd summary: refused — either this workflow declares no \"summary:\" template, or there is no finished/in-flight process to summarize at HEAD"));
|
|
27860
27714
|
out.write(prompt.endsWith("\n") ? prompt : prompt + "\n");
|
|
27861
27715
|
});
|
|
@@ -27873,10 +27727,11 @@ const runJudgeCommand = (json, out) => gen(function* () {
|
|
|
27873
27727
|
if (rendered.judge === void 0) return yield* fail$4(/* @__PURE__ */ new Error(`gtd judge: refused — the resolved rest ("${rest.state}") declares no "judge:"`));
|
|
27874
27728
|
const document = rendered.judge.endsWith("\n") ? rendered.judge : `${rendered.judge}\n`;
|
|
27875
27729
|
if (json.kind === "select") {
|
|
27876
|
-
const
|
|
27730
|
+
const parsed = yield* try_({
|
|
27877
27731
|
try: () => JSON.parse(rendered.judge),
|
|
27878
27732
|
catch: () => new SelectorUsageError("gtd judge: the resolved rest's \"judge:\" template did not render valid JSON")
|
|
27879
|
-
})
|
|
27733
|
+
});
|
|
27734
|
+
const selection = selectPath(parsed, json.path);
|
|
27880
27735
|
if (selection.kind === "value") out.write(`${selection.text}\n`);
|
|
27881
27736
|
else if (selection.kind === "unknown") return yield* fail$4(new SelectorUsageError(`gtd: unknown --json selector "${selection.path}" — see \`gtd --help\``));
|
|
27882
27737
|
return;
|
|
@@ -27957,7 +27812,8 @@ const runJudgeAnswerCommand = (json, out) => gen(function* () {
|
|
|
27957
27812
|
catch: () => new SelectorUsageError("gtd judge answer: stdin is not valid JSON")
|
|
27958
27813
|
});
|
|
27959
27814
|
const verdict = yield* decodeUnknownEffect(verdictSchemaFor(ids))(parsed).pipe(mapError((e) => new SelectorUsageError(`gtd judge answer: the verdict on stdin does not match the pending questions — ${e.message}`)));
|
|
27960
|
-
const
|
|
27815
|
+
const result = yield* planLanding({ judge: verdict }, rest);
|
|
27816
|
+
const built = landFields(result);
|
|
27961
27817
|
if (json.kind === "document") out.write(renderLandJson(built));
|
|
27962
27818
|
else if (json.kind === "select") yield* writeSelection(out, built, json.path);
|
|
27963
27819
|
else out.write(renderLandPlain(built, "judge answer"));
|
|
@@ -27969,7 +27825,8 @@ const runJudgeAnswerCommand = (json, out) => gen(function* () {
|
|
|
27969
27825
|
* turn is next lives in the following `gtd next --json`'s `kind`.
|
|
27970
27826
|
*/
|
|
27971
27827
|
const runLandCommand = (opts, json, out) => gen(function* () {
|
|
27972
|
-
const
|
|
27828
|
+
const result = yield* planLanding(opts);
|
|
27829
|
+
const built = landFields(result);
|
|
27973
27830
|
if (json.kind === "document") out.write(renderLandJson(built));
|
|
27974
27831
|
else if (json.kind === "select") yield* writeSelection(out, built, json.path);
|
|
27975
27832
|
else out.write(renderLandPlain(built));
|
|
@@ -28103,10 +27960,11 @@ const runAbandonCommand = (json, out) => gen(function* () {
|
|
|
28103
27960
|
}
|
|
28104
27961
|
const restState = run.trace[run.trace.length - 1].state;
|
|
28105
27962
|
if (run.startParentHash === EMPTY_TREE) return yield* fail$4(/* @__PURE__ */ new Error(`gtd abandon: the process underway (resting at "${restState}") starts at the repository's first commit — there is no earlier commit to rewind to`));
|
|
28106
|
-
const
|
|
27963
|
+
const tip = yield* git.resolveRef("HEAD");
|
|
27964
|
+
const steps = [
|
|
28107
27965
|
{
|
|
28108
27966
|
kind: "gitWrite",
|
|
28109
|
-
command: updateRef(HISTORY_REF,
|
|
27967
|
+
command: updateRef(HISTORY_REF, tip)
|
|
28110
27968
|
},
|
|
28111
27969
|
{
|
|
28112
27970
|
kind: "gitWrite",
|
|
@@ -28120,7 +27978,8 @@ const runAbandonCommand = (json, out) => gen(function* () {
|
|
|
28120
27978
|
kind: "outcome",
|
|
28121
27979
|
command: abandonedOutcome(restState, run.startParentHash, initial)
|
|
28122
27980
|
}
|
|
28123
|
-
]
|
|
27981
|
+
];
|
|
27982
|
+
const required = emitScripts(steps).required;
|
|
28124
27983
|
yield* writeScript(json, out, combinedScript(required, ""));
|
|
28125
27984
|
});
|
|
28126
27985
|
/**
|
|
@@ -28140,7 +27999,7 @@ const runRestoreCommand = (json, out) => gen(function* () {
|
|
|
28140
27999
|
const check = yield* restorability(git, headHash, tip);
|
|
28141
28000
|
if (!check.ok) return yield* fail$4(/* @__PURE__ */ new Error(`gtd restore: ${check.reason} — HEAD ${headHash.slice(0, 7)} is ahead of the retained tip ${tip.slice(0, 7)}.`));
|
|
28142
28001
|
const after = yield* restAt(tip);
|
|
28143
|
-
const
|
|
28002
|
+
const steps = [
|
|
28144
28003
|
{
|
|
28145
28004
|
kind: "gitWrite",
|
|
28146
28005
|
command: hardResetTo(tip)
|
|
@@ -28153,7 +28012,8 @@ const runRestoreCommand = (json, out) => gen(function* () {
|
|
|
28153
28012
|
kind: "outcome",
|
|
28154
28013
|
command: restoredOutcome(tip, after.state)
|
|
28155
28014
|
}
|
|
28156
|
-
]
|
|
28015
|
+
];
|
|
28016
|
+
const required = emitScripts(steps).required;
|
|
28157
28017
|
yield* writeScript(json, out, combinedScript(required, ""));
|
|
28158
28018
|
});
|
|
28159
28019
|
/** The step an ordinary repin rests at — the one the process rests at now. */
|
|
@@ -28179,7 +28039,7 @@ const runRepinCommand = (json, out) => gen(function* () {
|
|
|
28179
28039
|
pin: "add",
|
|
28180
28040
|
...anchor !== void 0 ? { anchor: anchor.at } : {}
|
|
28181
28041
|
});
|
|
28182
|
-
|
|
28042
|
+
const steps = [
|
|
28183
28043
|
{
|
|
28184
28044
|
kind: "gitWrite",
|
|
28185
28045
|
command: repinScript(PIN_PATH)
|
|
@@ -28192,7 +28052,8 @@ const runRepinCommand = (json, out) => gen(function* () {
|
|
|
28192
28052
|
kind: "outcome",
|
|
28193
28053
|
command: transitionOutcome(PIN_STATES.add, to)
|
|
28194
28054
|
}
|
|
28195
|
-
]
|
|
28055
|
+
];
|
|
28056
|
+
yield* writeScript(json, out, combinedScript(emitScripts(steps).required, ""));
|
|
28196
28057
|
});
|
|
28197
28058
|
/**
|
|
28198
28059
|
* The mode's own validate command for `file`: a declared `validate:` command
|
|
@@ -28203,7 +28064,8 @@ const runRepinCommand = (json, out) => gen(function* () {
|
|
|
28203
28064
|
const selfValidateCommand = (def, state, mode, file, spec) => {
|
|
28204
28065
|
const resolved = resolveMode(def, state, mode, spec);
|
|
28205
28066
|
const validate = resolved.kind === "resolved" ? resolved.validate : void 0;
|
|
28206
|
-
|
|
28067
|
+
const command = validate?.kind === "command" ? validate.command : seededValidateCommand(mode);
|
|
28068
|
+
return commandForFile(command, file);
|
|
28207
28069
|
};
|
|
28208
28070
|
const emitsValidatablePrompt = (rendered) => rendered.kind === "prompt" && rendered.file !== void 0 && rendered.mode !== void 0;
|
|
28209
28071
|
/**
|
|
@@ -28324,7 +28186,8 @@ const runCodeThreadsCheckCommand = () => gen(function* () {
|
|
|
28324
28186
|
});
|
|
28325
28187
|
/** Prints one `file:line: [^name]: <first H entry>` line per open thread. */
|
|
28326
28188
|
const runOpenThreadsCheckCommand = (format, file) => gen(function* () {
|
|
28327
|
-
const
|
|
28189
|
+
const content = yield* existingFile(file);
|
|
28190
|
+
const errors = openThreads(format, content).map((t) => `${file}:${t.line + 1}: [^${t.name}]: ${t.firstMe}`);
|
|
28328
28191
|
if (errors.length === 0) return;
|
|
28329
28192
|
return yield* fail$4(/* @__PURE__ */ new Error(`gtd check: ${errors.length} open thread(s) in ${file}:\n` + errors.join("\n")));
|
|
28330
28193
|
});
|
|
@@ -28333,7 +28196,8 @@ const runOpenThreadsCheckCommand = (format, file) => gen(function* () {
|
|
|
28333
28196
|
* reads, so the gate script and the flow's own check stay in sync.
|
|
28334
28197
|
*/
|
|
28335
28198
|
const runOpenQuestionsCheckCommand = (format, file) => gen(function* () {
|
|
28336
|
-
const
|
|
28199
|
+
const content = yield* existingFile(file);
|
|
28200
|
+
const errors = unansweredQuestions(format, content).map((q) => `${file}:${q.headingLine + 1}: ${q.question}`);
|
|
28337
28201
|
if (errors.length === 0) return;
|
|
28338
28202
|
return yield* fail$4(/* @__PURE__ */ new Error(`gtd check: ${errors.length} open question(s) unanswered in ${file}:\n` + errors.join("\n")));
|
|
28339
28203
|
});
|
|
@@ -28369,7 +28233,7 @@ const gatherBeatDocument = (rest, rendered) => gen(function* () {
|
|
|
28369
28233
|
const resolvedValidate = kind === "prompt" ? yield* resolveValidateScript(rest).pipe(catch_(() => succeed$1(void 0))) : void 0;
|
|
28370
28234
|
const validate = resolvedValidate !== void 0 && resolvedValidate.script.length > 0 ? resolvedValidate.script : void 0;
|
|
28371
28235
|
const log = yield* loopLogPath;
|
|
28372
|
-
|
|
28236
|
+
const demand = demandOf({
|
|
28373
28237
|
rendered,
|
|
28374
28238
|
kind,
|
|
28375
28239
|
...session !== void 0 ? { session: {
|
|
@@ -28377,7 +28241,8 @@ const gatherBeatDocument = (rest, rendered) => gen(function* () {
|
|
|
28377
28241
|
resume: session.resume
|
|
28378
28242
|
} } : {},
|
|
28379
28243
|
...validate !== void 0 ? { validate } : {}
|
|
28380
|
-
})
|
|
28244
|
+
});
|
|
28245
|
+
const status = statusOf({
|
|
28381
28246
|
rendered,
|
|
28382
28247
|
idle: restIsIdle(rest),
|
|
28383
28248
|
initial: noProcessUnderway(rest),
|
|
@@ -28388,7 +28253,8 @@ const gatherBeatDocument = (rest, rendered) => gen(function* () {
|
|
|
28388
28253
|
cost: rest.cost.total,
|
|
28389
28254
|
costByModel: rest.cost.byModel,
|
|
28390
28255
|
approvals: rest.run.approvals
|
|
28391
|
-
})
|
|
28256
|
+
});
|
|
28257
|
+
return beatDocument(demand, status);
|
|
28392
28258
|
});
|
|
28393
28259
|
/**
|
|
28394
28260
|
* `gtd ui`: loads `ui:` config and hands it, alongside the parsed flags, to
|
|
@@ -28510,8 +28376,7 @@ const runCommand$1 = (command, json, out) => {
|
|
|
28510
28376
|
return yield* dispatch;
|
|
28511
28377
|
});
|
|
28512
28378
|
};
|
|
28513
|
-
|
|
28514
|
-
//#region src/cli/Help.ts
|
|
28379
|
+
// src/cli/Help.ts
|
|
28515
28380
|
const HELP_WIDTH = 80;
|
|
28516
28381
|
/**
|
|
28517
28382
|
* Word-wraps prose to `width` columns, every line prefixed by `indent`.
|
|
@@ -28561,8 +28426,7 @@ const closest = (word, candidates) => {
|
|
|
28561
28426
|
}
|
|
28562
28427
|
return best?.name;
|
|
28563
28428
|
};
|
|
28564
|
-
|
|
28565
|
-
//#region src/cli/Cli.ts
|
|
28429
|
+
// src/cli/Cli.ts
|
|
28566
28430
|
/** `<name>=<value>` occurrences of `flag` → one record, each name a setting name given at most once. */
|
|
28567
28431
|
const decodeAssignments = (flag, raws) => {
|
|
28568
28432
|
const vars = {};
|
|
@@ -29496,6 +29360,7 @@ const parseArgv = (argv) => {
|
|
|
29496
29360
|
verbose
|
|
29497
29361
|
};
|
|
29498
29362
|
};
|
|
29363
|
+
nodeStdio();
|
|
29499
29364
|
/**
|
|
29500
29365
|
* Normalizes an artifact's trailing newlines to exactly one — an emitted
|
|
29501
29366
|
* script ends with none, plain text already ends with one, so this is the
|
|
@@ -29563,8 +29428,7 @@ const runCli = (argv, io) => {
|
|
|
29563
29428
|
io.exit(code);
|
|
29564
29429
|
}), provide(io.layers(plan.verbose)), sandbox, catch_((cause) => hasInterruptsOnly(cause) ? failCause$1(cause) : report(io, plan.json.kind !== "off")(cause)));
|
|
29565
29430
|
};
|
|
29566
|
-
|
|
29567
|
-
//#region src/twins/InMemRepo.ts
|
|
29431
|
+
// src/twins/InMemRepo.ts
|
|
29568
29432
|
/** Embedded in every value this fake reaches (see also `strictGitOperations`'s default message) so `scripts/assert-no-test-doubles.mjs` can catch a leak into the shipped bundle by string search. */
|
|
29569
29433
|
const TEST_DOUBLE_SENTINEL = "gtd:test-double:never-ship";
|
|
29570
29434
|
function sha1(input) {
|
|
@@ -30059,8 +29923,7 @@ function diffTrees(treeA, treeB) {
|
|
|
30059
29923
|
}
|
|
30060
29924
|
return result.sort((a, b) => a.path.localeCompare(b.path));
|
|
30061
29925
|
}
|
|
30062
|
-
|
|
30063
|
-
//#region src/twins/FakeGitOperations.ts
|
|
29926
|
+
// src/twins/FakeGitOperations.ts
|
|
30064
29927
|
const tryCatch = (fn) => try_({
|
|
30065
29928
|
try: fn,
|
|
30066
29929
|
catch: (e) => e instanceof Error ? e : new Error(String(e))
|
|
@@ -30138,8 +30001,7 @@ const fakeGitOperations = (repo, root = "/repo") => ({
|
|
|
30138
30001
|
...makeGitReaderOps(repo, root),
|
|
30139
30002
|
...makeGitWriterOps(repo)
|
|
30140
30003
|
});
|
|
30141
|
-
|
|
30142
|
-
//#region src/twins/Layers.ts
|
|
30004
|
+
// src/twins/Layers.ts
|
|
30143
30005
|
const toError = (e) => e instanceof Error ? e : new Error(String(e));
|
|
30144
30006
|
/**
|
|
30145
30007
|
* Keys UNDER `.git/` (never the bare `.git` FILE itself — `WorktreeState.ts`'s
|
|
@@ -30293,8 +30155,7 @@ function testLayers(repo, opts = {}) {
|
|
|
30293
30155
|
...opts.tools
|
|
30294
30156
|
}), CommandRunner.layer(() => fail$4(/* @__PURE__ */ new Error("gtd ui: CommandRunner has no test double wired into testLayers()"))));
|
|
30295
30157
|
}
|
|
30296
|
-
|
|
30297
|
-
//#region src/twins/cliIo.ts
|
|
30158
|
+
// src/twins/cliIo.ts
|
|
30298
30159
|
const makeCapturingCliIo = (repo, env = {}, tools = {}, stdin = "") => {
|
|
30299
30160
|
let stdout = Buffer.alloc(0);
|
|
30300
30161
|
let stderr = "";
|
|
@@ -30326,8 +30187,7 @@ const makeCapturingCliIo = (repo, env = {}, tools = {}, stdin = "") => {
|
|
|
30326
30187
|
})
|
|
30327
30188
|
};
|
|
30328
30189
|
};
|
|
30329
|
-
|
|
30330
|
-
//#region src/twins/FlowScripts.ts
|
|
30190
|
+
// src/twins/FlowScripts.ts
|
|
30331
30191
|
const SHEBANG = "#!/usr/bin/env sh";
|
|
30332
30192
|
const words$1 = (text) => [...text.matchAll(/'((?:[^']|'\\'')*)'/g)].map((m) => m[1].replaceAll("'\\''", "'"));
|
|
30333
30193
|
const ok = (output = "") => ({
|
|
@@ -30429,7 +30289,8 @@ const recognizeRestore = (repo, script) => {
|
|
|
30429
30289
|
restore: restoring.map((l) => l.path),
|
|
30430
30290
|
remove: lines.filter((l) => l.source === void 0).map((l) => l.path)
|
|
30431
30291
|
};
|
|
30432
|
-
|
|
30292
|
+
const commit = lines[0]?.commit ?? "";
|
|
30293
|
+
if (restoreScript(commit, paths, restoring[0]?.source) !== script) return void 0;
|
|
30433
30294
|
if (lines.map((line) => applyRestoreLine(repo, line)).at(-1) === false) return {
|
|
30434
30295
|
ok: false,
|
|
30435
30296
|
error: "the last path changed since the commit",
|
|
@@ -30624,8 +30485,7 @@ const applyFlowScript = (repo, commands, script) => {
|
|
|
30624
30485
|
if (!script.startsWith(`${SHEBANG}\n`)) return void 0;
|
|
30625
30486
|
return recognizeRemove(repo, script) ?? recognizeMove(repo, script) ?? recognizeShow(repo, script) ?? recognizeWrite(repo, script) ?? recognizePatch(repo, script) ?? recognizeRestore(repo, script) ?? recognizeCheck(repo, commands, script);
|
|
30626
30487
|
};
|
|
30627
|
-
|
|
30628
|
-
//#region src/twins/EmittedScriptRecognizer.ts
|
|
30488
|
+
// src/twins/EmittedScriptRecognizer.ts
|
|
30629
30489
|
/**
|
|
30630
30490
|
* Reverses `GitScript.ts`'s `shellQuote`: extracts every `'...'` token from
|
|
30631
30491
|
* `text`, in order, unescaping the `'\''` (close-literal-open) sequence back
|
|
@@ -31253,8 +31113,7 @@ const unrecognized = (block, output = "") => ({
|
|
|
31253
31113
|
Narrator.layer(() => {}, false);
|
|
31254
31114
|
new TextEncoder();
|
|
31255
31115
|
new TextDecoder("utf-8", { ignoreBOM: true });
|
|
31256
|
-
|
|
31257
|
-
//#region src/testkit/imports.ts
|
|
31116
|
+
// src/testkit/imports.ts
|
|
31258
31117
|
const IDENTIFIER$1 = /^[A-Za-z_$][\w$]*$/;
|
|
31259
31118
|
const STATEMENT = /^[ \t]*(import|export)([ \t]+type)?[ \t]+([\w$* \t,]*(?:\{[^}]*\})?[\w$* \t,]*?)\s*\bfrom\s*(["'])([^"'\n]+)\4[ \t]*;?|^[ \t]*import\s*(["'])([^"'\n]+)\6[ \t]*;?/gm;
|
|
31260
31119
|
const bindings = (list) => list.split(",").map((entry) => entry.trim()).filter((entry) => entry !== "" && !entry.startsWith("type ")).map((entry) => {
|
|
@@ -31299,8 +31158,7 @@ const importsFrom = (source, modules, lookup) => {
|
|
|
31299
31158
|
return rewrite(kind, clause, specifier, module);
|
|
31300
31159
|
});
|
|
31301
31160
|
};
|
|
31302
|
-
|
|
31303
|
-
//#region src/testkit/TestRepo.ts
|
|
31161
|
+
// src/testkit/TestRepo.ts
|
|
31304
31162
|
const REGISTRY = Symbol.for("@pmelab/gtd/testkit:modules");
|
|
31305
31163
|
const registry = () => {
|
|
31306
31164
|
const global = globalThis;
|
|
@@ -31613,5 +31471,4 @@ const testRepo = (options) => {
|
|
|
31613
31471
|
};
|
|
31614
31472
|
return self;
|
|
31615
31473
|
};
|
|
31616
|
-
//#endregion
|
|
31617
31474
|
export { verdictWhen as a, verdict as i, runsItsScript as n, whenPrompted as o, testRepo as r, inTurn as t };
|