@savvy-web/silk 3.7.10 → 3.7.12
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 +636 -148
- package/changesets-changelog.d.cts +27 -5
- package/changesets-changelog.d.ts +27 -5
- package/changesets-changelog.js +645 -148
- package/changesets-markdownlint.cjs +636 -148
- package/changesets-markdownlint.d.cts +27 -5
- package/changesets-markdownlint.d.ts +27 -5
- package/changesets-markdownlint.js +645 -148
- package/package.json +4 -4
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
|
@@ -2339,7 +2339,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
|
|
|
2339
2339
|
}
|
|
2340
2340
|
};
|
|
2341
2341
|
//#endregion
|
|
2342
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
2342
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/BunExtension.js
|
|
2343
2343
|
/**
|
|
2344
2344
|
* Extension data specific to bun lockfiles, attached to `Lockfile.extension`
|
|
2345
2345
|
* when the format is `"bun"`.
|
|
@@ -2360,7 +2360,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
|
|
|
2360
2360
|
trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
|
|
2361
2361
|
}) {};
|
|
2362
2362
|
//#endregion
|
|
2363
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2363
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogResolver.js
|
|
2364
2364
|
/**
|
|
2365
2365
|
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
2366
2366
|
* version ranges.
|
|
@@ -2406,7 +2406,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
|
|
|
2406
2406
|
static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2407
2407
|
};
|
|
2408
2408
|
//#endregion
|
|
2409
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2409
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/WorkspaceResolver.js
|
|
2410
2410
|
/**
|
|
2411
2411
|
* Raised when a `catalog:` or `workspace:` specifier cannot be resolved
|
|
2412
2412
|
* because the resolution mechanism itself failed — not for an ordinary
|
|
@@ -2467,7 +2467,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
|
|
|
2467
2467
|
static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2468
2468
|
};
|
|
2469
2469
|
//#endregion
|
|
2470
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2470
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogAssemblyError.js
|
|
2471
2471
|
/**
|
|
2472
2472
|
* Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
|
|
2473
2473
|
* that is unreadable or not valid YAML, a root `package.json` `workspaces` field
|
|
@@ -2511,7 +2511,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedError()("CatalogAss
|
|
|
2511
2511
|
}
|
|
2512
2512
|
};
|
|
2513
2513
|
//#endregion
|
|
2514
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2514
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySection.js
|
|
2515
2515
|
/**
|
|
2516
2516
|
* The short dependency kind: which dependency map an entry came from, named the
|
|
2517
2517
|
* way consumers branch on it.
|
|
@@ -2651,13 +2651,13 @@ const advance$1 = (s) => {
|
|
|
2651
2651
|
return ch;
|
|
2652
2652
|
}
|
|
2653
2653
|
};
|
|
2654
|
-
const isDigit$
|
|
2654
|
+
const isDigit$3 = (ch) => ch >= "0" && ch <= "9";
|
|
2655
2655
|
const isLetter = (ch) => ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z";
|
|
2656
|
-
const isIdentChar = (ch) => isDigit$
|
|
2656
|
+
const isIdentChar = (ch) => isDigit$3(ch) || isLetter(ch) || ch === "-";
|
|
2657
2657
|
const atEnd$1 = (s) => s.pos >= s.len;
|
|
2658
2658
|
const peekDigit = (s) => {
|
|
2659
2659
|
const ch = peek$1(s);
|
|
2660
|
-
return ch !== void 0 && isDigit$
|
|
2660
|
+
return ch !== void 0 && isDigit$3(ch);
|
|
2661
2661
|
};
|
|
2662
2662
|
const peekIdentChar = (s) => {
|
|
2663
2663
|
const ch = peek$1(s);
|
|
@@ -2666,7 +2666,7 @@ const peekIdentChar = (s) => {
|
|
|
2666
2666
|
const parseNumericIdentifier = (s) => {
|
|
2667
2667
|
const start = s.pos;
|
|
2668
2668
|
const first = peek$1(s);
|
|
2669
|
-
if (first === void 0 || !isDigit$
|
|
2669
|
+
if (first === void 0 || !isDigit$3(first)) return fail(s);
|
|
2670
2670
|
let digits = "";
|
|
2671
2671
|
while (peekDigit(s)) digits += advance$1(s);
|
|
2672
2672
|
if (digits.length > 1 && digits[0] === "0") {
|
|
@@ -2688,7 +2688,7 @@ const parsePrereleaseIdentifier = (s) => {
|
|
|
2688
2688
|
if (first === void 0 || !isIdentChar(first)) return fail(s);
|
|
2689
2689
|
while (peekIdentChar(s)) {
|
|
2690
2690
|
const ch = advance$1(s) ?? "";
|
|
2691
|
-
if (!isDigit$
|
|
2691
|
+
if (!isDigit$3(ch)) hasNonDigit = true;
|
|
2692
2692
|
token += ch;
|
|
2693
2693
|
}
|
|
2694
2694
|
if (token.length === 0) return fail(s);
|
|
@@ -4126,7 +4126,7 @@ const isComparatorSetSubset = (sub, sup) => {
|
|
|
4126
4126
|
return true;
|
|
4127
4127
|
};
|
|
4128
4128
|
//#endregion
|
|
4129
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4129
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySpecifier.js
|
|
4130
4130
|
/**
|
|
4131
4131
|
* Indicates that a string could not be parsed as a valid dependency specifier.
|
|
4132
4132
|
*
|
|
@@ -4333,7 +4333,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
|
|
|
4333
4333
|
FromString: fromString
|
|
4334
4334
|
});
|
|
4335
4335
|
//#endregion
|
|
4336
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4336
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/IntegrityHash.js
|
|
4337
4337
|
const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
|
|
4338
4338
|
const COREPACK_RE = /^(sha1|sha224|sha256|sha384|sha512)\.[0-9a-f]+$/;
|
|
4339
4339
|
const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
|
|
@@ -4385,12 +4385,109 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4385
4385
|
algorithmOf,
|
|
4386
4386
|
decode: decode$2
|
|
4387
4387
|
});
|
|
4388
|
+
const corepackRestricted = brandedIntegrity.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
|
|
4389
|
+
const BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
4390
|
+
const decodeBase64 = (value) => {
|
|
4391
|
+
const firstPad = value.indexOf("=");
|
|
4392
|
+
const body = firstPad === -1 ? value : value.slice(0, firstPad);
|
|
4393
|
+
const padding = firstPad === -1 ? "" : value.slice(firstPad);
|
|
4394
|
+
if (padding !== "" && padding !== "=" && padding !== "==") return void 0;
|
|
4395
|
+
const remainder = body.length % 4;
|
|
4396
|
+
if (body.length === 0 || remainder === 1) return void 0;
|
|
4397
|
+
if (padding.length > 0 && padding.length !== (4 - remainder) % 4) return void 0;
|
|
4398
|
+
let buffer = 0;
|
|
4399
|
+
let bits = 0;
|
|
4400
|
+
const bytes = [];
|
|
4401
|
+
for (const char of body) {
|
|
4402
|
+
const sextet = BASE64_ALPHABET.indexOf(char);
|
|
4403
|
+
if (sextet < 0) return void 0;
|
|
4404
|
+
buffer = buffer << 6 | sextet;
|
|
4405
|
+
bits += 6;
|
|
4406
|
+
if (bits >= 8) {
|
|
4407
|
+
bits -= 8;
|
|
4408
|
+
bytes.push(buffer >>> bits & 255);
|
|
4409
|
+
}
|
|
4410
|
+
}
|
|
4411
|
+
if ((buffer & (1 << bits) - 1) !== 0) return void 0;
|
|
4412
|
+
return bytes;
|
|
4413
|
+
};
|
|
4414
|
+
const encodeBase64 = (bytes) => {
|
|
4415
|
+
let out = "";
|
|
4416
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
4417
|
+
const b0 = bytes[index] ?? 0;
|
|
4418
|
+
const b1 = bytes[index + 1];
|
|
4419
|
+
const b2 = bytes[index + 2];
|
|
4420
|
+
const buffer = b0 << 16 | (b1 ?? 0) << 8 | (b2 ?? 0);
|
|
4421
|
+
out += BASE64_ALPHABET.charAt(buffer >>> 18 & 63);
|
|
4422
|
+
out += BASE64_ALPHABET.charAt(buffer >>> 12 & 63);
|
|
4423
|
+
out += b1 === void 0 ? "=" : BASE64_ALPHABET.charAt(buffer >>> 6 & 63);
|
|
4424
|
+
out += b2 === void 0 ? "=" : BASE64_ALPHABET.charAt(buffer & 63);
|
|
4425
|
+
}
|
|
4426
|
+
return out;
|
|
4427
|
+
};
|
|
4428
|
+
const hexOfBytes = (bytes) => bytes.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
4429
|
+
const bytesOfHex = (hex) => {
|
|
4430
|
+
const bytes = [];
|
|
4431
|
+
for (let index = 0; index < hex.length; index += 2) bytes.push(Number.parseInt(hex.slice(index, index + 2), 16));
|
|
4432
|
+
return bytes;
|
|
4433
|
+
};
|
|
4434
|
+
const SHA512_SRI_PREFIX = "sha512-";
|
|
4435
|
+
const SHA512_COREPACK_PREFIX = "sha512.";
|
|
4436
|
+
const SHA512_DIGEST_BYTES = 64;
|
|
4437
|
+
const COREPACK_SHA512_RE = /^sha512\.[0-9a-f]{128}$/;
|
|
4438
|
+
const unwrapJsonQuotes = (value) => value.length >= 2 && value.startsWith("\"") && value.endsWith("\"") ? value.slice(1, -1) : value;
|
|
4439
|
+
const corepackOfSri = (input) => {
|
|
4440
|
+
const value = unwrapJsonQuotes(input);
|
|
4441
|
+
if (!value.startsWith(SHA512_SRI_PREFIX)) return void 0;
|
|
4442
|
+
const bytes = decodeBase64(value.slice(7));
|
|
4443
|
+
if (bytes === void 0 || bytes.length !== SHA512_DIGEST_BYTES) return void 0;
|
|
4444
|
+
return `${SHA512_COREPACK_PREFIX}${hexOfBytes(bytes)}`;
|
|
4445
|
+
};
|
|
4446
|
+
const sriOfCorepack = (value) => COREPACK_SHA512_RE.test(value) ? `${SHA512_SRI_PREFIX}${encodeBase64(bytesOfHex(value.slice(7)))}` : void 0;
|
|
4447
|
+
const corepackFromSri = effect.Schema.String.pipe(effect.Schema.decodeTo(corepackRestricted, effect.SchemaTransformation.transformOrFail({
|
|
4448
|
+
decode: (input) => {
|
|
4449
|
+
const corepack = corepackOfSri(input);
|
|
4450
|
+
return corepack === void 0 ? effect.Effect.fail(new effect.SchemaIssue.InvalidValue({ message: `Expected an SRI sha512-<base64> integrity hash carrying a 64-byte digest, got "${input}"` }, input)) : effect.Effect.succeed(corepack);
|
|
4451
|
+
},
|
|
4452
|
+
encode: (value) => {
|
|
4453
|
+
const sri = sriOfCorepack(value);
|
|
4454
|
+
return sri === void 0 ? effect.Effect.fail(new effect.SchemaIssue.InvalidValue({ message: `Expected a corepack sha512.<128-hex-digit> integrity hash, got "${value}"` }, value)) : effect.Effect.succeed(sri);
|
|
4455
|
+
}
|
|
4456
|
+
})));
|
|
4457
|
+
/**
|
|
4458
|
+
* Indicates that a string could not be converted from npm's SRI form to the
|
|
4459
|
+
* corepack integrity form.
|
|
4460
|
+
*
|
|
4461
|
+
* Raised by {@link (CorepackIntegrityHash:variable)}'s `fromSri`. The offending
|
|
4462
|
+
* string is preserved on `input`. Only a canonical `sha512-<base64>` value
|
|
4463
|
+
* carrying a 64-byte digest converts — corepack pins accept nothing weaker
|
|
4464
|
+
* than sha512, so a sha256/sha1 SRI hash, malformed base64, a wrong-length
|
|
4465
|
+
* digest and an already-corepack-form input all raise this error.
|
|
4466
|
+
*
|
|
4467
|
+
* @public
|
|
4468
|
+
*/
|
|
4469
|
+
var InvalidSriIntegrityHashError = class extends effect.Schema.TaggedError()("InvalidSriIntegrityHashError", {
|
|
4470
|
+
/** The raw input string that failed conversion. */
|
|
4471
|
+
input: effect.Schema.String }) {
|
|
4472
|
+
get message() {
|
|
4473
|
+
return `Invalid SRI integrity hash "${this.input}": expected a sha512-<base64> value carrying a 64-byte digest (corepack accepts only sha512)`;
|
|
4474
|
+
}
|
|
4475
|
+
};
|
|
4476
|
+
const fromSri = (input) => effect.Schema.decodeUnknownEffect(corepackFromSri)(input).pipe(effect.Effect.mapError(() => new InvalidSriIntegrityHashError({ input })));
|
|
4388
4477
|
/**
|
|
4389
4478
|
* {@link (IntegrityHash:variable)} narrowed to the corepack `<algo>.<hex>` form
|
|
4390
4479
|
* — `sha512.deadbeef`, and corepack's own sha224 default pins
|
|
4391
4480
|
* (`sha224.877304e3…`). An SRI (`sha512-<base64>`) or yarn (`10c0/<hex>`)
|
|
4392
4481
|
* hash, both valid `IntegrityHash` values, fails this schema.
|
|
4393
4482
|
*
|
|
4483
|
+
* The schema value also carries the SRI bridge: the `FromSri` codec decodes
|
|
4484
|
+
* npm's `sha512-<base64>` form (what `NpmRegistry.version()` returns, with one
|
|
4485
|
+
* layer of JSON quotes tolerated) into the corepack form, and `fromSri` is its
|
|
4486
|
+
* `Effect` convenience, failing with a typed
|
|
4487
|
+
* {@link InvalidSriIntegrityHashError}. The conversion is deliberately one-way
|
|
4488
|
+
* and sha512-only — corepack pins accept nothing weaker, so a sha256/sha1 SRI
|
|
4489
|
+
* hash fails typed rather than minting a pin corepack would reject.
|
|
4490
|
+
*
|
|
4394
4491
|
* @remarks
|
|
4395
4492
|
* The corepack pin tail (`<name>@<version>+<integrity>`) is the one place the
|
|
4396
4493
|
* kit meets this form, and two schemas name it: `PackageManagerPin.integrity`
|
|
@@ -4436,7 +4533,10 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4436
4533
|
*
|
|
4437
4534
|
* @public
|
|
4438
4535
|
*/
|
|
4439
|
-
const CorepackIntegrityHash =
|
|
4536
|
+
const CorepackIntegrityHash = Object.assign(corepackRestricted, {
|
|
4537
|
+
FromSri: corepackFromSri,
|
|
4538
|
+
fromSri
|
|
4539
|
+
});
|
|
4440
4540
|
effect.Schema.Literals([
|
|
4441
4541
|
"npm",
|
|
4442
4542
|
"pnpm",
|
|
@@ -5303,7 +5403,7 @@ var Run = class {
|
|
|
5303
5403
|
static REDACTED = "***";
|
|
5304
5404
|
};
|
|
5305
5405
|
//#endregion
|
|
5306
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
5406
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/ReleaseAgeGate.js
|
|
5307
5407
|
const MS_PER_MINUTE = 6e4;
|
|
5308
5408
|
/**
|
|
5309
5409
|
* A source's partial contribution to a {@link ReleaseAgeGate}: the effective
|
|
@@ -5473,7 +5573,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
|
|
|
5473
5573
|
}
|
|
5474
5574
|
};
|
|
5475
5575
|
//#endregion
|
|
5476
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
5576
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/ImporterDependency.js
|
|
5477
5577
|
/**
|
|
5478
5578
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
5479
5579
|
*
|
|
@@ -5511,7 +5611,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
|
|
|
5511
5611
|
depType: DependencyField
|
|
5512
5612
|
}) {};
|
|
5513
5613
|
//#endregion
|
|
5514
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
5614
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/LockfileImporter.js
|
|
5515
5615
|
/**
|
|
5516
5616
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
5517
5617
|
*
|
|
@@ -5535,7 +5635,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
|
|
|
5535
5635
|
dependencies: effect.Schema.Array(ImporterDependency)
|
|
5536
5636
|
}) {};
|
|
5537
5637
|
//#endregion
|
|
5538
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
5638
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/ResolvedPackage.js
|
|
5539
5639
|
const EMPTY_DEPENDENCIES = {};
|
|
5540
5640
|
/**
|
|
5541
5641
|
* A package resolved from a lockfile.
|
|
@@ -5570,7 +5670,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
|
|
|
5570
5670
|
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)))
|
|
5571
5671
|
}) {};
|
|
5572
5672
|
//#endregion
|
|
5573
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
5673
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/WorkspaceDependency.js
|
|
5574
5674
|
/**
|
|
5575
5675
|
* A directed dependency edge between two workspace packages as recorded in
|
|
5576
5676
|
* the lockfile.
|
|
@@ -5592,7 +5692,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
|
|
|
5592
5692
|
constraint: effect.Schema.String
|
|
5593
5693
|
}) {};
|
|
5594
5694
|
//#endregion
|
|
5595
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
5695
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/PnpmExtension.js
|
|
5596
5696
|
/**
|
|
5597
5697
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
5598
5698
|
* when the format is `"pnpm"`.
|
|
@@ -5617,7 +5717,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
|
|
|
5617
5717
|
}))
|
|
5618
5718
|
}) {};
|
|
5619
5719
|
//#endregion
|
|
5620
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
5720
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/LockfileFormat.js
|
|
5621
5721
|
/**
|
|
5622
5722
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
5623
5723
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -5655,7 +5755,7 @@ const FILENAMES = {
|
|
|
5655
5755
|
*/
|
|
5656
5756
|
const filenameFor = (format) => FILENAMES[format][0];
|
|
5657
5757
|
//#endregion
|
|
5658
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
5758
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/shared.js
|
|
5659
5759
|
/**
|
|
5660
5760
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
5661
5761
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -5991,7 +6091,7 @@ function evaluateNode(node, depth) {
|
|
|
5991
6091
|
//#region ../../node_modules/.pnpm/@effected+jsonc@0.7.0_effect@4.0.0-rc.109/node_modules/@effected/jsonc/internal/scanner.js
|
|
5992
6092
|
const isWhitespace = (ch) => ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch === 65279;
|
|
5993
6093
|
const isLineBreak$1 = (ch) => ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
|
|
5994
|
-
const isDigit$
|
|
6094
|
+
const isDigit$2 = (ch) => ch >= 48 && ch <= 57;
|
|
5995
6095
|
/**
|
|
5996
6096
|
* Create a stateful {@link Scanner} for the given JSONC string.
|
|
5997
6097
|
*
|
|
@@ -6089,31 +6189,31 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
|
|
|
6089
6189
|
if (text.charCodeAt(pos) === 45) pos++;
|
|
6090
6190
|
if (text.charCodeAt(pos) === 48) pos++;
|
|
6091
6191
|
else {
|
|
6092
|
-
if (!isDigit$
|
|
6192
|
+
if (!isDigit$2(text.charCodeAt(pos))) {
|
|
6093
6193
|
tokenError = "UnexpectedEndOfNumber";
|
|
6094
6194
|
return text.substring(start, pos);
|
|
6095
6195
|
}
|
|
6096
6196
|
pos++;
|
|
6097
|
-
while (pos < len && isDigit$
|
|
6197
|
+
while (pos < len && isDigit$2(text.charCodeAt(pos))) pos++;
|
|
6098
6198
|
}
|
|
6099
6199
|
if (pos < len && text.charCodeAt(pos) === 46) {
|
|
6100
6200
|
pos++;
|
|
6101
|
-
if (!isDigit$
|
|
6201
|
+
if (!isDigit$2(text.charCodeAt(pos))) {
|
|
6102
6202
|
tokenError = "UnexpectedEndOfNumber";
|
|
6103
6203
|
return text.substring(start, pos);
|
|
6104
6204
|
}
|
|
6105
6205
|
pos++;
|
|
6106
|
-
while (pos < len && isDigit$
|
|
6206
|
+
while (pos < len && isDigit$2(text.charCodeAt(pos))) pos++;
|
|
6107
6207
|
}
|
|
6108
6208
|
if (pos < len && (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101)) {
|
|
6109
6209
|
pos++;
|
|
6110
6210
|
if (pos < len && (text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45)) pos++;
|
|
6111
|
-
if (!isDigit$
|
|
6211
|
+
if (!isDigit$2(text.charCodeAt(pos))) {
|
|
6112
6212
|
tokenError = "UnexpectedEndOfNumber";
|
|
6113
6213
|
return text.substring(start, pos);
|
|
6114
6214
|
}
|
|
6115
6215
|
pos++;
|
|
6116
|
-
while (pos < len && isDigit$
|
|
6216
|
+
while (pos < len && isDigit$2(text.charCodeAt(pos))) pos++;
|
|
6117
6217
|
}
|
|
6118
6218
|
return text.substring(start, pos);
|
|
6119
6219
|
};
|
|
@@ -6219,7 +6319,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
|
|
|
6219
6319
|
return token;
|
|
6220
6320
|
}
|
|
6221
6321
|
case 45:
|
|
6222
|
-
if (pos + 1 < len && isDigit$
|
|
6322
|
+
if (pos + 1 < len && isDigit$2(text.charCodeAt(pos + 1))) {
|
|
6223
6323
|
tokenValue = scanNumber();
|
|
6224
6324
|
token = "Number";
|
|
6225
6325
|
return token;
|
|
@@ -6230,7 +6330,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
|
|
|
6230
6330
|
tokenError = "InvalidSymbol";
|
|
6231
6331
|
return token;
|
|
6232
6332
|
default:
|
|
6233
|
-
if (isDigit$
|
|
6333
|
+
if (isDigit$2(ch)) {
|
|
6234
6334
|
tokenValue = scanNumber();
|
|
6235
6335
|
token = "Number";
|
|
6236
6336
|
return token;
|
|
@@ -7584,7 +7684,7 @@ var JsoncModifier = class {
|
|
|
7584
7684
|
});
|
|
7585
7685
|
};
|
|
7586
7686
|
//#endregion
|
|
7587
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
7687
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/bun.js
|
|
7588
7688
|
const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
7589
7689
|
const BunWorkspaceEntry = effect.Schema.Struct({
|
|
7590
7690
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -7677,7 +7777,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
|
|
|
7677
7777
|
};
|
|
7678
7778
|
});
|
|
7679
7779
|
//#endregion
|
|
7680
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
7780
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/npm.js
|
|
7681
7781
|
const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
7682
7782
|
const NpmPackageEntry = effect.Schema.Struct({
|
|
7683
7783
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -15454,7 +15554,7 @@ function deepEqualValues(a, b) {
|
|
|
15454
15554
|
return false;
|
|
15455
15555
|
}
|
|
15456
15556
|
//#endregion
|
|
15457
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
15557
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/documents.js
|
|
15458
15558
|
/**
|
|
15459
15559
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
15460
15560
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -15524,7 +15624,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
|
|
|
15524
15624
|
};
|
|
15525
15625
|
});
|
|
15526
15626
|
//#endregion
|
|
15527
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
15627
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/pnpm.js
|
|
15528
15628
|
const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
|
|
15529
15629
|
specifier: effect.Schema.String,
|
|
15530
15630
|
version: effect.Schema.String
|
|
@@ -15649,7 +15749,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
|
|
|
15649
15749
|
};
|
|
15650
15750
|
});
|
|
15651
15751
|
//#endregion
|
|
15652
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
15752
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/internal/yarn.js
|
|
15653
15753
|
const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
|
|
15654
15754
|
const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
15655
15755
|
const YarnEntry = effect.Schema.Struct({
|
|
@@ -15772,7 +15872,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
15772
15872
|
return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
|
|
15773
15873
|
};
|
|
15774
15874
|
//#endregion
|
|
15775
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
15875
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/Lockfile.js
|
|
15776
15876
|
const EMPTY_IMPORTERS = [];
|
|
15777
15877
|
/**
|
|
15778
15878
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -16016,7 +16116,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
|
|
|
16016
16116
|
}
|
|
16017
16117
|
};
|
|
16018
16118
|
//#endregion
|
|
16019
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.
|
|
16119
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.5.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_d53253b32eb6a388ea04dc81d5e132f1/node_modules/@effected/lockfiles/LockfileIntegrity.js
|
|
16020
16120
|
/**
|
|
16021
16121
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
16022
16122
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -16132,7 +16232,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
|
|
|
16132
16232
|
}
|
|
16133
16233
|
};
|
|
16134
16234
|
//#endregion
|
|
16135
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
16235
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Dependency.js
|
|
16136
16236
|
/**
|
|
16137
16237
|
* A resolved dependency entry pairing a package name with its version
|
|
16138
16238
|
* specifier and the `kind` of map it came from (`@effected/npm`'s
|
|
@@ -16196,7 +16296,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
|
|
|
16196
16296
|
}
|
|
16197
16297
|
};
|
|
16198
16298
|
//#endregion
|
|
16199
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
16299
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/DevEngines.js
|
|
16200
16300
|
/**
|
|
16201
16301
|
* A single `devEngines` constraint with a name and optional `version` / `onFail`.
|
|
16202
16302
|
*
|
|
@@ -16234,7 +16334,7 @@ const DevEnginesSchema = effect.Schema.Struct({
|
|
|
16234
16334
|
libc: effect.Schema.optionalKey(DevEngineOrArray)
|
|
16235
16335
|
});
|
|
16236
16336
|
//#endregion
|
|
16237
|
-
//#region ../../node_modules/.pnpm/@effected+spdx@0.
|
|
16337
|
+
//#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/licenseIds.js
|
|
16238
16338
|
/** @internal */
|
|
16239
16339
|
const ACTIVE_LICENSE_IDS = [
|
|
16240
16340
|
"0BSD",
|
|
@@ -16967,7 +17067,7 @@ const LICENSE_IDS = new Set(ACTIVE_LICENSE_IDS);
|
|
|
16967
17067
|
/** @internal */
|
|
16968
17068
|
const DEPRECATED_LICENSE_IDS = new Set(DEPRECATED_LICENSE_ID_LIST);
|
|
16969
17069
|
//#endregion
|
|
16970
|
-
//#region ../../node_modules/.pnpm/@effected+spdx@0.
|
|
17070
|
+
//#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/License.js
|
|
16971
17071
|
/**
|
|
16972
17072
|
* Indicates that a string is not a valid SPDX expression fragment: an
|
|
16973
17073
|
* unrecognized license or exception identifier, or a malformed
|
|
@@ -17136,7 +17236,7 @@ var License = class License extends effect.Schema.Class("License")({
|
|
|
17136
17236
|
}
|
|
17137
17237
|
};
|
|
17138
17238
|
//#endregion
|
|
17139
|
-
//#region ../../node_modules/.pnpm/@effected+spdx@0.
|
|
17239
|
+
//#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/exceptions.js
|
|
17140
17240
|
/** @internal */
|
|
17141
17241
|
const ACTIVE_EXCEPTION_IDS = [
|
|
17142
17242
|
"389-exception",
|
|
@@ -17213,7 +17313,7 @@ const EXCEPTION_IDS = new Set(ACTIVE_EXCEPTION_IDS);
|
|
|
17213
17313
|
/** @internal */
|
|
17214
17314
|
const DEPRECATED_EXCEPTION_IDS = new Set(DEPRECATED_EXCEPTION_ID_LIST);
|
|
17215
17315
|
//#endregion
|
|
17216
|
-
//#region ../../node_modules/.pnpm/@effected+spdx@0.
|
|
17316
|
+
//#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/LicenseException.js
|
|
17217
17317
|
/**
|
|
17218
17318
|
* A validated SPDX license-exception identifier: an Effect `Schema.Class` whose
|
|
17219
17319
|
* `id` is a member of the SPDX exception list. The class doubles as its own
|
|
@@ -17333,7 +17433,7 @@ var LicenseException = class LicenseException extends effect.Schema.Class("Licen
|
|
|
17333
17433
|
}
|
|
17334
17434
|
};
|
|
17335
17435
|
//#endregion
|
|
17336
|
-
//#region ../../node_modules/.pnpm/@effected+spdx@0.
|
|
17436
|
+
//#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/internal/parser.js
|
|
17337
17437
|
const TOKEN_OPEN_PAREN = 0;
|
|
17338
17438
|
const TOKEN_CLOSE_PAREN = 1;
|
|
17339
17439
|
const TOKEN_PLUS = 2;
|
|
@@ -17506,6 +17606,7 @@ function parse$2(input) {
|
|
|
17506
17606
|
const head = peek();
|
|
17507
17607
|
if (head === void 0 || head.type !== TOKEN_ID) return void 0;
|
|
17508
17608
|
const value = head.value;
|
|
17609
|
+
let license;
|
|
17509
17610
|
if (value.startsWith(DOCUMENT_REF_PREFIX)) {
|
|
17510
17611
|
pos++;
|
|
17511
17612
|
if (peek()?.type !== TOKEN_COLON) return void 0;
|
|
@@ -17515,27 +17616,32 @@ function parse$2(input) {
|
|
|
17515
17616
|
const full = `${value}:${refToken.value}`;
|
|
17516
17617
|
if (!License.isLicenseRef(full)) return void 0;
|
|
17517
17618
|
pos++;
|
|
17518
|
-
|
|
17619
|
+
license = {
|
|
17519
17620
|
kind: "licenseRef",
|
|
17520
17621
|
documentRef: value.slice(12),
|
|
17521
17622
|
ref: refToken.value.slice(11)
|
|
17522
17623
|
};
|
|
17523
|
-
}
|
|
17524
|
-
if (value.startsWith(LICENSE_REF_PREFIX)) {
|
|
17624
|
+
} else if (value.startsWith(LICENSE_REF_PREFIX)) {
|
|
17525
17625
|
if (!License.isLicenseRef(value)) return void 0;
|
|
17526
17626
|
pos++;
|
|
17527
|
-
|
|
17627
|
+
license = {
|
|
17528
17628
|
kind: "licenseRef",
|
|
17529
17629
|
documentRef: void 0,
|
|
17530
17630
|
ref: value.slice(11)
|
|
17531
17631
|
};
|
|
17532
|
-
}
|
|
17533
|
-
|
|
17534
|
-
pos++;
|
|
17535
|
-
let plus = false;
|
|
17536
|
-
if (peek()?.type === TOKEN_PLUS) {
|
|
17632
|
+
} else {
|
|
17633
|
+
if (!License.isKnownId(value)) return void 0;
|
|
17537
17634
|
pos++;
|
|
17538
|
-
plus =
|
|
17635
|
+
let plus = false;
|
|
17636
|
+
if (peek()?.type === TOKEN_PLUS) {
|
|
17637
|
+
pos++;
|
|
17638
|
+
plus = true;
|
|
17639
|
+
}
|
|
17640
|
+
license = {
|
|
17641
|
+
kind: "license",
|
|
17642
|
+
id: value,
|
|
17643
|
+
plus
|
|
17644
|
+
};
|
|
17539
17645
|
}
|
|
17540
17646
|
if (peek()?.type === TOKEN_WITH) {
|
|
17541
17647
|
pos++;
|
|
@@ -17544,25 +17650,18 @@ function parse$2(input) {
|
|
|
17544
17650
|
pos++;
|
|
17545
17651
|
return {
|
|
17546
17652
|
kind: "with",
|
|
17547
|
-
license
|
|
17548
|
-
id: value,
|
|
17549
|
-
plus
|
|
17550
|
-
},
|
|
17653
|
+
license,
|
|
17551
17654
|
exception: exceptionToken.value
|
|
17552
17655
|
};
|
|
17553
17656
|
}
|
|
17554
|
-
return
|
|
17555
|
-
kind: "license",
|
|
17556
|
-
id: value,
|
|
17557
|
-
plus
|
|
17558
|
-
};
|
|
17657
|
+
return license;
|
|
17559
17658
|
}
|
|
17560
17659
|
const node = parseOr();
|
|
17561
17660
|
if (node === void 0 || pos !== tokens.length) return void 0;
|
|
17562
17661
|
return node;
|
|
17563
17662
|
}
|
|
17564
17663
|
//#endregion
|
|
17565
|
-
//#region ../../node_modules/.pnpm/@effected+spdx@0.
|
|
17664
|
+
//#region ../../node_modules/.pnpm/@effected+spdx@0.4.0_effect@4.0.0-rc.109/node_modules/@effected/spdx/SpdxExpression.js
|
|
17566
17665
|
/**
|
|
17567
17666
|
* Serialize a tagged SPDX AST node — a class instance OR its encoded POJO — to
|
|
17568
17667
|
* the canonical, fully-parenthesized SPDX string. This is the single source of
|
|
@@ -17619,15 +17718,16 @@ var LicenseRefNode = class extends effect.Schema.TaggedClass()("LicenseRef", {
|
|
|
17619
17718
|
}
|
|
17620
17719
|
};
|
|
17621
17720
|
/**
|
|
17622
|
-
* A `license WITH exception` node. Per the SPDX
|
|
17623
|
-
*
|
|
17624
|
-
*
|
|
17721
|
+
* A `license WITH exception` node. Per the SPDX grammar, `WITH` binds to a
|
|
17722
|
+
* simple expression — a license identifier (optionally `+`) or a
|
|
17723
|
+
* `LicenseRef`/`DocumentRef` reference — never a compound expression, so
|
|
17724
|
+
* `license` is a {@link LicenseNode} or a {@link LicenseRefNode}.
|
|
17625
17725
|
*
|
|
17626
17726
|
* @public
|
|
17627
17727
|
*/
|
|
17628
17728
|
var WithExceptionNode = class extends effect.Schema.TaggedClass()("WithException", {
|
|
17629
|
-
/** The license the exception applies to
|
|
17630
|
-
license: LicenseNode,
|
|
17729
|
+
/** The license the exception applies to: a simple license (which may carry the `+` marker) or a `LicenseRef` reference. */
|
|
17730
|
+
license: effect.Schema.Union([LicenseNode, LicenseRefNode]),
|
|
17631
17731
|
/** The SPDX exception short identifier, e.g. `"Bison-exception-2.2"`. */
|
|
17632
17732
|
exception: effect.Schema.String
|
|
17633
17733
|
}) {
|
|
@@ -17677,21 +17777,21 @@ const SpdxExpressionUnion = effect.Schema.Union([
|
|
|
17677
17777
|
AndNode,
|
|
17678
17778
|
OrNode
|
|
17679
17779
|
]);
|
|
17780
|
+
function materializeSimple(raw) {
|
|
17781
|
+
return raw.kind === "license" ? LicenseNode.make({
|
|
17782
|
+
id: raw.id,
|
|
17783
|
+
plus: raw.plus
|
|
17784
|
+
}) : LicenseRefNode.make(raw.documentRef !== void 0 ? {
|
|
17785
|
+
documentRef: raw.documentRef,
|
|
17786
|
+
ref: raw.ref
|
|
17787
|
+
} : { ref: raw.ref });
|
|
17788
|
+
}
|
|
17680
17789
|
function materialize$1(raw) {
|
|
17681
17790
|
switch (raw.kind) {
|
|
17682
|
-
case "license":
|
|
17683
|
-
|
|
17684
|
-
plus: raw.plus
|
|
17685
|
-
});
|
|
17686
|
-
case "licenseRef": return LicenseRefNode.make(raw.documentRef !== void 0 ? {
|
|
17687
|
-
documentRef: raw.documentRef,
|
|
17688
|
-
ref: raw.ref
|
|
17689
|
-
} : { ref: raw.ref });
|
|
17791
|
+
case "license":
|
|
17792
|
+
case "licenseRef": return materializeSimple(raw);
|
|
17690
17793
|
case "with": return WithExceptionNode.make({
|
|
17691
|
-
license:
|
|
17692
|
-
id: raw.license.id,
|
|
17693
|
-
plus: raw.license.plus
|
|
17694
|
-
}),
|
|
17794
|
+
license: materializeSimple(raw.license),
|
|
17695
17795
|
exception: raw.exception
|
|
17696
17796
|
});
|
|
17697
17797
|
case "and": return AndNode.make({
|
|
@@ -17751,7 +17851,7 @@ effect.Schema.String.pipe(effect.Schema.decodeTo(SpdxExpressionUnion, effect.Sch
|
|
|
17751
17851
|
encode: (expression) => effect.Effect.succeed(serialize$1(expression))
|
|
17752
17852
|
})));
|
|
17753
17853
|
//#endregion
|
|
17754
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
17854
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/License.js
|
|
17755
17855
|
/**
|
|
17756
17856
|
* Indicates that a string is not a valid SPDX license identifier or expression.
|
|
17757
17857
|
*
|
|
@@ -17786,7 +17886,7 @@ const isValidSpdx = (value) => {
|
|
|
17786
17886
|
*/
|
|
17787
17887
|
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"));
|
|
17788
17888
|
//#endregion
|
|
17789
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
17889
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageManager.js
|
|
17790
17890
|
const PACKAGE_MANAGER_NAME_RE = /^[a-z]+$/;
|
|
17791
17891
|
const invalid$1 = (input, message) => effect.Effect.fail(new effect.SchemaIssue.InvalidValue({ message }, input));
|
|
17792
17892
|
/**
|
|
@@ -17897,7 +17997,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
|
|
|
17897
17997
|
}
|
|
17898
17998
|
};
|
|
17899
17999
|
//#endregion
|
|
17900
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
18000
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/PackageName.js
|
|
17901
18001
|
/**
|
|
17902
18002
|
* Indicates that a string could not be used as a valid npm package name.
|
|
17903
18003
|
*
|
|
@@ -17955,7 +18055,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
|
|
|
17955
18055
|
isScoped
|
|
17956
18056
|
});
|
|
17957
18057
|
//#endregion
|
|
17958
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
18058
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Person.js
|
|
17959
18059
|
const parsePersonString = (input) => {
|
|
17960
18060
|
const emailMatch = input.match(/<([^>]+)>/);
|
|
17961
18061
|
const urlMatch = input.match(/\(([^)]+)\)/);
|
|
@@ -18101,7 +18201,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
|
|
|
18101
18201
|
}
|
|
18102
18202
|
};
|
|
18103
18203
|
//#endregion
|
|
18104
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
18204
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Repository.js
|
|
18105
18205
|
/** The shorthand hosts npm resolves without a scheme. */
|
|
18106
18206
|
const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
|
|
18107
18207
|
["github", "https://github.com"],
|
|
@@ -18276,7 +18376,7 @@ var Bugs = class Bugs extends effect.Schema.Class("Bugs")({
|
|
|
18276
18376
|
})));
|
|
18277
18377
|
};
|
|
18278
18378
|
//#endregion
|
|
18279
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
18379
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/format.js
|
|
18280
18380
|
const KEY_INDEX = new Map([
|
|
18281
18381
|
"$schema",
|
|
18282
18382
|
"name",
|
|
@@ -18511,7 +18611,7 @@ const renderJson = (raw, options) => {
|
|
|
18511
18611
|
return options.newline ? `${json}\n` : json;
|
|
18512
18612
|
};
|
|
18513
18613
|
//#endregion
|
|
18514
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
18614
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/internal/wire.js
|
|
18515
18615
|
const RawJson = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
|
|
18516
18616
|
/**
|
|
18517
18617
|
* Build the open-JSON ↔ class wire codec for a `Schema.Class` carrying a
|
|
@@ -18542,7 +18642,7 @@ const makeWire = (Class) => {
|
|
|
18542
18642
|
})));
|
|
18543
18643
|
};
|
|
18544
18644
|
//#endregion
|
|
18545
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.
|
|
18645
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.10.2_effect@4.0.0-rc.109/node_modules/@effected/package-json/Package.js
|
|
18546
18646
|
const toHashMap = effect.SchemaTransformation.transform({
|
|
18547
18647
|
decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
|
|
18548
18648
|
encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
|
|
@@ -18829,7 +18929,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
|
|
|
18829
18929
|
}
|
|
18830
18930
|
};
|
|
18831
18931
|
//#endregion
|
|
18832
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
18932
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspacePackage.js
|
|
18833
18933
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
18834
18934
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
18835
18935
|
/**
|
|
@@ -19427,7 +19527,7 @@ var Walker$1 = class {
|
|
|
19427
19527
|
static findRoot = findRoot$1;
|
|
19428
19528
|
};
|
|
19429
19529
|
//#endregion
|
|
19430
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
19530
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceRoot.js
|
|
19431
19531
|
/**
|
|
19432
19532
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
19433
19533
|
*
|
|
@@ -19614,7 +19714,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
|
|
|
19614
19714
|
static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
|
|
19615
19715
|
};
|
|
19616
19716
|
//#endregion
|
|
19617
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
19717
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/limits.js
|
|
19618
19718
|
/**
|
|
19619
19719
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
19620
19720
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -19632,7 +19732,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
19632
19732
|
*/
|
|
19633
19733
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
19634
19734
|
//#endregion
|
|
19635
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
19735
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/traverse.js
|
|
19636
19736
|
/** Directory names never descended into. */
|
|
19637
19737
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
19638
19738
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -19722,7 +19822,7 @@ var Traversal = class {
|
|
|
19722
19822
|
}
|
|
19723
19823
|
};
|
|
19724
19824
|
//#endregion
|
|
19725
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
19825
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/enumerate.js
|
|
19726
19826
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
19727
19827
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
19728
19828
|
/**
|
|
@@ -19792,7 +19892,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
|
|
|
19792
19892
|
return results;
|
|
19793
19893
|
});
|
|
19794
19894
|
//#endregion
|
|
19795
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
19895
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/patterns.js
|
|
19796
19896
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
19797
19897
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
19798
19898
|
const pnpmPatternsOf = (document) => {
|
|
@@ -19849,7 +19949,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
|
|
|
19849
19949
|
return manifestPatternsOf(manifest);
|
|
19850
19950
|
});
|
|
19851
19951
|
//#endregion
|
|
19852
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
19952
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceDiscovery.js
|
|
19853
19953
|
/**
|
|
19854
19954
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
19855
19955
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -20305,7 +20405,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
20305
20405
|
};
|
|
20306
20406
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
20307
20407
|
//#endregion
|
|
20308
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
20408
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/DependencyGraph.js
|
|
20309
20409
|
/**
|
|
20310
20410
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
20311
20411
|
* because it contains a cycle.
|
|
@@ -24001,7 +24101,7 @@ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
|
|
|
24001
24101
|
static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
|
|
24002
24102
|
};
|
|
24003
24103
|
//#endregion
|
|
24004
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
24104
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ChangeDetector.js
|
|
24005
24105
|
/**
|
|
24006
24106
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
24007
24107
|
*
|
|
@@ -24257,7 +24357,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
24257
24357
|
};
|
|
24258
24358
|
}
|
|
24259
24359
|
//#endregion
|
|
24260
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
24360
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/catalogs.js
|
|
24261
24361
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
24262
24362
|
const inlineCatalogs = (manifest) => {
|
|
24263
24363
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -24321,7 +24421,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
24321
24421
|
});
|
|
24322
24422
|
};
|
|
24323
24423
|
//#endregion
|
|
24324
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
24424
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ConfigDependencyHooks.js
|
|
24325
24425
|
/** Whether `value` is a non-null, non-array object. */
|
|
24326
24426
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
24327
24427
|
/**
|
|
@@ -24735,7 +24835,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
24735
24835
|
}));
|
|
24736
24836
|
};
|
|
24737
24837
|
//#endregion
|
|
24738
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
24838
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/PackageManagerName.js
|
|
24739
24839
|
/**
|
|
24740
24840
|
* The four package managers this package understands.
|
|
24741
24841
|
*
|
|
@@ -25110,7 +25210,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
|
|
|
25110
25210
|
static layerTest = (overrides = {}) => effect.Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
|
|
25111
25211
|
};
|
|
25112
25212
|
//#endregion
|
|
25113
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
25213
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/LockfileReader.js
|
|
25114
25214
|
/**
|
|
25115
25215
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
25116
25216
|
*
|
|
@@ -25290,7 +25390,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
|
|
|
25290
25390
|
static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
|
|
25291
25391
|
};
|
|
25292
25392
|
//#endregion
|
|
25293
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
25393
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Publishability.js
|
|
25294
25394
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
25295
25395
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
25296
25396
|
/**
|
|
@@ -25449,7 +25549,7 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
|
|
|
25449
25549
|
static layerNone = effect.Layer.succeed(this, this.none);
|
|
25450
25550
|
};
|
|
25451
25551
|
//#endregion
|
|
25452
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
25552
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/importerVersions.js
|
|
25453
25553
|
/**
|
|
25454
25554
|
* Strip pnpm's peer-disambiguation suffix from a recorded importer version.
|
|
25455
25555
|
*
|
|
@@ -25535,7 +25635,7 @@ const unanimousVersionOf = (index, dependency) => {
|
|
|
25535
25635
|
return agreed;
|
|
25536
25636
|
};
|
|
25537
25637
|
//#endregion
|
|
25538
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
25638
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceCatalogs.js
|
|
25539
25639
|
/**
|
|
25540
25640
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
25541
25641
|
* resolution semantic in the package.
|
|
@@ -26062,7 +26162,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
26062
26162
|
}));
|
|
26063
26163
|
};
|
|
26064
26164
|
//#endregion
|
|
26065
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
26165
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
|
|
26066
26166
|
const EMPTY = Object.freeze(Object.create(null));
|
|
26067
26167
|
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)));
|
|
26068
26168
|
/**
|
|
@@ -26285,7 +26385,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
26285
26385
|
}
|
|
26286
26386
|
};
|
|
26287
26387
|
//#endregion
|
|
26288
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
26388
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceSnapshots.js
|
|
26289
26389
|
/** Whether `value` is a non-null, non-array object. */
|
|
26290
26390
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26291
26391
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -26562,7 +26662,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
26562
26662
|
static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
|
|
26563
26663
|
};
|
|
26564
26664
|
//#endregion
|
|
26565
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.
|
|
26665
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.14.2_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Workspaces.js
|
|
26566
26666
|
const compose = (options, catalogsFactory) => {
|
|
26567
26667
|
const roots = WorkspaceRoot.layer;
|
|
26568
26668
|
const detector = PackageManagerDetector.layer;
|
|
@@ -49579,68 +49679,453 @@ function parseCommitMessage(message) {
|
|
|
49579
49679
|
return { description: message };
|
|
49580
49680
|
}
|
|
49581
49681
|
//#endregion
|
|
49582
|
-
//#region
|
|
49682
|
+
//#region ../../node_modules/.pnpm/@effected+github-references@0.1.0_effect@4.0.0-rc.109/node_modules/@effected/github-references/IssueReferences.js
|
|
49583
49683
|
/**
|
|
49584
|
-
*
|
|
49684
|
+
* GitHub's closing-keyword issue-reference grammar, as pure functions.
|
|
49585
49685
|
*
|
|
49586
|
-
*
|
|
49686
|
+
* @remarks
|
|
49687
|
+
* GitHub links an issue to a pull request when the PR's description carries
|
|
49688
|
+
* `<keyword> #<number>` for one of nine documented keywords. Consumers speak
|
|
49689
|
+
* that grammar in two distinct dialects, and this module models exactly those
|
|
49690
|
+
* two — no service, no layer, nothing but strings in and values out:
|
|
49691
|
+
*
|
|
49692
|
+
* - **Inline-in-prose** ({@link harvestIssueReferences}): a reference may appear anywhere in
|
|
49693
|
+
* running text — `"fixes #12 and closes #13"` — with mandatory whitespace
|
|
49694
|
+
* and **no colon**, because that is the spelling GitHub itself scans PR
|
|
49695
|
+
* bodies for. This is the dialect a release pipeline harvests from commit
|
|
49696
|
+
* subjects and PR descriptions.
|
|
49697
|
+
* - **Bare-line** ({@link parseBareLineReference}): the whole line, after trimming, *is*
|
|
49698
|
+
* the reference — `"Closes: #12"` — with an **optional colon**, because a
|
|
49699
|
+
* generated references region writes one reference per line and a colon
|
|
49700
|
+
* reads better there. GitHub does not require the colon; the region format
|
|
49701
|
+
* allows it, so the parser must too. The dialects differ because their
|
|
49702
|
+
* producers do: prose is written by humans for GitHub's scanner, the region
|
|
49703
|
+
* is written by tooling for humans.
|
|
49704
|
+
*
|
|
49705
|
+
* Deliberately out of scope this round: cross-repo references
|
|
49706
|
+
* (`owner/repo#N`) and full-URL references
|
|
49707
|
+
* (`https://github.com/owner/repo/issues/N`). Both are real GitHub spellings;
|
|
49708
|
+
* neither dialect's consumers emit them yet, and guessing at their shape here
|
|
49709
|
+
* would freeze an API nobody has driven.
|
|
49710
|
+
*/
|
|
49711
|
+
/**
|
|
49712
|
+
* The nine closing keywords GitHub documents, lowercased.
|
|
49587
49713
|
*
|
|
49588
|
-
* @
|
|
49714
|
+
* @public
|
|
49589
49715
|
*/
|
|
49590
|
-
const
|
|
49716
|
+
const CLOSING_KEYWORDS = [
|
|
49717
|
+
"close",
|
|
49718
|
+
"closes",
|
|
49719
|
+
"closed",
|
|
49720
|
+
"fix",
|
|
49721
|
+
"fixes",
|
|
49722
|
+
"fixed",
|
|
49723
|
+
"resolve",
|
|
49724
|
+
"resolves",
|
|
49725
|
+
"resolved"
|
|
49726
|
+
];
|
|
49727
|
+
/**
|
|
49728
|
+
* Both patterns derive from {@link CLOSING_KEYWORDS} so the constant and the
|
|
49729
|
+
* grammar cannot drift. Alternation order is safe: the regex engine backtracks
|
|
49730
|
+
* through alternatives, so `close` matching inside `closes` fails at the
|
|
49731
|
+
* mandatory `#`-introducer and retries the longer keyword.
|
|
49732
|
+
*/
|
|
49733
|
+
const KEYWORDS = CLOSING_KEYWORDS.join("|");
|
|
49734
|
+
new RegExp(`\\b(${KEYWORDS})\\s+#(\\d+)`, "gi");
|
|
49735
|
+
new RegExp(`^(${KEYWORDS}):?[ \\t]+#(\\d+)$`, "i");
|
|
49736
|
+
//#endregion
|
|
49737
|
+
//#region ../../node_modules/.pnpm/@effected+github-references@0.1.0_effect@4.0.0-rc.109/node_modules/@effected/github-references/ClosingList.js
|
|
49591
49738
|
/**
|
|
49592
|
-
*
|
|
49739
|
+
* The closing-list dialect: one whole line naming several issues at once.
|
|
49593
49740
|
*
|
|
49594
|
-
*
|
|
49741
|
+
* @remarks
|
|
49742
|
+
* The third dialect, alongside the two in `IssueReferences`: after trimming,
|
|
49743
|
+
* the **entire** line must be `<keyword>[:] <list>` — keyword
|
|
49744
|
+
* case-insensitive (lowercased to canonical form in the result), colon
|
|
49745
|
+
* optional, and the list one or more `#<digits>` items separated by `,`,
|
|
49746
|
+
* `and`, or the Oxford `, and`. Whitespace inside the line is `[ \t]` only,
|
|
49747
|
+
* so an embedded newline cannot smuggle two lines past a parser whose
|
|
49748
|
+
* contract is one — the same posture as the bare-line pattern. Any trailing
|
|
49749
|
+
* content after the list rejects the line; duplicates are preserved in order,
|
|
49750
|
+
* because whether `#1, #1` means one issue or two is the caller's business.
|
|
49751
|
+
*
|
|
49752
|
+
* Two keyword sets play here. {@link parseClosingList} accepts only the nine
|
|
49753
|
+
* closing keywords and yields a {@link ClosingList}; {@link parseReferenceList}
|
|
49754
|
+
* additionally accepts the non-closing {@link REFERENCE_KEYWORDS} (`ref`,
|
|
49755
|
+
* `refs`, `references`) and reports which set matched via
|
|
49756
|
+
* {@link ReferenceList}'s `closing` flag.
|
|
49757
|
+
*
|
|
49758
|
+
* An item whose digits exceed `Number.MAX_SAFE_INTEGER` rejects the **whole
|
|
49759
|
+
* line**, where `harvestIssueReferences` merely skips the one match. The
|
|
49760
|
+
* asymmetry is deliberate: a harvest drops one reference out of running
|
|
49761
|
+
* prose, but a list line is a single claim about a set of issues, and
|
|
49762
|
+
* returning the parseable subset would misrepresent the line as claiming
|
|
49763
|
+
* less than it does.
|
|
49764
|
+
*
|
|
49765
|
+
* Complexity posture: parsing is a single left-to-right character scan —
|
|
49766
|
+
* this module contains **no regular expressions at all** — so worst-case
|
|
49767
|
+
* time is linear in the line length by construction. There is no
|
|
49768
|
+
* backtracking engine to feed, no polynomial blow-up for a scanner to flag,
|
|
49769
|
+
* and therefore no input truncation.
|
|
49770
|
+
*
|
|
49771
|
+
* Beyond the whole-line parsers, {@link harvestReferenceLists} generalizes
|
|
49772
|
+
* the same list grammar to the inline-in-prose posture — several lists on
|
|
49773
|
+
* one line of running text — and {@link parseClosingLists} /
|
|
49774
|
+
* {@link parseReferenceLists} apply the whole-line parsers per line of a
|
|
49775
|
+
* multi-line text. All of them ride the same character scan; the no-regex
|
|
49776
|
+
* promise above covers every export here.
|
|
49777
|
+
*/
|
|
49778
|
+
/**
|
|
49779
|
+
* The non-closing reference keywords the list dialect accepts, lowercased.
|
|
49595
49780
|
*
|
|
49596
|
-
* @
|
|
49781
|
+
* @remarks
|
|
49782
|
+
* GitHub does not act on these — they associate without closing — but a
|
|
49783
|
+
* references region writes them, so the parser must read them.
|
|
49784
|
+
*
|
|
49785
|
+
* @public
|
|
49597
49786
|
*/
|
|
49598
|
-
const
|
|
49787
|
+
const REFERENCE_KEYWORDS = [
|
|
49788
|
+
"ref",
|
|
49789
|
+
"refs",
|
|
49790
|
+
"references"
|
|
49791
|
+
];
|
|
49792
|
+
/**
|
|
49793
|
+
* Both keyword tables ARE the exported constants — membership sets built from
|
|
49794
|
+
* them once — so the constants and the grammar cannot drift.
|
|
49795
|
+
*/
|
|
49796
|
+
const ALL_KEYWORDS = /* @__PURE__ */ new Set([...CLOSING_KEYWORDS, ...REFERENCE_KEYWORDS]);
|
|
49797
|
+
/** Membership test for reporting `closing`, widened once so no call casts. */
|
|
49798
|
+
const CLOSING_SET = new Set(CLOSING_KEYWORDS);
|
|
49799
|
+
const HASH = 35;
|
|
49800
|
+
const COLON = 58;
|
|
49801
|
+
const COMMA = 44;
|
|
49802
|
+
/** `[ \t]` — the only whitespace the dialect admits, per the module remarks. */
|
|
49803
|
+
const isSpaceTab = (code) => code === 32 || code === 9;
|
|
49804
|
+
const isDigit$1 = (code) => code >= 48 && code <= 57;
|
|
49805
|
+
const isAsciiLetter = (code) => code >= 65 && code <= 90 || code >= 97 && code <= 122;
|
|
49806
|
+
/** The index after the run of `[ \t]` starting at `from` (possibly `from` itself). */
|
|
49807
|
+
const skipSpaceTab = (line, from) => {
|
|
49808
|
+
let index = from;
|
|
49809
|
+
while (index < line.length && isSpaceTab(line.charCodeAt(index))) index += 1;
|
|
49810
|
+
return index;
|
|
49811
|
+
};
|
|
49599
49812
|
/**
|
|
49600
|
-
*
|
|
49813
|
+
* One list item at exactly `from`: `#<digits>` and the index one past it.
|
|
49814
|
+
* Digits exceeding `Number.MAX_SAFE_INTEGER` report `"unsafe"` rather than a
|
|
49815
|
+
* silently rounded issue number, still carrying the index one past the digit
|
|
49816
|
+
* run so a caller can skip the item's extent; the whole-line parsers reject
|
|
49817
|
+
* on it and {@link harvestReferenceLists} abandons the entire candidate —
|
|
49818
|
+
* see the module remarks for why a list never yields a partial reading.
|
|
49819
|
+
* Anything that is not `#<digits>` at all is `undefined`.
|
|
49820
|
+
*/
|
|
49821
|
+
const readItem = (line, from) => {
|
|
49822
|
+
if (line.charCodeAt(from) !== HASH) return void 0;
|
|
49823
|
+
const start = from + 1;
|
|
49824
|
+
let index = start;
|
|
49825
|
+
while (index < line.length && isDigit$1(line.charCodeAt(index))) index += 1;
|
|
49826
|
+
if (index === start) return void 0;
|
|
49827
|
+
const value = Number(line.slice(start, index));
|
|
49828
|
+
return Number.isSafeInteger(value) ? {
|
|
49829
|
+
kind: "item",
|
|
49830
|
+
value,
|
|
49831
|
+
next: index
|
|
49832
|
+
} : {
|
|
49833
|
+
kind: "unsafe",
|
|
49834
|
+
next: index
|
|
49835
|
+
};
|
|
49836
|
+
};
|
|
49837
|
+
/**
|
|
49838
|
+
* One separator at exactly `from`: a comma with optional surrounding `[ \t]`
|
|
49839
|
+
* and an optional Oxford `and` (consumed only when its own trailing `[ \t]+`
|
|
49840
|
+
* is present), or a bare `and` requiring `[ \t]+` on both sides. `and` is
|
|
49841
|
+
* lowercase-only — the keyword head is case-insensitive, the separator is
|
|
49842
|
+
* not. Returns the index where the next item must start, or `undefined` when
|
|
49843
|
+
* no separator is present.
|
|
49844
|
+
*/
|
|
49845
|
+
const scanSeparator = (line, from) => {
|
|
49846
|
+
const afterLeading = skipSpaceTab(line, from);
|
|
49847
|
+
if (line.charCodeAt(afterLeading) === COMMA) {
|
|
49848
|
+
const afterComma = skipSpaceTab(line, afterLeading + 1);
|
|
49849
|
+
if (line.startsWith("and", afterComma)) {
|
|
49850
|
+
const afterAnd = skipSpaceTab(line, afterComma + 3);
|
|
49851
|
+
if (afterAnd > afterComma + 3) return afterAnd;
|
|
49852
|
+
}
|
|
49853
|
+
return afterComma;
|
|
49854
|
+
}
|
|
49855
|
+
if (afterLeading > from && line.startsWith("and", afterLeading)) {
|
|
49856
|
+
const afterAnd = skipSpaceTab(line, afterLeading + 3);
|
|
49857
|
+
if (afterAnd > afterLeading + 3) return afterAnd;
|
|
49858
|
+
}
|
|
49859
|
+
};
|
|
49860
|
+
/**
|
|
49861
|
+
* The scan walk: item, then separator, then item, until the cursor stands
|
|
49862
|
+
* exactly at the end of the string. Anything else — a malformed item, an
|
|
49863
|
+
* unknown separator, trailing content, an unsafe issue number — is
|
|
49864
|
+
* `undefined`, and the caller rejects the whole line.
|
|
49865
|
+
*/
|
|
49866
|
+
const parseItems = (line, from) => {
|
|
49867
|
+
const issueNumbers = [];
|
|
49868
|
+
let cursor = from;
|
|
49869
|
+
for (;;) {
|
|
49870
|
+
const item = readItem(line, cursor);
|
|
49871
|
+
if (item === void 0 || item.kind === "unsafe") return void 0;
|
|
49872
|
+
issueNumbers.push(item.value);
|
|
49873
|
+
cursor = item.next;
|
|
49874
|
+
if (cursor === line.length) return issueNumbers;
|
|
49875
|
+
const next = scanSeparator(line, cursor);
|
|
49876
|
+
if (next === void 0) return void 0;
|
|
49877
|
+
cursor = next;
|
|
49878
|
+
}
|
|
49879
|
+
};
|
|
49880
|
+
/**
|
|
49881
|
+
* The list a whole line carries under either keyword set, or `Option.none()`.
|
|
49601
49882
|
*
|
|
49602
|
-
*
|
|
49883
|
+
* @remarks
|
|
49884
|
+
* Accepts the nine closing keywords plus {@link REFERENCE_KEYWORDS}, and
|
|
49885
|
+
* reports which set matched in the result's `closing` flag. Grammar,
|
|
49886
|
+
* whole-line posture and the whole-line rejection of unsafe issue numbers
|
|
49887
|
+
* are in the module remarks.
|
|
49603
49888
|
*
|
|
49604
|
-
* @
|
|
49889
|
+
* @public
|
|
49605
49890
|
*/
|
|
49606
|
-
const
|
|
49891
|
+
const parseReferenceList = (line) => {
|
|
49892
|
+
const trimmed = line.trim();
|
|
49893
|
+
let letters = 0;
|
|
49894
|
+
while (letters < trimmed.length && isAsciiLetter(trimmed.charCodeAt(letters))) letters += 1;
|
|
49895
|
+
if (letters === 0) return effect.Option.none();
|
|
49896
|
+
const keyword = trimmed.slice(0, letters).toLowerCase();
|
|
49897
|
+
if (!ALL_KEYWORDS.has(keyword)) return effect.Option.none();
|
|
49898
|
+
let cursor = letters;
|
|
49899
|
+
if (trimmed.charCodeAt(cursor) === COLON) cursor += 1;
|
|
49900
|
+
const afterWhitespace = skipSpaceTab(trimmed, cursor);
|
|
49901
|
+
if (afterWhitespace === cursor) return effect.Option.none();
|
|
49902
|
+
const issueNumbers = parseItems(trimmed, afterWhitespace);
|
|
49903
|
+
if (issueNumbers === void 0) return effect.Option.none();
|
|
49904
|
+
return effect.Option.some({
|
|
49905
|
+
keyword,
|
|
49906
|
+
closing: CLOSING_SET.has(keyword),
|
|
49907
|
+
issueNumbers
|
|
49908
|
+
});
|
|
49909
|
+
};
|
|
49607
49910
|
/**
|
|
49608
|
-
*
|
|
49911
|
+
* Every reference list a text carries, line by line, across both postures.
|
|
49609
49912
|
*
|
|
49610
|
-
* @
|
|
49913
|
+
* @remarks
|
|
49914
|
+
* The trailer/prose interleave consumers otherwise hand-roll: each line is
|
|
49915
|
+
* tried as a whole-line reference list first ({@link parseReferenceList} —
|
|
49916
|
+
* colon-tolerant, per the line dialect), and only a line that is not one is
|
|
49917
|
+
* harvested inline ({@link harvestReferenceLists} — no colon, per the inline
|
|
49918
|
+
* dialect). The preference means a colon-less trailer line contributes its
|
|
49919
|
+
* list exactly once, never once per posture.
|
|
49920
|
+
*
|
|
49921
|
+
* Results carry no offsets, deliberately: this is the line-granular
|
|
49922
|
+
* composition, and a consumer that needs spans uses
|
|
49923
|
+
* {@link harvestReferenceLists} directly. Duplicates are preserved, in
|
|
49924
|
+
* document order.
|
|
49925
|
+
*
|
|
49926
|
+
* @public
|
|
49611
49927
|
*/
|
|
49612
|
-
const
|
|
49928
|
+
const collectReferenceLists = (text) => {
|
|
49929
|
+
const lists = [];
|
|
49930
|
+
for (const line of text.split("\n")) {
|
|
49931
|
+
const whole = parseReferenceList(line);
|
|
49932
|
+
if (effect.Option.isSome(whole)) {
|
|
49933
|
+
lists.push(whole.value);
|
|
49934
|
+
continue;
|
|
49935
|
+
}
|
|
49936
|
+
for (const harvested of harvestReferenceLists(line)) lists.push({
|
|
49937
|
+
keyword: harvested.keyword,
|
|
49938
|
+
closing: harvested.closing,
|
|
49939
|
+
issueNumbers: harvested.issueNumbers
|
|
49940
|
+
});
|
|
49941
|
+
}
|
|
49942
|
+
return lists;
|
|
49943
|
+
};
|
|
49944
|
+
/** `[A-Za-z0-9_]` — the word-boundary alphabet the inline dialects use. */
|
|
49945
|
+
const isWordChar = (code) => isAsciiLetter(code) || isDigit$1(code) || code === 95;
|
|
49946
|
+
/**
|
|
49947
|
+
* The full JavaScript `\s` set, spelled as a predicate so the module keeps
|
|
49948
|
+
* its no-regex promise: ASCII whitespace, NEL-adjacent controls, and the
|
|
49949
|
+
* Unicode space separators. Only the keyword→first-item gap of
|
|
49950
|
+
* {@link harvestReferenceLists} admits this set — everything inside a list
|
|
49951
|
+
* stays `[ \t]`, per the module remarks.
|
|
49952
|
+
*/
|
|
49953
|
+
const isAnyWhitespace = (code) => code === 32 || code >= 9 && code <= 13 || code === 160 || code === 5760 || code >= 8192 && code <= 8202 || code === 8232 || code === 8233 || code === 8239 || code === 8287 || code === 12288 || code === 65279;
|
|
49954
|
+
/**
|
|
49955
|
+
* Every reference list found inline in `text`, in document order.
|
|
49956
|
+
*
|
|
49957
|
+
* @remarks
|
|
49958
|
+
* The inline-in-prose posture generalized to lists:
|
|
49959
|
+
* `Closes #123, Fixes #456` in one line of a commit body yields two
|
|
49960
|
+
* single-item lists, where
|
|
49961
|
+
* `harvestIssueReferences` reads only the first reference of each and the
|
|
49962
|
+
* whole-line parsers read neither. The grammar per candidate:
|
|
49963
|
+
*
|
|
49964
|
+
* - The keyword is case-insensitive, drawn from either keyword set,
|
|
49965
|
+
* lowercased to canonical form in the result, with `closing` reported by
|
|
49966
|
+
* set membership. Word boundaries hold on both sides: the characters
|
|
49967
|
+
* immediately before and after the keyword's letter run must not be
|
|
49968
|
+
* `[A-Za-z0-9_]`, so `recloses #1` and `1closes #1` do not match.
|
|
49969
|
+
* - **No colon** — exactly like `harvestIssueReferences`, the colon spelling
|
|
49970
|
+
* belongs to the line dialects ({@link parseReferenceList} and the
|
|
49971
|
+
* bare-line parser), so `closes: #1` inline yields nothing.
|
|
49972
|
+
* - The keyword→first-item gap is any run of whitespace **including
|
|
49973
|
+
* newlines**, mirroring the inline dialect's `\s+`.
|
|
49974
|
+
* - List continuation uses the `,` / `and` / Oxford separators with `[ \t]`
|
|
49975
|
+
* whitespace only, so a list cannot continue past a newline — a later
|
|
49976
|
+
* line makes its own claims.
|
|
49977
|
+
* - Items are `#<digits>`; duplicates are preserved in order.
|
|
49978
|
+
*
|
|
49979
|
+
* A list ends at its last valid item: in `closes #1 and fixes #2` the
|
|
49980
|
+
* ` and ` before `fixes` fails as a separator because what follows is not
|
|
49981
|
+
* `#`, so the text yields `closes: [1]` then `fixes: [2]`. An item past
|
|
49982
|
+
* `Number.MAX_SAFE_INTEGER` anywhere in a candidate skips the **entire**
|
|
49983
|
+
* candidate — never a partial list, for the same reason
|
|
49984
|
+
* {@link parseReferenceList} rejects the whole line — and scanning resumes
|
|
49985
|
+
* after the candidate's scanned extent.
|
|
49986
|
+
*
|
|
49987
|
+
* Like everything in this module, the harvest is a single left-to-right
|
|
49988
|
+
* character scan with no regular expressions, so time stays linear in the
|
|
49989
|
+
* text length and no input is truncated.
|
|
49990
|
+
*
|
|
49991
|
+
* @public
|
|
49992
|
+
*/
|
|
49993
|
+
const harvestReferenceLists = (text) => {
|
|
49994
|
+
const lists = [];
|
|
49995
|
+
let index = 0;
|
|
49996
|
+
while (index < text.length) {
|
|
49997
|
+
if (!isAsciiLetter(text.charCodeAt(index))) {
|
|
49998
|
+
index += 1;
|
|
49999
|
+
continue;
|
|
50000
|
+
}
|
|
50001
|
+
const runStart = index;
|
|
50002
|
+
let runEnd = index + 1;
|
|
50003
|
+
while (runEnd < text.length && isAsciiLetter(text.charCodeAt(runEnd))) runEnd += 1;
|
|
50004
|
+
if (runStart > 0 && isWordChar(text.charCodeAt(runStart - 1)) || runEnd < text.length && isWordChar(text.charCodeAt(runEnd))) {
|
|
50005
|
+
index = runEnd;
|
|
50006
|
+
continue;
|
|
50007
|
+
}
|
|
50008
|
+
const keyword = text.slice(runStart, runEnd).toLowerCase();
|
|
50009
|
+
if (!ALL_KEYWORDS.has(keyword)) {
|
|
50010
|
+
index = runEnd;
|
|
50011
|
+
continue;
|
|
50012
|
+
}
|
|
50013
|
+
let cursor = runEnd;
|
|
50014
|
+
while (cursor < text.length && isAnyWhitespace(text.charCodeAt(cursor))) cursor += 1;
|
|
50015
|
+
const first = cursor === runEnd ? void 0 : readItem(text, cursor);
|
|
50016
|
+
if (first === void 0) {
|
|
50017
|
+
index = runEnd;
|
|
50018
|
+
continue;
|
|
50019
|
+
}
|
|
50020
|
+
if (first.kind === "unsafe") {
|
|
50021
|
+
index = first.next;
|
|
50022
|
+
continue;
|
|
50023
|
+
}
|
|
50024
|
+
const issueNumbers = [first.value];
|
|
50025
|
+
let end = first.next;
|
|
50026
|
+
let unsafeNext;
|
|
50027
|
+
for (;;) {
|
|
50028
|
+
const next = scanSeparator(text, end);
|
|
50029
|
+
if (next === void 0) break;
|
|
50030
|
+
const item = readItem(text, next);
|
|
50031
|
+
if (item === void 0) break;
|
|
50032
|
+
if (item.kind === "unsafe") {
|
|
50033
|
+
unsafeNext = item.next;
|
|
50034
|
+
break;
|
|
50035
|
+
}
|
|
50036
|
+
issueNumbers.push(item.value);
|
|
50037
|
+
end = item.next;
|
|
50038
|
+
}
|
|
50039
|
+
if (unsafeNext !== void 0) {
|
|
50040
|
+
index = unsafeNext;
|
|
50041
|
+
continue;
|
|
50042
|
+
}
|
|
50043
|
+
lists.push({
|
|
50044
|
+
keyword,
|
|
50045
|
+
closing: CLOSING_SET.has(keyword),
|
|
50046
|
+
issueNumbers,
|
|
50047
|
+
start: runStart,
|
|
50048
|
+
end
|
|
50049
|
+
});
|
|
50050
|
+
index = end;
|
|
50051
|
+
}
|
|
50052
|
+
return lists;
|
|
50053
|
+
};
|
|
50054
|
+
//#endregion
|
|
50055
|
+
//#region ../../node_modules/.pnpm/@effected+github-references@0.1.0_effect@4.0.0-rc.109/node_modules/@effected/github-references/KeywordFamily.js
|
|
50056
|
+
/**
|
|
50057
|
+
* The projection table IS the totality proof: `Record` over the union of
|
|
50058
|
+
* both keyword types makes a keyword added to either constant without an
|
|
50059
|
+
* entry here fail to compile.
|
|
50060
|
+
*/
|
|
50061
|
+
const FAMILIES = {
|
|
50062
|
+
close: "close",
|
|
50063
|
+
closes: "close",
|
|
50064
|
+
closed: "close",
|
|
50065
|
+
fix: "fix",
|
|
50066
|
+
fixes: "fix",
|
|
50067
|
+
fixed: "fix",
|
|
50068
|
+
resolve: "resolve",
|
|
50069
|
+
resolves: "resolve",
|
|
50070
|
+
resolved: "resolve",
|
|
50071
|
+
ref: "ref",
|
|
50072
|
+
refs: "ref",
|
|
50073
|
+
references: "ref"
|
|
50074
|
+
};
|
|
49613
50075
|
/**
|
|
49614
|
-
*
|
|
50076
|
+
* The family a keyword belongs to.
|
|
49615
50077
|
*
|
|
49616
50078
|
* @remarks
|
|
49617
|
-
*
|
|
49618
|
-
*
|
|
50079
|
+
* Total over both keyword sets by construction — see the module remarks for
|
|
50080
|
+
* why an explicit record beats a `startsWith` heuristic. `close`, `closes`
|
|
50081
|
+
* and `closed` map to `"close"`; the `fix` and `resolve` conjugations
|
|
50082
|
+
* likewise; `ref`, `refs` and `references` map to `"ref"`. The evidence for
|
|
50083
|
+
* the projection is downstream: categorized harvesters key maps by family,
|
|
50084
|
+
* and each was hand-rolling this collapse.
|
|
49619
50085
|
*
|
|
49620
|
-
* @
|
|
49621
|
-
|
|
49622
|
-
|
|
50086
|
+
* @public
|
|
50087
|
+
*/
|
|
50088
|
+
const keywordFamily = (keyword) => FAMILIES[keyword];
|
|
50089
|
+
//#endregion
|
|
50090
|
+
//#region ../silk-effects/dist/dev/pkg/changesets/utils/issue-refs.js
|
|
50091
|
+
/**
|
|
50092
|
+
* The output category each keyword family lands in.
|
|
50093
|
+
*
|
|
50094
|
+
* @remarks
|
|
50095
|
+
* The `resolve` family reads as `closes` since closing is what those keywords
|
|
50096
|
+
* do; the record is total over `KeywordFamily`, so a family the kit adds
|
|
50097
|
+
* without a category here is a type error, never a silent drop.
|
|
49623
50098
|
*
|
|
49624
50099
|
* @internal
|
|
49625
50100
|
*/
|
|
49626
|
-
|
|
49627
|
-
|
|
49628
|
-
|
|
49629
|
-
|
|
49630
|
-
|
|
50101
|
+
const CATEGORY_BY_FAMILY = {
|
|
50102
|
+
close: "closes",
|
|
50103
|
+
fix: "fixes",
|
|
50104
|
+
ref: "refs",
|
|
50105
|
+
resolve: "closes"
|
|
50106
|
+
};
|
|
50107
|
+
/** @internal */
|
|
50108
|
+
function categoryOf(list) {
|
|
50109
|
+
return CATEGORY_BY_FAMILY[keywordFamily(list.keyword)];
|
|
49631
50110
|
}
|
|
49632
50111
|
/**
|
|
49633
50112
|
* Parse a commit message for GitHub issue references.
|
|
49634
50113
|
*
|
|
49635
|
-
* Recognizes
|
|
49636
|
-
*
|
|
49637
|
-
* - `Fixes: #456, #789`
|
|
49638
|
-
* - `
|
|
50114
|
+
* Recognizes GitHub's closing keywords plus `Ref`/`Refs`/`References` in
|
|
50115
|
+
* both list dialects:
|
|
50116
|
+
* - whole-line trailers — `Closes #123`, `Fixes: #456, #789`, `Refs #101`;
|
|
50117
|
+
* - inline in prose — `This closes #12 in passing`, or several lists on one
|
|
50118
|
+
* line: `Closes #123, Fixes #456`.
|
|
49639
50119
|
*
|
|
49640
50120
|
* @remarks
|
|
49641
|
-
*
|
|
49642
|
-
*
|
|
49643
|
-
*
|
|
50121
|
+
* References accumulate in message order: two `Closes` lists contribute to
|
|
50122
|
+
* the same category. Keywords are case-insensitive and the `#` is mandatory.
|
|
50123
|
+
* The colon spelling is line-dialect-only; `collectReferenceLists` owns the
|
|
50124
|
+
* per-line composition (whole-line trailer parse first, inline harvest
|
|
50125
|
+
* otherwise), guaranteeing a trailer line is never double-counted. Malformed
|
|
50126
|
+
* candidates are simply skipped. The kit preserves duplicates by contract;
|
|
50127
|
+
* each category dedupes them here (first occurrence wins), mirroring the
|
|
50128
|
+
* PR-body path, so a repeated reference renders one changelog link.
|
|
49644
50129
|
*
|
|
49645
50130
|
* @param commitMessage - The commit message body to parse
|
|
49646
50131
|
* @returns Categorized issue references with numbers as strings (no `#` prefix)
|
|
@@ -49649,20 +50134,23 @@ function extractIssueNumbers(pattern, message) {
|
|
|
49649
50134
|
* ```typescript
|
|
49650
50135
|
* import { parseIssueReferences } from "../utils/issue-refs.js";
|
|
49651
50136
|
*
|
|
49652
|
-
* const refs = parseIssueReferences("feat: add API\n\nCloses #42
|
|
50137
|
+
* const refs = parseIssueReferences("feat: add API\n\nCloses #42, Fixes #17");
|
|
49653
50138
|
* // refs.closes === ["42"]
|
|
49654
|
-
* // refs.fixes === ["17"
|
|
50139
|
+
* // refs.fixes === ["17"]
|
|
49655
50140
|
* // refs.refs === []
|
|
49656
50141
|
* ```
|
|
49657
50142
|
*
|
|
49658
50143
|
* @internal
|
|
49659
50144
|
*/
|
|
49660
50145
|
function parseIssueReferences(commitMessage) {
|
|
49661
|
-
|
|
49662
|
-
closes:
|
|
49663
|
-
fixes:
|
|
49664
|
-
refs:
|
|
50146
|
+
const references = {
|
|
50147
|
+
closes: [],
|
|
50148
|
+
fixes: [],
|
|
50149
|
+
refs: []
|
|
49665
50150
|
};
|
|
50151
|
+
for (const list of collectReferenceLists(commitMessage)) references[categoryOf(list)].push(...list.issueNumbers.map(String));
|
|
50152
|
+
for (const category of Object.keys(references)) references[category] = [...new Set(references[category])];
|
|
50153
|
+
return references;
|
|
49666
50154
|
}
|
|
49667
50155
|
//#endregion
|
|
49668
50156
|
//#region ../silk-effects/dist/dev/pkg/changesets/utils/logger.js
|