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