@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.
@@ -172,27 +172,6 @@ const SilkChangesetConfigFile = effect.Schema.Struct({
172
172
  ...ChangesetConfigFile.fields,
173
173
  _isSilk: effect.Schema.Boolean.pipe(effect.Schema.withDecodingDefaultType(effect.Effect.succeed(true)), effect.Schema.withConstructorDefault(effect.Effect.succeed(true)))
174
174
  });
175
- /**
176
- * Versioning strategy classification for a workspace.
177
- *
178
- * @remarks
179
- * - `"single"` — one publishable package; a single version tag is used.
180
- * - `"fixed-group"` — all publishable packages are in the same changesets fixed group.
181
- * - `"independent"` — multiple publishable packages with independent version bumps.
182
- *
183
- * @since 0.1.0
184
- * @public
185
- */
186
- const VersioningStrategyType = effect.Schema.Literals([
187
- "single",
188
- "fixed-group",
189
- "independent"
190
- ]);
191
- effect.Schema.Struct({
192
- type: VersioningStrategyType,
193
- fixedGroups: effect.Schema.Array(effect.Schema.Array(effect.Schema.String)),
194
- publishablePackages: effect.Schema.Array(effect.Schema.String)
195
- });
196
175
  //#endregion
197
176
  //#region ../silk-effects/dist/dev/pkg/services/ChangesetConfigReader.js
198
177
  /**
@@ -2353,7 +2332,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2353
2332
  }
2354
2333
  };
2355
2334
  //#endregion
2356
- //#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
2335
+ //#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
2357
2336
  /**
2358
2337
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2359
2338
  * when the format is `"bun"`.
@@ -2374,7 +2353,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
2374
2353
  trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
2375
2354
  }) {};
2376
2355
  //#endregion
2377
- //#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
2356
+ //#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
2378
2357
  /**
2379
2358
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2380
2359
  * version ranges.
@@ -2420,7 +2399,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
2420
2399
  static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
2421
2400
  };
2422
2401
  //#endregion
2423
- //#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
2402
+ //#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
2424
2403
  /**
2425
2404
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2426
2405
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2481,7 +2460,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
2481
2460
  static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
2482
2461
  };
2483
2462
  //#endregion
2484
- //#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
2463
+ //#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
2485
2464
  /**
2486
2465
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2487
2466
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2525,7 +2504,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
2525
2504
  }
2526
2505
  };
2527
2506
  //#endregion
2528
- //#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
2507
+ //#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
2529
2508
  /**
2530
2509
  * The short dependency kind: which dependency map an entry came from, named the
2531
2510
  * way consumers branch on it.
@@ -4026,7 +4005,7 @@ const isComparatorSetSubset = (sub, sup) => {
4026
4005
  return true;
4027
4006
  };
4028
4007
  //#endregion
4029
- //#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
4008
+ //#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
4030
4009
  /**
4031
4010
  * Indicates that a string could not be parsed as a valid dependency specifier.
4032
4011
  *
@@ -4233,7 +4212,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4233
4212
  FromString: fromString
4234
4213
  });
4235
4214
  //#endregion
4236
- //#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
4215
+ //#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
4237
4216
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4238
4217
  const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4239
4218
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4285,8 +4264,166 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4285
4264
  algorithmOf,
4286
4265
  decode: decode$2
4287
4266
  });
4267
+ effect.Schema.Literals([
4268
+ "npm",
4269
+ "pnpm",
4270
+ "yarn",
4271
+ "bun"
4272
+ ]);
4273
+ /** The argv prefixes for each launcher. The one place this knowledge lives. */
4274
+ const PREFIXES = {
4275
+ npm: {
4276
+ prefix: [
4277
+ "npx",
4278
+ "--no",
4279
+ "--"
4280
+ ],
4281
+ dlxPrefix: ["npx"]
4282
+ },
4283
+ pnpm: {
4284
+ prefix: ["pnpm", "exec"],
4285
+ dlxPrefix: ["pnpm", "dlx"]
4286
+ },
4287
+ yarn: {
4288
+ prefix: ["yarn", "exec"],
4289
+ dlxPrefix: ["yarn", "dlx"]
4290
+ },
4291
+ bun: {
4292
+ prefix: [
4293
+ "bun",
4294
+ "x",
4295
+ "--no-install"
4296
+ ],
4297
+ dlxPrefix: ["bun", "x"]
4298
+ }
4299
+ };
4300
+ /**
4301
+ * How to run a project-local binary here.
4302
+ *
4303
+ * @remarks
4304
+ * This is the whole of what tool discovery needs from a workspace: an argv
4305
+ * prefix and a directory to run it in. It deliberately carries no workspace
4306
+ * root, no manifest and no package-manager semantics — `label` is for
4307
+ * reporting only, and nothing in this package branches on it.
4308
+ *
4309
+ * @public
4310
+ */
4311
+ var ExecContext = class extends effect.Schema.Class("ExecContext")({
4312
+ /** Human label of the launcher, e.g. `"pnpm"`. Reporting only. */
4313
+ label: effect.Schema.String,
4314
+ /** argv prefix that runs a project-local binary, e.g. `["pnpm", "exec"]`. */
4315
+ prefix: effect.Schema.Array(effect.Schema.String),
4316
+ /** argv prefix that fetch-and-runs a package binary, e.g. `["pnpm", "dlx"]`. */
4317
+ dlxPrefix: effect.Schema.Array(effect.Schema.String),
4318
+ /** Directory the prefix must run in. Omitted means "wherever the caller is". */
4319
+ directory: effect.Schema.optionalKey(effect.Schema.String)
4320
+ }) {
4321
+ /** Prefixes `command` with `prefix` and applies `directory`, returning a core `Command`. */
4322
+ apply(command) {
4323
+ return this.withPrefix(command, this.prefix);
4324
+ }
4325
+ /** As {@link ExecContext.apply}, using `dlxPrefix` — the fetch-and-run launcher. */
4326
+ applyDlx(command) {
4327
+ return this.withPrefix(command, this.dlxPrefix);
4328
+ }
4329
+ /**
4330
+ * Core's `prefix` and `setCwd` both return NEW commands, so the caller's
4331
+ * value is never mutated.
4332
+ */
4333
+ withPrefix(command, prefix) {
4334
+ const [head, ...rest] = prefix;
4335
+ const prefixed = head === void 0 ? command : effect_unstable_process.ChildProcess.prefix(command, head, rest);
4336
+ return this.directory === void 0 ? prefixed : effect_unstable_process.ChildProcess.setCwd(prefixed, this.directory);
4337
+ }
4338
+ };
4339
+ /**
4340
+ * The project-local execution context could not be determined.
4341
+ *
4342
+ * @remarks
4343
+ * A *mechanism* failure — an unreadable manifest, a detection error. "There is
4344
+ * no project-local way to run tools here" is `Option.none()`, never this error:
4345
+ * the same `None`-is-success convention `@effected/npm`'s resolver contracts
4346
+ * use, so an implementation never has to decide whether absence is exceptional.
4347
+ *
4348
+ * @public
4349
+ */
4350
+ var LocalExecError = class extends effect.Schema.TaggedErrorClass()("LocalExecError", {
4351
+ /** The directory whose context could not be determined, when one is known. */
4352
+ directory: effect.Schema.optionalKey(effect.Schema.String),
4353
+ /** The underlying failure. */
4354
+ cause: effect.Schema.optionalKey(effect.Schema.Defect())
4355
+ }) {
4356
+ get message() {
4357
+ return this.directory === void 0 ? "Could not determine the project-local execution context" : `Could not determine the project-local execution context for ${this.directory}`;
4358
+ }
4359
+ };
4360
+ /**
4361
+ * Contract: how to run a project-local binary in this project.
4362
+ *
4363
+ * @remarks
4364
+ * **This is an inverted contract.** Tool discovery needs package-manager
4365
+ * detection and workspace-root resolution, both of which live in the
4366
+ * integrated-tier `@effected/workspaces`. Depending on it directly would make
4367
+ * this package integrated too — and, through the planned `@effected/npm` edge,
4368
+ * would drag `npm`, `lockfiles` and `package-json` up a tier with it. So this
4369
+ * package declares the narrow contract and `@effected/workspaces` ships the
4370
+ * layer that implements it, exactly as `@effected/npm` owns `CatalogResolver`
4371
+ * and workspaces implements that.
4372
+ *
4373
+ * A consumer with no monorepo never needs that implementation:
4374
+ * {@link LocalExec.layerNone} (global-only) and {@link LocalExec.layerFor}
4375
+ * (a known package manager) are one-liners.
4376
+ *
4377
+ * @public
4378
+ */
4379
+ var LocalExec = class LocalExec extends effect.Context.Service()("@effected/commands/LocalExec") {
4380
+ /** The exec and dlx argv prefixes for a launcher — the single home of that knowledge. */
4381
+ static prefixes = (launcher) => PREFIXES[launcher];
4382
+ /**
4383
+ * No project-local execution context: every tool resolves globally.
4384
+ *
4385
+ * @remarks
4386
+ * The right wiring for a GitHub Action or any single-package checkout, and
4387
+ * the reason such a consumer never installs `@effected/workspaces`.
4388
+ */
4389
+ static layerNone = effect.Layer.succeed(this, { context: effect.Effect.succeed(effect.Option.none()) });
4390
+ /** A context for a known package manager, from the static prefix table. */
4391
+ static layerFor = (launcher, options) => {
4392
+ const { prefix, dlxPrefix } = PREFIXES[launcher];
4393
+ return LocalExec.layerContext(ExecContext.make({
4394
+ label: launcher,
4395
+ prefix,
4396
+ dlxPrefix,
4397
+ ...options?.directory === void 0 ? {} : { directory: options.directory }
4398
+ }));
4399
+ };
4400
+ /** A caller-supplied context, answered verbatim. */
4401
+ static layerContext = (context) => effect.Layer.succeed(LocalExec, { context: effect.Effect.succeed(effect.Option.some(context)) });
4402
+ /**
4403
+ * An in-memory test double.
4404
+ *
4405
+ * @remarks
4406
+ * Unlike most `makeTest` doubles in the kit, the unstubbed default here is
4407
+ * **honest rather than loud**: `Option.none()` is a real, correct answer
4408
+ * ("no project-local context"), so a test that does not care about local
4409
+ * resolution gets the global-only behavior instead of a defect.
4410
+ */
4411
+ static makeTest = (overrides = {}) => ({
4412
+ context: effect.Effect.succeed(effect.Option.none()),
4413
+ ...overrides
4414
+ });
4415
+ /**
4416
+ * {@link LocalExec.makeTest} behind `Layer.succeed`.
4417
+ *
4418
+ * @remarks
4419
+ * A parameterized layer factory mints a fresh reference per call and layers
4420
+ * memoize by reference — bind the result to a `const` rather than calling it
4421
+ * at each composition site.
4422
+ */
4423
+ static layerTest = (overrides = {}) => effect.Layer.succeed(LocalExec, LocalExec.makeTest(overrides));
4424
+ };
4288
4425
  //#endregion
4289
- //#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
4426
+ //#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
4290
4427
  const MS_PER_MINUTE = 6e4;
4291
4428
  /**
4292
4429
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -4456,7 +4593,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
4456
4593
  }
4457
4594
  };
4458
4595
  //#endregion
4459
- //#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
4596
+ //#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
4460
4597
  /**
4461
4598
  * One declared dependency of one workspace importer, as the lockfile records it.
4462
4599
  *
@@ -4494,7 +4631,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
4494
4631
  depType: DependencyField
4495
4632
  }) {};
4496
4633
  //#endregion
4497
- //#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
4634
+ //#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
4498
4635
  /**
4499
4636
  * One workspace importer's declared dependencies, as the lockfile records them.
4500
4637
  *
@@ -4518,7 +4655,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
4518
4655
  dependencies: effect.Schema.Array(ImporterDependency)
4519
4656
  }) {};
4520
4657
  //#endregion
4521
- //#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
4658
+ //#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
4522
4659
  const EMPTY_DEPENDENCIES = {};
4523
4660
  /**
4524
4661
  * A package resolved from a lockfile.
@@ -4553,7 +4690,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
4553
4690
  dependencies: effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY_DEPENDENCIES)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY_DEPENDENCIES)))
4554
4691
  }) {};
4555
4692
  //#endregion
4556
- //#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
4693
+ //#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
4557
4694
  /**
4558
4695
  * A directed dependency edge between two workspace packages as recorded in
4559
4696
  * the lockfile.
@@ -4575,7 +4712,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
4575
4712
  constraint: effect.Schema.String
4576
4713
  }) {};
4577
4714
  //#endregion
4578
- //#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
4715
+ //#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
4579
4716
  /**
4580
4717
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4581
4718
  * when the format is `"pnpm"`.
@@ -4600,7 +4737,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
4600
4737
  }))
4601
4738
  }) {};
4602
4739
  //#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/LockfileFormat.js
4740
+ //#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
4604
4741
  /**
4605
4742
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4606
4743
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4634,7 +4771,7 @@ const FILENAMES = {
4634
4771
  */
4635
4772
  const filenameFor = (format) => FILENAMES[format];
4636
4773
  //#endregion
4637
- //#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
4774
+ //#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
4638
4775
  /**
4639
4776
  * The four dependency sections of a manifest, in a stable order — the shared
4640
4777
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -6565,7 +6702,7 @@ var JsoncModifier = class {
6565
6702
  });
6566
6703
  };
6567
6704
  //#endregion
6568
- //#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
6705
+ //#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
6569
6706
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6570
6707
  const BunWorkspaceEntry = effect.Schema.Struct({
6571
6708
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6658,7 +6795,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
6658
6795
  };
6659
6796
  });
6660
6797
  //#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/npm.js
6798
+ //#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
6662
6799
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6663
6800
  const NpmPackageEntry = effect.Schema.Struct({
6664
6801
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -13580,7 +13717,7 @@ function deepEqualValues(a, b) {
13580
13717
  return false;
13581
13718
  }
13582
13719
  //#endregion
13583
- //#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
13720
+ //#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
13584
13721
  /**
13585
13722
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
13586
13723
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -13650,7 +13787,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
13650
13787
  };
13651
13788
  });
13652
13789
  //#endregion
13653
- //#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
13790
+ //#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
13654
13791
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
13655
13792
  specifier: effect.Schema.String,
13656
13793
  version: effect.Schema.String
@@ -13775,7 +13912,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
13775
13912
  };
13776
13913
  });
13777
13914
  //#endregion
13778
- //#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
13915
+ //#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
13779
13916
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
13780
13917
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
13781
13918
  const YarnEntry = effect.Schema.Struct({
@@ -13898,7 +14035,7 @@ const cleanYarnDeps = (deps) => {
13898
14035
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
13899
14036
  };
13900
14037
  //#endregion
13901
- //#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
14038
+ //#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
13902
14039
  const EMPTY_IMPORTERS = [];
13903
14040
  /**
13904
14041
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -14142,7 +14279,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
14142
14279
  }
14143
14280
  };
14144
14281
  //#endregion
14145
- //#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
14282
+ //#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
14146
14283
  /**
14147
14284
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
14148
14285
  * lockfile against: a package name plus the four optional dependency maps.
@@ -14258,7 +14395,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
14258
14395
  }
14259
14396
  };
14260
14397
  //#endregion
14261
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14398
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14262
14399
  /**
14263
14400
  * A resolved dependency entry pairing a package name with its version
14264
14401
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -14322,7 +14459,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
14322
14459
  }
14323
14460
  };
14324
14461
  //#endregion
14325
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14462
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14326
14463
  /**
14327
14464
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
14328
14465
  *
@@ -15877,7 +16014,7 @@ effect.Schema.String.pipe(effect.Schema.decodeTo(SpdxExpressionUnion, effect.Sch
15877
16014
  encode: (expression) => effect.Effect.succeed(serialize$1(expression))
15878
16015
  })));
15879
16016
  //#endregion
15880
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16017
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
15881
16018
  /**
15882
16019
  * Indicates that a string is not a valid SPDX license identifier or expression.
15883
16020
  *
@@ -15912,7 +16049,7 @@ const isValidSpdx = (value) => {
15912
16049
  */
15913
16050
  const SpdxLicense = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), effect.Schema.brand("SpdxLicense"));
15914
16051
  //#endregion
15915
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16052
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
15916
16053
  const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
15917
16054
  /**
15918
16055
  * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
@@ -15970,7 +16107,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
15970
16107
  }
15971
16108
  };
15972
16109
  //#endregion
15973
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16110
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
15974
16111
  /**
15975
16112
  * Indicates that a string could not be used as a valid npm package name.
15976
16113
  *
@@ -16028,7 +16165,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
16028
16165
  isScoped
16029
16166
  });
16030
16167
  //#endregion
16031
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16168
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16032
16169
  const parsePersonString = (input) => {
16033
16170
  const emailMatch = input.match(/<([^>]+)>/);
16034
16171
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -16059,10 +16196,11 @@ const KNOWN_KEYS = /* @__PURE__ */ new Set([
16059
16196
  "url"
16060
16197
  ]);
16061
16198
  const sameRest = (a, b) => JSON.stringify(a ?? {}) === JSON.stringify(b ?? {});
16199
+ const isShorthandExpressible = (person) => person.rest === void 0 || Object.keys(person.rest).length === 0;
16062
16200
  const isFaithful = (wire, person) => {
16063
16201
  if (typeof wire === "string") {
16064
16202
  const parsed = parsePersonString(wire);
16065
- return parsed.name === person.name && parsed.email === person.email && parsed.url === person.url;
16203
+ return parsed.name === person.name && parsed.email === person.email && parsed.url === person.url && isShorthandExpressible(person);
16066
16204
  }
16067
16205
  const rest = restOf(wire);
16068
16206
  return wire.name === person.name && wire.email === person.email && wire.url === person.url && sameRest(rest, person.rest);
@@ -16151,7 +16289,9 @@ var Person = class Person extends effect.Schema.Class("Person")({
16151
16289
  decode: (input) => typeof input === "string" ? rememberWire(parsePersonString(input), input) : input,
16152
16290
  encode: (person) => {
16153
16291
  const wire = wireForms.get(person);
16154
- return typeof wire === "string" && isFaithful(wire, person) ? wire : person;
16292
+ if (typeof wire !== "string") return person;
16293
+ if (isFaithful(wire, person)) return wire;
16294
+ return isShorthandExpressible(person) ? serializePerson(person) : person;
16155
16295
  }
16156
16296
  })));
16157
16297
  /**
@@ -16171,7 +16311,182 @@ var Person = class Person extends effect.Schema.Class("Person")({
16171
16311
  }
16172
16312
  };
16173
16313
  //#endregion
16174
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16314
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Repository.js
16315
+ /** The shorthand hosts npm resolves without a scheme. */
16316
+ const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
16317
+ ["github", "https://github.com"],
16318
+ ["gitlab", "https://gitlab.com"],
16319
+ ["bitbucket", "https://bitbucket.org"]
16320
+ ]);
16321
+ /** `owner/name`, the bare GitHub shorthand. Deliberately strict about segment shape. */
16322
+ const BARE_SHORTHAND = /^[\w.-]+\/[\w.-]+$/;
16323
+ /** `github:owner/name`, `gist:id`, … */
16324
+ const PREFIXED_SHORTHAND = /^([a-z]+):(.+)$/;
16325
+ /** The scp-like form git accepts: `git@host:owner/name.git`. */
16326
+ const SCP_LIKE = /^(?:([\w.-]+)@)?([\w.-]+):(.+)$/;
16327
+ const stripGitSuffix = (value) => value.endsWith(".git") ? value.slice(0, -4) : value;
16328
+ /**
16329
+ * The browsable `https://host/path` form of a repository reference, or none
16330
+ * when the value is not one this model recognizes.
16331
+ *
16332
+ * Total by construction: `repository` is caller data, and a value we cannot
16333
+ * interpret is a missing answer rather than a failure.
16334
+ */
16335
+ const browseUrlOf = (raw) => {
16336
+ const url = raw.trim();
16337
+ if (url === "") return effect.Option.none();
16338
+ if (BARE_SHORTHAND.test(url)) return effect.Option.some(`https://github.com/${url}`);
16339
+ const prefixed = PREFIXED_SHORTHAND.exec(url);
16340
+ if (prefixed !== null) {
16341
+ const [, scheme, rest] = prefixed;
16342
+ if (scheme === "gist") return effect.Option.some(`https://gist.github.com/${stripGitSuffix(rest ?? "")}`);
16343
+ const host = SHORTHAND_HOSTS.get(scheme ?? "");
16344
+ if (host !== void 0) return effect.Option.some(`${host}/${stripGitSuffix(rest ?? "")}`);
16345
+ }
16346
+ const withoutGitPlus = url.startsWith("git+") ? url.slice(4) : url;
16347
+ const schemeMatch = /^([a-z][a-z0-9+.-]*):\/\/(.*)$/i.exec(withoutGitPlus);
16348
+ if (schemeMatch !== null) {
16349
+ const withoutCredentials = (schemeMatch[2] ?? "").replace(/^[^/@]+@/, "");
16350
+ return withoutCredentials === "" ? effect.Option.none() : effect.Option.some(`https://${stripGitSuffix(withoutCredentials)}`);
16351
+ }
16352
+ const scp = SCP_LIKE.exec(withoutGitPlus);
16353
+ if (scp !== null) {
16354
+ const [, , host, path] = scp;
16355
+ if (host !== void 0 && path !== void 0 && path !== "") return effect.Option.some(`https://${host}/${stripGitSuffix(path)}`);
16356
+ }
16357
+ return effect.Option.none();
16358
+ };
16359
+ const repositoryWires = /* @__PURE__ */ new WeakMap();
16360
+ const bugsWires = /* @__PURE__ */ new WeakMap();
16361
+ const KNOWN_REPOSITORY_KEYS = /* @__PURE__ */ new Set([
16362
+ "type",
16363
+ "url",
16364
+ "directory"
16365
+ ]);
16366
+ const KNOWN_BUGS_KEYS = /* @__PURE__ */ new Set(["url", "email"]);
16367
+ /**
16368
+ * Where a package's source lives.
16369
+ *
16370
+ * @remarks
16371
+ * `url` is **verbatim** — exactly the string the manifest carried, shorthand
16372
+ * and all. Normalization is offered through {@link Repository.browseUrl} and
16373
+ * {@link Repository.gitUrl}, so reading a manifest never rewrites it and a
16374
+ * caller that wants the original still has it.
16375
+ *
16376
+ * @example
16377
+ * ```ts
16378
+ * // "effected/kit" → https://github.com/effected/kit
16379
+ * // "git@github.com:effected/kit.git" → https://github.com/effected/kit
16380
+ * ```
16381
+ *
16382
+ * @public
16383
+ */
16384
+ var Repository = class Repository extends effect.Schema.Class("Repository")({
16385
+ /** The `type` field, when the object form carried one (`"git"`, …). */
16386
+ type: effect.Schema.optionalKey(effect.Schema.String),
16387
+ /** The reference exactly as written: a shorthand, a git URL, or an https URL. */
16388
+ url: effect.Schema.String,
16389
+ /** The subdirectory within the repository, for a monorepo member. */
16390
+ directory: effect.Schema.optionalKey(effect.Schema.String),
16391
+ /** Keys outside the documented set, preserved so encoding does not drop them. */
16392
+ rest: effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown))
16393
+ }) {
16394
+ /**
16395
+ * The browsable `https://` URL, or `Option.none()` when `url` is not a form
16396
+ * this model recognizes.
16397
+ */
16398
+ get browseUrl() {
16399
+ return browseUrlOf(this.url);
16400
+ }
16401
+ /** The canonical https clone URL, or none when it cannot be derived. */
16402
+ get gitUrl() {
16403
+ return effect.Option.map(this.browseUrl, (url) => `${url}.git`);
16404
+ }
16405
+ /**
16406
+ * The `repository` field: the shorthand string or the object form, always
16407
+ * decoded to a {@link Repository}, and always re-encoded in the form it was
16408
+ * read from.
16409
+ */
16410
+ static FromValue = effect.Schema.Union([effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown), effect.Schema.String]).pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(Repository), effect.SchemaTransformation.transform({
16411
+ decode: (input) => {
16412
+ if (typeof input === "string") {
16413
+ const repository = Repository.make({ url: input });
16414
+ repositoryWires.set(repository, input);
16415
+ return repository;
16416
+ }
16417
+ const rest = {};
16418
+ for (const [key, value] of Object.entries(input)) if (!KNOWN_REPOSITORY_KEYS.has(key)) rest[key] = value;
16419
+ const repository = Repository.make({
16420
+ url: typeof input.url === "string" ? input.url : "",
16421
+ ...typeof input.type === "string" && { type: input.type },
16422
+ ...typeof input.directory === "string" && { directory: input.directory },
16423
+ ...Object.keys(rest).length > 0 && { rest }
16424
+ });
16425
+ repositoryWires.set(repository, input);
16426
+ return repository;
16427
+ },
16428
+ encode: (repository) => {
16429
+ const wire = repositoryWires.get(repository);
16430
+ if (typeof wire === "string" && wire === repository.url) return wire;
16431
+ if (wire !== void 0 && typeof wire !== "string") return wire;
16432
+ return {
16433
+ ...repository.type !== void 0 && { type: repository.type },
16434
+ url: repository.url,
16435
+ ...repository.directory !== void 0 && { directory: repository.directory },
16436
+ ...repository.rest
16437
+ };
16438
+ }
16439
+ })));
16440
+ };
16441
+ /**
16442
+ * Where to report problems with a package.
16443
+ *
16444
+ * @remarks
16445
+ * npm permits a bare URL string, or an object with `url`, `email`, or both —
16446
+ * an email-only entry is legal, which is why `url` is optional.
16447
+ *
16448
+ * @public
16449
+ */
16450
+ var Bugs = class Bugs extends effect.Schema.Class("Bugs")({
16451
+ /** The issue-tracker URL. */
16452
+ url: effect.Schema.optionalKey(effect.Schema.String),
16453
+ /** The address to mail instead of, or alongside, filing an issue. */
16454
+ email: effect.Schema.optionalKey(effect.Schema.String),
16455
+ /** Keys outside the documented set, preserved so encoding does not drop them. */
16456
+ rest: effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown))
16457
+ }) {
16458
+ /** The `bugs` field: a URL string or the object form. */
16459
+ static FromValue = effect.Schema.Union([effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown), effect.Schema.String]).pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(Bugs), effect.SchemaTransformation.transform({
16460
+ decode: (input) => {
16461
+ if (typeof input === "string") {
16462
+ const bugs = Bugs.make({ url: input });
16463
+ bugsWires.set(bugs, input);
16464
+ return bugs;
16465
+ }
16466
+ const rest = {};
16467
+ for (const [key, value] of Object.entries(input)) if (!KNOWN_BUGS_KEYS.has(key)) rest[key] = value;
16468
+ const bugs = Bugs.make({
16469
+ ...typeof input.url === "string" && { url: input.url },
16470
+ ...typeof input.email === "string" && { email: input.email },
16471
+ ...Object.keys(rest).length > 0 && { rest }
16472
+ });
16473
+ bugsWires.set(bugs, input);
16474
+ return bugs;
16475
+ },
16476
+ encode: (bugs) => {
16477
+ const wire = bugsWires.get(bugs);
16478
+ if (typeof wire === "string" && wire === bugs.url && bugs.email === void 0) return wire;
16479
+ if (wire !== void 0 && typeof wire !== "string") return wire;
16480
+ return {
16481
+ ...bugs.url !== void 0 && { url: bugs.url },
16482
+ ...bugs.email !== void 0 && { email: bugs.email },
16483
+ ...bugs.rest
16484
+ };
16485
+ }
16486
+ })));
16487
+ };
16488
+ //#endregion
16489
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16175
16490
  const KEY_INDEX = new Map([
16176
16491
  "$schema",
16177
16492
  "name",
@@ -16394,7 +16709,7 @@ const renderJson = (raw, options) => {
16394
16709
  return options.newline ? `${json}\n` : json;
16395
16710
  };
16396
16711
  //#endregion
16397
- //#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16712
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16398
16713
  const toHashMap = effect.SchemaTransformation.transform({
16399
16714
  decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
16400
16715
  encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
@@ -16444,14 +16759,7 @@ const PublishConfigField = effect.Schema.Record(effect.Schema.String, effect.Sch
16444
16759
  * @public
16445
16760
  */
16446
16761
  const PeerDependenciesMetaField = effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({ optional: effect.Schema.optionalKey(effect.Schema.Boolean) }));
16447
- /**
16448
- * The `repository` field: a shorthand string or an object (with `type` / `url` /
16449
- * `directory` and any extensions preserved). Not meant to be referenced
16450
- * directly.
16451
- *
16452
- * @public
16453
- */
16454
- const RepositoryField = effect.Schema.Union([effect.Schema.String, effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown)]);
16762
+ effect.Schema.Union([effect.Schema.String, effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown)]);
16455
16763
  /**
16456
16764
  * Indicates that a JSON value could not be decoded into a valid {@link Package}.
16457
16765
  *
@@ -16526,7 +16834,11 @@ var Package = class Package extends effect.Schema.Class("Package")({
16526
16834
  license: effect.Schema.optionalKey(SpdxLicense),
16527
16835
  author: effect.Schema.optionalKey(Person.FromValue),
16528
16836
  contributors: effect.Schema.optionalKey(effect.Schema.Array(Person.FromValue)),
16529
- repository: effect.Schema.optionalKey(RepositoryField),
16837
+ maintainers: effect.Schema.optionalKey(effect.Schema.Array(Person.FromValue)),
16838
+ keywords: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String)),
16839
+ repository: effect.Schema.optionalKey(Repository.FromValue),
16840
+ bugs: effect.Schema.optionalKey(Bugs.FromValue),
16841
+ homepage: effect.Schema.optionalKey(effect.Schema.String),
16530
16842
  dependencies: DependencyMapField,
16531
16843
  devDependencies: DependencyMapField,
16532
16844
  peerDependencies: DependencyMapField,
@@ -16712,7 +17024,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
16712
17024
  }
16713
17025
  };
16714
17026
  //#endregion
16715
- //#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
17027
+ //#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
16716
17028
  const EMPTY$1 = Object.freeze(Object.create(null));
16717
17029
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
16718
17030
  /**
@@ -16991,7 +17303,7 @@ var WorkspacePackage = class WorkspacePackage extends effect.Schema.Class("Works
16991
17303
  }
16992
17304
  };
16993
17305
  //#endregion
16994
- //#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
17306
+ //#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
16995
17307
  /**
16996
17308
  * Typed failure raised by {@link descend}: a directory mid-walk was unreadable
16997
17309
  * (under `onUnreadable: "fail"`), or the walk descended past `maxDepth`. Depth
@@ -17126,7 +17438,7 @@ const descend = effect.Effect.fn("Walker.descend")(function* (pattern, options)
17126
17438
  return results;
17127
17439
  });
17128
17440
  //#endregion
17129
- //#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
17441
+ //#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
17130
17442
  /**
17131
17443
  * Typed failure raised by {@link compileAndExpand}: the single error the
17132
17444
  * compile+expand recipe fails with, so a caller catches one tag rather than
@@ -17216,31 +17528,7 @@ const compileAndExpand = effect.Effect.fn("Walker.compileAndExpand")(function* (
17216
17528
  })));
17217
17529
  });
17218
17530
  //#endregion
17219
- //#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
17220
- /**
17221
- * Ascend from `start` toward the filesystem root, yielding each directory,
17222
- * nearest first.
17223
- *
17224
- * @remarks
17225
- * Lexical, not physical: `Path.dirname` does not resolve symlinks, so ascending
17226
- * out of a symlinked directory follows the path you were given rather than the
17227
- * real filesystem parent. That is deliberate — config discovery wants the file
17228
- * nearest the path the user named.
17229
- *
17230
- * Bounded twice over: `dirname` is a fixpoint at the root, and `maxDepth` guards
17231
- * a pathological `Path` implementation that never reaches one.
17232
- *
17233
- * `stopAt` is compared in normalized form — see {@link AscendOptions.stopAt}.
17234
- * Raw string equality made the ceiling fail OPEN: an unnormalized ceiling
17235
- * matched nothing and the ascent ran silently to the filesystem root, which is
17236
- * the unbounded walk the option exists to prevent, with no error to notice it
17237
- * by. A relative ceiling **dies** for the same reason — resolving one against
17238
- * `process.cwd()` would reintroduce the silent-wrong-walk failure through a
17239
- * different door. See {@link AscendOptions.stopAt} for why that is a defect
17240
- * rather than a typed error; the error channel stays `never`.
17241
- *
17242
- * @public
17243
- */
17531
+ //#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
17244
17532
  const ascend = (start, options) => effect.Effect.gen(function* () {
17245
17533
  const path = yield* effect.Path.Path;
17246
17534
  const maxDepth = options?.maxDepth ?? 256;
@@ -17258,66 +17546,83 @@ const ascend = (start, options) => effect.Effect.gen(function* () {
17258
17546
  }
17259
17547
  return dirs;
17260
17548
  });
17261
- /**
17262
- * The first candidate whose `predicate` reports true, or `Option.none()`.
17263
- *
17264
- * @remarks
17265
- * Each predicate is absorbed **individually**: a failure on one candidate is
17266
- * treated as "this candidate did not match" and the scan continues. One
17267
- * unreadable ancestor must never abort the walk, or a permission error deep in
17268
- * the tree would hide a valid root above it. Not-found and cannot-look are
17269
- * therefore indistinguishable to the caller; discovery is best-effort.
17270
- *
17271
- * `Effect.catch` catches failures, **not defects**. A predicate that throws is
17272
- * programmer error and surfaces as a defect. Do not change this to
17273
- * `Effect.catchCause` — the distinction is load-bearing.
17274
- *
17275
- * @public
17276
- */
17277
17549
  const firstMatch = (candidates, predicate) => effect.Effect.gen(function* () {
17278
17550
  for (const candidate of candidates) if (yield* effect.Effect.catch(predicate(candidate), () => effect.Effect.succeed(false))) return effect.Option.some(candidate);
17279
17551
  return effect.Option.none();
17280
17552
  });
17281
- /**
17282
- * The first existing path among the candidates `candidatesFor` produces for each
17283
- * directory in `dirs`, scanned in order. Nearer directories win.
17284
- *
17285
- * @remarks
17286
- * Candidates materialize up front, bounded by `dirs.length × candidatesFor`'s
17287
- * output — a few hundred strings under the default `maxDepth`.
17288
- *
17289
- * @public
17290
- */
17291
17553
  const findUpward = (dirs, candidatesFor) => effect.Effect.gen(function* () {
17292
17554
  const fs = yield* effect.FileSystem.FileSystem;
17293
17555
  const candidates = [];
17294
17556
  for (const dir of dirs) candidates.push(...candidatesFor(dir));
17295
17557
  return yield* firstMatch(candidates, (candidate) => fs.exists(candidate));
17296
17558
  });
17297
- /**
17298
- * The first directory in `dirs` that `isRoot` accepts.
17299
- *
17300
- * @remarks
17301
- * `firstMatch` over the directories themselves — the candidate expansion is the
17302
- * identity. `isRoot` is a caller-supplied marker test (a `.git` entry, a
17303
- * `pnpm-workspace.yaml`), and its failures are absorbed per directory.
17304
- *
17305
- * @public
17306
- */
17307
17559
  const findRoot$1 = (dirs, isRoot) => firstMatch(dirs, isRoot);
17308
17560
  /**
17309
17561
  * Upward path traversal primitives.
17310
17562
  *
17311
17563
  * @public
17312
17564
  */
17313
- const Walker$1 = {
17314
- ascend,
17315
- firstMatch,
17316
- findUpward,
17317
- findRoot: findRoot$1
17565
+ var Walker$1 = class {
17566
+ constructor() {}
17567
+ /**
17568
+ * Ascend from `start` toward the filesystem root, yielding each directory,
17569
+ * nearest first.
17570
+ *
17571
+ * @remarks
17572
+ * Lexical, not physical: `Path.dirname` does not resolve symlinks, so ascending
17573
+ * out of a symlinked directory follows the path you were given rather than the
17574
+ * real filesystem parent. That is deliberate — config discovery wants the file
17575
+ * nearest the path the user named.
17576
+ *
17577
+ * Bounded twice over: `dirname` is a fixpoint at the root, and `maxDepth` guards
17578
+ * a pathological `Path` implementation that never reaches one.
17579
+ *
17580
+ * `stopAt` is compared in normalized form — see {@link AscendOptions.stopAt}.
17581
+ * Raw string equality made the ceiling fail OPEN: an unnormalized ceiling
17582
+ * matched nothing and the ascent ran silently to the filesystem root, which is
17583
+ * the unbounded walk the option exists to prevent, with no error to notice it
17584
+ * by. A relative ceiling **dies** for the same reason — resolving one against
17585
+ * `process.cwd()` would reintroduce the silent-wrong-walk failure through a
17586
+ * different door. See {@link AscendOptions.stopAt} for why that is a defect
17587
+ * rather than a typed error; the error channel stays `never`.
17588
+ */
17589
+ static ascend = ascend;
17590
+ /**
17591
+ * The first candidate whose `predicate` reports true, or `Option.none()`.
17592
+ *
17593
+ * @remarks
17594
+ * Each predicate is absorbed **individually**: a failure on one candidate is
17595
+ * treated as "this candidate did not match" and the scan continues. One
17596
+ * unreadable ancestor must never abort the walk, or a permission error deep in
17597
+ * the tree would hide a valid root above it. Not-found and cannot-look are
17598
+ * therefore indistinguishable to the caller; discovery is best-effort.
17599
+ *
17600
+ * `Effect.catch` catches failures, **not defects**. A predicate that throws is
17601
+ * programmer error and surfaces as a defect. Do not change this to
17602
+ * `Effect.catchCause` — the distinction is load-bearing.
17603
+ */
17604
+ static firstMatch = firstMatch;
17605
+ /**
17606
+ * The first existing path among the candidates `candidatesFor` produces for each
17607
+ * directory in `dirs`, scanned in order. Nearer directories win.
17608
+ *
17609
+ * @remarks
17610
+ * Candidates materialize up front, bounded by `dirs.length × candidatesFor`'s
17611
+ * output — a few hundred strings under the default `maxDepth`.
17612
+ */
17613
+ static findUpward = findUpward;
17614
+ /**
17615
+ * The first directory in `dirs` that `isRoot` accepts.
17616
+ *
17617
+ * @remarks
17618
+ * `firstMatch` over the directories themselves — the candidate expansion is the
17619
+ * identity. `isRoot` is a caller-supplied marker test (a `.git` entry, a
17620
+ * `pnpm-workspace.yaml`), and its failures are absorbed per directory.
17621
+ */
17622
+ static findRoot = findRoot$1;
17318
17623
  };
17319
17624
  //#endregion
17320
- //#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
17625
+ //#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
17321
17626
  /**
17322
17627
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
17323
17628
  *
@@ -17504,7 +17809,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
17504
17809
  static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
17505
17810
  };
17506
17811
  //#endregion
17507
- //#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
17812
+ //#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
17508
17813
  /**
17509
17814
  * Hard ceiling on directories the enumerator will visit for one pattern set.
17510
17815
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -17522,7 +17827,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
17522
17827
  */
17523
17828
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
17524
17829
  //#endregion
17525
- //#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
17830
+ //#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
17526
17831
  /** Directory names never descended into. */
17527
17832
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
17528
17833
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -17612,7 +17917,7 @@ var Traversal = class {
17612
17917
  }
17613
17918
  };
17614
17919
  //#endregion
17615
- //#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
17920
+ //#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
17616
17921
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
17617
17922
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
17618
17923
  /**
@@ -17682,7 +17987,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
17682
17987
  return results;
17683
17988
  });
17684
17989
  //#endregion
17685
- //#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
17990
+ //#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
17686
17991
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
17687
17992
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
17688
17993
  const pnpmPatternsOf = (document) => {
@@ -17739,7 +18044,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
17739
18044
  return manifestPatternsOf(manifest);
17740
18045
  });
17741
18046
  //#endregion
17742
- //#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
18047
+ //#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
17743
18048
  /**
17744
18049
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
17745
18050
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -18173,7 +18478,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18173
18478
  };
18174
18479
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
18175
18480
  //#endregion
18176
- //#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
18481
+ //#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
18177
18482
  /**
18178
18483
  * Raised when the workspace dependency graph cannot be topologically ordered
18179
18484
  * because it contains a cycle.
@@ -18408,7 +18713,7 @@ const kahn = (edges) => {
18408
18713
  };
18409
18714
  };
18410
18715
  //#endregion
18411
- //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/GitCommand.js
18716
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/git/GitCommand.js
18412
18717
  /**
18413
18718
  * Builds a `git` `ChildProcess.StandardCommand` with the argv this package
18414
18719
  * classifies against.
@@ -18431,25 +18736,7 @@ const git = (args) => effect_unstable_process.ChildProcess.make("git", args, {
18431
18736
  env: { LC_ALL: "C" },
18432
18737
  extendEnv: true
18433
18738
  });
18434
- /**
18435
- * `git show <ref>:<path>` — the contents of `path` as it existed at `ref`,
18436
- * without checking anything out.
18437
- *
18438
- * @public
18439
- */
18440
18739
  const show = (ref, path) => git(["show", `${ref}:${path}`]);
18441
- /**
18442
- * `git ls-tree -r -z <ref> [-- <pathspec>...]` — every path in the tree at
18443
- * `ref`, recursively, NUL-terminated, optionally scoped to `pathspec`.
18444
- *
18445
- * @remarks
18446
- * `-z` is load-bearing: git paths may themselves contain newlines, so the
18447
- * caller must split on `"\0"`, never on `"\n"`. When `pathspec` is provided,
18448
- * a literal `--` separator is inserted before the pathspec entries to prevent
18449
- * git from interpreting pathspec values as options.
18450
- *
18451
- * @public
18452
- */
18453
18740
  const lsTree = (ref, pathspec = []) => git([
18454
18741
  "ls-tree",
18455
18742
  "-r",
@@ -18457,48 +18744,16 @@ const lsTree = (ref, pathspec = []) => git([
18457
18744
  ref,
18458
18745
  ...pathspec.length > 0 ? ["--", ...pathspec] : []
18459
18746
  ]);
18460
- /**
18461
- * `git cat-file -e <ref>` — checks whether `ref` resolves to an existing
18462
- * object, without printing it. A non-zero exit means the ref does not exist.
18463
- *
18464
- * @public
18465
- */
18466
18747
  const refExists = (ref) => git([
18467
18748
  "cat-file",
18468
18749
  "-e",
18469
18750
  ref
18470
18751
  ]);
18471
- /**
18472
- * `git merge-base <a> <b>` — the best common ancestor commit of `a` and `b`.
18473
- *
18474
- * @public
18475
- */
18476
18752
  const mergeBase = (a, b) => git([
18477
18753
  "merge-base",
18478
18754
  a,
18479
18755
  b
18480
18756
  ]);
18481
- /**
18482
- * `git diff --name-only -z [--relative] <base>...<head>` — the paths that
18483
- * differ between the merge base of `base` and `head`, and `head` itself,
18484
- * NUL-terminated.
18485
- *
18486
- * @remarks
18487
- * `-z` is load-bearing here too, for the same reason as {@link GitCommand.lsTree}: split
18488
- * the output on `"\0"`, never on `"\n"`.
18489
- *
18490
- * The relative flag is **explicit in both branches** — `--relative` when
18491
- * `relative` is true, `--no-relative` when false — never omitted. git honors a
18492
- * configured `diff.relative=true` when no flag is passed, so an omitted flag
18493
- * would silently yield cwd-relative paths on such a machine even for
18494
- * `relative: false`, misaligning with {@link GitCommand.untrackedFiles}'s
18495
- * repo-root base and breaking `Git.workingChanges`' dedup in a nested workspace.
18496
- * `--relative` scopes the report to `cwd` (a workspace nested inside a larger
18497
- * repository); `--no-relative` overrides any `diff.relative` config and reports
18498
- * paths from the repository top-level.
18499
- *
18500
- * @public
18501
- */
18502
18757
  const changedFiles = (base, head, relative = false) => git([
18503
18758
  "diff",
18504
18759
  "--name-only",
@@ -18506,35 +18761,12 @@ const changedFiles = (base, head, relative = false) => git([
18506
18761
  relative ? "--relative" : "--no-relative",
18507
18762
  `${base}...${head}`
18508
18763
  ]);
18509
- /**
18510
- * `git diff --name-only -z (--relative | --no-relative)` — the paths with
18511
- * unstaged working-tree changes (the working tree against the index),
18512
- * NUL-terminated.
18513
- *
18514
- * @remarks
18515
- * `relative` behaves as it does for {@link GitCommand.changedFiles}, including the
18516
- * explicit-flag-in-both-branches rule: `--no-relative` is passed for
18517
- * `relative: false` so a configured `diff.relative=true` cannot silently make the
18518
- * output cwd-relative.
18519
- *
18520
- * @public
18521
- */
18522
18764
  const unstagedChanges = (relative = false) => git([
18523
18765
  "diff",
18524
18766
  "--name-only",
18525
18767
  "-z",
18526
18768
  relative ? "--relative" : "--no-relative"
18527
18769
  ]);
18528
- /**
18529
- * `git diff --name-only -z (--relative | --no-relative) --cached` — the paths
18530
- * staged for the next commit (the index against `HEAD`), NUL-terminated.
18531
- *
18532
- * @remarks
18533
- * `relative` behaves as it does for {@link GitCommand.changedFiles}, including the
18534
- * explicit `--no-relative` on the `relative: false` branch.
18535
- *
18536
- * @public
18537
- */
18538
18770
  const stagedChanges = (relative = false) => git([
18539
18771
  "diff",
18540
18772
  "--name-only",
@@ -18542,19 +18774,6 @@ const stagedChanges = (relative = false) => git([
18542
18774
  relative ? "--relative" : "--no-relative",
18543
18775
  "--cached"
18544
18776
  ]);
18545
- /**
18546
- * `git ls-files --others --exclude-standard -z [--full-name]` — the untracked
18547
- * paths git is not ignoring, NUL-terminated.
18548
- *
18549
- * @remarks
18550
- * `ls-files` reports paths relative to `cwd` by default, matching the
18551
- * `--relative` diffs. When `relative` is `false`, `--full-name` makes it emit
18552
- * repo-root-relative paths instead, so the untracked half shares a base with the
18553
- * un-`--relative` diffs — otherwise `Git.workingChanges`'s union would dedup two
18554
- * spellings of one file from a nested `cwd`.
18555
- *
18556
- * @public
18557
- */
18558
18777
  const untrackedFiles = (relative = false) => git([
18559
18778
  "ls-files",
18560
18779
  "--others",
@@ -18562,35 +18781,16 @@ const untrackedFiles = (relative = false) => git([
18562
18781
  "-z",
18563
18782
  ...relative ? [] : ["--full-name"]
18564
18783
  ]);
18565
- /**
18566
- * `git rev-parse --verify <ref>` — resolves `ref` to its full object id, or
18567
- * fails if `ref` does not resolve.
18568
- *
18569
- * @public
18570
- */
18571
18784
  const revParse = (ref) => git([
18572
18785
  "rev-parse",
18573
18786
  "--verify",
18574
18787
  ref
18575
18788
  ]);
18576
- /**
18577
- * Mutating: `git checkout [--detach] <ref>` — moves the working tree (and, for
18578
- * a branch ref, `HEAD`) to `ref`. When `detach` is true, checks out the ref in
18579
- * detached-HEAD state.
18580
- *
18581
- * @public
18582
- */
18583
18789
  const checkout = (ref, detach = false) => git([
18584
18790
  "checkout",
18585
18791
  ...detach ? ["--detach"] : [],
18586
18792
  ref
18587
18793
  ]);
18588
- /**
18589
- * Mutating: `git fetch [--depth <n>] <remote> [tag] <ref>` — fetches the given
18590
- * ref from a remote, optionally with a depth limit and the `tag` keyword.
18591
- *
18592
- * @public
18593
- */
18594
18794
  const fetch$1 = (remote, ref, depth, tag = false) => git([
18595
18795
  "fetch",
18596
18796
  ...depth !== void 0 ? ["--depth", String(depth)] : [],
@@ -18598,14 +18798,6 @@ const fetch$1 = (remote, ref, depth, tag = false) => git([
18598
18798
  ...tag ? ["tag"] : [],
18599
18799
  ref
18600
18800
  ]);
18601
- /**
18602
- * Mutating: `git submodule update [--init] [--depth <n>] [-- <paths>...]` — updates
18603
- * registered submodules, optionally initializing them, with an optional depth limit,
18604
- * and scoped to specific paths. The literal `--` separator makes the pathspec
18605
- * injection-safe by construction.
18606
- *
18607
- * @public
18608
- */
18609
18801
  const submoduleUpdate = (init = false, depth, paths = []) => git([
18610
18802
  "submodule",
18611
18803
  "update",
@@ -18613,13 +18805,6 @@ const submoduleUpdate = (init = false, depth, paths = []) => git([
18613
18805
  ...depth !== void 0 ? ["--depth", String(depth)] : [],
18614
18806
  ...paths.length > 0 ? ["--", ...paths] : []
18615
18807
  ]);
18616
- /**
18617
- * Mutating: `git submodule add [--depth <n>] -- <url> <path>` — registers and
18618
- * initializes a new submodule. The literal `--` separator makes the url and path
18619
- * injection-safe by construction.
18620
- *
18621
- * @public
18622
- */
18623
18808
  const submoduleAdd = (url, path, depth) => git([
18624
18809
  "submodule",
18625
18810
  "add",
@@ -18628,57 +18813,23 @@ const submoduleAdd = (url, path, depth) => git([
18628
18813
  url,
18629
18814
  path
18630
18815
  ]);
18631
- /**
18632
- * Mutating: `git sparse-checkout set (--cone | --no-cone) <patterns...>` — configures
18633
- * which paths are checked out in a sparse repository. The cone flag is explicit in both
18634
- * branches — `--cone` when `cone` is true, `--no-cone` when false — to prevent git's
18635
- * default from silently changing the behavior.
18636
- *
18637
- * @public
18638
- */
18639
18816
  const sparseCheckoutSet = (patterns, cone) => git([
18640
18817
  "sparse-checkout",
18641
18818
  "set",
18642
18819
  cone ? "--cone" : "--no-cone",
18643
18820
  ...patterns
18644
18821
  ]);
18645
- /**
18646
- * Mutating: `git config [-f <file>] <key> <value>` — writes a configuration value,
18647
- * optionally into an explicit configuration file (e.g., `.gitmodules`).
18648
- *
18649
- * @public
18650
- */
18651
18822
  const configSet = (key, value, file) => git([
18652
18823
  "config",
18653
18824
  ...file !== void 0 ? ["-f", file] : [],
18654
18825
  key,
18655
18826
  value
18656
18827
  ]);
18657
- /**
18658
- * Mutating: `git add -- <paths...>` — stages the given paths for commit. The literal
18659
- * `--` separator makes the pathspec injection-safe by construction.
18660
- *
18661
- * @public
18662
- */
18663
18828
  const add = (paths) => git([
18664
18829
  "add",
18665
18830
  "--",
18666
18831
  ...paths
18667
18832
  ]);
18668
- /**
18669
- * `git diff --name-status -z (--relative | --no-relative) [<base> | <base>...<head>]`
18670
- * — the changed paths WITH their one-letter status codes, NUL-terminated.
18671
- *
18672
- * @remarks
18673
- * With `head` omitted this is the single-argument diff form: the working tree
18674
- * (staged + unstaged) against `base` — NOT a two-ref range. With `head`
18675
- * present it is the familiar `base...head` merge-base form, matching
18676
- * {@link GitCommand.changedFiles}. `-z` and the explicit relative flag follow
18677
- * the same rules as {@link GitCommand.changedFiles}. In `-z` mode a rename or
18678
- * copy entry is THREE NUL tokens: `R<score>`, the old path, the new path.
18679
- *
18680
- * @public
18681
- */
18682
18833
  const nameStatus = (base, head, relative = false) => git([
18683
18834
  "diff",
18684
18835
  "--name-status",
@@ -18686,103 +18837,34 @@ const nameStatus = (base, head, relative = false) => git([
18686
18837
  relative ? "--relative" : "--no-relative",
18687
18838
  head === void 0 ? base : `${base}...${head}`
18688
18839
  ]);
18689
- /**
18690
- * `git symbolic-ref --quiet --short refs/remotes/<remote>/HEAD` — the name of
18691
- * the default branch on the given remote, or empty string / exit 1 if unset.
18692
- *
18693
- * @remarks
18694
- * `--quiet` suppresses error messages; the exit code alone signals success
18695
- * (0) or "symbolic-ref does not exist" (1). The contract is "does the remote
18696
- * have a HEAD?" — an unset symbolic ref exits 1 silently, which `Git.defaultBranch`
18697
- * degrades to `Option.none()` rather than a typed error. `symbolic-ref` is a
18698
- * purely local ref lookup; it never touches the network.
18699
- *
18700
- * @public
18701
- */
18702
18840
  const defaultBranch = (remote = "origin") => git([
18703
18841
  "symbolic-ref",
18704
18842
  "--quiet",
18705
18843
  "--short",
18706
18844
  `refs/remotes/${remote}/HEAD`
18707
18845
  ]);
18708
- /**
18709
- * `git rev-parse --abbrev-ref HEAD` — the name of the branch `HEAD` is
18710
- * pointing to.
18711
- *
18712
- * @remarks
18713
- * Returns `"HEAD"` (detached state), `"<branch>"` (an attached branch), or
18714
- * fails if the repository has no commits.
18715
- *
18716
- * @public
18717
- */
18718
18846
  const currentBranch = () => git([
18719
18847
  "rev-parse",
18720
18848
  "--abbrev-ref",
18721
18849
  "HEAD"
18722
18850
  ]);
18723
- /**
18724
- * `git rev-parse --show-toplevel` — the filesystem path to the root of the
18725
- * enclosing git repository.
18726
- *
18727
- * @public
18728
- */
18729
18851
  const repoRoot = () => git(["rev-parse", "--show-toplevel"]);
18730
- /**
18731
- * `git log -1 --format=%H%x00%G?%x00%B <ref>` — a NUL-separated triple: the
18732
- * full commit hash, the GPG trust level, and the full commit body (message),
18733
- * all untrimmed.
18734
- *
18735
- * @remarks
18736
- * `%H` is the full object id (40-char sha1, or sha256 if configured).
18737
- * `%x00` is a literal NUL byte (the separator). `%G?` is the GPG trust level
18738
- * (`G` = good signature, `B` = bad, `U` = untrusted, `X` = expired, `Y` =
18739
- * expired key, `R` = revoked key, `E` = error, or `N` = not signed).
18740
- * `%B` is the full body, **untrimmed** — it includes leading/trailing
18741
- * whitespace — so the caller must decide whether to trim it. Splits on the
18742
- * two `\x00` bytes to extract all three values.
18743
- *
18744
- * @public
18745
- */
18746
18852
  const commitInfo = (ref = "HEAD") => git([
18747
18853
  "log",
18748
18854
  "-1",
18749
18855
  "--format=%H%x00%G?%x00%B",
18750
18856
  ref
18751
18857
  ]);
18752
- /**
18753
- * `git config --get <key>` — the value of the given git config key, or empty
18754
- * string / exit 1 if unset.
18755
- *
18756
- * @public
18757
- */
18758
18858
  const configGet = (key) => git([
18759
18859
  "config",
18760
18860
  "--get",
18761
18861
  key
18762
18862
  ]);
18763
- /**
18764
- * `git remote get-url <remote>` — the fetch URL of the given remote. A
18765
- * missing remote exits non-zero with a "No such remote" stderr shape, which
18766
- * the `Git` service degrades to `Option.none`, never a typed error.
18767
- *
18768
- * @public
18769
- */
18770
18863
  const remoteUrl = (remote = "origin") => git([
18771
18864
  "remote",
18772
18865
  "get-url",
18773
18866
  remote
18774
18867
  ]);
18775
- /**
18776
- * `git status --porcelain -z` — the porcelain (stable, machine-readable) short
18777
- * status of every modified file in the working tree, NUL-terminated.
18778
- *
18779
- * @remarks
18780
- * `-z` is load-bearing here too, for the same reason as
18781
- * {@link GitCommand.lsTree}: split the output on `"\0"`, never on `"\n"`.
18782
- * Each entry is a pair of status codes followed by a space and the path.
18783
- *
18784
- * @public
18785
- */
18786
18868
  const status = () => git([
18787
18869
  "status",
18788
18870
  "--porcelain",
@@ -18800,34 +18882,210 @@ const status = () => git([
18800
18882
  *
18801
18883
  * @public
18802
18884
  */
18803
- const GitCommand = {
18804
- show,
18805
- lsTree,
18806
- refExists,
18807
- mergeBase,
18808
- changedFiles,
18809
- unstagedChanges,
18810
- stagedChanges,
18811
- untrackedFiles,
18812
- revParse,
18813
- checkout,
18814
- fetch: fetch$1,
18815
- submoduleUpdate,
18816
- submoduleAdd,
18817
- sparseCheckoutSet,
18818
- configSet,
18819
- add,
18820
- nameStatus,
18821
- defaultBranch,
18822
- currentBranch,
18823
- repoRoot,
18824
- commitInfo,
18825
- configGet,
18826
- remoteUrl,
18827
- status
18885
+ var GitCommand = class {
18886
+ constructor() {}
18887
+ /**
18888
+ * `git show <ref>:<path>` — the contents of `path` as it existed at `ref`,
18889
+ * without checking anything out.
18890
+ */
18891
+ static show = show;
18892
+ /**
18893
+ * `git ls-tree -r -z <ref> [-- <pathspec>...]` — every path in the tree at
18894
+ * `ref`, recursively, NUL-terminated, optionally scoped to `pathspec`.
18895
+ *
18896
+ * @remarks
18897
+ * `-z` is load-bearing: git paths may themselves contain newlines, so the
18898
+ * caller must split on `"\0"`, never on `"\n"`. When `pathspec` is provided,
18899
+ * a literal `--` separator is inserted before the pathspec entries to prevent
18900
+ * git from interpreting pathspec values as options.
18901
+ */
18902
+ static lsTree = lsTree;
18903
+ /**
18904
+ * `git cat-file -e <ref>` — checks whether `ref` resolves to an existing
18905
+ * object, without printing it. A non-zero exit means the ref does not exist.
18906
+ */
18907
+ static refExists = refExists;
18908
+ /**
18909
+ * `git merge-base <a> <b>` — the best common ancestor commit of `a` and `b`.
18910
+ */
18911
+ static mergeBase = mergeBase;
18912
+ /**
18913
+ * `git diff --name-only -z [--relative] <base>...<head>` — the paths that
18914
+ * differ between the merge base of `base` and `head`, and `head` itself,
18915
+ * NUL-terminated.
18916
+ *
18917
+ * @remarks
18918
+ * `-z` is load-bearing here too, for the same reason as {@link GitCommand.lsTree}: split
18919
+ * the output on `"\0"`, never on `"\n"`.
18920
+ *
18921
+ * The relative flag is **explicit in both branches** — `--relative` when
18922
+ * `relative` is true, `--no-relative` when false — never omitted. git honors a
18923
+ * configured `diff.relative=true` when no flag is passed, so an omitted flag
18924
+ * would silently yield cwd-relative paths on such a machine even for
18925
+ * `relative: false`, misaligning with {@link GitCommand.untrackedFiles}'s
18926
+ * repo-root base and breaking `Git.workingChanges`' dedup in a nested workspace.
18927
+ * `--relative` scopes the report to `cwd` (a workspace nested inside a larger
18928
+ * repository); `--no-relative` overrides any `diff.relative` config and reports
18929
+ * paths from the repository top-level.
18930
+ */
18931
+ static changedFiles = changedFiles;
18932
+ /**
18933
+ * `git diff --name-only -z (--relative | --no-relative)` — the paths with
18934
+ * unstaged working-tree changes (the working tree against the index),
18935
+ * NUL-terminated.
18936
+ *
18937
+ * @remarks
18938
+ * `relative` behaves as it does for {@link GitCommand.changedFiles}, including the
18939
+ * explicit-flag-in-both-branches rule: `--no-relative` is passed for
18940
+ * `relative: false` so a configured `diff.relative=true` cannot silently make the
18941
+ * output cwd-relative.
18942
+ */
18943
+ static unstagedChanges = unstagedChanges;
18944
+ /**
18945
+ * `git diff --name-only -z (--relative | --no-relative) --cached` — the paths
18946
+ * staged for the next commit (the index against `HEAD`), NUL-terminated.
18947
+ *
18948
+ * @remarks
18949
+ * `relative` behaves as it does for {@link GitCommand.changedFiles}, including the
18950
+ * explicit `--no-relative` on the `relative: false` branch.
18951
+ */
18952
+ static stagedChanges = stagedChanges;
18953
+ /**
18954
+ * `git ls-files --others --exclude-standard -z [--full-name]` — the untracked
18955
+ * paths git is not ignoring, NUL-terminated.
18956
+ *
18957
+ * @remarks
18958
+ * `ls-files` reports paths relative to `cwd` by default, matching the
18959
+ * `--relative` diffs. When `relative` is `false`, `--full-name` makes it emit
18960
+ * repo-root-relative paths instead, so the untracked half shares a base with the
18961
+ * un-`--relative` diffs — otherwise `Git.workingChanges`'s union would dedup two
18962
+ * spellings of one file from a nested `cwd`.
18963
+ */
18964
+ static untrackedFiles = untrackedFiles;
18965
+ /**
18966
+ * `git rev-parse --verify <ref>` — resolves `ref` to its full object id, or
18967
+ * fails if `ref` does not resolve.
18968
+ */
18969
+ static revParse = revParse;
18970
+ /**
18971
+ * Mutating: `git checkout [--detach] <ref>` — moves the working tree (and, for
18972
+ * a branch ref, `HEAD`) to `ref`. When `detach` is true, checks out the ref in
18973
+ * detached-HEAD state.
18974
+ */
18975
+ static checkout = checkout;
18976
+ /**
18977
+ * Mutating: `git fetch [--depth <n>] <remote> [tag] <ref>` — fetches the given
18978
+ * ref from a remote, optionally with a depth limit and the `tag` keyword.
18979
+ */
18980
+ static fetch = fetch$1;
18981
+ /**
18982
+ * Mutating: `git submodule update [--init] [--depth <n>] [-- <paths>...]` — updates
18983
+ * registered submodules, optionally initializing them, with an optional depth limit,
18984
+ * and scoped to specific paths. The literal `--` separator makes the pathspec
18985
+ * injection-safe by construction.
18986
+ */
18987
+ static submoduleUpdate = submoduleUpdate;
18988
+ /**
18989
+ * Mutating: `git submodule add [--depth <n>] -- <url> <path>` — registers and
18990
+ * initializes a new submodule. The literal `--` separator makes the url and path
18991
+ * injection-safe by construction.
18992
+ */
18993
+ static submoduleAdd = submoduleAdd;
18994
+ /**
18995
+ * Mutating: `git sparse-checkout set (--cone | --no-cone) <patterns...>` — configures
18996
+ * which paths are checked out in a sparse repository. The cone flag is explicit in both
18997
+ * branches — `--cone` when `cone` is true, `--no-cone` when false — to prevent git's
18998
+ * default from silently changing the behavior.
18999
+ */
19000
+ static sparseCheckoutSet = sparseCheckoutSet;
19001
+ /**
19002
+ * Mutating: `git config [-f <file>] <key> <value>` — writes a configuration value,
19003
+ * optionally into an explicit configuration file (e.g., `.gitmodules`).
19004
+ */
19005
+ static configSet = configSet;
19006
+ /**
19007
+ * Mutating: `git add -- <paths...>` — stages the given paths for commit. The literal
19008
+ * `--` separator makes the pathspec injection-safe by construction.
19009
+ */
19010
+ static add = add;
19011
+ /**
19012
+ * `git diff --name-status -z (--relative | --no-relative) [<base> | <base>...<head>]`
19013
+ * — the changed paths WITH their one-letter status codes, NUL-terminated.
19014
+ *
19015
+ * @remarks
19016
+ * With `head` omitted this is the single-argument diff form: the working tree
19017
+ * (staged + unstaged) against `base` — NOT a two-ref range. With `head`
19018
+ * present it is the familiar `base...head` merge-base form, matching
19019
+ * {@link GitCommand.changedFiles}. `-z` and the explicit relative flag follow
19020
+ * the same rules as {@link GitCommand.changedFiles}. In `-z` mode a rename or
19021
+ * copy entry is THREE NUL tokens: `R<score>`, the old path, the new path.
19022
+ */
19023
+ static nameStatus = nameStatus;
19024
+ /**
19025
+ * `git symbolic-ref --quiet --short refs/remotes/<remote>/HEAD` — the name of
19026
+ * the default branch on the given remote, or empty string / exit 1 if unset.
19027
+ *
19028
+ * @remarks
19029
+ * `--quiet` suppresses error messages; the exit code alone signals success
19030
+ * (0) or "symbolic-ref does not exist" (1). The contract is "does the remote
19031
+ * have a HEAD?" — an unset symbolic ref exits 1 silently, which `Git.defaultBranch`
19032
+ * degrades to `Option.none()` rather than a typed error. `symbolic-ref` is a
19033
+ * purely local ref lookup; it never touches the network.
19034
+ */
19035
+ static defaultBranch = defaultBranch;
19036
+ /**
19037
+ * `git rev-parse --abbrev-ref HEAD` — the name of the branch `HEAD` is
19038
+ * pointing to.
19039
+ *
19040
+ * @remarks
19041
+ * Returns `"HEAD"` (detached state), `"<branch>"` (an attached branch), or
19042
+ * fails if the repository has no commits.
19043
+ */
19044
+ static currentBranch = currentBranch;
19045
+ /**
19046
+ * `git rev-parse --show-toplevel` — the filesystem path to the root of the
19047
+ * enclosing git repository.
19048
+ */
19049
+ static repoRoot = repoRoot;
19050
+ /**
19051
+ * `git log -1 --format=%H%x00%G?%x00%B <ref>` — a NUL-separated triple: the
19052
+ * full commit hash, the GPG trust level, and the full commit body (message),
19053
+ * all untrimmed.
19054
+ *
19055
+ * @remarks
19056
+ * `%H` is the full object id (40-char sha1, or sha256 if configured).
19057
+ * `%x00` is a literal NUL byte (the separator). `%G?` is the GPG trust level
19058
+ * (`G` = good signature, `B` = bad, `U` = untrusted, `X` = expired, `Y` =
19059
+ * expired key, `R` = revoked key, `E` = error, or `N` = not signed).
19060
+ * `%B` is the full body, **untrimmed** — it includes leading/trailing
19061
+ * whitespace — so the caller must decide whether to trim it. Splits on the
19062
+ * two `\x00` bytes to extract all three values.
19063
+ */
19064
+ static commitInfo = commitInfo;
19065
+ /**
19066
+ * `git config --get <key>` — the value of the given git config key, or empty
19067
+ * string / exit 1 if unset.
19068
+ */
19069
+ static configGet = configGet;
19070
+ /**
19071
+ * `git remote get-url <remote>` — the fetch URL of the given remote. A
19072
+ * missing remote exits non-zero with a "No such remote" stderr shape, which
19073
+ * the `Git` service degrades to `Option.none`, never a typed error.
19074
+ */
19075
+ static remoteUrl = remoteUrl;
19076
+ /**
19077
+ * `git status --porcelain -z` — the porcelain (stable, machine-readable) short
19078
+ * status of every modified file in the working tree, NUL-terminated.
19079
+ *
19080
+ * @remarks
19081
+ * `-z` is load-bearing here too, for the same reason as
19082
+ * {@link GitCommand.lsTree}: split the output on `"\0"`, never on `"\n"`.
19083
+ * Each entry is a pair of status codes followed by a space and the path.
19084
+ */
19085
+ static status = status;
18828
19086
  };
18829
19087
  //#endregion
18830
- //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/internal/run.js
19088
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/git/internal/run.js
18831
19089
  /**
18832
19090
  * Spawns `command` and collects its stdout, stderr, and exit code as a single
18833
19091
  * triple.
@@ -18854,7 +19112,7 @@ const runCollected = (command) => effect.Effect.scoped(effect.Effect.gen(functio
18854
19112
  };
18855
19113
  }));
18856
19114
  //#endregion
18857
- //#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/Git.js
19115
+ //#region ../../node_modules/.pnpm/@effected+git@0.5.1_effect@4.0.0-beta.101/node_modules/@effected/git/Git.js
18858
19116
  /** git's own ceiling: a run that has not answered in 30s is not going to. */
18859
19117
  const GIT_TIMEOUT = effect.Duration.seconds(30);
18860
19118
  /**
@@ -19864,7 +20122,7 @@ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
19864
20122
  static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
19865
20123
  };
19866
20124
  //#endregion
19867
- //#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
20125
+ //#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
19868
20126
  /**
19869
20127
  * Which git refs to compare, and whether to fold in the working tree.
19870
20128
  *
@@ -20116,7 +20374,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
20116
20374
  };
20117
20375
  }
20118
20376
  //#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/internal/catalogs.js
20377
+ //#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
20120
20378
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
20121
20379
  const inlineCatalogs = (manifest) => {
20122
20380
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -20180,7 +20438,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
20180
20438
  });
20181
20439
  };
20182
20440
  //#endregion
20183
- //#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
20441
+ //#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
20184
20442
  /** Whether `value` is a non-null, non-array object. */
20185
20443
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
20186
20444
  /**
@@ -20366,7 +20624,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
20366
20624
  }) });
20367
20625
  };
20368
20626
  //#endregion
20369
- //#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
20627
+ //#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
20370
20628
  /**
20371
20629
  * The four package managers this package understands.
20372
20630
  *
@@ -20467,7 +20725,11 @@ const CHECKED = [
20467
20725
  "bun.lock",
20468
20726
  "bun.lockb",
20469
20727
  "yarn.lock",
20470
- "package.json#workspaces"
20728
+ "package.json#workspaces",
20729
+ "pnpm-lock.yaml",
20730
+ "package-lock.json",
20731
+ "package.json#packageManager",
20732
+ "package.json#devEngines.packageManager"
20471
20733
  ];
20472
20734
  /**
20473
20735
  * Detects which package manager owns a workspace root.
@@ -20581,7 +20843,8 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
20581
20843
  version: versionFor(hints, "pnpm"),
20582
20844
  runtime: "node"
20583
20845
  });
20584
- if (((yield* has(root, "bun.lock")) || (yield* has(root, "bun.lockb"))) && namesManager(hints, "bun")) return DetectedPackageManager.make({
20846
+ const bunLock = (yield* has(root, "bun.lock")) || (yield* has(root, "bun.lockb"));
20847
+ if (bunLock && namesManager(hints, "bun")) return DetectedPackageManager.make({
20585
20848
  name: "bun",
20586
20849
  version: versionFor(hints, "bun"),
20587
20850
  runtime: "bun"
@@ -20597,6 +20860,35 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
20597
20860
  version: versionFor(hints, "npm"),
20598
20861
  runtime: "node"
20599
20862
  });
20863
+ if (yield* has(root, "pnpm-lock.yaml")) return DetectedPackageManager.make({
20864
+ name: "pnpm",
20865
+ version: versionFor(hints, "pnpm"),
20866
+ runtime: "node"
20867
+ });
20868
+ if (bunLock && namesManager(hints, "bun")) return DetectedPackageManager.make({
20869
+ name: "bun",
20870
+ version: versionFor(hints, "bun"),
20871
+ runtime: "bun"
20872
+ });
20873
+ if ((yield* has(root, "yarn.lock")) && namesManager(hints, "yarn")) return DetectedPackageManager.make({
20874
+ name: "yarn",
20875
+ version: versionFor(hints, "yarn"),
20876
+ runtime: "node"
20877
+ });
20878
+ if (yield* has(root, "package-lock.json")) return DetectedPackageManager.make({
20879
+ name: "npm",
20880
+ version: versionFor(hints, "npm"),
20881
+ runtime: "node"
20882
+ });
20883
+ const declared = declaredName(hints);
20884
+ if (effect.Option.isSome(declared)) {
20885
+ const name = declared.value;
20886
+ if (name === "pnpm" || name === "npm" || name === "yarn" || name === "bun") return DetectedPackageManager.make({
20887
+ name,
20888
+ version: versionFor(hints, name),
20889
+ runtime: name === "bun" ? "bun" : "node"
20890
+ });
20891
+ }
20600
20892
  return yield* effect.Effect.fail(new PackageManagerDetectionError({
20601
20893
  root,
20602
20894
  checked: CHECKED
@@ -20606,9 +20898,56 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
20606
20898
  });
20607
20899
  /** The live layer. */
20608
20900
  static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
20901
+ /**
20902
+ * The sanctioned in-memory double.
20903
+ *
20904
+ * @remarks
20905
+ * **`detect` has no honest default, so an unstubbed call dies** — the
20906
+ * `WorkspaceDiscovery.info` posture, for the same reason. A stand-in that
20907
+ * answered `"pnpm"` would hand a consumer a fact nothing established, and it
20908
+ * would contradict the very service it stands in for: the live detector's
20909
+ * defining property is that it [refuses to
20910
+ * guess](https://github.com/spencerbeggs/effected) when no evidence matches.
20911
+ * A double that guesses is worse than no double.
20912
+ *
20913
+ * Failing typed would be the subtler mistake: `PackageManagerDetectionError`
20914
+ * reads as a legitimate "no manager here" answer, so a consumer would branch
20915
+ * on it and proceed, never learning that the test simply forgot to stub.
20916
+ *
20917
+ * @param overrides - Members to supply; anything omitted dies on use.
20918
+ *
20919
+ * @example
20920
+ * ```ts
20921
+ * import { DetectedPackageManager, PackageManagerDetector } from "@effected/workspaces";
20922
+ * import { Effect, Option } from "effect";
20923
+ *
20924
+ * const TestDetector = PackageManagerDetector.layerTest({
20925
+ * detect: () =>
20926
+ * Effect.succeed(
20927
+ * DetectedPackageManager.make({ name: "pnpm", version: Option.none(), runtime: "node" }),
20928
+ * ),
20929
+ * });
20930
+ * ```
20931
+ */
20932
+ static makeTest = (overrides = {}) => ({
20933
+ detect: () => effect.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.")),
20934
+ ...overrides
20935
+ });
20936
+ /**
20937
+ * {@link PackageManagerDetector.makeTest} behind `Layer.succeed`.
20938
+ *
20939
+ * @remarks
20940
+ * A parameterized layer factory mints a **fresh reference per call**, and
20941
+ * layers memoize by reference — bind the result to a `const` and reuse it
20942
+ * rather than calling `layerTest(...)` at each composition site.
20943
+ *
20944
+ * Pairs with `WorkspaceRoot.layerTest` and `WorkspaceDiscovery.layerTest` to
20945
+ * stand up the whole discovery path with no filesystem at all.
20946
+ */
20947
+ static layerTest = (overrides = {}) => effect.Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
20609
20948
  };
20610
20949
  //#endregion
20611
- //#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
20950
+ //#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
20612
20951
  /**
20613
20952
  * Raised when the workspace's lockfile cannot be read off disk.
20614
20953
  *
@@ -20788,7 +21127,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
20788
21127
  static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
20789
21128
  };
20790
21129
  //#endregion
20791
- //#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
21130
+ //#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
20792
21131
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
20793
21132
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
20794
21133
  /**
@@ -20872,9 +21211,35 @@ var PublishTarget = class extends effect.Schema.Class("PublishTarget")({
20872
21211
  *
20873
21212
  * @public
20874
21213
  */
20875
- var PublishabilityDetector = class PublishabilityDetector extends effect.Context.Service()("@effected/workspaces/PublishabilityDetector") {
20876
- /** Standard npm publishing semantics. Pure — no filesystem, no platform services. */
20877
- static layer = effect.Layer.succeed(PublishabilityDetector, { detect: (pkg) => effect.Effect.sync(() => {
21214
+ var PublishabilityDetector = class extends effect.Context.Service()("@effected/workspaces/PublishabilityDetector") {
21215
+ /**
21216
+ * Standard npm publishing semantics, **as a value**. Pure no filesystem,
21217
+ * no platform services.
21218
+ *
21219
+ * @remarks
21220
+ * Exposed as a shape and not only as a layer, because a consumer composing
21221
+ * *around* these rules cannot reach them through a layer without re-entering
21222
+ * the very tag it is replacing. `@savvy-web/silk-effects` had to write
21223
+ * `Effect.provide(PublishabilityDetector, PublishabilityDetector.layer)`
21224
+ * **inside its own implementation of that tag** to get at this function for
21225
+ * its pass-through branch; with the value exposed that becomes
21226
+ * `PublishabilityDetector.npm.detect(pkg)`.
21227
+ *
21228
+ * @example
21229
+ * ```ts
21230
+ * import { PublishabilityDetector } from "@effected/workspaces";
21231
+ * import { Effect, Layer } from "effect";
21232
+ *
21233
+ * // A policy that defers to npm semantics for everything it does not veto.
21234
+ * const withVeto = Layer.succeed(PublishabilityDetector, {
21235
+ * detect: (pkg) =>
21236
+ * pkg.name.endsWith("-private")
21237
+ * ? Effect.succeed([])
21238
+ * : PublishabilityDetector.npm.detect(pkg),
21239
+ * });
21240
+ * ```
21241
+ */
21242
+ static npm = { detect: (pkg) => effect.Effect.sync(() => {
20878
21243
  const config = pkg.publishConfig;
20879
21244
  const access = config?.access;
20880
21245
  if (pkg.private && access === void 0) return [];
@@ -20885,10 +21250,36 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
20885
21250
  access: access ?? "public",
20886
21251
  provenance: false
20887
21252
  })];
20888
- }) });
21253
+ }) };
21254
+ /** Nothing publishes. */
21255
+ static none = { detect: () => effect.Effect.succeed([]) };
21256
+ /**
21257
+ * {@link PublishabilityDetector.npm} as a layer.
21258
+ *
21259
+ * @remarks
21260
+ * Named for its policy rather than called `layer`, deliberately. **No
21261
+ * composite in this package provides a publishability detector**: a
21262
+ * `Workspaces.layer()` that quietly supplied npm semantics made the choice
21263
+ * invisible, and worse, made a naively-ordered override lose to it in
21264
+ * silence — `Layer.mergeAll(myDetector, Workspaces.layer())` resolved to the
21265
+ * default, because `mergeAll` is last-wins. For a service that decides
21266
+ * whether a package publishes and to which registry, that silent revert was
21267
+ * the worst available failure. The requirement now sits in `R`, so the
21268
+ * choice is made once, explicitly, and unmade wiring does not compile.
21269
+ */
21270
+ static layerNpm = effect.Layer.succeed(this, this.npm);
21271
+ /**
21272
+ * {@link PublishabilityDetector.none} as a layer: a workspace where nothing
21273
+ * publishes.
21274
+ *
21275
+ * @remarks
21276
+ * For dry runs, and for a release tool whose configuration disables
21277
+ * publishing wholesale — silk's changeset `mode: "none"` is exactly this.
21278
+ */
21279
+ static layerNone = effect.Layer.succeed(this, this.none);
20889
21280
  };
20890
21281
  //#endregion
20891
- //#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
21282
+ //#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
20892
21283
  /**
20893
21284
  * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
20894
21285
  *
@@ -20974,7 +21365,7 @@ const unanimousVersionOf = (index, dependency) => {
20974
21365
  return agreed;
20975
21366
  };
20976
21367
  //#endregion
20977
- //#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
21368
+ //#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
20978
21369
  /**
20979
21370
  * An immutable, fully-normalized catalog collection — the one catalog
20980
21371
  * resolution semantic in the package.
@@ -21483,7 +21874,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21483
21874
  }));
21484
21875
  };
21485
21876
  //#endregion
21486
- //#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
21877
+ //#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
21487
21878
  const EMPTY = Object.freeze(Object.create(null));
21488
21879
  const DependencyMap = effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY)));
21489
21880
  /**
@@ -21706,7 +22097,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
21706
22097
  }
21707
22098
  };
21708
22099
  //#endregion
21709
- //#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
22100
+ //#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
21710
22101
  /** Whether `value` is a non-null, non-array object. */
21711
22102
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
21712
22103
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -21975,142 +22366,244 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
21975
22366
  static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
21976
22367
  };
21977
22368
  //#endregion
21978
- //#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
21979
- /**
21980
- * Every service that needs only a filesystem: root, package-manager detection,
21981
- * discovery, lockfile reading, catalogs and publishability.
21982
- *
21983
- * @remarks
21984
- * Requires core `FileSystem` and `Path`, which the consumer provides at the
21985
- * edge (`@effect/platform-node`, `@effect/platform-bun`, or a test's
21986
- * `FileSystem.layerNoop`).
21987
- *
21988
- * **Bind the result to a `const`.** This is a parameterized factory and layers
21989
- * memoize by reference, so calling it twice builds everything twice.
21990
- *
21991
- * @example
21992
- * ```ts
21993
- * import { Workspaces } from "@effected/workspaces";
21994
- * import { Layer } from "effect";
21995
- *
21996
- * const WorkspacesLayer = Workspaces.layer();
21997
- * const AppLayer = Layer.provide(WorkspacesLayer, PlatformLayer);
21998
- * ```
21999
- *
22000
- * @public
22001
- */
22369
+ //#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
22002
22370
  const compose = (options, catalogsFactory) => {
22003
22371
  const roots = WorkspaceRoot.layer;
22004
22372
  const detector = PackageManagerDetector.layer;
22005
22373
  const discovery = WorkspaceDiscovery.layer(options).pipe(effect.Layer.provide(roots));
22006
22374
  const lockfiles = LockfileReader.layer(options).pipe(effect.Layer.provide(roots), effect.Layer.provide(detector), effect.Layer.provide(discovery));
22007
22375
  const catalogs = catalogsFactory(options).pipe(effect.Layer.provide(roots), effect.Layer.provide(lockfiles));
22008
- return effect.Layer.mergeAll(roots, detector, discovery, lockfiles, catalogs, PublishabilityDetector.layer);
22376
+ return effect.Layer.mergeAll(roots, detector, discovery, lockfiles, catalogs);
22009
22377
  };
22010
22378
  const layer = (options) => compose(options, WorkspaceCatalogs.layer);
22011
- /**
22012
- * The git-free composite plus {@link ChangeDetector} and
22013
- * {@link WorkspaceSnapshots}, over `@effected/git`'s `Git` service.
22014
- *
22015
- * @remarks
22016
- * The extra requirement is core's `ChildProcessSpawner` (behind `Git`), which
22017
- * is why it is a separate layer rather than a flag: a consumer that never
22018
- * detects changes or reads at a ref should not have to be able to spawn a
22019
- * subprocess. The consumer provides `ChildProcessSpawner` once at the edge
22020
- * (`@effect/platform-node`'s `NodeServices.layer`); a test provides
22021
- * `Layer.succeed(Git, …)` and needs no repository on disk.
22022
- *
22023
- * @public
22024
- */
22025
22379
  const layerWithGit = (options) => {
22026
22380
  const core = layer(options);
22027
22381
  const git = Git.layer;
22028
22382
  return effect.Layer.mergeAll(core, git, ChangeDetector.layer.pipe(effect.Layer.provide(git), effect.Layer.provide(core)), WorkspaceSnapshots.layer(options).pipe(effect.Layer.provide(git), effect.Layer.provide(core)));
22029
22383
  };
22030
- /**
22031
- * The two `@effected/npm` resolver contracts, implemented for real.
22032
- *
22033
- * @remarks
22034
- * Provide this alongside `@effected/package-json`'s `Package.resolve` and a
22035
- * manifest's `catalog:` and `workspace:` specifiers resolve against the actual
22036
- * workspace instead of the no-op layers' `Option.none()`.
22037
- *
22038
- * @example
22039
- * ```ts
22040
- * import { Package } from "@effected/package-json";
22041
- * import { Workspaces } from "@effected/workspaces";
22042
- * import { Layer } from "effect";
22043
- *
22044
- * const WorkspacesLayer = Workspaces.layer();
22045
- * const Resolvers = Workspaces.resolvers.pipe(Layer.provide(WorkspacesLayer));
22046
- * ```
22047
- *
22048
- * @public
22049
- */
22050
22384
  const resolvers = effect.Layer.mergeAll(WorkspaceCatalogs.catalogResolver, WorkspaceDiscovery.workspaceResolver);
22051
- /**
22052
- * The git-free composite, but with catalog assembly that **replays config
22053
- * dependency `pnpmfile.cjs` hooks** — {@link WorkspaceCatalogs.layerWithConfigDependencies}
22054
- * in place of the default no-op catalogs layer.
22055
- *
22056
- * @remarks
22057
- * Identical requirement set to {@link Workspaces.layer}; the only difference is
22058
- * that config-dependency code is executed in process. Opt in deliberately — the
22059
- * default {@link Workspaces.layer} never executes config-dependency code.
22060
- *
22061
- * **Bind the result to a `const`.**
22062
- *
22063
- * @public
22064
- */
22065
22385
  const layerWithConfigDependencies = (options) => compose(options, WorkspaceCatalogs.layerWithConfigDependencies);
22066
- /**
22067
- * The one-call resolver factory: {@link Workspaces.resolvers} pre-wired over
22068
- * {@link Workspaces.layerWithConfigDependencies}, so the two `@effected/npm`
22069
- * contracts (`CatalogResolver`, `WorkspaceResolver`) need only a platform
22070
- * (`FileSystem` + `Path`) from the consumer.
22071
- *
22072
- * @remarks
22073
- * This is deliberately a **parameterized layer function, and the fresh layer
22074
- * per call is the feature**: layers memoize by reference, so each call mints
22075
- * an unmemoized layer whose root discovery re-runs — including a per-call
22076
- * `process.cwd()` read when `options.cwd` is omitted. A build tool that
22077
- * changes directory between manifests gets a correct re-discovery each time
22078
- * precisely because nothing is shared across calls. When you *want* sharing,
22079
- * bind one call's result to a `const` and provide that; the memoization rule
22080
- * is unchanged, this factory just refuses to hide it.
22081
- *
22082
- * Catalog assembly replays config-dependency `pnpmfile` hooks (the
22083
- * `layerWithConfigDependencies` path) — the semantics a real pnpm install
22084
- * has. Compose {@link Workspaces.resolvers} with {@link Workspaces.layer}
22085
- * yourself if config-dependency code must not run in process.
22086
- *
22087
- * @example
22088
- * ```ts
22089
- * import { Workspaces } from "@effected/workspaces";
22090
- * import { Effect } from "effect";
22091
- *
22092
- * const program = doSomethingWithResolvers.pipe(
22093
- * Effect.provide(Workspaces.resolverLayer()),
22094
- * );
22095
- * ```
22096
- *
22097
- * @public
22098
- */
22099
22386
  const resolverLayer = (options) => resolvers.pipe(effect.Layer.provide(layerWithConfigDependencies(options)));
22387
+ const resolveManifest = effect.Effect.fn("Workspaces.resolveManifest")(function* (manifest, options) {
22388
+ return yield* manifest.resolve().pipe(effect.Effect.provide(resolverLayer(options)));
22389
+ });
22390
+ const localExecLayer = (options) => effect.Layer.effect(LocalExec, effect.Effect.gen(function* () {
22391
+ const roots = yield* WorkspaceRoot;
22392
+ const detector = yield* PackageManagerDetector;
22393
+ return { context: effect.Effect.gen(function* () {
22394
+ const cwd = options?.cwd ?? globalThis.process?.cwd?.() ?? "/";
22395
+ const root = yield* roots.find(cwd).pipe(effect.Effect.asSome, effect.Effect.orElseSucceed(effect.Option.none));
22396
+ if (effect.Option.isNone(root)) return effect.Option.none();
22397
+ const detected = yield* detector.detect(root.value).pipe(effect.Effect.asSome, effect.Effect.catchTag("PackageManagerDetectionError", () => effect.Effect.succeed(effect.Option.none())), effect.Effect.mapError((cause) => new LocalExecError({
22398
+ directory: root.value,
22399
+ cause
22400
+ })));
22401
+ if (effect.Option.isNone(detected)) return effect.Option.none();
22402
+ const { prefix, dlxPrefix } = LocalExec.prefixes(detected.value.name);
22403
+ return effect.Option.some(ExecContext.make({
22404
+ label: detected.value.name,
22405
+ prefix,
22406
+ dlxPrefix,
22407
+ directory: root.value
22408
+ }));
22409
+ }) };
22410
+ }));
22100
22411
  /**
22101
22412
  * The composite layers.
22102
22413
  *
22103
22414
  * @public
22104
22415
  */
22105
- const Workspaces = {
22106
- layer,
22107
- layerWithConfigDependencies,
22108
- layerWithGit,
22109
- resolveManifest: effect.Effect.fn("Workspaces.resolveManifest")(function* (manifest, options) {
22110
- return yield* manifest.resolve().pipe(effect.Effect.provide(resolverLayer(options)));
22111
- }),
22112
- resolverLayer,
22113
- resolvers
22416
+ var Workspaces = class {
22417
+ constructor() {}
22418
+ /**
22419
+ * Every service that needs only a filesystem: root, package-manager
22420
+ * detection, discovery, lockfile reading, catalogs and publishability.
22421
+ *
22422
+ * @remarks
22423
+ * Requires core `FileSystem` and `Path`, which the consumer provides at the
22424
+ * edge (`@effect/platform-node`, `@effect/platform-bun`, or a test's
22425
+ * `FileSystem.layerNoop`).
22426
+ *
22427
+ * **Bind the result to a `const`.** This is a parameterized factory and
22428
+ * layers memoize by reference, so calling it twice builds everything twice.
22429
+ *
22430
+ * @example
22431
+ * ```ts
22432
+ * import { Workspaces } from "@effected/workspaces";
22433
+ * import { Layer } from "effect";
22434
+ *
22435
+ * const WorkspacesLayer = Workspaces.layer();
22436
+ * const AppLayer = Layer.provide(WorkspacesLayer, PlatformLayer);
22437
+ * ```
22438
+ */
22439
+ static layer = layer;
22440
+ /**
22441
+ * The git-free composite, but with catalog assembly that **replays config
22442
+ * dependency `pnpmfile.cjs` hooks** —
22443
+ * {@link WorkspaceCatalogs.layerWithConfigDependencies} in place of the
22444
+ * default no-op catalogs layer.
22445
+ *
22446
+ * @remarks
22447
+ * Identical requirement set to {@link Workspaces.layer}; the only
22448
+ * difference is that config-dependency code is executed in process. Opt in
22449
+ * deliberately — the default {@link Workspaces.layer} never executes
22450
+ * config-dependency code.
22451
+ *
22452
+ * **Bind the result to a `const`.**
22453
+ */
22454
+ static layerWithConfigDependencies = layerWithConfigDependencies;
22455
+ /**
22456
+ * The git-free composite plus {@link ChangeDetector} and
22457
+ * {@link WorkspaceSnapshots}, over `@effected/git`'s `Git` service.
22458
+ *
22459
+ * @remarks
22460
+ * The extra requirement is core's `ChildProcessSpawner` (behind `Git`),
22461
+ * which is why it is a separate layer rather than a flag: a consumer that
22462
+ * never detects changes or reads at a ref should not have to be able to
22463
+ * spawn a subprocess. The consumer provides `ChildProcessSpawner` once at
22464
+ * the edge (`@effect/platform-node`'s `NodeServices.layer`); a test
22465
+ * provides `Layer.succeed(Git, …)` and needs no repository on disk.
22466
+ */
22467
+ static layerWithGit = layerWithGit;
22468
+ /**
22469
+ * This package's implementation of `@effected/commands`' `LocalExec`
22470
+ * contract: how to run a project-local binary here.
22471
+ *
22472
+ * @remarks
22473
+ * **An inverted contract, the `@effected/npm` `CatalogResolver`
22474
+ * precedent.** Tool discovery needs package-manager detection and
22475
+ * workspace-root resolution, both of which live here — but a direct edge
22476
+ * from `@effected/commands` to this package would make that boundary-tier
22477
+ * package integrated, and through the planned `npm` → `commands` edge
22478
+ * would drag `npm`, `lockfiles` (pure!) and `package-json` up a tier with
22479
+ * it. So `commands` declares the narrow contract and we ship the layer.
22480
+ *
22481
+ * **The argv knowledge is not duplicated.** `LocalExec.prefixes(name)` is
22482
+ * the one home of the four managers' `exec`/`dlx` prefixes; this layer
22483
+ * detects *which* manager owns the directory and asks `commands` what that
22484
+ * manager's argv looks like. Neither package reimplements the other's
22485
+ * half.
22486
+ *
22487
+ * **`None` is success.** Outside any workspace — and inside one whose
22488
+ * manager cannot be identified — the answer is `Option.none()`: "there is
22489
+ * no project-local way to run tools here" is an ordinary fact, not an
22490
+ * exceptional one, and a consumer running in a bare directory should not
22491
+ * have to catch an error to learn it. The contract's typed
22492
+ * `LocalExecError` is reserved for **mechanism** failure — a manifest that
22493
+ * exists but cannot be read or parsed, which means something is broken
22494
+ * rather than absent. That is npm's resolver convention, adopted
22495
+ * verbatim.
22496
+ *
22497
+ * `directory` is the resolved **workspace root**, not the caller's cwd: a
22498
+ * project-local launcher has to run where the workspace is.
22499
+ *
22500
+ * A consumer with no monorepo never needs this layer, and therefore never
22501
+ * installs this package — `LocalExec.layerNone` and `LocalExec.layerFor`
22502
+ * are one-liners in `@effected/commands`.
22503
+ *
22504
+ * **Bind the result to a `const`** — a parameterized layer factory mints a
22505
+ * fresh reference per call and layers memoize by reference.
22506
+ *
22507
+ * @example
22508
+ * ```ts
22509
+ * import { ToolDiscovery } from "@effected/commands";
22510
+ * import { Workspaces } from "@effected/workspaces";
22511
+ * import { Layer } from "effect";
22512
+ *
22513
+ * const AppLayer = ToolDiscovery.layer.pipe(
22514
+ * Layer.provide(Workspaces.localExecLayer()),
22515
+ * Layer.provide(Workspaces.layer()),
22516
+ * Layer.provide(NodeServices.layer),
22517
+ * );
22518
+ * ```
22519
+ */
22520
+ static localExecLayer = localExecLayer;
22521
+ /**
22522
+ * Resolve every `catalog:` and `workspace:` specifier in one `Manifest`
22523
+ * against the real workspace, in one call — the 90% path. Decode stays at
22524
+ * the consumer's edge: build the `Manifest` with `Manifest.decode` (from
22525
+ * `@effected/npm`), hand it here, and get a new `Manifest` back with
22526
+ * concrete ranges; `toRecord()` returns to the wire shape.
22527
+ *
22528
+ * @remarks
22529
+ * Composes `manifest.resolve()` with a fresh {@link Workspaces.resolverLayer}
22530
+ * per call, so the workspace root is re-discovered from `options.cwd` (or
22531
+ * the current `process.cwd()`) on every invocation. Consumers processing
22532
+ * many manifests should check `manifest.needsResolution` first and skip
22533
+ * the call entirely when no dependency field carries a
22534
+ * `catalog:`/`workspace:` specifier — that predicate is pure and avoids
22535
+ * catalog assembly altogether.
22536
+ *
22537
+ * A specifier the workspace cannot answer fails typed as
22538
+ * `UnresolvedDependencyError`; assembly and mechanism failures surface as
22539
+ * `CatalogAssemblyError` / `DependencyResolutionError`.
22540
+ *
22541
+ * @example
22542
+ * ```ts
22543
+ * import { Manifest } from "@effected/npm";
22544
+ * import { Workspaces } from "@effected/workspaces";
22545
+ * import { Effect } from "effect";
22546
+ *
22547
+ * const program = Effect.gen(function* () {
22548
+ * const manifest = yield* Manifest.decode({ dependencies: { effect: "catalog:" } });
22549
+ * const resolved = manifest.needsResolution ? yield* Workspaces.resolveManifest(manifest) : manifest;
22550
+ * return resolved.toRecord();
22551
+ * });
22552
+ * ```
22553
+ */
22554
+ static resolveManifest = resolveManifest;
22555
+ /**
22556
+ * The one-call resolver factory: {@link Workspaces.resolvers} pre-wired
22557
+ * over {@link Workspaces.layerWithConfigDependencies}, so the two
22558
+ * `@effected/npm` contracts (`CatalogResolver`, `WorkspaceResolver`) need
22559
+ * only a platform (`FileSystem` + `Path`) from the consumer.
22560
+ *
22561
+ * @remarks
22562
+ * This is deliberately a **parameterized layer function, and the fresh
22563
+ * layer per call is the feature**: layers memoize by reference, so each
22564
+ * call mints an unmemoized layer whose root discovery re-runs — including
22565
+ * a per-call `process.cwd()` read when `options.cwd` is omitted. A build
22566
+ * tool that changes directory between manifests gets a correct
22567
+ * re-discovery each time precisely because nothing is shared across
22568
+ * calls. When you *want* sharing, bind one call's result to a `const` and
22569
+ * provide that; the memoization rule is unchanged, this factory just
22570
+ * refuses to hide it.
22571
+ *
22572
+ * Catalog assembly replays config-dependency `pnpmfile` hooks (the
22573
+ * `layerWithConfigDependencies` path) — the semantics a real pnpm install
22574
+ * has. Compose {@link Workspaces.resolvers} with {@link Workspaces.layer}
22575
+ * yourself if config-dependency code must not run in process.
22576
+ *
22577
+ * @example
22578
+ * ```ts
22579
+ * import { Workspaces } from "@effected/workspaces";
22580
+ * import { Effect } from "effect";
22581
+ *
22582
+ * const program = doSomethingWithResolvers.pipe(
22583
+ * Effect.provide(Workspaces.resolverLayer()),
22584
+ * );
22585
+ * ```
22586
+ */
22587
+ static resolverLayer = resolverLayer;
22588
+ /**
22589
+ * The two `@effected/npm` resolver contracts, implemented for real.
22590
+ *
22591
+ * @remarks
22592
+ * Provide this alongside `@effected/package-json`'s `Package.resolve` and
22593
+ * a manifest's `catalog:` and `workspace:` specifiers resolve against the
22594
+ * actual workspace instead of the no-op layers' `Option.none()`.
22595
+ *
22596
+ * @example
22597
+ * ```ts
22598
+ * import { Package } from "@effected/package-json";
22599
+ * import { Workspaces } from "@effected/workspaces";
22600
+ * import { Layer } from "effect";
22601
+ *
22602
+ * const WorkspacesLayer = Workspaces.layer();
22603
+ * const Resolvers = Workspaces.resolvers.pipe(Layer.provide(WorkspacesLayer));
22604
+ * ```
22605
+ */
22606
+ static resolvers = resolvers;
22114
22607
  };
22115
22608
  //#endregion
22116
22609
  //#region ../silk-effects/dist/dev/pkg/services/SilkPublishability.js
@@ -22359,7 +22852,7 @@ effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
22359
22852
  const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
22360
22853
  const fs = yield* effect.FileSystem.FileSystem;
22361
22854
  const config = yield* ChangesetConfig;
22362
- const vanilla = yield* effect.Effect.provide(PublishabilityDetector, PublishabilityDetector.layer);
22855
+ const vanilla = PublishabilityDetector.npm;
22363
22856
  return { detect: (pkg) => effect.Effect.gen(function* () {
22364
22857
  const root = pkg.workspaceRoot;
22365
22858
  if (yield* config.isIgnored(pkg.name, root)) return [];
@@ -23081,7 +23574,6 @@ const MarkdownParseErrorBase = effect.Data.TaggedError("MarkdownParseError");
23081
23574
  * );
23082
23575
  * ```
23083
23576
  *
23084
- * @see {@link MarkdownService} for the Effect service that may produce this error
23085
23577
  *
23086
23578
  * @public
23087
23579
  */
@@ -24273,7 +24765,7 @@ var GitHubService = class extends effect.Context.Service()("GitHubService") {};
24273
24765
  * @remarks
24274
24766
  * This layer is used by the `\@savvy-web/changesets/changelog` entry point
24275
24767
  * to resolve commit hashes into PR numbers and author attribution. It is
24276
- * composed with {@link MarkdownLive} in the changelog formatter's
24768
+ * used by the changelog formatter's
24277
24769
  * `MainLayer`.
24278
24770
  *
24279
24771
  * @example
@@ -24342,6 +24834,277 @@ function makeGitHubTest(responses) {
24342
24834
  } });
24343
24835
  }
24344
24836
  //#endregion
24837
+ //#region ../silk-effects/dist/dev/pkg/changesets/schemas/primitives.js
24838
+ /**
24839
+ * Primitive reusable schemas for common constrained types.
24840
+ *
24841
+ * @remarks
24842
+ * These schemas serve as building blocks for more complex schemas throughout
24843
+ * the \@savvy-web/changesets package. They encode common constraints
24844
+ * (non-empty strings, positive integers) as Effect Schemas so that validation
24845
+ * is enforced at system boundaries.
24846
+ *
24847
+ * @see {@link https://effect.website/docs/schema/introduction | Effect Schema documentation}
24848
+ *
24849
+ */
24850
+ /**
24851
+ * A non-empty string schema.
24852
+ *
24853
+ * @remarks
24854
+ * Validates that a string has at least one character. Used as the base
24855
+ * constraint for package names, dependency identifiers, and other fields
24856
+ * that must not be blank.
24857
+ *
24858
+ * @example
24859
+ * ```typescript
24860
+ * import { Schema } from "effect";
24861
+ * import { NonEmptyString } from "@savvy-web/changesets";
24862
+ *
24863
+ * // Succeeds — non-empty string
24864
+ * const name = Schema.decodeUnknownSync(NonEmptyString)("react");
24865
+ *
24866
+ * // Throws ParseError — empty string
24867
+ * Schema.decodeUnknownSync(NonEmptyString)("");
24868
+ * ```
24869
+ *
24870
+ * @see {@link ChangesetSummarySchema} for a length-bounded variant used for changeset summaries
24871
+ *
24872
+ * @public
24873
+ */
24874
+ const NonEmptyString = effect.Schema.String.check(effect.Schema.isMinLength(1));
24875
+ /**
24876
+ * A positive integer schema.
24877
+ *
24878
+ * @remarks
24879
+ * Validates that a number is both an integer and strictly greater than zero.
24880
+ * Used as the base constraint for GitHub issue numbers and similar
24881
+ * identifiers that must be positive whole numbers.
24882
+ *
24883
+ * @example
24884
+ * ```typescript
24885
+ * import { Schema } from "effect";
24886
+ * import { PositiveInteger } from "@savvy-web/changesets";
24887
+ *
24888
+ * // Succeeds — positive integer
24889
+ * const issueNum = Schema.decodeUnknownSync(PositiveInteger)(42);
24890
+ *
24891
+ * // Throws ParseError — zero is not positive
24892
+ * Schema.decodeUnknownSync(PositiveInteger)(0);
24893
+ *
24894
+ * // Throws ParseError — floats are not integers
24895
+ * Schema.decodeUnknownSync(PositiveInteger)(3.14);
24896
+ * ```
24897
+ *
24898
+ * @see {@link IssueNumberSchema} which builds on this for GitHub issue/PR numbers
24899
+ *
24900
+ * @public
24901
+ */
24902
+ const PositiveInteger = effect.Schema.Number.check(effect.Schema.isInt(), effect.Schema.isGreaterThan(0));
24903
+ //#endregion
24904
+ //#region ../silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.js
24905
+ /**
24906
+ * Effect schemas for structured dependency table entries.
24907
+ *
24908
+ * @remarks
24909
+ * These schemas define the canonical representation for dependency
24910
+ * changes tracked as markdown tables in changeset files and CHANGELOGs.
24911
+ * The table format provides a richer view than {@link DependencyUpdateSchema}
24912
+ * by supporting singular dependency type names, workspace/config types,
24913
+ * and explicit add/update/remove actions.
24914
+ *
24915
+ * A dependency table row looks like this in a CHANGELOG:
24916
+ *
24917
+ * | Dependency | Type | Action | From | To |
24918
+ * |---|---|---|---|---|
24919
+ * | effect | dependency | updated | 3.18.0 | 3.19.1 |
24920
+ *
24921
+ * @see {@link DependencyUpdateSchema} for the simpler Changesets API format
24922
+ * @see {@link https://effect.website/docs/schema/introduction | Effect Schema documentation}
24923
+ *
24924
+ */
24925
+ /**
24926
+ * Valid dependency table actions.
24927
+ *
24928
+ * @remarks
24929
+ * Represents the three possible operations on a dependency: `"added"` for
24930
+ * new dependencies, `"updated"` for version changes, and `"removed"` for
24931
+ * deletions. Used in the "Action" column of dependency tables.
24932
+ *
24933
+ * @example
24934
+ * ```typescript
24935
+ * import { Schema } from "effect";
24936
+ * import { DependencyActionSchema } from "@savvy-web/changesets";
24937
+ * import type { DependencyAction } from "@savvy-web/changesets";
24938
+ *
24939
+ * const action: DependencyAction = Schema.decodeUnknownSync(DependencyActionSchema)("updated");
24940
+ * ```
24941
+ *
24942
+ * @public
24943
+ */
24944
+ const DependencyActionSchema = effect.Schema.Literals([
24945
+ "added",
24946
+ "updated",
24947
+ "removed"
24948
+ ]);
24949
+ /**
24950
+ * Extended dependency types for table format.
24951
+ *
24952
+ * @remarks
24953
+ * Unlike {@link DependencyTypeSchema} (which uses plural npm field names like
24954
+ * `"dependencies"`), this schema uses singular forms (`"dependency"`) and adds
24955
+ * two additional types: `"workspace"` for monorepo workspace references and
24956
+ * `"config"` for configuration toolchain updates (e.g., ESLint, TypeScript).
24957
+ *
24958
+ * @example
24959
+ * ```typescript
24960
+ * import { Schema } from "effect";
24961
+ * import { DependencyTableTypeSchema } from "@savvy-web/changesets";
24962
+ * import type { DependencyTableType } from "@savvy-web/changesets";
24963
+ *
24964
+ * const tableType: DependencyTableType = Schema.decodeUnknownSync(
24965
+ * DependencyTableTypeSchema
24966
+ * )("workspace");
24967
+ * ```
24968
+ *
24969
+ * @see {@link DependencyTypeSchema} for the plural npm-field variant
24970
+ *
24971
+ * @public
24972
+ */
24973
+ const DependencyTableTypeSchema = effect.Schema.Literals([
24974
+ "dependency",
24975
+ "devDependency",
24976
+ "peerDependency",
24977
+ "optionalDependency",
24978
+ "workspace",
24979
+ "config"
24980
+ ]);
24981
+ /**
24982
+ * The canonical accepted-value pattern for a dependency-table From/To cell:
24983
+ * the em-dash sentinel (U+2014), a bare/`~`/`^` semver, or — as a last-resort
24984
+ * fallback when a `catalog:`/`workspace:` specifier could not be resolved to a
24985
+ * concrete version — a pnpm protocol string. Non-overlapping alternatives keep
24986
+ * this free of polynomial backtracking (CodeQL).
24987
+ *
24988
+ * @public
24989
+ */
24990
+ const VERSION_RE = /^(\u2014|[~^]?\d+\.\d+\.\d+(?:[-+.][\w.+-]+)?|(?:catalog|workspace|npm|jsr|file|link|portal):[^\s|]+)$/;
24991
+ /**
24992
+ * Version string or em dash (U+2014) sentinel for added/removed entries.
24993
+ *
24994
+ * @remarks
24995
+ * Accepts either a semver-like version string (with optional `~` or `^`
24996
+ * prefix and pre-release/build suffixes) or the em dash character `\u2014`
24997
+ * which serves as a sentinel: the "From" column uses `\u2014` for newly
24998
+ * added dependencies, and the "To" column uses it for removed ones.
24999
+ *
25000
+ * @example
25001
+ * ```typescript
25002
+ * import { Schema } from "effect";
25003
+ * import { VersionOrEmptySchema } from "@savvy-web/changesets";
25004
+ *
25005
+ * // Succeeds — semver version
25006
+ * Schema.decodeUnknownSync(VersionOrEmptySchema)("^3.19.1");
25007
+ *
25008
+ * // Succeeds — em dash sentinel for "no version"
25009
+ * Schema.decodeUnknownSync(VersionOrEmptySchema)("\u2014");
25010
+ *
25011
+ * // Throws ParseError — arbitrary text
25012
+ * Schema.decodeUnknownSync(VersionOrEmptySchema)("latest");
25013
+ * ```
25014
+ *
25015
+ * @public
25016
+ */
25017
+ const VersionOrEmptySchema = effect.Schema.String.check(effect.Schema.isPattern(VERSION_RE));
25018
+ /**
25019
+ * Schema for a single dependency table row.
25020
+ *
25021
+ * @remarks
25022
+ * Represents one row of a dependency update table in a CHANGELOG.
25023
+ * Each row captures the dependency name, its type, the change action,
25024
+ * and the "from" and "to" version strings. For added dependencies the
25025
+ * `from` field is an em dash; for removed dependencies the `to` field
25026
+ * is an em dash.
25027
+ *
25028
+ * @example
25029
+ * ```typescript
25030
+ * import { Schema } from "effect";
25031
+ * import { DependencyTableRowSchema } from "@savvy-web/changesets";
25032
+ * import type { DependencyTableRow } from "@savvy-web/changesets";
25033
+ *
25034
+ * const row: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({
25035
+ * dependency: "effect",
25036
+ * type: "dependency",
25037
+ * action: "updated",
25038
+ * from: "3.18.0",
25039
+ * to: "3.19.1",
25040
+ * });
25041
+ *
25042
+ * // Newly added dependency — "from" is em dash
25043
+ * const addedRow: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({
25044
+ * dependency: "@effect/cli",
25045
+ * type: "dependency",
25046
+ * action: "added",
25047
+ * from: "\u2014",
25048
+ * to: "0.50.0",
25049
+ * });
25050
+ * ```
25051
+ *
25052
+ * @see {@link DependencyTableRow} for the inferred TypeScript type
25053
+ * @see {@link DependencyTableSchema} for a non-empty array of rows
25054
+ *
25055
+ * @public
25056
+ */
25057
+ const DependencyTableRowSchema = effect.Schema.Struct({
25058
+ /** Package or toolchain name. */
25059
+ dependency: NonEmptyString,
25060
+ /** Dependency type. */
25061
+ type: DependencyTableTypeSchema,
25062
+ /** Change action. */
25063
+ action: DependencyActionSchema,
25064
+ /** Previous version (em dash for added). */
25065
+ from: VersionOrEmptySchema,
25066
+ /** New version (em dash for removed). */
25067
+ to: VersionOrEmptySchema
25068
+ });
25069
+ /**
25070
+ * Schema for a dependency table (non-empty array of rows).
25071
+ *
25072
+ * @remarks
25073
+ * Validates that the table contains at least one row. Used to represent
25074
+ * the full dependency update table in a changeset or CHANGELOG entry.
25075
+ *
25076
+ * @example
25077
+ * ```typescript
25078
+ * import { Schema } from "effect";
25079
+ * import { DependencyTableSchema } from "@savvy-web/changesets";
25080
+ *
25081
+ * const table = Schema.decodeUnknownSync(DependencyTableSchema)([
25082
+ * {
25083
+ * dependency: "effect",
25084
+ * type: "dependency",
25085
+ * action: "updated",
25086
+ * from: "3.18.0",
25087
+ * to: "3.19.1",
25088
+ * },
25089
+ * {
25090
+ * dependency: "typescript",
25091
+ * type: "config",
25092
+ * action: "updated",
25093
+ * from: "5.6.0",
25094
+ * to: "5.7.2",
25095
+ * },
25096
+ * ]);
25097
+ *
25098
+ * // Throws ParseError — empty array
25099
+ * Schema.decodeUnknownSync(DependencyTableSchema)([]);
25100
+ * ```
25101
+ *
25102
+ * @see {@link DependencyTableRowSchema} for the individual row schema
25103
+ *
25104
+ * @public
25105
+ */
25106
+ const DependencyTableSchema = effect.Schema.Array(DependencyTableRowSchema).check(effect.Schema.isMinLength(1));
25107
+ //#endregion
24345
25108
  //#region ../../node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
24346
25109
  /**
24347
25110
  * Count how often a character (or substring) is used in a string.
@@ -43811,365 +44574,6 @@ function stringifyMarkdown(tree) {
43811
44574
  return createRemarkProcessor().stringify(tree);
43812
44575
  }
43813
44576
  //#endregion
43814
- //#region ../silk-effects/dist/dev/pkg/changesets/services/markdown.js
43815
- /**
43816
- * Markdown service for parsing and stringifying mdast trees.
43817
- *
43818
- * Defines the {@link MarkdownService} Effect service tag and the
43819
- * {@link MarkdownLive | production layer} backed by the remark/unified
43820
- * pipeline. This service provides a pure, side-effect-free interface to
43821
- * markdown parsing and stringification used throughout the changelog
43822
- * formatter and remark transform pipeline.
43823
- *
43824
- * @remarks
43825
- * The service wraps the `remark-pipeline` utility functions (`parseMarkdown`
43826
- * and `stringifyMarkdown`) behind an Effect interface. The `parse` operation
43827
- * returns an mdast `Root` node; the `stringify` operation serializes an
43828
- * mdast `Root` back to a markdown string. Both operations are synchronous
43829
- * under the hood but are lifted into `Effect.sync` for composability.
43830
- *
43831
- * @see {@link MarkdownService} for the Effect service tag
43832
- * @see {@link MarkdownServiceShape} for the service interface
43833
- * @see {@link MarkdownLive} for the production layer
43834
- */
43835
- /**
43836
- * Effect service tag for markdown parsing and stringification.
43837
- *
43838
- * Provides dependency-injected access to markdown parse/stringify operations.
43839
- * Use `yield* MarkdownService` inside an `Effect.gen` block to obtain the
43840
- * service instance.
43841
- *
43842
- * @remarks
43843
- * This tag follows the standard Effect `Context.Service` pattern. The
43844
- * {@link MarkdownLive} layer provides the default implementation backed by
43845
- * the remark/unified pipeline. For testing, you can supply a custom layer
43846
- * via `Layer.succeed(MarkdownService, { parse: ..., stringify: ... })`.
43847
- *
43848
- * @example
43849
- * ```typescript
43850
- * import { Effect } from "effect";
43851
- * import { MarkdownService, MarkdownLive } from "\@savvy-web/changesets";
43852
- *
43853
- * const program = Effect.gen(function* () {
43854
- * const md = yield* MarkdownService;
43855
- * const tree = yield* md.parse("# Hello\n\nWorld");
43856
- * const output = yield* md.stringify(tree);
43857
- * console.log(output); // "# Hello\n\nWorld\n"
43858
- * });
43859
- *
43860
- * Effect.runPromise(program.pipe(Effect.provide(MarkdownLive)));
43861
- * ```
43862
- *
43863
- * @see {@link MarkdownServiceShape} for the service interface
43864
- * @see {@link MarkdownLive} for the production layer
43865
- *
43866
- * @public
43867
- */
43868
- var MarkdownService = class extends effect.Context.Service()("MarkdownService") {};
43869
- /**
43870
- * Production layer for {@link MarkdownService}.
43871
- *
43872
- * Wraps the remark-pipeline utility functions (`parseMarkdown` and
43873
- * `stringifyMarkdown`) in `Effect.sync` for use in Effect programs.
43874
- * Both operations are synchronous and infallible.
43875
- *
43876
- * @remarks
43877
- * This layer is composed with {@link GitHubLive} in the
43878
- * `\@savvy-web/changesets/changelog` entry point to form the `MainLayer`
43879
- * that powers the Changesets API integration.
43880
- *
43881
- * @example
43882
- * ```typescript
43883
- * import { Effect, Layer } from "effect";
43884
- * import { MarkdownService, MarkdownLive } from "\@savvy-web/changesets";
43885
- *
43886
- * const program = Effect.gen(function* () {
43887
- * const md = yield* MarkdownService;
43888
- * const tree = yield* md.parse("**bold** text");
43889
- * return yield* md.stringify(tree);
43890
- * });
43891
- *
43892
- * Effect.runPromise(program.pipe(Effect.provide(MarkdownLive)));
43893
- * ```
43894
- *
43895
- * @public
43896
- */
43897
- const MarkdownLive = effect.Layer.succeed(MarkdownService, {
43898
- parse: (content) => effect.Effect.sync(() => parseMarkdown(content)),
43899
- stringify: (tree) => effect.Effect.sync(() => stringifyMarkdown(tree))
43900
- });
43901
- //#endregion
43902
- //#region ../silk-effects/dist/dev/pkg/changesets/schemas/primitives.js
43903
- /**
43904
- * Primitive reusable schemas for common constrained types.
43905
- *
43906
- * @remarks
43907
- * These schemas serve as building blocks for more complex schemas throughout
43908
- * the \@savvy-web/changesets package. They encode common constraints
43909
- * (non-empty strings, positive integers) as Effect Schemas so that validation
43910
- * is enforced at system boundaries.
43911
- *
43912
- * @see {@link https://effect.website/docs/schema/introduction | Effect Schema documentation}
43913
- *
43914
- */
43915
- /**
43916
- * A non-empty string schema.
43917
- *
43918
- * @remarks
43919
- * Validates that a string has at least one character. Used as the base
43920
- * constraint for package names, dependency identifiers, and other fields
43921
- * that must not be blank.
43922
- *
43923
- * @example
43924
- * ```typescript
43925
- * import { Schema } from "effect";
43926
- * import { NonEmptyString } from "@savvy-web/changesets";
43927
- *
43928
- * // Succeeds — non-empty string
43929
- * const name = Schema.decodeUnknownSync(NonEmptyString)("react");
43930
- *
43931
- * // Throws ParseError — empty string
43932
- * Schema.decodeUnknownSync(NonEmptyString)("");
43933
- * ```
43934
- *
43935
- * @see {@link ChangesetSummarySchema} for a length-bounded variant used for changeset summaries
43936
- *
43937
- * @public
43938
- */
43939
- const NonEmptyString = effect.Schema.String.check(effect.Schema.isMinLength(1));
43940
- /**
43941
- * A positive integer schema.
43942
- *
43943
- * @remarks
43944
- * Validates that a number is both an integer and strictly greater than zero.
43945
- * Used as the base constraint for GitHub issue numbers and similar
43946
- * identifiers that must be positive whole numbers.
43947
- *
43948
- * @example
43949
- * ```typescript
43950
- * import { Schema } from "effect";
43951
- * import { PositiveInteger } from "@savvy-web/changesets";
43952
- *
43953
- * // Succeeds — positive integer
43954
- * const issueNum = Schema.decodeUnknownSync(PositiveInteger)(42);
43955
- *
43956
- * // Throws ParseError — zero is not positive
43957
- * Schema.decodeUnknownSync(PositiveInteger)(0);
43958
- *
43959
- * // Throws ParseError — floats are not integers
43960
- * Schema.decodeUnknownSync(PositiveInteger)(3.14);
43961
- * ```
43962
- *
43963
- * @see {@link IssueNumberSchema} which builds on this for GitHub issue/PR numbers
43964
- *
43965
- * @public
43966
- */
43967
- const PositiveInteger = effect.Schema.Number.check(effect.Schema.isInt(), effect.Schema.isGreaterThan(0));
43968
- //#endregion
43969
- //#region ../silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.js
43970
- /**
43971
- * Effect schemas for structured dependency table entries.
43972
- *
43973
- * @remarks
43974
- * These schemas define the canonical representation for dependency
43975
- * changes tracked as markdown tables in changeset files and CHANGELOGs.
43976
- * The table format provides a richer view than {@link DependencyUpdateSchema}
43977
- * by supporting singular dependency type names, workspace/config types,
43978
- * and explicit add/update/remove actions.
43979
- *
43980
- * A dependency table row looks like this in a CHANGELOG:
43981
- *
43982
- * | Dependency | Type | Action | From | To |
43983
- * |---|---|---|---|---|
43984
- * | effect | dependency | updated | 3.18.0 | 3.19.1 |
43985
- *
43986
- * @see {@link DependencyUpdateSchema} for the simpler Changesets API format
43987
- * @see {@link https://effect.website/docs/schema/introduction | Effect Schema documentation}
43988
- *
43989
- */
43990
- /**
43991
- * Valid dependency table actions.
43992
- *
43993
- * @remarks
43994
- * Represents the three possible operations on a dependency: `"added"` for
43995
- * new dependencies, `"updated"` for version changes, and `"removed"` for
43996
- * deletions. Used in the "Action" column of dependency tables.
43997
- *
43998
- * @example
43999
- * ```typescript
44000
- * import { Schema } from "effect";
44001
- * import { DependencyActionSchema } from "@savvy-web/changesets";
44002
- * import type { DependencyAction } from "@savvy-web/changesets";
44003
- *
44004
- * const action: DependencyAction = Schema.decodeUnknownSync(DependencyActionSchema)("updated");
44005
- * ```
44006
- *
44007
- * @public
44008
- */
44009
- const DependencyActionSchema = effect.Schema.Literals([
44010
- "added",
44011
- "updated",
44012
- "removed"
44013
- ]);
44014
- /**
44015
- * Extended dependency types for table format.
44016
- *
44017
- * @remarks
44018
- * Unlike {@link DependencyTypeSchema} (which uses plural npm field names like
44019
- * `"dependencies"`), this schema uses singular forms (`"dependency"`) and adds
44020
- * two additional types: `"workspace"` for monorepo workspace references and
44021
- * `"config"` for configuration toolchain updates (e.g., ESLint, TypeScript).
44022
- *
44023
- * @example
44024
- * ```typescript
44025
- * import { Schema } from "effect";
44026
- * import { DependencyTableTypeSchema } from "@savvy-web/changesets";
44027
- * import type { DependencyTableType } from "@savvy-web/changesets";
44028
- *
44029
- * const tableType: DependencyTableType = Schema.decodeUnknownSync(
44030
- * DependencyTableTypeSchema
44031
- * )("workspace");
44032
- * ```
44033
- *
44034
- * @see {@link DependencyTypeSchema} for the plural npm-field variant
44035
- *
44036
- * @public
44037
- */
44038
- const DependencyTableTypeSchema = effect.Schema.Literals([
44039
- "dependency",
44040
- "devDependency",
44041
- "peerDependency",
44042
- "optionalDependency",
44043
- "workspace",
44044
- "config"
44045
- ]);
44046
- /**
44047
- * The canonical accepted-value pattern for a dependency-table From/To cell:
44048
- * the em-dash sentinel (U+2014), a bare/`~`/`^` semver, or — as a last-resort
44049
- * fallback when a `catalog:`/`workspace:` specifier could not be resolved to a
44050
- * concrete version — a pnpm protocol string. Non-overlapping alternatives keep
44051
- * this free of polynomial backtracking (CodeQL).
44052
- *
44053
- * @public
44054
- */
44055
- const VERSION_RE = /^(\u2014|[~^]?\d+\.\d+\.\d+(?:[-+.][\w.+-]+)?|(?:catalog|workspace|npm|jsr|file|link|portal):[^\s|]+)$/;
44056
- /**
44057
- * Version string or em dash (U+2014) sentinel for added/removed entries.
44058
- *
44059
- * @remarks
44060
- * Accepts either a semver-like version string (with optional `~` or `^`
44061
- * prefix and pre-release/build suffixes) or the em dash character `\u2014`
44062
- * which serves as a sentinel: the "From" column uses `\u2014` for newly
44063
- * added dependencies, and the "To" column uses it for removed ones.
44064
- *
44065
- * @example
44066
- * ```typescript
44067
- * import { Schema } from "effect";
44068
- * import { VersionOrEmptySchema } from "@savvy-web/changesets";
44069
- *
44070
- * // Succeeds — semver version
44071
- * Schema.decodeUnknownSync(VersionOrEmptySchema)("^3.19.1");
44072
- *
44073
- * // Succeeds — em dash sentinel for "no version"
44074
- * Schema.decodeUnknownSync(VersionOrEmptySchema)("\u2014");
44075
- *
44076
- * // Throws ParseError — arbitrary text
44077
- * Schema.decodeUnknownSync(VersionOrEmptySchema)("latest");
44078
- * ```
44079
- *
44080
- * @public
44081
- */
44082
- const VersionOrEmptySchema = effect.Schema.String.check(effect.Schema.isPattern(VERSION_RE));
44083
- /**
44084
- * Schema for a single dependency table row.
44085
- *
44086
- * @remarks
44087
- * Represents one row of a dependency update table in a CHANGELOG.
44088
- * Each row captures the dependency name, its type, the change action,
44089
- * and the "from" and "to" version strings. For added dependencies the
44090
- * `from` field is an em dash; for removed dependencies the `to` field
44091
- * is an em dash.
44092
- *
44093
- * @example
44094
- * ```typescript
44095
- * import { Schema } from "effect";
44096
- * import { DependencyTableRowSchema } from "@savvy-web/changesets";
44097
- * import type { DependencyTableRow } from "@savvy-web/changesets";
44098
- *
44099
- * const row: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({
44100
- * dependency: "effect",
44101
- * type: "dependency",
44102
- * action: "updated",
44103
- * from: "3.18.0",
44104
- * to: "3.19.1",
44105
- * });
44106
- *
44107
- * // Newly added dependency — "from" is em dash
44108
- * const addedRow: DependencyTableRow = Schema.decodeUnknownSync(DependencyTableRowSchema)({
44109
- * dependency: "@effect/cli",
44110
- * type: "dependency",
44111
- * action: "added",
44112
- * from: "\u2014",
44113
- * to: "0.50.0",
44114
- * });
44115
- * ```
44116
- *
44117
- * @see {@link DependencyTableRow} for the inferred TypeScript type
44118
- * @see {@link DependencyTableSchema} for a non-empty array of rows
44119
- *
44120
- * @public
44121
- */
44122
- const DependencyTableRowSchema = effect.Schema.Struct({
44123
- /** Package or toolchain name. */
44124
- dependency: NonEmptyString,
44125
- /** Dependency type. */
44126
- type: DependencyTableTypeSchema,
44127
- /** Change action. */
44128
- action: DependencyActionSchema,
44129
- /** Previous version (em dash for added). */
44130
- from: VersionOrEmptySchema,
44131
- /** New version (em dash for removed). */
44132
- to: VersionOrEmptySchema
44133
- });
44134
- /**
44135
- * Schema for a dependency table (non-empty array of rows).
44136
- *
44137
- * @remarks
44138
- * Validates that the table contains at least one row. Used to represent
44139
- * the full dependency update table in a changeset or CHANGELOG entry.
44140
- *
44141
- * @example
44142
- * ```typescript
44143
- * import { Schema } from "effect";
44144
- * import { DependencyTableSchema } from "@savvy-web/changesets";
44145
- *
44146
- * const table = Schema.decodeUnknownSync(DependencyTableSchema)([
44147
- * {
44148
- * dependency: "effect",
44149
- * type: "dependency",
44150
- * action: "updated",
44151
- * from: "3.18.0",
44152
- * to: "3.19.1",
44153
- * },
44154
- * {
44155
- * dependency: "typescript",
44156
- * type: "config",
44157
- * action: "updated",
44158
- * from: "5.6.0",
44159
- * to: "5.7.2",
44160
- * },
44161
- * ]);
44162
- *
44163
- * // Throws ParseError — empty array
44164
- * Schema.decodeUnknownSync(DependencyTableSchema)([]);
44165
- * ```
44166
- *
44167
- * @see {@link DependencyTableRowSchema} for the individual row schema
44168
- *
44169
- * @public
44170
- */
44171
- const DependencyTableSchema = effect.Schema.Array(DependencyTableRowSchema).check(effect.Schema.isMinLength(1));
44172
- //#endregion
44173
44577
  //#region ../silk-effects/dist/dev/pkg/changesets/utils/dependency-table.js
44174
44578
  /**
44175
44579
  * Dependency table utilities for parsing, serializing, collapsing, and sorting
@@ -45331,8 +45735,7 @@ function getReleaseLine(changeset, versionType, options) {
45331
45735
  * @remarks
45332
45736
  * The module composes two Effect programs — {@link getReleaseLine} and
45333
45737
  * {@link getDependencyReleaseLine} — and runs each through
45334
- * `Effect.runPromise` with a merged layer of {@link GitHubLive} (for commit
45335
- * metadata) and {@link MarkdownLive} (for mdast parsing). Options are
45738
+ * `Effect.runPromise` with {@link GitHubLive} (for commit metadata). Options are
45336
45739
  * validated at the boundary via `validateChangesetOptions` before being
45337
45740
  * passed to the formatters.
45338
45741
  *
@@ -45372,16 +45775,16 @@ function getReleaseLine(changeset, versionType, options) {
45372
45775
  * @see {@link getDependencyReleaseLine} in `./getDependencyReleaseLine.ts` for dependency table formatting
45373
45776
  */
45374
45777
  /**
45375
- * Combined layer providing all services needed by the formatters.
45778
+ * The layer providing every service the formatters need.
45376
45779
  *
45377
- * Merges {@link GitHubLive} and {@link MarkdownLive} into a single layer
45378
- * that satisfies the environment requirements of both `getReleaseLine`
45379
- * (which needs `GitHubService` and `MarkdownService`) and
45380
- * `getDependencyReleaseLine` (which needs `GitHubService`).
45780
+ * {@link GitHubLive} satisfies the requirements of both `getReleaseLine` and
45781
+ * `getDependencyReleaseLine`, which each need only `GitHubService`. Markdown
45782
+ * parsing is not a layer: the formatters call the remark pipeline's
45783
+ * `parseMarkdown` / `stringifyMarkdown` functions directly.
45381
45784
  *
45382
45785
  * @internal
45383
45786
  */
45384
- const MainLayer = effect.Layer.mergeAll(GitHubLive, MarkdownLive);
45787
+ const MainLayer = GitHubLive;
45385
45788
  /**
45386
45789
  * Changesets API `ChangelogFunctions` implementation.
45387
45790
  *
@@ -45422,8 +45825,7 @@ const changelogFunctions$1 = {
45422
45825
  * Delegates to the Changesets-compatible `getReleaseLine` and
45423
45826
  * `getDependencyReleaseLine` functions. Internally, these use the
45424
45827
  * {@link ChangelogService} Effect service layer, which coordinates
45425
- * the {@link GitHubService} (for commit/PR metadata) and
45426
- * {@link MarkdownService} (for AST manipulation) to produce
45828
+ * the {@link GitHubService} (for commit/PR metadata) to produce
45427
45829
  * structured changelog entries.
45428
45830
  *
45429
45831
  * @remarks
@@ -47545,7 +47947,7 @@ function makeBranchAnalyzerTest(fixed) {
47545
47947
  * ```typescript
47546
47948
  * import { Effect } from "effect";
47547
47949
  * import type { ChangesetOptions } from "\@savvy-web/changesets";
47548
- * import { ChangelogService, GitHubLive, MarkdownLive } from "\@savvy-web/changesets";
47950
+ * import { ChangelogService, GitHubLive } from "\@savvy-web/changesets";
47549
47951
  *
47550
47952
  * const program = Effect.gen(function* () {
47551
47953
  * const changelog = yield* ChangelogService;
@@ -66353,9 +66755,7 @@ const changelogFunctions = (/* @__PURE__ */ __exportAll({
66353
66755
  MaintenanceNotePlugin: () => MaintenanceNotePlugin,
66354
66756
  MaintenanceReasonSchema: () => MaintenanceReasonSchema,
66355
66757
  MaintenanceTriggerSchema: () => MaintenanceTriggerSchema,
66356
- MarkdownLive: () => MarkdownLive,
66357
66758
  MarkdownParseError: () => MarkdownParseError,
66358
- MarkdownService: () => MarkdownService,
66359
66759
  MarkdownlintContentStructureRule: () => ContentStructureRule,
66360
66760
  MarkdownlintDependencyTableFormatRule: () => DependencyTableFormatRule,
66361
66761
  MarkdownlintHeadingHierarchyRule: () => HeadingHierarchyRule,