@pmelab/gtd 64.1.1 → 64.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +27 -14
- 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-DEh_MS40.mjs} +181 -187
- package/dist/chunks/{testkit-DfWZQCWQ.mjs → testkit-BwCH8ky6.mjs} +412 -512
- package/dist/chunks/{wire-CPNSm_9N.mjs → wire-CaPJ9Tme.mjs} +12 -24
- package/dist/flows.mjs +1 -2
- package/dist/gtd.bundle.mjs +1010 -1785
- package/dist/gtd.core.mjs +191 -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 +438 -413
- package/dist/wire.mjs +1 -2
- package/dist/workflow-kit.mjs +6 -10
- package/package.json +19 -32
- package/src/cli/Cli.test.ts +1 -0
- package/src/cli/Cli.ts +16 -1
- package/src/cli/Program.ts +6 -0
- package/src/cli/ToolCommands.ts +1 -0
- package/src/edge/Edge.test.ts +23 -1
- package/src/edge/Edge.ts +23 -1
- package/src/edge/index.ts +1 -0
- package/src/emit/GitScript.test.ts +1 -1
- package/src/flows/runtime.test.ts +1 -1
- package/src/platform/Git.ts +33 -10
- 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 +9 -1
- package/src/steering/freeform.test.ts +51 -1
- package/src/steering/freeform.ts +38 -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/FakeGitOperations.ts +2 -0
- package/src/twins/GitTiers.ts +27 -2
- package/src/twins/InMemRepo.ts +5 -0
- 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-DEh_MS40.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 }`
|
|
@@ -20552,14 +20448,20 @@ const stripCommitSeam = (tail) => {
|
|
|
20552
20448
|
const afterNul = tail.startsWith("\0") ? tail.slice(1) : tail;
|
|
20553
20449
|
return afterNul.startsWith("\n") ? afterNul.slice(1) : afterNul;
|
|
20554
20450
|
};
|
|
20451
|
+
const ARGV_CHUNK = 500;
|
|
20452
|
+
const chunked = (items) => {
|
|
20453
|
+
const out = [];
|
|
20454
|
+
for (let i = 0; i < items.length; i += ARGV_CHUNK) out.push(items.slice(i, i + ARGV_CHUNK));
|
|
20455
|
+
return out;
|
|
20456
|
+
};
|
|
20555
20457
|
/**
|
|
20556
20458
|
* `path → blob object id` at `ref`; a path absent from the map doesn't exist
|
|
20557
20459
|
* there. An unresolvable `ref` (an empty repo) yields an empty map, so every
|
|
20558
20460
|
* candidate reads as "not at `ref`".
|
|
20559
20461
|
*/
|
|
20560
|
-
const blobsAtRef = (exec, ref, paths) => exec("git", "ls-tree", "-r", "-z", ref, "--", ...
|
|
20462
|
+
const blobsAtRef = (exec, ref, paths) => forEach$1(chunked(paths), (chunk) => exec("git", "ls-tree", "-r", "-z", ref, "--", ...chunk).pipe(catch_(() => succeed$1(""))), { concurrency: 1 }).pipe(map((outs) => {
|
|
20561
20463
|
const blobs = /* @__PURE__ */ new Map();
|
|
20562
|
-
for (const entry of splitNul
|
|
20464
|
+
for (const entry of outs.flatMap(splitNul)) {
|
|
20563
20465
|
const tab = entry.indexOf(" ");
|
|
20564
20466
|
if (tab === -1) continue;
|
|
20565
20467
|
const [, type, oid] = entry.slice(0, tab).split(" ");
|
|
@@ -20580,7 +20482,7 @@ const blobsAtRef = (exec, ref, paths) => exec("git", "ls-tree", "-r", "-z", ref,
|
|
|
20580
20482
|
* A symlink is the residual inexactness: hash-object hashes the target's
|
|
20581
20483
|
* content rather than the link text, and reads as `M`, never `D`.
|
|
20582
20484
|
*/
|
|
20583
|
-
const hashObjects = (exec, paths) => exec("git", "hash-object", "--", ...
|
|
20485
|
+
const hashObjects = (exec, paths) => forEach$1(chunked(paths), (chunk) => exec("git", "hash-object", "--", ...chunk).pipe(map((out) => out.trim().split("\n").map((oid, i) => [chunk[i] ?? "", oid.trim()]))), { concurrency: 1 }).pipe(map((entries) => new Map(entries.flat())), catch_(() => succeed$1(/* @__PURE__ */ new Map())));
|
|
20584
20486
|
/**
|
|
20585
20487
|
* Classify every untracked path against `ref`'s tree, by CONTENT: not at
|
|
20586
20488
|
* `ref` → `A`; different bytes → `M`; identical bytes → no entry. The latter
|
|
@@ -20694,6 +20596,7 @@ const makeGitImpl = (spawner, root) => {
|
|
|
20694
20596
|
}
|
|
20695
20597
|
return all;
|
|
20696
20598
|
}),
|
|
20599
|
+
untrackedPaths: () => exec("git", "ls-files", "--others", "--exclude-standard", "-z").pipe(map(splitNul)),
|
|
20697
20600
|
stagedPaths: () => exec("git", "diff", "--cached", "--name-status", "--no-renames", "-z", "HEAD").pipe(catch_(() => succeed$1("")), map((out) => parseNameStatus(splitNul(out)))),
|
|
20698
20601
|
resolveRef: (ref) => exec("git", "rev-parse", "--verify", "--end-of-options", ref).pipe(map((s) => s.trim()), flatMap((hash) => resolvedRefOrCorrupted(ref, hash))),
|
|
20699
20602
|
readRefOption: (ref) => exec("git", "rev-parse", "--verify", "--quiet", ref).pipe(map((s) => some(s.trim())), catch_(() => succeed$1(none()))),
|
|
@@ -20772,8 +20675,7 @@ const makeLiveEffect = gen(function* () {
|
|
|
20772
20675
|
var GitService = class GitService extends Service()("GitService") {
|
|
20773
20676
|
static Live = effect(GitService, makeLiveEffect);
|
|
20774
20677
|
};
|
|
20775
|
-
|
|
20776
|
-
//#region src/platform/Workspace.ts
|
|
20678
|
+
// src/platform/Workspace.ts
|
|
20777
20679
|
const toError$2 = (e) => e instanceof Error ? e : new Error(String(e));
|
|
20778
20680
|
const HASH_CHUNK = 500;
|
|
20779
20681
|
const encoder$2 = new TextEncoder();
|
|
@@ -21100,9 +21002,10 @@ const makeWorkspaceOps = ({ root, pid }, git, commonDir, paths, io) => {
|
|
|
21100
21002
|
const stat = io.lstat(paths.join(root, path));
|
|
21101
21003
|
if (stat === void 0) entries.delete(path);
|
|
21102
21004
|
else if (stat.type === "symlink") entries.set(path, blobId(io.readLink(paths.join(root, path))));
|
|
21103
|
-
else if (stat.type === "directory")
|
|
21104
|
-
|
|
21105
|
-
|
|
21005
|
+
else if (stat.type === "directory") {
|
|
21006
|
+
if (io.lstat(paths.join(root, path, ".git")) === void 0) entries.delete(path);
|
|
21007
|
+
else entries.set(path, gitlinkOf(path));
|
|
21008
|
+
} else files.push(path);
|
|
21106
21009
|
}
|
|
21107
21010
|
for (let i = 0; i < files.length; i += HASH_CHUNK) {
|
|
21108
21011
|
const chunk = files.slice(i, i + HASH_CHUNK);
|
|
@@ -21163,8 +21066,7 @@ var Workspace = class Workspace extends Service()("Workspace") {
|
|
|
21163
21066
|
return makeWorkspaceOps(host, git, commonDir, paths, nodeSyncIo);
|
|
21164
21067
|
}));
|
|
21165
21068
|
};
|
|
21166
|
-
|
|
21167
|
-
//#region src/platform/Commentary.ts
|
|
21069
|
+
// src/platform/Commentary.ts
|
|
21168
21070
|
/**
|
|
21169
21071
|
* One line of stderr commentary — `narrate` is gated entirely by how the
|
|
21170
21072
|
* layer was built, never by the call site; `warn` is its ungated
|
|
@@ -21233,8 +21135,7 @@ const renderFailure = (error) => {
|
|
|
21233
21135
|
const message = error instanceof Error ? error.message : String(error);
|
|
21234
21136
|
return [/^gtd[: ]/.test(message) ? message : `gtd: ${message}`, ...(hasDetail(error) ? error.detail : []).map((line) => ` ${line}`)].join("\n");
|
|
21235
21137
|
};
|
|
21236
|
-
|
|
21237
|
-
//#region src/platform/CommandRunner.ts
|
|
21138
|
+
// src/platform/CommandRunner.ts
|
|
21238
21139
|
/**
|
|
21239
21140
|
* The subprocess port: run one shell command in the repo root, wait for it to
|
|
21240
21141
|
* finish, and get its combined output back as one string (a workflow
|
|
@@ -21275,8 +21176,7 @@ var CommandRunner = class CommandRunner extends Service()("CommandRunner") {
|
|
|
21275
21176
|
})).pipe(mapError((e) => e instanceof Error ? e : new Error(String(e)))) };
|
|
21276
21177
|
}));
|
|
21277
21178
|
};
|
|
21278
|
-
|
|
21279
|
-
//#region node_modules/@effect/platform-node-shared/dist/internal/nodeChildProcessSpawner.js
|
|
21179
|
+
// node_modules/@effect/platform-node-shared/dist/internal/nodeChildProcessSpawner.js
|
|
21280
21180
|
const buildSpawnOptions = (options, base, platform) => {
|
|
21281
21181
|
const detached = options.detached ?? platform !== "win32";
|
|
21282
21182
|
return {
|
|
@@ -21286,8 +21186,7 @@ const buildSpawnOptions = (options, base, platform) => {
|
|
|
21286
21186
|
windowsHide: options.windowsHide ?? !detached
|
|
21287
21187
|
};
|
|
21288
21188
|
};
|
|
21289
|
-
|
|
21290
|
-
//#region node_modules/@effect/platform-node-shared/dist/internal/utils.js
|
|
21189
|
+
// node_modules/@effect/platform-node-shared/dist/internal/utils.js
|
|
21291
21190
|
/** @internal */
|
|
21292
21191
|
const handleErrnoException = (module, method) => (err, [path]) => {
|
|
21293
21192
|
let reason = "Unknown";
|
|
@@ -21311,9 +21210,7 @@ const handleErrnoException = (module, method) => (err, [path]) => {
|
|
|
21311
21210
|
case "EBUSY":
|
|
21312
21211
|
reason = "Busy";
|
|
21313
21212
|
break;
|
|
21314
|
-
case "ELOOP":
|
|
21315
|
-
reason = "BadResource";
|
|
21316
|
-
break;
|
|
21213
|
+
case "ELOOP": reason = "BadResource";
|
|
21317
21214
|
}
|
|
21318
21215
|
return systemError({
|
|
21319
21216
|
_tag: reason,
|
|
@@ -21324,8 +21221,7 @@ const handleErrnoException = (module, method) => (err, [path]) => {
|
|
|
21324
21221
|
cause: err
|
|
21325
21222
|
});
|
|
21326
21223
|
};
|
|
21327
|
-
|
|
21328
|
-
//#region node_modules/@effect/platform-node-shared/dist/internal/stream.js
|
|
21224
|
+
// node_modules/@effect/platform-node-shared/dist/internal/stream.js
|
|
21329
21225
|
const destroyStream = (stream, cleanup, onDestroyed) => {
|
|
21330
21226
|
if (!("closed" in stream)) {
|
|
21331
21227
|
cleanup();
|
|
@@ -21352,8 +21248,7 @@ const destroyStream = (stream, cleanup, onDestroyed) => {
|
|
|
21352
21248
|
cleanup();
|
|
21353
21249
|
if (!stream.closed) stream.destroy();
|
|
21354
21250
|
};
|
|
21355
|
-
|
|
21356
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodeSink.js
|
|
21251
|
+
// node_modules/@effect/platform-node-shared/dist/NodeSink.js
|
|
21357
21252
|
/**
|
|
21358
21253
|
* Creates a `Sink` that writes chunks to a Node writable stream, respecting
|
|
21359
21254
|
* backpressure and mapping writable errors with `onError`. Unless `endOnDone`
|
|
@@ -21472,8 +21367,7 @@ const pullIntoWritable = (options) => withFiber((fiber) => {
|
|
|
21472
21367
|
} else removeErrorListener();
|
|
21473
21368
|
})));
|
|
21474
21369
|
});
|
|
21475
|
-
|
|
21476
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodeStream.js
|
|
21370
|
+
// node_modules/@effect/platform-node-shared/dist/NodeStream.js
|
|
21477
21371
|
/**
|
|
21478
21372
|
* Adapters between Node streams and Effect streams, channels, and readables.
|
|
21479
21373
|
*
|
|
@@ -21553,8 +21447,7 @@ const readableToPullUnsafe = (options) => {
|
|
|
21553
21447
|
})), pull);
|
|
21554
21448
|
};
|
|
21555
21449
|
const defaultOnError = (error) => new UnknownError(error);
|
|
21556
|
-
|
|
21557
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
21450
|
+
// node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
21558
21451
|
const toError$1 = (error) => error instanceof globalThis.Error ? error : new globalThis.Error(String(error));
|
|
21559
21452
|
const toPlatformError = (method, error, command) => {
|
|
21560
21453
|
const { commands } = flattenCommand(command);
|
|
@@ -21742,7 +21635,6 @@ const layer$3 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(fu
|
|
|
21742
21635
|
if (nodeStream && "allowHalfOpen" in nodeStream) nodeStream.allowHalfOpen = true;
|
|
21743
21636
|
setupOutput(fd, nodeStream, config.sink);
|
|
21744
21637
|
yield* setupInput(fd, nodeStream, config.stream);
|
|
21745
|
-
break;
|
|
21746
21638
|
}
|
|
21747
21639
|
}
|
|
21748
21640
|
return {
|
|
@@ -22062,7 +21954,6 @@ const flattenCommand = (command) => {
|
|
|
22062
21954
|
flatten(cmd.left);
|
|
22063
21955
|
pipeOptions.push(cmd.options);
|
|
22064
21956
|
flatten(cmd.right);
|
|
22065
|
-
break;
|
|
22066
21957
|
}
|
|
22067
21958
|
};
|
|
22068
21959
|
flatten(command);
|
|
@@ -22073,8 +21964,7 @@ const flattenCommand = (command) => {
|
|
|
22073
21964
|
pipeOptions
|
|
22074
21965
|
};
|
|
22075
21966
|
};
|
|
22076
|
-
|
|
22077
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
|
|
21967
|
+
// node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
|
|
22078
21968
|
/**
|
|
22079
21969
|
* Shared Node-compatible implementation of Effect's `FileSystem` service.
|
|
22080
21970
|
*
|
|
@@ -22505,8 +22395,7 @@ const makeFileSystem = /*#__PURE__*/ map(/*#__PURE__*/ serviceOption(WatchBacken
|
|
|
22505
22395
|
* @since 4.0.0
|
|
22506
22396
|
*/
|
|
22507
22397
|
const layer$2 = /*#__PURE__*/ effect(FileSystem)(makeFileSystem);
|
|
22508
|
-
|
|
22509
|
-
//#region node_modules/@effect/platform-node-shared/dist/NodePath.js
|
|
22398
|
+
// node_modules/@effect/platform-node-shared/dist/NodePath.js
|
|
22510
22399
|
/**
|
|
22511
22400
|
* Node-backed provider for Effect's `Path` service.
|
|
22512
22401
|
*
|
|
@@ -22548,8 +22437,7 @@ provideMerge(layer$3, mergeAll(layer$2, /* @__PURE__ */ succeed$2(Path$1)(/*#__P
|
|
|
22548
22437
|
...Path,
|
|
22549
22438
|
.../*#__PURE__*/ fileUrlOps(void 0)
|
|
22550
22439
|
}))));
|
|
22551
|
-
|
|
22552
|
-
//#region src/platform/WorktreeState.ts
|
|
22440
|
+
// src/platform/WorktreeState.ts
|
|
22553
22441
|
const GITDIR_POINTER = /^gitdir:\s*(.+)$/m;
|
|
22554
22442
|
/**
|
|
22555
22443
|
* The worktree's own git dir, resolved via the filesystem rather than a `git`
|
|
@@ -22588,8 +22476,7 @@ const loopLogPath = gen(function* () {
|
|
|
22588
22476
|
const gitDir = yield* worktreeGitDir;
|
|
22589
22477
|
return path.join(gitDir, "gtd-loop.log");
|
|
22590
22478
|
});
|
|
22591
|
-
|
|
22592
|
-
//#region src/platform/RetainedHistory.ts
|
|
22479
|
+
// src/platform/RetainedHistory.ts
|
|
22593
22480
|
/** Per-worktree (`refs/worktree/gtd/*`) so linked worktrees sharing one `.git` don't clobber each other's retained history. */
|
|
22594
22481
|
const HISTORY_REF = "refs/worktree/gtd/history";
|
|
22595
22482
|
/** One ref per finished process, kept past the branch's deletion; distinct from the per-worktree `HISTORY_REF`. */
|
|
@@ -22677,8 +22564,7 @@ Uint32Array.from([
|
|
|
22677
22564
|
3329325298
|
|
22678
22565
|
]);
|
|
22679
22566
|
new TextEncoder();
|
|
22680
|
-
|
|
22681
|
-
//#region src/flags/index.ts
|
|
22567
|
+
// src/flags/index.ts
|
|
22682
22568
|
const FLAGS$1 = [];
|
|
22683
22569
|
const BOOL = {
|
|
22684
22570
|
"0": false,
|
|
@@ -22706,8 +22592,7 @@ const resolveFlags = (env, registry = FLAGS$1) => {
|
|
|
22706
22592
|
return out;
|
|
22707
22593
|
};
|
|
22708
22594
|
const flagSettings = (flags) => Object.fromEntries(Object.entries(flags).map(([name, on]) => [`flag_${name}`, on ? "1" : "0"]));
|
|
22709
|
-
|
|
22710
|
-
//#region src/install/Version.ts
|
|
22595
|
+
// src/install/Version.ts
|
|
22711
22596
|
const readPackageJson = (fromUrl) => {
|
|
22712
22597
|
let dir = new URL(".", fromUrl);
|
|
22713
22598
|
for (let i = 0; i < 5; i++) {
|
|
@@ -22723,8 +22608,7 @@ const readPackageJson = (fromUrl) => {
|
|
|
22723
22608
|
/** The global a pin's workflow registers itself under, ahead of the engine in the same file. */
|
|
22724
22609
|
const PIN_KEY = Symbol.for("@pmelab/gtd/pin");
|
|
22725
22610
|
const GTD_VERSION = globalThis[PIN_KEY]?.version ?? JSON.parse(readPackageJson(import.meta.url)).version;
|
|
22726
|
-
|
|
22727
|
-
//#region src/install/Install.ts
|
|
22611
|
+
// src/install/Install.ts
|
|
22728
22612
|
const WORKFLOWS_REPO = "https://github.com/pmelab/gtd-workflows";
|
|
22729
22613
|
const MINIMAL_DRIVER = `#!/usr/bin/env sh
|
|
22730
22614
|
set -eu
|
|
@@ -23406,8 +23290,7 @@ Any runtime works: the contract is \`--json\`/\`--json=<path>\` in, subprocesses
|
|
|
23406
23290
|
out.
|
|
23407
23291
|
`;
|
|
23408
23292
|
const renderBriefing = () => HEADER() + BEAT_PROTOCOL + JSON_FIELD_REFERENCE + DRIVER_OBLIGATIONS + RECOVERY + commandSuite() + EDITOR_INTEGRATION + PREREQUISITES;
|
|
23409
|
-
|
|
23410
|
-
//#region src/replay/Access.ts
|
|
23293
|
+
// src/replay/Access.ts
|
|
23411
23294
|
const UNRESTRICTED = {};
|
|
23412
23295
|
const withExtras = (globs, extras) => globs === void 0 ? null : [.../* @__PURE__ */ new Set([...globs, ...extras])];
|
|
23413
23296
|
/**
|
|
@@ -23434,8 +23317,7 @@ const accessShapeFault = (value) => {
|
|
|
23434
23317
|
};
|
|
23435
23318
|
const sameGlobs = (a, b) => a === void 0 || b === void 0 ? a === b : a.length === b.length && a.every((g, i) => g === b[i]);
|
|
23436
23319
|
const sameAccess = (a, b) => sameGlobs(a?.read, b?.read) && sameGlobs(a?.write, b?.write);
|
|
23437
|
-
|
|
23438
|
-
//#region src/replay/RefName.ts
|
|
23320
|
+
// src/replay/RefName.ts
|
|
23439
23321
|
const FORBIDDEN = /[\u0000- \u007f~^:?*[\\]/;
|
|
23440
23322
|
/** Why `name` cannot be (part of) a git ref name, or `undefined` when it can. */
|
|
23441
23323
|
const refNameFault = (name) => {
|
|
@@ -23450,8 +23332,7 @@ const refNameFault = (name) => {
|
|
|
23450
23332
|
if (part.endsWith(".lock")) return "a component ends with \".lock\"";
|
|
23451
23333
|
}
|
|
23452
23334
|
};
|
|
23453
|
-
|
|
23454
|
-
//#region src/replay/Tree.ts
|
|
23335
|
+
// src/replay/Tree.ts
|
|
23455
23336
|
const treeFromRecord = (files) => ({
|
|
23456
23337
|
paths: () => Object.keys(files).sort(),
|
|
23457
23338
|
read: (path) => Object.hasOwn(files, path) ? files[path] : void 0
|
|
@@ -23492,8 +23373,7 @@ const formatFault = (commits) => {
|
|
|
23492
23373
|
if (foreign === void 0) return void 0;
|
|
23493
23374
|
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
23375
|
};
|
|
23495
|
-
|
|
23496
|
-
//#region src/replay/Trailers.ts
|
|
23376
|
+
// src/replay/Trailers.ts
|
|
23497
23377
|
const TRANSITION_SEP = " → ";
|
|
23498
23378
|
const SUBJECT_RE = /^gtd\(([^()]+)\): (.+)$/;
|
|
23499
23379
|
/** `from` equal to `to` (or absent) collapses to the bare `gtd(<actor>): <to>` form. */
|
|
@@ -23694,8 +23574,7 @@ const formatCommitMessage = (spec) => {
|
|
|
23694
23574
|
];
|
|
23695
23575
|
return `${formatSubject(spec.actor, spec.to, spec.from)}\n\n${lines.join("\n")}`;
|
|
23696
23576
|
};
|
|
23697
|
-
|
|
23698
|
-
//#region src/replay/Replay.ts
|
|
23577
|
+
// src/replay/Replay.ts
|
|
23699
23578
|
const namesUnpin = (commit) => {
|
|
23700
23579
|
const unpin = pinStateIn(commit.parsed.format, "remove");
|
|
23701
23580
|
return unpin !== void 0 && commit.parsed.parsed?.to === unpin;
|
|
@@ -23974,7 +23853,8 @@ const replay = async (raw) => {
|
|
|
23974
23853
|
};
|
|
23975
23854
|
const resolveAccess = (memory) => resolveScoped(memory, (s) => s.access, input.configuredAccess, input.access);
|
|
23976
23855
|
const foldedAccessFor = (scopeAccess, file) => {
|
|
23977
|
-
|
|
23856
|
+
const threadPaths = scopeAccess?.read !== void 0 || scopeAccess?.write !== void 0 ? context.codeThreads().filter((t) => t.waitingOn === "agent").map((t) => t.path) : [];
|
|
23857
|
+
return foldAccess(scopeAccess, file, threadPaths);
|
|
23978
23858
|
};
|
|
23979
23859
|
const scopeAccessFault = () => {
|
|
23980
23860
|
for (const [i, s] of scopes.entries()) {
|
|
@@ -24283,16 +24163,14 @@ const replay = async (raw) => {
|
|
|
24283
24163
|
message: "gtd: the flow awaited something that is not a step — flow code may suspend only at steps"
|
|
24284
24164
|
};
|
|
24285
24165
|
};
|
|
24286
|
-
|
|
24287
|
-
//#region src/workflow/SteeringFormats.ts
|
|
24166
|
+
// src/workflow/SteeringFormats.ts
|
|
24288
24167
|
/** The unrendered `validate:` template a workflow compiler seeds for a built-in mode — quoted so a path with spaces survives interpolation. */
|
|
24289
24168
|
const seededValidateCommand = (mode) => `gtd check ${mode} "$GTD_FILE"`;
|
|
24290
24169
|
/** True when `command` is exactly `mode`'s seeded template (compared literally, not rendered) — distinguishes gtd's own seeding from a user override. */
|
|
24291
24170
|
const isSeededValidateCommand = (mode, command) => command === seededValidateCommand(mode);
|
|
24292
24171
|
/** The `validate:` command for a declared format: its spec travels on the command line, so `gtd check` loads no workflow to find it. */
|
|
24293
24172
|
const declaredValidateCommand = (mode, spec) => `gtd check ${mode} "$GTD_FILE" --spec '${spec.replace(/'/g, "'\\''")}'`;
|
|
24294
|
-
|
|
24295
|
-
//#region src/workflow/compile.ts
|
|
24173
|
+
// src/workflow/compile.ts
|
|
24296
24174
|
/**
|
|
24297
24175
|
* A `gtd.config.ts` `config` export (or its absence), checked and compiled. A
|
|
24298
24176
|
* malformed export compiles to nothing beyond the built-in modes, with every
|
|
@@ -24326,8 +24204,7 @@ const compileConfig = (value, origin) => {
|
|
|
24326
24204
|
diagnostics: []
|
|
24327
24205
|
};
|
|
24328
24206
|
};
|
|
24329
|
-
|
|
24330
|
-
//#region src/workflow/vars.ts
|
|
24207
|
+
// src/workflow/vars.ts
|
|
24331
24208
|
const PREFIX = "GTD_";
|
|
24332
24209
|
/** The live release flags as `flag_<name>` settings, provided by the CLI; absent means no flags. */
|
|
24333
24210
|
const StartFlags = Reference("StartFlags", { defaultValue: () => ({}) });
|
|
@@ -24390,8 +24267,7 @@ const SETTING_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
|
24390
24267
|
/** A name is written verbatim into a `Gtd-Var: <name>=<value>` trailer, so `=` or a newline would corrupt it. */
|
|
24391
24268
|
const isSettingName = (name) => SETTING_NAME.test(name);
|
|
24392
24269
|
const SETTING_NAME_RULE = "a setting name is a letter or \"_\", then letters, digits or \"_\"";
|
|
24393
|
-
|
|
24394
|
-
//#region src/workflow/discovery.ts
|
|
24270
|
+
// src/workflow/discovery.ts
|
|
24395
24271
|
const WORKFLOW_MODULE = "gtd.config.ts";
|
|
24396
24272
|
/**
|
|
24397
24273
|
* The file names gtd read repository settings from before `gtd.config.ts` took
|
|
@@ -24475,8 +24351,7 @@ var ConfigDiscovery = class ConfigDiscovery extends Service()("ConfigDiscovery")
|
|
|
24475
24351
|
return liveDiscovery(nodeSyncIo, yield* Path$1, (yield* Host).uid);
|
|
24476
24352
|
}));
|
|
24477
24353
|
};
|
|
24478
|
-
|
|
24479
|
-
//#region src/workflow/fingerprint.ts
|
|
24354
|
+
// src/workflow/fingerprint.ts
|
|
24480
24355
|
const HASH_LENGTH = 16;
|
|
24481
24356
|
const CONTROL_CHARACTER = /[\x00-\x1f\x7f-\x9f]/;
|
|
24482
24357
|
const realOr = (io, path) => {
|
|
@@ -24498,8 +24373,7 @@ const configFingerprint = (io, paths, files, root, read) => {
|
|
|
24498
24373
|
return fingerprint;
|
|
24499
24374
|
};
|
|
24500
24375
|
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
|
|
24376
|
+
// src/workflow/Diagnostic.ts
|
|
24503
24377
|
const compareSegment = (a, b) => {
|
|
24504
24378
|
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
24505
24379
|
if (typeof a === "number") return -1;
|
|
@@ -24539,8 +24413,7 @@ const dedupeDiagnostics = (diagnostics) => {
|
|
|
24539
24413
|
}
|
|
24540
24414
|
return out;
|
|
24541
24415
|
};
|
|
24542
|
-
|
|
24543
|
-
//#region src/workflow/load.ts
|
|
24416
|
+
// src/workflow/load.ts
|
|
24544
24417
|
const configError = (diagnostics) => new GtdError(`gtd: config:\n${diagnostics.filter((d) => d.severity === "error").map((d) => ` - ${formatDiagnostic(d)}`).join("\n")}`);
|
|
24545
24418
|
const failOnErrors = (diagnostics) => diagnostics.some((d) => d.severity === "error") ? fail$4(configError(diagnostics)) : void_;
|
|
24546
24419
|
const MIGRATION_DOC = "https://github.com/pmelab/gtd/blob/main/docs/configuration.md#migrating-from-gtdrc";
|
|
@@ -25240,8 +25113,7 @@ const firstStep = (loaded, head) => gen(function* () {
|
|
|
25240
25113
|
var ConfigService = class ConfigService extends Service()("ConfigService") {
|
|
25241
25114
|
static Live = succeed$2(ConfigService, { load });
|
|
25242
25115
|
};
|
|
25243
|
-
|
|
25244
|
-
//#region src/workflow/skills.ts
|
|
25116
|
+
// src/workflow/skills.ts
|
|
25245
25117
|
const fail = (origin, message) => new GtdError(`gtd: config:\n - ${origin}: ${message}`);
|
|
25246
25118
|
const checkShape = (value) => {
|
|
25247
25119
|
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error("skills export must return an object of scope -> skill names");
|
|
@@ -25251,7 +25123,7 @@ const checkShape = (value) => {
|
|
|
25251
25123
|
/** Every `config` key that names no known scope is a load error. */
|
|
25252
25124
|
const checkKeys = (configured, origin, known, section) => {
|
|
25253
25125
|
const sorted = [...known].sort();
|
|
25254
|
-
|
|
25126
|
+
const diagnostics = Object.keys(configured).filter((key) => !sorted.includes(key)).sort().map((key) => ({
|
|
25255
25127
|
severity: "error",
|
|
25256
25128
|
path: [
|
|
25257
25129
|
"config",
|
|
@@ -25260,7 +25132,8 @@ const checkKeys = (configured, origin, known, section) => {
|
|
|
25260
25132
|
],
|
|
25261
25133
|
message: `"${section}.${key}" is not a scope that runs a turn — known scopes: ${sorted.join(", ")}`,
|
|
25262
25134
|
origin
|
|
25263
|
-
}))
|
|
25135
|
+
}));
|
|
25136
|
+
return failOnErrors(diagnostics);
|
|
25264
25137
|
};
|
|
25265
25138
|
/**
|
|
25266
25139
|
* Skill lists for the settings actually in use. `config.skills` keys are
|
|
@@ -25296,8 +25169,7 @@ const resolveScopeAccess = (def, skills, vars) => gen(function* () {
|
|
|
25296
25169
|
yield* checkKeys(def.configuredAccess, def.skillsOrigin, known, "access");
|
|
25297
25170
|
return access;
|
|
25298
25171
|
});
|
|
25299
|
-
|
|
25300
|
-
//#region src/workflow/Workflow.ts
|
|
25172
|
+
// src/workflow/Workflow.ts
|
|
25301
25173
|
const knownModes = (def) => Object.keys(def.modes);
|
|
25302
25174
|
/**
|
|
25303
25175
|
* The engine a pin carries, as ES module source. Live, the `gtd.core.mjs` the
|
|
@@ -25331,8 +25203,7 @@ const pin = (module, root, version) => gen(function* () {
|
|
|
25331
25203
|
})) + core.replace(/^#!.*\n/, "");
|
|
25332
25204
|
return Buffer.concat([Buffer.from(`gtdpin 1 gtd ${version}\n`), gzip(source)]);
|
|
25333
25205
|
});
|
|
25334
|
-
|
|
25335
|
-
//#region src/emit/GitScript.ts
|
|
25206
|
+
// src/emit/GitScript.ts
|
|
25336
25207
|
const shellQuote = (value) => `'${value.replace(/'/g, "'\\''")}'`;
|
|
25337
25208
|
/**
|
|
25338
25209
|
* `--allow-empty` because gtd's workflow commits may be empty on purpose.
|
|
@@ -25498,8 +25369,7 @@ const ScriptSurface = { render: (steps) => {
|
|
|
25498
25369
|
const rendered = steps.map(renderLandStep);
|
|
25499
25370
|
return rendered.length === 0 ? "" : ["set -eu", ...rendered].join("\n\n");
|
|
25500
25371
|
} };
|
|
25501
|
-
|
|
25502
|
-
//#region src/emit/Emit.ts
|
|
25372
|
+
// src/emit/Emit.ts
|
|
25503
25373
|
/** 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
25374
|
const fileExistsGuard = (file) => `[ -f ${shellQuote(file)} ] || exit 0`;
|
|
25505
25375
|
/** A mode or `ui.format` command finds the file it works on in `$GTD_FILE`. */
|
|
@@ -25584,8 +25454,7 @@ const combinedScript = (required, optional) => {
|
|
|
25584
25454
|
`(\n${optional}\n) || ${PRESENTATION_FAILURE_WARNING}`
|
|
25585
25455
|
].join("\n");
|
|
25586
25456
|
};
|
|
25587
|
-
|
|
25588
|
-
//#region src/emit/OutcomeScript.ts
|
|
25457
|
+
// src/emit/OutcomeScript.ts
|
|
25589
25458
|
/**
|
|
25590
25459
|
* A `printf '<fmt>' <args...>` bash statement — `args` are already-valid bash
|
|
25591
25460
|
* tokens (a `shellQuote`d literal, a `"$(git …)"` substitution), never
|
|
@@ -25637,8 +25506,7 @@ const restoredOutcome = (to, state) => printfLine(FMT_RESTORED, [
|
|
|
25637
25506
|
`"$(git log -1 --format=%s ${shellQuote(to)})"`,
|
|
25638
25507
|
shellQuote(state)
|
|
25639
25508
|
]);
|
|
25640
|
-
|
|
25641
|
-
//#region src/emit/ModeContradiction.ts
|
|
25509
|
+
// src/emit/ModeContradiction.ts
|
|
25642
25510
|
/**
|
|
25643
25511
|
* Written for two readers at once, since gtd validate's exit code carries no
|
|
25644
25512
|
* second meaning to distinguish them: the agent (this is a CONFIGURATION BUG,
|
|
@@ -25682,10 +25550,10 @@ const buildModeContradictionCheck = (inputs) => {
|
|
|
25682
25550
|
* as a clean bill of health.
|
|
25683
25551
|
*/
|
|
25684
25552
|
const modeContradictionSkipNotice = (mode) => {
|
|
25685
|
-
|
|
25553
|
+
const message = `gtd: mode "${mode}" has an external validate: command — skipping the format/validate contradiction check`;
|
|
25554
|
+
return `printf '%s\\n' ${shellQuote(message)} >&2`;
|
|
25686
25555
|
};
|
|
25687
|
-
|
|
25688
|
-
//#region src/emit/SteeringMode.ts
|
|
25556
|
+
// src/emit/SteeringMode.ts
|
|
25689
25557
|
/**
|
|
25690
25558
|
* `format` alone (no live/external verdict) when there's no validator at
|
|
25691
25559
|
* all; a live in-process validator for a `"builtin"` validate OR a command
|
|
@@ -25842,17 +25710,17 @@ const modeContradictionSteps = (resolved) => gen(function* () {
|
|
|
25842
25710
|
* text for a driver to execute (`gtd renders; the driver executes`).
|
|
25843
25711
|
*/
|
|
25844
25712
|
const validateScriptFor = (resolved, file) => gen(function* () {
|
|
25845
|
-
|
|
25713
|
+
const steps = [
|
|
25846
25714
|
...yield* modeContradictionSteps(resolved),
|
|
25847
25715
|
{
|
|
25848
25716
|
kind: "command",
|
|
25849
25717
|
command: fileExistsGuard(file)
|
|
25850
25718
|
},
|
|
25851
25719
|
...modeCommandSteps(resolved, file)
|
|
25852
|
-
]
|
|
25720
|
+
];
|
|
25721
|
+
return { script: emitScripts(steps).required };
|
|
25853
25722
|
});
|
|
25854
|
-
|
|
25855
|
-
//#region src/step/planStep.ts
|
|
25723
|
+
// src/step/planStep.ts
|
|
25856
25724
|
/**
|
|
25857
25725
|
* At the human review gate an unconditional `gtd uncheck '<file>'` runs
|
|
25858
25726
|
* ahead of the commit, resetting every checkbox before `git add -A` picks it
|
|
@@ -25966,8 +25834,7 @@ const planStep = (snapshot, opts = {}) => {
|
|
|
25966
25834
|
]
|
|
25967
25835
|
};
|
|
25968
25836
|
};
|
|
25969
|
-
|
|
25970
|
-
//#region src/step/accessRefusal.ts
|
|
25837
|
+
// src/step/accessRefusal.ts
|
|
25971
25838
|
/**
|
|
25972
25839
|
* The landing refusal for changes outside `write`, or `undefined` when every
|
|
25973
25840
|
* path is allowed. `null` is unrestricted. The message is the fix prompt: gtd
|
|
@@ -25983,8 +25850,7 @@ const accessRefusal = (changes, write) => {
|
|
|
25983
25850
|
`allowed: ${write.length === 0 ? "(nothing)" : write.join(", ")}`
|
|
25984
25851
|
].join("\n");
|
|
25985
25852
|
};
|
|
25986
|
-
|
|
25987
|
-
//#region src/step/planStart.ts
|
|
25853
|
+
// src/step/planStart.ts
|
|
25988
25854
|
const refusal = (message) => ({
|
|
25989
25855
|
kind: "refusal",
|
|
25990
25856
|
message
|
|
@@ -26065,12 +25931,10 @@ const resolveBase = (commandLabel, value) => gen(function* () {
|
|
|
26065
25931
|
if (mergeBase.value === (yield* git.resolveRef("HEAD"))) return refusal(`${commandLabel}: nothing to review: HEAD has no commits beyond ${target}`);
|
|
26066
25932
|
return mergeBase.value;
|
|
26067
25933
|
});
|
|
26068
|
-
|
|
26069
|
-
//#region src/step/strayPaths.ts
|
|
25934
|
+
// src/step/strayPaths.ts
|
|
26070
25935
|
/** Globs use the `access.write` dialect (`globMatches`). */
|
|
26071
25936
|
const strayPaths = (touched, allow) => touched.filter((path) => !allow.some((glob) => globMatches(path, glob))).sort();
|
|
26072
|
-
|
|
26073
|
-
//#region src/edge/Edge.ts
|
|
25937
|
+
// src/edge/Edge.ts
|
|
26074
25938
|
const EMPTY_TREE$1 = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
26075
25939
|
const ACTORS = /* @__PURE__ */ new Set([
|
|
26076
25940
|
"agent",
|
|
@@ -26140,7 +26004,7 @@ const historyFormatFault = (history, location) => formatFault(history.slice(loca
|
|
|
26140
26004
|
format: parseCommitMessage(c.message).format
|
|
26141
26005
|
})));
|
|
26142
26006
|
/** Fails on a history in a format this gtd does not read, before anything acts on it. */
|
|
26143
|
-
const runOf = (history, location, closingHash
|
|
26007
|
+
const runOf = (history, location, closingHash) => {
|
|
26144
26008
|
const fault = historyFormatFault(history, location);
|
|
26145
26009
|
return fault === void 0 ? succeed$1(buildRun(history, location, closingHash)) : fail$4(new Error(fault));
|
|
26146
26010
|
};
|
|
@@ -26568,6 +26432,19 @@ const setupFor = (config, run, workspace, host, startOverrides = {}) => gen(func
|
|
|
26568
26432
|
}
|
|
26569
26433
|
};
|
|
26570
26434
|
});
|
|
26435
|
+
const UNTRACKED_LIMIT = 1e3;
|
|
26436
|
+
const refuseHugeUntracked = gen(function* () {
|
|
26437
|
+
const paths = yield* (yield* GitService).untrackedPaths();
|
|
26438
|
+
if (paths.length <= UNTRACKED_LIMIT) return;
|
|
26439
|
+
const dirs = /* @__PURE__ */ new Map();
|
|
26440
|
+
for (const p of paths) {
|
|
26441
|
+
const i = p.lastIndexOf("/");
|
|
26442
|
+
const d = i === -1 ? "." : p.slice(0, i);
|
|
26443
|
+
dirs.set(d, (dirs.get(d) ?? 0) + 1);
|
|
26444
|
+
}
|
|
26445
|
+
const top = [...dirs].sort((a, b) => b[1] - a[1]).slice(0, 3);
|
|
26446
|
+
return yield* fail$4(/* @__PURE__ */ new Error(`gtd: ${paths.length} untracked files (limit ${UNTRACKED_LIMIT}); largest untracked directories: ${top.map(([d, n]) => `${d} (${n})`).join(", ")}. Add them to .gitignore or delete them.`));
|
|
26447
|
+
});
|
|
26571
26448
|
const pendingChanges = (git, withIndex) => gen(function* () {
|
|
26572
26449
|
const worktree = yield* git.changedPaths();
|
|
26573
26450
|
if (!withIndex) return worktree;
|
|
@@ -27063,15 +26940,13 @@ const replayFinishedProcess = (config, run, hash, how) => gen(function* () {
|
|
|
27063
26940
|
...versionWarning !== void 0 ? { versionWarning } : {}
|
|
27064
26941
|
};
|
|
27065
26942
|
});
|
|
27066
|
-
|
|
27067
|
-
//#region src/cli/ToolCommands.ts
|
|
26943
|
+
// src/cli/ToolCommands.ts
|
|
27068
26944
|
/**
|
|
27069
26945
|
* The subcommands backed by a driver or tool. Core may not import those
|
|
27070
26946
|
* units, so the composition root provides them here.
|
|
27071
26947
|
*/
|
|
27072
26948
|
var ToolCommands = class extends Service()("ToolCommands") {};
|
|
27073
|
-
|
|
27074
|
-
//#region src/cli/Output.ts
|
|
26949
|
+
// src/cli/Output.ts
|
|
27075
26950
|
/**
|
|
27076
26951
|
* A command-level failure that should exit like a CLI usage error (2), not a
|
|
27077
26952
|
* generic runtime failure (1): an unknown `--json=<path>` selector, or a
|
|
@@ -27109,8 +26984,7 @@ const writeScript = (json, out, script, plain = script) => gen(function* () {
|
|
|
27109
26984
|
if (json.kind === "document") out.write(renderScriptJson(fields));
|
|
27110
26985
|
else yield* writeSelection(out, fields, json.path);
|
|
27111
26986
|
});
|
|
27112
|
-
|
|
27113
|
-
//#region src/cli/Strays.ts
|
|
26987
|
+
// src/cli/Strays.ts
|
|
27114
26988
|
const resolveSide = (git, side) => git.resolveRef(`${side}^{commit}`).pipe(mapError(() => new GtdError(`gtd strays: unknown revision '${side}'`)));
|
|
27115
26989
|
/** 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
26990
|
const runStraysCommand = (command, json, out) => gen(function* () {
|
|
@@ -27127,8 +27001,7 @@ const runStraysCommand = (command, json, out) => gen(function* () {
|
|
|
27127
27001
|
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
27002
|
return strays.length === 0 ? 0 : 10;
|
|
27129
27003
|
});
|
|
27130
|
-
|
|
27131
|
-
//#region src/cli/History.ts
|
|
27004
|
+
// src/cli/History.ts
|
|
27132
27005
|
/** Newest tip first. */
|
|
27133
27006
|
const historyEntries = gen(function* () {
|
|
27134
27007
|
const git = yield* GitService;
|
|
@@ -27186,12 +27059,13 @@ const runHistoryListCommand = (json, out) => gen(function* () {
|
|
|
27186
27059
|
const runHistoryShowCommand = (ref, json, out) => gen(function* () {
|
|
27187
27060
|
const entry = yield* resolveHistoryRef(ref, yield* historyEntries);
|
|
27188
27061
|
const trail = yield* historyTrail(entry.tip);
|
|
27189
|
-
|
|
27062
|
+
const document = {
|
|
27190
27063
|
ref: entry.ref,
|
|
27191
27064
|
entry: entry.entry,
|
|
27192
27065
|
branch: entry.branch,
|
|
27193
27066
|
...trail
|
|
27194
|
-
}
|
|
27067
|
+
};
|
|
27068
|
+
if (yield* writeJson(json, out, document)) return;
|
|
27195
27069
|
if (trail.versionWarning !== void 0) yield* (yield* Narrator).warn(trail.versionWarning);
|
|
27196
27070
|
const lines = [`${entry.ref} (branch ${entry.branch ?? "-"}, tip ${seven(entry.tip)})`];
|
|
27197
27071
|
for (const step of trail.steps) {
|
|
@@ -27204,8 +27078,7 @@ const runHistoryShowCommand = (ref, json, out) => gen(function* () {
|
|
|
27204
27078
|
});
|
|
27205
27079
|
/** Prints the script and never runs git: gtd's promise that it only decides and prints. */
|
|
27206
27080
|
const runHistoryFetchCommand = (remote, json, out) => writeScript(json, out, `${combinedScript(fetchHistoryRefs(remote), "")}\n`);
|
|
27207
|
-
|
|
27208
|
-
//#region src/cli/Metrics.ts
|
|
27081
|
+
// src/cli/Metrics.ts
|
|
27209
27082
|
const QUALITY$1 = ".gtd/QUALITY.md";
|
|
27210
27083
|
const LENS = /^((?:.*\.)?quality\.[^.]+)\.reviewing$/;
|
|
27211
27084
|
const inSeam = (step) => step.startsWith("seam.");
|
|
@@ -27397,8 +27270,7 @@ const runHistoryMetricsCommand = (refs, json, out) => gen(function* () {
|
|
|
27397
27270
|
lines.push(line(`total (${processes.length} processes)`, document.total));
|
|
27398
27271
|
out.write(`${lines.join("\n")}\n`);
|
|
27399
27272
|
});
|
|
27400
|
-
|
|
27401
|
-
//#region src/cli/Judges.ts
|
|
27273
|
+
// src/cli/Judges.ts
|
|
27402
27274
|
const FEEDBACK = ".gtd/FEEDBACK.md";
|
|
27403
27275
|
const QUALITY = ".gtd/QUALITY.md";
|
|
27404
27276
|
const REVIEW = ".gtd/REVIEW.md";
|
|
@@ -27748,7 +27620,7 @@ const runHistoryJudgesCommand = (refs, vars, jsonl, json, out) => gen(function*
|
|
|
27748
27620
|
}
|
|
27749
27621
|
const judges = calibrate(processes.flatMap((p) => p.judgments));
|
|
27750
27622
|
const whatIfs = Object.entries(vars).map(([name, value]) => whatIf(processes, name, value));
|
|
27751
|
-
|
|
27623
|
+
const document = {
|
|
27752
27624
|
processes: processes.map((p) => ({
|
|
27753
27625
|
ref: p.ref,
|
|
27754
27626
|
entry: p.entry,
|
|
@@ -27760,7 +27632,8 @@ const runHistoryJudgesCommand = (refs, vars, jsonl, json, out) => gen(function*
|
|
|
27760
27632
|
judges
|
|
27761
27633
|
},
|
|
27762
27634
|
whatIf: whatIfs
|
|
27763
|
-
}
|
|
27635
|
+
};
|
|
27636
|
+
if (yield* writeJson(json, out, document)) return;
|
|
27764
27637
|
if (processes.length === 0) {
|
|
27765
27638
|
out.write("no history refs; run gtd history fetch | sh to pull them\n");
|
|
27766
27639
|
return;
|
|
@@ -27773,8 +27646,7 @@ const runHistoryJudgesCommand = (refs, vars, jsonl, json, out) => gen(function*
|
|
|
27773
27646
|
}
|
|
27774
27647
|
out.write(`${lines.join("\n")}\n`);
|
|
27775
27648
|
});
|
|
27776
|
-
|
|
27777
|
-
//#region src/cli/Program.ts
|
|
27649
|
+
// src/cli/Program.ts
|
|
27778
27650
|
/** `needs: "none"` skips the repo-root guard — the server is keyed on file name, not workflow state. */
|
|
27779
27651
|
const runLspCommand = () => gen(function* () {
|
|
27780
27652
|
const { self } = yield* Host;
|
|
@@ -27815,8 +27687,10 @@ const landingScript = (required) => combinedScript(required, "");
|
|
|
27815
27687
|
const EMPTY_TREE = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
27816
27688
|
/** Decides `gtd land`'s one transition without performing it. Refusals fail the Effect; a no-op returns `subject: null` and empty scripts. */
|
|
27817
27689
|
const planLanding = (opts = {}, current) => gen(function* () {
|
|
27690
|
+
yield* refuseHugeUntracked;
|
|
27818
27691
|
const rest = current ?? (yield* currentRest);
|
|
27819
|
-
const
|
|
27692
|
+
const snapshot = yield* snapshotFromRest(rest, opts.judge);
|
|
27693
|
+
const outcome = planStep(snapshot, opts);
|
|
27820
27694
|
if (outcome.kind === "refusal") return yield* fail$4(new Error(outcome.message));
|
|
27821
27695
|
if (outcome.kind === "noop") {
|
|
27822
27696
|
const required = ScriptSurface.render([{
|
|
@@ -27855,7 +27729,8 @@ const planLanding = (opts = {}, current) => gen(function* () {
|
|
|
27855
27729
|
* run has no commits to name.
|
|
27856
27730
|
*/
|
|
27857
27731
|
const runSummaryCommand = (out) => gen(function* () {
|
|
27858
|
-
const
|
|
27732
|
+
const run = yield* summaryRun;
|
|
27733
|
+
const { prompt } = yield* summaryFor(run);
|
|
27859
27734
|
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
27735
|
out.write(prompt.endsWith("\n") ? prompt : prompt + "\n");
|
|
27861
27736
|
});
|
|
@@ -27873,10 +27748,11 @@ const runJudgeCommand = (json, out) => gen(function* () {
|
|
|
27873
27748
|
if (rendered.judge === void 0) return yield* fail$4(/* @__PURE__ */ new Error(`gtd judge: refused — the resolved rest ("${rest.state}") declares no "judge:"`));
|
|
27874
27749
|
const document = rendered.judge.endsWith("\n") ? rendered.judge : `${rendered.judge}\n`;
|
|
27875
27750
|
if (json.kind === "select") {
|
|
27876
|
-
const
|
|
27751
|
+
const parsed = yield* try_({
|
|
27877
27752
|
try: () => JSON.parse(rendered.judge),
|
|
27878
27753
|
catch: () => new SelectorUsageError("gtd judge: the resolved rest's \"judge:\" template did not render valid JSON")
|
|
27879
|
-
})
|
|
27754
|
+
});
|
|
27755
|
+
const selection = selectPath(parsed, json.path);
|
|
27880
27756
|
if (selection.kind === "value") out.write(`${selection.text}\n`);
|
|
27881
27757
|
else if (selection.kind === "unknown") return yield* fail$4(new SelectorUsageError(`gtd: unknown --json selector "${selection.path}" — see \`gtd --help\``));
|
|
27882
27758
|
return;
|
|
@@ -27957,7 +27833,8 @@ const runJudgeAnswerCommand = (json, out) => gen(function* () {
|
|
|
27957
27833
|
catch: () => new SelectorUsageError("gtd judge answer: stdin is not valid JSON")
|
|
27958
27834
|
});
|
|
27959
27835
|
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
|
|
27836
|
+
const result = yield* planLanding({ judge: verdict }, rest);
|
|
27837
|
+
const built = landFields(result);
|
|
27961
27838
|
if (json.kind === "document") out.write(renderLandJson(built));
|
|
27962
27839
|
else if (json.kind === "select") yield* writeSelection(out, built, json.path);
|
|
27963
27840
|
else out.write(renderLandPlain(built, "judge answer"));
|
|
@@ -27969,7 +27846,8 @@ const runJudgeAnswerCommand = (json, out) => gen(function* () {
|
|
|
27969
27846
|
* turn is next lives in the following `gtd next --json`'s `kind`.
|
|
27970
27847
|
*/
|
|
27971
27848
|
const runLandCommand = (opts, json, out) => gen(function* () {
|
|
27972
|
-
const
|
|
27849
|
+
const result = yield* planLanding(opts);
|
|
27850
|
+
const built = landFields(result);
|
|
27973
27851
|
if (json.kind === "document") out.write(renderLandJson(built));
|
|
27974
27852
|
else if (json.kind === "select") yield* writeSelection(out, built, json.path);
|
|
27975
27853
|
else out.write(renderLandPlain(built));
|
|
@@ -27991,6 +27869,7 @@ const startWorkflow = (workflow, varOverrides, json, out, commandLabel) => gen(f
|
|
|
27991
27869
|
const startable = config.workflowNames.length > 0 ? `startable: ${config.workflowNames.join(", ")}` : "this config exports no workflow besides its default, which an ordinary start runs";
|
|
27992
27870
|
return yield* fail$4(new GtdUsageError(`${commandLabel}: unknown workflow "${workflow}" — ${startable}`));
|
|
27993
27871
|
}
|
|
27872
|
+
yield* refuseHugeUntracked;
|
|
27994
27873
|
const rest = yield* restAt(void 0, varOverrides);
|
|
27995
27874
|
const started = yield* startRefusal(rest, resolved, varOverrides);
|
|
27996
27875
|
const plan = yield* planStart({
|
|
@@ -28103,10 +27982,11 @@ const runAbandonCommand = (json, out) => gen(function* () {
|
|
|
28103
27982
|
}
|
|
28104
27983
|
const restState = run.trace[run.trace.length - 1].state;
|
|
28105
27984
|
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
|
|
27985
|
+
const tip = yield* git.resolveRef("HEAD");
|
|
27986
|
+
const steps = [
|
|
28107
27987
|
{
|
|
28108
27988
|
kind: "gitWrite",
|
|
28109
|
-
command: updateRef(HISTORY_REF,
|
|
27989
|
+
command: updateRef(HISTORY_REF, tip)
|
|
28110
27990
|
},
|
|
28111
27991
|
{
|
|
28112
27992
|
kind: "gitWrite",
|
|
@@ -28120,7 +28000,8 @@ const runAbandonCommand = (json, out) => gen(function* () {
|
|
|
28120
28000
|
kind: "outcome",
|
|
28121
28001
|
command: abandonedOutcome(restState, run.startParentHash, initial)
|
|
28122
28002
|
}
|
|
28123
|
-
]
|
|
28003
|
+
];
|
|
28004
|
+
const required = emitScripts(steps).required;
|
|
28124
28005
|
yield* writeScript(json, out, combinedScript(required, ""));
|
|
28125
28006
|
});
|
|
28126
28007
|
/**
|
|
@@ -28140,7 +28021,7 @@ const runRestoreCommand = (json, out) => gen(function* () {
|
|
|
28140
28021
|
const check = yield* restorability(git, headHash, tip);
|
|
28141
28022
|
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
28023
|
const after = yield* restAt(tip);
|
|
28143
|
-
const
|
|
28024
|
+
const steps = [
|
|
28144
28025
|
{
|
|
28145
28026
|
kind: "gitWrite",
|
|
28146
28027
|
command: hardResetTo(tip)
|
|
@@ -28153,7 +28034,8 @@ const runRestoreCommand = (json, out) => gen(function* () {
|
|
|
28153
28034
|
kind: "outcome",
|
|
28154
28035
|
command: restoredOutcome(tip, after.state)
|
|
28155
28036
|
}
|
|
28156
|
-
]
|
|
28037
|
+
];
|
|
28038
|
+
const required = emitScripts(steps).required;
|
|
28157
28039
|
yield* writeScript(json, out, combinedScript(required, ""));
|
|
28158
28040
|
});
|
|
28159
28041
|
/** The step an ordinary repin rests at — the one the process rests at now. */
|
|
@@ -28179,7 +28061,7 @@ const runRepinCommand = (json, out) => gen(function* () {
|
|
|
28179
28061
|
pin: "add",
|
|
28180
28062
|
...anchor !== void 0 ? { anchor: anchor.at } : {}
|
|
28181
28063
|
});
|
|
28182
|
-
|
|
28064
|
+
const steps = [
|
|
28183
28065
|
{
|
|
28184
28066
|
kind: "gitWrite",
|
|
28185
28067
|
command: repinScript(PIN_PATH)
|
|
@@ -28192,7 +28074,8 @@ const runRepinCommand = (json, out) => gen(function* () {
|
|
|
28192
28074
|
kind: "outcome",
|
|
28193
28075
|
command: transitionOutcome(PIN_STATES.add, to)
|
|
28194
28076
|
}
|
|
28195
|
-
]
|
|
28077
|
+
];
|
|
28078
|
+
yield* writeScript(json, out, combinedScript(emitScripts(steps).required, ""));
|
|
28196
28079
|
});
|
|
28197
28080
|
/**
|
|
28198
28081
|
* The mode's own validate command for `file`: a declared `validate:` command
|
|
@@ -28203,7 +28086,8 @@ const runRepinCommand = (json, out) => gen(function* () {
|
|
|
28203
28086
|
const selfValidateCommand = (def, state, mode, file, spec) => {
|
|
28204
28087
|
const resolved = resolveMode(def, state, mode, spec);
|
|
28205
28088
|
const validate = resolved.kind === "resolved" ? resolved.validate : void 0;
|
|
28206
|
-
|
|
28089
|
+
const command = validate?.kind === "command" ? validate.command : seededValidateCommand(mode);
|
|
28090
|
+
return commandForFile(command, file);
|
|
28207
28091
|
};
|
|
28208
28092
|
const emitsValidatablePrompt = (rendered) => rendered.kind === "prompt" && rendered.file !== void 0 && rendered.mode !== void 0;
|
|
28209
28093
|
/**
|
|
@@ -28242,6 +28126,7 @@ const restBeatKind = (rest) => beatKindOf({
|
|
|
28242
28126
|
* document's own `kind` field, never the exit code.
|
|
28243
28127
|
*/
|
|
28244
28128
|
const runNextCommand = (json, out) => gen(function* () {
|
|
28129
|
+
yield* refuseHugeUntracked;
|
|
28245
28130
|
const rest = yield* currentRest;
|
|
28246
28131
|
const rendered = yield* renderRest(rest);
|
|
28247
28132
|
const fields = yield* gatherBeatDocument(rest, rendered);
|
|
@@ -28324,7 +28209,8 @@ const runCodeThreadsCheckCommand = () => gen(function* () {
|
|
|
28324
28209
|
});
|
|
28325
28210
|
/** Prints one `file:line: [^name]: <first H entry>` line per open thread. */
|
|
28326
28211
|
const runOpenThreadsCheckCommand = (format, file) => gen(function* () {
|
|
28327
|
-
const
|
|
28212
|
+
const content = yield* existingFile(file);
|
|
28213
|
+
const errors = openThreads(format, content).map((t) => `${file}:${t.line + 1}: [^${t.name}]: ${t.firstMe}`);
|
|
28328
28214
|
if (errors.length === 0) return;
|
|
28329
28215
|
return yield* fail$4(/* @__PURE__ */ new Error(`gtd check: ${errors.length} open thread(s) in ${file}:\n` + errors.join("\n")));
|
|
28330
28216
|
});
|
|
@@ -28333,7 +28219,8 @@ const runOpenThreadsCheckCommand = (format, file) => gen(function* () {
|
|
|
28333
28219
|
* reads, so the gate script and the flow's own check stay in sync.
|
|
28334
28220
|
*/
|
|
28335
28221
|
const runOpenQuestionsCheckCommand = (format, file) => gen(function* () {
|
|
28336
|
-
const
|
|
28222
|
+
const content = yield* existingFile(file);
|
|
28223
|
+
const errors = unansweredQuestions(format, content).map((q) => `${file}:${q.headingLine + 1}: ${q.question}`);
|
|
28337
28224
|
if (errors.length === 0) return;
|
|
28338
28225
|
return yield* fail$4(/* @__PURE__ */ new Error(`gtd check: ${errors.length} open question(s) unanswered in ${file}:\n` + errors.join("\n")));
|
|
28339
28226
|
});
|
|
@@ -28369,7 +28256,7 @@ const gatherBeatDocument = (rest, rendered) => gen(function* () {
|
|
|
28369
28256
|
const resolvedValidate = kind === "prompt" ? yield* resolveValidateScript(rest).pipe(catch_(() => succeed$1(void 0))) : void 0;
|
|
28370
28257
|
const validate = resolvedValidate !== void 0 && resolvedValidate.script.length > 0 ? resolvedValidate.script : void 0;
|
|
28371
28258
|
const log = yield* loopLogPath;
|
|
28372
|
-
|
|
28259
|
+
const demand = demandOf({
|
|
28373
28260
|
rendered,
|
|
28374
28261
|
kind,
|
|
28375
28262
|
...session !== void 0 ? { session: {
|
|
@@ -28377,7 +28264,8 @@ const gatherBeatDocument = (rest, rendered) => gen(function* () {
|
|
|
28377
28264
|
resume: session.resume
|
|
28378
28265
|
} } : {},
|
|
28379
28266
|
...validate !== void 0 ? { validate } : {}
|
|
28380
|
-
})
|
|
28267
|
+
});
|
|
28268
|
+
const status = statusOf({
|
|
28381
28269
|
rendered,
|
|
28382
28270
|
idle: restIsIdle(rest),
|
|
28383
28271
|
initial: noProcessUnderway(rest),
|
|
@@ -28388,7 +28276,8 @@ const gatherBeatDocument = (rest, rendered) => gen(function* () {
|
|
|
28388
28276
|
cost: rest.cost.total,
|
|
28389
28277
|
costByModel: rest.cost.byModel,
|
|
28390
28278
|
approvals: rest.run.approvals
|
|
28391
|
-
})
|
|
28279
|
+
});
|
|
28280
|
+
return beatDocument(demand, status);
|
|
28392
28281
|
});
|
|
28393
28282
|
/**
|
|
28394
28283
|
* `gtd ui`: loads `ui:` config and hands it, alongside the parsed flags, to
|
|
@@ -28405,6 +28294,7 @@ const runUiCliCommand = (command, out) => gen(function* () {
|
|
|
28405
28294
|
...command.host !== void 0 ? { host: command.host } : {},
|
|
28406
28295
|
...command.port !== void 0 ? { port: command.port } : {},
|
|
28407
28296
|
selfSigned: command.selfSigned,
|
|
28297
|
+
...command.http === true ? { http: true } : {},
|
|
28408
28298
|
dev: command.dev
|
|
28409
28299
|
},
|
|
28410
28300
|
config: config.ui,
|
|
@@ -28510,8 +28400,7 @@ const runCommand$1 = (command, json, out) => {
|
|
|
28510
28400
|
return yield* dispatch;
|
|
28511
28401
|
});
|
|
28512
28402
|
};
|
|
28513
|
-
|
|
28514
|
-
//#region src/cli/Help.ts
|
|
28403
|
+
// src/cli/Help.ts
|
|
28515
28404
|
const HELP_WIDTH = 80;
|
|
28516
28405
|
/**
|
|
28517
28406
|
* Word-wraps prose to `width` columns, every line prefixed by `indent`.
|
|
@@ -28561,8 +28450,7 @@ const closest = (word, candidates) => {
|
|
|
28561
28450
|
}
|
|
28562
28451
|
return best?.name;
|
|
28563
28452
|
};
|
|
28564
|
-
|
|
28565
|
-
//#region src/cli/Cli.ts
|
|
28453
|
+
// src/cli/Cli.ts
|
|
28566
28454
|
/** `<name>=<value>` occurrences of `flag` → one record, each name a setting name given at most once. */
|
|
28567
28455
|
const decodeAssignments = (flag, raws) => {
|
|
28568
28456
|
const vars = {};
|
|
@@ -28638,7 +28526,7 @@ const FLAGS = [
|
|
|
28638
28526
|
},
|
|
28639
28527
|
scopeError: "gtd: --port is only valid for `gtd ui`",
|
|
28640
28528
|
valueHint: "<n>",
|
|
28641
|
-
help: "The tailscale serve port (default: the first free of 8443, 10000, 443), or with --host the port to bind (default: any free one)"
|
|
28529
|
+
help: "The tailscale serve port (default: the first free of 8443, 10000, 443), or with --host or --http the port to bind (default: any free one)"
|
|
28642
28530
|
},
|
|
28643
28531
|
{
|
|
28644
28532
|
name: "--host",
|
|
@@ -28660,6 +28548,16 @@ const FLAGS = [
|
|
|
28660
28548
|
valueHint: "",
|
|
28661
28549
|
help: "Bind directly with a throwaway self-signed certificate instead of the configured ui.cert/ui.key"
|
|
28662
28550
|
},
|
|
28551
|
+
{
|
|
28552
|
+
name: "--http",
|
|
28553
|
+
arity: 0,
|
|
28554
|
+
repeatable: false,
|
|
28555
|
+
scope: (kind) => kind === "ui",
|
|
28556
|
+
decode: () => succeed$5(true),
|
|
28557
|
+
scopeError: "gtd: --http is only valid for `gtd ui`",
|
|
28558
|
+
valueHint: "",
|
|
28559
|
+
help: "Serve plain HTTP for a local TLS-terminating proxy; binds 127.0.0.1 unless a loopback --host is given"
|
|
28560
|
+
},
|
|
28663
28561
|
{
|
|
28664
28562
|
name: "--dev",
|
|
28665
28563
|
arity: 0,
|
|
@@ -29375,18 +29273,22 @@ const parseArgv = (argv) => {
|
|
|
29375
29273
|
verbose
|
|
29376
29274
|
};
|
|
29377
29275
|
}
|
|
29378
|
-
if (kind === "ui")
|
|
29379
|
-
|
|
29380
|
-
|
|
29381
|
-
kind: "
|
|
29382
|
-
|
|
29383
|
-
|
|
29384
|
-
|
|
29385
|
-
|
|
29386
|
-
|
|
29387
|
-
|
|
29388
|
-
|
|
29389
|
-
|
|
29276
|
+
if (kind === "ui") {
|
|
29277
|
+
if (bag["--http"] === true && bag["--self-signed"] === true) return usagePlan("gtd: --http and --self-signed cannot be combined", jsonSeen);
|
|
29278
|
+
return {
|
|
29279
|
+
kind: "command",
|
|
29280
|
+
command: {
|
|
29281
|
+
kind: "ui",
|
|
29282
|
+
...bag["--host"] !== void 0 ? { host: bag["--host"] } : {},
|
|
29283
|
+
...bag["--port"] !== void 0 ? { port: bag["--port"] } : {},
|
|
29284
|
+
selfSigned: bag["--self-signed"] ?? false,
|
|
29285
|
+
...bag["--http"] === true ? { http: true } : {},
|
|
29286
|
+
dev: bag["--dev"] ?? false
|
|
29287
|
+
},
|
|
29288
|
+
json,
|
|
29289
|
+
verbose
|
|
29290
|
+
};
|
|
29291
|
+
}
|
|
29390
29292
|
if (kind === "check") return {
|
|
29391
29293
|
kind: "command",
|
|
29392
29294
|
command: {
|
|
@@ -29496,6 +29398,7 @@ const parseArgv = (argv) => {
|
|
|
29496
29398
|
verbose
|
|
29497
29399
|
};
|
|
29498
29400
|
};
|
|
29401
|
+
nodeStdio();
|
|
29499
29402
|
/**
|
|
29500
29403
|
* Normalizes an artifact's trailing newlines to exactly one — an emitted
|
|
29501
29404
|
* script ends with none, plain text already ends with one, so this is the
|
|
@@ -29563,8 +29466,7 @@ const runCli = (argv, io) => {
|
|
|
29563
29466
|
io.exit(code);
|
|
29564
29467
|
}), provide(io.layers(plan.verbose)), sandbox, catch_((cause) => hasInterruptsOnly(cause) ? failCause$1(cause) : report(io, plan.json.kind !== "off")(cause)));
|
|
29565
29468
|
};
|
|
29566
|
-
|
|
29567
|
-
//#region src/twins/InMemRepo.ts
|
|
29469
|
+
// src/twins/InMemRepo.ts
|
|
29568
29470
|
/** 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
29471
|
const TEST_DOUBLE_SENTINEL = "gtd:test-double:never-ship";
|
|
29570
29472
|
function sha1(input) {
|
|
@@ -29777,6 +29679,10 @@ var InMemRepo = class InMemRepo {
|
|
|
29777
29679
|
changedPathsWorktree(base) {
|
|
29778
29680
|
return diffTrees(this.treeAt(base), new Map(this.worktree));
|
|
29779
29681
|
}
|
|
29682
|
+
/** Worktree paths the index does not carry. */
|
|
29683
|
+
untrackedPaths() {
|
|
29684
|
+
return [...this.worktree.keys()].filter((k) => !this.index.has(k));
|
|
29685
|
+
}
|
|
29780
29686
|
/** The index vs HEAD — the port's `stagedPaths`. */
|
|
29781
29687
|
stagedPaths() {
|
|
29782
29688
|
return diffTrees(this.treeAt(void 0), this.index);
|
|
@@ -30059,8 +29965,7 @@ function diffTrees(treeA, treeB) {
|
|
|
30059
29965
|
}
|
|
30060
29966
|
return result.sort((a, b) => a.path.localeCompare(b.path));
|
|
30061
29967
|
}
|
|
30062
|
-
|
|
30063
|
-
//#region src/twins/FakeGitOperations.ts
|
|
29968
|
+
// src/twins/FakeGitOperations.ts
|
|
30064
29969
|
const tryCatch = (fn) => try_({
|
|
30065
29970
|
try: fn,
|
|
30066
29971
|
catch: (e) => e instanceof Error ? e : new Error(String(e))
|
|
@@ -30108,6 +30013,7 @@ const makeGitReaderOps = (repo, root) => ({
|
|
|
30108
30013
|
commitHistory: (base, head) => succeed$1(repo.commitHistory(base, head)),
|
|
30109
30014
|
subjectHistory: (pageSize, skip, head) => succeed$1(repo.subjectHistory(pageSize, skip, head)),
|
|
30110
30015
|
changedPaths: (base) => succeed$1(repo.changedPathsWorktree(base)),
|
|
30016
|
+
untrackedPaths: () => succeed$1(repo.untrackedPaths()),
|
|
30111
30017
|
stagedPaths: () => succeed$1(repo.stagedPaths()),
|
|
30112
30018
|
diffPaths: (base, tip) => tryCatch(() => repo.diffPaths(base, tip)),
|
|
30113
30019
|
authorIdent: () => succeed$1(some({
|
|
@@ -30138,8 +30044,7 @@ const fakeGitOperations = (repo, root = "/repo") => ({
|
|
|
30138
30044
|
...makeGitReaderOps(repo, root),
|
|
30139
30045
|
...makeGitWriterOps(repo)
|
|
30140
30046
|
});
|
|
30141
|
-
|
|
30142
|
-
//#region src/twins/Layers.ts
|
|
30047
|
+
// src/twins/Layers.ts
|
|
30143
30048
|
const toError = (e) => e instanceof Error ? e : new Error(String(e));
|
|
30144
30049
|
/**
|
|
30145
30050
|
* Keys UNDER `.git/` (never the bare `.git` FILE itself — `WorktreeState.ts`'s
|
|
@@ -30293,8 +30198,7 @@ function testLayers(repo, opts = {}) {
|
|
|
30293
30198
|
...opts.tools
|
|
30294
30199
|
}), CommandRunner.layer(() => fail$4(/* @__PURE__ */ new Error("gtd ui: CommandRunner has no test double wired into testLayers()"))));
|
|
30295
30200
|
}
|
|
30296
|
-
|
|
30297
|
-
//#region src/twins/cliIo.ts
|
|
30201
|
+
// src/twins/cliIo.ts
|
|
30298
30202
|
const makeCapturingCliIo = (repo, env = {}, tools = {}, stdin = "") => {
|
|
30299
30203
|
let stdout = Buffer.alloc(0);
|
|
30300
30204
|
let stderr = "";
|
|
@@ -30326,8 +30230,7 @@ const makeCapturingCliIo = (repo, env = {}, tools = {}, stdin = "") => {
|
|
|
30326
30230
|
})
|
|
30327
30231
|
};
|
|
30328
30232
|
};
|
|
30329
|
-
|
|
30330
|
-
//#region src/twins/FlowScripts.ts
|
|
30233
|
+
// src/twins/FlowScripts.ts
|
|
30331
30234
|
const SHEBANG = "#!/usr/bin/env sh";
|
|
30332
30235
|
const words$1 = (text) => [...text.matchAll(/'((?:[^']|'\\'')*)'/g)].map((m) => m[1].replaceAll("'\\''", "'"));
|
|
30333
30236
|
const ok = (output = "") => ({
|
|
@@ -30429,7 +30332,8 @@ const recognizeRestore = (repo, script) => {
|
|
|
30429
30332
|
restore: restoring.map((l) => l.path),
|
|
30430
30333
|
remove: lines.filter((l) => l.source === void 0).map((l) => l.path)
|
|
30431
30334
|
};
|
|
30432
|
-
|
|
30335
|
+
const commit = lines[0]?.commit ?? "";
|
|
30336
|
+
if (restoreScript(commit, paths, restoring[0]?.source) !== script) return void 0;
|
|
30433
30337
|
if (lines.map((line) => applyRestoreLine(repo, line)).at(-1) === false) return {
|
|
30434
30338
|
ok: false,
|
|
30435
30339
|
error: "the last path changed since the commit",
|
|
@@ -30624,8 +30528,7 @@ const applyFlowScript = (repo, commands, script) => {
|
|
|
30624
30528
|
if (!script.startsWith(`${SHEBANG}\n`)) return void 0;
|
|
30625
30529
|
return recognizeRemove(repo, script) ?? recognizeMove(repo, script) ?? recognizeShow(repo, script) ?? recognizeWrite(repo, script) ?? recognizePatch(repo, script) ?? recognizeRestore(repo, script) ?? recognizeCheck(repo, commands, script);
|
|
30626
30530
|
};
|
|
30627
|
-
|
|
30628
|
-
//#region src/twins/EmittedScriptRecognizer.ts
|
|
30531
|
+
// src/twins/EmittedScriptRecognizer.ts
|
|
30629
30532
|
/**
|
|
30630
30533
|
* Reverses `GitScript.ts`'s `shellQuote`: extracts every `'...'` token from
|
|
30631
30534
|
* `text`, in order, unescaping the `'\''` (close-literal-open) sequence back
|
|
@@ -31253,8 +31156,7 @@ const unrecognized = (block, output = "") => ({
|
|
|
31253
31156
|
Narrator.layer(() => {}, false);
|
|
31254
31157
|
new TextEncoder();
|
|
31255
31158
|
new TextDecoder("utf-8", { ignoreBOM: true });
|
|
31256
|
-
|
|
31257
|
-
//#region src/testkit/imports.ts
|
|
31159
|
+
// src/testkit/imports.ts
|
|
31258
31160
|
const IDENTIFIER$1 = /^[A-Za-z_$][\w$]*$/;
|
|
31259
31161
|
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
31162
|
const bindings = (list) => list.split(",").map((entry) => entry.trim()).filter((entry) => entry !== "" && !entry.startsWith("type ")).map((entry) => {
|
|
@@ -31299,8 +31201,7 @@ const importsFrom = (source, modules, lookup) => {
|
|
|
31299
31201
|
return rewrite(kind, clause, specifier, module);
|
|
31300
31202
|
});
|
|
31301
31203
|
};
|
|
31302
|
-
|
|
31303
|
-
//#region src/testkit/TestRepo.ts
|
|
31204
|
+
// src/testkit/TestRepo.ts
|
|
31304
31205
|
const REGISTRY = Symbol.for("@pmelab/gtd/testkit:modules");
|
|
31305
31206
|
const registry = () => {
|
|
31306
31207
|
const global = globalThis;
|
|
@@ -31613,5 +31514,4 @@ const testRepo = (options) => {
|
|
|
31613
31514
|
};
|
|
31614
31515
|
return self;
|
|
31615
31516
|
};
|
|
31616
|
-
//#endregion
|
|
31617
31517
|
export { verdictWhen as a, verdict as i, runsItsScript as n, whenPrompted as o, testRepo as r, inTurn as t };
|