@savvy-web/silk 3.2.3 → 3.2.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.
@@ -173,37 +173,6 @@ const SilkChangesetConfigFile = Schema.Struct({
173
173
  ...ChangesetConfigFile.fields,
174
174
  _isSilk: Schema.Boolean.pipe(Schema.withDecodingDefaultType(Effect.succeed(true)), Schema.withConstructorDefault(Effect.succeed(true)))
175
175
  });
176
- /**
177
- * Versioning strategy classification for a workspace.
178
- *
179
- * @remarks
180
- * - `"single"` — one publishable package; a single version tag is used.
181
- * - `"fixed-group"` — all publishable packages are in the same changesets fixed group.
182
- * - `"independent"` — multiple publishable packages with independent version bumps.
183
- *
184
- * @since 0.1.0
185
- * @public
186
- */
187
- const VersioningStrategyType = Schema.Literals([
188
- "single",
189
- "fixed-group",
190
- "independent"
191
- ]);
192
- /**
193
- * Output of the versioning strategy detection, combining the strategy type with group metadata.
194
- *
195
- * @remarks
196
- * Produced by `VersioningStrategy.detect` and consumed by `TagStrategy.determine`
197
- * to decide on the appropriate git-tag format.
198
- *
199
- * @since 0.1.0
200
- * @public
201
- */
202
- const VersioningStrategyResult = Schema.Struct({
203
- type: VersioningStrategyType,
204
- fixedGroups: Schema.Array(Schema.Array(Schema.String)),
205
- publishablePackages: Schema.Array(Schema.String)
206
- });
207
176
 
208
177
  //#endregion
209
178
  //#region ../silk-effects/dist/dev/pkg/services/ChangesetConfigReader.js
@@ -2381,7 +2350,7 @@ var GlobSet = class GlobSet extends Schema.Class("GlobSet")(Schema.Struct({ patt
2381
2350
  };
2382
2351
 
2383
2352
  //#endregion
2384
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/BunExtension.js
2353
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/BunExtension.js
2385
2354
  /**
2386
2355
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2387
2356
  * when the format is `"bun"`.
@@ -2403,7 +2372,7 @@ var BunExtension = class extends Schema.Class("BunExtension")({
2403
2372
  }) {};
2404
2373
 
2405
2374
  //#endregion
2406
- //#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogResolver.js
2375
+ //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogResolver.js
2407
2376
  /**
2408
2377
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2409
2378
  * version ranges.
@@ -2450,7 +2419,7 @@ var CatalogResolver = class CatalogResolver extends Context.Service()("@effected
2450
2419
  };
2451
2420
 
2452
2421
  //#endregion
2453
- //#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/WorkspaceResolver.js
2422
+ //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/WorkspaceResolver.js
2454
2423
  /**
2455
2424
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2456
2425
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2512,7 +2481,7 @@ var WorkspaceResolver = class WorkspaceResolver extends Context.Service()("@effe
2512
2481
  };
2513
2482
 
2514
2483
  //#endregion
2515
- //#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogAssemblyError.js
2484
+ //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogAssemblyError.js
2516
2485
  /**
2517
2486
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2518
2487
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2557,7 +2526,7 @@ var CatalogAssemblyError = class extends Schema.TaggedErrorClass()("CatalogAssem
2557
2526
  };
2558
2527
 
2559
2528
  //#endregion
2560
- //#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySection.js
2529
+ //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySection.js
2561
2530
  /**
2562
2531
  * The short dependency kind: which dependency map an entry came from, named the
2563
2532
  * way consumers branch on it.
@@ -4067,7 +4036,7 @@ const isComparatorSetSubset = (sub, sup) => {
4067
4036
  };
4068
4037
 
4069
4038
  //#endregion
4070
- //#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySpecifier.js
4039
+ //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySpecifier.js
4071
4040
  /**
4072
4041
  * Indicates that a string could not be parsed as a valid dependency specifier.
4073
4042
  *
@@ -4275,7 +4244,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4275
4244
  });
4276
4245
 
4277
4246
  //#endregion
4278
- //#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/IntegrityHash.js
4247
+ //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/IntegrityHash.js
4279
4248
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4280
4249
  const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4281
4250
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4329,7 +4298,180 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4329
4298
  });
4330
4299
 
4331
4300
  //#endregion
4332
- //#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/ReleaseAgeGate.js
4301
+ //#region ../../node_modules/.pnpm/@effected+commands@0.1.0_effect@4.0.0-beta.101/node_modules/@effected/commands/LocalExec.js
4302
+ /**
4303
+ * The package managers whose project-local exec argv this package knows.
4304
+ *
4305
+ * @remarks
4306
+ * Structurally identical to `@effected/workspaces`' `PackageManagerName` and
4307
+ * assigns freely to and from it — deliberately **not** an import, because this
4308
+ * package takes no `@effected` edges. The names are a four-value literal; the
4309
+ * *detection* of which one owns a directory is what
4310
+ * `@effected/workspaces` contributes, through {@link LocalExec}.
4311
+ *
4312
+ * @public
4313
+ */
4314
+ const Launcher = Schema.Literals([
4315
+ "npm",
4316
+ "pnpm",
4317
+ "yarn",
4318
+ "bun"
4319
+ ]);
4320
+ /** The argv prefixes for each launcher. The one place this knowledge lives. */
4321
+ const PREFIXES = {
4322
+ npm: {
4323
+ prefix: [
4324
+ "npx",
4325
+ "--no",
4326
+ "--"
4327
+ ],
4328
+ dlxPrefix: ["npx"]
4329
+ },
4330
+ pnpm: {
4331
+ prefix: ["pnpm", "exec"],
4332
+ dlxPrefix: ["pnpm", "dlx"]
4333
+ },
4334
+ yarn: {
4335
+ prefix: ["yarn", "exec"],
4336
+ dlxPrefix: ["yarn", "dlx"]
4337
+ },
4338
+ bun: {
4339
+ prefix: [
4340
+ "bun",
4341
+ "x",
4342
+ "--no-install"
4343
+ ],
4344
+ dlxPrefix: ["bun", "x"]
4345
+ }
4346
+ };
4347
+ /**
4348
+ * How to run a project-local binary here.
4349
+ *
4350
+ * @remarks
4351
+ * This is the whole of what tool discovery needs from a workspace: an argv
4352
+ * prefix and a directory to run it in. It deliberately carries no workspace
4353
+ * root, no manifest and no package-manager semantics — `label` is for
4354
+ * reporting only, and nothing in this package branches on it.
4355
+ *
4356
+ * @public
4357
+ */
4358
+ var ExecContext = class extends Schema.Class("ExecContext")({
4359
+ /** Human label of the launcher, e.g. `"pnpm"`. Reporting only. */
4360
+ label: Schema.String,
4361
+ /** argv prefix that runs a project-local binary, e.g. `["pnpm", "exec"]`. */
4362
+ prefix: Schema.Array(Schema.String),
4363
+ /** argv prefix that fetch-and-runs a package binary, e.g. `["pnpm", "dlx"]`. */
4364
+ dlxPrefix: Schema.Array(Schema.String),
4365
+ /** Directory the prefix must run in. Omitted means "wherever the caller is". */
4366
+ directory: Schema.optionalKey(Schema.String)
4367
+ }) {
4368
+ /** Prefixes `command` with `prefix` and applies `directory`, returning a core `Command`. */
4369
+ apply(command) {
4370
+ return this.withPrefix(command, this.prefix);
4371
+ }
4372
+ /** As {@link ExecContext.apply}, using `dlxPrefix` — the fetch-and-run launcher. */
4373
+ applyDlx(command) {
4374
+ return this.withPrefix(command, this.dlxPrefix);
4375
+ }
4376
+ /**
4377
+ * Core's `prefix` and `setCwd` both return NEW commands, so the caller's
4378
+ * value is never mutated.
4379
+ */
4380
+ withPrefix(command, prefix) {
4381
+ const [head, ...rest] = prefix;
4382
+ const prefixed = head === void 0 ? command : ChildProcess.prefix(command, head, rest);
4383
+ return this.directory === void 0 ? prefixed : ChildProcess.setCwd(prefixed, this.directory);
4384
+ }
4385
+ };
4386
+ /**
4387
+ * The project-local execution context could not be determined.
4388
+ *
4389
+ * @remarks
4390
+ * A *mechanism* failure — an unreadable manifest, a detection error. "There is
4391
+ * no project-local way to run tools here" is `Option.none()`, never this error:
4392
+ * the same `None`-is-success convention `@effected/npm`'s resolver contracts
4393
+ * use, so an implementation never has to decide whether absence is exceptional.
4394
+ *
4395
+ * @public
4396
+ */
4397
+ var LocalExecError = class extends Schema.TaggedErrorClass()("LocalExecError", {
4398
+ /** The directory whose context could not be determined, when one is known. */
4399
+ directory: Schema.optionalKey(Schema.String),
4400
+ /** The underlying failure. */
4401
+ cause: Schema.optionalKey(Schema.Defect())
4402
+ }) {
4403
+ get message() {
4404
+ return this.directory === void 0 ? "Could not determine the project-local execution context" : `Could not determine the project-local execution context for ${this.directory}`;
4405
+ }
4406
+ };
4407
+ /**
4408
+ * Contract: how to run a project-local binary in this project.
4409
+ *
4410
+ * @remarks
4411
+ * **This is an inverted contract.** Tool discovery needs package-manager
4412
+ * detection and workspace-root resolution, both of which live in the
4413
+ * integrated-tier `@effected/workspaces`. Depending on it directly would make
4414
+ * this package integrated too — and, through the planned `@effected/npm` edge,
4415
+ * would drag `npm`, `lockfiles` and `package-json` up a tier with it. So this
4416
+ * package declares the narrow contract and `@effected/workspaces` ships the
4417
+ * layer that implements it, exactly as `@effected/npm` owns `CatalogResolver`
4418
+ * and workspaces implements that.
4419
+ *
4420
+ * A consumer with no monorepo never needs that implementation:
4421
+ * {@link LocalExec.layerNone} (global-only) and {@link LocalExec.layerFor}
4422
+ * (a known package manager) are one-liners.
4423
+ *
4424
+ * @public
4425
+ */
4426
+ var LocalExec = class LocalExec extends Context.Service()("@effected/commands/LocalExec") {
4427
+ /** The exec and dlx argv prefixes for a launcher — the single home of that knowledge. */
4428
+ static prefixes = (launcher) => PREFIXES[launcher];
4429
+ /**
4430
+ * No project-local execution context: every tool resolves globally.
4431
+ *
4432
+ * @remarks
4433
+ * The right wiring for a GitHub Action or any single-package checkout, and
4434
+ * the reason such a consumer never installs `@effected/workspaces`.
4435
+ */
4436
+ static layerNone = Layer.succeed(this, { context: Effect.succeed(Option.none()) });
4437
+ /** A context for a known package manager, from the static prefix table. */
4438
+ static layerFor = (launcher, options) => {
4439
+ const { prefix, dlxPrefix } = PREFIXES[launcher];
4440
+ return LocalExec.layerContext(ExecContext.make({
4441
+ label: launcher,
4442
+ prefix,
4443
+ dlxPrefix,
4444
+ ...options?.directory === void 0 ? {} : { directory: options.directory }
4445
+ }));
4446
+ };
4447
+ /** A caller-supplied context, answered verbatim. */
4448
+ static layerContext = (context) => Layer.succeed(LocalExec, { context: Effect.succeed(Option.some(context)) });
4449
+ /**
4450
+ * An in-memory test double.
4451
+ *
4452
+ * @remarks
4453
+ * Unlike most `makeTest` doubles in the kit, the unstubbed default here is
4454
+ * **honest rather than loud**: `Option.none()` is a real, correct answer
4455
+ * ("no project-local context"), so a test that does not care about local
4456
+ * resolution gets the global-only behavior instead of a defect.
4457
+ */
4458
+ static makeTest = (overrides = {}) => ({
4459
+ context: Effect.succeed(Option.none()),
4460
+ ...overrides
4461
+ });
4462
+ /**
4463
+ * {@link LocalExec.makeTest} behind `Layer.succeed`.
4464
+ *
4465
+ * @remarks
4466
+ * A parameterized layer factory mints a fresh reference per call and layers
4467
+ * memoize by reference — bind the result to a `const` rather than calling it
4468
+ * at each composition site.
4469
+ */
4470
+ static layerTest = (overrides = {}) => Layer.succeed(LocalExec, LocalExec.makeTest(overrides));
4471
+ };
4472
+
4473
+ //#endregion
4474
+ //#region ../../node_modules/.pnpm/@effected+npm@0.5.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/ReleaseAgeGate.js
4333
4475
  const MS_PER_MINUTE = 6e4;
4334
4476
  /**
4335
4477
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -4500,7 +4642,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends Schema.Class("ReleaseAgeGate")
4500
4642
  };
4501
4643
 
4502
4644
  //#endregion
4503
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/ImporterDependency.js
4645
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/ImporterDependency.js
4504
4646
  /**
4505
4647
  * One declared dependency of one workspace importer, as the lockfile records it.
4506
4648
  *
@@ -4539,7 +4681,7 @@ var ImporterDependency = class extends Schema.Class("ImporterDependency")({
4539
4681
  }) {};
4540
4682
 
4541
4683
  //#endregion
4542
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/LockfileImporter.js
4684
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/LockfileImporter.js
4543
4685
  /**
4544
4686
  * One workspace importer's declared dependencies, as the lockfile records them.
4545
4687
  *
@@ -4564,7 +4706,7 @@ var LockfileImporter = class extends Schema.Class("LockfileImporter")({
4564
4706
  }) {};
4565
4707
 
4566
4708
  //#endregion
4567
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/ResolvedPackage.js
4709
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/ResolvedPackage.js
4568
4710
  const EMPTY_DEPENDENCIES = {};
4569
4711
  /**
4570
4712
  * A package resolved from a lockfile.
@@ -4600,7 +4742,7 @@ var ResolvedPackage = class extends Schema.Class("ResolvedPackage")({
4600
4742
  }) {};
4601
4743
 
4602
4744
  //#endregion
4603
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/WorkspaceDependency.js
4745
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/WorkspaceDependency.js
4604
4746
  /**
4605
4747
  * A directed dependency edge between two workspace packages as recorded in
4606
4748
  * the lockfile.
@@ -4623,7 +4765,7 @@ var WorkspaceDependency = class extends Schema.Class("WorkspaceDependency")({
4623
4765
  }) {};
4624
4766
 
4625
4767
  //#endregion
4626
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/PnpmExtension.js
4768
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/PnpmExtension.js
4627
4769
  /**
4628
4770
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4629
4771
  * when the format is `"pnpm"`.
@@ -4649,7 +4791,7 @@ var PnpmExtension = class extends Schema.Class("PnpmExtension")({
4649
4791
  }) {};
4650
4792
 
4651
4793
  //#endregion
4652
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/LockfileFormat.js
4794
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/LockfileFormat.js
4653
4795
  /**
4654
4796
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4655
4797
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4684,7 +4826,7 @@ const FILENAMES = {
4684
4826
  const filenameFor = (format) => FILENAMES[format];
4685
4827
 
4686
4828
  //#endregion
4687
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/shared.js
4829
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/shared.js
4688
4830
  /**
4689
4831
  * The four dependency sections of a manifest, in a stable order — the shared
4690
4832
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -6658,7 +6800,7 @@ var JsoncModifier = class {
6658
6800
  };
6659
6801
 
6660
6802
  //#endregion
6661
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/bun.js
6803
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/bun.js
6662
6804
  const DepRecord$2 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
6663
6805
  const BunWorkspaceEntry = Schema.Struct({
6664
6806
  name: Schema.optionalKey(Schema.String),
@@ -6752,7 +6894,7 @@ const toFields$3 = (raw) => Effect.gen(function* () {
6752
6894
  });
6753
6895
 
6754
6896
  //#endregion
6755
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/npm.js
6897
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/npm.js
6756
6898
  const DepRecord$1 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
6757
6899
  const NpmPackageEntry = Schema.Struct({
6758
6900
  name: Schema.optionalKey(Schema.String),
@@ -13763,7 +13905,7 @@ function deepEqualValues(a, b) {
13763
13905
  }
13764
13906
 
13765
13907
  //#endregion
13766
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/documents.js
13908
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/documents.js
13767
13909
  /**
13768
13910
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
13769
13911
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -13834,7 +13976,7 @@ const selectSoleDocument = (content) => Effect.gen(function* () {
13834
13976
  });
13835
13977
 
13836
13978
  //#endregion
13837
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/pnpm.js
13979
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/pnpm.js
13838
13980
  const PnpmImporterDeps = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({
13839
13981
  specifier: Schema.String,
13840
13982
  version: Schema.String
@@ -13960,7 +14102,7 @@ const toFields$1 = (raw) => Effect.gen(function* () {
13960
14102
  });
13961
14103
 
13962
14104
  //#endregion
13963
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/yarn.js
14105
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/internal/yarn.js
13964
14106
  const YarnLockfileRaw = Schema.Record(Schema.String, Schema.Unknown);
13965
14107
  const DepRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
13966
14108
  const YarnEntry = Schema.Struct({
@@ -14084,7 +14226,7 @@ const cleanYarnDeps = (deps) => {
14084
14226
  };
14085
14227
 
14086
14228
  //#endregion
14087
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/Lockfile.js
14229
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/Lockfile.js
14088
14230
  const EMPTY_IMPORTERS = [];
14089
14231
  /**
14090
14232
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -14329,7 +14471,7 @@ var Lockfile = class Lockfile extends Schema.Class("Lockfile")({
14329
14471
  };
14330
14472
 
14331
14473
  //#endregion
14332
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/LockfileIntegrity.js
14474
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._44d8f67a8ab767df898f59f0e01343be/node_modules/@effected/lockfiles/LockfileIntegrity.js
14333
14475
  /**
14334
14476
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
14335
14477
  * lockfile against: a package name plus the four optional dependency maps.
@@ -14446,7 +14588,7 @@ var LockfileIntegrity = class LockfileIntegrity extends Schema.Class("LockfileIn
14446
14588
  };
14447
14589
 
14448
14590
  //#endregion
14449
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14591
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14450
14592
  /**
14451
14593
  * A resolved dependency entry pairing a package name with its version
14452
14594
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -14511,7 +14653,7 @@ var Dependency = class extends Schema.Class("Dependency")({
14511
14653
  };
14512
14654
 
14513
14655
  //#endregion
14514
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14656
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14515
14657
  /**
14516
14658
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
14517
14659
  *
@@ -16109,7 +16251,7 @@ const SpdxExpression = {
16109
16251
  };
16110
16252
 
16111
16253
  //#endregion
16112
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16254
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16113
16255
  /**
16114
16256
  * Indicates that a string is not a valid SPDX license identifier or expression.
16115
16257
  *
@@ -16145,7 +16287,7 @@ const isValidSpdx = (value) => {
16145
16287
  const SpdxLicense = Schema.String.pipe(Schema.check(Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), Schema.brand("SpdxLicense"));
16146
16288
 
16147
16289
  //#endregion
16148
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16290
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16149
16291
  const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
16150
16292
  /**
16151
16293
  * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
@@ -16204,7 +16346,7 @@ var PackageManager = class PackageManager extends Schema.Class("PackageManager")
16204
16346
  };
16205
16347
 
16206
16348
  //#endregion
16207
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16349
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16208
16350
  /**
16209
16351
  * Indicates that a string could not be used as a valid npm package name.
16210
16352
  *
@@ -16263,7 +16405,7 @@ const PackageName = Object.assign(Schema.Union([ScopedPackageName, UnscopedPacka
16263
16405
  });
16264
16406
 
16265
16407
  //#endregion
16266
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16408
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16267
16409
  const parsePersonString = (input) => {
16268
16410
  const emailMatch = input.match(/<([^>]+)>/);
16269
16411
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -16294,10 +16436,11 @@ const KNOWN_KEYS = /* @__PURE__ */ new Set([
16294
16436
  "url"
16295
16437
  ]);
16296
16438
  const sameRest = (a, b) => JSON.stringify(a ?? {}) === JSON.stringify(b ?? {});
16439
+ const isShorthandExpressible = (person) => person.rest === void 0 || Object.keys(person.rest).length === 0;
16297
16440
  const isFaithful = (wire, person) => {
16298
16441
  if (typeof wire === "string") {
16299
16442
  const parsed = parsePersonString(wire);
16300
- return parsed.name === person.name && parsed.email === person.email && parsed.url === person.url;
16443
+ return parsed.name === person.name && parsed.email === person.email && parsed.url === person.url && isShorthandExpressible(person);
16301
16444
  }
16302
16445
  const rest = restOf(wire);
16303
16446
  return wire.name === person.name && wire.email === person.email && wire.url === person.url && sameRest(rest, person.rest);
@@ -16386,7 +16529,9 @@ var Person = class Person extends Schema.Class("Person")({
16386
16529
  decode: (input) => typeof input === "string" ? rememberWire(parsePersonString(input), input) : input,
16387
16530
  encode: (person) => {
16388
16531
  const wire = wireForms.get(person);
16389
- return typeof wire === "string" && isFaithful(wire, person) ? wire : person;
16532
+ if (typeof wire !== "string") return person;
16533
+ if (isFaithful(wire, person)) return wire;
16534
+ return isShorthandExpressible(person) ? serializePerson(person) : person;
16390
16535
  }
16391
16536
  })));
16392
16537
  /**
@@ -16407,7 +16552,183 @@ var Person = class Person extends Schema.Class("Person")({
16407
16552
  };
16408
16553
 
16409
16554
  //#endregion
16410
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16555
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Repository.js
16556
+ /** The shorthand hosts npm resolves without a scheme. */
16557
+ const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
16558
+ ["github", "https://github.com"],
16559
+ ["gitlab", "https://gitlab.com"],
16560
+ ["bitbucket", "https://bitbucket.org"]
16561
+ ]);
16562
+ /** `owner/name`, the bare GitHub shorthand. Deliberately strict about segment shape. */
16563
+ const BARE_SHORTHAND = /^[\w.-]+\/[\w.-]+$/;
16564
+ /** `github:owner/name`, `gist:id`, … */
16565
+ const PREFIXED_SHORTHAND = /^([a-z]+):(.+)$/;
16566
+ /** The scp-like form git accepts: `git@host:owner/name.git`. */
16567
+ const SCP_LIKE = /^(?:([\w.-]+)@)?([\w.-]+):(.+)$/;
16568
+ const stripGitSuffix = (value) => value.endsWith(".git") ? value.slice(0, -4) : value;
16569
+ /**
16570
+ * The browsable `https://host/path` form of a repository reference, or none
16571
+ * when the value is not one this model recognizes.
16572
+ *
16573
+ * Total by construction: `repository` is caller data, and a value we cannot
16574
+ * interpret is a missing answer rather than a failure.
16575
+ */
16576
+ const browseUrlOf = (raw) => {
16577
+ const url = raw.trim();
16578
+ if (url === "") return Option.none();
16579
+ if (BARE_SHORTHAND.test(url)) return Option.some(`https://github.com/${url}`);
16580
+ const prefixed = PREFIXED_SHORTHAND.exec(url);
16581
+ if (prefixed !== null) {
16582
+ const [, scheme, rest] = prefixed;
16583
+ if (scheme === "gist") return Option.some(`https://gist.github.com/${stripGitSuffix(rest ?? "")}`);
16584
+ const host = SHORTHAND_HOSTS.get(scheme ?? "");
16585
+ if (host !== void 0) return Option.some(`${host}/${stripGitSuffix(rest ?? "")}`);
16586
+ }
16587
+ const withoutGitPlus = url.startsWith("git+") ? url.slice(4) : url;
16588
+ const schemeMatch = /^([a-z][a-z0-9+.-]*):\/\/(.*)$/i.exec(withoutGitPlus);
16589
+ if (schemeMatch !== null) {
16590
+ const withoutCredentials = (schemeMatch[2] ?? "").replace(/^[^/@]+@/, "");
16591
+ return withoutCredentials === "" ? Option.none() : Option.some(`https://${stripGitSuffix(withoutCredentials)}`);
16592
+ }
16593
+ const scp = SCP_LIKE.exec(withoutGitPlus);
16594
+ if (scp !== null) {
16595
+ const [, , host, path] = scp;
16596
+ if (host !== void 0 && path !== void 0 && path !== "") return Option.some(`https://${host}/${stripGitSuffix(path)}`);
16597
+ }
16598
+ return Option.none();
16599
+ };
16600
+ const repositoryWires = /* @__PURE__ */ new WeakMap();
16601
+ const bugsWires = /* @__PURE__ */ new WeakMap();
16602
+ const KNOWN_REPOSITORY_KEYS = /* @__PURE__ */ new Set([
16603
+ "type",
16604
+ "url",
16605
+ "directory"
16606
+ ]);
16607
+ const KNOWN_BUGS_KEYS = /* @__PURE__ */ new Set(["url", "email"]);
16608
+ /**
16609
+ * Where a package's source lives.
16610
+ *
16611
+ * @remarks
16612
+ * `url` is **verbatim** — exactly the string the manifest carried, shorthand
16613
+ * and all. Normalization is offered through {@link Repository.browseUrl} and
16614
+ * {@link Repository.gitUrl}, so reading a manifest never rewrites it and a
16615
+ * caller that wants the original still has it.
16616
+ *
16617
+ * @example
16618
+ * ```ts
16619
+ * // "effected/kit" → https://github.com/effected/kit
16620
+ * // "git@github.com:effected/kit.git" → https://github.com/effected/kit
16621
+ * ```
16622
+ *
16623
+ * @public
16624
+ */
16625
+ var Repository = class Repository extends Schema.Class("Repository")({
16626
+ /** The `type` field, when the object form carried one (`"git"`, …). */
16627
+ type: Schema.optionalKey(Schema.String),
16628
+ /** The reference exactly as written: a shorthand, a git URL, or an https URL. */
16629
+ url: Schema.String,
16630
+ /** The subdirectory within the repository, for a monorepo member. */
16631
+ directory: Schema.optionalKey(Schema.String),
16632
+ /** Keys outside the documented set, preserved so encoding does not drop them. */
16633
+ rest: Schema.optionalKey(Schema.Record(Schema.String, Schema.Unknown))
16634
+ }) {
16635
+ /**
16636
+ * The browsable `https://` URL, or `Option.none()` when `url` is not a form
16637
+ * this model recognizes.
16638
+ */
16639
+ get browseUrl() {
16640
+ return browseUrlOf(this.url);
16641
+ }
16642
+ /** The canonical https clone URL, or none when it cannot be derived. */
16643
+ get gitUrl() {
16644
+ return Option.map(this.browseUrl, (url) => `${url}.git`);
16645
+ }
16646
+ /**
16647
+ * The `repository` field: the shorthand string or the object form, always
16648
+ * decoded to a {@link Repository}, and always re-encoded in the form it was
16649
+ * read from.
16650
+ */
16651
+ static FromValue = Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.String]).pipe(Schema.decodeTo(Schema.instanceOf(Repository), SchemaTransformation.transform({
16652
+ decode: (input) => {
16653
+ if (typeof input === "string") {
16654
+ const repository = Repository.make({ url: input });
16655
+ repositoryWires.set(repository, input);
16656
+ return repository;
16657
+ }
16658
+ const rest = {};
16659
+ for (const [key, value] of Object.entries(input)) if (!KNOWN_REPOSITORY_KEYS.has(key)) rest[key] = value;
16660
+ const repository = Repository.make({
16661
+ url: typeof input.url === "string" ? input.url : "",
16662
+ ...typeof input.type === "string" && { type: input.type },
16663
+ ...typeof input.directory === "string" && { directory: input.directory },
16664
+ ...Object.keys(rest).length > 0 && { rest }
16665
+ });
16666
+ repositoryWires.set(repository, input);
16667
+ return repository;
16668
+ },
16669
+ encode: (repository) => {
16670
+ const wire = repositoryWires.get(repository);
16671
+ if (typeof wire === "string" && wire === repository.url) return wire;
16672
+ if (wire !== void 0 && typeof wire !== "string") return wire;
16673
+ return {
16674
+ ...repository.type !== void 0 && { type: repository.type },
16675
+ url: repository.url,
16676
+ ...repository.directory !== void 0 && { directory: repository.directory },
16677
+ ...repository.rest
16678
+ };
16679
+ }
16680
+ })));
16681
+ };
16682
+ /**
16683
+ * Where to report problems with a package.
16684
+ *
16685
+ * @remarks
16686
+ * npm permits a bare URL string, or an object with `url`, `email`, or both —
16687
+ * an email-only entry is legal, which is why `url` is optional.
16688
+ *
16689
+ * @public
16690
+ */
16691
+ var Bugs = class Bugs extends Schema.Class("Bugs")({
16692
+ /** The issue-tracker URL. */
16693
+ url: Schema.optionalKey(Schema.String),
16694
+ /** The address to mail instead of, or alongside, filing an issue. */
16695
+ email: Schema.optionalKey(Schema.String),
16696
+ /** Keys outside the documented set, preserved so encoding does not drop them. */
16697
+ rest: Schema.optionalKey(Schema.Record(Schema.String, Schema.Unknown))
16698
+ }) {
16699
+ /** The `bugs` field: a URL string or the object form. */
16700
+ static FromValue = Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.String]).pipe(Schema.decodeTo(Schema.instanceOf(Bugs), SchemaTransformation.transform({
16701
+ decode: (input) => {
16702
+ if (typeof input === "string") {
16703
+ const bugs = Bugs.make({ url: input });
16704
+ bugsWires.set(bugs, input);
16705
+ return bugs;
16706
+ }
16707
+ const rest = {};
16708
+ for (const [key, value] of Object.entries(input)) if (!KNOWN_BUGS_KEYS.has(key)) rest[key] = value;
16709
+ const bugs = Bugs.make({
16710
+ ...typeof input.url === "string" && { url: input.url },
16711
+ ...typeof input.email === "string" && { email: input.email },
16712
+ ...Object.keys(rest).length > 0 && { rest }
16713
+ });
16714
+ bugsWires.set(bugs, input);
16715
+ return bugs;
16716
+ },
16717
+ encode: (bugs) => {
16718
+ const wire = bugsWires.get(bugs);
16719
+ if (typeof wire === "string" && wire === bugs.url && bugs.email === void 0) return wire;
16720
+ if (wire !== void 0 && typeof wire !== "string") return wire;
16721
+ return {
16722
+ ...bugs.url !== void 0 && { url: bugs.url },
16723
+ ...bugs.email !== void 0 && { email: bugs.email },
16724
+ ...bugs.rest
16725
+ };
16726
+ }
16727
+ })));
16728
+ };
16729
+
16730
+ //#endregion
16731
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16411
16732
  const KEY_INDEX = new Map([
16412
16733
  "$schema",
16413
16734
  "name",
@@ -16631,7 +16952,7 @@ const renderJson = (raw, options) => {
16631
16952
  };
16632
16953
 
16633
16954
  //#endregion
16634
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16955
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16635
16956
  const toHashMap = SchemaTransformation.transform({
16636
16957
  decode: (record) => HashMap.fromIterable(Object.entries(record)),
16637
16958
  encode: (map) => Object.fromEntries(HashMap.toEntries(map))
@@ -16682,9 +17003,12 @@ const PublishConfigField = Schema.Record(Schema.String, Schema.Unknown);
16682
17003
  */
16683
17004
  const PeerDependenciesMetaField = Schema.Record(Schema.String, Schema.Struct({ optional: Schema.optionalKey(Schema.Boolean) }));
16684
17005
  /**
16685
- * The `repository` field: a shorthand string or an object (with `type` / `url` /
16686
- * `directory` and any extensions preserved). Not meant to be referenced
16687
- * directly.
17006
+ * The `repository` field's raw wire shape: a shorthand string or an object.
17007
+ *
17008
+ * @deprecated Superseded by {@link Repository.FromValue}, which decodes both
17009
+ * encodings into a typed {@link Repository} with normalization getters and
17010
+ * round-trips the original form. Kept as a named type for consumers that were
17011
+ * matching on the raw union; it is no longer what `Package.repository` uses.
16688
17012
  *
16689
17013
  * @public
16690
17014
  */
@@ -16763,7 +17087,11 @@ var Package = class Package extends Schema.Class("Package")({
16763
17087
  license: Schema.optionalKey(SpdxLicense),
16764
17088
  author: Schema.optionalKey(Person.FromValue),
16765
17089
  contributors: Schema.optionalKey(Schema.Array(Person.FromValue)),
16766
- repository: Schema.optionalKey(RepositoryField),
17090
+ maintainers: Schema.optionalKey(Schema.Array(Person.FromValue)),
17091
+ keywords: Schema.optionalKey(Schema.Array(Schema.String)),
17092
+ repository: Schema.optionalKey(Repository.FromValue),
17093
+ bugs: Schema.optionalKey(Bugs.FromValue),
17094
+ homepage: Schema.optionalKey(Schema.String),
16767
17095
  dependencies: DependencyMapField,
16768
17096
  devDependencies: DependencyMapField,
16769
17097
  peerDependencies: DependencyMapField,
@@ -16950,7 +17278,7 @@ var Package = class Package extends Schema.Class("Package")({
16950
17278
  };
16951
17279
 
16952
17280
  //#endregion
16953
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspacePackage.js
17281
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspacePackage.js
16954
17282
  const EMPTY$1 = Object.freeze(Object.create(null));
16955
17283
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
16956
17284
  /**
@@ -17230,7 +17558,7 @@ var WorkspacePackage = class WorkspacePackage extends Schema.Class("WorkspacePac
17230
17558
  };
17231
17559
 
17232
17560
  //#endregion
17233
- //#region ../../node_modules/.pnpm/@effected+walker@0.3.2_@effected+glob@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/walker/Descend.js
17561
+ //#region ../../node_modules/.pnpm/@effected+walker@0.3.3_@effected+glob@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/walker/Descend.js
17234
17562
  /**
17235
17563
  * Typed failure raised by {@link descend}: a directory mid-walk was unreadable
17236
17564
  * (under `onUnreadable: "fail"`), or the walk descended past `maxDepth`. Depth
@@ -17366,7 +17694,7 @@ const descend = Effect.fn("Walker.descend")(function* (pattern, options) {
17366
17694
  });
17367
17695
 
17368
17696
  //#endregion
17369
- //#region ../../node_modules/.pnpm/@effected+walker@0.3.2_@effected+glob@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/walker/Expand.js
17697
+ //#region ../../node_modules/.pnpm/@effected+walker@0.3.3_@effected+glob@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/walker/Expand.js
17370
17698
  /**
17371
17699
  * Typed failure raised by {@link compileAndExpand}: the single error the
17372
17700
  * compile+expand recipe fails with, so a caller catches one tag rather than
@@ -17457,31 +17785,7 @@ const compileAndExpand = Effect.fn("Walker.compileAndExpand")(function* (pattern
17457
17785
  });
17458
17786
 
17459
17787
  //#endregion
17460
- //#region ../../node_modules/.pnpm/@effected+walker@0.3.2_@effected+glob@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/walker/Walker.js
17461
- /**
17462
- * Ascend from `start` toward the filesystem root, yielding each directory,
17463
- * nearest first.
17464
- *
17465
- * @remarks
17466
- * Lexical, not physical: `Path.dirname` does not resolve symlinks, so ascending
17467
- * out of a symlinked directory follows the path you were given rather than the
17468
- * real filesystem parent. That is deliberate — config discovery wants the file
17469
- * nearest the path the user named.
17470
- *
17471
- * Bounded twice over: `dirname` is a fixpoint at the root, and `maxDepth` guards
17472
- * a pathological `Path` implementation that never reaches one.
17473
- *
17474
- * `stopAt` is compared in normalized form — see {@link AscendOptions.stopAt}.
17475
- * Raw string equality made the ceiling fail OPEN: an unnormalized ceiling
17476
- * matched nothing and the ascent ran silently to the filesystem root, which is
17477
- * the unbounded walk the option exists to prevent, with no error to notice it
17478
- * by. A relative ceiling **dies** for the same reason — resolving one against
17479
- * `process.cwd()` would reintroduce the silent-wrong-walk failure through a
17480
- * different door. See {@link AscendOptions.stopAt} for why that is a defect
17481
- * rather than a typed error; the error channel stays `never`.
17482
- *
17483
- * @public
17484
- */
17788
+ //#region ../../node_modules/.pnpm/@effected+walker@0.3.3_@effected+glob@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/walker/Walker.js
17485
17789
  const ascend = (start, options) => Effect.gen(function* () {
17486
17790
  const path = yield* Path.Path;
17487
17791
  const maxDepth = options?.maxDepth ?? 256;
@@ -17499,67 +17803,84 @@ const ascend = (start, options) => Effect.gen(function* () {
17499
17803
  }
17500
17804
  return dirs;
17501
17805
  });
17502
- /**
17503
- * The first candidate whose `predicate` reports true, or `Option.none()`.
17504
- *
17505
- * @remarks
17506
- * Each predicate is absorbed **individually**: a failure on one candidate is
17507
- * treated as "this candidate did not match" and the scan continues. One
17508
- * unreadable ancestor must never abort the walk, or a permission error deep in
17509
- * the tree would hide a valid root above it. Not-found and cannot-look are
17510
- * therefore indistinguishable to the caller; discovery is best-effort.
17511
- *
17512
- * `Effect.catch` catches failures, **not defects**. A predicate that throws is
17513
- * programmer error and surfaces as a defect. Do not change this to
17514
- * `Effect.catchCause` — the distinction is load-bearing.
17515
- *
17516
- * @public
17517
- */
17518
17806
  const firstMatch = (candidates, predicate) => Effect.gen(function* () {
17519
17807
  for (const candidate of candidates) if (yield* Effect.catch(predicate(candidate), () => Effect.succeed(false))) return Option.some(candidate);
17520
17808
  return Option.none();
17521
17809
  });
17522
- /**
17523
- * The first existing path among the candidates `candidatesFor` produces for each
17524
- * directory in `dirs`, scanned in order. Nearer directories win.
17525
- *
17526
- * @remarks
17527
- * Candidates materialize up front, bounded by `dirs.length × candidatesFor`'s
17528
- * output — a few hundred strings under the default `maxDepth`.
17529
- *
17530
- * @public
17531
- */
17532
17810
  const findUpward = (dirs, candidatesFor) => Effect.gen(function* () {
17533
17811
  const fs = yield* FileSystem.FileSystem;
17534
17812
  const candidates = [];
17535
17813
  for (const dir of dirs) candidates.push(...candidatesFor(dir));
17536
17814
  return yield* firstMatch(candidates, (candidate) => fs.exists(candidate));
17537
17815
  });
17538
- /**
17539
- * The first directory in `dirs` that `isRoot` accepts.
17540
- *
17541
- * @remarks
17542
- * `firstMatch` over the directories themselves — the candidate expansion is the
17543
- * identity. `isRoot` is a caller-supplied marker test (a `.git` entry, a
17544
- * `pnpm-workspace.yaml`), and its failures are absorbed per directory.
17545
- *
17546
- * @public
17547
- */
17548
17816
  const findRoot$1 = (dirs, isRoot) => firstMatch(dirs, isRoot);
17549
17817
  /**
17550
17818
  * Upward path traversal primitives.
17551
17819
  *
17552
17820
  * @public
17553
17821
  */
17554
- const Walker$1 = {
17555
- ascend,
17556
- firstMatch,
17557
- findUpward,
17558
- findRoot: findRoot$1
17822
+ var Walker$1 = class {
17823
+ constructor() {}
17824
+ /**
17825
+ * Ascend from `start` toward the filesystem root, yielding each directory,
17826
+ * nearest first.
17827
+ *
17828
+ * @remarks
17829
+ * Lexical, not physical: `Path.dirname` does not resolve symlinks, so ascending
17830
+ * out of a symlinked directory follows the path you were given rather than the
17831
+ * real filesystem parent. That is deliberate — config discovery wants the file
17832
+ * nearest the path the user named.
17833
+ *
17834
+ * Bounded twice over: `dirname` is a fixpoint at the root, and `maxDepth` guards
17835
+ * a pathological `Path` implementation that never reaches one.
17836
+ *
17837
+ * `stopAt` is compared in normalized form — see {@link AscendOptions.stopAt}.
17838
+ * Raw string equality made the ceiling fail OPEN: an unnormalized ceiling
17839
+ * matched nothing and the ascent ran silently to the filesystem root, which is
17840
+ * the unbounded walk the option exists to prevent, with no error to notice it
17841
+ * by. A relative ceiling **dies** for the same reason — resolving one against
17842
+ * `process.cwd()` would reintroduce the silent-wrong-walk failure through a
17843
+ * different door. See {@link AscendOptions.stopAt} for why that is a defect
17844
+ * rather than a typed error; the error channel stays `never`.
17845
+ */
17846
+ static ascend = ascend;
17847
+ /**
17848
+ * The first candidate whose `predicate` reports true, or `Option.none()`.
17849
+ *
17850
+ * @remarks
17851
+ * Each predicate is absorbed **individually**: a failure on one candidate is
17852
+ * treated as "this candidate did not match" and the scan continues. One
17853
+ * unreadable ancestor must never abort the walk, or a permission error deep in
17854
+ * the tree would hide a valid root above it. Not-found and cannot-look are
17855
+ * therefore indistinguishable to the caller; discovery is best-effort.
17856
+ *
17857
+ * `Effect.catch` catches failures, **not defects**. A predicate that throws is
17858
+ * programmer error and surfaces as a defect. Do not change this to
17859
+ * `Effect.catchCause` — the distinction is load-bearing.
17860
+ */
17861
+ static firstMatch = firstMatch;
17862
+ /**
17863
+ * The first existing path among the candidates `candidatesFor` produces for each
17864
+ * directory in `dirs`, scanned in order. Nearer directories win.
17865
+ *
17866
+ * @remarks
17867
+ * Candidates materialize up front, bounded by `dirs.length × candidatesFor`'s
17868
+ * output — a few hundred strings under the default `maxDepth`.
17869
+ */
17870
+ static findUpward = findUpward;
17871
+ /**
17872
+ * The first directory in `dirs` that `isRoot` accepts.
17873
+ *
17874
+ * @remarks
17875
+ * `firstMatch` over the directories themselves — the candidate expansion is the
17876
+ * identity. `isRoot` is a caller-supplied marker test (a `.git` entry, a
17877
+ * `pnpm-workspace.yaml`), and its failures are absorbed per directory.
17878
+ */
17879
+ static findRoot = findRoot$1;
17559
17880
  };
17560
17881
 
17561
17882
  //#endregion
17562
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceRoot.js
17883
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceRoot.js
17563
17884
  /**
17564
17885
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
17565
17886
  *
@@ -17747,7 +18068,7 @@ var WorkspaceRoot = class WorkspaceRoot extends Context.Service()("@effected/wor
17747
18068
  };
17748
18069
 
17749
18070
  //#endregion
17750
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/limits.js
18071
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/limits.js
17751
18072
  /**
17752
18073
  * Hard ceiling on directories the enumerator will visit for one pattern set.
17753
18074
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -17766,7 +18087,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
17766
18087
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
17767
18088
 
17768
18089
  //#endregion
17769
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/traverse.js
18090
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/traverse.js
17770
18091
  /** Directory names never descended into. */
17771
18092
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
17772
18093
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -17857,7 +18178,7 @@ var Traversal = class {
17857
18178
  };
17858
18179
 
17859
18180
  //#endregion
17860
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/enumerate.js
18181
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/enumerate.js
17861
18182
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
17862
18183
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
17863
18184
  /**
@@ -17928,7 +18249,7 @@ const enumerate = (root, globs, options) => Effect.gen(function* () {
17928
18249
  });
17929
18250
 
17930
18251
  //#endregion
17931
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/patterns.js
18252
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/patterns.js
17932
18253
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
17933
18254
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
17934
18255
  const pnpmPatternsOf = (document) => {
@@ -17986,7 +18307,7 @@ const readPatterns = (root) => Effect.gen(function* () {
17986
18307
  });
17987
18308
 
17988
18309
  //#endregion
17989
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceDiscovery.js
18310
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceDiscovery.js
17990
18311
  /**
17991
18312
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
17992
18313
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -18421,7 +18742,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends Context.Service()("@ef
18421
18742
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
18422
18743
 
18423
18744
  //#endregion
18424
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/DependencyGraph.js
18745
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/DependencyGraph.js
18425
18746
  /**
18426
18747
  * Raised when the workspace dependency graph cannot be topologically ordered
18427
18748
  * because it contains a cycle.
@@ -18657,7 +18978,7 @@ const kahn = (edges) => {
18657
18978
  };
18658
18979
 
18659
18980
  //#endregion
18660
- //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/GitCommand.js
18981
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/git/GitCommand.js
18661
18982
  /**
18662
18983
  * Builds a `git` `ChildProcess.StandardCommand` with the argv this package
18663
18984
  * classifies against.
@@ -18680,25 +19001,7 @@ const git = (args) => ChildProcess.make("git", args, {
18680
19001
  env: { LC_ALL: "C" },
18681
19002
  extendEnv: true
18682
19003
  });
18683
- /**
18684
- * `git show <ref>:<path>` — the contents of `path` as it existed at `ref`,
18685
- * without checking anything out.
18686
- *
18687
- * @public
18688
- */
18689
19004
  const show = (ref, path) => git(["show", `${ref}:${path}`]);
18690
- /**
18691
- * `git ls-tree -r -z <ref> [-- <pathspec>...]` — every path in the tree at
18692
- * `ref`, recursively, NUL-terminated, optionally scoped to `pathspec`.
18693
- *
18694
- * @remarks
18695
- * `-z` is load-bearing: git paths may themselves contain newlines, so the
18696
- * caller must split on `"\0"`, never on `"\n"`. When `pathspec` is provided,
18697
- * a literal `--` separator is inserted before the pathspec entries to prevent
18698
- * git from interpreting pathspec values as options.
18699
- *
18700
- * @public
18701
- */
18702
19005
  const lsTree = (ref, pathspec = []) => git([
18703
19006
  "ls-tree",
18704
19007
  "-r",
@@ -18706,48 +19009,16 @@ const lsTree = (ref, pathspec = []) => git([
18706
19009
  ref,
18707
19010
  ...pathspec.length > 0 ? ["--", ...pathspec] : []
18708
19011
  ]);
18709
- /**
18710
- * `git cat-file -e <ref>` — checks whether `ref` resolves to an existing
18711
- * object, without printing it. A non-zero exit means the ref does not exist.
18712
- *
18713
- * @public
18714
- */
18715
19012
  const refExists = (ref) => git([
18716
19013
  "cat-file",
18717
19014
  "-e",
18718
19015
  ref
18719
19016
  ]);
18720
- /**
18721
- * `git merge-base <a> <b>` — the best common ancestor commit of `a` and `b`.
18722
- *
18723
- * @public
18724
- */
18725
19017
  const mergeBase = (a, b) => git([
18726
19018
  "merge-base",
18727
19019
  a,
18728
19020
  b
18729
19021
  ]);
18730
- /**
18731
- * `git diff --name-only -z [--relative] <base>...<head>` — the paths that
18732
- * differ between the merge base of `base` and `head`, and `head` itself,
18733
- * NUL-terminated.
18734
- *
18735
- * @remarks
18736
- * `-z` is load-bearing here too, for the same reason as {@link GitCommand.lsTree}: split
18737
- * the output on `"\0"`, never on `"\n"`.
18738
- *
18739
- * The relative flag is **explicit in both branches** — `--relative` when
18740
- * `relative` is true, `--no-relative` when false — never omitted. git honors a
18741
- * configured `diff.relative=true` when no flag is passed, so an omitted flag
18742
- * would silently yield cwd-relative paths on such a machine even for
18743
- * `relative: false`, misaligning with {@link GitCommand.untrackedFiles}'s
18744
- * repo-root base and breaking `Git.workingChanges`' dedup in a nested workspace.
18745
- * `--relative` scopes the report to `cwd` (a workspace nested inside a larger
18746
- * repository); `--no-relative` overrides any `diff.relative` config and reports
18747
- * paths from the repository top-level.
18748
- *
18749
- * @public
18750
- */
18751
19022
  const changedFiles = (base, head, relative = false) => git([
18752
19023
  "diff",
18753
19024
  "--name-only",
@@ -18755,35 +19026,12 @@ const changedFiles = (base, head, relative = false) => git([
18755
19026
  relative ? "--relative" : "--no-relative",
18756
19027
  `${base}...${head}`
18757
19028
  ]);
18758
- /**
18759
- * `git diff --name-only -z (--relative | --no-relative)` — the paths with
18760
- * unstaged working-tree changes (the working tree against the index),
18761
- * NUL-terminated.
18762
- *
18763
- * @remarks
18764
- * `relative` behaves as it does for {@link GitCommand.changedFiles}, including the
18765
- * explicit-flag-in-both-branches rule: `--no-relative` is passed for
18766
- * `relative: false` so a configured `diff.relative=true` cannot silently make the
18767
- * output cwd-relative.
18768
- *
18769
- * @public
18770
- */
18771
19029
  const unstagedChanges = (relative = false) => git([
18772
19030
  "diff",
18773
19031
  "--name-only",
18774
19032
  "-z",
18775
19033
  relative ? "--relative" : "--no-relative"
18776
19034
  ]);
18777
- /**
18778
- * `git diff --name-only -z (--relative | --no-relative) --cached` — the paths
18779
- * staged for the next commit (the index against `HEAD`), NUL-terminated.
18780
- *
18781
- * @remarks
18782
- * `relative` behaves as it does for {@link GitCommand.changedFiles}, including the
18783
- * explicit `--no-relative` on the `relative: false` branch.
18784
- *
18785
- * @public
18786
- */
18787
19035
  const stagedChanges = (relative = false) => git([
18788
19036
  "diff",
18789
19037
  "--name-only",
@@ -18791,19 +19039,6 @@ const stagedChanges = (relative = false) => git([
18791
19039
  relative ? "--relative" : "--no-relative",
18792
19040
  "--cached"
18793
19041
  ]);
18794
- /**
18795
- * `git ls-files --others --exclude-standard -z [--full-name]` — the untracked
18796
- * paths git is not ignoring, NUL-terminated.
18797
- *
18798
- * @remarks
18799
- * `ls-files` reports paths relative to `cwd` by default, matching the
18800
- * `--relative` diffs. When `relative` is `false`, `--full-name` makes it emit
18801
- * repo-root-relative paths instead, so the untracked half shares a base with the
18802
- * un-`--relative` diffs — otherwise `Git.workingChanges`'s union would dedup two
18803
- * spellings of one file from a nested `cwd`.
18804
- *
18805
- * @public
18806
- */
18807
19042
  const untrackedFiles = (relative = false) => git([
18808
19043
  "ls-files",
18809
19044
  "--others",
@@ -18811,35 +19046,16 @@ const untrackedFiles = (relative = false) => git([
18811
19046
  "-z",
18812
19047
  ...relative ? [] : ["--full-name"]
18813
19048
  ]);
18814
- /**
18815
- * `git rev-parse --verify <ref>` — resolves `ref` to its full object id, or
18816
- * fails if `ref` does not resolve.
18817
- *
18818
- * @public
18819
- */
18820
19049
  const revParse = (ref) => git([
18821
19050
  "rev-parse",
18822
19051
  "--verify",
18823
19052
  ref
18824
19053
  ]);
18825
- /**
18826
- * Mutating: `git checkout [--detach] <ref>` — moves the working tree (and, for
18827
- * a branch ref, `HEAD`) to `ref`. When `detach` is true, checks out the ref in
18828
- * detached-HEAD state.
18829
- *
18830
- * @public
18831
- */
18832
19054
  const checkout = (ref, detach = false) => git([
18833
19055
  "checkout",
18834
19056
  ...detach ? ["--detach"] : [],
18835
19057
  ref
18836
19058
  ]);
18837
- /**
18838
- * Mutating: `git fetch [--depth <n>] <remote> [tag] <ref>` — fetches the given
18839
- * ref from a remote, optionally with a depth limit and the `tag` keyword.
18840
- *
18841
- * @public
18842
- */
18843
19059
  const fetch$1 = (remote, ref, depth, tag = false) => git([
18844
19060
  "fetch",
18845
19061
  ...depth !== void 0 ? ["--depth", String(depth)] : [],
@@ -18847,14 +19063,6 @@ const fetch$1 = (remote, ref, depth, tag = false) => git([
18847
19063
  ...tag ? ["tag"] : [],
18848
19064
  ref
18849
19065
  ]);
18850
- /**
18851
- * Mutating: `git submodule update [--init] [--depth <n>] [-- <paths>...]` — updates
18852
- * registered submodules, optionally initializing them, with an optional depth limit,
18853
- * and scoped to specific paths. The literal `--` separator makes the pathspec
18854
- * injection-safe by construction.
18855
- *
18856
- * @public
18857
- */
18858
19066
  const submoduleUpdate = (init = false, depth, paths = []) => git([
18859
19067
  "submodule",
18860
19068
  "update",
@@ -18862,13 +19070,6 @@ const submoduleUpdate = (init = false, depth, paths = []) => git([
18862
19070
  ...depth !== void 0 ? ["--depth", String(depth)] : [],
18863
19071
  ...paths.length > 0 ? ["--", ...paths] : []
18864
19072
  ]);
18865
- /**
18866
- * Mutating: `git submodule add [--depth <n>] -- <url> <path>` — registers and
18867
- * initializes a new submodule. The literal `--` separator makes the url and path
18868
- * injection-safe by construction.
18869
- *
18870
- * @public
18871
- */
18872
19073
  const submoduleAdd = (url, path, depth) => git([
18873
19074
  "submodule",
18874
19075
  "add",
@@ -18877,57 +19078,23 @@ const submoduleAdd = (url, path, depth) => git([
18877
19078
  url,
18878
19079
  path
18879
19080
  ]);
18880
- /**
18881
- * Mutating: `git sparse-checkout set (--cone | --no-cone) <patterns...>` — configures
18882
- * which paths are checked out in a sparse repository. The cone flag is explicit in both
18883
- * branches — `--cone` when `cone` is true, `--no-cone` when false — to prevent git's
18884
- * default from silently changing the behavior.
18885
- *
18886
- * @public
18887
- */
18888
19081
  const sparseCheckoutSet = (patterns, cone) => git([
18889
19082
  "sparse-checkout",
18890
19083
  "set",
18891
19084
  cone ? "--cone" : "--no-cone",
18892
19085
  ...patterns
18893
19086
  ]);
18894
- /**
18895
- * Mutating: `git config [-f <file>] <key> <value>` — writes a configuration value,
18896
- * optionally into an explicit configuration file (e.g., `.gitmodules`).
18897
- *
18898
- * @public
18899
- */
18900
19087
  const configSet = (key, value, file) => git([
18901
19088
  "config",
18902
19089
  ...file !== void 0 ? ["-f", file] : [],
18903
19090
  key,
18904
19091
  value
18905
19092
  ]);
18906
- /**
18907
- * Mutating: `git add -- <paths...>` — stages the given paths for commit. The literal
18908
- * `--` separator makes the pathspec injection-safe by construction.
18909
- *
18910
- * @public
18911
- */
18912
19093
  const add = (paths) => git([
18913
19094
  "add",
18914
19095
  "--",
18915
19096
  ...paths
18916
19097
  ]);
18917
- /**
18918
- * `git diff --name-status -z (--relative | --no-relative) [<base> | <base>...<head>]`
18919
- * — the changed paths WITH their one-letter status codes, NUL-terminated.
18920
- *
18921
- * @remarks
18922
- * With `head` omitted this is the single-argument diff form: the working tree
18923
- * (staged + unstaged) against `base` — NOT a two-ref range. With `head`
18924
- * present it is the familiar `base...head` merge-base form, matching
18925
- * {@link GitCommand.changedFiles}. `-z` and the explicit relative flag follow
18926
- * the same rules as {@link GitCommand.changedFiles}. In `-z` mode a rename or
18927
- * copy entry is THREE NUL tokens: `R<score>`, the old path, the new path.
18928
- *
18929
- * @public
18930
- */
18931
19098
  const nameStatus = (base, head, relative = false) => git([
18932
19099
  "diff",
18933
19100
  "--name-status",
@@ -18935,103 +19102,34 @@ const nameStatus = (base, head, relative = false) => git([
18935
19102
  relative ? "--relative" : "--no-relative",
18936
19103
  head === void 0 ? base : `${base}...${head}`
18937
19104
  ]);
18938
- /**
18939
- * `git symbolic-ref --quiet --short refs/remotes/<remote>/HEAD` — the name of
18940
- * the default branch on the given remote, or empty string / exit 1 if unset.
18941
- *
18942
- * @remarks
18943
- * `--quiet` suppresses error messages; the exit code alone signals success
18944
- * (0) or "symbolic-ref does not exist" (1). The contract is "does the remote
18945
- * have a HEAD?" — an unset symbolic ref exits 1 silently, which `Git.defaultBranch`
18946
- * degrades to `Option.none()` rather than a typed error. `symbolic-ref` is a
18947
- * purely local ref lookup; it never touches the network.
18948
- *
18949
- * @public
18950
- */
18951
19105
  const defaultBranch = (remote = "origin") => git([
18952
19106
  "symbolic-ref",
18953
19107
  "--quiet",
18954
19108
  "--short",
18955
19109
  `refs/remotes/${remote}/HEAD`
18956
19110
  ]);
18957
- /**
18958
- * `git rev-parse --abbrev-ref HEAD` — the name of the branch `HEAD` is
18959
- * pointing to.
18960
- *
18961
- * @remarks
18962
- * Returns `"HEAD"` (detached state), `"<branch>"` (an attached branch), or
18963
- * fails if the repository has no commits.
18964
- *
18965
- * @public
18966
- */
18967
19111
  const currentBranch = () => git([
18968
19112
  "rev-parse",
18969
19113
  "--abbrev-ref",
18970
19114
  "HEAD"
18971
19115
  ]);
18972
- /**
18973
- * `git rev-parse --show-toplevel` — the filesystem path to the root of the
18974
- * enclosing git repository.
18975
- *
18976
- * @public
18977
- */
18978
19116
  const repoRoot = () => git(["rev-parse", "--show-toplevel"]);
18979
- /**
18980
- * `git log -1 --format=%H%x00%G?%x00%B <ref>` — a NUL-separated triple: the
18981
- * full commit hash, the GPG trust level, and the full commit body (message),
18982
- * all untrimmed.
18983
- *
18984
- * @remarks
18985
- * `%H` is the full object id (40-char sha1, or sha256 if configured).
18986
- * `%x00` is a literal NUL byte (the separator). `%G?` is the GPG trust level
18987
- * (`G` = good signature, `B` = bad, `U` = untrusted, `X` = expired, `Y` =
18988
- * expired key, `R` = revoked key, `E` = error, or `N` = not signed).
18989
- * `%B` is the full body, **untrimmed** — it includes leading/trailing
18990
- * whitespace — so the caller must decide whether to trim it. Splits on the
18991
- * two `\x00` bytes to extract all three values.
18992
- *
18993
- * @public
18994
- */
18995
19117
  const commitInfo = (ref = "HEAD") => git([
18996
19118
  "log",
18997
19119
  "-1",
18998
19120
  "--format=%H%x00%G?%x00%B",
18999
19121
  ref
19000
19122
  ]);
19001
- /**
19002
- * `git config --get <key>` — the value of the given git config key, or empty
19003
- * string / exit 1 if unset.
19004
- *
19005
- * @public
19006
- */
19007
19123
  const configGet = (key) => git([
19008
19124
  "config",
19009
19125
  "--get",
19010
19126
  key
19011
19127
  ]);
19012
- /**
19013
- * `git remote get-url <remote>` — the fetch URL of the given remote. A
19014
- * missing remote exits non-zero with a "No such remote" stderr shape, which
19015
- * the `Git` service degrades to `Option.none`, never a typed error.
19016
- *
19017
- * @public
19018
- */
19019
19128
  const remoteUrl = (remote = "origin") => git([
19020
19129
  "remote",
19021
19130
  "get-url",
19022
19131
  remote
19023
19132
  ]);
19024
- /**
19025
- * `git status --porcelain -z` — the porcelain (stable, machine-readable) short
19026
- * status of every modified file in the working tree, NUL-terminated.
19027
- *
19028
- * @remarks
19029
- * `-z` is load-bearing here too, for the same reason as
19030
- * {@link GitCommand.lsTree}: split the output on `"\0"`, never on `"\n"`.
19031
- * Each entry is a pair of status codes followed by a space and the path.
19032
- *
19033
- * @public
19034
- */
19035
19133
  const status = () => git([
19036
19134
  "status",
19037
19135
  "--porcelain",
@@ -19049,35 +19147,211 @@ const status = () => git([
19049
19147
  *
19050
19148
  * @public
19051
19149
  */
19052
- const GitCommand = {
19053
- show,
19054
- lsTree,
19055
- refExists,
19056
- mergeBase,
19057
- changedFiles,
19058
- unstagedChanges,
19059
- stagedChanges,
19060
- untrackedFiles,
19061
- revParse,
19062
- checkout,
19063
- fetch: fetch$1,
19064
- submoduleUpdate,
19065
- submoduleAdd,
19066
- sparseCheckoutSet,
19067
- configSet,
19068
- add,
19069
- nameStatus,
19070
- defaultBranch,
19071
- currentBranch,
19072
- repoRoot,
19073
- commitInfo,
19074
- configGet,
19075
- remoteUrl,
19076
- status
19150
+ var GitCommand = class {
19151
+ constructor() {}
19152
+ /**
19153
+ * `git show <ref>:<path>` — the contents of `path` as it existed at `ref`,
19154
+ * without checking anything out.
19155
+ */
19156
+ static show = show;
19157
+ /**
19158
+ * `git ls-tree -r -z <ref> [-- <pathspec>...]` — every path in the tree at
19159
+ * `ref`, recursively, NUL-terminated, optionally scoped to `pathspec`.
19160
+ *
19161
+ * @remarks
19162
+ * `-z` is load-bearing: git paths may themselves contain newlines, so the
19163
+ * caller must split on `"\0"`, never on `"\n"`. When `pathspec` is provided,
19164
+ * a literal `--` separator is inserted before the pathspec entries to prevent
19165
+ * git from interpreting pathspec values as options.
19166
+ */
19167
+ static lsTree = lsTree;
19168
+ /**
19169
+ * `git cat-file -e <ref>` — checks whether `ref` resolves to an existing
19170
+ * object, without printing it. A non-zero exit means the ref does not exist.
19171
+ */
19172
+ static refExists = refExists;
19173
+ /**
19174
+ * `git merge-base <a> <b>` — the best common ancestor commit of `a` and `b`.
19175
+ */
19176
+ static mergeBase = mergeBase;
19177
+ /**
19178
+ * `git diff --name-only -z [--relative] <base>...<head>` — the paths that
19179
+ * differ between the merge base of `base` and `head`, and `head` itself,
19180
+ * NUL-terminated.
19181
+ *
19182
+ * @remarks
19183
+ * `-z` is load-bearing here too, for the same reason as {@link GitCommand.lsTree}: split
19184
+ * the output on `"\0"`, never on `"\n"`.
19185
+ *
19186
+ * The relative flag is **explicit in both branches** — `--relative` when
19187
+ * `relative` is true, `--no-relative` when false — never omitted. git honors a
19188
+ * configured `diff.relative=true` when no flag is passed, so an omitted flag
19189
+ * would silently yield cwd-relative paths on such a machine even for
19190
+ * `relative: false`, misaligning with {@link GitCommand.untrackedFiles}'s
19191
+ * repo-root base and breaking `Git.workingChanges`' dedup in a nested workspace.
19192
+ * `--relative` scopes the report to `cwd` (a workspace nested inside a larger
19193
+ * repository); `--no-relative` overrides any `diff.relative` config and reports
19194
+ * paths from the repository top-level.
19195
+ */
19196
+ static changedFiles = changedFiles;
19197
+ /**
19198
+ * `git diff --name-only -z (--relative | --no-relative)` — the paths with
19199
+ * unstaged working-tree changes (the working tree against the index),
19200
+ * NUL-terminated.
19201
+ *
19202
+ * @remarks
19203
+ * `relative` behaves as it does for {@link GitCommand.changedFiles}, including the
19204
+ * explicit-flag-in-both-branches rule: `--no-relative` is passed for
19205
+ * `relative: false` so a configured `diff.relative=true` cannot silently make the
19206
+ * output cwd-relative.
19207
+ */
19208
+ static unstagedChanges = unstagedChanges;
19209
+ /**
19210
+ * `git diff --name-only -z (--relative | --no-relative) --cached` — the paths
19211
+ * staged for the next commit (the index against `HEAD`), NUL-terminated.
19212
+ *
19213
+ * @remarks
19214
+ * `relative` behaves as it does for {@link GitCommand.changedFiles}, including the
19215
+ * explicit `--no-relative` on the `relative: false` branch.
19216
+ */
19217
+ static stagedChanges = stagedChanges;
19218
+ /**
19219
+ * `git ls-files --others --exclude-standard -z [--full-name]` — the untracked
19220
+ * paths git is not ignoring, NUL-terminated.
19221
+ *
19222
+ * @remarks
19223
+ * `ls-files` reports paths relative to `cwd` by default, matching the
19224
+ * `--relative` diffs. When `relative` is `false`, `--full-name` makes it emit
19225
+ * repo-root-relative paths instead, so the untracked half shares a base with the
19226
+ * un-`--relative` diffs — otherwise `Git.workingChanges`'s union would dedup two
19227
+ * spellings of one file from a nested `cwd`.
19228
+ */
19229
+ static untrackedFiles = untrackedFiles;
19230
+ /**
19231
+ * `git rev-parse --verify <ref>` — resolves `ref` to its full object id, or
19232
+ * fails if `ref` does not resolve.
19233
+ */
19234
+ static revParse = revParse;
19235
+ /**
19236
+ * Mutating: `git checkout [--detach] <ref>` — moves the working tree (and, for
19237
+ * a branch ref, `HEAD`) to `ref`. When `detach` is true, checks out the ref in
19238
+ * detached-HEAD state.
19239
+ */
19240
+ static checkout = checkout;
19241
+ /**
19242
+ * Mutating: `git fetch [--depth <n>] <remote> [tag] <ref>` — fetches the given
19243
+ * ref from a remote, optionally with a depth limit and the `tag` keyword.
19244
+ */
19245
+ static fetch = fetch$1;
19246
+ /**
19247
+ * Mutating: `git submodule update [--init] [--depth <n>] [-- <paths>...]` — updates
19248
+ * registered submodules, optionally initializing them, with an optional depth limit,
19249
+ * and scoped to specific paths. The literal `--` separator makes the pathspec
19250
+ * injection-safe by construction.
19251
+ */
19252
+ static submoduleUpdate = submoduleUpdate;
19253
+ /**
19254
+ * Mutating: `git submodule add [--depth <n>] -- <url> <path>` — registers and
19255
+ * initializes a new submodule. The literal `--` separator makes the url and path
19256
+ * injection-safe by construction.
19257
+ */
19258
+ static submoduleAdd = submoduleAdd;
19259
+ /**
19260
+ * Mutating: `git sparse-checkout set (--cone | --no-cone) <patterns...>` — configures
19261
+ * which paths are checked out in a sparse repository. The cone flag is explicit in both
19262
+ * branches — `--cone` when `cone` is true, `--no-cone` when false — to prevent git's
19263
+ * default from silently changing the behavior.
19264
+ */
19265
+ static sparseCheckoutSet = sparseCheckoutSet;
19266
+ /**
19267
+ * Mutating: `git config [-f <file>] <key> <value>` — writes a configuration value,
19268
+ * optionally into an explicit configuration file (e.g., `.gitmodules`).
19269
+ */
19270
+ static configSet = configSet;
19271
+ /**
19272
+ * Mutating: `git add -- <paths...>` — stages the given paths for commit. The literal
19273
+ * `--` separator makes the pathspec injection-safe by construction.
19274
+ */
19275
+ static add = add;
19276
+ /**
19277
+ * `git diff --name-status -z (--relative | --no-relative) [<base> | <base>...<head>]`
19278
+ * — the changed paths WITH their one-letter status codes, NUL-terminated.
19279
+ *
19280
+ * @remarks
19281
+ * With `head` omitted this is the single-argument diff form: the working tree
19282
+ * (staged + unstaged) against `base` — NOT a two-ref range. With `head`
19283
+ * present it is the familiar `base...head` merge-base form, matching
19284
+ * {@link GitCommand.changedFiles}. `-z` and the explicit relative flag follow
19285
+ * the same rules as {@link GitCommand.changedFiles}. In `-z` mode a rename or
19286
+ * copy entry is THREE NUL tokens: `R<score>`, the old path, the new path.
19287
+ */
19288
+ static nameStatus = nameStatus;
19289
+ /**
19290
+ * `git symbolic-ref --quiet --short refs/remotes/<remote>/HEAD` — the name of
19291
+ * the default branch on the given remote, or empty string / exit 1 if unset.
19292
+ *
19293
+ * @remarks
19294
+ * `--quiet` suppresses error messages; the exit code alone signals success
19295
+ * (0) or "symbolic-ref does not exist" (1). The contract is "does the remote
19296
+ * have a HEAD?" — an unset symbolic ref exits 1 silently, which `Git.defaultBranch`
19297
+ * degrades to `Option.none()` rather than a typed error. `symbolic-ref` is a
19298
+ * purely local ref lookup; it never touches the network.
19299
+ */
19300
+ static defaultBranch = defaultBranch;
19301
+ /**
19302
+ * `git rev-parse --abbrev-ref HEAD` — the name of the branch `HEAD` is
19303
+ * pointing to.
19304
+ *
19305
+ * @remarks
19306
+ * Returns `"HEAD"` (detached state), `"<branch>"` (an attached branch), or
19307
+ * fails if the repository has no commits.
19308
+ */
19309
+ static currentBranch = currentBranch;
19310
+ /**
19311
+ * `git rev-parse --show-toplevel` — the filesystem path to the root of the
19312
+ * enclosing git repository.
19313
+ */
19314
+ static repoRoot = repoRoot;
19315
+ /**
19316
+ * `git log -1 --format=%H%x00%G?%x00%B <ref>` — a NUL-separated triple: the
19317
+ * full commit hash, the GPG trust level, and the full commit body (message),
19318
+ * all untrimmed.
19319
+ *
19320
+ * @remarks
19321
+ * `%H` is the full object id (40-char sha1, or sha256 if configured).
19322
+ * `%x00` is a literal NUL byte (the separator). `%G?` is the GPG trust level
19323
+ * (`G` = good signature, `B` = bad, `U` = untrusted, `X` = expired, `Y` =
19324
+ * expired key, `R` = revoked key, `E` = error, or `N` = not signed).
19325
+ * `%B` is the full body, **untrimmed** — it includes leading/trailing
19326
+ * whitespace — so the caller must decide whether to trim it. Splits on the
19327
+ * two `\x00` bytes to extract all three values.
19328
+ */
19329
+ static commitInfo = commitInfo;
19330
+ /**
19331
+ * `git config --get <key>` — the value of the given git config key, or empty
19332
+ * string / exit 1 if unset.
19333
+ */
19334
+ static configGet = configGet;
19335
+ /**
19336
+ * `git remote get-url <remote>` — the fetch URL of the given remote. A
19337
+ * missing remote exits non-zero with a "No such remote" stderr shape, which
19338
+ * the `Git` service degrades to `Option.none`, never a typed error.
19339
+ */
19340
+ static remoteUrl = remoteUrl;
19341
+ /**
19342
+ * `git status --porcelain -z` — the porcelain (stable, machine-readable) short
19343
+ * status of every modified file in the working tree, NUL-terminated.
19344
+ *
19345
+ * @remarks
19346
+ * `-z` is load-bearing here too, for the same reason as
19347
+ * {@link GitCommand.lsTree}: split the output on `"\0"`, never on `"\n"`.
19348
+ * Each entry is a pair of status codes followed by a space and the path.
19349
+ */
19350
+ static status = status;
19077
19351
  };
19078
19352
 
19079
19353
  //#endregion
19080
- //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/internal/run.js
19354
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/git/internal/run.js
19081
19355
  /**
19082
19356
  * Spawns `command` and collects its stdout, stderr, and exit code as a single
19083
19357
  * triple.
@@ -19105,7 +19379,7 @@ const runCollected = (command) => Effect.scoped(Effect.gen(function* () {
19105
19379
  }));
19106
19380
 
19107
19381
  //#endregion
19108
- //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/Git.js
19382
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/git/Git.js
19109
19383
  /** git's own ceiling: a run that has not answered in 30s is not going to. */
19110
19384
  const GIT_TIMEOUT = Duration.seconds(30);
19111
19385
  /**
@@ -20116,7 +20390,7 @@ var Git = class Git extends Context.Service()("@effected/git/Git") {
20116
20390
  };
20117
20391
 
20118
20392
  //#endregion
20119
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ChangeDetector.js
20393
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ChangeDetector.js
20120
20394
  /**
20121
20395
  * Which git refs to compare, and whether to fold in the working tree.
20122
20396
  *
@@ -20398,7 +20672,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
20398
20672
  }
20399
20673
 
20400
20674
  //#endregion
20401
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/catalogs.js
20675
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/catalogs.js
20402
20676
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
20403
20677
  const inlineCatalogs = (manifest) => {
20404
20678
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -20463,7 +20737,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
20463
20737
  };
20464
20738
 
20465
20739
  //#endregion
20466
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ConfigDependencyHooks.js
20740
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ConfigDependencyHooks.js
20467
20741
  /** Whether `value` is a non-null, non-array object. */
20468
20742
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
20469
20743
  /**
@@ -20650,7 +20924,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends Context.Service(
20650
20924
  };
20651
20925
 
20652
20926
  //#endregion
20653
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/PackageManagerName.js
20927
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/PackageManagerName.js
20654
20928
  /**
20655
20929
  * The four package managers this package understands.
20656
20930
  *
@@ -20751,7 +21025,11 @@ const CHECKED = [
20751
21025
  "bun.lock",
20752
21026
  "bun.lockb",
20753
21027
  "yarn.lock",
20754
- "package.json#workspaces"
21028
+ "package.json#workspaces",
21029
+ "pnpm-lock.yaml",
21030
+ "package-lock.json",
21031
+ "package.json#packageManager",
21032
+ "package.json#devEngines.packageManager"
20755
21033
  ];
20756
21034
  /**
20757
21035
  * Detects which package manager owns a workspace root.
@@ -20865,7 +21143,8 @@ var PackageManagerDetector = class PackageManagerDetector extends Context.Servic
20865
21143
  version: versionFor(hints, "pnpm"),
20866
21144
  runtime: "node"
20867
21145
  });
20868
- if (((yield* has(root, "bun.lock")) || (yield* has(root, "bun.lockb"))) && namesManager(hints, "bun")) return DetectedPackageManager.make({
21146
+ const bunLock = (yield* has(root, "bun.lock")) || (yield* has(root, "bun.lockb"));
21147
+ if (bunLock && namesManager(hints, "bun")) return DetectedPackageManager.make({
20869
21148
  name: "bun",
20870
21149
  version: versionFor(hints, "bun"),
20871
21150
  runtime: "bun"
@@ -20881,6 +21160,35 @@ var PackageManagerDetector = class PackageManagerDetector extends Context.Servic
20881
21160
  version: versionFor(hints, "npm"),
20882
21161
  runtime: "node"
20883
21162
  });
21163
+ if (yield* has(root, "pnpm-lock.yaml")) return DetectedPackageManager.make({
21164
+ name: "pnpm",
21165
+ version: versionFor(hints, "pnpm"),
21166
+ runtime: "node"
21167
+ });
21168
+ if (bunLock && namesManager(hints, "bun")) return DetectedPackageManager.make({
21169
+ name: "bun",
21170
+ version: versionFor(hints, "bun"),
21171
+ runtime: "bun"
21172
+ });
21173
+ if ((yield* has(root, "yarn.lock")) && namesManager(hints, "yarn")) return DetectedPackageManager.make({
21174
+ name: "yarn",
21175
+ version: versionFor(hints, "yarn"),
21176
+ runtime: "node"
21177
+ });
21178
+ if (yield* has(root, "package-lock.json")) return DetectedPackageManager.make({
21179
+ name: "npm",
21180
+ version: versionFor(hints, "npm"),
21181
+ runtime: "node"
21182
+ });
21183
+ const declared = declaredName(hints);
21184
+ if (Option.isSome(declared)) {
21185
+ const name = declared.value;
21186
+ if (name === "pnpm" || name === "npm" || name === "yarn" || name === "bun") return DetectedPackageManager.make({
21187
+ name,
21188
+ version: versionFor(hints, name),
21189
+ runtime: name === "bun" ? "bun" : "node"
21190
+ });
21191
+ }
20884
21192
  return yield* Effect.fail(new PackageManagerDetectionError({
20885
21193
  root,
20886
21194
  checked: CHECKED
@@ -20890,10 +21198,57 @@ var PackageManagerDetector = class PackageManagerDetector extends Context.Servic
20890
21198
  });
20891
21199
  /** The live layer. */
20892
21200
  static layer = Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
21201
+ /**
21202
+ * The sanctioned in-memory double.
21203
+ *
21204
+ * @remarks
21205
+ * **`detect` has no honest default, so an unstubbed call dies** — the
21206
+ * `WorkspaceDiscovery.info` posture, for the same reason. A stand-in that
21207
+ * answered `"pnpm"` would hand a consumer a fact nothing established, and it
21208
+ * would contradict the very service it stands in for: the live detector's
21209
+ * defining property is that it [refuses to
21210
+ * guess](https://github.com/spencerbeggs/effected) when no evidence matches.
21211
+ * A double that guesses is worse than no double.
21212
+ *
21213
+ * Failing typed would be the subtler mistake: `PackageManagerDetectionError`
21214
+ * reads as a legitimate "no manager here" answer, so a consumer would branch
21215
+ * on it and proceed, never learning that the test simply forgot to stub.
21216
+ *
21217
+ * @param overrides - Members to supply; anything omitted dies on use.
21218
+ *
21219
+ * @example
21220
+ * ```ts
21221
+ * import { DetectedPackageManager, PackageManagerDetector } from "@effected/workspaces";
21222
+ * import { Effect, Option } from "effect";
21223
+ *
21224
+ * const TestDetector = PackageManagerDetector.layerTest({
21225
+ * detect: () =>
21226
+ * Effect.succeed(
21227
+ * DetectedPackageManager.make({ name: "pnpm", version: Option.none(), runtime: "node" }),
21228
+ * ),
21229
+ * });
21230
+ * ```
21231
+ */
21232
+ static makeTest = (overrides = {}) => ({
21233
+ detect: () => Effect.die(/* @__PURE__ */ new Error("PackageManagerDetector.makeTest: detect() was called but not stubbed — no honest default DetectedPackageManager exists for a test double; pass a `detect` override.")),
21234
+ ...overrides
21235
+ });
21236
+ /**
21237
+ * {@link PackageManagerDetector.makeTest} behind `Layer.succeed`.
21238
+ *
21239
+ * @remarks
21240
+ * A parameterized layer factory mints a **fresh reference per call**, and
21241
+ * layers memoize by reference — bind the result to a `const` and reuse it
21242
+ * rather than calling `layerTest(...)` at each composition site.
21243
+ *
21244
+ * Pairs with `WorkspaceRoot.layerTest` and `WorkspaceDiscovery.layerTest` to
21245
+ * stand up the whole discovery path with no filesystem at all.
21246
+ */
21247
+ static layerTest = (overrides = {}) => Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
20893
21248
  };
20894
21249
 
20895
21250
  //#endregion
20896
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/LockfileReader.js
21251
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/LockfileReader.js
20897
21252
  /**
20898
21253
  * Raised when the workspace's lockfile cannot be read off disk.
20899
21254
  *
@@ -21074,7 +21429,7 @@ var LockfileReader = class LockfileReader extends Context.Service()("@effected/w
21074
21429
  };
21075
21430
 
21076
21431
  //#endregion
21077
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Publishability.js
21432
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Publishability.js
21078
21433
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
21079
21434
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
21080
21435
  /**
@@ -21158,9 +21513,35 @@ var PublishTarget = class extends Schema.Class("PublishTarget")({
21158
21513
  *
21159
21514
  * @public
21160
21515
  */
21161
- var PublishabilityDetector = class PublishabilityDetector extends Context.Service()("@effected/workspaces/PublishabilityDetector") {
21162
- /** Standard npm publishing semantics. Pure — no filesystem, no platform services. */
21163
- static layer = Layer.succeed(PublishabilityDetector, { detect: (pkg) => Effect.sync(() => {
21516
+ var PublishabilityDetector = class extends Context.Service()("@effected/workspaces/PublishabilityDetector") {
21517
+ /**
21518
+ * Standard npm publishing semantics, **as a value**. Pure no filesystem,
21519
+ * no platform services.
21520
+ *
21521
+ * @remarks
21522
+ * Exposed as a shape and not only as a layer, because a consumer composing
21523
+ * *around* these rules cannot reach them through a layer without re-entering
21524
+ * the very tag it is replacing. `@savvy-web/silk-effects` had to write
21525
+ * `Effect.provide(PublishabilityDetector, PublishabilityDetector.layer)`
21526
+ * **inside its own implementation of that tag** to get at this function for
21527
+ * its pass-through branch; with the value exposed that becomes
21528
+ * `PublishabilityDetector.npm.detect(pkg)`.
21529
+ *
21530
+ * @example
21531
+ * ```ts
21532
+ * import { PublishabilityDetector } from "@effected/workspaces";
21533
+ * import { Effect, Layer } from "effect";
21534
+ *
21535
+ * // A policy that defers to npm semantics for everything it does not veto.
21536
+ * const withVeto = Layer.succeed(PublishabilityDetector, {
21537
+ * detect: (pkg) =>
21538
+ * pkg.name.endsWith("-private")
21539
+ * ? Effect.succeed([])
21540
+ * : PublishabilityDetector.npm.detect(pkg),
21541
+ * });
21542
+ * ```
21543
+ */
21544
+ static npm = { detect: (pkg) => Effect.sync(() => {
21164
21545
  const config = pkg.publishConfig;
21165
21546
  const access = config?.access;
21166
21547
  if (pkg.private && access === void 0) return [];
@@ -21171,11 +21552,37 @@ var PublishabilityDetector = class PublishabilityDetector extends Context.Servic
21171
21552
  access: access ?? "public",
21172
21553
  provenance: false
21173
21554
  })];
21174
- }) });
21555
+ }) };
21556
+ /** Nothing publishes. */
21557
+ static none = { detect: () => Effect.succeed([]) };
21558
+ /**
21559
+ * {@link PublishabilityDetector.npm} as a layer.
21560
+ *
21561
+ * @remarks
21562
+ * Named for its policy rather than called `layer`, deliberately. **No
21563
+ * composite in this package provides a publishability detector**: a
21564
+ * `Workspaces.layer()` that quietly supplied npm semantics made the choice
21565
+ * invisible, and worse, made a naively-ordered override lose to it in
21566
+ * silence — `Layer.mergeAll(myDetector, Workspaces.layer())` resolved to the
21567
+ * default, because `mergeAll` is last-wins. For a service that decides
21568
+ * whether a package publishes and to which registry, that silent revert was
21569
+ * the worst available failure. The requirement now sits in `R`, so the
21570
+ * choice is made once, explicitly, and unmade wiring does not compile.
21571
+ */
21572
+ static layerNpm = Layer.succeed(this, this.npm);
21573
+ /**
21574
+ * {@link PublishabilityDetector.none} as a layer: a workspace where nothing
21575
+ * publishes.
21576
+ *
21577
+ * @remarks
21578
+ * For dry runs, and for a release tool whose configuration disables
21579
+ * publishing wholesale — silk's changeset `mode: "none"` is exactly this.
21580
+ */
21581
+ static layerNone = Layer.succeed(this, this.none);
21175
21582
  };
21176
21583
 
21177
21584
  //#endregion
21178
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/importerVersions.js
21585
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/importerVersions.js
21179
21586
  /**
21180
21587
  * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
21181
21588
  *
@@ -21262,7 +21669,7 @@ const unanimousVersionOf = (index, dependency) => {
21262
21669
  };
21263
21670
 
21264
21671
  //#endregion
21265
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceCatalogs.js
21672
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceCatalogs.js
21266
21673
  /**
21267
21674
  * An immutable, fully-normalized catalog collection — the one catalog
21268
21675
  * resolution semantic in the package.
@@ -21772,7 +22179,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
21772
22179
  };
21773
22180
 
21774
22181
  //#endregion
21775
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
22182
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
21776
22183
  const EMPTY = Object.freeze(Object.create(null));
21777
22184
  const DependencyMap = Schema.Record(Schema.String, Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed(EMPTY)), Schema.withConstructorDefault(Effect.succeed(EMPTY)));
21778
22185
  /**
@@ -21996,7 +22403,7 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
21996
22403
  };
21997
22404
 
21998
22405
  //#endregion
21999
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceSnapshots.js
22406
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceSnapshots.js
22000
22407
  /** Whether `value` is a non-null, non-array object. */
22001
22408
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
22002
22409
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -22266,142 +22673,244 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
22266
22673
  };
22267
22674
 
22268
22675
  //#endregion
22269
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Workspaces.js
22270
- /**
22271
- * Every service that needs only a filesystem: root, package-manager detection,
22272
- * discovery, lockfile reading, catalogs and publishability.
22273
- *
22274
- * @remarks
22275
- * Requires core `FileSystem` and `Path`, which the consumer provides at the
22276
- * edge (`@effect/platform-node`, `@effect/platform-bun`, or a test's
22277
- * `FileSystem.layerNoop`).
22278
- *
22279
- * **Bind the result to a `const`.** This is a parameterized factory and layers
22280
- * memoize by reference, so calling it twice builds everything twice.
22281
- *
22282
- * @example
22283
- * ```ts
22284
- * import { Workspaces } from "@effected/workspaces";
22285
- * import { Layer } from "effect";
22286
- *
22287
- * const WorkspacesLayer = Workspaces.layer();
22288
- * const AppLayer = Layer.provide(WorkspacesLayer, PlatformLayer);
22289
- * ```
22290
- *
22291
- * @public
22292
- */
22676
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Workspaces.js
22293
22677
  const compose = (options, catalogsFactory) => {
22294
22678
  const roots = WorkspaceRoot.layer;
22295
22679
  const detector = PackageManagerDetector.layer;
22296
22680
  const discovery = WorkspaceDiscovery.layer(options).pipe(Layer.provide(roots));
22297
22681
  const lockfiles = LockfileReader.layer(options).pipe(Layer.provide(roots), Layer.provide(detector), Layer.provide(discovery));
22298
22682
  const catalogs = catalogsFactory(options).pipe(Layer.provide(roots), Layer.provide(lockfiles));
22299
- return Layer.mergeAll(roots, detector, discovery, lockfiles, catalogs, PublishabilityDetector.layer);
22683
+ return Layer.mergeAll(roots, detector, discovery, lockfiles, catalogs);
22300
22684
  };
22301
22685
  const layer = (options) => compose(options, WorkspaceCatalogs.layer);
22302
- /**
22303
- * The git-free composite plus {@link ChangeDetector} and
22304
- * {@link WorkspaceSnapshots}, over `@effected/git`'s `Git` service.
22305
- *
22306
- * @remarks
22307
- * The extra requirement is core's `ChildProcessSpawner` (behind `Git`), which
22308
- * is why it is a separate layer rather than a flag: a consumer that never
22309
- * detects changes or reads at a ref should not have to be able to spawn a
22310
- * subprocess. The consumer provides `ChildProcessSpawner` once at the edge
22311
- * (`@effect/platform-node`'s `NodeServices.layer`); a test provides
22312
- * `Layer.succeed(Git, …)` and needs no repository on disk.
22313
- *
22314
- * @public
22315
- */
22316
22686
  const layerWithGit = (options) => {
22317
22687
  const core = layer(options);
22318
22688
  const git = Git.layer;
22319
22689
  return Layer.mergeAll(core, git, ChangeDetector.layer.pipe(Layer.provide(git), Layer.provide(core)), WorkspaceSnapshots.layer(options).pipe(Layer.provide(git), Layer.provide(core)));
22320
22690
  };
22321
- /**
22322
- * The two `@effected/npm` resolver contracts, implemented for real.
22323
- *
22324
- * @remarks
22325
- * Provide this alongside `@effected/package-json`'s `Package.resolve` and a
22326
- * manifest's `catalog:` and `workspace:` specifiers resolve against the actual
22327
- * workspace instead of the no-op layers' `Option.none()`.
22328
- *
22329
- * @example
22330
- * ```ts
22331
- * import { Package } from "@effected/package-json";
22332
- * import { Workspaces } from "@effected/workspaces";
22333
- * import { Layer } from "effect";
22334
- *
22335
- * const WorkspacesLayer = Workspaces.layer();
22336
- * const Resolvers = Workspaces.resolvers.pipe(Layer.provide(WorkspacesLayer));
22337
- * ```
22338
- *
22339
- * @public
22340
- */
22341
22691
  const resolvers = Layer.mergeAll(WorkspaceCatalogs.catalogResolver, WorkspaceDiscovery.workspaceResolver);
22342
- /**
22343
- * The git-free composite, but with catalog assembly that **replays config
22344
- * dependency `pnpmfile.cjs` hooks** — {@link WorkspaceCatalogs.layerWithConfigDependencies}
22345
- * in place of the default no-op catalogs layer.
22346
- *
22347
- * @remarks
22348
- * Identical requirement set to {@link Workspaces.layer}; the only difference is
22349
- * that config-dependency code is executed in process. Opt in deliberately — the
22350
- * default {@link Workspaces.layer} never executes config-dependency code.
22351
- *
22352
- * **Bind the result to a `const`.**
22353
- *
22354
- * @public
22355
- */
22356
22692
  const layerWithConfigDependencies = (options) => compose(options, WorkspaceCatalogs.layerWithConfigDependencies);
22357
- /**
22358
- * The one-call resolver factory: {@link Workspaces.resolvers} pre-wired over
22359
- * {@link Workspaces.layerWithConfigDependencies}, so the two `@effected/npm`
22360
- * contracts (`CatalogResolver`, `WorkspaceResolver`) need only a platform
22361
- * (`FileSystem` + `Path`) from the consumer.
22362
- *
22363
- * @remarks
22364
- * This is deliberately a **parameterized layer function, and the fresh layer
22365
- * per call is the feature**: layers memoize by reference, so each call mints
22366
- * an unmemoized layer whose root discovery re-runs — including a per-call
22367
- * `process.cwd()` read when `options.cwd` is omitted. A build tool that
22368
- * changes directory between manifests gets a correct re-discovery each time
22369
- * precisely because nothing is shared across calls. When you *want* sharing,
22370
- * bind one call's result to a `const` and provide that; the memoization rule
22371
- * is unchanged, this factory just refuses to hide it.
22372
- *
22373
- * Catalog assembly replays config-dependency `pnpmfile` hooks (the
22374
- * `layerWithConfigDependencies` path) — the semantics a real pnpm install
22375
- * has. Compose {@link Workspaces.resolvers} with {@link Workspaces.layer}
22376
- * yourself if config-dependency code must not run in process.
22377
- *
22378
- * @example
22379
- * ```ts
22380
- * import { Workspaces } from "@effected/workspaces";
22381
- * import { Effect } from "effect";
22382
- *
22383
- * const program = doSomethingWithResolvers.pipe(
22384
- * Effect.provide(Workspaces.resolverLayer()),
22385
- * );
22386
- * ```
22387
- *
22388
- * @public
22389
- */
22390
22693
  const resolverLayer = (options) => resolvers.pipe(Layer.provide(layerWithConfigDependencies(options)));
22694
+ const resolveManifest = Effect.fn("Workspaces.resolveManifest")(function* (manifest, options) {
22695
+ return yield* manifest.resolve().pipe(Effect.provide(resolverLayer(options)));
22696
+ });
22697
+ const localExecLayer = (options) => Layer.effect(LocalExec, Effect.gen(function* () {
22698
+ const roots = yield* WorkspaceRoot;
22699
+ const detector = yield* PackageManagerDetector;
22700
+ return { context: Effect.gen(function* () {
22701
+ const cwd = options?.cwd ?? globalThis.process?.cwd?.() ?? "/";
22702
+ const root = yield* roots.find(cwd).pipe(Effect.asSome, Effect.orElseSucceed(Option.none));
22703
+ if (Option.isNone(root)) return Option.none();
22704
+ const detected = yield* detector.detect(root.value).pipe(Effect.asSome, Effect.catchTag("PackageManagerDetectionError", () => Effect.succeed(Option.none())), Effect.mapError((cause) => new LocalExecError({
22705
+ directory: root.value,
22706
+ cause
22707
+ })));
22708
+ if (Option.isNone(detected)) return Option.none();
22709
+ const { prefix, dlxPrefix } = LocalExec.prefixes(detected.value.name);
22710
+ return Option.some(ExecContext.make({
22711
+ label: detected.value.name,
22712
+ prefix,
22713
+ dlxPrefix,
22714
+ directory: root.value
22715
+ }));
22716
+ }) };
22717
+ }));
22391
22718
  /**
22392
22719
  * The composite layers.
22393
22720
  *
22394
22721
  * @public
22395
22722
  */
22396
- const Workspaces = {
22397
- layer,
22398
- layerWithConfigDependencies,
22399
- layerWithGit,
22400
- resolveManifest: Effect.fn("Workspaces.resolveManifest")(function* (manifest, options) {
22401
- return yield* manifest.resolve().pipe(Effect.provide(resolverLayer(options)));
22402
- }),
22403
- resolverLayer,
22404
- resolvers
22723
+ var Workspaces = class {
22724
+ constructor() {}
22725
+ /**
22726
+ * Every service that needs only a filesystem: root, package-manager
22727
+ * detection, discovery, lockfile reading, catalogs and publishability.
22728
+ *
22729
+ * @remarks
22730
+ * Requires core `FileSystem` and `Path`, which the consumer provides at the
22731
+ * edge (`@effect/platform-node`, `@effect/platform-bun`, or a test's
22732
+ * `FileSystem.layerNoop`).
22733
+ *
22734
+ * **Bind the result to a `const`.** This is a parameterized factory and
22735
+ * layers memoize by reference, so calling it twice builds everything twice.
22736
+ *
22737
+ * @example
22738
+ * ```ts
22739
+ * import { Workspaces } from "@effected/workspaces";
22740
+ * import { Layer } from "effect";
22741
+ *
22742
+ * const WorkspacesLayer = Workspaces.layer();
22743
+ * const AppLayer = Layer.provide(WorkspacesLayer, PlatformLayer);
22744
+ * ```
22745
+ */
22746
+ static layer = layer;
22747
+ /**
22748
+ * The git-free composite, but with catalog assembly that **replays config
22749
+ * dependency `pnpmfile.cjs` hooks** —
22750
+ * {@link WorkspaceCatalogs.layerWithConfigDependencies} in place of the
22751
+ * default no-op catalogs layer.
22752
+ *
22753
+ * @remarks
22754
+ * Identical requirement set to {@link Workspaces.layer}; the only
22755
+ * difference is that config-dependency code is executed in process. Opt in
22756
+ * deliberately — the default {@link Workspaces.layer} never executes
22757
+ * config-dependency code.
22758
+ *
22759
+ * **Bind the result to a `const`.**
22760
+ */
22761
+ static layerWithConfigDependencies = layerWithConfigDependencies;
22762
+ /**
22763
+ * The git-free composite plus {@link ChangeDetector} and
22764
+ * {@link WorkspaceSnapshots}, over `@effected/git`'s `Git` service.
22765
+ *
22766
+ * @remarks
22767
+ * The extra requirement is core's `ChildProcessSpawner` (behind `Git`),
22768
+ * which is why it is a separate layer rather than a flag: a consumer that
22769
+ * never detects changes or reads at a ref should not have to be able to
22770
+ * spawn a subprocess. The consumer provides `ChildProcessSpawner` once at
22771
+ * the edge (`@effect/platform-node`'s `NodeServices.layer`); a test
22772
+ * provides `Layer.succeed(Git, …)` and needs no repository on disk.
22773
+ */
22774
+ static layerWithGit = layerWithGit;
22775
+ /**
22776
+ * This package's implementation of `@effected/commands`' `LocalExec`
22777
+ * contract: how to run a project-local binary here.
22778
+ *
22779
+ * @remarks
22780
+ * **An inverted contract, the `@effected/npm` `CatalogResolver`
22781
+ * precedent.** Tool discovery needs package-manager detection and
22782
+ * workspace-root resolution, both of which live here — but a direct edge
22783
+ * from `@effected/commands` to this package would make that boundary-tier
22784
+ * package integrated, and through the planned `npm` → `commands` edge
22785
+ * would drag `npm`, `lockfiles` (pure!) and `package-json` up a tier with
22786
+ * it. So `commands` declares the narrow contract and we ship the layer.
22787
+ *
22788
+ * **The argv knowledge is not duplicated.** `LocalExec.prefixes(name)` is
22789
+ * the one home of the four managers' `exec`/`dlx` prefixes; this layer
22790
+ * detects *which* manager owns the directory and asks `commands` what that
22791
+ * manager's argv looks like. Neither package reimplements the other's
22792
+ * half.
22793
+ *
22794
+ * **`None` is success.** Outside any workspace — and inside one whose
22795
+ * manager cannot be identified — the answer is `Option.none()`: "there is
22796
+ * no project-local way to run tools here" is an ordinary fact, not an
22797
+ * exceptional one, and a consumer running in a bare directory should not
22798
+ * have to catch an error to learn it. The contract's typed
22799
+ * `LocalExecError` is reserved for **mechanism** failure — a manifest that
22800
+ * exists but cannot be read or parsed, which means something is broken
22801
+ * rather than absent. That is npm's resolver convention, adopted
22802
+ * verbatim.
22803
+ *
22804
+ * `directory` is the resolved **workspace root**, not the caller's cwd: a
22805
+ * project-local launcher has to run where the workspace is.
22806
+ *
22807
+ * A consumer with no monorepo never needs this layer, and therefore never
22808
+ * installs this package — `LocalExec.layerNone` and `LocalExec.layerFor`
22809
+ * are one-liners in `@effected/commands`.
22810
+ *
22811
+ * **Bind the result to a `const`** — a parameterized layer factory mints a
22812
+ * fresh reference per call and layers memoize by reference.
22813
+ *
22814
+ * @example
22815
+ * ```ts
22816
+ * import { ToolDiscovery } from "@effected/commands";
22817
+ * import { Workspaces } from "@effected/workspaces";
22818
+ * import { Layer } from "effect";
22819
+ *
22820
+ * const AppLayer = ToolDiscovery.layer.pipe(
22821
+ * Layer.provide(Workspaces.localExecLayer()),
22822
+ * Layer.provide(Workspaces.layer()),
22823
+ * Layer.provide(NodeServices.layer),
22824
+ * );
22825
+ * ```
22826
+ */
22827
+ static localExecLayer = localExecLayer;
22828
+ /**
22829
+ * Resolve every `catalog:` and `workspace:` specifier in one `Manifest`
22830
+ * against the real workspace, in one call — the 90% path. Decode stays at
22831
+ * the consumer's edge: build the `Manifest` with `Manifest.decode` (from
22832
+ * `@effected/npm`), hand it here, and get a new `Manifest` back with
22833
+ * concrete ranges; `toRecord()` returns to the wire shape.
22834
+ *
22835
+ * @remarks
22836
+ * Composes `manifest.resolve()` with a fresh {@link Workspaces.resolverLayer}
22837
+ * per call, so the workspace root is re-discovered from `options.cwd` (or
22838
+ * the current `process.cwd()`) on every invocation. Consumers processing
22839
+ * many manifests should check `manifest.needsResolution` first and skip
22840
+ * the call entirely when no dependency field carries a
22841
+ * `catalog:`/`workspace:` specifier — that predicate is pure and avoids
22842
+ * catalog assembly altogether.
22843
+ *
22844
+ * A specifier the workspace cannot answer fails typed as
22845
+ * `UnresolvedDependencyError`; assembly and mechanism failures surface as
22846
+ * `CatalogAssemblyError` / `DependencyResolutionError`.
22847
+ *
22848
+ * @example
22849
+ * ```ts
22850
+ * import { Manifest } from "@effected/npm";
22851
+ * import { Workspaces } from "@effected/workspaces";
22852
+ * import { Effect } from "effect";
22853
+ *
22854
+ * const program = Effect.gen(function* () {
22855
+ * const manifest = yield* Manifest.decode({ dependencies: { effect: "catalog:" } });
22856
+ * const resolved = manifest.needsResolution ? yield* Workspaces.resolveManifest(manifest) : manifest;
22857
+ * return resolved.toRecord();
22858
+ * });
22859
+ * ```
22860
+ */
22861
+ static resolveManifest = resolveManifest;
22862
+ /**
22863
+ * The one-call resolver factory: {@link Workspaces.resolvers} pre-wired
22864
+ * over {@link Workspaces.layerWithConfigDependencies}, so the two
22865
+ * `@effected/npm` contracts (`CatalogResolver`, `WorkspaceResolver`) need
22866
+ * only a platform (`FileSystem` + `Path`) from the consumer.
22867
+ *
22868
+ * @remarks
22869
+ * This is deliberately a **parameterized layer function, and the fresh
22870
+ * layer per call is the feature**: layers memoize by reference, so each
22871
+ * call mints an unmemoized layer whose root discovery re-runs — including
22872
+ * a per-call `process.cwd()` read when `options.cwd` is omitted. A build
22873
+ * tool that changes directory between manifests gets a correct
22874
+ * re-discovery each time precisely because nothing is shared across
22875
+ * calls. When you *want* sharing, bind one call's result to a `const` and
22876
+ * provide that; the memoization rule is unchanged, this factory just
22877
+ * refuses to hide it.
22878
+ *
22879
+ * Catalog assembly replays config-dependency `pnpmfile` hooks (the
22880
+ * `layerWithConfigDependencies` path) — the semantics a real pnpm install
22881
+ * has. Compose {@link Workspaces.resolvers} with {@link Workspaces.layer}
22882
+ * yourself if config-dependency code must not run in process.
22883
+ *
22884
+ * @example
22885
+ * ```ts
22886
+ * import { Workspaces } from "@effected/workspaces";
22887
+ * import { Effect } from "effect";
22888
+ *
22889
+ * const program = doSomethingWithResolvers.pipe(
22890
+ * Effect.provide(Workspaces.resolverLayer()),
22891
+ * );
22892
+ * ```
22893
+ */
22894
+ static resolverLayer = resolverLayer;
22895
+ /**
22896
+ * The two `@effected/npm` resolver contracts, implemented for real.
22897
+ *
22898
+ * @remarks
22899
+ * Provide this alongside `@effected/package-json`'s `Package.resolve` and
22900
+ * a manifest's `catalog:` and `workspace:` specifiers resolve against the
22901
+ * actual workspace instead of the no-op layers' `Option.none()`.
22902
+ *
22903
+ * @example
22904
+ * ```ts
22905
+ * import { Package } from "@effected/package-json";
22906
+ * import { Workspaces } from "@effected/workspaces";
22907
+ * import { Layer } from "effect";
22908
+ *
22909
+ * const WorkspacesLayer = Workspaces.layer();
22910
+ * const Resolvers = Workspaces.resolvers.pipe(Layer.provide(WorkspacesLayer));
22911
+ * ```
22912
+ */
22913
+ static resolvers = resolvers;
22405
22914
  };
22406
22915
 
22407
22916
  //#endregion
@@ -22660,7 +23169,7 @@ const SilkPublishabilityDetectorLive = Layer.effect(PublishabilityDetector, Effe
22660
23169
  const PublishabilityDetectorAdaptiveLive = Layer.effect(PublishabilityDetector, Effect.gen(function* () {
22661
23170
  const fs = yield* FileSystem.FileSystem;
22662
23171
  const config = yield* ChangesetConfig;
22663
- const vanilla = yield* Effect.provide(PublishabilityDetector, PublishabilityDetector.layer);
23172
+ const vanilla = PublishabilityDetector.npm;
22664
23173
  return { detect: (pkg) => Effect.gen(function* () {
22665
23174
  const root = pkg.workspaceRoot;
22666
23175
  if (yield* config.isIgnored(pkg.name, root)) return [];
@@ -23386,7 +23895,6 @@ const MarkdownParseErrorBase = Data.TaggedError("MarkdownParseError");
23386
23895
  * );
23387
23896
  * ```
23388
23897
  *
23389
- * @see {@link MarkdownService} for the Effect service that may produce this error
23390
23898
  *
23391
23899
  * @public
23392
23900
  */
@@ -24588,7 +25096,7 @@ var GitHubService = class extends Context.Service()("GitHubService") {};
24588
25096
  * @remarks
24589
25097
  * This layer is used by the `\@savvy-web/changesets/changelog` entry point
24590
25098
  * to resolve commit hashes into PR numbers and author attribution. It is
24591
- * composed with {@link MarkdownLive} in the changelog formatter's
25099
+ * used by the changelog formatter's
24592
25100
  * `MainLayer`.
24593
25101
  *
24594
25102
  * @example
@@ -24657,6 +25165,279 @@ function makeGitHubTest(responses) {
24657
25165
  } });
24658
25166
  }
24659
25167
 
25168
+ //#endregion
25169
+ //#region ../silk-effects/dist/dev/pkg/changesets/schemas/primitives.js
25170
+ /**
25171
+ * Primitive reusable schemas for common constrained types.
25172
+ *
25173
+ * @remarks
25174
+ * These schemas serve as building blocks for more complex schemas throughout
25175
+ * the \@savvy-web/changesets package. They encode common constraints
25176
+ * (non-empty strings, positive integers) as Effect Schemas so that validation
25177
+ * is enforced at system boundaries.
25178
+ *
25179
+ * @see {@link https://effect.website/docs/schema/introduction | Effect Schema documentation}
25180
+ *
25181
+ */
25182
+ /**
25183
+ * A non-empty string schema.
25184
+ *
25185
+ * @remarks
25186
+ * Validates that a string has at least one character. Used as the base
25187
+ * constraint for package names, dependency identifiers, and other fields
25188
+ * that must not be blank.
25189
+ *
25190
+ * @example
25191
+ * ```typescript
25192
+ * import { Schema } from "effect";
25193
+ * import { NonEmptyString } from "@savvy-web/changesets";
25194
+ *
25195
+ * // Succeeds — non-empty string
25196
+ * const name = Schema.decodeUnknownSync(NonEmptyString)("react");
25197
+ *
25198
+ * // Throws ParseError — empty string
25199
+ * Schema.decodeUnknownSync(NonEmptyString)("");
25200
+ * ```
25201
+ *
25202
+ * @see {@link ChangesetSummarySchema} for a length-bounded variant used for changeset summaries
25203
+ *
25204
+ * @public
25205
+ */
25206
+ const NonEmptyString = Schema.String.check(Schema.isMinLength(1));
25207
+ /**
25208
+ * A positive integer schema.
25209
+ *
25210
+ * @remarks
25211
+ * Validates that a number is both an integer and strictly greater than zero.
25212
+ * Used as the base constraint for GitHub issue numbers and similar
25213
+ * identifiers that must be positive whole numbers.
25214
+ *
25215
+ * @example
25216
+ * ```typescript
25217
+ * import { Schema } from "effect";
25218
+ * import { PositiveInteger } from "@savvy-web/changesets";
25219
+ *
25220
+ * // Succeeds — positive integer
25221
+ * const issueNum = Schema.decodeUnknownSync(PositiveInteger)(42);
25222
+ *
25223
+ * // Throws ParseError — zero is not positive
25224
+ * Schema.decodeUnknownSync(PositiveInteger)(0);
25225
+ *
25226
+ * // Throws ParseError — floats are not integers
25227
+ * Schema.decodeUnknownSync(PositiveInteger)(3.14);
25228
+ * ```
25229
+ *
25230
+ * @see {@link IssueNumberSchema} which builds on this for GitHub issue/PR numbers
25231
+ *
25232
+ * @public
25233
+ */
25234
+ const PositiveInteger = Schema.Number.check(Schema.isInt(), Schema.isGreaterThan(0));
25235
+
25236
+ //#endregion
25237
+ //#region ../silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.js
25238
+ /**
25239
+ * Effect schemas for structured dependency table entries.
25240
+ *
25241
+ * @remarks
25242
+ * These schemas define the canonical representation for dependency
25243
+ * changes tracked as markdown tables in changeset files and CHANGELOGs.
25244
+ * The table format provides a richer view than {@link DependencyUpdateSchema}
25245
+ * by supporting singular dependency type names, workspace/config types,
25246
+ * and explicit add/update/remove actions.
25247
+ *
25248
+ * A dependency table row looks like this in a CHANGELOG:
25249
+ *
25250
+ * | Dependency | Type | Action | From | To |
25251
+ * |---|---|---|---|---|
25252
+ * | effect | dependency | updated | 3.18.0 | 3.19.1 |
25253
+ *
25254
+ * @see {@link DependencyUpdateSchema} for the simpler Changesets API format
25255
+ * @see {@link https://effect.website/docs/schema/introduction | Effect Schema documentation}
25256
+ *
25257
+ */
25258
+ /**
25259
+ * Valid dependency table actions.
25260
+ *
25261
+ * @remarks
25262
+ * Represents the three possible operations on a dependency: `"added"` for
25263
+ * new dependencies, `"updated"` for version changes, and `"removed"` for
25264
+ * deletions. Used in the "Action" column of dependency tables.
25265
+ *
25266
+ * @example
25267
+ * ```typescript
25268
+ * import { Schema } from "effect";
25269
+ * import { DependencyActionSchema } from "@savvy-web/changesets";
25270
+ * import type { DependencyAction } from "@savvy-web/changesets";
25271
+ *
25272
+ * const action: DependencyAction = Schema.decodeUnknownSync(DependencyActionSchema)("updated");
25273
+ * ```
25274
+ *
25275
+ * @public
25276
+ */
25277
+ const DependencyActionSchema = Schema.Literals([
25278
+ "added",
25279
+ "updated",
25280
+ "removed"
25281
+ ]);
25282
+ /**
25283
+ * Extended dependency types for table format.
25284
+ *
25285
+ * @remarks
25286
+ * Unlike {@link DependencyTypeSchema} (which uses plural npm field names like
25287
+ * `"dependencies"`), this schema uses singular forms (`"dependency"`) and adds
25288
+ * two additional types: `"workspace"` for monorepo workspace references and
25289
+ * `"config"` for configuration toolchain updates (e.g., ESLint, TypeScript).
25290
+ *
25291
+ * @example
25292
+ * ```typescript
25293
+ * import { Schema } from "effect";
25294
+ * import { DependencyTableTypeSchema } from "@savvy-web/changesets";
25295
+ * import type { DependencyTableType } from "@savvy-web/changesets";
25296
+ *
25297
+ * const tableType: DependencyTableType = Schema.decodeUnknownSync(
25298
+ * DependencyTableTypeSchema
25299
+ * )("workspace");
25300
+ * ```
25301
+ *
25302
+ * @see {@link DependencyTypeSchema} for the plural npm-field variant
25303
+ *
25304
+ * @public
25305
+ */
25306
+ const DependencyTableTypeSchema = Schema.Literals([
25307
+ "dependency",
25308
+ "devDependency",
25309
+ "peerDependency",
25310
+ "optionalDependency",
25311
+ "workspace",
25312
+ "config"
25313
+ ]);
25314
+ /**
25315
+ * The canonical accepted-value pattern for a dependency-table From/To cell:
25316
+ * the em-dash sentinel (U+2014), a bare/`~`/`^` semver, or — as a last-resort
25317
+ * fallback when a `catalog:`/`workspace:` specifier could not be resolved to a
25318
+ * concrete version — a pnpm protocol string. Non-overlapping alternatives keep
25319
+ * this free of polynomial backtracking (CodeQL).
25320
+ *
25321
+ * @public
25322
+ */
25323
+ const VERSION_RE = /^(\u2014|[~^]?\d+\.\d+\.\d+(?:[-+.][\w.+-]+)?|(?:catalog|workspace|npm|jsr|file|link|portal):[^\s|]+)$/;
25324
+ /**
25325
+ * Version string or em dash (U+2014) sentinel for added/removed entries.
25326
+ *
25327
+ * @remarks
25328
+ * Accepts either a semver-like version string (with optional `~` or `^`
25329
+ * prefix and pre-release/build suffixes) or the em dash character `\u2014`
25330
+ * which serves as a sentinel: the "From" column uses `\u2014` for newly
25331
+ * added dependencies, and the "To" column uses it for removed ones.
25332
+ *
25333
+ * @example
25334
+ * ```typescript
25335
+ * import { Schema } from "effect";
25336
+ * import { VersionOrEmptySchema } from "@savvy-web/changesets";
25337
+ *
25338
+ * // Succeeds — semver version
25339
+ * Schema.decodeUnknownSync(VersionOrEmptySchema)("^3.19.1");
25340
+ *
25341
+ * // Succeeds — em dash sentinel for "no version"
25342
+ * Schema.decodeUnknownSync(VersionOrEmptySchema)("\u2014");
25343
+ *
25344
+ * // Throws ParseError — arbitrary text
25345
+ * Schema.decodeUnknownSync(VersionOrEmptySchema)("latest");
25346
+ * ```
25347
+ *
25348
+ * @public
25349
+ */
25350
+ const VersionOrEmptySchema = Schema.String.check(Schema.isPattern(VERSION_RE));
25351
+ /**
25352
+ * Schema for a single dependency table row.
25353
+ *
25354
+ * @remarks
25355
+ * Represents one row of a dependency update table in a CHANGELOG.
25356
+ * Each row captures the dependency name, its type, the change action,
25357
+ * and the "from" and "to" version strings. For added dependencies the
25358
+ * `from` field is an em dash; for removed dependencies the `to` field
25359
+ * is an em dash.
25360
+ *
25361
+ * @example
25362
+ * ```typescript
25363
+ * import { Schema } from "effect";
25364
+ * import { DependencyTableRowSchema } from "@savvy-web/changesets";
25365
+ * import type { DependencyTableRow } from "@savvy-web/changesets";
25366
+ *
25367
+ * const row: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({
25368
+ * dependency: "effect",
25369
+ * type: "dependency",
25370
+ * action: "updated",
25371
+ * from: "3.18.0",
25372
+ * to: "3.19.1",
25373
+ * });
25374
+ *
25375
+ * // Newly added dependency — "from" is em dash
25376
+ * const addedRow: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({
25377
+ * dependency: "@effect/cli",
25378
+ * type: "dependency",
25379
+ * action: "added",
25380
+ * from: "\u2014",
25381
+ * to: "0.50.0",
25382
+ * });
25383
+ * ```
25384
+ *
25385
+ * @see {@link DependencyTableRow} for the inferred TypeScript type
25386
+ * @see {@link DependencyTableSchema} for a non-empty array of rows
25387
+ *
25388
+ * @public
25389
+ */
25390
+ const DependencyTableRowSchema = Schema.Struct({
25391
+ /** Package or toolchain name. */
25392
+ dependency: NonEmptyString,
25393
+ /** Dependency type. */
25394
+ type: DependencyTableTypeSchema,
25395
+ /** Change action. */
25396
+ action: DependencyActionSchema,
25397
+ /** Previous version (em dash for added). */
25398
+ from: VersionOrEmptySchema,
25399
+ /** New version (em dash for removed). */
25400
+ to: VersionOrEmptySchema
25401
+ });
25402
+ /**
25403
+ * Schema for a dependency table (non-empty array of rows).
25404
+ *
25405
+ * @remarks
25406
+ * Validates that the table contains at least one row. Used to represent
25407
+ * the full dependency update table in a changeset or CHANGELOG entry.
25408
+ *
25409
+ * @example
25410
+ * ```typescript
25411
+ * import { Schema } from "effect";
25412
+ * import { DependencyTableSchema } from "@savvy-web/changesets";
25413
+ *
25414
+ * const table = Schema.decodeUnknownSync(DependencyTableSchema)([
25415
+ * {
25416
+ * dependency: "effect",
25417
+ * type: "dependency",
25418
+ * action: "updated",
25419
+ * from: "3.18.0",
25420
+ * to: "3.19.1",
25421
+ * },
25422
+ * {
25423
+ * dependency: "typescript",
25424
+ * type: "config",
25425
+ * action: "updated",
25426
+ * from: "5.6.0",
25427
+ * to: "5.7.2",
25428
+ * },
25429
+ * ]);
25430
+ *
25431
+ * // Throws ParseError — empty array
25432
+ * Schema.decodeUnknownSync(DependencyTableSchema)([]);
25433
+ * ```
25434
+ *
25435
+ * @see {@link DependencyTableRowSchema} for the individual row schema
25436
+ *
25437
+ * @public
25438
+ */
25439
+ const DependencyTableSchema = Schema.Array(DependencyTableRowSchema).check(Schema.isMinLength(1));
25440
+
24660
25441
  //#endregion
24661
25442
  //#region ../../node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
24662
25443
  /**
@@ -44299,368 +45080,6 @@ function stringifyMarkdown(tree) {
44299
45080
  return createRemarkProcessor().stringify(tree);
44300
45081
  }
44301
45082
 
44302
- //#endregion
44303
- //#region ../silk-effects/dist/dev/pkg/changesets/services/markdown.js
44304
- /**
44305
- * Markdown service for parsing and stringifying mdast trees.
44306
- *
44307
- * Defines the {@link MarkdownService} Effect service tag and the
44308
- * {@link MarkdownLive | production layer} backed by the remark/unified
44309
- * pipeline. This service provides a pure, side-effect-free interface to
44310
- * markdown parsing and stringification used throughout the changelog
44311
- * formatter and remark transform pipeline.
44312
- *
44313
- * @remarks
44314
- * The service wraps the `remark-pipeline` utility functions (`parseMarkdown`
44315
- * and `stringifyMarkdown`) behind an Effect interface. The `parse` operation
44316
- * returns an mdast `Root` node; the `stringify` operation serializes an
44317
- * mdast `Root` back to a markdown string. Both operations are synchronous
44318
- * under the hood but are lifted into `Effect.sync` for composability.
44319
- *
44320
- * @see {@link MarkdownService} for the Effect service tag
44321
- * @see {@link MarkdownServiceShape} for the service interface
44322
- * @see {@link MarkdownLive} for the production layer
44323
- */
44324
- /**
44325
- * Effect service tag for markdown parsing and stringification.
44326
- *
44327
- * Provides dependency-injected access to markdown parse/stringify operations.
44328
- * Use `yield* MarkdownService` inside an `Effect.gen` block to obtain the
44329
- * service instance.
44330
- *
44331
- * @remarks
44332
- * This tag follows the standard Effect `Context.Service` pattern. The
44333
- * {@link MarkdownLive} layer provides the default implementation backed by
44334
- * the remark/unified pipeline. For testing, you can supply a custom layer
44335
- * via `Layer.succeed(MarkdownService, { parse: ..., stringify: ... })`.
44336
- *
44337
- * @example
44338
- * ```typescript
44339
- * import { Effect } from "effect";
44340
- * import { MarkdownService, MarkdownLive } from "\@savvy-web/changesets";
44341
- *
44342
- * const program = Effect.gen(function* () {
44343
- * const md = yield* MarkdownService;
44344
- * const tree = yield* md.parse("# Hello\n\nWorld");
44345
- * const output = yield* md.stringify(tree);
44346
- * console.log(output); // "# Hello\n\nWorld\n"
44347
- * });
44348
- *
44349
- * Effect.runPromise(program.pipe(Effect.provide(MarkdownLive)));
44350
- * ```
44351
- *
44352
- * @see {@link MarkdownServiceShape} for the service interface
44353
- * @see {@link MarkdownLive} for the production layer
44354
- *
44355
- * @public
44356
- */
44357
- var MarkdownService = class extends Context.Service()("MarkdownService") {};
44358
- /**
44359
- * Production layer for {@link MarkdownService}.
44360
- *
44361
- * Wraps the remark-pipeline utility functions (`parseMarkdown` and
44362
- * `stringifyMarkdown`) in `Effect.sync` for use in Effect programs.
44363
- * Both operations are synchronous and infallible.
44364
- *
44365
- * @remarks
44366
- * This layer is composed with {@link GitHubLive} in the
44367
- * `\@savvy-web/changesets/changelog` entry point to form the `MainLayer`
44368
- * that powers the Changesets API integration.
44369
- *
44370
- * @example
44371
- * ```typescript
44372
- * import { Effect, Layer } from "effect";
44373
- * import { MarkdownService, MarkdownLive } from "\@savvy-web/changesets";
44374
- *
44375
- * const program = Effect.gen(function* () {
44376
- * const md = yield* MarkdownService;
44377
- * const tree = yield* md.parse("**bold** text");
44378
- * return yield* md.stringify(tree);
44379
- * });
44380
- *
44381
- * Effect.runPromise(program.pipe(Effect.provide(MarkdownLive)));
44382
- * ```
44383
- *
44384
- * @public
44385
- */
44386
- const MarkdownLive = Layer.succeed(MarkdownService, {
44387
- parse: (content) => Effect.sync(() => parseMarkdown(content)),
44388
- stringify: (tree) => Effect.sync(() => stringifyMarkdown(tree))
44389
- });
44390
-
44391
- //#endregion
44392
- //#region ../silk-effects/dist/dev/pkg/changesets/schemas/primitives.js
44393
- /**
44394
- * Primitive reusable schemas for common constrained types.
44395
- *
44396
- * @remarks
44397
- * These schemas serve as building blocks for more complex schemas throughout
44398
- * the \@savvy-web/changesets package. They encode common constraints
44399
- * (non-empty strings, positive integers) as Effect Schemas so that validation
44400
- * is enforced at system boundaries.
44401
- *
44402
- * @see {@link https://effect.website/docs/schema/introduction | Effect Schema documentation}
44403
- *
44404
- */
44405
- /**
44406
- * A non-empty string schema.
44407
- *
44408
- * @remarks
44409
- * Validates that a string has at least one character. Used as the base
44410
- * constraint for package names, dependency identifiers, and other fields
44411
- * that must not be blank.
44412
- *
44413
- * @example
44414
- * ```typescript
44415
- * import { Schema } from "effect";
44416
- * import { NonEmptyString } from "@savvy-web/changesets";
44417
- *
44418
- * // Succeeds — non-empty string
44419
- * const name = Schema.decodeUnknownSync(NonEmptyString)("react");
44420
- *
44421
- * // Throws ParseError — empty string
44422
- * Schema.decodeUnknownSync(NonEmptyString)("");
44423
- * ```
44424
- *
44425
- * @see {@link ChangesetSummarySchema} for a length-bounded variant used for changeset summaries
44426
- *
44427
- * @public
44428
- */
44429
- const NonEmptyString = Schema.String.check(Schema.isMinLength(1));
44430
- /**
44431
- * A positive integer schema.
44432
- *
44433
- * @remarks
44434
- * Validates that a number is both an integer and strictly greater than zero.
44435
- * Used as the base constraint for GitHub issue numbers and similar
44436
- * identifiers that must be positive whole numbers.
44437
- *
44438
- * @example
44439
- * ```typescript
44440
- * import { Schema } from "effect";
44441
- * import { PositiveInteger } from "@savvy-web/changesets";
44442
- *
44443
- * // Succeeds — positive integer
44444
- * const issueNum = Schema.decodeUnknownSync(PositiveInteger)(42);
44445
- *
44446
- * // Throws ParseError — zero is not positive
44447
- * Schema.decodeUnknownSync(PositiveInteger)(0);
44448
- *
44449
- * // Throws ParseError — floats are not integers
44450
- * Schema.decodeUnknownSync(PositiveInteger)(3.14);
44451
- * ```
44452
- *
44453
- * @see {@link IssueNumberSchema} which builds on this for GitHub issue/PR numbers
44454
- *
44455
- * @public
44456
- */
44457
- const PositiveInteger = Schema.Number.check(Schema.isInt(), Schema.isGreaterThan(0));
44458
-
44459
- //#endregion
44460
- //#region ../silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.js
44461
- /**
44462
- * Effect schemas for structured dependency table entries.
44463
- *
44464
- * @remarks
44465
- * These schemas define the canonical representation for dependency
44466
- * changes tracked as markdown tables in changeset files and CHANGELOGs.
44467
- * The table format provides a richer view than {@link DependencyUpdateSchema}
44468
- * by supporting singular dependency type names, workspace/config types,
44469
- * and explicit add/update/remove actions.
44470
- *
44471
- * A dependency table row looks like this in a CHANGELOG:
44472
- *
44473
- * | Dependency | Type | Action | From | To |
44474
- * |---|---|---|---|---|
44475
- * | effect | dependency | updated | 3.18.0 | 3.19.1 |
44476
- *
44477
- * @see {@link DependencyUpdateSchema} for the simpler Changesets API format
44478
- * @see {@link https://effect.website/docs/schema/introduction | Effect Schema documentation}
44479
- *
44480
- */
44481
- /**
44482
- * Valid dependency table actions.
44483
- *
44484
- * @remarks
44485
- * Represents the three possible operations on a dependency: `"added"` for
44486
- * new dependencies, `"updated"` for version changes, and `"removed"` for
44487
- * deletions. Used in the "Action" column of dependency tables.
44488
- *
44489
- * @example
44490
- * ```typescript
44491
- * import { Schema } from "effect";
44492
- * import { DependencyActionSchema } from "@savvy-web/changesets";
44493
- * import type { DependencyAction } from "@savvy-web/changesets";
44494
- *
44495
- * const action: DependencyAction = Schema.decodeUnknownSync(DependencyActionSchema)("updated");
44496
- * ```
44497
- *
44498
- * @public
44499
- */
44500
- const DependencyActionSchema = Schema.Literals([
44501
- "added",
44502
- "updated",
44503
- "removed"
44504
- ]);
44505
- /**
44506
- * Extended dependency types for table format.
44507
- *
44508
- * @remarks
44509
- * Unlike {@link DependencyTypeSchema} (which uses plural npm field names like
44510
- * `"dependencies"`), this schema uses singular forms (`"dependency"`) and adds
44511
- * two additional types: `"workspace"` for monorepo workspace references and
44512
- * `"config"` for configuration toolchain updates (e.g., ESLint, TypeScript).
44513
- *
44514
- * @example
44515
- * ```typescript
44516
- * import { Schema } from "effect";
44517
- * import { DependencyTableTypeSchema } from "@savvy-web/changesets";
44518
- * import type { DependencyTableType } from "@savvy-web/changesets";
44519
- *
44520
- * const tableType: DependencyTableType = Schema.decodeUnknownSync(
44521
- * DependencyTableTypeSchema
44522
- * )("workspace");
44523
- * ```
44524
- *
44525
- * @see {@link DependencyTypeSchema} for the plural npm-field variant
44526
- *
44527
- * @public
44528
- */
44529
- const DependencyTableTypeSchema = Schema.Literals([
44530
- "dependency",
44531
- "devDependency",
44532
- "peerDependency",
44533
- "optionalDependency",
44534
- "workspace",
44535
- "config"
44536
- ]);
44537
- /**
44538
- * The canonical accepted-value pattern for a dependency-table From/To cell:
44539
- * the em-dash sentinel (U+2014), a bare/`~`/`^` semver, or — as a last-resort
44540
- * fallback when a `catalog:`/`workspace:` specifier could not be resolved to a
44541
- * concrete version — a pnpm protocol string. Non-overlapping alternatives keep
44542
- * this free of polynomial backtracking (CodeQL).
44543
- *
44544
- * @public
44545
- */
44546
- const VERSION_RE = /^(\u2014|[~^]?\d+\.\d+\.\d+(?:[-+.][\w.+-]+)?|(?:catalog|workspace|npm|jsr|file|link|portal):[^\s|]+)$/;
44547
- /**
44548
- * Version string or em dash (U+2014) sentinel for added/removed entries.
44549
- *
44550
- * @remarks
44551
- * Accepts either a semver-like version string (with optional `~` or `^`
44552
- * prefix and pre-release/build suffixes) or the em dash character `\u2014`
44553
- * which serves as a sentinel: the "From" column uses `\u2014` for newly
44554
- * added dependencies, and the "To" column uses it for removed ones.
44555
- *
44556
- * @example
44557
- * ```typescript
44558
- * import { Schema } from "effect";
44559
- * import { VersionOrEmptySchema } from "@savvy-web/changesets";
44560
- *
44561
- * // Succeeds — semver version
44562
- * Schema.decodeUnknownSync(VersionOrEmptySchema)("^3.19.1");
44563
- *
44564
- * // Succeeds — em dash sentinel for "no version"
44565
- * Schema.decodeUnknownSync(VersionOrEmptySchema)("\u2014");
44566
- *
44567
- * // Throws ParseError — arbitrary text
44568
- * Schema.decodeUnknownSync(VersionOrEmptySchema)("latest");
44569
- * ```
44570
- *
44571
- * @public
44572
- */
44573
- const VersionOrEmptySchema = Schema.String.check(Schema.isPattern(VERSION_RE));
44574
- /**
44575
- * Schema for a single dependency table row.
44576
- *
44577
- * @remarks
44578
- * Represents one row of a dependency update table in a CHANGELOG.
44579
- * Each row captures the dependency name, its type, the change action,
44580
- * and the "from" and "to" version strings. For added dependencies the
44581
- * `from` field is an em dash; for removed dependencies the `to` field
44582
- * is an em dash.
44583
- *
44584
- * @example
44585
- * ```typescript
44586
- * import { Schema } from "effect";
44587
- * import { DependencyTableRowSchema } from "@savvy-web/changesets";
44588
- * import type { DependencyTableRow } from "@savvy-web/changesets";
44589
- *
44590
- * const row: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({
44591
- * dependency: "effect",
44592
- * type: "dependency",
44593
- * action: "updated",
44594
- * from: "3.18.0",
44595
- * to: "3.19.1",
44596
- * });
44597
- *
44598
- * // Newly added dependency — "from" is em dash
44599
- * const addedRow: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({
44600
- * dependency: "@effect/cli",
44601
- * type: "dependency",
44602
- * action: "added",
44603
- * from: "\u2014",
44604
- * to: "0.50.0",
44605
- * });
44606
- * ```
44607
- *
44608
- * @see {@link DependencyTableRow} for the inferred TypeScript type
44609
- * @see {@link DependencyTableSchema} for a non-empty array of rows
44610
- *
44611
- * @public
44612
- */
44613
- const DependencyTableRowSchema = Schema.Struct({
44614
- /** Package or toolchain name. */
44615
- dependency: NonEmptyString,
44616
- /** Dependency type. */
44617
- type: DependencyTableTypeSchema,
44618
- /** Change action. */
44619
- action: DependencyActionSchema,
44620
- /** Previous version (em dash for added). */
44621
- from: VersionOrEmptySchema,
44622
- /** New version (em dash for removed). */
44623
- to: VersionOrEmptySchema
44624
- });
44625
- /**
44626
- * Schema for a dependency table (non-empty array of rows).
44627
- *
44628
- * @remarks
44629
- * Validates that the table contains at least one row. Used to represent
44630
- * the full dependency update table in a changeset or CHANGELOG entry.
44631
- *
44632
- * @example
44633
- * ```typescript
44634
- * import { Schema } from "effect";
44635
- * import { DependencyTableSchema } from "@savvy-web/changesets";
44636
- *
44637
- * const table = Schema.decodeUnknownSync(DependencyTableSchema)([
44638
- * {
44639
- * dependency: "effect",
44640
- * type: "dependency",
44641
- * action: "updated",
44642
- * from: "3.18.0",
44643
- * to: "3.19.1",
44644
- * },
44645
- * {
44646
- * dependency: "typescript",
44647
- * type: "config",
44648
- * action: "updated",
44649
- * from: "5.6.0",
44650
- * to: "5.7.2",
44651
- * },
44652
- * ]);
44653
- *
44654
- * // Throws ParseError — empty array
44655
- * Schema.decodeUnknownSync(DependencyTableSchema)([]);
44656
- * ```
44657
- *
44658
- * @see {@link DependencyTableRowSchema} for the individual row schema
44659
- *
44660
- * @public
44661
- */
44662
- const DependencyTableSchema = Schema.Array(DependencyTableRowSchema).check(Schema.isMinLength(1));
44663
-
44664
45083
  //#endregion
44665
45084
  //#region ../silk-effects/dist/dev/pkg/changesets/utils/dependency-table.js
44666
45085
  /**
@@ -45833,8 +46252,7 @@ function getReleaseLine(changeset, versionType, options) {
45833
46252
  * @remarks
45834
46253
  * The module composes two Effect programs — {@link getReleaseLine} and
45835
46254
  * {@link getDependencyReleaseLine} — and runs each through
45836
- * `Effect.runPromise` with a merged layer of {@link GitHubLive} (for commit
45837
- * metadata) and {@link MarkdownLive} (for mdast parsing). Options are
46255
+ * `Effect.runPromise` with {@link GitHubLive} (for commit metadata). Options are
45838
46256
  * validated at the boundary via `validateChangesetOptions` before being
45839
46257
  * passed to the formatters.
45840
46258
  *
@@ -45874,16 +46292,16 @@ function getReleaseLine(changeset, versionType, options) {
45874
46292
  * @see {@link getDependencyReleaseLine} in `./getDependencyReleaseLine.ts` for dependency table formatting
45875
46293
  */
45876
46294
  /**
45877
- * Combined layer providing all services needed by the formatters.
46295
+ * The layer providing every service the formatters need.
45878
46296
  *
45879
- * Merges {@link GitHubLive} and {@link MarkdownLive} into a single layer
45880
- * that satisfies the environment requirements of both `getReleaseLine`
45881
- * (which needs `GitHubService` and `MarkdownService`) and
45882
- * `getDependencyReleaseLine` (which needs `GitHubService`).
46297
+ * {@link GitHubLive} satisfies the requirements of both `getReleaseLine` and
46298
+ * `getDependencyReleaseLine`, which each need only `GitHubService`. Markdown
46299
+ * parsing is not a layer: the formatters call the remark pipeline's
46300
+ * `parseMarkdown` / `stringifyMarkdown` functions directly.
45883
46301
  *
45884
46302
  * @internal
45885
46303
  */
45886
- const MainLayer = Layer.mergeAll(GitHubLive, MarkdownLive);
46304
+ const MainLayer = GitHubLive;
45887
46305
  /**
45888
46306
  * Changesets API `ChangelogFunctions` implementation.
45889
46307
  *
@@ -45925,8 +46343,7 @@ const changelogFunctions$1 = {
45925
46343
  * Delegates to the Changesets-compatible `getReleaseLine` and
45926
46344
  * `getDependencyReleaseLine` functions. Internally, these use the
45927
46345
  * {@link ChangelogService} Effect service layer, which coordinates
45928
- * the {@link GitHubService} (for commit/PR metadata) and
45929
- * {@link MarkdownService} (for AST manipulation) to produce
46346
+ * the {@link GitHubService} (for commit/PR metadata) to produce
45930
46347
  * structured changelog entries.
45931
46348
  *
45932
46349
  * @remarks
@@ -48072,7 +48489,7 @@ function makeBranchAnalyzerTest(fixed) {
48072
48489
  * ```typescript
48073
48490
  * import { Effect } from "effect";
48074
48491
  * import type { ChangesetOptions } from "\@savvy-web/changesets";
48075
- * import { ChangelogService, GitHubLive, MarkdownLive } from "\@savvy-web/changesets";
48492
+ * import { ChangelogService, GitHubLive } from "\@savvy-web/changesets";
48076
48493
  *
48077
48494
  * const program = Effect.gen(function* () {
48078
48495
  * const changelog = yield* ChangelogService;
@@ -67042,9 +67459,7 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
67042
67459
  MaintenanceNotePlugin: () => MaintenanceNotePlugin,
67043
67460
  MaintenanceReasonSchema: () => MaintenanceReasonSchema,
67044
67461
  MaintenanceTriggerSchema: () => MaintenanceTriggerSchema,
67045
- MarkdownLive: () => MarkdownLive,
67046
67462
  MarkdownParseError: () => MarkdownParseError,
67047
- MarkdownService: () => MarkdownService,
67048
67463
  MarkdownlintContentStructureRule: () => ContentStructureRule,
67049
67464
  MarkdownlintDependencyTableFormatRule: () => DependencyTableFormatRule,
67050
67465
  MarkdownlintHeadingHierarchyRule: () => HeadingHierarchyRule,