@savvy-web/silk 3.2.11 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ var __copyProps = (to, from, except, desc) => {
25
25
  }
26
26
  return to;
27
27
  };
28
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp$1(target, "default", {
29
29
  value: mod,
30
30
  enumerable: true
31
31
  }) : target, mod));
@@ -212,7 +212,7 @@ function isSilkChangelog(changelog) {
212
212
  * const reader = yield* ChangesetConfigReader;
213
213
  * return yield* reader.read(process.cwd());
214
214
  * }).pipe(
215
- * Effect.provide(ChangesetConfigReaderLive),
215
+ * Effect.provide(ChangesetConfigReader.layer),
216
216
  * Effect.provide(NodeServices.layer),
217
217
  * )
218
218
  * );
@@ -221,64 +221,65 @@ function isSilkChangelog(changelog) {
221
221
  * @since 0.1.0
222
222
  * @public
223
223
  */
224
- var ChangesetConfigReader = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfigReader") {};
225
- /**
226
- * Live implementation of {@link ChangesetConfigReader}.
227
- *
228
- * @remarks
229
- * Requires the core `FileSystem` service. Provide `NodeServices.layer` (or
230
- * `NodeFileSystem.layer`) from `@effect/platform-node` to satisfy this dependency.
231
- *
232
- * @since 0.1.0
233
- * @public
234
- */
235
- const ChangesetConfigReaderLive = effect.Layer.effect(ChangesetConfigReader, effect.Effect.gen(function* () {
236
- const fs = yield* effect.FileSystem.FileSystem;
237
- const read = (root) => {
238
- const configPath = `${root}/.changeset/config.json`;
239
- return effect.Effect.gen(function* () {
240
- if (!(yield* fs.exists(configPath).pipe(effect.Effect.mapError(
241
- /* v8 ignore next 4 -- error path requires fs.exists to fail */
242
- (cause) => new ChangesetConfigError({
243
- path: configPath,
244
- reason: String(cause)
245
- })
246
- )))) return yield* effect.Effect.fail(new ChangesetConfigError({
247
- path: configPath,
248
- reason: "File not found"
249
- }));
250
- const raw = yield* fs.readFileString(configPath).pipe(effect.Effect.mapError(
251
- /* v8 ignore next 4 -- error path requires fs.readFileString to fail */
252
- (cause) => new ChangesetConfigError({
253
- path: configPath,
254
- reason: String(cause)
255
- })
256
- ));
257
- const parsed = yield* effect.Effect.try({
258
- try: () => JSON.parse(raw),
259
- catch: (cause) => new ChangesetConfigError({
224
+ var ChangesetConfigReader = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfigReader") {
225
+ /**
226
+ * Production implementation of {@link ChangesetConfigReader}.
227
+ *
228
+ * @remarks
229
+ * Requires the core `FileSystem` service. Provide `NodeServices.layer` (or
230
+ * `NodeFileSystem.layer`) from `@effect/platform-node` to satisfy this dependency.
231
+ *
232
+ * @since 0.1.0
233
+ * @public
234
+ */
235
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
236
+ const fs = yield* effect.FileSystem.FileSystem;
237
+ const read = (root) => {
238
+ const configPath = `${root}/.changeset/config.json`;
239
+ return effect.Effect.gen(function* () {
240
+ if (!(yield* fs.exists(configPath).pipe(effect.Effect.mapError(
241
+ /* v8 ignore next 4 -- error path requires fs.exists to fail */
242
+ (cause) => new ChangesetConfigError({
243
+ path: configPath,
244
+ reason: String(cause)
245
+ })
246
+ )))) return yield* effect.Effect.fail(new ChangesetConfigError({
260
247
  path: configPath,
261
- reason: `Invalid JSON: ${String(cause)}`
262
- })
248
+ reason: "File not found"
249
+ }));
250
+ const raw = yield* fs.readFileString(configPath).pipe(effect.Effect.mapError(
251
+ /* v8 ignore next 4 -- error path requires fs.readFileString to fail */
252
+ (cause) => new ChangesetConfigError({
253
+ path: configPath,
254
+ reason: String(cause)
255
+ })
256
+ ));
257
+ const parsed = yield* effect.Effect.try({
258
+ try: () => JSON.parse(raw),
259
+ catch: (cause) => new ChangesetConfigError({
260
+ path: configPath,
261
+ reason: `Invalid JSON: ${String(cause)}`
262
+ })
263
+ });
264
+ if (isSilkChangelog(parsed.changelog)) return yield* effect.Schema.decodeUnknownEffect(SilkChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
265
+ /* v8 ignore next 4 -- error path requires schema decode failure */
266
+ (cause) => new ChangesetConfigError({
267
+ path: configPath,
268
+ reason: `Schema decode failed: ${String(cause)}`
269
+ })
270
+ ));
271
+ return yield* effect.Schema.decodeUnknownEffect(ChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
272
+ /* v8 ignore next 4 -- error path requires schema decode failure */
273
+ (cause) => new ChangesetConfigError({
274
+ path: configPath,
275
+ reason: `Schema decode failed: ${String(cause)}`
276
+ })
277
+ ));
263
278
  });
264
- if (isSilkChangelog(parsed.changelog)) return yield* effect.Schema.decodeUnknownEffect(SilkChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
265
- /* v8 ignore next 4 -- error path requires schema decode failure */
266
- (cause) => new ChangesetConfigError({
267
- path: configPath,
268
- reason: `Schema decode failed: ${String(cause)}`
269
- })
270
- ));
271
- return yield* effect.Schema.decodeUnknownEffect(ChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
272
- /* v8 ignore next 4 -- error path requires schema decode failure */
273
- (cause) => new ChangesetConfigError({
274
- path: configPath,
275
- reason: `Schema decode failed: ${String(cause)}`
276
- })
277
- ));
278
- });
279
- };
280
- return { read };
281
- }));
279
+ };
280
+ return { read };
281
+ }));
282
+ };
282
283
  //#endregion
283
284
  //#region ../silk-effects/dist/dev/pkg/errors/PublishTargetBindingError.js
284
285
  /**
@@ -307,6 +308,7 @@ var PublishTargetBindingError = class extends effect.Data.TaggedError("PublishTa
307
308
  };
308
309
  //#endregion
309
310
  //#region ../silk-effects/dist/dev/pkg/services/ChangesetConfig.js
311
+ const isSilk = (cfg) => "_isSilk" in cfg && cfg._isSilk === true;
310
312
  /**
311
313
  * Accessor service over a workspace root's `.changeset/config.json`.
312
314
  *
@@ -318,7 +320,7 @@ var PublishTargetBindingError = class extends effect.Data.TaggedError("PublishTa
318
320
  * @since 0.4.0
319
321
  * @public
320
322
  */
321
- var ChangesetConfig = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfig") {
323
+ var ChangesetConfig = class ChangesetConfig extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfig") {
322
324
  /**
323
325
  * The one ignore matcher: exact name match, or `@scope/*` wildcard.
324
326
  *
@@ -332,55 +334,54 @@ var ChangesetConfig = class extends effect.Context.Service()("@savvy-web/silk-ef
332
334
  }
333
335
  return name === pattern;
334
336
  }
337
+ /**
338
+ * Production layer for {@link ChangesetConfig}, reading via {@link ChangesetConfigReader}, cached per root.
339
+ *
340
+ * @remarks
341
+ * Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
342
+ * `ChangesetConfigReader.layer` + a platform layer (`NodeServices.layer`).
343
+ *
344
+ * @since 0.4.0
345
+ * @public
346
+ */
347
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
348
+ const reader = yield* ChangesetConfigReader;
349
+ const cache = /* @__PURE__ */ new Map();
350
+ const read = (root) => effect.Effect.gen(function* () {
351
+ const hit = cache.get(root);
352
+ if (hit !== void 0) return hit;
353
+ const result = yield* reader.read(root).pipe(effect.Effect.option);
354
+ cache.set(root, result);
355
+ return result;
356
+ });
357
+ return {
358
+ mode: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
359
+ onNone: () => "none",
360
+ onSome: (cfg) => isSilk(cfg) ? "silk" : "vanilla"
361
+ }))),
362
+ versionPrivate: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
363
+ onNone: () => false,
364
+ onSome: (cfg) => {
365
+ const pp = cfg.privatePackages;
366
+ return pp !== void 0 && pp !== false && pp.version === true;
367
+ }
368
+ }))),
369
+ ignorePatterns: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
370
+ onNone: () => [],
371
+ onSome: (cfg) => cfg.ignore ?? []
372
+ }))),
373
+ isIgnored: (name, root) => read(root).pipe(effect.Effect.map(effect.Option.match({
374
+ onNone: () => false,
375
+ onSome: (cfg) => (cfg.ignore ?? []).some((p) => ChangesetConfig.matches(name, p))
376
+ }))),
377
+ fixed: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
378
+ onNone: () => [],
379
+ onSome: (cfg) => cfg.fixed ?? []
380
+ }))),
381
+ refresh: () => effect.Effect.sync(() => cache.clear())
382
+ };
383
+ }));
335
384
  };
336
- const isSilk = (cfg) => "_isSilk" in cfg && cfg._isSilk === true;
337
- /**
338
- * Live {@link ChangesetConfig} reading via {@link ChangesetConfigReader}, cached per root.
339
- *
340
- * @remarks
341
- * Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
342
- * `ChangesetConfigReaderLive` + a platform layer (`NodeServices.layer`).
343
- *
344
- * @since 0.4.0
345
- * @public
346
- */
347
- const ChangesetConfigLive = effect.Layer.effect(ChangesetConfig, effect.Effect.gen(function* () {
348
- const reader = yield* ChangesetConfigReader;
349
- const cache = /* @__PURE__ */ new Map();
350
- const read = (root) => effect.Effect.gen(function* () {
351
- const hit = cache.get(root);
352
- if (hit !== void 0) return hit;
353
- const result = yield* reader.read(root).pipe(effect.Effect.option);
354
- cache.set(root, result);
355
- return result;
356
- });
357
- return {
358
- mode: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
359
- onNone: () => "none",
360
- onSome: (cfg) => isSilk(cfg) ? "silk" : "vanilla"
361
- }))),
362
- versionPrivate: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
363
- onNone: () => false,
364
- onSome: (cfg) => {
365
- const pp = cfg.privatePackages;
366
- return pp !== void 0 && pp !== false && pp.version === true;
367
- }
368
- }))),
369
- ignorePatterns: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
370
- onNone: () => [],
371
- onSome: (cfg) => cfg.ignore ?? []
372
- }))),
373
- isIgnored: (name, root) => read(root).pipe(effect.Effect.map(effect.Option.match({
374
- onNone: () => false,
375
- onSome: (cfg) => (cfg.ignore ?? []).some((p) => ChangesetConfig.matches(name, p))
376
- }))),
377
- fixed: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
378
- onNone: () => [],
379
- onSome: (cfg) => cfg.fixed ?? []
380
- }))),
381
- refresh: () => effect.Effect.sync(() => cache.clear())
382
- };
383
- }));
384
385
  //#endregion
385
386
  //#region ../silk-effects/dist/dev/pkg/utils/TrailingSlash.js
386
387
  /**
@@ -400,7 +401,7 @@ const trimTrailingSlashes = (s) => {
400
401
  //#endregion
401
402
  //#region ../../node_modules/.pnpm/@effected+glob@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/glob/internal/limits.js
402
403
  /** Hard cap on pattern length. Upstream minimatch's MAX_PATTERN_LENGTH (64KB). */
403
- const MAX_PATTERN_LENGTH = 1024 * 64;
404
+ const MAX_PATTERN_LENGTH = 65536;
404
405
  /** Default brace-expansion output budget. Upstream brace-expansion's EXPANSION_MAX. */
405
406
  const EXPANSION_MAX = 1e5;
406
407
  /**
@@ -2332,7 +2333,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
2332
2333
  }
2333
2334
  };
2334
2335
  //#endregion
2335
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/BunExtension.js
2336
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/BunExtension.js
2336
2337
  /**
2337
2338
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2338
2339
  * when the format is `"bun"`.
@@ -2353,7 +2354,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
2353
2354
  trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
2354
2355
  }) {};
2355
2356
  //#endregion
2356
- //#region ../../node_modules/.pnpm/@effected+npm@0.6.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogResolver.js
2357
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogResolver.js
2357
2358
  /**
2358
2359
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2359
2360
  * version ranges.
@@ -2399,7 +2400,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
2399
2400
  static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
2400
2401
  };
2401
2402
  //#endregion
2402
- //#region ../../node_modules/.pnpm/@effected+npm@0.6.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/WorkspaceResolver.js
2403
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/WorkspaceResolver.js
2403
2404
  /**
2404
2405
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2405
2406
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2460,7 +2461,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
2460
2461
  static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
2461
2462
  };
2462
2463
  //#endregion
2463
- //#region ../../node_modules/.pnpm/@effected+npm@0.6.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogAssemblyError.js
2464
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogAssemblyError.js
2464
2465
  /**
2465
2466
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2466
2467
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2504,7 +2505,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
2504
2505
  }
2505
2506
  };
2506
2507
  //#endregion
2507
- //#region ../../node_modules/.pnpm/@effected+npm@0.6.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySection.js
2508
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySection.js
2508
2509
  /**
2509
2510
  * The short dependency kind: which dependency map an entry came from, named the
2510
2511
  * way consumers branch on it.
@@ -2536,7 +2537,7 @@ Object.fromEntries(Object.entries({
2536
2537
  optional: "optionalDependencies"
2537
2538
  }).map(([kind, field]) => [field, kind]));
2538
2539
  //#endregion
2539
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/desugar.js
2540
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/desugar.js
2540
2541
  const sv = (major, minor, patch, prerelease = [], build = []) => ({
2541
2542
  major,
2542
2543
  minor,
@@ -2625,7 +2626,7 @@ const desugarHyphen = (lower, upper) => {
2625
2626
  return [comp(">=", lowerVersion)];
2626
2627
  };
2627
2628
  //#endregion
2628
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/grammar.js
2629
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/grammar.js
2629
2630
  /** Private control-flow exception; never escapes the entry points. */
2630
2631
  var ParseFailure = class {
2631
2632
  position;
@@ -2861,13 +2862,17 @@ const parseSimple = (s) => {
2861
2862
  if (ch === "~") {
2862
2863
  advance$1(s);
2863
2864
  if (peek$1(s) === ">") return fail(s);
2864
- return desugarTilde(parsePartial(s));
2865
+ const partial = parsePartial(s);
2866
+ return desugarTilde(partial);
2865
2867
  }
2866
2868
  if (ch === "^") {
2867
2869
  advance$1(s);
2868
- return desugarCaret(parsePartial(s));
2870
+ const partial = parsePartial(s);
2871
+ return desugarCaret(partial);
2869
2872
  }
2870
- return desugarXRange(parseOperator(s), parsePartial(s));
2873
+ const operator = parseOperator(s);
2874
+ const partial = parsePartial(s);
2875
+ return desugarXRange(operator, partial);
2871
2876
  };
2872
2877
  const atRangeEnd = (s) => {
2873
2878
  if (atEnd$1(s)) return true;
@@ -2884,7 +2889,8 @@ const parseRangeComparators = (s) => {
2884
2889
  advance$1(s);
2885
2890
  advance$1(s);
2886
2891
  advance$1(s);
2887
- return desugarHyphen(lower, parsePartial(s));
2892
+ const upper = parsePartial(s);
2893
+ return desugarHyphen(lower, upper);
2888
2894
  } catch (failure) {
2889
2895
  if (!(failure instanceof ParseFailure)) throw failure;
2890
2896
  s.pos = savedPos;
@@ -3020,7 +3026,7 @@ const formatComparator = (c) => {
3020
3026
  /** Print comparator sets as `a b || c d`. */
3021
3027
  const formatRange = (sets) => sets.map((set) => set.map(formatComparator).join(" ")).join(" || ");
3022
3028
  //#endregion
3023
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/order.js
3029
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/order.js
3024
3030
  /**
3025
3031
  * Compare two prerelease identifiers per SemVer 2.0.0 §11: numeric
3026
3032
  * identifiers always have lower precedence than alphanumeric ones; numerics
@@ -3073,7 +3079,7 @@ const compareBuild = (a, b) => {
3073
3079
  return 0;
3074
3080
  };
3075
3081
  //#endregion
3076
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/SemVer.js
3082
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/SemVer.js
3077
3083
  /**
3078
3084
  * Indicates that a string could not be parsed as a valid SemVer 2.0.0 version.
3079
3085
  *
@@ -3154,6 +3160,35 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3154
3160
  encode: (parts) => effect.Effect.succeed(formatVersion(parts))
3155
3161
  })));
3156
3162
  /**
3163
+ * `Schema.String` refined by {@link SemVer.isValid}: an exact SemVer 2.0.0
3164
+ * version string whose type stays `string`.
3165
+ *
3166
+ * @remarks
3167
+ * For consumer structs whose field must remain a plain string — a manifest
3168
+ * model, an action input — while still refusing everything that is not
3169
+ * exactly one version: ranges, partial versions, dist-tags, and padded
3170
+ * input (see {@link SemVer.isValid} for the whitespace posture). Build
3171
+ * metadata is valid grammar and passes; reach for
3172
+ * {@link SemVer.PinnableVersionString} when the `+` position is spoken for.
3173
+ * Decode to a {@link SemVer} instance with {@link SemVer.FromString}
3174
+ * instead when the parsed components are wanted.
3175
+ */
3176
+ static ExactVersionString = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => SemVer.isValid(value) ? void 0 : "Expected an exact SemVer 2.0.0 version string (ranges, partial versions, dist-tags and surrounding whitespace are not valid)")));
3177
+ /**
3178
+ * `Schema.String` refined by {@link SemVer.isPinnable}: an exact,
3179
+ * build-metadata-free SemVer 2.0.0 version string whose type stays
3180
+ * `string`.
3181
+ *
3182
+ * @remarks
3183
+ * The corepack-pinnable notion: what the `<name>@<version>[+<integrity>]`
3184
+ * pin grammar can express in its version position, where the first `+`
3185
+ * always begins the integrity component. `@effected/package-json`'s
3186
+ * `PackageManager` field model consumes this schema directly; suites that
3187
+ * must prove they share it rather than carrying a copy can assert object
3188
+ * identity against this export.
3189
+ */
3190
+ static PinnableVersionString = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => SemVer.isPinnable(value) ? void 0 : "Expected an exact SemVer version with no build metadata (ranges, partial versions, dist-tags and surrounding whitespace are not pinnable)")));
3191
+ /**
3157
3192
  * Parse a strict SemVer 2.0.0 version string, synchronously, returning a
3158
3193
  * `Result` instead of an `Effect`.
3159
3194
  *
@@ -3161,6 +3196,12 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3161
3196
  * identifiers and partially consumed input.
3162
3197
  *
3163
3198
  * @remarks
3199
+ * **Surrounding whitespace is TRIMMED before parsing**, matching
3200
+ * node-semver's constructor: `" 1.2.3"` parses successfully. When padded
3201
+ * input should be the caller's error rather than silently canonicalized,
3202
+ * reach for {@link SemVer.isValid} / {@link SemVer.ExactVersionString}
3203
+ * (or their pinnable twins), which deliberately reject it.
3204
+ *
3164
3205
  * {@link SemVer.parse} is defined in terms of this function; the two never
3165
3206
  * diverge. Reach for the `Effect` variant inside Effect code — it carries
3166
3207
  * the `SemVer.parse` tracing span — and for this one at synchronous
@@ -3206,6 +3247,49 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3206
3247
  */
3207
3248
  static parse = effect.Effect.fn("SemVer.parse")((input) => effect.Effect.fromResult(SemVer.parseResult(input)));
3208
3249
  /**
3250
+ * Whether `input` is a valid SemVer 2.0.0 version string, exactly as
3251
+ * given.
3252
+ *
3253
+ * @remarks
3254
+ * Strict grammar validity — the same grammar as {@link SemVer.parseResult}
3255
+ * — with one deliberate divergence: surrounding whitespace is **rejected**.
3256
+ * `parseResult` trims its input (matching node-semver, whose `SemVer`
3257
+ * constructor trims), so `" 1.2.3"` parses; this predicate answers a
3258
+ * different question — "is this string, byte for byte, a version?" — and a
3259
+ * padded input is the caller's bug to surface, not this package's to hide.
3260
+ * Build metadata is valid grammar (`isValid("1.2.3+build")` is `true`);
3261
+ * reach for {@link SemVer.isPinnable} when the `+` position must stay
3262
+ * free.
3263
+ *
3264
+ * @param input - the candidate version string
3265
+ * @returns `true` when `input` is a valid version string with no
3266
+ * surrounding whitespace.
3267
+ */
3268
+ static isValid(input) {
3269
+ return input === input.trim() && effect.Result.isSuccess(SemVer.parseResult(input));
3270
+ }
3271
+ /**
3272
+ * Whether `input` is a corepack-pinnable version string: valid by
3273
+ * {@link SemVer.isValid} **and** carrying no build metadata.
3274
+ *
3275
+ * @remarks
3276
+ * The notion the `<name>@<version>[+<integrity>]` pin grammar needs: there
3277
+ * the first `+` after the version always begins the integrity component,
3278
+ * so a version carrying build identifiers would encode to a string that
3279
+ * re-parses differently. Prerelease versions are pinnable; the whitespace
3280
+ * posture is {@link SemVer.isValid}'s.
3281
+ *
3282
+ * @param input - the candidate version string
3283
+ * @returns `true` when `input` is a valid version string with no
3284
+ * surrounding whitespace (the string equals its own trim) and whose
3285
+ * build metadata is empty.
3286
+ */
3287
+ static isPinnable(input) {
3288
+ if (input !== input.trim()) return false;
3289
+ const parsed = SemVer.parseResult(input);
3290
+ return effect.Result.isSuccess(parsed) && parsed.success.build.length === 0;
3291
+ }
3292
+ /**
3209
3293
  * Positional convenience constructor: `SemVer.of(1, 2, 3)`.
3210
3294
  *
3211
3295
  * @param major - the major version component
@@ -3308,9 +3392,7 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
3308
3392
  case "minor":
3309
3393
  key = `${version.major}.${version.minor}`;
3310
3394
  break;
3311
- case "patch":
3312
- key = `${version.major}.${version.minor}.${version.patch}`;
3313
- break;
3395
+ case "patch": key = `${version.major}.${version.minor}.${version.patch}`;
3314
3396
  }
3315
3397
  const group = grouped[key] ?? [];
3316
3398
  group.push(version);
@@ -3508,7 +3590,7 @@ var SemVerBump = class {
3508
3590
  }
3509
3591
  };
3510
3592
  //#endregion
3511
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/Comparator.js
3593
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/Comparator.js
3512
3594
  /**
3513
3595
  * Indicates that a string could not be parsed as a single comparator.
3514
3596
  *
@@ -3642,7 +3724,7 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
3642
3724
  }
3643
3725
  };
3644
3726
  //#endregion
3645
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/normalize.js
3727
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/normalize.js
3646
3728
  const operatorWeight = (op) => {
3647
3729
  switch (op) {
3648
3730
  case ">=": return 0;
@@ -3673,7 +3755,7 @@ const normalizeComparatorSet = (set) => sortComparators(removeDuplicates(set));
3673
3755
  /** Normalize every comparator set in a range: sort and deduplicate each independently. */
3674
3756
  const normalizeSets = (sets) => sets.map(normalizeComparatorSet);
3675
3757
  //#endregion
3676
- //#region ../../node_modules/.pnpm/@effected+semver@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/semver/Range.js
3758
+ //#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/Range.js
3677
3759
  /**
3678
3760
  * Indicates that a string could not be parsed as a range expression.
3679
3761
  *
@@ -3952,9 +4034,7 @@ const isSetSatisfiable = (set) => {
3952
4034
  case "<=":
3953
4035
  if (cmp > 0) return false;
3954
4036
  break;
3955
- case "=":
3956
- if (cmp !== 0) return false;
3957
- break;
4037
+ case "=": if (cmp !== 0) return false;
3958
4038
  }
3959
4039
  }
3960
4040
  for (const lo of lowers) for (const hi of uppers) {
@@ -3993,9 +4073,7 @@ const isComparatorImplied = (set, comp) => {
3993
4073
  if (s.operator === "<=" && cmp < 0) return true;
3994
4074
  if (s.operator === "=" && cmp < 0) return true;
3995
4075
  break;
3996
- case "=":
3997
- if (s.operator === "=" && cmp === 0) return true;
3998
- break;
4076
+ case "=": if (s.operator === "=" && cmp === 0) return true;
3999
4077
  }
4000
4078
  }
4001
4079
  return false;
@@ -4005,7 +4083,7 @@ const isComparatorSetSubset = (sub, sup) => {
4005
4083
  return true;
4006
4084
  };
4007
4085
  //#endregion
4008
- //#region ../../node_modules/.pnpm/@effected+npm@0.6.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySpecifier.js
4086
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySpecifier.js
4009
4087
  /**
4010
4088
  * Indicates that a string could not be parsed as a valid dependency specifier.
4011
4089
  *
@@ -4212,9 +4290,9 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4212
4290
  FromString: fromString
4213
4291
  });
4214
4292
  //#endregion
4215
- //#region ../../node_modules/.pnpm/@effected+npm@0.6.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/IntegrityHash.js
4293
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/IntegrityHash.js
4216
4294
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4217
- const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
4295
+ const COREPACK_RE = /^(sha1|sha224|sha256|sha384|sha512)\.[0-9a-f]+$/;
4218
4296
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
4219
4297
  const isSri = (value) => SRI_RE.test(value);
4220
4298
  const isCorepack = (value) => COREPACK_RE.test(value);
@@ -4264,6 +4342,58 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4264
4342
  algorithmOf,
4265
4343
  decode: decode$2
4266
4344
  });
4345
+ /**
4346
+ * {@link (IntegrityHash:variable)} narrowed to the corepack `<algo>.<hex>` form
4347
+ * — `sha512.deadbeef`, and corepack's own sha224 default pins
4348
+ * (`sha224.877304e3…`). An SRI (`sha512-<base64>`) or yarn (`10c0/<hex>`)
4349
+ * hash, both valid `IntegrityHash` values, fails this schema.
4350
+ *
4351
+ * @remarks
4352
+ * The corepack pin tail (`<name>@<version>+<integrity>`) is the one place the
4353
+ * kit meets this form, and two schemas name it: `PackageManagerPin.integrity`
4354
+ * here and `@effected/package-json`'s `PackageManager.integrity`. Both consume
4355
+ * **this** schema — the restriction existed privately in each module until they
4356
+ * were consolidated, and a private copy is exactly how the two drift (the
4357
+ * widening that admitted sha224 had to be made twice).
4358
+ *
4359
+ * It decodes to the same {@link IntegrityHashBrand} the unrestricted schema
4360
+ * does, so a corepack-validated value assigns anywhere an `IntegrityHash` is
4361
+ * expected; there is no second brand. Reach for
4362
+ * `IntegrityHash.isCorepack(value)` to ask the same question about a raw
4363
+ * string without decoding.
4364
+ *
4365
+ * That single brand is also why sharing this schema is not type-enforced, and
4366
+ * the consequence is sharper than it looks: a `Schema.check` is **erased from
4367
+ * the built type**, so this schema and the unrestricted one are the same
4368
+ * declared type. A consumer that quietly reverts to a private copy compiles
4369
+ * clean, and — if the copy is faithful — passes every rejection test too.
4370
+ * Neither `tsc` nor behaviour can see the re-fork.
4371
+ *
4372
+ * What does see it is **object identity**, so each consumer's suite asserts
4373
+ * that its field schema IS this export:
4374
+ * `PackageManagerPin.fields.integrity.schema === CorepackIntegrityHash` (an
4375
+ * `optionalKey` field keeps the inner schema on `.schema`), and
4376
+ * `PackageManager.fields.integrity.value === CorepackIntegrityHash` on the
4377
+ * `@effected/package-json` side (a `Schema.Option` keeps it on `.value`). Both
4378
+ * assertions carry a control against the unrestricted brand, so they discriminate
4379
+ * rather than passing on any schema at all. That identity assertion is the only
4380
+ * thing standing between the two surfaces and a silent re-fork; do not replace
4381
+ * it with a behavioural test, which cannot fail.
4382
+ *
4383
+ * @example
4384
+ * ```ts
4385
+ * import { CorepackIntegrityHash } from "@effected/npm";
4386
+ * import { Schema } from "effect";
4387
+ *
4388
+ * const decode = Schema.decodeUnknownExit(CorepackIntegrityHash);
4389
+ *
4390
+ * decode("sha512.deadbeef"); // success
4391
+ * decode("sha512-3q2+7w=="); // failure — SRI form
4392
+ * ```
4393
+ *
4394
+ * @public
4395
+ */
4396
+ const CorepackIntegrityHash = brandedIntegrity.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
4267
4397
  effect.Schema.Literals([
4268
4398
  "npm",
4269
4399
  "pnpm",
@@ -4459,7 +4589,7 @@ var LocalExec = class LocalExec extends effect.Context.Service()("@effected/comm
4459
4589
  static layerTest = (overrides = {}) => effect.Layer.succeed(LocalExec, LocalExec.makeTest(overrides));
4460
4590
  };
4461
4591
  //#endregion
4462
- //#region ../../node_modules/.pnpm/@effected+npm@0.6.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/ReleaseAgeGate.js
4592
+ //#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/ReleaseAgeGate.js
4463
4593
  const MS_PER_MINUTE = 6e4;
4464
4594
  /**
4465
4595
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -4629,7 +4759,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
4629
4759
  }
4630
4760
  };
4631
4761
  //#endregion
4632
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/ImporterDependency.js
4762
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/ImporterDependency.js
4633
4763
  /**
4634
4764
  * One declared dependency of one workspace importer, as the lockfile records it.
4635
4765
  *
@@ -4667,7 +4797,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
4667
4797
  depType: DependencyField
4668
4798
  }) {};
4669
4799
  //#endregion
4670
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/LockfileImporter.js
4800
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/LockfileImporter.js
4671
4801
  /**
4672
4802
  * One workspace importer's declared dependencies, as the lockfile records them.
4673
4803
  *
@@ -4691,7 +4821,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
4691
4821
  dependencies: effect.Schema.Array(ImporterDependency)
4692
4822
  }) {};
4693
4823
  //#endregion
4694
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/ResolvedPackage.js
4824
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/ResolvedPackage.js
4695
4825
  const EMPTY_DEPENDENCIES = {};
4696
4826
  /**
4697
4827
  * A package resolved from a lockfile.
@@ -4726,7 +4856,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
4726
4856
  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)))
4727
4857
  }) {};
4728
4858
  //#endregion
4729
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/WorkspaceDependency.js
4859
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/WorkspaceDependency.js
4730
4860
  /**
4731
4861
  * A directed dependency edge between two workspace packages as recorded in
4732
4862
  * the lockfile.
@@ -4748,7 +4878,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
4748
4878
  constraint: effect.Schema.String
4749
4879
  }) {};
4750
4880
  //#endregion
4751
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/PnpmExtension.js
4881
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/PnpmExtension.js
4752
4882
  /**
4753
4883
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
4754
4884
  * when the format is `"pnpm"`.
@@ -4773,7 +4903,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
4773
4903
  }))
4774
4904
  }) {};
4775
4905
  //#endregion
4776
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/LockfileFormat.js
4906
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/LockfileFormat.js
4777
4907
  /**
4778
4908
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
4779
4909
  * `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -4794,20 +4924,24 @@ const LockfileFormat = effect.Schema.Literals([
4794
4924
  "yarn"
4795
4925
  ]);
4796
4926
  const FILENAMES = {
4797
- bun: "bun.lock",
4798
- npm: "package-lock.json",
4799
- pnpm: "pnpm-lock.yaml",
4800
- yarn: "yarn.lock"
4927
+ bun: ["bun.lock", "bun.lockb"],
4928
+ npm: ["package-lock.json", "npm-shrinkwrap.json"],
4929
+ pnpm: ["pnpm-lock.yaml"],
4930
+ yarn: ["yarn.lock"]
4801
4931
  };
4802
4932
  /**
4803
4933
  * The conventional lockfile filename for a format: `"bun.lock"`,
4804
4934
  * `"package-lock.json"`, `"pnpm-lock.yaml"` or `"yarn.lock"`.
4805
4935
  *
4936
+ * @remarks
4937
+ * The primary name only — the first element of {@link filenamesFor}, which is
4938
+ * what detection that must also see the genuine alternates should use.
4939
+ *
4806
4940
  * @public
4807
4941
  */
4808
- const filenameFor = (format) => FILENAMES[format];
4942
+ const filenameFor = (format) => FILENAMES[format][0];
4809
4943
  //#endregion
4810
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/internal/shared.js
4944
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/shared.js
4811
4945
  /**
4812
4946
  * The four dependency sections of a manifest, in a stable order — the shared
4813
4947
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -5222,9 +5356,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
5222
5356
  else tokenError = "InvalidUnicode";
5223
5357
  break;
5224
5358
  }
5225
- default:
5226
- tokenError = "InvalidEscapeCharacter";
5227
- break;
5359
+ default: tokenError = "InvalidEscapeCharacter";
5228
5360
  }
5229
5361
  start = pos;
5230
5362
  } else if (isLineBreak$1(ch)) {
@@ -6738,7 +6870,7 @@ var JsoncModifier = class {
6738
6870
  });
6739
6871
  };
6740
6872
  //#endregion
6741
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/internal/bun.js
6873
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/bun.js
6742
6874
  const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6743
6875
  const BunWorkspaceEntry = effect.Schema.Struct({
6744
6876
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -6831,7 +6963,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
6831
6963
  };
6832
6964
  });
6833
6965
  //#endregion
6834
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/internal/npm.js
6966
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/npm.js
6835
6967
  const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
6836
6968
  const NpmPackageEntry = effect.Schema.Struct({
6837
6969
  name: effect.Schema.optionalKey(effect.Schema.String),
@@ -13753,7 +13885,7 @@ function deepEqualValues(a, b) {
13753
13885
  return false;
13754
13886
  }
13755
13887
  //#endregion
13756
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/internal/documents.js
13888
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/documents.js
13757
13889
  /**
13758
13890
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
13759
13891
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -13823,7 +13955,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
13823
13955
  };
13824
13956
  });
13825
13957
  //#endregion
13826
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/internal/pnpm.js
13958
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/pnpm.js
13827
13959
  const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
13828
13960
  specifier: effect.Schema.String,
13829
13961
  version: effect.Schema.String
@@ -13948,7 +14080,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
13948
14080
  };
13949
14081
  });
13950
14082
  //#endregion
13951
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/internal/yarn.js
14083
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/yarn.js
13952
14084
  const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
13953
14085
  const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
13954
14086
  const YarnEntry = effect.Schema.Struct({
@@ -14071,7 +14203,7 @@ const cleanYarnDeps = (deps) => {
14071
14203
  return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
14072
14204
  };
14073
14205
  //#endregion
14074
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/Lockfile.js
14206
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/Lockfile.js
14075
14207
  const EMPTY_IMPORTERS = [];
14076
14208
  /**
14077
14209
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -14315,7 +14447,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
14315
14447
  }
14316
14448
  };
14317
14449
  //#endregion
14318
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.2_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._96898a3d00962223825b2ef21022f405/node_modules/@effected/lockfiles/LockfileIntegrity.js
14450
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/LockfileIntegrity.js
14319
14451
  /**
14320
14452
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
14321
14453
  * lockfile against: a package name plus the four optional dependency maps.
@@ -14431,7 +14563,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
14431
14563
  }
14432
14564
  };
14433
14565
  //#endregion
14434
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14566
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
14435
14567
  /**
14436
14568
  * A resolved dependency entry pairing a package name with its version
14437
14569
  * specifier and the `kind` of map it came from (`@effected/npm`'s
@@ -14495,7 +14627,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
14495
14627
  }
14496
14628
  };
14497
14629
  //#endregion
14498
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14630
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
14499
14631
  /**
14500
14632
  * A single `devEngines` constraint with a name and optional `version` / `onFail`.
14501
14633
  *
@@ -16050,7 +16182,7 @@ effect.Schema.String.pipe(effect.Schema.decodeTo(SpdxExpressionUnion, effect.Sch
16050
16182
  encode: (expression) => effect.Effect.succeed(serialize$1(expression))
16051
16183
  })));
16052
16184
  //#endregion
16053
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16185
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
16054
16186
  /**
16055
16187
  * Indicates that a string is not a valid SPDX license identifier or expression.
16056
16188
  *
@@ -16085,50 +16217,103 @@ const isValidSpdx = (value) => {
16085
16217
  */
16086
16218
  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"));
16087
16219
  //#endregion
16088
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16089
- const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
16090
- /**
16091
- * The `packageManager` field only ever carries corepack's `<algo>.<hex>`
16092
- * integrity form (the `name@version+sha512.<hex>` tail). Restrict the
16093
- * `@effected/npm` `IntegrityHash` brand — which also admits the SRI and yarn
16094
- * forms — to just the corepack shape, so an SRI or yarn integrity here fails
16095
- * typed rather than being accepted into a field that can never legitimately
16096
- * hold it.
16097
- */
16098
- const CorepackIntegrity = IntegrityHash.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => IntegrityHash.isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
16220
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
16221
+ const PACKAGE_MANAGER_NAME_RE = /^[a-z]+$/;
16222
+ const invalid$1 = (input, message) => effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message }));
16099
16223
  /**
16100
16224
  * A structured `packageManager` value with `name`, `version` and an optional
16101
16225
  * `integrity` hash.
16102
16226
  *
16227
+ * @remarks
16228
+ * The same `<name>@<version>[+<integrity>]` triple `@effected/npm`'s
16229
+ * `PackageManagerPin` models, in its `package.json` field form. Both share the
16230
+ * strict pieces — the version is `@effected/semver`'s
16231
+ * `SemVer.PinnableVersionString` (decode rules through `SemVer.isPinnable`),
16232
+ * the integrity is npm's `CorepackIntegrityHash` — and
16233
+ * both apply the first-`+`-is-integrity rule. Reach for the pin when
16234
+ * provisioning a package manager; reach for this class when reading or writing
16235
+ * the manifest field.
16236
+ *
16237
+ * **The one deliberate divergence is the name grammar**, and it points this
16238
+ * way: the pin closes the set to the four managers the kit can provision
16239
+ * (`npm | pnpm | yarn | bun`), while this field model accepts any lowercase
16240
+ * name. The evidence:
16241
+ *
16242
+ * - Corepack 0.34.0 (`specUtils.ts`, `parseSpec`) recognises **three** names —
16243
+ * `npm`, `pnpm`, `yarn` — and throws an "unsupported package manager
16244
+ * specification" usage error for any other. Adopting that set here would reject
16245
+ * `bun@1.2.20`, which is real: six published packages in this repo's own
16246
+ * `node_modules` carry exactly that value, and a manifest model that cannot
16247
+ * read them is useless for the job it has.
16248
+ * - Corepack does not treat the set as closed either. `parseSpec` skips the
16249
+ * name check entirely when the spec is a URL, so a custom name is reachable
16250
+ * in corepack's own grammar (behind `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS`).
16251
+ * - npm documents no constraint on this field at all. Its `package.json`
16252
+ * reference constrains only `devEngines.packageManager.name` — a different
16253
+ * field, modeled here by `DevEngine` and out of scope for this class.
16254
+ *
16255
+ * So: field model = manifests as they exist in the wild; pin = the kit's
16256
+ * provisioning vocabulary. A name outside the pin's four is representable here
16257
+ * and simply will not be installable through the pin — which is the honest
16258
+ * relationship between a document model and a provisioning contract.
16259
+ *
16103
16260
  * @public
16104
16261
  */
16105
16262
  var PackageManager = class PackageManager extends effect.Schema.Class("PackageManager")({
16106
- /** The package-manager name (e.g. `pnpm`). */
16263
+ /** The package-manager name (e.g. `pnpm`). Any lowercase name — see the class remarks. */
16107
16264
  name: effect.Schema.String,
16108
- /** The version (e.g. `10.33.0`). */
16109
- version: effect.Schema.String,
16110
- /** The optional integrity hash (e.g. `sha512.abc`), an `@effected/npm` `IntegrityHash` restricted to the corepack `<algo>.<hex>` form. */
16111
- integrity: effect.Schema.Option(CorepackIntegrity)
16265
+ /**
16266
+ * The version (e.g. `10.33.0`): `@effected/semver`'s
16267
+ * `SemVer.PinnableVersionString` an exact SemVer 2.0.0 version with no
16268
+ * build metadata and no surrounding whitespace. Prerelease versions are
16269
+ * allowed (`10.0.0-rc.1`); ranges, partial versions, dist-tags,
16270
+ * leading-zero components and padded values are not, and a version
16271
+ * carrying build metadata is rejected at construction because the grammar
16272
+ * cannot express it. The shared schema is consumed by identity, not
16273
+ * copied — the suite asserts `fields.version === SemVer.PinnableVersionString`.
16274
+ */
16275
+ version: SemVer.PinnableVersionString,
16276
+ /**
16277
+ * The optional integrity hash (e.g. `sha512.abc`): `@effected/npm`'s
16278
+ * `CorepackIntegrityHash`, the shared restriction of the `IntegrityHash`
16279
+ * brand to the corepack `<algo>.<hex>` form.
16280
+ */
16281
+ integrity: effect.Schema.Option(CorepackIntegrityHash)
16112
16282
  }) {
16113
16283
  /**
16114
16284
  * Schema transformation between the `"name@version+integrity"` string and a
16115
16285
  * {@link PackageManager}.
16286
+ *
16287
+ * @remarks
16288
+ * Decoding splits on the first `@`, then on the first `+` — which always
16289
+ * begins the integrity, never semver build metadata — and validates each
16290
+ * component: the name against the lowercase grammar, the version through
16291
+ * `@effected/semver`'s strict parse, the integrity through
16292
+ * `CorepackIntegrityHash`. Every failure is a typed decode failure naming
16293
+ * the component that failed. Encoding prints the canonical string, which is
16294
+ * byte-identical to any input this codec accepts.
16116
16295
  */
16117
16296
  static FromString = effect.Schema.String.pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(PackageManager), effect.SchemaTransformation.transformOrFail({
16118
16297
  decode: (input) => {
16119
- const match = input.match(PACKAGE_MANAGER_RE);
16120
- if (match === null) return effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message: `Invalid packageManager format: "${input}"` }));
16121
- const rawIntegrity = match[3];
16122
- if (rawIntegrity === void 0) return effect.Effect.succeed(PackageManager.make({
16123
- name: match[1],
16124
- version: match[2],
16298
+ const at = input.indexOf("@");
16299
+ if (at === -1) return invalid$1(input, `Invalid packageManager format: "${input}"`);
16300
+ const name = input.slice(0, at);
16301
+ if (!PACKAGE_MANAGER_NAME_RE.test(name)) return invalid$1(input, `Invalid packageManager name: "${name}"`);
16302
+ const rest = input.slice(at + 1);
16303
+ const plus = rest.indexOf("+");
16304
+ const version = plus === -1 ? rest : rest.slice(0, plus);
16305
+ if (!SemVer.isPinnable(version)) return invalid$1(input, `Invalid packageManager version: "${version}"`);
16306
+ if (plus === -1) return effect.Effect.succeed(PackageManager.make({
16307
+ name,
16308
+ version,
16125
16309
  integrity: effect.Option.none()
16126
16310
  }));
16127
- const decoded = effect.Schema.decodeUnknownExit(CorepackIntegrity)(rawIntegrity);
16128
- if (effect.Exit.isFailure(decoded)) return effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message: `Invalid packageManager integrity: "${rawIntegrity}"` }));
16311
+ const rawIntegrity = rest.slice(plus + 1);
16312
+ const decoded = effect.Schema.decodeUnknownExit(CorepackIntegrityHash)(rawIntegrity);
16313
+ if (effect.Exit.isFailure(decoded)) return invalid$1(input, `Invalid packageManager integrity: "${rawIntegrity}"`);
16129
16314
  return effect.Effect.succeed(PackageManager.make({
16130
- name: match[1],
16131
- version: match[2],
16315
+ name,
16316
+ version,
16132
16317
  integrity: effect.Option.some(decoded.value)
16133
16318
  }));
16134
16319
  },
@@ -16143,7 +16328,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
16143
16328
  }
16144
16329
  };
16145
16330
  //#endregion
16146
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16331
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
16147
16332
  /**
16148
16333
  * Indicates that a string could not be used as a valid npm package name.
16149
16334
  *
@@ -16201,7 +16386,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
16201
16386
  isScoped
16202
16387
  });
16203
16388
  //#endregion
16204
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16389
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
16205
16390
  const parsePersonString = (input) => {
16206
16391
  const emailMatch = input.match(/<([^>]+)>/);
16207
16392
  const urlMatch = input.match(/\(([^)]+)\)/);
@@ -16347,7 +16532,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
16347
16532
  }
16348
16533
  };
16349
16534
  //#endregion
16350
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Repository.js
16535
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Repository.js
16351
16536
  /** The shorthand hosts npm resolves without a scheme. */
16352
16537
  const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
16353
16538
  ["github", "https://github.com"],
@@ -16522,7 +16707,7 @@ var Bugs = class Bugs extends effect.Schema.Class("Bugs")({
16522
16707
  })));
16523
16708
  };
16524
16709
  //#endregion
16525
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16710
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
16526
16711
  const KEY_INDEX = new Map([
16527
16712
  "$schema",
16528
16713
  "name",
@@ -16745,7 +16930,7 @@ const renderJson = (raw, options) => {
16745
16930
  return options.newline ? `${json}\n` : json;
16746
16931
  };
16747
16932
  //#endregion
16748
- //#region ../../node_modules/.pnpm/@effected+package-json@0.6.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16933
+ //#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
16749
16934
  const toHashMap = effect.SchemaTransformation.transform({
16750
16935
  decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
16751
16936
  encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
@@ -17056,11 +17241,12 @@ var Package = class Package extends effect.Schema.Class("Package")({
17056
17241
  * sorting and empty-map stripping unless the options opt out. Pure.
17057
17242
  */
17058
17243
  toJsonString(options) {
17059
- return renderJson(effect.Schema.encodeUnknownSync(Package.schema)(this), resolveFormatOptions(options));
17244
+ const raw = effect.Schema.encodeUnknownSync(Package.schema)(this);
17245
+ return renderJson(raw, resolveFormatOptions(options));
17060
17246
  }
17061
17247
  };
17062
17248
  //#endregion
17063
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspacePackage.js
17249
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspacePackage.js
17064
17250
  const EMPTY$1 = Object.freeze(Object.create(null));
17065
17251
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
17066
17252
  /**
@@ -17658,7 +17844,7 @@ var Walker$1 = class {
17658
17844
  static findRoot = findRoot$1;
17659
17845
  };
17660
17846
  //#endregion
17661
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceRoot.js
17847
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceRoot.js
17662
17848
  /**
17663
17849
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
17664
17850
  *
@@ -17845,7 +18031,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
17845
18031
  static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
17846
18032
  };
17847
18033
  //#endregion
17848
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/limits.js
18034
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/limits.js
17849
18035
  /**
17850
18036
  * Hard ceiling on directories the enumerator will visit for one pattern set.
17851
18037
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -17863,7 +18049,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
17863
18049
  */
17864
18050
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
17865
18051
  //#endregion
17866
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/traverse.js
18052
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/traverse.js
17867
18053
  /** Directory names never descended into. */
17868
18054
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
17869
18055
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -17953,7 +18139,7 @@ var Traversal = class {
17953
18139
  }
17954
18140
  };
17955
18141
  //#endregion
17956
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/enumerate.js
18142
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/enumerate.js
17957
18143
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
17958
18144
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
17959
18145
  /**
@@ -18023,7 +18209,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
18023
18209
  return results;
18024
18210
  });
18025
18211
  //#endregion
18026
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/patterns.js
18212
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/patterns.js
18027
18213
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
18028
18214
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
18029
18215
  const pnpmPatternsOf = (document) => {
@@ -18080,7 +18266,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
18080
18266
  return manifestPatternsOf(manifest);
18081
18267
  });
18082
18268
  //#endregion
18083
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceDiscovery.js
18269
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceDiscovery.js
18084
18270
  /**
18085
18271
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
18086
18272
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -18281,12 +18467,13 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18281
18467
  kind: failure.kind,
18282
18468
  cause: failure.cause
18283
18469
  })));
18284
- const directories = yield* enumerate(root, yield* GlobSet.compile(patterns).pipe(effect.Effect.mapError((error) => new WorkspacePatternError({
18470
+ const globs = yield* GlobSet.compile(patterns).pipe(effect.Effect.mapError((error) => new WorkspacePatternError({
18285
18471
  root,
18286
18472
  pattern: error.pattern,
18287
18473
  kind: "uncompilable",
18288
18474
  detail: error.message
18289
- }))), { maxDepth: options?.maxDepth ?? 32 }).pipe(effect.Effect.mapError((failure) => new WorkspacePatternError({
18475
+ })));
18476
+ const directories = yield* enumerate(root, globs, { maxDepth: options?.maxDepth ?? 32 }).pipe(effect.Effect.mapError((failure) => new WorkspacePatternError({
18290
18477
  root,
18291
18478
  pattern: failure.pattern,
18292
18479
  kind: patternKindOf(failure.kind),
@@ -18517,7 +18704,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
18517
18704
  };
18518
18705
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
18519
18706
  //#endregion
18520
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/DependencyGraph.js
18707
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/DependencyGraph.js
18521
18708
  /**
18522
18709
  * Raised when the workspace dependency graph cannot be topologically ordered
18523
18710
  * because it contains a cycle.
@@ -18662,10 +18849,9 @@ packages: effect.Schema.Array(WorkspacePackage) }) {
18662
18849
  const { reverse } = this.#index();
18663
18850
  const affected = /* @__PURE__ */ new Set();
18664
18851
  const queue = [...names];
18665
- while (queue.length > 0) {
18666
- const current = queue.shift();
18667
- /* v8 ignore next */
18668
- if (current === void 0) break;
18852
+ for (let head = 0; head < queue.length; head += 1) {
18853
+ const current = queue[head];
18854
+ if (current === void 0) continue;
18669
18855
  if (affected.has(current)) continue;
18670
18856
  affected.add(current);
18671
18857
  for (const dependent of reverse.get(current) ?? []) if (!affected.has(dependent)) queue.push(dependent);
@@ -18696,10 +18882,9 @@ packages: effect.Schema.Array(WorkspacePackage) }) {
18696
18882
  }));
18697
18883
  const needed = /* @__PURE__ */ new Set();
18698
18884
  const queue = [...names];
18699
- while (queue.length > 0) {
18700
- const current = queue.shift();
18701
- /* v8 ignore next */
18702
- if (current === void 0) break;
18885
+ for (let head = 0; head < queue.length; head += 1) {
18886
+ const current = queue[head];
18887
+ if (current === void 0) continue;
18703
18888
  if (needed.has(current)) continue;
18704
18889
  needed.add(current);
18705
18890
  for (const dependency of forward.get(current) ?? []) if (!needed.has(dependency)) queue.push(dependency);
@@ -20161,7 +20346,7 @@ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
20161
20346
  static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
20162
20347
  };
20163
20348
  //#endregion
20164
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ChangeDetector.js
20349
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ChangeDetector.js
20165
20350
  /**
20166
20351
  * Which git refs to compare, and whether to fold in the working tree.
20167
20352
  *
@@ -20413,7 +20598,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
20413
20598
  };
20414
20599
  }
20415
20600
  //#endregion
20416
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/catalogs.js
20601
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/catalogs.js
20417
20602
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
20418
20603
  const inlineCatalogs = (manifest) => {
20419
20604
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -20431,7 +20616,7 @@ const merge = (...sources) => mergeCatalogs(...sources);
20431
20616
  /** Whether `specifier` is a `catalog:` protocol reference, and which catalog it names. */
20432
20617
  const catalogNameOf = (specifier) => parseCatalogProtocol(specifier);
20433
20618
  /** Normalize the arbitrary shape of a catalog map into `CatalogEntries`, dropping anything unusable. */
20434
- const normalize$1 = (raw) => {
20619
+ const normalize$2 = (raw) => {
20435
20620
  if (raw === null || typeof raw !== "object") return {};
20436
20621
  const entries = {};
20437
20622
  for (const [catalogName, catalog] of Object.entries(raw)) {
@@ -20477,7 +20662,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
20477
20662
  });
20478
20663
  };
20479
20664
  //#endregion
20480
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ConfigDependencyHooks.js
20665
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ConfigDependencyHooks.js
20481
20666
  /** Whether `value` is a non-null, non-array object. */
20482
20667
  const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
20483
20668
  /**
@@ -20558,7 +20743,7 @@ const configToEntries = (config) => {
20558
20743
  ...isObject$2(raw.default) ? raw.default : {},
20559
20744
  ...config.catalog
20560
20745
  };
20561
- return normalize$1(raw);
20746
+ return normalize$2(raw);
20562
20747
  };
20563
20748
  /** Locate the `updateConfig` hook across the CJS/ESM export shapes a `pnpmfile.cjs` can present. */
20564
20749
  const updateConfigOf = (mod) => {
@@ -20626,7 +20811,8 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
20626
20811
  let loaded;
20627
20812
  let found = false;
20628
20813
  for (const filename of ["pnpmfile.mjs", "pnpmfile.cjs"]) {
20629
- const candidateUrl = (0, node_url.pathToFileURL)((0, node_path.join)(root, "node_modules", ".pnpm-config", name, filename)).href;
20814
+ const candidatePath = (0, node_path.join)(root, "node_modules", ".pnpm-config", name, filename);
20815
+ const candidateUrl = (0, node_url.pathToFileURL)(candidatePath).href;
20630
20816
  const result = yield* effect.Effect.result(effect.Effect.tryPromise({
20631
20817
  try: () => import(candidateUrl),
20632
20818
  catch: (cause) => cause
@@ -20663,7 +20849,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
20663
20849
  }) });
20664
20850
  };
20665
20851
  //#endregion
20666
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/PackageManagerName.js
20852
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/PackageManagerName.js
20667
20853
  /**
20668
20854
  * The four package managers this package understands.
20669
20855
  *
@@ -20991,7 +21177,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
20991
21177
  static layerTest = (overrides = {}) => effect.Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
20992
21178
  };
20993
21179
  //#endregion
20994
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/LockfileReader.js
21180
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/LockfileReader.js
20995
21181
  /**
20996
21182
  * Raised when the workspace's lockfile cannot be read off disk.
20997
21183
  *
@@ -21171,7 +21357,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
21171
21357
  static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
21172
21358
  };
21173
21359
  //#endregion
21174
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Publishability.js
21360
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Publishability.js
21175
21361
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
21176
21362
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
21177
21363
  /**
@@ -21330,7 +21516,7 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
21330
21516
  static layerNone = effect.Layer.succeed(this, this.none);
21331
21517
  };
21332
21518
  //#endregion
21333
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/importerVersions.js
21519
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/importerVersions.js
21334
21520
  /**
21335
21521
  * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
21336
21522
  *
@@ -21416,7 +21602,7 @@ const unanimousVersionOf = (index, dependency) => {
21416
21602
  return agreed;
21417
21603
  };
21418
21604
  //#endregion
21419
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceCatalogs.js
21605
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceCatalogs.js
21420
21606
  /**
21421
21607
  * An immutable, fully-normalized catalog collection — the one catalog
21422
21608
  * resolution semantic in the package.
@@ -21439,7 +21625,7 @@ entries: effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.
21439
21625
  }
21440
21626
  /** Wrap a pnpm `Catalogs` map, dropping unusable entries. */
21441
21627
  static fromCatalogs(catalogs) {
21442
- return CatalogSet.make({ entries: normalize$1(catalogs) });
21628
+ return CatalogSet.make({ entries: normalize$2(catalogs) });
21443
21629
  }
21444
21630
  /**
21445
21631
  * The `catalog:` and `catalogs:` blocks of a `pnpm-workspace.yaml` document.
@@ -21459,7 +21645,7 @@ entries: effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.
21459
21645
  * range or a `{ specifier, version }` pair.
21460
21646
  */
21461
21647
  static fromLockfileCatalogs(raw) {
21462
- return CatalogSet.make({ entries: normalize$1(raw) });
21648
+ return CatalogSet.make({ entries: normalize$2(raw) });
21463
21649
  }
21464
21650
  /**
21465
21651
  * The catalog set a parsed lockfile records, PM-aware.
@@ -21925,7 +22111,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
21925
22111
  }));
21926
22112
  };
21927
22113
  //#endregion
21928
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
22114
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
21929
22115
  const EMPTY = Object.freeze(Object.create(null));
21930
22116
  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)));
21931
22117
  /**
@@ -22148,7 +22334,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
22148
22334
  }
22149
22335
  };
22150
22336
  //#endregion
22151
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceSnapshots.js
22337
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceSnapshots.js
22152
22338
  /** Whether `value` is a non-null, non-array object. */
22153
22339
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
22154
22340
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -22264,11 +22450,12 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22264
22450
  let inline;
22265
22451
  let recorded;
22266
22452
  if (effect.Option.isSome(pnpmWorkspaceText)) {
22267
- const pnpmPatterns = pnpmPatternsOf(yield* Yaml.parse(pnpmWorkspaceText.value).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
22453
+ const document = yield* Yaml.parse(pnpmWorkspaceText.value).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
22268
22454
  source: "manifest",
22269
22455
  path: "pnpm-workspace.yaml",
22270
22456
  cause
22271
- }))));
22457
+ })));
22458
+ const pnpmPatterns = pnpmPatternsOf(document);
22272
22459
  patterns = pnpmPatterns.length > 0 ? pnpmPatterns : manifestPatternsOf(rootManifest);
22273
22460
  inline = yield* CatalogSet.fromWorkspaceYaml(pnpmWorkspaceText.value);
22274
22461
  recorded = yield* lockfileRecord(root, ref, "pnpm");
@@ -22424,7 +22611,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
22424
22611
  static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
22425
22612
  };
22426
22613
  //#endregion
22427
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.1_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Workspaces.js
22614
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Workspaces.js
22428
22615
  const compose = (options, catalogsFactory) => {
22429
22616
  const roots = WorkspaceRoot.layer;
22430
22617
  const detector = PackageManagerDetector.layer;
@@ -22718,7 +22905,7 @@ const provenanceForRegistry = (registry) => {
22718
22905
  * @since 0.4.0
22719
22906
  * @public
22720
22907
  */
22721
- var SilkPublishability = class {
22908
+ var SilkPublishability = class SilkPublishability {
22722
22909
  /**
22723
22910
  * Apply silk publishability rules to a raw `package.json` and the bundler's resolved
22724
22911
  * target binding. Targets-first precedence:
@@ -22850,6 +23037,56 @@ var SilkPublishability = class {
22850
23037
  return out;
22851
23038
  });
22852
23039
  }
23040
+ /**
23041
+ * Override of `@effected/workspaces`' `PublishabilityDetector` Tag with pure silk rules.
23042
+ *
23043
+ * @remarks Requires `FileSystem` (captured at layer build); `detect` reads the raw
23044
+ * `package.json` from `pkg.packageJsonPath` and applies `SilkPublishability.detect`.
23045
+ *
23046
+ * @since 0.4.0
23047
+ * @public
23048
+ */
23049
+ static layer = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
23050
+ const fs = yield* effect.FileSystem.FileSystem;
23051
+ return { detect: (pkg) => effect.Effect.gen(function* () {
23052
+ const raw = yield* readRaw(fs, pkg.packageJsonPath);
23053
+ if (!raw) return [];
23054
+ const binding = yield* readTargetsBinding(fs, pkg.path);
23055
+ return SilkPublishability.detect(pkg.name, raw, binding);
23056
+ }) };
23057
+ }));
23058
+ /**
23059
+ * Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
23060
+ * for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
23061
+ * `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
23062
+ *
23063
+ * @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
23064
+ * The kit's `detect` contract no longer receives the workspace root, so the changeset
23065
+ * lookups read it from `pkg.workspaceRoot` — the discovery root the package was found
23066
+ * against, never a filesystem marker walk, which could escape an unmarked root and read
23067
+ * the wrong `.changeset/config.json`.
23068
+ *
23069
+ * @since 0.4.0
23070
+ * @public
23071
+ */
23072
+ static layerAdaptive = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
23073
+ const fs = yield* effect.FileSystem.FileSystem;
23074
+ const config = yield* ChangesetConfig;
23075
+ const vanilla = PublishabilityDetector.npm;
23076
+ return { detect: (pkg) => effect.Effect.gen(function* () {
23077
+ const root = pkg.workspaceRoot;
23078
+ if (yield* config.isIgnored(pkg.name, root)) return [];
23079
+ const mode = yield* config.mode(root);
23080
+ if (mode === "none") return [];
23081
+ if (mode === "silk") {
23082
+ const raw = yield* readRaw(fs, pkg.packageJsonPath);
23083
+ if (!raw) return [];
23084
+ const binding = yield* readTargetsBinding(fs, pkg.path);
23085
+ return SilkPublishability.detect(pkg.name, raw, binding);
23086
+ }
23087
+ return yield* vanilla.detect(pkg);
23088
+ }) };
23089
+ }));
22853
23090
  };
22854
23091
  /**
22855
23092
  * Reduce a directory to a comparable package-relative POSIX path: backslashes to
@@ -22866,7 +23103,8 @@ var SilkPublishability = class {
22866
23103
  */
22867
23104
  const normalizeDir = (dir) => {
22868
23105
  const slashed = dir.replaceAll("\\", "/");
22869
- const normalized = trimTrailingSlashes(slashed.startsWith("./") ? slashed.slice(2) : slashed);
23106
+ const withoutPrefix = slashed.startsWith("./") ? slashed.slice(2) : slashed;
23107
+ const normalized = trimTrailingSlashes(withoutPrefix);
22870
23108
  return normalized === "" ? "." : normalized;
22871
23109
  };
22872
23110
  /** True when a built target directory's package.json is `private: true`. Missing/unreadable/malformed → false. */
@@ -22896,47 +23134,6 @@ const readTargetsBinding = (fs, pkgPath) => fs.readFileString((0, node_path.join
22896
23134
  try: () => JSON.parse(content),
22897
23135
  catch: () => /* @__PURE__ */ new Error("invalid targets.json")
22898
23136
  })), effect.Effect.orElseSucceed(() => null));
22899
- effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
22900
- const fs = yield* effect.FileSystem.FileSystem;
22901
- return { detect: (pkg) => effect.Effect.gen(function* () {
22902
- const raw = yield* readRaw(fs, pkg.packageJsonPath);
22903
- if (!raw) return [];
22904
- const binding = yield* readTargetsBinding(fs, pkg.path);
22905
- return SilkPublishability.detect(pkg.name, raw, binding);
22906
- }) };
22907
- }));
22908
- /**
22909
- * Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
22910
- * for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
22911
- * `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
22912
- *
22913
- * @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
22914
- * The kit's `detect` contract no longer receives the workspace root, so the changeset
22915
- * lookups read it from `pkg.workspaceRoot` — the discovery root the package was found
22916
- * against, never a filesystem marker walk, which could escape an unmarked root and read
22917
- * the wrong `.changeset/config.json`.
22918
- *
22919
- * @since 0.4.0
22920
- * @public
22921
- */
22922
- const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
22923
- const fs = yield* effect.FileSystem.FileSystem;
22924
- const config = yield* ChangesetConfig;
22925
- const vanilla = PublishabilityDetector.npm;
22926
- return { detect: (pkg) => effect.Effect.gen(function* () {
22927
- const root = pkg.workspaceRoot;
22928
- if (yield* config.isIgnored(pkg.name, root)) return [];
22929
- const mode = yield* config.mode(root);
22930
- if (mode === "none") return [];
22931
- if (mode === "silk") {
22932
- const raw = yield* readRaw(fs, pkg.packageJsonPath);
22933
- if (!raw) return [];
22934
- const binding = yield* readTargetsBinding(fs, pkg.path);
22935
- return SilkPublishability.detect(pkg.name, raw, binding);
22936
- }
22937
- return yield* vanilla.detect(pkg);
22938
- }) };
22939
- }));
22940
23137
  //#endregion
22941
23138
  //#region ../silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.js
22942
23139
  var __defProp = Object.defineProperty;
@@ -24749,21 +24946,20 @@ function getGitHubInfo(params) {
24749
24946
  /**
24750
24947
  * GitHub service for fetching commit metadata.
24751
24948
  *
24752
- * Defines the {@link GitHubService} Effect service tag, the
24753
- * {@link GitHubLive | production layer} backed by `\@changesets/get-github-info`,
24949
+ * Defines the {@link GitHubService} Effect service tag, its
24950
+ * `GitHubService.layer` production layer backed by `\@changesets/get-github-info`,
24754
24951
  * and the {@link makeGitHubTest} helper for constructing deterministic test
24755
24952
  * layers.
24756
24953
  *
24757
24954
  * @remarks
24758
24955
  * The GitHub service is consumed by the changelog formatters to resolve
24759
24956
  * commit hashes into pull-request numbers, author usernames, and link URLs.
24760
- * In production, {@link GitHubLive} calls the GitHub REST API via the
24957
+ * In production, `GitHubService.layer` calls the GitHub REST API via the
24761
24958
  * vendored `getGitHubInfo` wrapper. In tests, {@link makeGitHubTest}
24762
24959
  * returns canned responses from a `Map` keyed by commit hash.
24763
24960
  *
24764
24961
  * @see {@link GitHubService} for the Effect service tag
24765
24962
  * @see {@link GitHubServiceShape} for the service interface
24766
- * @see {@link GitHubLive} for the production layer
24767
24963
  * @see {@link makeGitHubTest} for constructing test layers
24768
24964
  */
24769
24965
  /**
@@ -24777,13 +24973,13 @@ function getGitHubInfo(params) {
24777
24973
  * This tag follows the standard Effect `Context.Service` pattern. Two layers
24778
24974
  * are provided out of the box:
24779
24975
  *
24780
- * - {@link GitHubLive} — production layer backed by the GitHub REST API
24976
+ * - `GitHubService.layer` — production layer backed by the GitHub REST API
24781
24977
  * - {@link makeGitHubTest} — factory for deterministic test layers
24782
24978
  *
24783
24979
  * @example
24784
24980
  * ```typescript
24785
- * import { Effect, Layer } from "effect";
24786
- * import { GitHubService, GitHubLive } from "\@savvy-web/changesets";
24981
+ * import { Effect } from "effect";
24982
+ * import { GitHubService } from "\@savvy-web/changesets";
24787
24983
  *
24788
24984
  * const program = Effect.gen(function* () {
24789
24985
  * const github = yield* GitHubService;
@@ -24795,7 +24991,7 @@ function getGitHubInfo(params) {
24795
24991
  * });
24796
24992
  *
24797
24993
  * // Provide the live layer and run
24798
- * Effect.runPromise(program.pipe(Effect.provide(GitHubLive)));
24994
+ * Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer)));
24799
24995
  * ```
24800
24996
  *
24801
24997
  * @example Creating a test layer with canned responses
@@ -24819,41 +25015,41 @@ function getGitHubInfo(params) {
24819
25015
  * ```
24820
25016
  *
24821
25017
  * @see {@link GitHubServiceShape} for the service interface
24822
- * @see {@link GitHubLive} for the production layer
24823
25018
  * @see {@link makeGitHubTest} for creating test layers
24824
25019
  *
24825
25020
  * @public
24826
25021
  */
24827
- var GitHubService = class extends effect.Context.Service()("GitHubService") {};
24828
- /**
24829
- * Production layer for {@link GitHubService}.
24830
- *
24831
- * Delegates to `\@changesets/get-github-info` to fetch commit metadata
24832
- * from the GitHub REST API. Requires a `GITHUB_TOKEN` environment variable
24833
- * to be set for authenticated requests.
24834
- *
24835
- * @remarks
24836
- * This layer is used by the `\@savvy-web/changesets/changelog` entry point
24837
- * to resolve commit hashes into PR numbers and author attribution. It is
24838
- * used by the changelog formatter's
24839
- * `MainLayer`.
24840
- *
24841
- * @example
24842
- * ```typescript
24843
- * import { Effect } from "effect";
24844
- * import { GitHubService, GitHubLive } from "\@savvy-web/changesets";
24845
- *
24846
- * const program = Effect.gen(function* () {
24847
- * const github = yield* GitHubService;
24848
- * return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" });
24849
- * });
24850
- *
24851
- * Effect.runPromise(program.pipe(Effect.provide(GitHubLive)));
24852
- * ```
24853
- *
24854
- * @public
24855
- */
24856
- const GitHubLive = effect.Layer.succeed(GitHubService, { getInfo: getGitHubInfo });
25022
+ var GitHubService = class extends effect.Context.Service()("GitHubService") {
25023
+ /**
25024
+ * Production layer for {@link GitHubService}.
25025
+ *
25026
+ * Delegates to `\@changesets/get-github-info` to fetch commit metadata
25027
+ * from the GitHub REST API. Requires a `GITHUB_TOKEN` environment variable
25028
+ * to be set for authenticated requests.
25029
+ *
25030
+ * @remarks
25031
+ * This layer is used by the `\@savvy-web/changesets/changelog` entry point
25032
+ * to resolve commit hashes into PR numbers and author attribution. It is
25033
+ * used by the changelog formatter's
25034
+ * `MainLayer`.
25035
+ *
25036
+ * @example
25037
+ * ```typescript
25038
+ * import { Effect } from "effect";
25039
+ * import { GitHubService } from "\@savvy-web/changesets";
25040
+ *
25041
+ * const program = Effect.gen(function* () {
25042
+ * const github = yield* GitHubService;
25043
+ * return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" });
25044
+ * });
25045
+ *
25046
+ * Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer)));
25047
+ * ```
25048
+ *
25049
+ * @public
25050
+ */
25051
+ static layer = effect.Layer.succeed(this, { getInfo: getGitHubInfo });
25052
+ };
24857
25053
  /**
24858
25054
  * Create a test layer for {@link GitHubService} with pre-configured responses.
24859
25055
  *
@@ -35245,7 +35441,9 @@ function factoryLabel(effects, ok, nok, type, markerType, stringType) {
35245
35441
  * @type {State}
35246
35442
  */
35247
35443
  function atBreak(code) {
35248
- if (size > 999 || code === null || code === 91 || code === 93 && !seen || code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
35444
+ if (size > 999 || code === null || code === 91 || code === 93 && !seen ||
35445
+ /* c8 ignore next 3 */
35446
+ code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
35249
35447
  if (code === 93) {
35250
35448
  effects.exit(stringType);
35251
35449
  effects.enter(markerType);
@@ -45824,7 +46022,7 @@ function getReleaseLine(changeset, versionType, options) {
45824
46022
  * @remarks
45825
46023
  * The module composes two Effect programs — {@link getReleaseLine} and
45826
46024
  * {@link getDependencyReleaseLine} — and runs each through
45827
- * `Effect.runPromise` with {@link GitHubLive} (for commit metadata). Options are
46025
+ * `Effect.runPromise` with `GitHubService.layer` (for commit metadata). Options are
45828
46026
  * validated at the boundary via `validateChangesetOptions` before being
45829
46027
  * passed to the formatters.
45830
46028
  *
@@ -45866,14 +46064,14 @@ function getReleaseLine(changeset, versionType, options) {
45866
46064
  /**
45867
46065
  * The layer providing every service the formatters need.
45868
46066
  *
45869
- * {@link GitHubLive} satisfies the requirements of both `getReleaseLine` and
46067
+ * `GitHubService.layer` satisfies the requirements of both `getReleaseLine` and
45870
46068
  * `getDependencyReleaseLine`, which each need only `GitHubService`. Markdown
45871
46069
  * parsing is not a layer: the formatters call the remark pipeline's
45872
46070
  * `parseMarkdown` / `stringifyMarkdown` functions directly.
45873
46071
  *
45874
46072
  * @internal
45875
46073
  */
45876
- const MainLayer = GitHubLive;
46074
+ const MainLayer = GitHubService.layer;
45877
46075
  /**
45878
46076
  * Changesets API `ChangelogFunctions` implementation.
45879
46077
  *
@@ -47336,7 +47534,8 @@ var ChangelogTransformer = class ChangelogTransformer {
47336
47534
  */
47337
47535
  static transformFile(filePath, options) {
47338
47536
  const content = (0, node_fs.readFileSync)(filePath, "utf-8");
47339
- (0, node_fs.writeFileSync)(filePath, ChangelogTransformer.transformContent(content, options), "utf-8");
47537
+ const result = ChangelogTransformer.transformContent(content, options);
47538
+ (0, node_fs.writeFileSync)(filePath, result, "utf-8");
47340
47539
  }
47341
47540
  };
47342
47541
  //#endregion
@@ -47371,7 +47570,6 @@ var ChangelogTransformer = class ChangelogTransformer {
47371
47570
  * {@link ConfigInspectorShape.classify} calls reuse it.
47372
47571
  *
47373
47572
  * @see {@link ConfigInspector} for the Effect service tag
47374
- * @see {@link ConfigInspectorLive} for the production layer
47375
47573
  *
47376
47574
  */
47377
47575
  /** A `versionFiles` entry expanded to its absolute target paths. @public */
@@ -47425,7 +47623,7 @@ const ClassificationSchema = effect.Schema.Struct({
47425
47623
  * @example
47426
47624
  * ```typescript
47427
47625
  * import { Effect } from "effect";
47428
- * import { ConfigInspector, ConfigInspectorLive } from "@savvy-web/changesets";
47626
+ * import { ConfigInspector } from "@savvy-web/changesets";
47429
47627
  *
47430
47628
  * const program = Effect.gen(function* () {
47431
47629
  * const inspector = yield* ConfigInspector;
@@ -47433,12 +47631,24 @@ const ClassificationSchema = effect.Schema.Struct({
47433
47631
  * return config.packages.map((p) => p.name);
47434
47632
  * });
47435
47633
  *
47436
- * Effect.runPromise(program.pipe(Effect.provide(ConfigInspectorLive)));
47634
+ * Effect.runPromise(program.pipe(Effect.provide(ConfigInspector.layer)));
47437
47635
  * ```
47438
47636
  *
47439
47637
  * @public
47440
47638
  */
47441
- var ConfigInspector = class extends effect.Context.Service()("ConfigInspector") {};
47639
+ var ConfigInspector = class extends effect.Context.Service()("ConfigInspector") {
47640
+ /**
47641
+ * Production layer for {@link ConfigInspector}.
47642
+ *
47643
+ * Requires {@link ChangesetConfigReader} and `WorkspaceDiscovery`
47644
+ * in the environment.
47645
+ *
47646
+ * @public
47647
+ */
47648
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
47649
+ return makeShape$3(yield* ChangesetConfigReader, yield* WorkspaceDiscovery, yield* effect.FileSystem.FileSystem);
47650
+ }));
47651
+ };
47442
47652
  /**
47443
47653
  * Pull the changelog formatter ID and its options object out of the raw
47444
47654
  * `.changeset/config.json` shape (where `changelog` may be a tuple, a string,
@@ -47832,22 +48042,11 @@ function classifyOne(inspected, path) {
47832
48042
  };
47833
48043
  }
47834
48044
  /**
47835
- * Live layer for {@link ConfigInspector}.
47836
- *
47837
- * Requires {@link ChangesetConfigReader} and `WorkspaceDiscovery`
47838
- * in the environment.
47839
- *
47840
- * @public
47841
- */
47842
- const ConfigInspectorLive = effect.Layer.effect(ConfigInspector, effect.Effect.gen(function* () {
47843
- return makeShape$3(yield* ChangesetConfigReader, yield* WorkspaceDiscovery, yield* effect.FileSystem.FileSystem);
47844
- }));
47845
- /**
47846
48045
  * Test factory — build a {@link ConfigInspector} that returns a fixed
47847
48046
  * {@link InspectedConfig} without touching the filesystem.
47848
48047
  *
47849
48048
  * Tests that need to exercise the inspect/classify logic against real files
47850
- * should compose `ConfigInspectorLive` with test layers for
48049
+ * should compose `ConfigInspector.layer` with test layers for
47851
48050
  * `ChangesetConfigReader` and `WorkspaceDiscovery` instead.
47852
48051
  *
47853
48052
  * @public
@@ -47893,7 +48092,7 @@ const BranchAnalysisSchema = effect.Schema.Struct({
47893
48092
  * @example
47894
48093
  * ```typescript
47895
48094
  * import { Effect } from "effect";
47896
- * import { BranchAnalyzer, BranchAnalyzerLive, ConfigInspectorLive } from "@savvy-web/changesets";
48095
+ * import { BranchAnalyzer, ConfigInspector } from "@savvy-web/changesets";
47897
48096
  *
47898
48097
  * const program = Effect.gen(function* () {
47899
48098
  * const analyzer = yield* BranchAnalyzer;
@@ -47903,16 +48102,30 @@ const BranchAnalysisSchema = effect.Schema.Struct({
47903
48102
  *
47904
48103
  * Effect.runPromise(
47905
48104
  * program.pipe(
47906
- * Effect.provide(BranchAnalyzerLive),
47907
- * Effect.provide(ConfigInspectorLive),
47908
- * // ... + ChangesetConfigReaderLive + kit workspace layers + NodeServices.layer
48105
+ * Effect.provide(BranchAnalyzer.layer),
48106
+ * Effect.provide(ConfigInspector.layer),
48107
+ * // ... + ChangesetConfigReader.layer + kit workspace layers + NodeServices.layer
47909
48108
  * ),
47910
48109
  * );
47911
48110
  * ```
47912
48111
  *
47913
48112
  * @public
47914
48113
  */
47915
- var BranchAnalyzer = class extends effect.Context.Service()("BranchAnalyzer") {};
48114
+ var BranchAnalyzer = class extends effect.Context.Service()("BranchAnalyzer") {
48115
+ /**
48116
+ * Production layer for {@link BranchAnalyzer}.
48117
+ *
48118
+ * Requires {@link ConfigInspector} (which in turn requires
48119
+ * `ChangesetConfigReader` and `WorkspaceDiscovery`) and a
48120
+ * `ChildProcessSpawner` (satisfied by `NodeServices.layer`) for the
48121
+ * internally-composed `@effected/git` layer.
48122
+ *
48123
+ * @public
48124
+ */
48125
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
48126
+ return makeShape$2(yield* ConfigInspector, yield* Git);
48127
+ })).pipe(effect.Layer.provide(Git.layer));
48128
+ };
47916
48129
  /**
47917
48130
  * Fold a `@effected/git` typed failure into this package's {@link GitError},
47918
48131
  * preserving the public `ConfigurationError | GitError` error channel.
@@ -47996,19 +48209,6 @@ function makeShape$2(inspector, git) {
47996
48209
  return { analyzeBranch };
47997
48210
  }
47998
48211
  /**
47999
- * Live layer for {@link BranchAnalyzer}.
48000
- *
48001
- * Requires {@link ConfigInspector} (which in turn requires
48002
- * `ChangesetConfigReader` and `WorkspaceDiscovery`) and a
48003
- * `ChildProcessSpawner` (satisfied by `NodeServices.layer`) for the
48004
- * internally-composed `@effected/git` layer.
48005
- *
48006
- * @public
48007
- */
48008
- const BranchAnalyzerLive = effect.Layer.effect(BranchAnalyzer, effect.Effect.gen(function* () {
48009
- return makeShape$2(yield* ConfigInspector, yield* Git);
48010
- })).pipe(effect.Layer.provide(Git.layer));
48011
- /**
48012
48212
  * Test factory — build a {@link BranchAnalyzer} that returns a fixed
48013
48213
  * {@link BranchAnalysis} for any input.
48014
48214
  *
@@ -48036,7 +48236,7 @@ function makeBranchAnalyzerTest(fixed) {
48036
48236
  * ```typescript
48037
48237
  * import { Effect } from "effect";
48038
48238
  * import type { ChangesetOptions } from "\@savvy-web/changesets";
48039
- * import { ChangelogService, GitHubLive } from "\@savvy-web/changesets";
48239
+ * import { ChangelogService } from "\@savvy-web/changesets";
48040
48240
  *
48041
48241
  * const program = Effect.gen(function* () {
48042
48242
  * const changelog = yield* ChangelogService;
@@ -48230,10 +48430,10 @@ function gitListChangesetFilesAtRef(cwd, ref) {
48230
48430
  *
48231
48431
  * @remarks
48232
48432
  * Uses the currently-active {@link SilkPublishability} — wire the
48233
- * {@link SilkPublishabilityDetectorLive} layer to get silk semantics.
48433
+ * `SilkPublishability.layer` layer to get silk semantics.
48234
48434
  *
48235
48435
  * The kit's `PublishabilityDetector.detect` contract no longer receives the
48236
- * workspace root — the ignore/mode-aware `PublishabilityDetectorAdaptiveLive`
48436
+ * workspace root — the ignore/mode-aware `SilkPublishability.layerAdaptive`
48237
48437
  * derives the `.changeset/config.json` root per package from the package's
48238
48438
  * own discovery coordinates (`pkg.path` ascended by `pkg.relativePath`).
48239
48439
  * The `root` parameter is retained for signature stability
@@ -48287,7 +48487,6 @@ function listPublishablePackageNames(packages, _root) {
48287
48487
  * and MCP tools are thin adapters over this service.
48288
48488
  *
48289
48489
  * @see {@link DepsRegen} for the service tag
48290
- * @see {@link DepsRegenLive} for the production layer
48291
48490
  *
48292
48491
  */
48293
48492
  const ADJECTIVES = [
@@ -48486,7 +48685,30 @@ function renderChangesetContent(diff) {
48486
48685
  *
48487
48686
  * @public
48488
48687
  */
48489
- var DepsRegen = class extends effect.Context.Service()("Changesets/DepsRegen") {};
48688
+ var DepsRegen = class extends effect.Context.Service()("Changesets/DepsRegen") {
48689
+ /**
48690
+ * Production layer for {@link DepsRegen}.
48691
+ *
48692
+ * Requires `WorkspaceSnapshots`, `WorkspaceDiscovery`,
48693
+ * `PublishabilityDetector` (all from `@effected/workspaces`),
48694
+ * `Git` (from `@effected/git`, backing merge-base resolution),
48695
+ * {@link ConfigInspector}, {@link ChangesetConfig}, and
48696
+ * `FileSystem.FileSystem` (resolved once at construction and closed over by
48697
+ * the shape, keeping `plan`/`execute` themselves requirement-free).
48698
+ *
48699
+ * @public
48700
+ */
48701
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
48702
+ const snapshots = yield* WorkspaceSnapshots;
48703
+ const inspector = yield* ConfigInspector;
48704
+ const discovery = yield* WorkspaceDiscovery;
48705
+ const detector = yield* PublishabilityDetector;
48706
+ const config = yield* ChangesetConfig;
48707
+ const fs = yield* effect.FileSystem.FileSystem;
48708
+ const git = yield* Git;
48709
+ return makeShape$1(snapshots, inspector, discovery, detector, config, fs, effect.Layer.succeed(Git, git));
48710
+ }));
48711
+ };
48490
48712
  /**
48491
48713
  * Build a {@link DepsRegenShape} that closes over already-resolved service
48492
48714
  * implementations, keeping the public `plan`/`execute` signatures
@@ -48579,29 +48801,7 @@ function makeShape$1(snapshots, inspector, discovery, detector, config, fs, prov
48579
48801
  execute
48580
48802
  };
48581
48803
  }
48582
- /**
48583
- * Live layer for {@link DepsRegen}.
48584
- *
48585
- * Requires `WorkspaceSnapshots`, `WorkspaceDiscovery`,
48586
- * `PublishabilityDetector` (all from `@effected/workspaces`),
48587
- * `Git` (from `@effected/git`, backing merge-base resolution),
48588
- * {@link ConfigInspector}, {@link ChangesetConfig}, and
48589
- * `FileSystem.FileSystem` (resolved once at construction and closed over by
48590
- * the shape, keeping `plan`/`execute` themselves requirement-free).
48591
- *
48592
- * @public
48593
- */
48594
- const DepsRegenLive = effect.Layer.effect(DepsRegen, effect.Effect.gen(function* () {
48595
- const snapshots = yield* WorkspaceSnapshots;
48596
- const inspector = yield* ConfigInspector;
48597
- const discovery = yield* WorkspaceDiscovery;
48598
- const detector = yield* PublishabilityDetector;
48599
- const config = yield* ChangesetConfig;
48600
- const fs = yield* effect.FileSystem.FileSystem;
48601
- const git = yield* Git;
48602
- return makeShape$1(snapshots, inspector, discovery, detector, config, fs, effect.Layer.succeed(Git, git));
48603
- }));
48604
- const ConfigGraph = ChangesetConfigLive.pipe(effect.Layer.provide(ChangesetConfigReaderLive));
48804
+ const ConfigGraph = ChangesetConfig.layer.pipe(effect.Layer.provide(ChangesetConfigReader.layer));
48605
48805
  /**
48606
48806
  * Build the batteries-included {@link DepsRegen} layer over a
48607
48807
  * `@effected/workspaces` kit graph bound to `options.cwd`.
@@ -48623,7 +48823,7 @@ const ConfigGraph = ChangesetConfigLive.pipe(effect.Layer.provide(ChangesetConfi
48623
48823
  */
48624
48824
  function makeDepsRegenDefault(options) {
48625
48825
  const kitGraph = Workspaces.layerWithGit(options);
48626
- return DepsRegenLive.pipe(effect.Layer.provide(ConfigInspectorLive.pipe(effect.Layer.provide(effect.Layer.mergeAll(ChangesetConfigReaderLive, kitGraph)))), effect.Layer.provide(PublishabilityDetectorAdaptiveLive.pipe(effect.Layer.provide(effect.Layer.mergeAll(ConfigGraph, kitGraph)))), effect.Layer.provide(ConfigGraph), effect.Layer.provide(kitGraph));
48826
+ return DepsRegen.layer.pipe(effect.Layer.provide(ConfigInspector.layer.pipe(effect.Layer.provide(effect.Layer.mergeAll(ChangesetConfigReader.layer, kitGraph)))), effect.Layer.provide(SilkPublishability.layerAdaptive.pipe(effect.Layer.provide(effect.Layer.mergeAll(ConfigGraph, kitGraph)))), effect.Layer.provide(ConfigGraph), effect.Layer.provide(kitGraph));
48627
48827
  }
48628
48828
  /**
48629
48829
  * Batteries-included {@link DepsRegen} layer: silk's opinionated default
@@ -48635,10 +48835,10 @@ function makeDepsRegenDefault(options) {
48635
48835
  * (`NodeServices.layer`), not a bare filesystem-only layer.
48636
48836
  *
48637
48837
  * Gating uses silk's adaptive publishability detector
48638
- * ({@link PublishabilityDetectorAdaptiveLive}), so the default semantics
48838
+ * (`SilkPublishability.layerAdaptive`), so the default semantics
48639
48839
  * are "versionable minus ignored" — identical to the savvy CLI and MCP
48640
48840
  * runtimes. Consumers who need to swap any dependency (test detectors,
48641
- * alternate config sources) should keep composing {@link DepsRegenLive}
48841
+ * alternate config sources) should keep composing {@link DepsRegen.layer}
48642
48842
  * directly; this layer is purely additive.
48643
48843
  *
48644
48844
  * @example
@@ -48827,14 +49027,12 @@ function walkJsonPath(obj, path) {
48827
49027
  path: [...nodePath, segment.index]
48828
49028
  });
48829
49029
  break;
48830
- case "wildcard":
48831
- if (Array.isArray(node)) node.forEach((element, index) => {
48832
- next.push({
48833
- node: element,
48834
- path: [...nodePath, index]
48835
- });
49030
+ case "wildcard": if (Array.isArray(node)) node.forEach((element, index) => {
49031
+ next.push({
49032
+ node: element,
49033
+ path: [...nodePath, index]
48836
49034
  });
48837
- break;
49035
+ });
48838
49036
  }
48839
49037
  }
48840
49038
  current = next;
@@ -49889,7 +50087,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
49889
50087
  };
49890
50088
  module.exports = {
49891
50089
  DEFAULT_MAX_EXTGLOB_RECURSION,
49892
- MAX_LENGTH: 1024 * 64,
50090
+ MAX_LENGTH: 65536,
49893
50091
  POSIX_REGEX_SOURCE: {
49894
50092
  __proto__: null,
49895
50093
  alnum: "a-zA-Z0-9",
@@ -51978,7 +52176,7 @@ function formatPaths(paths, mapper) {
51978
52176
  if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
51979
52177
  return paths;
51980
52178
  }
51981
- const defaultOptions = {
52179
+ const defaultOptions$1 = {
51982
52180
  caseSensitiveMatch: true,
51983
52181
  debug: !!process.env.TINYGLOBBY_DEBUG,
51984
52182
  expandDirectories: true,
@@ -51987,7 +52185,7 @@ const defaultOptions = {
51987
52185
  };
51988
52186
  function getOptions(options) {
51989
52187
  const opts = Object.assign({}, options);
51990
- for (const key in defaultOptions) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions[key] });
52188
+ for (const key in defaultOptions$1) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions$1[key] });
51991
52189
  opts.cwd = (opts.cwd instanceof URL ? (0, url.fileURLToPath)(opts.cwd) : (0, path.resolve)(opts.cwd || process.cwd())).replace(BACKSLASHES, "/");
51992
52190
  opts.ignore = ensureStringArray(opts.ignore);
51993
52191
  opts.fs && (opts.fs = {
@@ -52305,7 +52503,6 @@ var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
52305
52503
  version: "1.2"
52306
52504
  };
52307
52505
  this.tags = Object.assign({}, Directives.defaultTags);
52308
- break;
52309
52506
  }
52310
52507
  return res;
52311
52508
  }
@@ -53157,7 +53354,7 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
53157
53354
  }
53158
53355
  let blockEndNewlines;
53159
53356
  try {
53160
- blockEndNewlines = /* @__PURE__ */ new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
53357
+ blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
53161
53358
  } catch {
53162
53359
  blockEndNewlines = /\n+(?!\n|$)/g;
53163
53360
  }
@@ -54483,9 +54680,7 @@ var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
54483
54680
  case 8:
54484
54681
  str = `0o${str}`;
54485
54682
  break;
54486
- case 16:
54487
- str = `0x${str}`;
54488
- break;
54683
+ case 16: str = `0x${str}`;
54489
54684
  }
54490
54685
  const n = BigInt(str);
54491
54686
  return sign === "-" ? BigInt(-1) * n : n;
@@ -56014,9 +56209,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
56014
56209
  badChar = `block scalar indicator ${source[0]}`;
56015
56210
  break;
56016
56211
  case "@":
56017
- case "`":
56018
- badChar = `reserved character ${source[0]}`;
56019
- break;
56212
+ case "`": badChar = `reserved character ${source[0]}`;
56020
56213
  }
56021
56214
  if (badChar) onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
56022
56215
  return foldLines(source);
@@ -56035,8 +56228,8 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
56035
56228
  */
56036
56229
  let first, line;
56037
56230
  try {
56038
- first = /* @__PURE__ */ new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
56039
- line = /* @__PURE__ */ new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
56231
+ first = new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
56232
+ line = new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
56040
56233
  } catch {
56041
56234
  first = /(.*?)[ \t]*\r?\n/sy;
56042
56235
  line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
@@ -61940,7 +62133,7 @@ const COMMANDS = {
61940
62133
  "deno": deno,
61941
62134
  "nub": nub
61942
62135
  };
61943
- function resolveCommand(agent, command, args) {
62136
+ function resolveCommand$1(agent, command, args) {
61944
62137
  const value = COMMANDS[agent][command];
61945
62138
  return constructCommand(value, args);
61946
62139
  }
@@ -62050,18 +62243,16 @@ async function detect$1(options = {}) {
62050
62243
  if (result) return result;
62051
62244
  break;
62052
62245
  }
62053
- case "install-metadata":
62054
- for (const metadata of Object.keys(INSTALL_METADATA)) {
62055
- const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
62056
- if (await pathExists(node_path.join(directory, metadata), fileOrDir)) {
62057
- const name = INSTALL_METADATA[metadata];
62058
- return {
62059
- name,
62060
- agent: name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name
62061
- };
62062
- }
62246
+ case "install-metadata": for (const metadata of Object.keys(INSTALL_METADATA)) {
62247
+ const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
62248
+ if (await pathExists(node_path.join(directory, metadata), fileOrDir)) {
62249
+ const name = INSTALL_METADATA[metadata];
62250
+ return {
62251
+ name,
62252
+ agent: name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name
62253
+ };
62063
62254
  }
62064
- break;
62255
+ }
62065
62256
  }
62066
62257
  if (stopDir?.(directory)) break;
62067
62258
  }
@@ -62122,201 +62313,212 @@ function isMetadataYarnClassic(metadataPath) {
62122
62313
  return metadataPath.endsWith(".yarn_integrity");
62123
62314
  }
62124
62315
  //#endregion
62125
- //#region ../../node_modules/.pnpm/tinyexec@1.2.4/node_modules/tinyexec/dist/main.mjs
62126
- const h = /^path$/i;
62127
- const g = {
62316
+ //#region ../../node_modules/.pnpm/tinyexec@1.3.0/node_modules/tinyexec/dist/main.mjs
62317
+ const isPathLikePattern = /^path$/i;
62318
+ const defaultEnvPathInfo = {
62128
62319
  key: "PATH",
62129
62320
  value: ""
62130
62321
  };
62131
- function _(e) {
62132
- for (const t in e) {
62133
- if (!Object.prototype.hasOwnProperty.call(e, t) || !h.test(t)) continue;
62134
- const n = e[t];
62135
- if (!n) return g;
62322
+ function getPathFromEnv(env) {
62323
+ for (const key in env) {
62324
+ if (!Object.prototype.hasOwnProperty.call(env, key) || !isPathLikePattern.test(key)) continue;
62325
+ const value = env[key];
62326
+ if (!value) return defaultEnvPathInfo;
62136
62327
  return {
62137
- key: t,
62138
- value: n
62328
+ key,
62329
+ value
62139
62330
  };
62140
62331
  }
62141
- return g;
62332
+ return defaultEnvPathInfo;
62142
62333
  }
62143
- function v(e, t) {
62144
- const n = t.value.split(node_path.delimiter);
62145
- const r = [];
62146
- let o = e;
62147
- let c;
62334
+ function addNodeBinToPath(cwd, path) {
62335
+ const parts = path.value.split(node_path.delimiter);
62336
+ const nodeBinPaths = [];
62337
+ let currentPath = cwd;
62338
+ let lastPath;
62148
62339
  do {
62149
- r.push((0, node_path.resolve)(o, "node_modules", ".bin"));
62150
- c = o;
62151
- o = (0, node_path.dirname)(o);
62152
- } while (o !== c);
62153
- r.push((0, node_path.dirname)(process.execPath));
62154
- const l = r.concat(n).join(node_path.delimiter);
62340
+ nodeBinPaths.push((0, node_path.resolve)(currentPath, "node_modules", ".bin"));
62341
+ lastPath = currentPath;
62342
+ currentPath = (0, node_path.dirname)(currentPath);
62343
+ } while (currentPath !== lastPath);
62344
+ nodeBinPaths.push((0, node_path.dirname)(process.execPath));
62345
+ const newPath = nodeBinPaths.concat(parts).join(node_path.delimiter);
62155
62346
  return {
62156
- key: t.key,
62157
- value: l
62347
+ key: path.key,
62348
+ value: newPath
62158
62349
  };
62159
62350
  }
62160
- function y(e, t, n = true) {
62161
- const r = {
62351
+ function computeEnv(cwd, env, nodePath = true) {
62352
+ const envWithDefault = {
62162
62353
  ...process.env,
62163
- ...t
62354
+ ...env
62164
62355
  };
62165
- if (!n) return r;
62166
- const i = v(e, _(r));
62167
- r[i.key] = i.value;
62168
- return r;
62169
- }
62170
- const b = (e) => {
62171
- let t = e.length;
62172
- const n = new node_stream.PassThrough();
62173
- const r = () => {
62174
- if (--t === 0) n.end();
62356
+ if (!nodePath) return envWithDefault;
62357
+ const envPathInfo = addNodeBinToPath(cwd, getPathFromEnv(envWithDefault));
62358
+ envWithDefault[envPathInfo.key] = envPathInfo.value;
62359
+ return envWithDefault;
62360
+ }
62361
+ const combineStreams = (streams) => {
62362
+ let streamCount = streams.length;
62363
+ const combined = new node_stream.PassThrough();
62364
+ const maybeEmitEnd = () => {
62365
+ if (--streamCount === 0) combined.end();
62175
62366
  };
62176
- for (const t of e) (0, node_stream_promises.pipeline)(t, n, { end: false }).then(r).catch(r);
62177
- return n;
62367
+ for (const stream of streams) (0, node_stream_promises.pipeline)(stream, combined, { end: false }).then(maybeEmitEnd).catch(maybeEmitEnd);
62368
+ return combined;
62178
62369
  };
62179
- const x = /([()\][%!^"`<>&|;, *?])/g;
62180
- const S = /^#!\s*(.+)/;
62181
- const C = /\.(?:com|exe)$/i;
62182
- const w = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
62183
- const T = process.platform === "win32";
62184
- const E = [
62370
+ const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
62371
+ const shebangRegExp = /^#!\s*(.+)/;
62372
+ const isWindowsExecutableRegExp = /\.(?:com|exe)$/i;
62373
+ const isNodeModulesCmdRegExp = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
62374
+ const isWindows = process.platform === "win32";
62375
+ const defaultPathExt = [
62185
62376
  ".EXE",
62186
62377
  ".CMD",
62187
62378
  ".BAT",
62188
62379
  ".COM"
62189
62380
  ];
62381
+ const noPathExt = [""];
62190
62382
  /**
62191
62383
  * Normalizes the command and arguments to work cross-platform.
62192
62384
  * On Windows, this basically handles things like shebangs, calling
62193
62385
  * `node_modules/.bin` commands, and escaping meta characters.
62194
62386
  * On other platforms, it just returns the command and arguments as-is.
62195
62387
  */
62196
- function D(e, t = [], n = {}) {
62197
- if (n.shell === true || !T) return {
62198
- command: e,
62199
- args: t,
62200
- options: n
62388
+ function normalizeSpawnCommand(command, args = [], options = {}) {
62389
+ if (options.shell === true || !isWindows) return {
62390
+ command,
62391
+ args,
62392
+ options
62201
62393
  };
62202
- let i = O(e, n);
62203
- let a = null;
62204
- if (i !== null) {
62205
- const e = 150;
62206
- const t = Buffer.alloc(e);
62207
- let n = null;
62394
+ let file = resolveCommand(command, options);
62395
+ let shebang = null;
62396
+ if (file !== null) {
62397
+ const size = 150;
62398
+ const buffer = Buffer.alloc(size);
62399
+ let fd = null;
62208
62400
  try {
62209
- n = (0, node_fs.openSync)(i, "r");
62210
- (0, node_fs.readSync)(n, t, 0, e, 0);
62401
+ fd = (0, node_fs.openSync)(file, "r");
62402
+ (0, node_fs.readSync)(fd, buffer, 0, size, 0);
62211
62403
  } catch {} finally {
62212
- if (n !== null) (0, node_fs.closeSync)(n);
62213
- }
62214
- const o = t.toString().match(S);
62215
- if (o !== null) {
62216
- const e = o[1].trim();
62217
- const t = e.indexOf(" ");
62218
- const n = t !== -1 ? e.slice(0, t) : e;
62219
- const i = t !== -1 ? e.slice(t + 1) : "";
62220
- const s = (0, node_path.basename)(n);
62221
- a = s === "env" ? i || null : s;
62222
- }
62223
- }
62224
- if (a !== null && i !== null) {
62225
- t = [i, ...t];
62226
- e = a;
62227
- i = O(e, n);
62228
- }
62229
- if (i === null || !C.test(i)) {
62230
- const r = i !== null && w.test(i);
62231
- e = (0, node_path.normalize)(e);
62232
- e = e.replace(x, "^$1");
62233
- t = t.map((e) => {
62234
- e = e.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
62235
- e = e.replace(/(?=(\\+?)?)\1$/, "$1$1");
62236
- e = `"${e}"`;
62237
- e = e.replace(x, "^$1");
62238
- if (r) e = e.replace(x, "^$1");
62239
- return e;
62404
+ if (fd !== null) (0, node_fs.closeSync)(fd);
62405
+ }
62406
+ const match = buffer.toString().match(shebangRegExp);
62407
+ if (match !== null) {
62408
+ const line = match[1].trim();
62409
+ const separatorIndex = line.indexOf(" ");
62410
+ const path = separatorIndex !== -1 ? line.slice(0, separatorIndex) : line;
62411
+ const argument = separatorIndex !== -1 ? line.slice(separatorIndex + 1) : "";
62412
+ const binary = (0, node_path.basename)(path);
62413
+ shebang = binary === "env" ? argument || null : binary;
62414
+ }
62415
+ }
62416
+ if (shebang !== null && file !== null) {
62417
+ args = [file, ...args];
62418
+ command = shebang;
62419
+ file = resolveCommand(command, options);
62420
+ }
62421
+ if (file === null || !isWindowsExecutableRegExp.test(file)) {
62422
+ const needsDoubleEscapeMetaChars = file !== null && isNodeModulesCmdRegExp.test(file);
62423
+ command = (0, node_path.normalize)(command);
62424
+ command = command.replace(metaCharsRegExp, "^$1");
62425
+ args = args.map((arg) => {
62426
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
62427
+ arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
62428
+ arg = `"${arg}"`;
62429
+ arg = arg.replace(metaCharsRegExp, "^$1");
62430
+ if (needsDoubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, "^$1");
62431
+ return arg;
62240
62432
  });
62241
- t = [
62433
+ args = [
62242
62434
  "/d",
62243
62435
  "/s",
62244
62436
  "/c",
62245
- `"${[e, ...t].join(" ")}"`
62437
+ `"${[command, ...args].join(" ")}"`
62246
62438
  ];
62247
- e = n.env?.comspec ?? "cmd.exe";
62248
- n = {
62249
- ...n,
62439
+ command = options.env?.comspec ?? "cmd.exe";
62440
+ options = {
62441
+ ...options,
62250
62442
  windowsVerbatimArguments: true
62251
62443
  };
62252
62444
  }
62253
62445
  return {
62254
- command: e,
62255
- args: t,
62256
- options: n
62446
+ command,
62447
+ args,
62448
+ options
62257
62449
  };
62258
62450
  }
62259
62451
  /**
62260
62452
  * Resolves the command to an absolute path if possible.
62261
62453
  * Handles things like traversing PATH and adding extensions from PATHEXT
62262
62454
  */
62263
- function O(e, t) {
62264
- const r = (t.cwd ?? (0, node_process.cwd)()).toString();
62265
- const a = t.env ?? process.env;
62266
- const o = _(a).value;
62267
- const c = e.includes("/") || e.includes("\\") ? [""] : [r, ...o.split(node_path.delimiter)];
62268
- const l = a.PATHEXT ? a.PATHEXT.split(node_path.delimiter) : E;
62269
- if (e.includes(".") && l[0] !== "") l.unshift("");
62270
- for (const t of c) {
62271
- const n = (0, node_path.resolve)(r, t.startsWith("\"") && t.endsWith("\"") && t.length > 1 ? t.slice(1, -1) : t, e);
62272
- for (const e of l) {
62273
- const t = n + e;
62455
+ function resolveCommand(command, options) {
62456
+ const cwd$3 = (options.cwd ?? (0, node_process.cwd)()).toString();
62457
+ const env = options.env ?? process.env;
62458
+ const PATH = getPathFromEnv(env).value;
62459
+ const pathEnv = command.includes("/") || command.includes("\\") ? [""] : [cwd$3, ...PATH.split(node_path.delimiter)];
62460
+ let pathExt = env.PATHEXT ? env.PATHEXT.split(node_path.delimiter) : defaultPathExt;
62461
+ if (command.includes(".") && pathExt[0] !== "") pathExt = ["", ...pathExt];
62462
+ for (const extensions of [pathExt, noPathExt]) for (const path of pathEnv) {
62463
+ const dest = (0, node_path.resolve)(cwd$3, path.startsWith("\"") && path.endsWith("\"") && path.length > 1 ? path.slice(1, -1) : path, command);
62464
+ for (const ext of extensions) {
62465
+ const destWithExt = dest + ext;
62274
62466
  try {
62275
- if ((0, node_fs.statSync)(t).isFile()) return t;
62467
+ if ((0, node_fs.statSync)(destWithExt).isFile()) return destWithExt;
62276
62468
  } catch {}
62277
62469
  }
62278
62470
  }
62279
62471
  return null;
62280
62472
  }
62281
- var k = class extends Error {
62473
+ var NonZeroExitError = class extends Error {
62282
62474
  result;
62283
62475
  output;
62284
- get exitCode() {
62285
- if (this.result.exitCode !== null) return this.result.exitCode;
62286
- }
62287
- constructor(e, t) {
62288
- super(`Process exited with non-zero status (${e.exitCode})`);
62289
- this.result = e;
62290
- this.output = t;
62476
+ exitCode;
62477
+ get signalCode() {
62478
+ return this.result.signalCode;
62479
+ }
62480
+ constructor(result, output, command, args) {
62481
+ let target = "The process";
62482
+ if (command) target = `The command \`${args?.length ? `${command} ${args.map((a) => /[ "'`()]/.test(a) ? JSON.stringify(a) : a).join(" ")}` : command}\``;
62483
+ const exitCode = result.exitCode ?? 1;
62484
+ super(result.signalCode !== null ? `${target} was killed by the signal ${result.signalCode}` : `${target} exited with a non-zero status (${exitCode})`);
62485
+ this.result = result;
62486
+ this.output = output;
62487
+ this.exitCode = exitCode;
62488
+ Object.defineProperty(this, "result", {
62489
+ enumerable: false,
62490
+ writable: false,
62491
+ configurable: false
62492
+ });
62291
62493
  }
62292
62494
  };
62293
- const j = {
62495
+ const defaultOptions = {
62294
62496
  timeout: void 0,
62295
62497
  persist: false
62296
62498
  };
62297
- const N = { windowsHide: true };
62298
- function P(e) {
62299
- const t = new AbortController();
62300
- for (const n of e) {
62301
- if (n.aborted) {
62302
- t.abort();
62303
- return n;
62304
- }
62305
- const e = () => {
62306
- t.abort(n.reason);
62499
+ const defaultNodeOptions = { windowsHide: true };
62500
+ function combineSignals(signals) {
62501
+ const controller = new AbortController();
62502
+ for (const signal of signals) {
62503
+ if (signal.aborted) {
62504
+ controller.abort();
62505
+ return signal;
62506
+ }
62507
+ const onAbort = () => {
62508
+ controller.abort(signal.reason);
62307
62509
  };
62308
- n.addEventListener("abort", e, { signal: t.signal });
62510
+ signal.addEventListener("abort", onAbort, { signal: controller.signal });
62309
62511
  }
62310
- return t.signal;
62512
+ return controller.signal;
62311
62513
  }
62312
- async function F(e) {
62313
- let t = "";
62514
+ async function readStream(stream) {
62515
+ let output = "";
62314
62516
  try {
62315
- for await (const n of e) t += n.toString();
62517
+ for await (const chunk of stream) output += chunk.toString();
62316
62518
  } catch {}
62317
- return t;
62519
+ return output;
62318
62520
  }
62319
- var I = class {
62521
+ var ExecProcess = class {
62320
62522
  _process;
62321
62523
  _aborted = false;
62322
62524
  _options;
@@ -62334,19 +62536,22 @@ var I = class {
62334
62536
  get exitCode() {
62335
62537
  if (this._process && this._process.exitCode !== null) return this._process.exitCode;
62336
62538
  }
62337
- constructor(e, t, n) {
62539
+ get signalCode() {
62540
+ return this._process?.signalCode ?? null;
62541
+ }
62542
+ constructor(command, args, options) {
62338
62543
  this._options = {
62339
- ...j,
62340
- ...n
62544
+ ...defaultOptions,
62545
+ ...options
62341
62546
  };
62342
- this._command = e;
62343
- this._args = t ?? [];
62344
- this._processClosed = new Promise((e) => {
62345
- this._resolveClose = e;
62547
+ this._command = command;
62548
+ this._args = args ?? [];
62549
+ this._processClosed = new Promise((resolve) => {
62550
+ this._resolveClose = resolve;
62346
62551
  });
62347
62552
  }
62348
- kill(e) {
62349
- return this._process?.kill(e) === true;
62553
+ kill(signal) {
62554
+ return this._process?.kill(signal) === true;
62350
62555
  }
62351
62556
  get aborted() {
62352
62557
  return this._aborted;
@@ -62354,99 +62559,99 @@ var I = class {
62354
62559
  get killed() {
62355
62560
  return this._process?.killed === true;
62356
62561
  }
62357
- pipe(e, t, n) {
62358
- return z(e, t, {
62359
- ...n,
62562
+ pipe(command, args, options) {
62563
+ return exec(command, args, {
62564
+ ...options,
62360
62565
  stdin: this
62361
62566
  });
62362
62567
  }
62363
62568
  async *[Symbol.asyncIterator]() {
62364
- const e = this._process;
62365
- if (!e) return;
62366
- const t = [];
62367
- if (this._streamErr) t.push(this._streamErr);
62368
- if (this._streamOut) t.push(this._streamOut);
62369
- const n = b(t);
62370
- const r = node_readline.createInterface({ input: n });
62371
- for await (const e of r) yield e.toString();
62569
+ const proc = this._process;
62570
+ if (!proc) return;
62571
+ const streams = [];
62572
+ if (this._streamErr) streams.push(this._streamErr);
62573
+ if (this._streamOut) streams.push(this._streamOut);
62574
+ const streamCombined = combineStreams(streams);
62575
+ const rl = node_readline.createInterface({ input: streamCombined });
62576
+ for await (const chunk of rl) yield chunk.toString();
62372
62577
  await this._processClosed;
62373
- e.removeAllListeners();
62578
+ proc.removeAllListeners();
62374
62579
  if (this._thrownError) throw this._thrownError;
62375
- if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new k(this);
62580
+ if (this._options?.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, void 0, this._command, this._args);
62376
62581
  }
62377
62582
  async _waitForOutput() {
62378
- const e = this._process;
62379
- if (!e) throw new Error("No process was started");
62380
- const [t, n] = await Promise.all([this._streamOut ? F(this._streamOut) : "", this._streamErr ? F(this._streamErr) : ""]);
62583
+ const proc = this._process;
62584
+ if (!proc) throw new Error("No process was started");
62585
+ const [stdout, stderr] = await Promise.all([this._streamOut ? readStream(this._streamOut) : "", this._streamErr ? readStream(this._streamErr) : ""]);
62381
62586
  await this._processClosed;
62382
- const { stdin: r } = this._options;
62383
- if (r && typeof r !== "string") await r;
62384
- e.removeAllListeners();
62587
+ const { stdin } = this._options;
62588
+ if (stdin && typeof stdin !== "string") await stdin;
62589
+ proc.removeAllListeners();
62385
62590
  if (this._thrownError) throw this._thrownError;
62386
- const i = {
62387
- stderr: n,
62388
- stdout: t,
62591
+ const result = {
62592
+ stderr,
62593
+ stdout,
62389
62594
  exitCode: this.exitCode
62390
62595
  };
62391
- if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new k(this, i);
62392
- return i;
62596
+ if (this._options.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, result, this._command, this._args);
62597
+ return result;
62393
62598
  }
62394
- then(e, t) {
62395
- return this._waitForOutput().then(e, t);
62599
+ then(onfulfilled, onrejected) {
62600
+ return this._waitForOutput().then(onfulfilled, onrejected);
62396
62601
  }
62397
62602
  _streamOut;
62398
62603
  _streamErr;
62399
62604
  spawn() {
62400
- const t = (0, node_process.cwd)();
62401
- const r = this._options;
62402
- const i = {
62403
- ...N,
62404
- ...r.nodeOptions
62605
+ const cwd$1 = (0, node_process.cwd)();
62606
+ const options = this._options;
62607
+ const nodeOptions = {
62608
+ ...defaultNodeOptions,
62609
+ ...options.nodeOptions
62405
62610
  };
62406
- const a = [];
62611
+ const signals = [];
62407
62612
  this._resetState();
62408
- if (r.timeout !== void 0) a.push(AbortSignal.timeout(r.timeout));
62409
- if (r.signal !== void 0) a.push(r.signal);
62410
- if (r.persist === true) i.detached = true;
62411
- if (a.length > 0) i.signal = P(a);
62412
- i.env = y(t, i.env, r.nodePath);
62413
- const o = D(this._command, this._args, i);
62414
- const s = (0, node_child_process.spawn)(o.command, o.args, o.options);
62415
- if (s.stderr) this._streamErr = s.stderr;
62416
- if (s.stdout) this._streamOut = s.stdout;
62417
- this._process = s;
62418
- s.once("error", this._onError);
62419
- s.once("close", this._onClose);
62420
- if (s.stdin) {
62421
- const { stdin: e } = r;
62422
- if (typeof e === "string") s.stdin.end(e);
62423
- else e?.process?.stdout?.pipe(s.stdin);
62613
+ if (options.timeout !== void 0) signals.push(AbortSignal.timeout(options.timeout));
62614
+ if (options.signal !== void 0) signals.push(options.signal);
62615
+ if (options.persist === true) nodeOptions.detached = true;
62616
+ if (signals.length > 0) nodeOptions.signal = combineSignals(signals);
62617
+ nodeOptions.env = computeEnv(cwd$1, nodeOptions.env, options.nodePath);
62618
+ const crossResult = normalizeSpawnCommand(this._command, this._args, nodeOptions);
62619
+ const handle = (0, node_child_process.spawn)(crossResult.command, crossResult.args, crossResult.options);
62620
+ if (handle.stderr) this._streamErr = handle.stderr;
62621
+ if (handle.stdout) this._streamOut = handle.stdout;
62622
+ this._process = handle;
62623
+ handle.once("error", this._onError);
62624
+ handle.once("close", this._onClose);
62625
+ if (handle.stdin) {
62626
+ const { stdin } = options;
62627
+ if (typeof stdin === "string") handle.stdin.end(stdin);
62628
+ else stdin?.process?.stdout?.pipe(handle.stdin);
62424
62629
  }
62425
62630
  }
62426
62631
  _resetState() {
62427
62632
  this._aborted = false;
62428
- this._processClosed = new Promise((e) => {
62429
- this._resolveClose = e;
62633
+ this._processClosed = new Promise((resolve) => {
62634
+ this._resolveClose = resolve;
62430
62635
  });
62431
62636
  this._thrownError = void 0;
62432
62637
  }
62433
- _onError = (e) => {
62434
- if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
62638
+ _onError = (err) => {
62639
+ if (err.name === "AbortError" && (!(err.cause instanceof Error) || err.cause.name !== "TimeoutError")) {
62435
62640
  this._aborted = true;
62436
62641
  return;
62437
62642
  }
62438
- this._thrownError = e;
62643
+ this._thrownError = err;
62439
62644
  };
62440
62645
  _onClose = () => {
62441
62646
  if (this._resolveClose) this._resolveClose();
62442
62647
  };
62443
62648
  };
62444
- const R = (e, t, n) => {
62445
- const r = new I(e, t, n);
62446
- r.spawn();
62447
- return r;
62649
+ const x = (command, args, userOptions) => {
62650
+ const proc = new ExecProcess(command, args, userOptions);
62651
+ proc.spawn();
62652
+ return proc;
62448
62653
  };
62449
- const z = R;
62654
+ const exec = x;
62450
62655
  //#endregion
62451
62656
  //#region ../../node_modules/.pnpm/@changesets+format@0.1.1/node_modules/@changesets/format/dist/index.js
62452
62657
  /**
@@ -62465,14 +62670,14 @@ function traverseUpwards(startDir, stopDir, cb) {
62465
62670
  }
62466
62671
  }
62467
62672
  async function packageManagerExecute(packageManager, args, cwd) {
62468
- const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
62673
+ const cmd = resolveCommand$1(packageManager, "execute-local", args) ?? {
62469
62674
  command: "npx",
62470
62675
  args
62471
62676
  };
62472
62677
  return await spawnProcess(cmd.command, cmd.args, cwd);
62473
62678
  }
62474
62679
  async function spawnProcess(command, args, cwd) {
62475
- await z(command, args, {
62680
+ await exec(command, args, {
62476
62681
  nodeOptions: { cwd },
62477
62682
  throwOnError: true
62478
62683
  });
@@ -62662,7 +62867,7 @@ var InternalError = class extends Error {
62662
62867
  //#endregion
62663
62868
  //#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.8/node_modules/@changesets/git/dist/index.mjs
62664
62869
  async function getDivergedCommit(cwd, ref) {
62665
- const cmd = await z("git", [
62870
+ const cmd = await exec("git", [
62666
62871
  "merge-base",
62667
62872
  ref,
62668
62873
  "HEAD"
@@ -62681,7 +62886,7 @@ async function getCommitsThatAddFiles(gitPaths, { cwd, short = false }) {
62681
62886
  let remaining = gitPaths;
62682
62887
  do {
62683
62888
  const commitInfos = await Promise.all(remaining.map(async (gitPath) => {
62684
- const [commitSha, parentSha] = (await z("git", [
62889
+ const [commitSha, parentSha] = (await exec("git", [
62685
62890
  "log",
62686
62891
  "--diff-filter=A",
62687
62892
  "--max-count=1",
@@ -62712,9 +62917,9 @@ async function getCommitsThatAddFiles(gitPaths, { cwd, short = false }) {
62712
62917
  return gitPaths.map((p) => map.get(p));
62713
62918
  }
62714
62919
  async function isRepoShallow({ cwd }) {
62715
- const isShallowRepoOutput = (await z("git", ["rev-parse", "--is-shallow-repository"], { nodeOptions: { cwd } })).stdout.toString().trim();
62920
+ const isShallowRepoOutput = (await exec("git", ["rev-parse", "--is-shallow-repository"], { nodeOptions: { cwd } })).stdout.toString().trim();
62716
62921
  if (isShallowRepoOutput === "--is-shallow-repository") {
62717
- const gitDir = (await z("git", ["rev-parse", "--git-dir"], { nodeOptions: { cwd } })).stdout.toString().trim();
62922
+ const gitDir = (await exec("git", ["rev-parse", "--git-dir"], { nodeOptions: { cwd } })).stdout.toString().trim();
62718
62923
  const fullGitDir = node_path.resolve(cwd, gitDir);
62719
62924
  try {
62720
62925
  await node_fs_promises.access(node_path.join(fullGitDir, "shallow"));
@@ -62725,12 +62930,12 @@ async function isRepoShallow({ cwd }) {
62725
62930
  } else return isShallowRepoOutput === "true";
62726
62931
  }
62727
62932
  async function deepenCloneBy({ by, cwd }) {
62728
- const cmd = await z("git", ["fetch", `--deepen=${by}`], { nodeOptions: { cwd } });
62933
+ const cmd = await exec("git", ["fetch", `--deepen=${by}`], { nodeOptions: { cwd } });
62729
62934
  if (cmd.exitCode !== 0) throw new Error(cmd.stderr.toString());
62730
62935
  }
62731
62936
  async function getChangedChangesetFilesSinceRef({ cwd, ref }) {
62732
62937
  try {
62733
- const cmd = await z("git", [
62938
+ const cmd = await exec("git", [
62734
62939
  "diff",
62735
62940
  "--name-only",
62736
62941
  "--diff-filter=d",
@@ -64545,9 +64750,7 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
64545
64750
  case 2:
64546
64751
  handleError(12);
64547
64752
  break;
64548
- case 6:
64549
- handleError(16);
64550
- break;
64753
+ case 6: handleError(16);
64551
64754
  }
64552
64755
  switch (token) {
64553
64756
  case 12:
@@ -65659,7 +65862,12 @@ async function loadConfig(root, packages) {
65659
65862
  };
65660
65863
  }
65661
65864
  /** Effect service tag for the release planner. @public */
65662
- var ReleasePlanner = class extends effect.Context.Service()("ReleasePlanner") {};
65865
+ var ReleasePlanner = class extends effect.Context.Service()("ReleasePlanner") {
65866
+ /** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
65867
+ static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
65868
+ return makeShape(yield* ConfigInspector, yield* effect.FileSystem.FileSystem);
65869
+ }));
65870
+ };
65663
65871
  /** Build the service shape over a resolved {@link ConfigInspector} and {@link FileSystem.FileSystem}. */
65664
65872
  function makeShape(inspector, fs) {
65665
65873
  const plan = (root) => effect.Effect.tryPromise({
@@ -65677,10 +65885,6 @@ function makeShape(inspector, fs) {
65677
65885
  apply
65678
65886
  };
65679
65887
  }
65680
- /** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
65681
- const ReleasePlannerLive = effect.Layer.effect(ReleasePlanner, effect.Effect.gen(function* () {
65682
- return makeShape(yield* ConfigInspector, yield* effect.FileSystem.FileSystem);
65683
- }));
65684
65888
  /**
65685
65889
  * Test factory — supply fixed results for any subset of methods. Unsupplied
65686
65890
  * methods fail with a `ReleasePlanError`.
@@ -66807,7 +67011,6 @@ const changelogFunctions = (/* @__PURE__ */ __exportAll({
66807
67011
  AppliedReleaseSchema: () => AppliedReleaseSchema,
66808
67012
  BranchAnalysisSchema: () => BranchAnalysisSchema,
66809
67013
  BranchAnalyzer: () => BranchAnalyzer,
66810
- BranchAnalyzerLive: () => BranchAnalyzerLive,
66811
67014
  BranchFileEntrySchema: () => BranchFileEntrySchema,
66812
67015
  BumpTypeSchema: () => BumpTypeSchema,
66813
67016
  Categories: () => Categories,
@@ -66825,7 +67028,6 @@ const changelogFunctions = (/* @__PURE__ */ __exportAll({
66825
67028
  ClassificationSchema: () => ClassificationSchema,
66826
67029
  CommitHashSchema: () => CommitHashSchema,
66827
67030
  ConfigInspector: () => ConfigInspector,
66828
- ConfigInspectorLive: () => ConfigInspectorLive,
66829
67031
  ConfigurationError: () => ConfigurationError,
66830
67032
  ContentStructureRule: () => ContentStructureRule$1,
66831
67033
  ContributorFootnotesPlugin: () => ContributorFootnotesPlugin,
@@ -66840,12 +67042,10 @@ const changelogFunctions = (/* @__PURE__ */ __exportAll({
66840
67042
  DependencyUpdateSchema: () => DependencyUpdateSchema,
66841
67043
  DepsRegen: () => DepsRegen,
66842
67044
  DepsRegenDefault: () => DepsRegenDefault,
66843
- DepsRegenLive: () => DepsRegenLive,
66844
67045
  FileStatusSchema: () => FileStatusSchema,
66845
67046
  GitError: () => GitError$1,
66846
67047
  GitHubApiError: () => GitHubApiError,
66847
67048
  GitHubInfoSchema: () => GitHubInfoSchema,
66848
- GitHubLive: () => GitHubLive,
66849
67049
  GitHubService: () => GitHubService,
66850
67050
  GlobSchema: () => GlobSchema,
66851
67051
  HeadingHierarchyRule: () => HeadingHierarchyRule$1,
@@ -66874,7 +67074,6 @@ const changelogFunctions = (/* @__PURE__ */ __exportAll({
66874
67074
  PreviewReleaseSchema: () => PreviewReleaseSchema,
66875
67075
  ReleasePlanError: () => ReleasePlanError,
66876
67076
  ReleasePlanner: () => ReleasePlanner,
66877
- ReleasePlannerLive: () => ReleasePlannerLive,
66878
67077
  ReorderSectionsPlugin: () => ReorderSectionsPlugin,
66879
67078
  RepoSchema: () => RepoSchema,
66880
67079
  RequiredSectionsRule: () => RequiredSectionsRule$1,