@savvy-web/silk 3.0.4 → 3.0.5
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 +809 -244
- package/changesets-changelog.d.cts +414 -32
- package/changesets-changelog.d.ts +414 -32
- package/changesets-changelog.js +826 -248
- package/changesets-markdownlint.cjs +809 -244
- package/changesets-markdownlint.d.cts +414 -32
- package/changesets-markdownlint.d.ts +414 -32
- package/changesets-markdownlint.js +826 -248
- package/package.json +4 -4
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Brand, Context, Effect, Equal, FileSystem, Hash, HashMap, Layer, Option, Order, Path, Schema } from "effect";
|
|
1
|
+
import { Brand, Context, Effect, Equal, FileSystem, Hash, HashMap, Layer, Option, Order, Path, Result, Schema } from "effect";
|
|
2
2
|
import { ChildProcessSpawner } from "effect/unstable/process";
|
|
3
3
|
//#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
|
|
4
4
|
// ## Interfaces
|
|
@@ -3650,7 +3650,7 @@ declare class Git extends Git_base {
|
|
|
3650
3650
|
static readonly layer: Layer.Layer<Git, never, ChildProcessSpawner.ChildProcessSpawner>;
|
|
3651
3651
|
}
|
|
3652
3652
|
//#endregion
|
|
3653
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.
|
|
3653
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/semver/index.d.ts
|
|
3654
3654
|
//#region src/SemVer.d.ts
|
|
3655
3655
|
declare const InvalidVersionError_base: Schema.Class<InvalidVersionError, Schema.TaggedStruct<"InvalidVersionError", {
|
|
3656
3656
|
/** The raw input string that failed to parse. */
|
|
@@ -3719,11 +3719,45 @@ declare class SemVer extends SemVer_base {
|
|
|
3719
3719
|
*/
|
|
3720
3720
|
static readonly FromString: Schema.Codec<SemVer, string>;
|
|
3721
3721
|
/**
|
|
3722
|
-
* Parse a strict SemVer 2.0.0 version string
|
|
3722
|
+
* Parse a strict SemVer 2.0.0 version string, synchronously, returning a
|
|
3723
|
+
* `Result` instead of an `Effect`.
|
|
3723
3724
|
*
|
|
3724
3725
|
* Rejects `v`/`V` prefixes, `=` prefixes, leading zeros on numeric
|
|
3725
3726
|
* identifiers and partially consumed input.
|
|
3726
3727
|
*
|
|
3728
|
+
* @remarks
|
|
3729
|
+
* {@link SemVer.parse} is defined in terms of this function; the two never
|
|
3730
|
+
* diverge. Reach for the `Effect` variant inside Effect code — it carries
|
|
3731
|
+
* the `SemVer.parse` tracing span — and for this one at synchronous
|
|
3732
|
+
* boundaries.
|
|
3733
|
+
*
|
|
3734
|
+
* @example
|
|
3735
|
+
* ```ts
|
|
3736
|
+
* import { SemVer } from "@effected/semver";
|
|
3737
|
+
* import { Result } from "effect";
|
|
3738
|
+
*
|
|
3739
|
+
* const ok = SemVer.parseResult("1.2.3");
|
|
3740
|
+
* if (Result.isSuccess(ok)) {
|
|
3741
|
+
* console.log(ok.success.major); // => 1
|
|
3742
|
+
* }
|
|
3743
|
+
*
|
|
3744
|
+
* const bad = SemVer.parseResult("v1.2.3");
|
|
3745
|
+
* if (Result.isFailure(bad)) {
|
|
3746
|
+
* console.log(bad.failure._tag); // => "InvalidVersionError"
|
|
3747
|
+
* }
|
|
3748
|
+
* ```
|
|
3749
|
+
*
|
|
3750
|
+
* @param input - the version string to parse
|
|
3751
|
+
* @returns a `Result` succeeding with the parsed {@link SemVer}, or failing
|
|
3752
|
+
* with {@link InvalidVersionError} when `input` is not a valid version
|
|
3753
|
+
* string.
|
|
3754
|
+
*/
|
|
3755
|
+
static parseResult(input: string): Result.Result<SemVer, InvalidVersionError>;
|
|
3756
|
+
/**
|
|
3757
|
+
* Parse a strict SemVer 2.0.0 version string. Defined in terms of
|
|
3758
|
+
* {@link SemVer.parseResult} — synchronous callers can use that variant
|
|
3759
|
+
* directly.
|
|
3760
|
+
*
|
|
3727
3761
|
* @param input - the version string to parse
|
|
3728
3762
|
* @returns the parsed {@link SemVer}. Fails with {@link InvalidVersionError}
|
|
3729
3763
|
* when `input` is not a valid version string.
|
|
@@ -3924,7 +3958,41 @@ declare class Comparator extends Comparator_base {
|
|
|
3924
3958
|
* and {@link Comparator}.
|
|
3925
3959
|
*/
|
|
3926
3960
|
static readonly FromString: Schema.Codec<Comparator, string>;
|
|
3927
|
-
/**
|
|
3961
|
+
/**
|
|
3962
|
+
* Parse a comparator string (e.g. `">=1.2.3"`), synchronously, returning a
|
|
3963
|
+
* `Result` instead of an `Effect`.
|
|
3964
|
+
*
|
|
3965
|
+
* @remarks
|
|
3966
|
+
* {@link Comparator.parse} is defined in terms of this function; the two
|
|
3967
|
+
* never diverge. Reach for the `Effect` variant inside Effect code — it
|
|
3968
|
+
* carries the `Comparator.parse` tracing span — and for this one at
|
|
3969
|
+
* synchronous boundaries.
|
|
3970
|
+
*
|
|
3971
|
+
* @example
|
|
3972
|
+
* ```ts
|
|
3973
|
+
* import { Comparator } from "@effected/semver";
|
|
3974
|
+
* import { Result } from "effect";
|
|
3975
|
+
*
|
|
3976
|
+
* const ok = Comparator.parseResult(">=1.2.3");
|
|
3977
|
+
* if (Result.isSuccess(ok)) {
|
|
3978
|
+
* console.log(ok.success.operator); // => ">="
|
|
3979
|
+
* }
|
|
3980
|
+
* ```
|
|
3981
|
+
*
|
|
3982
|
+
* @param input - the comparator string to parse
|
|
3983
|
+
* @returns a `Result` succeeding with the parsed {@link Comparator}, or
|
|
3984
|
+
* failing with {@link InvalidComparatorError}.
|
|
3985
|
+
*/
|
|
3986
|
+
static parseResult(input: string): Result.Result<Comparator, InvalidComparatorError>;
|
|
3987
|
+
/**
|
|
3988
|
+
* Parse a comparator string (e.g. `">=1.2.3"`). Defined in terms of
|
|
3989
|
+
* {@link Comparator.parseResult} — synchronous callers can use that variant
|
|
3990
|
+
* directly.
|
|
3991
|
+
*
|
|
3992
|
+
* @param input - the comparator string to parse
|
|
3993
|
+
* @returns the parsed {@link Comparator}. Fails with
|
|
3994
|
+
* {@link InvalidComparatorError}.
|
|
3995
|
+
*/
|
|
3928
3996
|
static readonly parse: (input: string) => Effect.Effect<Comparator, InvalidComparatorError, never>;
|
|
3929
3997
|
/** Test whether a version satisfies this comparator. */
|
|
3930
3998
|
test(version: SemVer): boolean;
|
|
@@ -3986,7 +4054,40 @@ declare class Range extends Range_base {
|
|
|
3986
4054
|
* prints `a b || c d`.
|
|
3987
4055
|
*/
|
|
3988
4056
|
static readonly FromString: Schema.Codec<Range, string>;
|
|
3989
|
-
/**
|
|
4057
|
+
/**
|
|
4058
|
+
* Parse a range expression and normalize its comparator sets,
|
|
4059
|
+
* synchronously, returning a `Result` instead of an `Effect`.
|
|
4060
|
+
*
|
|
4061
|
+
* @remarks
|
|
4062
|
+
* {@link Range.parse} is defined in terms of this function; the two never
|
|
4063
|
+
* diverge. Reach for the `Effect` variant inside Effect code — it carries
|
|
4064
|
+
* the `Range.parse` tracing span — and for this one at synchronous
|
|
4065
|
+
* boundaries.
|
|
4066
|
+
*
|
|
4067
|
+
* @example
|
|
4068
|
+
* ```ts
|
|
4069
|
+
* import { Range } from "@effected/semver";
|
|
4070
|
+
* import { Result } from "effect";
|
|
4071
|
+
*
|
|
4072
|
+
* const ok = Range.parseResult("^1.0.0");
|
|
4073
|
+
* if (Result.isSuccess(ok)) {
|
|
4074
|
+
* console.log(ok.success.toString()); // => ">=1.0.0 <2.0.0-0"
|
|
4075
|
+
* }
|
|
4076
|
+
* ```
|
|
4077
|
+
*
|
|
4078
|
+
* @param input - the range expression to parse
|
|
4079
|
+
* @returns a `Result` succeeding with the parsed {@link Range}, or failing
|
|
4080
|
+
* with {@link InvalidRangeError}.
|
|
4081
|
+
*/
|
|
4082
|
+
static parseResult(input: string): Result.Result<Range, InvalidRangeError>;
|
|
4083
|
+
/**
|
|
4084
|
+
* Parse a range expression and normalize its comparator sets. Defined in
|
|
4085
|
+
* terms of {@link Range.parseResult} — synchronous callers can use that
|
|
4086
|
+
* variant directly.
|
|
4087
|
+
*
|
|
4088
|
+
* @param input - the range expression to parse
|
|
4089
|
+
* @returns the parsed {@link Range}. Fails with {@link InvalidRangeError}.
|
|
4090
|
+
*/
|
|
3990
4091
|
static readonly parse: (input: string) => Effect.Effect<Range, InvalidRangeError, never>;
|
|
3991
4092
|
/**
|
|
3992
4093
|
* Test whether a version satisfies a range; see {@link Range.test} for the
|
|
@@ -4019,11 +4120,44 @@ declare class Range extends Range_base {
|
|
|
4019
4120
|
(that: Range): (self: Range) => Range;
|
|
4020
4121
|
(self: Range, that: Range): Range;
|
|
4021
4122
|
};
|
|
4123
|
+
/**
|
|
4124
|
+
* Intersect two ranges via a cross-product of their comparator sets,
|
|
4125
|
+
* keeping only satisfiable combinations, synchronously, returning a
|
|
4126
|
+
* `Result` instead of an `Effect`. Fails with
|
|
4127
|
+
* {@link UnsatisfiableConstraintError} when no satisfiable set remains —
|
|
4128
|
+
* an honest typed failure instead of an unsatisfiable range. Dual API.
|
|
4129
|
+
*
|
|
4130
|
+
* @remarks
|
|
4131
|
+
* {@link Range.intersect} is defined in terms of this function; the two
|
|
4132
|
+
* never diverge. Reach for the `Effect` variant inside Effect code — it
|
|
4133
|
+
* carries the `Range.intersect` tracing span — and for this one at
|
|
4134
|
+
* synchronous boundaries.
|
|
4135
|
+
*
|
|
4136
|
+
* @example
|
|
4137
|
+
* ```ts
|
|
4138
|
+
* import { Range } from "@effected/semver";
|
|
4139
|
+
* import { Result } from "effect";
|
|
4140
|
+
*
|
|
4141
|
+
* const a = Result.getOrThrow(Range.parseResult("^1.0.0"));
|
|
4142
|
+
* const b = Result.getOrThrow(Range.parseResult(">=1.5.0"));
|
|
4143
|
+
* const merged = Range.intersectResult(a, b);
|
|
4144
|
+
* if (Result.isSuccess(merged)) {
|
|
4145
|
+
* console.log(merged.success.toString()); // => ">=1.0.0 <2.0.0-0 >=1.5.0"
|
|
4146
|
+
* }
|
|
4147
|
+
* ```
|
|
4148
|
+
*/
|
|
4149
|
+
static readonly intersectResult: {
|
|
4150
|
+
(that: Range): (self: Range) => Result.Result<Range, UnsatisfiableConstraintError>;
|
|
4151
|
+
(self: Range, that: Range): Result.Result<Range, UnsatisfiableConstraintError>;
|
|
4152
|
+
};
|
|
4022
4153
|
/**
|
|
4023
4154
|
* Intersect two ranges via a cross-product of their comparator sets,
|
|
4024
4155
|
* keeping only satisfiable combinations. Fails with
|
|
4025
4156
|
* {@link UnsatisfiableConstraintError} when no satisfiable set remains —
|
|
4026
4157
|
* an honest typed failure instead of an unsatisfiable range. Dual API.
|
|
4158
|
+
*
|
|
4159
|
+
* Defined in terms of {@link Range.intersectResult} — synchronous callers
|
|
4160
|
+
* can use that variant directly.
|
|
4027
4161
|
*/
|
|
4028
4162
|
static readonly intersect: {
|
|
4029
4163
|
(that: Range): (self: Range) => Effect.Effect<Range, UnsatisfiableConstraintError>;
|
|
@@ -4091,7 +4225,7 @@ declare class UnsatisfiableConstraintError extends UnsatisfiableConstraintError_
|
|
|
4091
4225
|
get message(): string;
|
|
4092
4226
|
}
|
|
4093
4227
|
//#endregion
|
|
4094
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
4228
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.2.3_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/index.d.ts
|
|
4095
4229
|
//#region src/CatalogAssemblyError.d.ts
|
|
4096
4230
|
declare const CatalogAssemblyError_base: Schema.Class<CatalogAssemblyError, Schema.TaggedStruct<"CatalogAssemblyError", {
|
|
4097
4231
|
/**
|
|
@@ -4363,7 +4497,7 @@ declare class InvalidIntegrityHashError extends InvalidIntegrityHashError_base {
|
|
|
4363
4497
|
*/
|
|
4364
4498
|
type IntegrityHashBrand = string & Brand.Brand<"IntegrityHash">;
|
|
4365
4499
|
//#endregion
|
|
4366
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.
|
|
4500
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.2.0_effect@4.0.0-beta.99/node_modules/@effected/glob/index.d.ts
|
|
4367
4501
|
//#region src/GlobPattern.d.ts
|
|
4368
4502
|
declare const GlobPatternError_base: Schema.Class<GlobPatternError, Schema.TaggedStruct<"GlobPatternError", {
|
|
4369
4503
|
readonly pattern: Schema.String;
|
|
@@ -4436,15 +4570,40 @@ declare const GlobPattern_base: Schema.Class<GlobPattern, Schema.Struct<{
|
|
|
4436
4570
|
declare class GlobPattern extends GlobPattern_base {
|
|
4437
4571
|
#private;
|
|
4438
4572
|
/**
|
|
4439
|
-
* Compile a pattern under the given options — the package's
|
|
4440
|
-
* boundary
|
|
4441
|
-
*
|
|
4442
|
-
*
|
|
4573
|
+
* Compile a pattern under the given options, synchronously — the package's
|
|
4574
|
+
* fallible boundary in its primitive form. Compilation is pure
|
|
4575
|
+
* string→predicate work with no IO, no services and no async step, so the
|
|
4576
|
+
* sync form is the real primitive and {@link GlobPattern.compile} is
|
|
4577
|
+
* derived from it.
|
|
4578
|
+
*
|
|
4579
|
+
* Total: never throws for pattern input. Guard trips (over-length,
|
|
4580
|
+
* expansion budget, nesting depth) come back as a `Result` failure holding
|
|
4581
|
+
* {@link GlobPatternError}; invalid *options* never reach here (they throw
|
|
4582
|
+
* at `GlobPatternOptions.make`, a wiring defect).
|
|
4443
4583
|
*
|
|
4444
4584
|
* The pattern must also compile under DEFAULT options, whatever the
|
|
4445
4585
|
* effective options are — permissive options (say `nobrace` over a brace
|
|
4446
4586
|
* bomb) do not admit a defaults-rejected pattern; the same typed error
|
|
4447
4587
|
* surfaces instead.
|
|
4588
|
+
*
|
|
4589
|
+
* @remarks
|
|
4590
|
+
* For synchronous call sites that cannot host an Effect — a lint-staged
|
|
4591
|
+
* handler, a config predicate — this removes the
|
|
4592
|
+
* `Effect.runSync(Effect.result(...))` escape hatch: pair it with
|
|
4593
|
+
* `Result.isSuccess` and read `.success` directly. Effect call sites should
|
|
4594
|
+
* prefer {@link GlobPattern.compile}, which carries the tracing span.
|
|
4595
|
+
*/
|
|
4596
|
+
static compileResult(source: string, options?: GlobPatternOptions): Result.Result<GlobPattern, GlobPatternError>;
|
|
4597
|
+
/**
|
|
4598
|
+
* Compile a pattern under the given options — the package's fallible
|
|
4599
|
+
* boundary, and the form Effect call sites should reach for. Guard trips
|
|
4600
|
+
* (over-length, expansion budget, nesting depth) fail typed with
|
|
4601
|
+
* {@link GlobPatternError}; invalid options never reach here (they throw at
|
|
4602
|
+
* `GlobPatternOptions.make`, a wiring defect).
|
|
4603
|
+
*
|
|
4604
|
+
* Defined in terms of {@link GlobPattern.compileResult} — synchronous
|
|
4605
|
+
* callers can use that variant directly. Same semantics, same errors; this
|
|
4606
|
+
* form adds only the `GlobPattern.compile` tracing span.
|
|
4448
4607
|
*/
|
|
4449
4608
|
static readonly compile: (source: string, options?: GlobPatternOptions | undefined) => Effect.Effect<GlobPattern, GlobPatternError, never>;
|
|
4450
4609
|
/**
|
|
@@ -4503,7 +4662,7 @@ declare class GlobPattern extends GlobPattern_base {
|
|
|
4503
4662
|
static readonly FromString: Schema.Codec<GlobPattern, string>;
|
|
4504
4663
|
}
|
|
4505
4664
|
//#endregion
|
|
4506
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4665
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.8_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.2_d9e647ebf030778b1166690cbf4c6aa9/node_modules/@effected/lockfiles/index.d.ts
|
|
4507
4666
|
//#region src/BunExtension.d.ts
|
|
4508
4667
|
declare const BunExtension_base: Schema.Class<BunExtension, Schema.Struct<{
|
|
4509
4668
|
readonly _tag: Schema.tag<"bun">;
|
|
@@ -4923,7 +5082,7 @@ declare class LockfileIntegrity extends LockfileIntegrity_base {
|
|
|
4923
5082
|
static compare(lockfile: Lockfile, manifests: ReadonlyArray<WorkspaceManifest>): LockfileIntegrity;
|
|
4924
5083
|
}
|
|
4925
5084
|
//#endregion
|
|
4926
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
5085
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/index.d.ts
|
|
4927
5086
|
//#region src/Dependency.d.ts
|
|
4928
5087
|
declare const Dependency_base: Schema.Class<Dependency, Schema.Struct<{
|
|
4929
5088
|
/** The package name. */
|
|
@@ -5056,23 +5215,60 @@ declare const Person_base: Schema.Class<Person, Schema.Struct<{
|
|
|
5056
5215
|
readonly email: Schema.optionalKey<Schema.String>;
|
|
5057
5216
|
/** The optional homepage URL. */
|
|
5058
5217
|
readonly url: Schema.optionalKey<Schema.String>;
|
|
5218
|
+
/** Any additional keys, preserved verbatim and flattened back on encode. */
|
|
5219
|
+
readonly rest: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
5059
5220
|
}>, {}>;
|
|
5060
5221
|
/**
|
|
5061
|
-
* A structured person object with `name
|
|
5222
|
+
* A structured person object with `name`, optional `email` / `url`, and a
|
|
5223
|
+
* `rest` catch-all preserving any additional keys across a read/write cycle.
|
|
5062
5224
|
*
|
|
5063
5225
|
* @public
|
|
5064
5226
|
*/
|
|
5065
5227
|
declare class Person extends Person_base {
|
|
5228
|
+
/**
|
|
5229
|
+
* The object wire codec: an open JSON object ↔ a {@link Person}, partitioning
|
|
5230
|
+
* unknown keys into `rest` and flattening them back on encode so the on-disk
|
|
5231
|
+
* shape never carries a literal `rest` key.
|
|
5232
|
+
*/
|
|
5233
|
+
static readonly schema: Schema.Codec<Person, {
|
|
5234
|
+
readonly [k: string]: unknown;
|
|
5235
|
+
}>;
|
|
5066
5236
|
/**
|
|
5067
5237
|
* Schema transformation between the `"Name <email> (url)"` shorthand string
|
|
5068
|
-
* and a {@link Person}.
|
|
5238
|
+
* and a {@link Person}. Decoding remembers the input text so that encoding
|
|
5239
|
+
* reproduces it verbatim; see {@link Person.wireStringOf}.
|
|
5069
5240
|
*/
|
|
5070
5241
|
static readonly FromString: Schema.Codec<Person, string>;
|
|
5071
5242
|
/**
|
|
5072
5243
|
* The `author` / `contributors` value: either the shorthand string or the
|
|
5073
5244
|
* structured object, always decoded to a {@link Person}.
|
|
5245
|
+
*
|
|
5246
|
+
* The wire form is preserved across a round trip — a person read from the
|
|
5247
|
+
* shorthand string encodes back to that string, byte for byte, and one read
|
|
5248
|
+
* from an object encodes back to an object with its unknown keys intact.
|
|
5249
|
+
* Formatting a manifest therefore never rewrites one legal encoding into the
|
|
5250
|
+
* other.
|
|
5251
|
+
*
|
|
5252
|
+
* Provenance belongs to the instance, so a person that is *rebuilt* (rather
|
|
5253
|
+
* than carried through unchanged) has none and encodes in the canonical
|
|
5254
|
+
* object form. Editing an unrelated field of the surrounding `Package`
|
|
5255
|
+
* carries the same person instance through and preserves its encoding.
|
|
5074
5256
|
*/
|
|
5075
|
-
static readonly FromValue: Schema.
|
|
5257
|
+
static readonly FromValue: Schema.Codec<Person, string | {
|
|
5258
|
+
readonly [k: string]: unknown;
|
|
5259
|
+
}>;
|
|
5260
|
+
/**
|
|
5261
|
+
* The shorthand text this person was decoded from, when it was decoded from
|
|
5262
|
+
* the string form and still matches its fields; `None` for a person built
|
|
5263
|
+
* from an object or by hand.
|
|
5264
|
+
*
|
|
5265
|
+
* Exposed so callers can tell which encoding a manifest used without
|
|
5266
|
+
* re-reading the file.
|
|
5267
|
+
*
|
|
5268
|
+
* @param person - the person to inspect
|
|
5269
|
+
* @returns the original shorthand text, or `None`
|
|
5270
|
+
*/
|
|
5271
|
+
static wireStringOf(person: Person): Option.Option<string>;
|
|
5076
5272
|
}
|
|
5077
5273
|
declare const PackageDecodeError_base: Schema.Class<PackageDecodeError, Schema.TaggedStruct<"PackageDecodeError", {
|
|
5078
5274
|
/** The underlying `SchemaError`, preserved structurally rather than stringified. */
|
|
@@ -5142,8 +5338,12 @@ declare const Package_base: Schema.Class<Package, Schema.Struct<{
|
|
|
5142
5338
|
readonly type: Schema.optionalKey<Schema.Literals<readonly ["module", "commonjs"]>>;
|
|
5143
5339
|
readonly main: Schema.optionalKey<Schema.String>;
|
|
5144
5340
|
readonly license: Schema.optionalKey<Schema.brand<Schema.String, "SpdxLicense">>;
|
|
5145
|
-
readonly author: Schema.optionalKey<Schema.
|
|
5146
|
-
|
|
5341
|
+
readonly author: Schema.optionalKey<Schema.Codec<Person, string | {
|
|
5342
|
+
readonly [k: string]: unknown;
|
|
5343
|
+
}, never, never>>;
|
|
5344
|
+
readonly contributors: Schema.optionalKey<Schema.$Array<Schema.Codec<Person, string | {
|
|
5345
|
+
readonly [k: string]: unknown;
|
|
5346
|
+
}, never, never>>>;
|
|
5147
5347
|
readonly repository: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
5148
5348
|
readonly dependencies: Schema.decodeTo<Schema.HashMap<Schema.String, Schema.String>, Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.String>, never>, never, never>;
|
|
5149
5349
|
readonly devDependencies: Schema.decodeTo<Schema.HashMap<Schema.String, Schema.String>, Schema.withDecodingDefaultKey<Schema.$Record<Schema.String, Schema.String>, never>, never, never>;
|
|
@@ -5330,7 +5530,7 @@ declare class Package extends Package_base {
|
|
|
5330
5530
|
toJsonString(options?: PackageFormatOptions): string;
|
|
5331
5531
|
}
|
|
5332
5532
|
//#endregion
|
|
5333
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
5533
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.5.2_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/index.d.ts
|
|
5334
5534
|
//#region src/WorkspacePackage.d.ts
|
|
5335
5535
|
declare const PublishConfig_base: Schema.Class<PublishConfig, Schema.Struct<{
|
|
5336
5536
|
/** Scoped-package visibility. Its presence overrides `private`. */
|
|
@@ -5416,6 +5616,21 @@ declare const WorkspacePackage_base: Schema.Class<WorkspacePackage, Schema.Struc
|
|
|
5416
5616
|
readonly packageJsonPath: Schema.NonEmptyString;
|
|
5417
5617
|
/** POSIX path relative to the workspace root; `"."` for the root package. */
|
|
5418
5618
|
readonly relativePath: Schema.String;
|
|
5619
|
+
/**
|
|
5620
|
+
* Absolute path to the workspace root this package was discovered under.
|
|
5621
|
+
*
|
|
5622
|
+
* @remarks
|
|
5623
|
+
* Carried, not derived. Whoever built this value already knew the root —
|
|
5624
|
+
* `WorkspaceDiscovery` resolved it before enumerating, and the sync entry
|
|
5625
|
+
* point is handed it — so dropping it forced every consumer into per-package
|
|
5626
|
+
* root arithmetic (counting `relativePath` segments and re-ascending that
|
|
5627
|
+
* many `..`). That reconstruction is exact only while `path` and
|
|
5628
|
+
* `relativePath` agree, and it re-derives something the kit never had to
|
|
5629
|
+
* lose.
|
|
5630
|
+
*
|
|
5631
|
+
* For the root package this equals `path`, and `relativePath` is `"."`.
|
|
5632
|
+
*/
|
|
5633
|
+
readonly workspaceRoot: Schema.NonEmptyString;
|
|
5419
5634
|
/** Whether the package is marked private. */
|
|
5420
5635
|
readonly private: Schema.withConstructorDefault<Schema.withDecodingDefaultKey<Schema.Boolean, never>>;
|
|
5421
5636
|
/** Production dependencies. */
|
|
@@ -5461,10 +5676,12 @@ declare const WorkspacePackage_base: Schema.Class<WorkspacePackage, Schema.Struc
|
|
|
5461
5676
|
* path: "/repo/packages/utils",
|
|
5462
5677
|
* packageJsonPath: "/repo/packages/utils/package.json",
|
|
5463
5678
|
* relativePath: "packages/utils",
|
|
5679
|
+
* workspaceRoot: "/repo",
|
|
5464
5680
|
* });
|
|
5465
5681
|
*
|
|
5466
5682
|
* pkg.isRootWorkspace; // false
|
|
5467
5683
|
* pkg.unscopedName; // "utils"
|
|
5684
|
+
* pkg.workspaceRoot; // "/repo"
|
|
5468
5685
|
* ```
|
|
5469
5686
|
*
|
|
5470
5687
|
* @public
|
|
@@ -5530,11 +5747,53 @@ declare class WorkspacePackage extends WorkspacePackage_base {
|
|
|
5530
5747
|
/** Instance form of `WorkspacePackage.manifest`. */
|
|
5531
5748
|
manifest(): Effect.Effect<Package, WorkspaceManifestError, FileSystem.FileSystem>;
|
|
5532
5749
|
}
|
|
5750
|
+
/**
|
|
5751
|
+
* Options for {@link WorkspaceRoot}'s `find`.
|
|
5752
|
+
*
|
|
5753
|
+
* @remarks
|
|
5754
|
+
* Both bounds are passed straight through to `@effected/walker`'s
|
|
5755
|
+
* `Walker.ascend`; this package does not re-decide either.
|
|
5756
|
+
*
|
|
5757
|
+
* @public
|
|
5758
|
+
*/
|
|
5759
|
+
interface FindWorkspaceRootOptions {
|
|
5760
|
+
/**
|
|
5761
|
+
* A ceiling directory. The ascent stops after probing it, so an unmarked
|
|
5762
|
+
* `stopAt` fails typed as {@link WorkspaceRootNotFoundError} rather than
|
|
5763
|
+
* silently escaping into an enclosing repository.
|
|
5764
|
+
*
|
|
5765
|
+
* @remarks
|
|
5766
|
+
* Resolved to an absolute path before comparison, exactly as `cwd` is — a
|
|
5767
|
+
* relative or non-normalized ceiling that never string-matched an ancestor
|
|
5768
|
+
* would reintroduce the unbounded ascent it was passed to prevent.
|
|
5769
|
+
*/
|
|
5770
|
+
readonly stopAt?: string;
|
|
5771
|
+
/**
|
|
5772
|
+
* Hard cap on the number of directories probed.
|
|
5773
|
+
*
|
|
5774
|
+
* @remarks
|
|
5775
|
+
* A non-integer or non-positive value is a **defect**, not a typed failure —
|
|
5776
|
+
* it is developer wiring, and walker's guard raises it.
|
|
5777
|
+
*
|
|
5778
|
+
* @defaultValue 256
|
|
5779
|
+
*/
|
|
5780
|
+
readonly maxDepth?: number;
|
|
5781
|
+
}
|
|
5533
5782
|
declare const WorkspaceRootNotFoundError_base: Schema.Class<WorkspaceRootNotFoundError, Schema.TaggedStruct<"WorkspaceRootNotFoundError", {
|
|
5534
5783
|
/** The directory the ascent started from. */
|
|
5535
5784
|
readonly searchPath: Schema.String;
|
|
5536
5785
|
/** The marker filenames probed at each ancestor. */
|
|
5537
5786
|
readonly markers: Schema.$Array<Schema.String>;
|
|
5787
|
+
/**
|
|
5788
|
+
* The resolved ceiling the ascent was bounded by, when one was supplied.
|
|
5789
|
+
*
|
|
5790
|
+
* @remarks
|
|
5791
|
+
* Absent means the ascent ran to the filesystem root. Its presence is what
|
|
5792
|
+
* lets a caller tell "there is no workspace root anywhere above me" from
|
|
5793
|
+
* "there is none below the ceiling I set" — two failures that otherwise
|
|
5794
|
+
* render identically.
|
|
5795
|
+
*/
|
|
5796
|
+
readonly stopAt: Schema.optionalKey<Schema.String>;
|
|
5538
5797
|
}>, import("effect/Cause").YieldableError>;
|
|
5539
5798
|
/**
|
|
5540
5799
|
* Raised when no workspace root can be found by ascending from a directory.
|
|
@@ -5546,18 +5805,32 @@ declare const WorkspaceRootNotFoundError_base: Schema.Class<WorkspaceRootNotFoun
|
|
|
5546
5805
|
* @public
|
|
5547
5806
|
*/
|
|
5548
5807
|
declare class WorkspaceRootNotFoundError extends WorkspaceRootNotFoundError_base {
|
|
5549
|
-
/** Renders the search path
|
|
5808
|
+
/** Renders the search path, probed markers and any ceiling into a one-line message. */
|
|
5550
5809
|
get message(): string;
|
|
5551
5810
|
}
|
|
5552
|
-
|
|
5811
|
+
/**
|
|
5812
|
+
* The {@link WorkspaceRoot} service contract.
|
|
5813
|
+
*
|
|
5814
|
+
* @remarks
|
|
5815
|
+
* Named so a consumer can type its own double — or a `Layer.succeed` — against
|
|
5816
|
+
* the contract rather than re-deriving it, exactly as `WorkspaceDiscoveryShape`
|
|
5817
|
+
* does. Prefer {@link WorkspaceRoot.layerTest} to hand-rolling one.
|
|
5818
|
+
*
|
|
5819
|
+
* @public
|
|
5820
|
+
*/
|
|
5821
|
+
interface WorkspaceRootShape {
|
|
5553
5822
|
/**
|
|
5554
5823
|
* The nearest workspace root at or above `cwd`.
|
|
5555
5824
|
*
|
|
5556
5825
|
* @param cwd - The directory to start the ascent from; resolved to an
|
|
5557
5826
|
* absolute path first.
|
|
5827
|
+
* @param options - Optional ascent bounds. Unbounded by default, which
|
|
5828
|
+
* walks to the filesystem root and can therefore resolve to an enclosing
|
|
5829
|
+
* repository's root; pass `stopAt` when the caller knows the ceiling.
|
|
5558
5830
|
*/
|
|
5559
|
-
readonly find: (cwd: string) => Effect.Effect<string, WorkspaceRootNotFoundError>;
|
|
5560
|
-
}
|
|
5831
|
+
readonly find: (cwd: string, options?: FindWorkspaceRootOptions) => Effect.Effect<string, WorkspaceRootNotFoundError>;
|
|
5832
|
+
}
|
|
5833
|
+
declare const WorkspaceRoot_base: Context.ServiceClass<WorkspaceRoot, "@effected/workspaces/WorkspaceRoot", WorkspaceRootShape>;
|
|
5561
5834
|
/**
|
|
5562
5835
|
* Locates the workspace root by ascending from a starting directory.
|
|
5563
5836
|
*
|
|
@@ -5572,15 +5845,86 @@ declare const WorkspaceRoot_base: Context.ServiceClass<WorkspaceRoot, "@effected
|
|
|
5572
5845
|
* });
|
|
5573
5846
|
* ```
|
|
5574
5847
|
*
|
|
5848
|
+
* @example
|
|
5849
|
+
* Bounded: an unmarked fixture directory fails typed instead of escaping into
|
|
5850
|
+
* the enclosing repository.
|
|
5851
|
+
*
|
|
5852
|
+
* ```ts
|
|
5853
|
+
* import { WorkspaceRoot } from "@effected/workspaces";
|
|
5854
|
+
* import { Effect } from "effect";
|
|
5855
|
+
*
|
|
5856
|
+
* const program = Effect.gen(function* () {
|
|
5857
|
+
* const roots = yield* WorkspaceRoot;
|
|
5858
|
+
* return yield* roots.find("/tmp/fixture/packages/a", { stopAt: "/tmp/fixture" });
|
|
5859
|
+
* });
|
|
5860
|
+
* ```
|
|
5861
|
+
*
|
|
5575
5862
|
* @public
|
|
5576
5863
|
*/
|
|
5577
5864
|
declare class WorkspaceRoot extends WorkspaceRoot_base {
|
|
5578
5865
|
/** Builds the service over core `FileSystem` and `Path`. */
|
|
5579
|
-
static readonly make: Effect.Effect<
|
|
5580
|
-
readonly find: (cwd: string) => Effect.Effect<string, WorkspaceRootNotFoundError>;
|
|
5581
|
-
}, never, FileSystem.FileSystem | Path.Path>;
|
|
5866
|
+
static readonly make: Effect.Effect<WorkspaceRootShape, never, FileSystem.FileSystem | Path.Path>;
|
|
5582
5867
|
/** The live layer. */
|
|
5583
5868
|
static readonly layer: Layer.Layer<WorkspaceRoot, never, FileSystem.FileSystem | Path.Path>;
|
|
5869
|
+
/**
|
|
5870
|
+
* A test double resolving every `find` to `root`, with no filesystem.
|
|
5871
|
+
*
|
|
5872
|
+
* @remarks
|
|
5873
|
+
* The nine-copies-of-a-four-line-mock case — a `Layer.succeed` over a `find`
|
|
5874
|
+
* that ignores its arguments and succeeds with a fixed root is what consumers
|
|
5875
|
+
* were writing by hand. The difference is that this double **honours
|
|
5876
|
+
* `stopAt`**: a hand-rolled `find` that ignores the ceiling makes a bounded
|
|
5877
|
+
* call pass under test and fail against the live service, which is the
|
|
5878
|
+
* failure mode the option exists to catch. A `root` above the ceiling fails
|
|
5879
|
+
* here exactly as it would live, with the same
|
|
5880
|
+
* {@link WorkspaceRootNotFoundError}.
|
|
5881
|
+
*
|
|
5882
|
+
* The ceiling is `path.resolve`d through the injected `Path` service before
|
|
5883
|
+
* the comparison, exactly as the live `make` path does — so a `stopAt`
|
|
5884
|
+
* carrying `..` segments bounds the double identically to the live service,
|
|
5885
|
+
* not by raw string. This is why `makeTest` yields an `Effect` requiring
|
|
5886
|
+
* `Path`: it captures the service once at construction, the same shape as
|
|
5887
|
+
* `make`. Consumers reach for {@link WorkspaceRoot.layerTest}, which provides
|
|
5888
|
+
* `Path.layer` internally, so the requirement never surfaces at their call
|
|
5889
|
+
* site.
|
|
5890
|
+
*
|
|
5891
|
+
* `maxDepth` is deliberately NOT modelled: the double does not walk, so it has
|
|
5892
|
+
* no depth to cap, and pretending otherwise would encode a fiction. A suite
|
|
5893
|
+
* exercising the depth guard wants the live service over a fixture tree.
|
|
5894
|
+
*
|
|
5895
|
+
* @param root - The root every unbounded `find` resolves to.
|
|
5896
|
+
*/
|
|
5897
|
+
static readonly makeTest: (root: string) => Effect.Effect<WorkspaceRootShape, never, Path.Path>;
|
|
5898
|
+
/**
|
|
5899
|
+
* The test layer: {@link WorkspaceRoot.makeTest} with `Path.layer` provided.
|
|
5900
|
+
*
|
|
5901
|
+
* @remarks
|
|
5902
|
+
* `makeTest` requires `Path` to normalize the `stopAt` ceiling; this layer
|
|
5903
|
+
* supplies core's `Path.layer` internally, so the requirement never reaches a
|
|
5904
|
+
* consumer — the published type stays `Layer.Layer<WorkspaceRoot>`.
|
|
5905
|
+
*
|
|
5906
|
+
* A parameterized layer factory mints a **fresh reference per call**, and
|
|
5907
|
+
* layers memoize by reference — bind the result to a `const` and reuse it
|
|
5908
|
+
* rather than calling `layerTest(...)` at each composition site.
|
|
5909
|
+
*
|
|
5910
|
+
* Pair it with `WorkspaceDiscovery.layerTest` to stand up the whole discovery
|
|
5911
|
+
* path without a filesystem; between them there is nothing left for a
|
|
5912
|
+
* module-level mock of `@effected/workspaces` to do, and a provided layer
|
|
5913
|
+
* keeps the service graph — and its typed errors — intact.
|
|
5914
|
+
*
|
|
5915
|
+
* @example
|
|
5916
|
+
* ```ts
|
|
5917
|
+
* import { WorkspaceDiscovery, WorkspaceRoot } from "@effected/workspaces";
|
|
5918
|
+
* import { Effect } from "effect";
|
|
5919
|
+
*
|
|
5920
|
+
* const TestRoot = WorkspaceRoot.layerTest("/repo");
|
|
5921
|
+
* const TestDiscovery = WorkspaceDiscovery.layerTest({
|
|
5922
|
+
* listPackages: () => Effect.succeed([]),
|
|
5923
|
+
* });
|
|
5924
|
+
* // program.pipe(Effect.provide(TestRoot), Effect.provide(TestDiscovery))
|
|
5925
|
+
* ```
|
|
5926
|
+
*/
|
|
5927
|
+
static readonly layerTest: (root: string) => Layer.Layer<WorkspaceRoot>;
|
|
5584
5928
|
}
|
|
5585
5929
|
//#endregion
|
|
5586
5930
|
//#region src/WorkspaceDiscovery.d.ts
|
|
@@ -5796,6 +6140,7 @@ declare class WorkspaceDiscovery extends WorkspaceDiscovery_base {
|
|
|
5796
6140
|
* path: "/repo/packages/utils",
|
|
5797
6141
|
* packageJsonPath: "/repo/packages/utils/package.json",
|
|
5798
6142
|
* relativePath: "packages/utils",
|
|
6143
|
+
* workspaceRoot: "/repo",
|
|
5799
6144
|
* }),
|
|
5800
6145
|
* ]),
|
|
5801
6146
|
* });
|
|
@@ -5906,9 +6251,13 @@ declare class ConfigDependencyHooks extends ConfigDependencyHooks_base {
|
|
|
5906
6251
|
* `hooks`-source `CatalogAssemblyError`, never a silent skip.
|
|
5907
6252
|
*
|
|
5908
6253
|
* @remarks
|
|
5909
|
-
*
|
|
5910
|
-
*
|
|
5911
|
-
*
|
|
6254
|
+
* Runtime-coupled by design, not node-exclusive. The `import()` below loads
|
|
6255
|
+
* **and executes** a config dependency's pnpmfile in-process — code execution,
|
|
6256
|
+
* not IO, so no `FileSystem` / `Path` service abstracts it. The `node:path` and
|
|
6257
|
+
* `node:url` imports (`join`, `pathToFileURL`) exist only to build the URL that
|
|
6258
|
+
* `import()` consumes; node and bun both implement those builtins and dynamic
|
|
6259
|
+
* import, so this layer runs on either runtime. Only ever wired by
|
|
6260
|
+
* `WorkspaceCatalogs.layerWithConfigDependencies`.
|
|
5912
6261
|
*/
|
|
5913
6262
|
static readonly layerLive: Layer.Layer<ConfigDependencyHooks>;
|
|
5914
6263
|
}
|
|
@@ -6669,7 +7018,7 @@ interface WorkspacesOptions {
|
|
|
6669
7018
|
readonly maxDepth?: number;
|
|
6670
7019
|
}
|
|
6671
7020
|
//#endregion
|
|
6672
|
-
//#region ../../node_modules/.pnpm/@effected+walker@0.
|
|
7021
|
+
//#region ../../node_modules/.pnpm/@effected+walker@0.3.1_@effected+glob@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/walker/index.d.ts
|
|
6673
7022
|
declare const DescendError_base: Schema.Class<DescendError, Schema.TaggedStruct<"DescendError", {
|
|
6674
7023
|
/** The glob pattern's source text. */
|
|
6675
7024
|
readonly pattern: Schema.String;
|
|
@@ -6690,6 +7039,39 @@ declare const DescendError_base: Schema.Class<DescendError, Schema.TaggedStruct<
|
|
|
6690
7039
|
declare class DescendError extends DescendError_base {
|
|
6691
7040
|
get message(): string;
|
|
6692
7041
|
}
|
|
7042
|
+
declare const GlobExpansionError_base: Schema.Class<GlobExpansionError, Schema.TaggedStruct<"GlobExpansionError", {
|
|
7043
|
+
/** The glob pattern's source text, as handed to {@link compileAndExpand}. */
|
|
7044
|
+
readonly pattern: Schema.String;
|
|
7045
|
+
/** The underlying typed failure, intact: a compile guard trip or a descent failure. */
|
|
7046
|
+
readonly cause: Schema.Union<readonly [typeof GlobPatternError, typeof DescendError]>;
|
|
7047
|
+
}>, import("effect/Cause").YieldableError>;
|
|
7048
|
+
/**
|
|
7049
|
+
* Typed failure raised by {@link compileAndExpand}: the single error the
|
|
7050
|
+
* compile+expand recipe fails with, so a caller catches one tag rather than
|
|
7051
|
+
* folding two error channels by hand.
|
|
7052
|
+
*
|
|
7053
|
+
* @remarks
|
|
7054
|
+
* One tag, two genuinely different causes — "your pattern is malformed" and
|
|
7055
|
+
* "that directory is unreadable" are different problems with different fixes,
|
|
7056
|
+
* so `cause` keeps the underlying typed error intact
|
|
7057
|
+
* rather than flattening it into a string. Discriminate on `cause._tag`
|
|
7058
|
+
* (`"GlobPatternError"` vs `"DescendError"`), or read
|
|
7059
|
+
* {@link GlobExpansionError.stage} when only the phase matters; either way the
|
|
7060
|
+
* original payload — a guard's `limit`/`actual`, a descent's `path` — is still
|
|
7061
|
+
* there. `cause` is also the native `Error` cause, so error chaining and
|
|
7062
|
+
* stack-printing work without extra wiring.
|
|
7063
|
+
*
|
|
7064
|
+
* @public
|
|
7065
|
+
*/
|
|
7066
|
+
declare class GlobExpansionError extends GlobExpansionError_base {
|
|
7067
|
+
/**
|
|
7068
|
+
* Which phase failed — `"compile"` when the pattern itself was rejected,
|
|
7069
|
+
* `"descend"` when the filesystem walk failed. A convenience over
|
|
7070
|
+
* `cause._tag` for callers that only need the phase.
|
|
7071
|
+
*/
|
|
7072
|
+
get stage(): "compile" | "descend";
|
|
7073
|
+
get message(): string;
|
|
7074
|
+
}
|
|
6693
7075
|
//#endregion
|
|
6694
7076
|
//#region ../silk-effects/dist/dev/pkg/index.d.ts
|
|
6695
7077
|
//#endregion
|
|
@@ -11560,7 +11942,7 @@ declare class VersionFiles {
|
|
|
11560
11942
|
* @param cwd - Project root directory
|
|
11561
11943
|
* @returns Effect of `[filePath, config]` tuples
|
|
11562
11944
|
*/
|
|
11563
|
-
static resolveGlobs(configs: readonly LegacyVersionFileConfig[], cwd: string): Effect.Effect<Array<[string, LegacyVersionFileConfig]>,
|
|
11945
|
+
static resolveGlobs(configs: readonly LegacyVersionFileConfig[], cwd: string): Effect.Effect<Array<[string, LegacyVersionFileConfig]>, GlobExpansionError, FileSystem.FileSystem>;
|
|
11564
11946
|
/**
|
|
11565
11947
|
* Detect indentation from file content.
|
|
11566
11948
|
*
|
|
@@ -11662,7 +12044,7 @@ declare class VersionFiles {
|
|
|
11662
12044
|
name: string;
|
|
11663
12045
|
version: string;
|
|
11664
12046
|
path: string;
|
|
11665
|
-
}>): Effect.Effect<VersionFileUpdate[],
|
|
12047
|
+
}>): Effect.Effect<VersionFileUpdate[], GlobExpansionError, FileSystem.FileSystem>;
|
|
11666
12048
|
/**
|
|
11667
12049
|
* Apply version-file updates from the resolved (post-`ConfigInspector`)
|
|
11668
12050
|
* representation. Each {@link ResolvedPackageScope} already names the
|