@savvy-web/silk 3.4.2 → 3.5.1
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/changesets-changelog.cjs +3044 -1430
- package/changesets-changelog.d.cts +808 -197
- package/changesets-changelog.d.ts +808 -197
- package/changesets-changelog.js +2989 -1474
- package/changesets-markdownlint.cjs +3044 -1430
- package/changesets-markdownlint.d.cts +808 -197
- package/changesets-markdownlint.d.ts +808 -197
- package/changesets-markdownlint.js +2989 -1474
- package/package.json +6 -6
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
|
@@ -3298,7 +3298,7 @@ type Label = Label$1;
|
|
|
3298
3298
|
type Severity = Severity$1;
|
|
3299
3299
|
type Plugin<Tree extends Node$3 = Node$3, Option extends unknown = unknown> = (config?: [level: Label | Severity | boolean, option?: Option] | Label | Option | Severity) => ((tree: Tree, file: VFile, next: TransformCallback<Tree>) => undefined) | undefined;
|
|
3300
3300
|
//#endregion
|
|
3301
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.
|
|
3301
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.7.0_effect@4.0.0-beta.107/node_modules/@effected/git/index.d.ts
|
|
3302
3302
|
//#region src/Git.d.ts
|
|
3303
3303
|
declare const GitCommandError_base: Schema.Class<GitCommandError, Schema.TaggedStruct<"GitCommandError", {
|
|
3304
3304
|
/**
|
|
@@ -3309,7 +3309,16 @@ declare const GitCommandError_base: Schema.Class<GitCommandError, Schema.TaggedS
|
|
|
3309
3309
|
* logic routes on this instead of matching `detail` prose.
|
|
3310
3310
|
*/
|
|
3311
3311
|
readonly kind: Schema.Literals<readonly ["refused", "failed"]>;
|
|
3312
|
-
/**
|
|
3312
|
+
/**
|
|
3313
|
+
* The REDACTED argument vector, without the leading `git`.
|
|
3314
|
+
*
|
|
3315
|
+
* Sensitive positionals — config values, a URL's embedded userinfo — are
|
|
3316
|
+
* already masked by the constructor's redaction mask before this error is
|
|
3317
|
+
* constructed (`configSet`'s value reads `<redacted>`; a
|
|
3318
|
+
* `https://user:token@host/...` remote keeps everything but its
|
|
3319
|
+
* `userinfo@`). The raw argv is never persisted in an error value, and
|
|
3320
|
+
* `message` renders this redacted vector.
|
|
3321
|
+
*/
|
|
3313
3322
|
readonly args: Schema.$Array<Schema.String>;
|
|
3314
3323
|
/** The working directory the command ran in. */
|
|
3315
3324
|
readonly cwd: Schema.String;
|
|
@@ -3368,6 +3377,70 @@ declare class UnknownRefError extends UnknownRefError_base {
|
|
|
3368
3377
|
/** Renders the unresolvable ref into a one-line message. */
|
|
3369
3378
|
get message(): string;
|
|
3370
3379
|
}
|
|
3380
|
+
declare const NonFastForwardError_base: Schema.Class<NonFastForwardError, Schema.TaggedStruct<"NonFastForwardError", {
|
|
3381
|
+
/** The working directory the push ran in. */
|
|
3382
|
+
readonly cwd: Schema.String;
|
|
3383
|
+
/** The refspec that was rejected, when the caller passed one. */
|
|
3384
|
+
readonly refspec: Schema.optionalKey<Schema.String>;
|
|
3385
|
+
}>, import("effect/Cause").YieldableError>;
|
|
3386
|
+
/**
|
|
3387
|
+
* A `git push` was rejected because the remote ref has moved: the classic
|
|
3388
|
+
* non-fast-forward rejection (`fetch first` / `non-fast-forward`), or a
|
|
3389
|
+
* `--force-with-lease` lease failure (`stale info`).
|
|
3390
|
+
*
|
|
3391
|
+
* @remarks
|
|
3392
|
+
* The typed signal a fetch-then-retry (or rebase-then-retry) fallback
|
|
3393
|
+
* branches on — every other push failure stays a {@link GitCommandError}.
|
|
3394
|
+
* Only `Git.push` can fail with this error.
|
|
3395
|
+
*
|
|
3396
|
+
* @public
|
|
3397
|
+
*/
|
|
3398
|
+
declare class NonFastForwardError extends NonFastForwardError_base {
|
|
3399
|
+
/** Renders the rejected push into a one-line message. */
|
|
3400
|
+
get message(): string;
|
|
3401
|
+
}
|
|
3402
|
+
declare const MergeConflictError_base: Schema.Class<MergeConflictError, Schema.TaggedStruct<"MergeConflictError", {
|
|
3403
|
+
/** The working directory the merge ran in. */
|
|
3404
|
+
readonly cwd: Schema.String;
|
|
3405
|
+
}>, import("effect/Cause").YieldableError>;
|
|
3406
|
+
/**
|
|
3407
|
+
* A merge-shaped operation (`pull`, `stash pop`, `stash apply`) stopped with
|
|
3408
|
+
* conflict markers in the working tree.
|
|
3409
|
+
*
|
|
3410
|
+
* @remarks
|
|
3411
|
+
* The typed signal a resolve-or-abort recovery branches on. The conflicted
|
|
3412
|
+
* state is REAL: git has already written conflict markers, and (for `pull`)
|
|
3413
|
+
* `MERGE_HEAD` is set — the caller owns resolving or aborting. Detection
|
|
3414
|
+
* matches git's conflict report, which lands on STDOUT for a merge and on
|
|
3415
|
+
* stderr for a rebase-mode pull; both streams are inspected.
|
|
3416
|
+
*
|
|
3417
|
+
* @public
|
|
3418
|
+
*/
|
|
3419
|
+
declare class MergeConflictError extends MergeConflictError_base {
|
|
3420
|
+
/** Renders the conflicted merge into a one-line message. */
|
|
3421
|
+
get message(): string;
|
|
3422
|
+
}
|
|
3423
|
+
declare const DirtyWorktreeError_base: Schema.Class<DirtyWorktreeError, Schema.TaggedStruct<"DirtyWorktreeError", {
|
|
3424
|
+
/** The working directory whose local changes blocked the operation. */
|
|
3425
|
+
readonly cwd: Schema.String;
|
|
3426
|
+
}>, import("effect/Cause").YieldableError>;
|
|
3427
|
+
/**
|
|
3428
|
+
* A merge-shaped operation refused to start because local modifications would
|
|
3429
|
+
* be overwritten — git's refusal reads
|
|
3430
|
+
* `Your local changes ... would be overwritten by merge`.
|
|
3431
|
+
*
|
|
3432
|
+
* @remarks
|
|
3433
|
+
* The typed "commit or stash first" signal. Unlike {@link MergeConflictError}
|
|
3434
|
+
* the working tree is UNTOUCHED — git aborted before changing anything.
|
|
3435
|
+
* Only the merge-shaped methods (`pull`, `stashPop`, `stashApply`) can fail
|
|
3436
|
+
* with this error.
|
|
3437
|
+
*
|
|
3438
|
+
* @public
|
|
3439
|
+
*/
|
|
3440
|
+
declare class DirtyWorktreeError extends DirtyWorktreeError_base {
|
|
3441
|
+
/** Renders the blocked operation into a one-line message. */
|
|
3442
|
+
get message(): string;
|
|
3443
|
+
}
|
|
3371
3444
|
declare const LsTreeEntry_base: Schema.Class<LsTreeEntry, Schema.Struct<{
|
|
3372
3445
|
/** The entry's file mode, e.g. `100644`. */
|
|
3373
3446
|
readonly mode: Schema.String;
|
|
@@ -3423,6 +3496,21 @@ declare const CommitInfo_base: Schema.Class<CommitInfo, Schema.Struct<{
|
|
|
3423
3496
|
* @public
|
|
3424
3497
|
*/
|
|
3425
3498
|
declare class CommitInfo extends CommitInfo_base {}
|
|
3499
|
+
/**
|
|
3500
|
+
* Options for {@link StatusEntry.toLine} / {@link StatusEntry.format}: how a
|
|
3501
|
+
* rename/copy entry's path field renders.
|
|
3502
|
+
*
|
|
3503
|
+
* @public
|
|
3504
|
+
*/
|
|
3505
|
+
interface StatusRenderOptions {
|
|
3506
|
+
/**
|
|
3507
|
+
* `"new"` (the default) renders only the NEW path — the entry's current
|
|
3508
|
+
* path, the one that exists on disk. `"arrow"` renders git's own non-`-z`
|
|
3509
|
+
* porcelain form, `<origPath> -> <path>`. Non-rename entries are
|
|
3510
|
+
* unaffected either way.
|
|
3511
|
+
*/
|
|
3512
|
+
readonly renames?: "new" | "arrow";
|
|
3513
|
+
}
|
|
3426
3514
|
declare const StatusEntry_base: Schema.Class<StatusEntry, Schema.Struct<{
|
|
3427
3515
|
/** The index-side status code (first porcelain column). */
|
|
3428
3516
|
readonly x: Schema.Literals<readonly [" ", "M", "T", "A", "D", "R", "C", "U", "?", "!"]>;
|
|
@@ -3438,7 +3526,209 @@ declare const StatusEntry_base: Schema.Class<StatusEntry, Schema.Struct<{
|
|
|
3438
3526
|
*
|
|
3439
3527
|
* @public
|
|
3440
3528
|
*/
|
|
3441
|
-
declare class StatusEntry extends StatusEntry_base {
|
|
3529
|
+
declare class StatusEntry extends StatusEntry_base {
|
|
3530
|
+
/**
|
|
3531
|
+
* Renders this entry back to one porcelain-shaped line: `XY <path>`.
|
|
3532
|
+
*
|
|
3533
|
+
* @remarks
|
|
3534
|
+
* **The rename convention is decided here, once, for every consumer.** By
|
|
3535
|
+
* default a rename/copy entry renders its NEW path only — `path` IS the
|
|
3536
|
+
* entry's current path, the one a line-oriented downstream can actually
|
|
3537
|
+
* open — which is a deliberate divergence from git's own non-`-z`
|
|
3538
|
+
* rendering (`orig -> new`). The arrow form is ambiguous to naive
|
|
3539
|
+
* line/whitespace splitters (paths may contain spaces, or a literal
|
|
3540
|
+
* `" -> "`), so it is opt-in via `renames: "arrow"` for consumers that
|
|
3541
|
+
* want git parity.
|
|
3542
|
+
*
|
|
3543
|
+
* A second recorded divergence: git's non-`-z` porcelain C-quotes paths
|
|
3544
|
+
* containing special characters; this renderer emits paths raw. It exists
|
|
3545
|
+
* for whitespace-insensitive text consumers — a machine parser should
|
|
3546
|
+
* consume the decoded {@link StatusEntry} values (or `-z` output)
|
|
3547
|
+
* directly, never re-parse this rendering.
|
|
3548
|
+
*/
|
|
3549
|
+
toLine(options?: StatusRenderOptions): string;
|
|
3550
|
+
/**
|
|
3551
|
+
* Renders entries back to porcelain-shaped text: one {@link StatusEntry.toLine}
|
|
3552
|
+
* line per entry, newline-joined, no trailing newline.
|
|
3553
|
+
*
|
|
3554
|
+
* @remarks
|
|
3555
|
+
* The route back from `Git.status`'s parsed entries to line-oriented text,
|
|
3556
|
+
* so a consumer whose downstream contract is porcelain-shaped text does
|
|
3557
|
+
* not hand-roll its own renderer (and re-decide the rename convention —
|
|
3558
|
+
* see {@link StatusEntry.toLine} for that decision). An empty array
|
|
3559
|
+
* renders as the empty string.
|
|
3560
|
+
*/
|
|
3561
|
+
static readonly format: (entries: ReadonlyArray<StatusEntry>, options?: StatusRenderOptions) => string;
|
|
3562
|
+
}
|
|
3563
|
+
declare const SubmoduleStatusEntry_base: Schema.Class<SubmoduleStatusEntry, Schema.Struct<{
|
|
3564
|
+
/** The decoded state prefix. */
|
|
3565
|
+
readonly state: Schema.Literals<readonly ["current", "uninitialized", "outOfSync", "conflict"]>;
|
|
3566
|
+
/** The submodule's checked-out (or, uninitialized, gitlink) commit sha. */
|
|
3567
|
+
readonly sha: Schema.String;
|
|
3568
|
+
/** The submodule's path relative to the superproject root. */
|
|
3569
|
+
readonly path: Schema.String;
|
|
3570
|
+
/** The `git describe` suffix, present only for initialized submodules. */
|
|
3571
|
+
readonly describe: Schema.optionalKey<Schema.String>;
|
|
3572
|
+
}>, {}>;
|
|
3573
|
+
/**
|
|
3574
|
+
* One line of a `git submodule status` listing.
|
|
3575
|
+
*
|
|
3576
|
+
* @remarks
|
|
3577
|
+
* The `state` decodes git's one-character prefix: `" "` → `"current"` (the
|
|
3578
|
+
* checked-out commit matches the index gitlink), `"-"` → `"uninitialized"`,
|
|
3579
|
+
* `"+"` → `"outOfSync"` (the checked-out commit differs from the gitlink),
|
|
3580
|
+
* `"U"` → `"conflict"` (merge conflicts). `describe` carries the
|
|
3581
|
+
* parenthesized `git describe` suffix git appends for initialized
|
|
3582
|
+
* submodules.
|
|
3583
|
+
*
|
|
3584
|
+
* @public
|
|
3585
|
+
*/
|
|
3586
|
+
declare class SubmoduleStatusEntry extends SubmoduleStatusEntry_base {}
|
|
3587
|
+
declare const LsRemoteEntry_base: Schema.Class<LsRemoteEntry, Schema.Struct<{
|
|
3588
|
+
/** The sha the advertised ref points at. */
|
|
3589
|
+
readonly sha: Schema.String;
|
|
3590
|
+
/** The full advertised refname, `^{}` peel suffix included. */
|
|
3591
|
+
readonly ref: Schema.String;
|
|
3592
|
+
}>, {}>;
|
|
3593
|
+
/**
|
|
3594
|
+
* One ref a remote advertises, from `git ls-remote`.
|
|
3595
|
+
*
|
|
3596
|
+
* @remarks
|
|
3597
|
+
* `ref` is the FULL refname as advertised (`refs/heads/main`,
|
|
3598
|
+
* `refs/tags/v1`), including the `^{}` suffix on an annotated tag's peeled
|
|
3599
|
+
* entry — an annotated tag appears twice, once as the tag object and once
|
|
3600
|
+
* peeled to its commit.
|
|
3601
|
+
*
|
|
3602
|
+
* @public
|
|
3603
|
+
*/
|
|
3604
|
+
declare class LsRemoteEntry extends LsRemoteEntry_base {
|
|
3605
|
+
/**
|
|
3606
|
+
* The human-facing short name of an advertised refname: the
|
|
3607
|
+
* `refs/heads/` / `refs/tags/` / `refs/remotes/` prefix and any `^{}`
|
|
3608
|
+
* peel suffix stripped (`refs/tags/v1^{}` → `v1`).
|
|
3609
|
+
*/
|
|
3610
|
+
static readonly shortName: (ref: string) => string;
|
|
3611
|
+
/**
|
|
3612
|
+
* The entries whose short name is a NEAR MISS for `ref`: not an exact
|
|
3613
|
+
* match, but ending in `ref` right behind a separator (`@`, `/`, `-`,
|
|
3614
|
+
* `_`) — the monorepo-prefixed-tag case, where a caller asks for
|
|
3615
|
+
* `4.0.0-beta.101` and the remote advertises `effect@4.0.0-beta.101`.
|
|
3616
|
+
*
|
|
3617
|
+
* @remarks
|
|
3618
|
+
* A pure, decode-side helper for validate-before-mutate flows: run
|
|
3619
|
+
* `lsRemote`, look for the wanted ref, and when it is absent hand the
|
|
3620
|
+
* listing to this to compute a suggestion. Deliberately a helper on the
|
|
3621
|
+
* ENTRY value rather than behavior baked into the service — the service
|
|
3622
|
+
* returns the full listing and the caller owns the matching policy. An
|
|
3623
|
+
* annotated tag's peeled `^{}` entry shares its base short name, so a
|
|
3624
|
+
* near miss on such a tag can surface both of its entries.
|
|
3625
|
+
*/
|
|
3626
|
+
static readonly nearMatches: (entries: ReadonlyArray<LsRemoteEntry>, ref: string) => ReadonlyArray<LsRemoteEntry>;
|
|
3627
|
+
}
|
|
3628
|
+
declare const StashEntry_base: Schema.Class<StashEntry, Schema.Struct<{
|
|
3629
|
+
/** The reflog selector (`stash@{0}`) — the index other stash methods take. */
|
|
3630
|
+
readonly ref: Schema.String;
|
|
3631
|
+
/** The stash commit's sha. */
|
|
3632
|
+
readonly sha: Schema.String;
|
|
3633
|
+
/** The reflog subject: `WIP on <branch>: ...` or `On <branch>: <message>`. */
|
|
3634
|
+
readonly message: Schema.String;
|
|
3635
|
+
}>, {}>;
|
|
3636
|
+
/**
|
|
3637
|
+
* One stash entry, from `git stash list`.
|
|
3638
|
+
*
|
|
3639
|
+
* @public
|
|
3640
|
+
*/
|
|
3641
|
+
declare class StashEntry extends StashEntry_base {}
|
|
3642
|
+
declare const BranchEntry_base: Schema.Class<BranchEntry, Schema.Struct<{
|
|
3643
|
+
/** The short branch name (`main`, or `origin/main` for a remote branch). */
|
|
3644
|
+
readonly name: Schema.String;
|
|
3645
|
+
/** The branch tip's sha. */
|
|
3646
|
+
readonly sha: Schema.String;
|
|
3647
|
+
/** Whether this branch is checked out in the current working tree. */
|
|
3648
|
+
readonly current: Schema.Boolean;
|
|
3649
|
+
}>, {}>;
|
|
3650
|
+
/**
|
|
3651
|
+
* One local (or remote-tracking) branch, from `git branch --list`.
|
|
3652
|
+
*
|
|
3653
|
+
* @public
|
|
3654
|
+
*/
|
|
3655
|
+
declare class BranchEntry extends BranchEntry_base {}
|
|
3656
|
+
declare const RefEntry_base: Schema.Class<RefEntry, Schema.Struct<{
|
|
3657
|
+
/** The full refname (`refs/tags/v1`). */
|
|
3658
|
+
readonly ref: Schema.String;
|
|
3659
|
+
/** The sha of the object the ref points at. */
|
|
3660
|
+
readonly sha: Schema.String;
|
|
3661
|
+
/**
|
|
3662
|
+
* The pointed-at object's type. An annotated tag is `tag` (the tag
|
|
3663
|
+
* object itself, not its target commit).
|
|
3664
|
+
*/
|
|
3665
|
+
readonly objectType: Schema.Literals<readonly ["commit", "tag", "tree", "blob"]>;
|
|
3666
|
+
}>, {}>;
|
|
3667
|
+
/**
|
|
3668
|
+
* One ref, from `git for-each-ref`.
|
|
3669
|
+
*
|
|
3670
|
+
* @public
|
|
3671
|
+
*/
|
|
3672
|
+
declare class RefEntry extends RefEntry_base {}
|
|
3673
|
+
declare const ConfigListEntry_base: Schema.Class<ConfigListEntry, Schema.Struct<{
|
|
3674
|
+
/** The canonical dotted key (`section.subsection.key`). */
|
|
3675
|
+
readonly key: Schema.String;
|
|
3676
|
+
/**
|
|
3677
|
+
* The raw value. A valueless key (git's boolean-true shorthand,
|
|
3678
|
+
* `[section]` + bare `key`) surfaces as the empty string — distinguish it
|
|
3679
|
+
* with `configGetAll` if the difference matters.
|
|
3680
|
+
*/
|
|
3681
|
+
readonly value: Schema.String;
|
|
3682
|
+
}>, {}>;
|
|
3683
|
+
/**
|
|
3684
|
+
* One configuration entry, from `git config --list`.
|
|
3685
|
+
*
|
|
3686
|
+
* @public
|
|
3687
|
+
*/
|
|
3688
|
+
declare class ConfigListEntry extends ConfigListEntry_base {}
|
|
3689
|
+
declare const WorktreeEntry_base: Schema.Class<WorktreeEntry, Schema.Struct<{
|
|
3690
|
+
/** The working tree's absolute path. */
|
|
3691
|
+
readonly path: Schema.String;
|
|
3692
|
+
/** The checked-out commit sha; absent for a bare repository entry. */
|
|
3693
|
+
readonly head: Schema.optionalKey<Schema.String>;
|
|
3694
|
+
/** The checked-out branch's full refname; absent when detached or bare. */
|
|
3695
|
+
readonly branch: Schema.optionalKey<Schema.String>;
|
|
3696
|
+
/** Whether the working tree is in detached-HEAD state. */
|
|
3697
|
+
readonly detached: Schema.Boolean;
|
|
3698
|
+
/** Whether the entry is the bare repository itself. */
|
|
3699
|
+
readonly bare: Schema.Boolean;
|
|
3700
|
+
/** Present when the worktree is locked; holds the lock reason (possibly empty). */
|
|
3701
|
+
readonly locked: Schema.optionalKey<Schema.String>;
|
|
3702
|
+
/** Present when the worktree is prunable; holds the reason (possibly empty). */
|
|
3703
|
+
readonly prunable: Schema.optionalKey<Schema.String>;
|
|
3704
|
+
}>, {}>;
|
|
3705
|
+
/**
|
|
3706
|
+
* One working tree, from `git worktree list --porcelain`.
|
|
3707
|
+
*
|
|
3708
|
+
* @public
|
|
3709
|
+
*/
|
|
3710
|
+
declare class WorktreeEntry extends WorktreeEntry_base {}
|
|
3711
|
+
declare const LsFilesEntry_base: Schema.Class<LsFilesEntry, Schema.Struct<{
|
|
3712
|
+
/** The entry's file mode, e.g. `100644` — `160000` for a gitlink. */
|
|
3713
|
+
readonly mode: Schema.String;
|
|
3714
|
+
/** The staged object id. */
|
|
3715
|
+
readonly oid: Schema.String;
|
|
3716
|
+
/** The merge stage: `0` normally; `1`/`2`/`3` during an unresolved merge. */
|
|
3717
|
+
readonly stage: Schema.Number;
|
|
3718
|
+
/** The entry's path, relative to `cwd`. May contain spaces or newlines. */
|
|
3719
|
+
readonly path: Schema.String;
|
|
3720
|
+
}>, {}>;
|
|
3721
|
+
/**
|
|
3722
|
+
* One index (staging area) entry, from `git ls-files --stage`.
|
|
3723
|
+
*
|
|
3724
|
+
* @remarks
|
|
3725
|
+
* The index-side sibling of {@link LsTreeEntry}: this is the ONLY place a
|
|
3726
|
+
* staged-but-uncommitted gitlink (`mode` `160000`) is visible — `lsTree`
|
|
3727
|
+
* reads the committed tree and misses exactly that window.
|
|
3728
|
+
*
|
|
3729
|
+
* @public
|
|
3730
|
+
*/
|
|
3731
|
+
declare class LsFilesEntry extends LsFilesEntry_base {}
|
|
3442
3732
|
/**
|
|
3443
3733
|
* The {@link Git} service shape.
|
|
3444
3734
|
*
|
|
@@ -3529,6 +3819,115 @@ interface GitShape {
|
|
|
3529
3819
|
readonly remote?: string;
|
|
3530
3820
|
readonly depth?: number;
|
|
3531
3821
|
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3822
|
+
/**
|
|
3823
|
+
* Mutating: `git fetch --unshallow <remote>` — converts a shallow clone
|
|
3824
|
+
* into a complete one by fetching all missing history from
|
|
3825
|
+
* `options.remote` (default `origin`).
|
|
3826
|
+
*
|
|
3827
|
+
* `--unshallow` is a distinct mode, not a depth value: **git rejects it in
|
|
3828
|
+
* a repository that is not shallow**, with
|
|
3829
|
+
* `--unshallow on a complete repository does not make sense` — and this
|
|
3830
|
+
* method deliberately does NOT tolerate that; the failure surfaces typed
|
|
3831
|
+
* as `GitCommandError`, because swallowing it would also swallow every
|
|
3832
|
+
* other fetch failure shape. The caller owns the guard: probe with
|
|
3833
|
+
* `isShallow` first and skip the fetch when the repository is already
|
|
3834
|
+
* complete.
|
|
3835
|
+
*/
|
|
3836
|
+
readonly fetchUnshallow: (cwd: string, options?: {
|
|
3837
|
+
readonly remote?: string;
|
|
3838
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3839
|
+
/**
|
|
3840
|
+
* `git rev-parse --is-shallow-repository` — whether the repository is a
|
|
3841
|
+
* shallow clone.
|
|
3842
|
+
*
|
|
3843
|
+
* A dedicated predicate, deliberately not folded into `revParse`: that
|
|
3844
|
+
* method's contract is "resolve this REF"; this one takes no ref and
|
|
3845
|
+
* answers a repository-shape question. The intended pairing is
|
|
3846
|
+
* `isShallow` → `fetchUnshallow`.
|
|
3847
|
+
*/
|
|
3848
|
+
readonly isShallow: (cwd: string) => Effect.Effect<boolean, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3849
|
+
/**
|
|
3850
|
+
* Mutating: `git reset --soft|--mixed|--hard [<ref>]` — moves `HEAD` (and,
|
|
3851
|
+
* per `options.mode`, the index and working tree) to `options.ref`
|
|
3852
|
+
* (default `HEAD`, i.e. unstage/discard against the current commit).
|
|
3853
|
+
*
|
|
3854
|
+
* The restore-before-retry primitive: **a failed reset fails loudly and
|
|
3855
|
+
* typed** (`GitCommandError` on any non-zero exit), never a silent no-op —
|
|
3856
|
+
* a reset that silently did nothing would hand a retry of a
|
|
3857
|
+
* non-idempotent operation the same dirty tree. `mode` defaults to
|
|
3858
|
+
* `"mixed"` (git's own default), emitted explicitly in the argv.
|
|
3859
|
+
*/
|
|
3860
|
+
readonly reset: (cwd: string, options?: {
|
|
3861
|
+
readonly mode?: "soft" | "mixed" | "hard";
|
|
3862
|
+
readonly ref?: string;
|
|
3863
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3864
|
+
/**
|
|
3865
|
+
* Mutating: `git clean --force [-d] [-x] [-- <paths>...]` — deletes
|
|
3866
|
+
* untracked files (and, with `options.directories`, untracked directories;
|
|
3867
|
+
* with `options.ignored`, ignored files too), optionally scoped to
|
|
3868
|
+
* `options.paths`.
|
|
3869
|
+
*
|
|
3870
|
+
* `--force` is unconditional: this member exists so a consumer can restore
|
|
3871
|
+
* a tree to a known state before retrying a non-idempotent operation, and
|
|
3872
|
+
* without it git refuses to clean under the default `clean.requireForce`
|
|
3873
|
+
* config — **a clean that silently did nothing corrupts the retry**. Any
|
|
3874
|
+
* non-zero exit fails loudly as `GitCommandError`.
|
|
3875
|
+
*/
|
|
3876
|
+
readonly clean: (cwd: string, options?: {
|
|
3877
|
+
readonly directories?: boolean;
|
|
3878
|
+
readonly ignored?: boolean;
|
|
3879
|
+
readonly paths?: ReadonlyArray<string>;
|
|
3880
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3881
|
+
/**
|
|
3882
|
+
* Mutating: `git restore [--source <ref>] [--staged] [--worktree] -- <paths...>`
|
|
3883
|
+
* — restores `paths` from the index, or from `options.source`. The
|
|
3884
|
+
* `checkout -- .`-shaped operation: `restore(cwd, ["."])` discards all
|
|
3885
|
+
* unstaged working-tree changes.
|
|
3886
|
+
*
|
|
3887
|
+
* A separate member deliberately, because `checkout`'s option-injection
|
|
3888
|
+
* guard refuses `--` and option-like refs by design and stays that way.
|
|
3889
|
+
* `restore`'s paths always sit behind a literal `--`, so they are
|
|
3890
|
+
* injection-safe by construction; only `options.source` is a guarded ref.
|
|
3891
|
+
* With neither `staged` nor `worktree` set, git restores the working tree.
|
|
3892
|
+
*/
|
|
3893
|
+
readonly restore: (cwd: string, paths: ReadonlyArray<string>, options?: {
|
|
3894
|
+
readonly source?: string;
|
|
3895
|
+
readonly staged?: boolean;
|
|
3896
|
+
readonly worktree?: boolean;
|
|
3897
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3898
|
+
/**
|
|
3899
|
+
* Mutating: `git branch [-f] <name> [<start-point>]` — creates a branch,
|
|
3900
|
+
* optionally from `options.startPoint`; `options.checkout` switches to it
|
|
3901
|
+
* on creation (`git checkout -b <name> [<start-point>]`), and
|
|
3902
|
+
* `options.force` resets the branch if it already exists (`branch -f`,
|
|
3903
|
+
* or `checkout -B` with `checkout`).
|
|
3904
|
+
*
|
|
3905
|
+
* Branch creation is a branch-member concern, not a `checkout` option:
|
|
3906
|
+
* `checkout`'s contract stays "move to an existing ref" with its
|
|
3907
|
+
* option-like-ref refusal intact. Both `name` and `startPoint` are
|
|
3908
|
+
* guarded — an option-like value is refused typed before any spawn.
|
|
3909
|
+
*
|
|
3910
|
+
* `force` with `checkout` replaces the delete-then-create longhand — a
|
|
3911
|
+
* swallowed `branchDelete(force: true)` followed by a plain create —
|
|
3912
|
+
* which papers over a real edge: `git branch -D` refuses to delete the
|
|
3913
|
+
* currently checked-out branch, so on a runner already sitting on that
|
|
3914
|
+
* branch the swallowed delete fails and the create then fails for real.
|
|
3915
|
+
* `checkout -B` handles both states in one invocation.
|
|
3916
|
+
*/
|
|
3917
|
+
readonly branchCreate: (cwd: string, name: string, options?: {
|
|
3918
|
+
readonly startPoint?: string;
|
|
3919
|
+
readonly checkout?: boolean;
|
|
3920
|
+
readonly force?: boolean;
|
|
3921
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3922
|
+
/**
|
|
3923
|
+
* Mutating: `git branch -d <name>` (or `-D` with `options.force`) —
|
|
3924
|
+
* deletes a local branch. The default `-d` refuses a branch that is not
|
|
3925
|
+
* fully merged — a typed `GitCommandError`, which is usually the honest
|
|
3926
|
+
* answer; `force: true` deletes regardless.
|
|
3927
|
+
*/
|
|
3928
|
+
readonly branchDelete: (cwd: string, name: string, options?: {
|
|
3929
|
+
readonly force?: boolean;
|
|
3930
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3532
3931
|
/**
|
|
3533
3932
|
* Mutating: `git submodule update [--init] [--depth <n>] [-- <paths>...]`
|
|
3534
3933
|
* — updates registered submodules in the working tree, optionally
|
|
@@ -3550,6 +3949,85 @@ interface GitShape {
|
|
|
3550
3949
|
readonly path: string;
|
|
3551
3950
|
readonly depth?: number;
|
|
3552
3951
|
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3952
|
+
/**
|
|
3953
|
+
* `git submodule status [--recursive] [-- <paths>...]` — one
|
|
3954
|
+
* {@link SubmoduleStatusEntry} per registered submodule, decoding git's
|
|
3955
|
+
* state prefix (`current` / `uninitialized` / `outOfSync` / `conflict`).
|
|
3956
|
+
*
|
|
3957
|
+
* The output is line-based (git offers no `-z` mode here), so a submodule
|
|
3958
|
+
* path containing a newline would corrupt the parse — a git-imposed
|
|
3959
|
+
* limitation, recorded on the entry class.
|
|
3960
|
+
*/
|
|
3961
|
+
readonly submoduleStatus: (cwd: string, options?: {
|
|
3962
|
+
readonly paths?: ReadonlyArray<string>;
|
|
3963
|
+
readonly recursive?: boolean;
|
|
3964
|
+
}) => Effect.Effect<ReadonlyArray<SubmoduleStatusEntry>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3965
|
+
/**
|
|
3966
|
+
* Mutating: `git submodule init [-- <paths>...]` — registers submodules
|
|
3967
|
+
* from `.gitmodules` into `.git/config` (all of them, or only
|
|
3968
|
+
* `options.paths`) without cloning or checking anything out.
|
|
3969
|
+
*/
|
|
3970
|
+
readonly submoduleInit: (cwd: string, options?: {
|
|
3971
|
+
readonly paths?: ReadonlyArray<string>;
|
|
3972
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3973
|
+
/**
|
|
3974
|
+
* Mutating: `git submodule deinit [--force] (--all | -- <paths>...)` —
|
|
3975
|
+
* unregisters submodules: clears their working trees and removes their
|
|
3976
|
+
* `.git/config` registration. Requires either `options.paths` or
|
|
3977
|
+
* `options.all: true`; neither is refused typed before any spawn, exactly
|
|
3978
|
+
* as git itself would refuse it. `options.force` discards local changes
|
|
3979
|
+
* in the submodule working tree.
|
|
3980
|
+
*/
|
|
3981
|
+
readonly submoduleDeinit: (cwd: string, options: {
|
|
3982
|
+
readonly paths?: ReadonlyArray<string>;
|
|
3983
|
+
readonly all?: boolean;
|
|
3984
|
+
readonly force?: boolean;
|
|
3985
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3986
|
+
/**
|
|
3987
|
+
* Mutating: `git submodule sync [--recursive] [-- <paths>...]` — re-copies
|
|
3988
|
+
* each submodule's URL from `.gitmodules` into `.git/config` (and the
|
|
3989
|
+
* submodule's own `remote.origin.url`), so a `.gitmodules` URL change
|
|
3990
|
+
* actually reaches git's live configuration.
|
|
3991
|
+
*/
|
|
3992
|
+
readonly submoduleSync: (cwd: string, options?: {
|
|
3993
|
+
readonly paths?: ReadonlyArray<string>;
|
|
3994
|
+
readonly recursive?: boolean;
|
|
3995
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3996
|
+
/**
|
|
3997
|
+
* Mutating: `git submodule set-url -- <path> <url>` — rewrites the
|
|
3998
|
+
* submodule's URL in `.gitmodules` and synchronizes it into `.git/config`.
|
|
3999
|
+
*
|
|
4000
|
+
* The url never surfaces raw in an error — an embedded `userinfo@`
|
|
4001
|
+
* credential is masked in `GitCommandError.args`/`.message` — and the
|
|
4002
|
+
* method's span annotates `cwd` and `path` only.
|
|
4003
|
+
*/
|
|
4004
|
+
readonly submoduleSetUrl: (cwd: string, path: string, url: string) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4005
|
+
/**
|
|
4006
|
+
* Mutating: `git submodule set-branch (--branch <branch> | --default) -- <path>`
|
|
4007
|
+
* — records the branch the submodule tracks in `.gitmodules`, or clears
|
|
4008
|
+
* it back to the default when `options.branch` is omitted.
|
|
4009
|
+
*/
|
|
4010
|
+
readonly submoduleSetBranch: (cwd: string, path: string, options?: {
|
|
4011
|
+
readonly branch?: string;
|
|
4012
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4013
|
+
/**
|
|
4014
|
+
* Mutating: `git submodule absorbgitdirs [-- <paths>...]` — moves each
|
|
4015
|
+
* submodule's embedded `.git` directory into the superproject's
|
|
4016
|
+
* `.git/modules/` and leaves a gitfile pointer behind.
|
|
4017
|
+
*/
|
|
4018
|
+
readonly submoduleAbsorbgitdirs: (cwd: string, options?: {
|
|
4019
|
+
readonly paths?: ReadonlyArray<string>;
|
|
4020
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4021
|
+
/**
|
|
4022
|
+
* Mutating: `git submodule foreach [--recursive] <command>` — runs one
|
|
4023
|
+
* shell command string in every checked-out submodule and returns the
|
|
4024
|
+
* collected stdout. The command can mutate anything, which is why the
|
|
4025
|
+
* method is marked mutating regardless of what it runs; a command
|
|
4026
|
+
* beginning with `-` is refused typed before any spawn.
|
|
4027
|
+
*/
|
|
4028
|
+
readonly submoduleForeach: (cwd: string, command: string, options?: {
|
|
4029
|
+
readonly recursive?: boolean;
|
|
4030
|
+
}) => Effect.Effect<string, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3553
4031
|
/**
|
|
3554
4032
|
* Mutating: `git sparse-checkout set (--cone | --no-cone) <patterns...>`
|
|
3555
4033
|
* — rewrites which paths are checked out in the working tree to
|
|
@@ -3562,6 +4040,10 @@ interface GitShape {
|
|
|
3562
4040
|
* Mutating: `git config [-f <file>] <key> <value>` — writes `value` for
|
|
3563
4041
|
* `key` into the repository config, or into `options.file` when given
|
|
3564
4042
|
* (e.g. `.gitmodules`).
|
|
4043
|
+
*
|
|
4044
|
+
* The value never surfaces in an error: a failing `configSet` carries
|
|
4045
|
+
* `<redacted>` in `GitCommandError.args` and `.message`, and the method's
|
|
4046
|
+
* span annotates `key` and `file` only.
|
|
3565
4047
|
*/
|
|
3566
4048
|
readonly configSet: (cwd: string, key: string, value: string, options?: {
|
|
3567
4049
|
readonly file?: string;
|
|
@@ -3622,21 +4104,296 @@ interface GitShape {
|
|
|
3622
4104
|
readonly commitInfo: (cwd: string, ref?: string) => Effect.Effect<CommitInfo, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3623
4105
|
/** `git status --porcelain -z` — the working tree's porcelain status listing. */
|
|
3624
4106
|
readonly status: (cwd: string) => Effect.Effect<ReadonlyArray<StatusEntry>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4107
|
+
/**
|
|
4108
|
+
* `git ls-remote [--heads] [--tags] <remote> [<patterns>...]` — the refs
|
|
4109
|
+
* `remote` advertises, as {@link LsRemoteEntry} values, optionally
|
|
4110
|
+
* filtered to branch heads and/or tags and/or shell-glob patterns.
|
|
4111
|
+
*
|
|
4112
|
+
* The one read that talks to the NETWORK. Auth failure and an unreachable
|
|
4113
|
+
* remote stay {@link GitCommandError} deliberately — no consumer branches
|
|
4114
|
+
* on them, so they carry no dedicated type. The validate-before-mutate
|
|
4115
|
+
* consumer story: look for the wanted ref in the listing, and on a miss
|
|
4116
|
+
* hand the entries to `LsRemoteEntry.nearMatches` for a suggestion (the
|
|
4117
|
+
* monorepo-prefixed-tag case, `effect@<ref>`). `remote` may be a URL; an
|
|
4118
|
+
* embedded credential never surfaces in an error value.
|
|
4119
|
+
*/
|
|
4120
|
+
readonly lsRemote: (cwd: string, remote: string, options?: {
|
|
4121
|
+
readonly heads?: boolean;
|
|
4122
|
+
readonly tags?: boolean;
|
|
4123
|
+
readonly patterns?: ReadonlyArray<string>;
|
|
4124
|
+
}) => Effect.Effect<ReadonlyArray<LsRemoteEntry>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4125
|
+
/**
|
|
4126
|
+
* Mutating: `git remote add <name> <url>` — registers a new remote.
|
|
4127
|
+
* `url`'s embedded credential (if any) never surfaces in an error value,
|
|
4128
|
+
* and the method's span annotates `name` only.
|
|
4129
|
+
*/
|
|
4130
|
+
readonly remoteAdd: (cwd: string, name: string, url: string) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4131
|
+
/**
|
|
4132
|
+
* Mutating: `git remote remove <name>` — deletes a remote, its
|
|
4133
|
+
* remote-tracking refs and its configuration. A missing remote fails
|
|
4134
|
+
* loudly as {@link GitCommandError} — probe with `remoteUrl` first when
|
|
4135
|
+
* idempotency is wanted.
|
|
4136
|
+
*/
|
|
4137
|
+
readonly remoteRemove: (cwd: string, name: string) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4138
|
+
/**
|
|
4139
|
+
* Mutating: `git remote set-url <name> <url>` — rewrites a remote's fetch
|
|
4140
|
+
* URL. `url`'s embedded credential (if any) never surfaces in an error
|
|
4141
|
+
* value, and the method's span annotates `name` only.
|
|
4142
|
+
*/
|
|
4143
|
+
readonly remoteSetUrl: (cwd: string, name: string, url: string) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4144
|
+
/**
|
|
4145
|
+
* Mutating: `git stash push [--include-untracked] [-m <message>] [-- <paths>...]`
|
|
4146
|
+
* — saves the working-tree (and index) state onto the stash stack and
|
|
4147
|
+
* resets the tree to `HEAD`.
|
|
4148
|
+
*/
|
|
4149
|
+
readonly stashPush: (cwd: string, options?: {
|
|
4150
|
+
readonly message?: string;
|
|
4151
|
+
readonly includeUntracked?: boolean;
|
|
4152
|
+
readonly paths?: ReadonlyArray<string>;
|
|
4153
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4154
|
+
/**
|
|
4155
|
+
* Mutating: `git stash pop [stash@{n}]` — applies a stash entry
|
|
4156
|
+
* (`options.index`, default the latest) and drops it on success.
|
|
4157
|
+
*
|
|
4158
|
+
* The two branchable failures are typed: {@link DirtyWorktreeError} when
|
|
4159
|
+
* local changes would be overwritten (the tree is untouched), and
|
|
4160
|
+
* {@link MergeConflictError} when the apply stopped on conflicts — in
|
|
4161
|
+
* that case the stash entry is KEPT, and the caller owns resolving. A
|
|
4162
|
+
* non-integer index is refused typed before any spawn.
|
|
4163
|
+
*/
|
|
4164
|
+
readonly stashPop: (cwd: string, options?: {
|
|
4165
|
+
readonly index?: number;
|
|
4166
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError | MergeConflictError | DirtyWorktreeError>;
|
|
4167
|
+
/**
|
|
4168
|
+
* Mutating: `git stash apply [stash@{n}]` — applies a stash entry and
|
|
4169
|
+
* keeps it on the stack. Fails exactly like `stashPop`
|
|
4170
|
+
* ({@link DirtyWorktreeError} / {@link MergeConflictError} are the
|
|
4171
|
+
* branchable shapes).
|
|
4172
|
+
*/
|
|
4173
|
+
readonly stashApply: (cwd: string, options?: {
|
|
4174
|
+
readonly index?: number;
|
|
4175
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError | MergeConflictError | DirtyWorktreeError>;
|
|
4176
|
+
/**
|
|
4177
|
+
* Mutating: `git stash drop [stash@{n}]` — deletes a stash entry
|
|
4178
|
+
* (`options.index`, default the latest) without applying it.
|
|
4179
|
+
*/
|
|
4180
|
+
readonly stashDrop: (cwd: string, options?: {
|
|
4181
|
+
readonly index?: number;
|
|
4182
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4183
|
+
/**
|
|
4184
|
+
* `git stash list -z --format=%gd%x1f%H%x1f%gs` — every stash entry as a
|
|
4185
|
+
* {@link StashEntry} (reflog selector, sha, subject). The entry's
|
|
4186
|
+
* position in the returned array IS its current index — `entries[2]` is
|
|
4187
|
+
* `stash@{2}` — which is what the index-taking stash methods consume.
|
|
4188
|
+
*/
|
|
4189
|
+
readonly stashList: (cwd: string) => Effect.Effect<ReadonlyArray<StashEntry>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4190
|
+
/**
|
|
4191
|
+
* `git branch --list [--remotes | --all]` — every branch as a
|
|
4192
|
+
* {@link BranchEntry} (short name, tip sha, current marker), via the
|
|
4193
|
+
* NUL-separated for-each-ref format. `all` wins when both flags are set.
|
|
4194
|
+
*/
|
|
4195
|
+
readonly branchList: (cwd: string, options?: {
|
|
4196
|
+
readonly remotes?: boolean;
|
|
4197
|
+
readonly all?: boolean;
|
|
4198
|
+
}) => Effect.Effect<ReadonlyArray<BranchEntry>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4199
|
+
/**
|
|
4200
|
+
* Mutating: `git tag [--force] [-m <message>] <name> [<ref>]` — creates a
|
|
4201
|
+
* lightweight tag at `options.ref` (default `HEAD`), or an annotated one
|
|
4202
|
+
* when `options.message` is given. An existing tag fails loudly unless
|
|
4203
|
+
* `options.force` is set.
|
|
4204
|
+
*/
|
|
4205
|
+
readonly tagCreate: (cwd: string, name: string, options?: {
|
|
4206
|
+
readonly ref?: string;
|
|
4207
|
+
readonly message?: string;
|
|
4208
|
+
readonly force?: boolean;
|
|
4209
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4210
|
+
/** Mutating: `git tag --delete <name>` — deletes a local tag. */
|
|
4211
|
+
readonly tagDelete: (cwd: string, name: string) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4212
|
+
/**
|
|
4213
|
+
* `git tag --list [<pattern>]` — tag names, optionally filtered by a
|
|
4214
|
+
* shell-glob `options.pattern`.
|
|
4215
|
+
*/
|
|
4216
|
+
readonly tagList: (cwd: string, options?: {
|
|
4217
|
+
readonly pattern?: string;
|
|
4218
|
+
}) => Effect.Effect<ReadonlyArray<string>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4219
|
+
/**
|
|
4220
|
+
* `git for-each-ref [<patterns>...]` — every matching ref as a
|
|
4221
|
+
* {@link RefEntry} (full refname, sha, object type), via this package's
|
|
4222
|
+
* fixed `%(refname)%00%(objectname)%00%(objecttype)` format.
|
|
4223
|
+
*/
|
|
4224
|
+
readonly forEachRef: (cwd: string, options?: {
|
|
4225
|
+
readonly patterns?: ReadonlyArray<string>;
|
|
4226
|
+
}) => Effect.Effect<ReadonlyArray<RefEntry>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4227
|
+
/**
|
|
4228
|
+
* `git rev-list [--max-count=<n>] [--first-parent] <ref>` — the commit
|
|
4229
|
+
* shas reachable from `ref` (which may be a range, `main..feat`), newest
|
|
4230
|
+
* first. A non-integer `options.limit` is refused typed before any spawn.
|
|
4231
|
+
*/
|
|
4232
|
+
readonly revList: (cwd: string, ref: string, options?: {
|
|
4233
|
+
readonly limit?: number;
|
|
4234
|
+
readonly firstParent?: boolean;
|
|
4235
|
+
}) => Effect.Effect<ReadonlyArray<string>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4236
|
+
/**
|
|
4237
|
+
* Mutating: `git commit [--all] [--allow-empty] [--amend] [--author=<author>] -m <message>`
|
|
4238
|
+
* — records a commit. The message rides argv; committer identity comes
|
|
4239
|
+
* from the caller's ENVIRONMENT (this package sets only `LC_ALL`), and
|
|
4240
|
+
* `options.author` is the explicit `--author=` override. "Nothing to
|
|
4241
|
+
* commit" fails loudly as {@link GitCommandError}.
|
|
4242
|
+
*/
|
|
4243
|
+
readonly commit: (cwd: string, message: string, options?: {
|
|
4244
|
+
readonly all?: boolean;
|
|
4245
|
+
readonly allowEmpty?: boolean;
|
|
4246
|
+
readonly amend?: boolean;
|
|
4247
|
+
readonly author?: string;
|
|
4248
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4249
|
+
/**
|
|
4250
|
+
* Mutating: `git push [--force | --force-with-lease] [--tags] [--set-upstream] <remote> [<refspec>]`
|
|
4251
|
+
* — updates remote refs.
|
|
4252
|
+
*
|
|
4253
|
+
* A rejected push — the remote moved (`fetch first` /
|
|
4254
|
+
* `non-fast-forward`), or a `--force-with-lease` lease failure
|
|
4255
|
+
* (`stale info`) — fails typed as {@link NonFastForwardError}, the signal
|
|
4256
|
+
* a fetch-then-retry fallback branches on. Every other failure stays
|
|
4257
|
+
* {@link GitCommandError}. `remote` may be a URL; an embedded credential
|
|
4258
|
+
* never surfaces in an error value.
|
|
4259
|
+
*/
|
|
4260
|
+
readonly push: (cwd: string, options?: {
|
|
4261
|
+
readonly remote?: string;
|
|
4262
|
+
readonly refspec?: string;
|
|
4263
|
+
readonly force?: boolean;
|
|
4264
|
+
readonly forceWithLease?: boolean;
|
|
4265
|
+
readonly tags?: boolean;
|
|
4266
|
+
readonly setUpstream?: boolean;
|
|
4267
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError | NonFastForwardError>;
|
|
4268
|
+
/**
|
|
4269
|
+
* Mutating: `git pull [--rebase] [--ff-only] <remote> [<ref>]` — fetches
|
|
4270
|
+
* and integrates.
|
|
4271
|
+
*
|
|
4272
|
+
* The two branchable failures are typed: {@link DirtyWorktreeError} when
|
|
4273
|
+
* local modifications block the merge before it starts (the tree is
|
|
4274
|
+
* untouched — commit or stash first), and {@link MergeConflictError} when
|
|
4275
|
+
* the merge stopped on conflicts (markers are in the tree; resolve or
|
|
4276
|
+
* abort). `remote` may be a URL; an embedded credential never surfaces in
|
|
4277
|
+
* an error value.
|
|
4278
|
+
*/
|
|
4279
|
+
readonly pull: (cwd: string, options?: {
|
|
4280
|
+
readonly remote?: string;
|
|
4281
|
+
readonly ref?: string;
|
|
4282
|
+
readonly rebase?: boolean;
|
|
4283
|
+
readonly ffOnly?: boolean;
|
|
4284
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError | MergeConflictError | DirtyWorktreeError>;
|
|
4285
|
+
/**
|
|
4286
|
+
* `git config [-f <file>] --list -z` — every configuration entry in scope
|
|
4287
|
+
* (or in `options.file` only) as {@link ConfigListEntry} values. `-z`
|
|
4288
|
+
* keeps multi-line values lossless.
|
|
4289
|
+
*/
|
|
4290
|
+
readonly configList: (cwd: string, options?: {
|
|
4291
|
+
readonly file?: string;
|
|
4292
|
+
}) => Effect.Effect<ReadonlyArray<ConfigListEntry>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4293
|
+
/**
|
|
4294
|
+
* `git config [-f <file>] --get-all -z <key>` — every value of a
|
|
4295
|
+
* (possibly multi-valued) key, in order. An unset key degrades to the
|
|
4296
|
+
* empty array, never an error — the multi-valued sibling of `configGet`'s
|
|
4297
|
+
* `Option.none`.
|
|
4298
|
+
*/
|
|
4299
|
+
readonly configGetAll: (cwd: string, key: string, options?: {
|
|
4300
|
+
readonly file?: string;
|
|
4301
|
+
}) => Effect.Effect<ReadonlyArray<string>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4302
|
+
/**
|
|
4303
|
+
* Mutating: `git config [-f <file>] (--unset | --unset-all) <key>` —
|
|
4304
|
+
* removes `key` (or, with `options.all`, every value of a multi-valued
|
|
4305
|
+
* key). Unsetting a key that was never set fails LOUDLY (git exits 5) —
|
|
4306
|
+
* an unset that silently did nothing is indistinguishable from one that
|
|
4307
|
+
* worked; probe with `configGet` first when idempotency is wanted.
|
|
4308
|
+
*/
|
|
4309
|
+
readonly configUnset: (cwd: string, key: string, options?: {
|
|
4310
|
+
readonly file?: string;
|
|
4311
|
+
readonly all?: boolean;
|
|
4312
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4313
|
+
/**
|
|
4314
|
+
* Mutating: `git rm [--cached] [-r] [--force] -- <paths...>` — removes
|
|
4315
|
+
* `paths` from the index and (without `options.cached`) the working tree.
|
|
4316
|
+
* `cached: true` is the unstage-but-keep-file form a submodule removal
|
|
4317
|
+
* sequence needs.
|
|
4318
|
+
*/
|
|
4319
|
+
readonly rm: (cwd: string, paths: ReadonlyArray<string>, options?: {
|
|
4320
|
+
readonly cached?: boolean;
|
|
4321
|
+
readonly recursive?: boolean;
|
|
4322
|
+
readonly force?: boolean;
|
|
4323
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4324
|
+
/**
|
|
4325
|
+
* Mutating: `git mv [--force] -- <source> <destination>` — moves or
|
|
4326
|
+
* renames a tracked path, updating the index and the working tree
|
|
4327
|
+
* together.
|
|
4328
|
+
*/
|
|
4329
|
+
readonly mv: (cwd: string, source: string, destination: string, options?: {
|
|
4330
|
+
readonly force?: boolean;
|
|
4331
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4332
|
+
/**
|
|
4333
|
+
* `git check-ignore -z --stdin` — the subset of `paths` git would ignore,
|
|
4334
|
+
* predicate-shaped: paths in, the ignored ones back. Paths are fed via
|
|
4335
|
+
* STDIN (NUL-separated both directions), so nothing caller-controlled
|
|
4336
|
+
* enters the argv and special-character paths survive unquoted. No path
|
|
4337
|
+
* ignored degrades to the empty array, never an error.
|
|
4338
|
+
*/
|
|
4339
|
+
readonly checkIgnore: (cwd: string, paths: ReadonlyArray<string>) => Effect.Effect<ReadonlyArray<string>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4340
|
+
/**
|
|
4341
|
+
* Mutating: `git worktree add [--force] [--detach] <path> [<ref>]` —
|
|
4342
|
+
* creates a linked working tree at `path`, checked out at `options.ref`
|
|
4343
|
+
* (or a branch named after `path`'s basename).
|
|
4344
|
+
*/
|
|
4345
|
+
readonly worktreeAdd: (cwd: string, path: string, options?: {
|
|
4346
|
+
readonly ref?: string;
|
|
4347
|
+
readonly detach?: boolean;
|
|
4348
|
+
readonly force?: boolean;
|
|
4349
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4350
|
+
/**
|
|
4351
|
+
* `git worktree list --porcelain -z` — every working tree (the main one
|
|
4352
|
+
* first) as a {@link WorktreeEntry}.
|
|
4353
|
+
*/
|
|
4354
|
+
readonly worktreeList: (cwd: string) => Effect.Effect<ReadonlyArray<WorktreeEntry>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4355
|
+
/**
|
|
4356
|
+
* Mutating: `git worktree remove [--force] <path>` — removes a linked
|
|
4357
|
+
* working tree. A dirty worktree fails loudly unless `options.force` is
|
|
4358
|
+
* set.
|
|
4359
|
+
*/
|
|
4360
|
+
readonly worktreeRemove: (cwd: string, path: string, options?: {
|
|
4361
|
+
readonly force?: boolean;
|
|
4362
|
+
}) => Effect.Effect<void, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
4363
|
+
/**
|
|
4364
|
+
* `git ls-files --stage -z [-- <pathspec>...]` — every INDEX entry as an
|
|
4365
|
+
* {@link LsFilesEntry} (mode, oid, merge stage, path), optionally scoped
|
|
4366
|
+
* to `options.pathspec`.
|
|
4367
|
+
*
|
|
4368
|
+
* The index-side sibling of `lsTree`: the only read that sees a
|
|
4369
|
+
* staged-but-uncommitted gitlink (`160000 <oid> 0 <path>`) — the state a
|
|
4370
|
+
* stage-without-commit window (a submodule pin/add) deliberately
|
|
4371
|
+
* produces, which a HEAD-side `lsTree` misreports.
|
|
4372
|
+
*/
|
|
4373
|
+
readonly lsFiles: (cwd: string, options?: {
|
|
4374
|
+
readonly pathspec?: ReadonlyArray<string>;
|
|
4375
|
+
}) => Effect.Effect<ReadonlyArray<LsFilesEntry>, GitCommandError | NotARepositoryError | UnknownRefError>;
|
|
3625
4376
|
}
|
|
3626
4377
|
declare const Git_base: Context.ServiceClass<Git, "@effected/git/Git", GitShape>;
|
|
3627
4378
|
/**
|
|
3628
4379
|
* Typed git introspection over core's `ChildProcessSpawner`: read a
|
|
3629
|
-
* repository's state at any ref without checking it out
|
|
3630
|
-
*
|
|
3631
|
-
*
|
|
4380
|
+
* repository's state at any ref without checking it out (including the
|
|
4381
|
+
* network read `lsRemote` and the index read `lsFiles`), plus the mutating
|
|
4382
|
+
* tier — checkout/fetch, the working-tree restore trio and stash, branches
|
|
4383
|
+
* and tags, remotes, worktrees, commit/push/pull, submodules,
|
|
4384
|
+
* sparse-checkout, config writes and staging — that changes it. Every
|
|
4385
|
+
* mutating method's TSDoc opens with the literal word `Mutating:`.
|
|
3632
4386
|
*
|
|
3633
4387
|
* @remarks
|
|
3634
4388
|
* Every method takes `cwd` explicitly and classifies git's stderr/exit-code
|
|
3635
4389
|
* taxonomy exactly once, in this module's private `classify` step — a
|
|
3636
4390
|
* spawn-level `PlatformError` and `Cause.TimeoutError` never escape a `Git`
|
|
3637
4391
|
* method; every failure surfaces as {@link GitCommandError},
|
|
3638
|
-
* {@link NotARepositoryError},
|
|
3639
|
-
*
|
|
4392
|
+
* {@link NotARepositoryError}, {@link UnknownRefError}, or one of the three
|
|
4393
|
+
* consumer-branchable classifications ({@link NonFastForwardError} from
|
|
4394
|
+
* `push`; {@link MergeConflictError} and {@link DirtyWorktreeError} from the
|
|
4395
|
+
* merge-shaped `pull` / `stashPop` / `stashApply`), or degrades to the
|
|
4396
|
+
* documented non-error (`Option.none`, `false`, the empty array).
|
|
3640
4397
|
*
|
|
3641
4398
|
* Every method whose TSDoc opens "Mutating:" changes the working tree,
|
|
3642
4399
|
* `HEAD`, the index, the repository config, the object database and
|
|
@@ -3645,6 +4402,12 @@ declare const Git_base: Context.ServiceClass<Git, "@effected/git/Git", GitShape>
|
|
|
3645
4402
|
* that — a caller running two mutating calls (or a mutating call alongside a
|
|
3646
4403
|
* read) against one `cwd` at once owns the race.
|
|
3647
4404
|
*
|
|
4405
|
+
* **Redaction policy (documented, not just convention).** Error values
|
|
4406
|
+
* persist only the constructor's REDACTED argv (see `GitCommandError.args`),
|
|
4407
|
+
* and span annotations carry stable identifiers only — `cwd`, refs, keys,
|
|
4408
|
+
* paths, remote names — never config values and never URLs, which can embed
|
|
4409
|
+
* userinfo. A new method must follow both halves before it ships.
|
|
4410
|
+
*
|
|
3648
4411
|
* @public
|
|
3649
4412
|
*/
|
|
3650
4413
|
declare class Git extends Git_base {
|
|
@@ -3656,7 +4419,7 @@ declare class Git extends Git_base {
|
|
|
3656
4419
|
*
|
|
3657
4420
|
* @remarks
|
|
3658
4421
|
* Unlike `WorkspaceDiscovery.makeTest`, **no method here has an honest
|
|
3659
|
-
* default** — the shape is
|
|
4422
|
+
* default** — the shape is unrelated git operations, and a
|
|
3660
4423
|
* fabricated answer for any of them (an empty tree, a made-up sha, a silent
|
|
3661
4424
|
* no-op `checkout`) would leak into consumer logic as fact. So every
|
|
3662
4425
|
* unstubbed method fails loudly as a defect
|
|
@@ -3711,7 +4474,7 @@ declare class Git extends Git_base {
|
|
|
3711
4474
|
static readonly layerTest: (overrides?: Partial<GitShape>) => Layer.Layer<Git>;
|
|
3712
4475
|
}
|
|
3713
4476
|
//#endregion
|
|
3714
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.
|
|
4477
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.4.0_effect@4.0.0-beta.107/node_modules/@effected/semver/index.d.ts
|
|
3715
4478
|
//#region src/SemVer.d.ts
|
|
3716
4479
|
declare const InvalidVersionError_base: Schema.Class<InvalidVersionError, Schema.TaggedStruct<"InvalidVersionError", {
|
|
3717
4480
|
/** The raw input string that failed to parse. */
|
|
@@ -4395,9 +5158,9 @@ declare class UnsatisfiableConstraintError extends UnsatisfiableConstraintError_
|
|
|
4395
5158
|
get message(): string;
|
|
4396
5159
|
}
|
|
4397
5160
|
//#endregion
|
|
4398
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
5161
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.9.0_@effected+semver@0.4.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/npm/index.d.ts
|
|
4399
5162
|
//#region src/CatalogAssemblyError.d.ts
|
|
4400
|
-
declare const CatalogAssemblyError_base
|
|
5163
|
+
declare const CatalogAssemblyError_base: Schema.Class<CatalogAssemblyError, Schema.TaggedStruct<"CatalogAssemblyError", {
|
|
4401
5164
|
/**
|
|
4402
5165
|
* Which input failed: `manifest` for a file-level or top-level shape problem,
|
|
4403
5166
|
* `catalog` for a malformed catalog block or the double-default duplication,
|
|
@@ -4430,13 +5193,13 @@ declare const CatalogAssemblyError_base$1: Schema.Class<CatalogAssemblyError$1,
|
|
|
4430
5193
|
*
|
|
4431
5194
|
* @public
|
|
4432
5195
|
*/
|
|
4433
|
-
declare class CatalogAssemblyError
|
|
5196
|
+
declare class CatalogAssemblyError extends CatalogAssemblyError_base {
|
|
4434
5197
|
/** Renders the failing source into a one-line message. */
|
|
4435
5198
|
get message(): string;
|
|
4436
5199
|
}
|
|
4437
5200
|
//#endregion
|
|
4438
5201
|
//#region src/WorkspaceResolver.d.ts
|
|
4439
|
-
declare const DependencyResolutionError_base
|
|
5202
|
+
declare const DependencyResolutionError_base: Schema.Class<DependencyResolutionError, Schema.TaggedStruct<"DependencyResolutionError", {
|
|
4440
5203
|
readonly specifier: Schema.String;
|
|
4441
5204
|
readonly cause: Schema.Defect;
|
|
4442
5205
|
}>, import("effect/Cause").YieldableError>;
|
|
@@ -4453,12 +5216,12 @@ declare const DependencyResolutionError_base$1: Schema.Class<DependencyResolutio
|
|
|
4453
5216
|
*
|
|
4454
5217
|
* @public
|
|
4455
5218
|
*/
|
|
4456
|
-
declare class DependencyResolutionError
|
|
5219
|
+
declare class DependencyResolutionError extends DependencyResolutionError_base {
|
|
4457
5220
|
/** Renders `specifier` into a one-line failure message. */
|
|
4458
5221
|
get message(): string;
|
|
4459
5222
|
}
|
|
4460
|
-
declare const WorkspaceResolver_base
|
|
4461
|
-
readonly versionOf: (packageName: string) => Effect.Effect<Option.Option<string>, DependencyResolutionError
|
|
5223
|
+
declare const WorkspaceResolver_base: Context.ServiceClass<WorkspaceResolver, "@effected/npm/WorkspaceResolver", {
|
|
5224
|
+
readonly versionOf: (packageName: string) => Effect.Effect<Option.Option<string>, DependencyResolutionError>;
|
|
4462
5225
|
}>;
|
|
4463
5226
|
/**
|
|
4464
5227
|
* Contract for resolving pnpm `workspace:` dependency specifiers to concrete
|
|
@@ -4489,18 +5252,18 @@ declare const WorkspaceResolver_base$1: Context.ServiceClass<WorkspaceResolver$1
|
|
|
4489
5252
|
*
|
|
4490
5253
|
* @public
|
|
4491
5254
|
*/
|
|
4492
|
-
declare class WorkspaceResolver
|
|
5255
|
+
declare class WorkspaceResolver extends WorkspaceResolver_base {
|
|
4493
5256
|
/**
|
|
4494
5257
|
* No-op default: `versionOf` always succeeds with `Option.none()`, never
|
|
4495
5258
|
* consulting an actual workspace. A pure `Layer.succeed`, bound to a
|
|
4496
5259
|
* const so it memoizes by reference.
|
|
4497
5260
|
*/
|
|
4498
|
-
static readonly noop: Layer.Layer<WorkspaceResolver
|
|
5261
|
+
static readonly noop: Layer.Layer<WorkspaceResolver>;
|
|
4499
5262
|
}
|
|
4500
5263
|
//#endregion
|
|
4501
5264
|
//#region src/CatalogResolver.d.ts
|
|
4502
|
-
declare const CatalogResolver_base
|
|
4503
|
-
readonly rangeOf: (packageName: string, catalog: Option.Option<string>) => Effect.Effect<Option.Option<string>, CatalogAssemblyError
|
|
5265
|
+
declare const CatalogResolver_base: Context.ServiceClass<CatalogResolver, "@effected/npm/CatalogResolver", {
|
|
5266
|
+
readonly rangeOf: (packageName: string, catalog: Option.Option<string>) => Effect.Effect<Option.Option<string>, CatalogAssemblyError | DependencyResolutionError>;
|
|
4504
5267
|
}>;
|
|
4505
5268
|
/**
|
|
4506
5269
|
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
@@ -4537,15 +5300,21 @@ declare const CatalogResolver_base$1: Context.ServiceClass<CatalogResolver$1, "@
|
|
|
4537
5300
|
*
|
|
4538
5301
|
* @public
|
|
4539
5302
|
*/
|
|
4540
|
-
declare class CatalogResolver
|
|
5303
|
+
declare class CatalogResolver extends CatalogResolver_base {
|
|
4541
5304
|
/**
|
|
4542
5305
|
* No-op default: `rangeOf` always succeeds with `Option.none()`, never
|
|
4543
5306
|
* consulting an actual catalog. A pure `Layer.succeed`, bound to a const
|
|
4544
5307
|
* so it memoizes by reference — the layer is built once, not once per
|
|
4545
5308
|
* reference to `CatalogResolver.noop`.
|
|
4546
5309
|
*/
|
|
4547
|
-
static readonly noop: Layer.Layer<CatalogResolver
|
|
5310
|
+
static readonly noop: Layer.Layer<CatalogResolver>;
|
|
4548
5311
|
}
|
|
5312
|
+
/**
|
|
5313
|
+
* The classification of a dependency specifier's protocol.
|
|
5314
|
+
*
|
|
5315
|
+
* @public
|
|
5316
|
+
*/
|
|
5317
|
+
type DependencyProtocol = "range" | "tag" | "git" | "url" | "npm" | "file" | "link" | "portal" | "catalog" | "workspace" | "unknown";
|
|
4549
5318
|
declare const CatalogSpecifier_base: Schema.Class<CatalogSpecifier, Schema.TaggedStruct<"catalog", {
|
|
4550
5319
|
/** The original specifier string. */
|
|
4551
5320
|
readonly raw: Schema.String;
|
|
@@ -4798,7 +5567,7 @@ declare class ReleaseAgeGate extends ReleaseAgeGate_base {
|
|
|
4798
5567
|
filterVersions(versions: readonly string[], times: Readonly<Record<string, string>>, name: string, now: number): readonly string[];
|
|
4799
5568
|
}
|
|
4800
5569
|
//#endregion
|
|
4801
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.
|
|
5570
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.3.0_effect@4.0.0-beta.107/node_modules/@effected/glob/index.d.ts
|
|
4802
5571
|
//#region src/GlobPattern.d.ts
|
|
4803
5572
|
declare const GlobPatternError_base: Schema.Class<GlobPatternError, Schema.TaggedStruct<"GlobPatternError", {
|
|
4804
5573
|
readonly pattern: Schema.String;
|
|
@@ -4963,7 +5732,7 @@ declare class GlobPattern extends GlobPattern_base {
|
|
|
4963
5732
|
static readonly FromString: Schema.Codec<GlobPattern, string>;
|
|
4964
5733
|
}
|
|
4965
5734
|
//#endregion
|
|
4966
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
5735
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.4.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+npm@0._83da5ef372786d059bed7f4a907143ef/node_modules/@effected/lockfiles/index.d.ts
|
|
4967
5736
|
//#region src/BunExtension.d.ts
|
|
4968
5737
|
declare const BunExtension_base: Schema.Class<BunExtension, Schema.Struct<{
|
|
4969
5738
|
readonly _tag: Schema.tag<"bun">;
|
|
@@ -5393,165 +6162,7 @@ declare class LockfileIntegrity extends LockfileIntegrity_base {
|
|
|
5393
6162
|
static compare(lockfile: Lockfile, manifests: ReadonlyArray<WorkspaceManifest>): LockfileIntegrity;
|
|
5394
6163
|
}
|
|
5395
6164
|
//#endregion
|
|
5396
|
-
//#region ../../node_modules/.pnpm/@effected+
|
|
5397
|
-
//#region src/CatalogAssemblyError.d.ts
|
|
5398
|
-
declare const CatalogAssemblyError_base: Schema.Class<CatalogAssemblyError, Schema.TaggedStruct<"CatalogAssemblyError", {
|
|
5399
|
-
/**
|
|
5400
|
-
* Which input failed: `manifest` for a file-level or top-level shape problem,
|
|
5401
|
-
* `catalog` for a malformed catalog block or the double-default duplication,
|
|
5402
|
-
* `hooks` for a config-dependency `pnpmfile.cjs` load or replay failure.
|
|
5403
|
-
*/
|
|
5404
|
-
readonly source: Schema.Literals<readonly ["manifest", "catalog", "hooks"]>;
|
|
5405
|
-
/** The file, the catalog name, or the config dependency name. */
|
|
5406
|
-
readonly path: Schema.String;
|
|
5407
|
-
/** The originating failure. */
|
|
5408
|
-
readonly cause: Schema.Defect;
|
|
5409
|
-
}>, import("effect/Cause").YieldableError>;
|
|
5410
|
-
/**
|
|
5411
|
-
* Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
|
|
5412
|
-
* that is unreadable or not valid YAML, a root `package.json` `workspaces` field
|
|
5413
|
-
* whose shape or catalog blocks are malformed in a way pnpm itself rejects
|
|
5414
|
-
* (including the default catalog declared twice), or a config dependency whose
|
|
5415
|
-
* `pnpmfile.cjs` cannot be loaded or replayed.
|
|
5416
|
-
*
|
|
5417
|
-
* @remarks
|
|
5418
|
-
* A *missing* `pnpm-workspace.yaml`, an *absent* `workspaces` field, or one
|
|
5419
|
-
* explicitly `null` is not an error: there is simply nothing to misread, so
|
|
5420
|
-
* assembly yields the empty set. The reader is otherwise **hard-fail by design** —
|
|
5421
|
-
* a silently-empty catalog read is the "every dependency looks newly added" bug,
|
|
5422
|
-
* because catalog output is load-bearing for snapshot diffing.
|
|
5423
|
-
*
|
|
5424
|
-
* Defined here, next to the {@link CatalogResolver} contract that raises it,
|
|
5425
|
-
* rather than in the implementing package (`@effected/workspaces`): folding it
|
|
5426
|
-
* into `DependencyResolutionError`'s defect `cause` forced every consumer to
|
|
5427
|
-
* `_tag`-sniff `unknown` to tell an assembly failure from a resolution failure.
|
|
5428
|
-
*
|
|
5429
|
-
* @public
|
|
5430
|
-
*/
|
|
5431
|
-
declare class CatalogAssemblyError extends CatalogAssemblyError_base {
|
|
5432
|
-
/** Renders the failing source into a one-line message. */
|
|
5433
|
-
get message(): string;
|
|
5434
|
-
}
|
|
5435
|
-
//#endregion
|
|
5436
|
-
//#region src/WorkspaceResolver.d.ts
|
|
5437
|
-
declare const DependencyResolutionError_base: Schema.Class<DependencyResolutionError, Schema.TaggedStruct<"DependencyResolutionError", {
|
|
5438
|
-
readonly specifier: Schema.String;
|
|
5439
|
-
readonly cause: Schema.Defect;
|
|
5440
|
-
}>, import("effect/Cause").YieldableError>;
|
|
5441
|
-
/**
|
|
5442
|
-
* Raised when a `catalog:` or `workspace:` specifier cannot be resolved
|
|
5443
|
-
* because the resolution mechanism itself failed — not for an ordinary
|
|
5444
|
-
* unmatched specifier, which resolves to `Option.none()` instead. Both
|
|
5445
|
-
* {@link CatalogResolver} and {@link WorkspaceResolver} fail with it.
|
|
5446
|
-
*
|
|
5447
|
-
* `cause` preserves the originating failure on a structured `Schema.Defect`
|
|
5448
|
-
* field rather than folding it into a string, so callers can branch on the
|
|
5449
|
-
* original value (an `Error`, a parsed diagnostic, anything); `specifier`
|
|
5450
|
-
* records the specifier string that failed to resolve.
|
|
5451
|
-
*
|
|
5452
|
-
* @public
|
|
5453
|
-
*/
|
|
5454
|
-
declare class DependencyResolutionError extends DependencyResolutionError_base {
|
|
5455
|
-
/** Renders `specifier` into a one-line failure message. */
|
|
5456
|
-
get message(): string;
|
|
5457
|
-
}
|
|
5458
|
-
declare const WorkspaceResolver_base: Context.ServiceClass<WorkspaceResolver, "@effected/npm/WorkspaceResolver", {
|
|
5459
|
-
readonly versionOf: (packageName: string) => Effect.Effect<Option.Option<string>, DependencyResolutionError>;
|
|
5460
|
-
}>;
|
|
5461
|
-
/**
|
|
5462
|
-
* Contract for resolving pnpm `workspace:` dependency specifiers to concrete
|
|
5463
|
-
* versions.
|
|
5464
|
-
*
|
|
5465
|
-
* `versionOf` takes a workspace package name and returns its concrete
|
|
5466
|
-
* version (the range modifier stripped) as `Option.some`, or
|
|
5467
|
-
* `Option.none()` when the name is not a known workspace member.
|
|
5468
|
-
*
|
|
5469
|
-
* This is a contract-only service: {@link WorkspaceResolver.noop} is the
|
|
5470
|
-
* sole implementation this package ships, and it resolves nothing. Real
|
|
5471
|
-
* consumers (e.g. `@effected/workspaces`) provide a working implementation
|
|
5472
|
-
* at the application boundary.
|
|
5473
|
-
*
|
|
5474
|
-
* @example
|
|
5475
|
-
* ```ts
|
|
5476
|
-
* import { Effect } from "effect";
|
|
5477
|
-
* import { WorkspaceResolver } from "@effected/npm";
|
|
5478
|
-
*
|
|
5479
|
-
* const program = Effect.gen(function* () {
|
|
5480
|
-
* const resolver = yield* WorkspaceResolver;
|
|
5481
|
-
* return yield* resolver.versionOf("@effected/semver");
|
|
5482
|
-
* });
|
|
5483
|
-
*
|
|
5484
|
-
* Effect.runPromise(Effect.provide(program, WorkspaceResolver.noop));
|
|
5485
|
-
* // => Option.none()
|
|
5486
|
-
* ```
|
|
5487
|
-
*
|
|
5488
|
-
* @public
|
|
5489
|
-
*/
|
|
5490
|
-
declare class WorkspaceResolver extends WorkspaceResolver_base {
|
|
5491
|
-
/**
|
|
5492
|
-
* No-op default: `versionOf` always succeeds with `Option.none()`, never
|
|
5493
|
-
* consulting an actual workspace. A pure `Layer.succeed`, bound to a
|
|
5494
|
-
* const so it memoizes by reference.
|
|
5495
|
-
*/
|
|
5496
|
-
static readonly noop: Layer.Layer<WorkspaceResolver>;
|
|
5497
|
-
}
|
|
5498
|
-
//#endregion
|
|
5499
|
-
//#region src/CatalogResolver.d.ts
|
|
5500
|
-
declare const CatalogResolver_base: Context.ServiceClass<CatalogResolver, "@effected/npm/CatalogResolver", {
|
|
5501
|
-
readonly rangeOf: (packageName: string, catalog: Option.Option<string>) => Effect.Effect<Option.Option<string>, CatalogAssemblyError | DependencyResolutionError>;
|
|
5502
|
-
}>;
|
|
5503
|
-
/**
|
|
5504
|
-
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
5505
|
-
* version ranges.
|
|
5506
|
-
*
|
|
5507
|
-
* `rangeOf` takes a package name and an optional catalog name
|
|
5508
|
-
* (`Option.none()` selects the default catalog) and returns the configured
|
|
5509
|
-
* range as `Option.some`, or `Option.none()` when the specifier is absent
|
|
5510
|
-
* from the catalog. By convention the error channel is reserved for a
|
|
5511
|
-
* failure in the resolution mechanism itself — an unmatched package or
|
|
5512
|
-
* catalog name is an `Option.none()` success, never an error. A failure to
|
|
5513
|
-
* *assemble* the catalogs (an unreadable or malformed catalog source)
|
|
5514
|
-
* surfaces typed as a {@link CatalogAssemblyError}; any other mechanism
|
|
5515
|
-
* failure is a {@link DependencyResolutionError}.
|
|
5516
|
-
*
|
|
5517
|
-
* This is a contract-only service: {@link CatalogResolver.noop} is the sole
|
|
5518
|
-
* implementation this package ships, and it resolves nothing. Real consumers
|
|
5519
|
-
* (e.g. `@effected/workspaces`) provide a working implementation at the
|
|
5520
|
-
* application boundary.
|
|
5521
|
-
*
|
|
5522
|
-
* @example
|
|
5523
|
-
* ```ts
|
|
5524
|
-
* import { Effect, Option } from "effect";
|
|
5525
|
-
* import { CatalogResolver } from "@effected/npm";
|
|
5526
|
-
*
|
|
5527
|
-
* const program = Effect.gen(function* () {
|
|
5528
|
-
* const resolver = yield* CatalogResolver;
|
|
5529
|
-
* return yield* resolver.rangeOf("effect", Option.none());
|
|
5530
|
-
* });
|
|
5531
|
-
*
|
|
5532
|
-
* Effect.runPromise(Effect.provide(program, CatalogResolver.noop));
|
|
5533
|
-
* // => Option.none()
|
|
5534
|
-
* ```
|
|
5535
|
-
*
|
|
5536
|
-
* @public
|
|
5537
|
-
*/
|
|
5538
|
-
declare class CatalogResolver extends CatalogResolver_base {
|
|
5539
|
-
/**
|
|
5540
|
-
* No-op default: `rangeOf` always succeeds with `Option.none()`, never
|
|
5541
|
-
* consulting an actual catalog. A pure `Layer.succeed`, bound to a const
|
|
5542
|
-
* so it memoizes by reference — the layer is built once, not once per
|
|
5543
|
-
* reference to `CatalogResolver.noop`.
|
|
5544
|
-
*/
|
|
5545
|
-
static readonly noop: Layer.Layer<CatalogResolver>;
|
|
5546
|
-
}
|
|
5547
|
-
/**
|
|
5548
|
-
* The classification of a dependency specifier's protocol.
|
|
5549
|
-
*
|
|
5550
|
-
* @public
|
|
5551
|
-
*/
|
|
5552
|
-
type DependencyProtocol = "range" | "tag" | "git" | "url" | "npm" | "file" | "link" | "portal" | "catalog" | "workspace" | "unknown";
|
|
5553
|
-
//#endregion
|
|
5554
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.3_effect@4.0.0-beta.101/node_modules/@effected/package-json/index.d.ts
|
|
6165
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.8.0_effect@4.0.0-beta.107/node_modules/@effected/package-json/index.d.ts
|
|
5555
6166
|
//#region src/Dependency.d.ts
|
|
5556
6167
|
declare const Dependency_base: Schema.Class<Dependency, Schema.Struct<{
|
|
5557
6168
|
/** The package name. */
|
|
@@ -6133,7 +6744,7 @@ declare class Package extends Package_base {
|
|
|
6133
6744
|
toJsonString(options?: PackageFormatOptions): string;
|
|
6134
6745
|
}
|
|
6135
6746
|
//#endregion
|
|
6136
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
6747
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.11.0_@effected+jsonc@0.6.0_effect@4.0.0-beta.107__@effected+semv_5ce79e6ba86c98d431ee3b93095bc1a7/node_modules/@effected/workspaces/index.d.ts
|
|
6137
6748
|
//#region src/WorkspacePackage.d.ts
|
|
6138
6749
|
declare const PublishConfig_base: Schema.Class<PublishConfig, Schema.Struct<{
|
|
6139
6750
|
/** Scoped-package visibility. Its presence overrides `private`. */
|
|
@@ -6797,7 +7408,7 @@ declare class WorkspaceDiscovery extends WorkspaceDiscovery_base {
|
|
|
6797
7408
|
* // `Package.resolve` now resolves `workspace:*` for real.
|
|
6798
7409
|
* ```
|
|
6799
7410
|
*/
|
|
6800
|
-
static readonly workspaceResolver: Layer.Layer<WorkspaceResolver
|
|
7411
|
+
static readonly workspaceResolver: Layer.Layer<WorkspaceResolver, never, WorkspaceDiscovery>;
|
|
6801
7412
|
}
|
|
6802
7413
|
//#endregion
|
|
6803
7414
|
//#region src/ConfigDependencyHooks.d.ts
|
|
@@ -6858,7 +7469,7 @@ interface ConfigDependencyHooksShape {
|
|
|
6858
7469
|
* version+integrity) declared in `pnpm-workspace.yaml`.
|
|
6859
7470
|
* @param seed - The inline catalogs, as `catalog name → dependency → range`.
|
|
6860
7471
|
*/
|
|
6861
|
-
readonly inject: (root: string, configDependencies: Readonly<Record<string, string>>, seed: Readonly<Record<string, Readonly<Record<string, string>>>>) => Effect.Effect<HookInjection, CatalogAssemblyError
|
|
7472
|
+
readonly inject: (root: string, configDependencies: Readonly<Record<string, string>>, seed: Readonly<Record<string, Readonly<Record<string, string>>>>) => Effect.Effect<HookInjection, CatalogAssemblyError>;
|
|
6862
7473
|
}
|
|
6863
7474
|
declare const ConfigDependencyHooks_base: Context.ServiceClass<ConfigDependencyHooks, "@effected/workspaces/ConfigDependencyHooks", ConfigDependencyHooksShape>;
|
|
6864
7475
|
/**
|
|
@@ -7501,7 +8112,7 @@ declare class CatalogSet extends CatalogSet_base {
|
|
|
7501
8112
|
*
|
|
7502
8113
|
* @param text - The raw YAML text.
|
|
7503
8114
|
*/
|
|
7504
|
-
static readonly fromWorkspaceYaml: (text: string) => Effect.Effect<CatalogSet, CatalogAssemblyError
|
|
8115
|
+
static readonly fromWorkspaceYaml: (text: string) => Effect.Effect<CatalogSet, CatalogAssemblyError, never>;
|
|
7505
8116
|
/**
|
|
7506
8117
|
* The `catalogs:` section of a pnpm lockfile, whose entries are either a bare
|
|
7507
8118
|
* range or a `{ specifier, version }` pair.
|
|
@@ -7549,7 +8160,7 @@ declare class CatalogSet extends CatalogSet_base {
|
|
|
7549
8160
|
*
|
|
7550
8161
|
* @param text - The raw root `package.json` text.
|
|
7551
8162
|
*/
|
|
7552
|
-
static readonly fromManifestWorkspaces: (text: string) => Effect.Effect<CatalogSet, CatalogAssemblyError
|
|
8163
|
+
static readonly fromManifestWorkspaces: (text: string) => Effect.Effect<CatalogSet, CatalogAssemblyError, never>;
|
|
7553
8164
|
/** Merge sets. Later sets win per dependency within a catalog. */
|
|
7554
8165
|
static merge(...sets: ReadonlyArray<CatalogSet>): CatalogSet;
|
|
7555
8166
|
/** Whether any catalog declares anything. */
|
|
@@ -7581,7 +8192,7 @@ declare class CatalogSet extends CatalogSet_base {
|
|
|
7581
8192
|
*
|
|
7582
8193
|
* @public
|
|
7583
8194
|
*/
|
|
7584
|
-
type CatalogAssemblyFailure = CatalogAssemblyError
|
|
8195
|
+
type CatalogAssemblyFailure = CatalogAssemblyError | WorkspaceRootNotFoundError;
|
|
7585
8196
|
/**
|
|
7586
8197
|
* The {@link WorkspaceCatalogs} service shape.
|
|
7587
8198
|
*
|
|
@@ -7770,7 +8381,7 @@ declare class WorkspaceCatalogs extends WorkspaceCatalogs_base {
|
|
|
7770
8381
|
* consumers to `_tag`-sniff `unknown`); only the remaining mechanism failure,
|
|
7771
8382
|
* an unfindable workspace root, is wrapped as `DependencyResolutionError`.
|
|
7772
8383
|
*/
|
|
7773
|
-
static readonly catalogResolver: Layer.Layer<CatalogResolver
|
|
8384
|
+
static readonly catalogResolver: Layer.Layer<CatalogResolver, never, WorkspaceCatalogs>;
|
|
7774
8385
|
}
|
|
7775
8386
|
//#endregion
|
|
7776
8387
|
//#region src/WorkspaceStateSnapshot.d.ts
|
|
@@ -7930,15 +8541,15 @@ declare class WorkspaceStateSnapshot extends WorkspaceStateSnapshot_base {
|
|
|
7930
8541
|
* were already assembled when it was captured, so this resolver is total —
|
|
7931
8542
|
* `rangeOf` never fails.
|
|
7932
8543
|
*/
|
|
7933
|
-
get catalogResolver(): Layer.Layer<CatalogResolver
|
|
8544
|
+
get catalogResolver(): Layer.Layer<CatalogResolver>;
|
|
7934
8545
|
/**
|
|
7935
8546
|
* A `WorkspaceResolver` layer implementing `@effected/npm`'s contract against
|
|
7936
8547
|
* THIS snapshot's captured versions — so code written to the contract resolves
|
|
7937
8548
|
* `workspace:` specifiers as of this ref. Built once per instance and cached.
|
|
7938
8549
|
*/
|
|
7939
|
-
get workspaceResolver(): Layer.Layer<WorkspaceResolver
|
|
8550
|
+
get workspaceResolver(): Layer.Layer<WorkspaceResolver>;
|
|
7940
8551
|
/** Both snapshot-scoped resolver layers merged. Built once per instance and cached. */
|
|
7941
|
-
get resolvers(): Layer.Layer<CatalogResolver
|
|
8552
|
+
get resolvers(): Layer.Layer<CatalogResolver | WorkspaceResolver>;
|
|
7942
8553
|
}
|
|
7943
8554
|
//#endregion
|
|
7944
8555
|
//#region src/WorkspaceSnapshots.d.ts
|
|
@@ -7956,7 +8567,7 @@ declare class WorkspaceStateSnapshot extends WorkspaceStateSnapshot_base {
|
|
|
7956
8567
|
*
|
|
7957
8568
|
* @public
|
|
7958
8569
|
*/
|
|
7959
|
-
type WorkspaceSnapshotAtFailure = GitCommandError | NotARepositoryError | UnknownRefError | CatalogAssemblyError
|
|
8570
|
+
type WorkspaceSnapshotAtFailure = GitCommandError | NotARepositoryError | UnknownRefError | CatalogAssemblyError | WorkspaceRootNotFoundError;
|
|
7960
8571
|
/**
|
|
7961
8572
|
* Every failure `WorkspaceSnapshots.worktree` can surface: the discovery
|
|
7962
8573
|
* failures plus a catalog-assembly failure.
|
|
@@ -7968,7 +8579,7 @@ type WorkspaceSnapshotAtFailure = GitCommandError | NotARepositoryError | Unknow
|
|
|
7968
8579
|
*
|
|
7969
8580
|
* @public
|
|
7970
8581
|
*/
|
|
7971
|
-
type WorkspaceSnapshotWorktreeFailure = WorkspaceDiscoveryFailure | CatalogAssemblyError
|
|
8582
|
+
type WorkspaceSnapshotWorktreeFailure = WorkspaceDiscoveryFailure | CatalogAssemblyError;
|
|
7972
8583
|
/**
|
|
7973
8584
|
* Options for the {@link WorkspaceSnapshots} layer.
|
|
7974
8585
|
*
|
|
@@ -8115,7 +8726,7 @@ interface WorkspacesOptions {
|
|
|
8115
8726
|
readonly maxDepth?: number;
|
|
8116
8727
|
}
|
|
8117
8728
|
//#endregion
|
|
8118
|
-
//#region ../../node_modules/.pnpm/@effected+walker@0.
|
|
8729
|
+
//#region ../../node_modules/.pnpm/@effected+walker@0.4.0_@effected+glob@0.3.0_effect@4.0.0-beta.107__effect@4.0.0-beta.107/node_modules/@effected/walker/index.d.ts
|
|
8119
8730
|
declare const DescendError_base: Schema.Class<DescendError, Schema.TaggedStruct<"DescendError", {
|
|
8120
8731
|
/** The glob pattern's source text. */
|
|
8121
8732
|
readonly pattern: Schema.String;
|