@savvy-web/silk-effects 3.1.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changesets/services/deps-regen.js +1 -0
- package/errors/PublishTargetBindingError.js +30 -0
- package/index.d.ts +214 -92
- package/index.js +2 -1
- package/package.json +2 -2
- package/services/SilkPublishability.js +45 -1
|
@@ -250,6 +250,7 @@ function makeShape(pit, inspector, discovery, detector, config, fs) {
|
|
|
250
250
|
const plan = (options) => Effect.gen(function* () {
|
|
251
251
|
const resolvedCwd = resolve(options.cwd);
|
|
252
252
|
const changesetDir = join(resolvedCwd, ".changeset");
|
|
253
|
+
yield* discovery.refresh();
|
|
253
254
|
let fromRef = options.from;
|
|
254
255
|
if (!fromRef) {
|
|
255
256
|
let baseBranch = options.base;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Data } from "effect";
|
|
2
|
+
|
|
3
|
+
//#region src/errors/PublishTargetBindingError.ts
|
|
4
|
+
/**
|
|
5
|
+
* Raised when publishability detection selects a directory that the package's
|
|
6
|
+
* `dist/prod/targets.json` binding does not describe.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* The bundler's prod build writes `targets.json` naming every byte-group
|
|
10
|
+
* directory it produced. Once that binding exists it is authoritative: the only
|
|
11
|
+
* directories whose bytes may be published are the ones it lists. A detector
|
|
12
|
+
* that returns anything else — most often `publishConfig.directory` pointing at
|
|
13
|
+
* a **dev** build, because silk mode was misdetected — is about to pack an
|
|
14
|
+
* unresolved workspace manifest and ship it to a registry.
|
|
15
|
+
*
|
|
16
|
+
* That is the `yaml-effect@0.7.1` failure: detection picked `dist/dev/pkg`, the
|
|
17
|
+
* dev manifest still carried `catalog:` specifiers, and the published package
|
|
18
|
+
* was uninstallable (`EUNSUPPORTEDPROTOCOL`).
|
|
19
|
+
*
|
|
20
|
+
* @since 3.1.0
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
var PublishTargetBindingError = class extends Data.TaggedError("PublishTargetBindingError") {
|
|
24
|
+
get message() {
|
|
25
|
+
return `Package ${this.pkg} resolved publish directory "${this.directory}", which is not one of the directories bound by dist/prod/targets.json (${this.boundDirectories.join(", ")}). This means publishability detection did not select the prod build output — refusing to publish before packing an unresolved manifest.`;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { PublishTargetBindingError };
|
package/index.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ import { Plugin } from "unified";
|
|
|
3
3
|
import { Command, CommandExecutor, FileSystem, Path } from "@effect/platform";
|
|
4
4
|
import { PackageManagerDetector, PointInTimeReadError, PointInTimeWorkspace, PublishConfig, PublishTarget, PublishabilityDetector, TopologicalSorter, WorkspaceDiscovery, WorkspaceDiscoveryError, WorkspacePackage, WorkspaceRoot, WorkspaceStateSnapshot } from "workspaces-effect";
|
|
5
5
|
import { PlatformError } from "@effect/platform/Error";
|
|
6
|
-
|
|
7
|
-
//#region \0rolldown/runtime.js
|
|
8
6
|
//#endregion
|
|
9
7
|
//#region src/changesets/categories/types.d.ts
|
|
10
8
|
/**
|
|
@@ -41,9 +39,13 @@ import { PlatformError } from "@effect/platform/Error";
|
|
|
41
39
|
* @public
|
|
42
40
|
*/
|
|
43
41
|
declare const SectionCategorySchema: Schema.Struct<{
|
|
44
|
-
/** Display heading used in CHANGELOG output. */
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
/** Display heading used in CHANGELOG output. */
|
|
43
|
+
heading: typeof Schema.String;
|
|
44
|
+
/** Priority for ordering (lower = higher priority). */
|
|
45
|
+
priority: typeof Schema.Number;
|
|
46
|
+
/** Conventional commit types that map to this category. */
|
|
47
|
+
commitTypes: Schema.Array$<typeof Schema.String>;
|
|
48
|
+
/** Brief description for documentation. */
|
|
47
49
|
description: typeof Schema.String;
|
|
48
50
|
}>;
|
|
49
51
|
/**
|
|
@@ -1682,10 +1684,15 @@ declare const VersionOrEmptySchema: Schema.filter<typeof Schema.String>;
|
|
|
1682
1684
|
* @public
|
|
1683
1685
|
*/
|
|
1684
1686
|
declare const DependencyTableRowSchema: Schema.Struct<{
|
|
1685
|
-
/** Package or toolchain name. */
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1687
|
+
/** Package or toolchain name. */
|
|
1688
|
+
dependency: Schema.filter<typeof Schema.String>;
|
|
1689
|
+
/** Dependency type. */
|
|
1690
|
+
type: Schema.Literal<["dependency", "devDependency", "peerDependency", "optionalDependency", "workspace", "config"]>;
|
|
1691
|
+
/** Change action. */
|
|
1692
|
+
action: Schema.Literal<["added", "updated", "removed"]>;
|
|
1693
|
+
/** Previous version (em dash for added). */
|
|
1694
|
+
from: Schema.filter<typeof Schema.String>;
|
|
1695
|
+
/** New version (em dash for removed). */
|
|
1689
1696
|
to: Schema.filter<typeof Schema.String>;
|
|
1690
1697
|
}>;
|
|
1691
1698
|
/**
|
|
@@ -1732,10 +1739,15 @@ interface DependencyTableRow extends Schema.Schema.Type<typeof DependencyTableRo
|
|
|
1732
1739
|
* @public
|
|
1733
1740
|
*/
|
|
1734
1741
|
declare const DependencyTableSchema: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
1735
|
-
/** Package or toolchain name. */
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1742
|
+
/** Package or toolchain name. */
|
|
1743
|
+
dependency: Schema.filter<typeof Schema.String>;
|
|
1744
|
+
/** Dependency type. */
|
|
1745
|
+
type: Schema.Literal<["dependency", "devDependency", "peerDependency", "optionalDependency", "workspace", "config"]>;
|
|
1746
|
+
/** Change action. */
|
|
1747
|
+
action: Schema.Literal<["added", "updated", "removed"]>;
|
|
1748
|
+
/** Previous version (em dash for added). */
|
|
1749
|
+
from: Schema.filter<typeof Schema.String>;
|
|
1750
|
+
/** New version (em dash for removed). */
|
|
1739
1751
|
to: Schema.filter<typeof Schema.String>;
|
|
1740
1752
|
}>>>;
|
|
1741
1753
|
//#endregion
|
|
@@ -2097,7 +2109,9 @@ declare class ChangesetLinter {
|
|
|
2097
2109
|
* @public
|
|
2098
2110
|
*/
|
|
2099
2111
|
declare const MaintenanceTriggerSchema: Schema.Struct<{
|
|
2100
|
-
/** Package name of the triggering co-member. */
|
|
2112
|
+
/** Package name of the triggering co-member. */
|
|
2113
|
+
name: typeof Schema.String;
|
|
2114
|
+
/** The co-member's new version in the same release plan. */
|
|
2101
2115
|
version: typeof Schema.String;
|
|
2102
2116
|
}>;
|
|
2103
2117
|
/**
|
|
@@ -2112,9 +2126,13 @@ type MaintenanceTrigger = typeof MaintenanceTriggerSchema.Type;
|
|
|
2112
2126
|
* @public
|
|
2113
2127
|
*/
|
|
2114
2128
|
declare const MaintenanceReasonSchema: Schema.Struct<{
|
|
2115
|
-
/** Coupling that forced the release; `"unspecified"` when undetermined. */
|
|
2129
|
+
/** Coupling that forced the release; `"unspecified"` when undetermined. */
|
|
2130
|
+
kind: Schema.Literal<["fixed", "linked", "unspecified"]>;
|
|
2131
|
+
/** Triggering co-members; empty for `"unspecified"`. */
|
|
2116
2132
|
triggers: Schema.Array$<Schema.Struct<{
|
|
2117
|
-
/** Package name of the triggering co-member. */
|
|
2133
|
+
/** Package name of the triggering co-member. */
|
|
2134
|
+
name: typeof Schema.String;
|
|
2135
|
+
/** The co-member's new version in the same release plan. */
|
|
2118
2136
|
version: typeof Schema.String;
|
|
2119
2137
|
}>>;
|
|
2120
2138
|
}>;
|
|
@@ -2311,7 +2329,7 @@ declare const changelogFunctions: ChangelogFunctions;
|
|
|
2311
2329
|
*
|
|
2312
2330
|
* @internal
|
|
2313
2331
|
*/
|
|
2314
|
-
declare const ChangesetValidationErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
2332
|
+
declare const ChangesetValidationErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2315
2333
|
readonly _tag: "ChangesetValidationError";
|
|
2316
2334
|
} & Readonly<A>;
|
|
2317
2335
|
/**
|
|
@@ -2345,9 +2363,13 @@ declare const ChangesetValidationErrorBase: new <A extends Record<string, any> =
|
|
|
2345
2363
|
* @public
|
|
2346
2364
|
*/
|
|
2347
2365
|
declare class ChangesetValidationError extends ChangesetValidationErrorBase<{
|
|
2348
|
-
/** File path of the changeset that failed validation. */
|
|
2366
|
+
/** File path of the changeset that failed validation. */
|
|
2367
|
+
readonly file?: string | undefined;
|
|
2368
|
+
/** Individual validation issues found. */
|
|
2349
2369
|
readonly issues: ReadonlyArray<{
|
|
2350
|
-
/** JSON-path to the problematic field. */
|
|
2370
|
+
/** JSON-path to the problematic field. */
|
|
2371
|
+
readonly path: string;
|
|
2372
|
+
/** Human-readable description of the issue. */
|
|
2351
2373
|
readonly message: string;
|
|
2352
2374
|
}>;
|
|
2353
2375
|
}> {
|
|
@@ -2363,7 +2385,7 @@ declare class ChangesetValidationError extends ChangesetValidationErrorBase<{
|
|
|
2363
2385
|
*
|
|
2364
2386
|
* @internal
|
|
2365
2387
|
*/
|
|
2366
|
-
declare const GitHubApiErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
2388
|
+
declare const GitHubApiErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2367
2389
|
readonly _tag: "GitHubApiError";
|
|
2368
2390
|
} & Readonly<A>;
|
|
2369
2391
|
/**
|
|
@@ -2399,8 +2421,11 @@ declare const GitHubApiErrorBase: new <A extends Record<string, any> = {}>(args:
|
|
|
2399
2421
|
* @public
|
|
2400
2422
|
*/
|
|
2401
2423
|
declare class GitHubApiError extends GitHubApiErrorBase<{
|
|
2402
|
-
/** The API operation that failed (e.g., `"getInfo"`). */
|
|
2403
|
-
readonly
|
|
2424
|
+
/** The API operation that failed (e.g., `"getInfo"`). */
|
|
2425
|
+
readonly operation: string;
|
|
2426
|
+
/** HTTP status code, if available. */
|
|
2427
|
+
readonly statusCode?: number | undefined;
|
|
2428
|
+
/** Human-readable failure reason. */
|
|
2404
2429
|
readonly reason: string;
|
|
2405
2430
|
}> {
|
|
2406
2431
|
get message(): string;
|
|
@@ -2419,7 +2444,7 @@ declare class GitHubApiError extends GitHubApiErrorBase<{
|
|
|
2419
2444
|
*
|
|
2420
2445
|
* @internal
|
|
2421
2446
|
*/
|
|
2422
|
-
declare const MarkdownParseErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
2447
|
+
declare const MarkdownParseErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2423
2448
|
readonly _tag: "MarkdownParseError";
|
|
2424
2449
|
} & Readonly<A>;
|
|
2425
2450
|
/**
|
|
@@ -2450,9 +2475,13 @@ declare const MarkdownParseErrorBase: new <A extends Record<string, any> = {}>(a
|
|
|
2450
2475
|
* @public
|
|
2451
2476
|
*/
|
|
2452
2477
|
declare class MarkdownParseError extends MarkdownParseErrorBase<{
|
|
2453
|
-
/** Source file path, if known. */
|
|
2454
|
-
readonly
|
|
2455
|
-
|
|
2478
|
+
/** Source file path, if known. */
|
|
2479
|
+
readonly source?: string | undefined;
|
|
2480
|
+
/** Human-readable failure reason. */
|
|
2481
|
+
readonly reason: string;
|
|
2482
|
+
/** Line number where the error occurred (1-based). */
|
|
2483
|
+
readonly line?: number | undefined;
|
|
2484
|
+
/** Column number where the error occurred (1-based). */
|
|
2456
2485
|
readonly column?: number | undefined;
|
|
2457
2486
|
}> {
|
|
2458
2487
|
get message(): string;
|
|
@@ -2467,7 +2496,7 @@ declare class MarkdownParseError extends MarkdownParseErrorBase<{
|
|
|
2467
2496
|
*
|
|
2468
2497
|
* @internal
|
|
2469
2498
|
*/
|
|
2470
|
-
declare const ConfigurationErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
2499
|
+
declare const ConfigurationErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2471
2500
|
readonly _tag: "ConfigurationError";
|
|
2472
2501
|
} & Readonly<A>;
|
|
2473
2502
|
/**
|
|
@@ -2498,7 +2527,9 @@ declare const ConfigurationErrorBase: new <A extends Record<string, any> = {}>(a
|
|
|
2498
2527
|
* @public
|
|
2499
2528
|
*/
|
|
2500
2529
|
declare class ConfigurationError extends ConfigurationErrorBase<{
|
|
2501
|
-
/** Configuration field that is invalid or missing. */
|
|
2530
|
+
/** Configuration field that is invalid or missing. */
|
|
2531
|
+
readonly field: string;
|
|
2532
|
+
/** Human-readable failure reason. */
|
|
2502
2533
|
readonly reason: string;
|
|
2503
2534
|
}> {
|
|
2504
2535
|
get message(): string;
|
|
@@ -2513,7 +2544,7 @@ declare class ConfigurationError extends ConfigurationErrorBase<{
|
|
|
2513
2544
|
*
|
|
2514
2545
|
* @internal
|
|
2515
2546
|
*/
|
|
2516
|
-
declare const VersionFileErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
2547
|
+
declare const VersionFileErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2517
2548
|
readonly _tag: "VersionFileError";
|
|
2518
2549
|
} & Readonly<A>;
|
|
2519
2550
|
/**
|
|
@@ -2549,8 +2580,11 @@ declare const VersionFileErrorBase: new <A extends Record<string, any> = {}>(arg
|
|
|
2549
2580
|
* @public
|
|
2550
2581
|
*/
|
|
2551
2582
|
declare class VersionFileError extends VersionFileErrorBase<{
|
|
2552
|
-
/** Absolute path to the file that failed. */
|
|
2553
|
-
readonly
|
|
2583
|
+
/** Absolute path to the file that failed. */
|
|
2584
|
+
readonly filePath: string;
|
|
2585
|
+
/** JSONPath expression that failed, if applicable. */
|
|
2586
|
+
readonly jsonPath?: string | undefined;
|
|
2587
|
+
/** Human-readable failure reason. */
|
|
2554
2588
|
readonly reason: string;
|
|
2555
2589
|
}> {
|
|
2556
2590
|
get message(): string;
|
|
@@ -2564,7 +2598,7 @@ declare class VersionFileError extends VersionFileErrorBase<{
|
|
|
2564
2598
|
*
|
|
2565
2599
|
* @internal
|
|
2566
2600
|
*/
|
|
2567
|
-
declare const GitErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
2601
|
+
declare const GitErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2568
2602
|
readonly _tag: "GitError";
|
|
2569
2603
|
} & Readonly<A>;
|
|
2570
2604
|
/**
|
|
@@ -2596,8 +2630,11 @@ declare const GitErrorBase: new <A extends Record<string, any> = {}>(args: impor
|
|
|
2596
2630
|
* @public
|
|
2597
2631
|
*/
|
|
2598
2632
|
declare class GitError extends GitErrorBase<{
|
|
2599
|
-
/** The git command that failed, including arguments. */
|
|
2600
|
-
readonly
|
|
2633
|
+
/** The git command that failed, including arguments. */
|
|
2634
|
+
readonly command: string;
|
|
2635
|
+
/** Working directory in which the command was invoked. */
|
|
2636
|
+
readonly cwd: string;
|
|
2637
|
+
/** Human-readable failure reason — typically the captured stderr or thrown error message. */
|
|
2601
2638
|
readonly reason: string;
|
|
2602
2639
|
}> {
|
|
2603
2640
|
get message(): string;
|
|
@@ -2611,7 +2648,7 @@ declare class GitError extends GitErrorBase<{
|
|
|
2611
2648
|
*
|
|
2612
2649
|
* @internal
|
|
2613
2650
|
*/
|
|
2614
|
-
declare const ChangesetIOErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
2651
|
+
declare const ChangesetIOErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2615
2652
|
readonly _tag: "ChangesetIOError";
|
|
2616
2653
|
} & Readonly<A>;
|
|
2617
2654
|
/**
|
|
@@ -2643,8 +2680,11 @@ declare const ChangesetIOErrorBase: new <A extends Record<string, any> = {}>(arg
|
|
|
2643
2680
|
* @public
|
|
2644
2681
|
*/
|
|
2645
2682
|
declare class ChangesetIOError extends ChangesetIOErrorBase<{
|
|
2646
|
-
/** Absolute path of the file or directory the operation targeted. */
|
|
2647
|
-
readonly
|
|
2683
|
+
/** Absolute path of the file or directory the operation targeted. */
|
|
2684
|
+
readonly path: string;
|
|
2685
|
+
/** The failed operation. */
|
|
2686
|
+
readonly operation: "read" | "write" | "delete" | "list";
|
|
2687
|
+
/** Human-readable failure reason. */
|
|
2648
2688
|
readonly reason: string;
|
|
2649
2689
|
}> {
|
|
2650
2690
|
get message(): string;
|
|
@@ -2657,7 +2697,7 @@ declare class ChangesetIOError extends ChangesetIOErrorBase<{
|
|
|
2657
2697
|
*
|
|
2658
2698
|
* @internal
|
|
2659
2699
|
*/
|
|
2660
|
-
declare const ReleasePlanErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
2700
|
+
declare const ReleasePlanErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2661
2701
|
readonly _tag: "ReleasePlanError";
|
|
2662
2702
|
} & Readonly<A>;
|
|
2663
2703
|
/**
|
|
@@ -2671,14 +2711,16 @@ declare const ReleasePlanErrorBase: new <A extends Record<string, any> = {}>(arg
|
|
|
2671
2711
|
* @public
|
|
2672
2712
|
*/
|
|
2673
2713
|
declare class ReleasePlanError extends ReleasePlanErrorBase<{
|
|
2674
|
-
/** The phase that failed. */
|
|
2714
|
+
/** The phase that failed. */
|
|
2715
|
+
readonly phase: "plan" | "preview" | "apply";
|
|
2716
|
+
/** Human-readable failure reason. */
|
|
2675
2717
|
readonly reason: string;
|
|
2676
2718
|
}> {
|
|
2677
2719
|
get message(): string;
|
|
2678
2720
|
}
|
|
2679
2721
|
//#endregion
|
|
2680
2722
|
//#region src/errors/ChangesetConfigError.d.ts
|
|
2681
|
-
declare const ChangesetConfigError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
2723
|
+
declare const ChangesetConfigError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
2682
2724
|
readonly _tag: "ChangesetConfigError";
|
|
2683
2725
|
} & Readonly<A>;
|
|
2684
2726
|
/**
|
|
@@ -3197,10 +3239,15 @@ declare const RepoSchema: Schema.filter<typeof Schema.String>;
|
|
|
3197
3239
|
* @public
|
|
3198
3240
|
*/
|
|
3199
3241
|
declare const ChangesetOptionsSchema: Schema.filter<Schema.Struct<{
|
|
3200
|
-
/** GitHub repository in `owner/repo` format. */
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3242
|
+
/** GitHub repository in `owner/repo` format. */
|
|
3243
|
+
repo: Schema.filter<typeof Schema.String>;
|
|
3244
|
+
/** Whether to include commit hash links in output. */
|
|
3245
|
+
commitLinks: Schema.optional<typeof Schema.Boolean>;
|
|
3246
|
+
/** Whether to include pull request links in output. */
|
|
3247
|
+
prLinks: Schema.optional<typeof Schema.Boolean>;
|
|
3248
|
+
/** Whether to include issue reference links in output. */
|
|
3249
|
+
issueLinks: Schema.optional<typeof Schema.Boolean>;
|
|
3250
|
+
/** Custom issue reference prefixes (e.g., `["#", "GH-"]`). */
|
|
3204
3251
|
issuePrefixes: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
3205
3252
|
/**
|
|
3206
3253
|
* Per-package release surfaces. Each entry declares `additionalScopes`
|
|
@@ -3271,8 +3318,11 @@ interface GitHubCommitInfo {
|
|
|
3271
3318
|
pull: number | null;
|
|
3272
3319
|
/** Markdown-formatted links for the commit, PR, and user. */
|
|
3273
3320
|
links: {
|
|
3274
|
-
/** Link to the commit on GitHub. */
|
|
3275
|
-
|
|
3321
|
+
/** Link to the commit on GitHub. */
|
|
3322
|
+
commit: string;
|
|
3323
|
+
/** Link to the associated pull request (null if none). */
|
|
3324
|
+
pull: string | null;
|
|
3325
|
+
/** Link to the author's GitHub profile (null if unknown). */
|
|
3276
3326
|
user: string | null;
|
|
3277
3327
|
};
|
|
3278
3328
|
}
|
|
@@ -4063,8 +4113,11 @@ declare const ChangesetSummarySchema: Schema.filter<Schema.filter<typeof Schema.
|
|
|
4063
4113
|
* @public
|
|
4064
4114
|
*/
|
|
4065
4115
|
declare const ChangesetSchema: Schema.Struct<{
|
|
4066
|
-
/** The changeset summary text. */
|
|
4067
|
-
|
|
4116
|
+
/** The changeset summary text. */
|
|
4117
|
+
summary: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
4118
|
+
/** Unique changeset identifier. */
|
|
4119
|
+
id: typeof Schema.String;
|
|
4120
|
+
/** Git commit hash associated with this changeset. */
|
|
4068
4121
|
commit: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
4069
4122
|
}>;
|
|
4070
4123
|
/**
|
|
@@ -4141,9 +4194,13 @@ type DependencyType = typeof DependencyTypeSchema.Type;
|
|
|
4141
4194
|
* @public
|
|
4142
4195
|
*/
|
|
4143
4196
|
declare const DependencyUpdateSchema: Schema.Struct<{
|
|
4144
|
-
/** Package name (must be non-empty). */
|
|
4145
|
-
|
|
4146
|
-
|
|
4197
|
+
/** Package name (must be non-empty). */
|
|
4198
|
+
name: Schema.refine<string, typeof Schema.String>;
|
|
4199
|
+
/** npm dependency type. */
|
|
4200
|
+
type: Schema.Literal<["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"]>;
|
|
4201
|
+
/** Previous version string. */
|
|
4202
|
+
oldVersion: typeof Schema.String;
|
|
4203
|
+
/** New version string. */
|
|
4147
4204
|
newVersion: typeof Schema.String;
|
|
4148
4205
|
}>;
|
|
4149
4206
|
/**
|
|
@@ -4346,11 +4403,17 @@ declare const UrlOrMarkdownLinkSchema: Schema.filter<typeof Schema.String>;
|
|
|
4346
4403
|
* @public
|
|
4347
4404
|
*/
|
|
4348
4405
|
declare const GitHubInfoSchema: Schema.Struct<{
|
|
4349
|
-
/** GitHub username of the commit author. */
|
|
4350
|
-
|
|
4406
|
+
/** GitHub username of the commit author. */
|
|
4407
|
+
user: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
4408
|
+
/** Pull request number associated with the commit. */
|
|
4409
|
+
pull: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
|
|
4410
|
+
/** Markdown-formatted links. */
|
|
4351
4411
|
links: Schema.Struct<{
|
|
4352
|
-
/** Link to the commit. */
|
|
4353
|
-
|
|
4412
|
+
/** Link to the commit. */
|
|
4413
|
+
commit: Schema.filter<typeof Schema.String>;
|
|
4414
|
+
/** Link to the associated pull request. */
|
|
4415
|
+
pull: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
4416
|
+
/** Link to the author's GitHub profile. */
|
|
4354
4417
|
user: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
4355
4418
|
}>;
|
|
4356
4419
|
}>;
|
|
@@ -4428,7 +4491,9 @@ declare const GlobSchema: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
|
4428
4491
|
* @public
|
|
4429
4492
|
*/
|
|
4430
4493
|
declare const PackageScopeSchema: Schema.Struct<{
|
|
4431
|
-
/** Repo-relative globs naming files outside the package's workspace directory that belong to its release surface. */
|
|
4494
|
+
/** Repo-relative globs naming files outside the package's workspace directory that belong to its release surface. */
|
|
4495
|
+
additionalScopes: Schema.optional<Schema.Array$<Schema.filter<Schema.filter<typeof Schema.String>>>>;
|
|
4496
|
+
/** Files whose JSON fields are bumped in lockstep with this package's version. */
|
|
4432
4497
|
versionFiles: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
4433
4498
|
glob: Schema.filter<typeof Schema.String>;
|
|
4434
4499
|
paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
|
|
@@ -4452,7 +4517,9 @@ interface PackageScope extends Schema.Schema.Type<typeof PackageScopeSchema> {}
|
|
|
4452
4517
|
* @public
|
|
4453
4518
|
*/
|
|
4454
4519
|
declare const PackagesRecordSchema: Schema.Record$<typeof Schema.String, Schema.Struct<{
|
|
4455
|
-
/** Repo-relative globs naming files outside the package's workspace directory that belong to its release surface. */
|
|
4520
|
+
/** Repo-relative globs naming files outside the package's workspace directory that belong to its release surface. */
|
|
4521
|
+
additionalScopes: Schema.optional<Schema.Array$<Schema.filter<Schema.filter<typeof Schema.String>>>>;
|
|
4522
|
+
/** Files whose JSON fields are bumped in lockstep with this package's version. */
|
|
4456
4523
|
versionFiles: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
4457
4524
|
glob: Schema.filter<typeof Schema.String>;
|
|
4458
4525
|
paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
|
|
@@ -4570,7 +4637,9 @@ declare const JsonPathSchema: Schema.filter<typeof Schema.String>;
|
|
|
4570
4637
|
* @public
|
|
4571
4638
|
*/
|
|
4572
4639
|
declare const VersionFileConfigSchema: Schema.Struct<{
|
|
4573
|
-
/** Glob pattern to match JSON files. */
|
|
4640
|
+
/** Glob pattern to match JSON files. */
|
|
4641
|
+
glob: Schema.filter<typeof Schema.String>;
|
|
4642
|
+
/** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
|
|
4574
4643
|
paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
|
|
4575
4644
|
}>;
|
|
4576
4645
|
/**
|
|
@@ -4585,7 +4654,9 @@ interface VersionFileConfig extends Schema.Schema.Type<typeof VersionFileConfigS
|
|
|
4585
4654
|
* @public
|
|
4586
4655
|
*/
|
|
4587
4656
|
declare const VersionFilesSchema: Schema.Array$<Schema.Struct<{
|
|
4588
|
-
/** Glob pattern to match JSON files. */
|
|
4657
|
+
/** Glob pattern to match JSON files. */
|
|
4658
|
+
glob: Schema.filter<typeof Schema.String>;
|
|
4659
|
+
/** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
|
|
4589
4660
|
paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
|
|
4590
4661
|
}>>;
|
|
4591
4662
|
/**
|
|
@@ -4623,8 +4694,11 @@ declare const VersionFilesSchema: Schema.Array$<Schema.Struct<{
|
|
|
4623
4694
|
* @public
|
|
4624
4695
|
*/
|
|
4625
4696
|
declare const LegacyVersionFileConfigSchema: Schema.Struct<{
|
|
4626
|
-
/** Glob pattern to match JSON files. */
|
|
4627
|
-
|
|
4697
|
+
/** Glob pattern to match JSON files. */
|
|
4698
|
+
glob: Schema.filter<typeof Schema.String>;
|
|
4699
|
+
/** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
|
|
4700
|
+
paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
|
|
4701
|
+
/** Workspace package name to source the version from, bypassing path-based resolution. */
|
|
4628
4702
|
package: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
4629
4703
|
}>;
|
|
4630
4704
|
/**
|
|
@@ -4644,8 +4718,11 @@ interface LegacyVersionFileConfig extends Schema.Schema.Type<typeof LegacyVersio
|
|
|
4644
4718
|
* @public
|
|
4645
4719
|
*/
|
|
4646
4720
|
declare const LegacyVersionFilesSchema: Schema.Array$<Schema.Struct<{
|
|
4647
|
-
/** Glob pattern to match JSON files. */
|
|
4648
|
-
|
|
4721
|
+
/** Glob pattern to match JSON files. */
|
|
4722
|
+
glob: Schema.filter<typeof Schema.String>;
|
|
4723
|
+
/** JSONPath expressions to locate version fields. Defaults to `["$.version"]`. */
|
|
4724
|
+
paths: Schema.optional<Schema.Array$<Schema.filter<typeof Schema.String>>>;
|
|
4725
|
+
/** Workspace package name to source the version from, bypassing path-based resolution. */
|
|
4649
4726
|
package: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
4650
4727
|
}>>;
|
|
4651
4728
|
//#endregion
|
|
@@ -6564,7 +6641,7 @@ declare class CommitlintConfig {
|
|
|
6564
6641
|
}
|
|
6565
6642
|
//#endregion
|
|
6566
6643
|
//#region src/errors/BiomeSyncError.d.ts
|
|
6567
|
-
declare const BiomeSyncError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6644
|
+
declare const BiomeSyncError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6568
6645
|
readonly _tag: "BiomeSyncError";
|
|
6569
6646
|
} & Readonly<A>;
|
|
6570
6647
|
/**
|
|
@@ -6586,7 +6663,7 @@ declare class BiomeSyncError extends BiomeSyncError_base<{
|
|
|
6586
6663
|
}
|
|
6587
6664
|
//#endregion
|
|
6588
6665
|
//#region src/errors/ConfigNotFoundError.d.ts
|
|
6589
|
-
declare const ConfigNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6666
|
+
declare const ConfigNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6590
6667
|
readonly _tag: "ConfigNotFoundError";
|
|
6591
6668
|
} & Readonly<A>;
|
|
6592
6669
|
/**
|
|
@@ -6607,8 +6684,42 @@ declare class ConfigNotFoundError extends ConfigNotFoundError_base<{
|
|
|
6607
6684
|
get message(): string;
|
|
6608
6685
|
}
|
|
6609
6686
|
//#endregion
|
|
6687
|
+
//#region src/errors/PublishTargetBindingError.d.ts
|
|
6688
|
+
declare const PublishTargetBindingError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6689
|
+
readonly _tag: "PublishTargetBindingError";
|
|
6690
|
+
} & Readonly<A>;
|
|
6691
|
+
/**
|
|
6692
|
+
* Raised when publishability detection selects a directory that the package's
|
|
6693
|
+
* `dist/prod/targets.json` binding does not describe.
|
|
6694
|
+
*
|
|
6695
|
+
* @remarks
|
|
6696
|
+
* The bundler's prod build writes `targets.json` naming every byte-group
|
|
6697
|
+
* directory it produced. Once that binding exists it is authoritative: the only
|
|
6698
|
+
* directories whose bytes may be published are the ones it lists. A detector
|
|
6699
|
+
* that returns anything else — most often `publishConfig.directory` pointing at
|
|
6700
|
+
* a **dev** build, because silk mode was misdetected — is about to pack an
|
|
6701
|
+
* unresolved workspace manifest and ship it to a registry.
|
|
6702
|
+
*
|
|
6703
|
+
* That is the `yaml-effect@0.7.1` failure: detection picked `dist/dev/pkg`, the
|
|
6704
|
+
* dev manifest still carried `catalog:` specifiers, and the published package
|
|
6705
|
+
* was uninstallable (`EUNSUPPORTEDPROTOCOL`).
|
|
6706
|
+
*
|
|
6707
|
+
* @since 3.1.0
|
|
6708
|
+
* @public
|
|
6709
|
+
*/
|
|
6710
|
+
declare class PublishTargetBindingError extends PublishTargetBindingError_base<{
|
|
6711
|
+
/** The package whose targets were being resolved. */
|
|
6712
|
+
readonly pkg: string;
|
|
6713
|
+
/** The directory detection selected, relative to the package root. */
|
|
6714
|
+
readonly directory: string;
|
|
6715
|
+
/** The group directories the prod binding actually describes. */
|
|
6716
|
+
readonly boundDirectories: ReadonlyArray<string>;
|
|
6717
|
+
}> {
|
|
6718
|
+
get message(): string;
|
|
6719
|
+
}
|
|
6720
|
+
//#endregion
|
|
6610
6721
|
//#region src/errors/SectionParseError.d.ts
|
|
6611
|
-
declare const SectionParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6722
|
+
declare const SectionParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6612
6723
|
readonly _tag: "SectionParseError";
|
|
6613
6724
|
} & Readonly<A>;
|
|
6614
6725
|
/**
|
|
@@ -6625,7 +6736,7 @@ declare class SectionParseError extends SectionParseError_base<{
|
|
|
6625
6736
|
}
|
|
6626
6737
|
//#endregion
|
|
6627
6738
|
//#region src/errors/SectionValidationError.d.ts
|
|
6628
|
-
declare const SectionValidationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6739
|
+
declare const SectionValidationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6629
6740
|
readonly _tag: "SectionValidationError";
|
|
6630
6741
|
} & Readonly<A>;
|
|
6631
6742
|
/**
|
|
@@ -6642,7 +6753,7 @@ declare class SectionValidationError extends SectionValidationError_base<{
|
|
|
6642
6753
|
}
|
|
6643
6754
|
//#endregion
|
|
6644
6755
|
//#region src/errors/SectionWriteError.d.ts
|
|
6645
|
-
declare const SectionWriteError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6756
|
+
declare const SectionWriteError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6646
6757
|
readonly _tag: "SectionWriteError";
|
|
6647
6758
|
} & Readonly<A>;
|
|
6648
6759
|
/**
|
|
@@ -6659,7 +6770,7 @@ declare class SectionWriteError extends SectionWriteError_base<{
|
|
|
6659
6770
|
}
|
|
6660
6771
|
//#endregion
|
|
6661
6772
|
//#region src/errors/TagFormatError.d.ts
|
|
6662
|
-
declare const TagFormatError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6773
|
+
declare const TagFormatError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6663
6774
|
readonly _tag: "TagFormatError";
|
|
6664
6775
|
} & Readonly<A>;
|
|
6665
6776
|
/**
|
|
@@ -6681,7 +6792,7 @@ declare class TagFormatError extends TagFormatError_base<{
|
|
|
6681
6792
|
}
|
|
6682
6793
|
//#endregion
|
|
6683
6794
|
//#region src/errors/ToolNotFoundError.d.ts
|
|
6684
|
-
declare const ToolNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6795
|
+
declare const ToolNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6685
6796
|
readonly _tag: "ToolNotFoundError";
|
|
6686
6797
|
} & Readonly<A>;
|
|
6687
6798
|
/** @public */
|
|
@@ -6693,7 +6804,7 @@ declare class ToolNotFoundError extends ToolNotFoundError_base<{
|
|
|
6693
6804
|
}
|
|
6694
6805
|
//#endregion
|
|
6695
6806
|
//#region src/errors/ToolResolutionError.d.ts
|
|
6696
|
-
declare const ToolResolutionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6807
|
+
declare const ToolResolutionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6697
6808
|
readonly _tag: "ToolResolutionError";
|
|
6698
6809
|
} & Readonly<A>;
|
|
6699
6810
|
/** @public */
|
|
@@ -6705,7 +6816,7 @@ declare class ToolResolutionError extends ToolResolutionError_base<{
|
|
|
6705
6816
|
}
|
|
6706
6817
|
//#endregion
|
|
6707
6818
|
//#region src/errors/ToolVersionMismatchError.d.ts
|
|
6708
|
-
declare const ToolVersionMismatchError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6819
|
+
declare const ToolVersionMismatchError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6709
6820
|
readonly _tag: "ToolVersionMismatchError";
|
|
6710
6821
|
} & Readonly<A>;
|
|
6711
6822
|
/** @public */
|
|
@@ -6718,7 +6829,7 @@ declare class ToolVersionMismatchError extends ToolVersionMismatchError_base<{
|
|
|
6718
6829
|
}
|
|
6719
6830
|
//#endregion
|
|
6720
6831
|
//#region src/errors/VersioningDetectionError.d.ts
|
|
6721
|
-
declare const VersioningDetectionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6832
|
+
declare const VersioningDetectionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6722
6833
|
readonly _tag: "VersioningDetectionError";
|
|
6723
6834
|
} & Readonly<A>;
|
|
6724
6835
|
/**
|
|
@@ -6738,7 +6849,7 @@ declare class VersioningDetectionError extends VersioningDetectionError_base<{
|
|
|
6738
6849
|
}
|
|
6739
6850
|
//#endregion
|
|
6740
6851
|
//#region src/errors/WorkspaceAnalysisError.d.ts
|
|
6741
|
-
declare const WorkspaceAnalysisError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
6852
|
+
declare const WorkspaceAnalysisError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
6742
6853
|
readonly _tag: "WorkspaceAnalysisError";
|
|
6743
6854
|
} & Readonly<A>;
|
|
6744
6855
|
/**
|
|
@@ -8108,7 +8219,7 @@ declare const SectionDiff: {
|
|
|
8108
8219
|
readonly Unchanged: (args: {
|
|
8109
8220
|
readonly _tag: "Unchanged";
|
|
8110
8221
|
}) => any;
|
|
8111
|
-
}>(cases: Cases & { [K in Exclude<keyof Cases, "Changed" | "Unchanged">]: never }): (value: {
|
|
8222
|
+
}>(cases: Cases & { [K in Exclude<keyof Cases, "Changed" | "Unchanged">]: never; }): (value: {
|
|
8112
8223
|
readonly _tag: "Changed";
|
|
8113
8224
|
readonly added: ReadonlyArray<string>;
|
|
8114
8225
|
readonly removed: ReadonlyArray<string>;
|
|
@@ -8130,7 +8241,7 @@ declare const SectionDiff: {
|
|
|
8130
8241
|
readonly removed: ReadonlyArray<string>;
|
|
8131
8242
|
} | {
|
|
8132
8243
|
readonly _tag: "Unchanged";
|
|
8133
|
-
}, cases: Cases & { [K in Exclude<keyof Cases, "Changed" | "Unchanged">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Changed" | "Unchanged"]>>;
|
|
8244
|
+
}, cases: Cases & { [K in Exclude<keyof Cases, "Changed" | "Unchanged">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Changed" | "Unchanged"]>>;
|
|
8134
8245
|
};
|
|
8135
8246
|
readonly Changed: Data.Case.Constructor<{
|
|
8136
8247
|
readonly _tag: "Changed";
|
|
@@ -8190,7 +8301,7 @@ declare const SyncResult: {
|
|
|
8190
8301
|
readonly _tag: "Updated";
|
|
8191
8302
|
readonly diff: SectionDiff;
|
|
8192
8303
|
}) => any;
|
|
8193
|
-
}>(cases: Cases & { [K in Exclude<keyof Cases, "Created" | "Unchanged" | "Updated">]: never }): (value: {
|
|
8304
|
+
}>(cases: Cases & { [K in Exclude<keyof Cases, "Created" | "Unchanged" | "Updated">]: never; }): (value: {
|
|
8194
8305
|
readonly _tag: "Created";
|
|
8195
8306
|
} | {
|
|
8196
8307
|
readonly _tag: "Unchanged";
|
|
@@ -8216,7 +8327,7 @@ declare const SyncResult: {
|
|
|
8216
8327
|
} | {
|
|
8217
8328
|
readonly _tag: "Updated";
|
|
8218
8329
|
readonly diff: SectionDiff;
|
|
8219
|
-
}, cases: Cases & { [K in Exclude<keyof Cases, "Created" | "Unchanged" | "Updated">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Created" | "Unchanged" | "Updated"]>>;
|
|
8330
|
+
}, cases: Cases & { [K in Exclude<keyof Cases, "Created" | "Unchanged" | "Updated">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Created" | "Unchanged" | "Updated"]>>;
|
|
8220
8331
|
};
|
|
8221
8332
|
readonly Created: Data.Case.Constructor<{
|
|
8222
8333
|
readonly _tag: "Created";
|
|
@@ -8273,7 +8384,7 @@ declare const CheckResult: {
|
|
|
8273
8384
|
readonly NotFound: (args: {
|
|
8274
8385
|
readonly _tag: "NotFound";
|
|
8275
8386
|
}) => any;
|
|
8276
|
-
}>(cases: Cases & { [K in Exclude<keyof Cases, "Found" | "NotFound">]: never }): (value: {
|
|
8387
|
+
}>(cases: Cases & { [K in Exclude<keyof Cases, "Found" | "NotFound">]: never; }): (value: {
|
|
8277
8388
|
readonly _tag: "Found";
|
|
8278
8389
|
readonly isUpToDate: boolean;
|
|
8279
8390
|
readonly diff: SectionDiff;
|
|
@@ -8295,7 +8406,7 @@ declare const CheckResult: {
|
|
|
8295
8406
|
readonly diff: SectionDiff;
|
|
8296
8407
|
} | {
|
|
8297
8408
|
readonly _tag: "NotFound";
|
|
8298
|
-
}, cases: Cases & { [K in Exclude<keyof Cases, "Found" | "NotFound">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Found" | "NotFound"]>>;
|
|
8409
|
+
}, cases: Cases & { [K in Exclude<keyof Cases, "Found" | "NotFound">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Found" | "NotFound"]>>;
|
|
8299
8410
|
};
|
|
8300
8411
|
readonly Found: Data.Case.Constructor<{
|
|
8301
8412
|
readonly _tag: "Found";
|
|
@@ -8983,7 +9094,7 @@ declare const VersionExtractor: {
|
|
|
8983
9094
|
readonly None: (args: {
|
|
8984
9095
|
readonly _tag: "None";
|
|
8985
9096
|
}) => any;
|
|
8986
|
-
}>(cases: Cases & { [K in Exclude<keyof Cases, "Flag" | "Json" | "None">]: never }): (value: {
|
|
9097
|
+
}>(cases: Cases & { [K in Exclude<keyof Cases, "Flag" | "Json" | "None">]: never; }): (value: {
|
|
8987
9098
|
readonly _tag: "Flag";
|
|
8988
9099
|
readonly flag: string;
|
|
8989
9100
|
readonly parse?: ((output: string) => string) | undefined | undefined;
|
|
@@ -9018,7 +9129,7 @@ declare const VersionExtractor: {
|
|
|
9018
9129
|
readonly path: string;
|
|
9019
9130
|
} | {
|
|
9020
9131
|
readonly _tag: "None";
|
|
9021
|
-
}, cases: Cases & { [K in Exclude<keyof Cases, "Flag" | "Json" | "None">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Flag" | "Json" | "None"]>>;
|
|
9132
|
+
}, cases: Cases & { [K in Exclude<keyof Cases, "Flag" | "Json" | "None">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Flag" | "Json" | "None"]>>;
|
|
9022
9133
|
};
|
|
9023
9134
|
readonly Flag: Data.Case.Constructor<{
|
|
9024
9135
|
readonly _tag: "Flag";
|
|
@@ -9087,7 +9198,7 @@ declare const ResolutionPolicy: {
|
|
|
9087
9198
|
readonly RequireMatch: (args: {
|
|
9088
9199
|
readonly _tag: "RequireMatch";
|
|
9089
9200
|
}) => any;
|
|
9090
|
-
}>(cases: Cases & { [K in Exclude<keyof Cases, "PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch">]: never }): (value: {
|
|
9201
|
+
}>(cases: Cases & { [K in Exclude<keyof Cases, "PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch">]: never; }): (value: {
|
|
9091
9202
|
readonly _tag: "PreferGlobal";
|
|
9092
9203
|
} | {
|
|
9093
9204
|
readonly _tag: "PreferLocal";
|
|
@@ -9117,7 +9228,7 @@ declare const ResolutionPolicy: {
|
|
|
9117
9228
|
readonly _tag: "Report";
|
|
9118
9229
|
} | {
|
|
9119
9230
|
readonly _tag: "RequireMatch";
|
|
9120
|
-
}, cases: Cases & { [K in Exclude<keyof Cases, "PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch">]: never }): import("effect/Unify").Unify<ReturnType<Cases["PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch"]>>;
|
|
9231
|
+
}, cases: Cases & { [K in Exclude<keyof Cases, "PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["PreferGlobal" | "PreferLocal" | "Report" | "RequireMatch"]>>;
|
|
9121
9232
|
};
|
|
9122
9233
|
readonly PreferGlobal: Data.Case.Constructor<{
|
|
9123
9234
|
readonly _tag: "PreferGlobal";
|
|
@@ -9185,7 +9296,7 @@ declare const SourceRequirement: {
|
|
|
9185
9296
|
readonly OnlyLocal: (args: {
|
|
9186
9297
|
readonly _tag: "OnlyLocal";
|
|
9187
9298
|
}) => any;
|
|
9188
|
-
}>(cases: Cases & { [K in Exclude<keyof Cases, "Any" | "Both" | "OnlyGlobal" | "OnlyLocal">]: never }): (value: {
|
|
9299
|
+
}>(cases: Cases & { [K in Exclude<keyof Cases, "Any" | "Both" | "OnlyGlobal" | "OnlyLocal">]: never; }): (value: {
|
|
9189
9300
|
readonly _tag: "Any";
|
|
9190
9301
|
} | {
|
|
9191
9302
|
readonly _tag: "Both";
|
|
@@ -9215,7 +9326,7 @@ declare const SourceRequirement: {
|
|
|
9215
9326
|
readonly _tag: "OnlyGlobal";
|
|
9216
9327
|
} | {
|
|
9217
9328
|
readonly _tag: "OnlyLocal";
|
|
9218
|
-
}, cases: Cases & { [K in Exclude<keyof Cases, "Any" | "Both" | "OnlyGlobal" | "OnlyLocal">]: never }): import("effect/Unify").Unify<ReturnType<Cases["Any" | "Both" | "OnlyGlobal" | "OnlyLocal"]>>;
|
|
9329
|
+
}, cases: Cases & { [K in Exclude<keyof Cases, "Any" | "Both" | "OnlyGlobal" | "OnlyLocal">]: never; }): import("effect/Unify").Unify<ReturnType<Cases["Any" | "Both" | "OnlyGlobal" | "OnlyLocal"]>>;
|
|
9219
9330
|
};
|
|
9220
9331
|
readonly Any: Data.Case.Constructor<{
|
|
9221
9332
|
readonly _tag: "Any";
|
|
@@ -9794,8 +9905,19 @@ declare class SilkPublishability {
|
|
|
9794
9905
|
* Resolve a package's publish targets via {@link SilkPublishability}, then drop any
|
|
9795
9906
|
* whose built `directory` package.json is `private: true`. Returned targets keep the
|
|
9796
9907
|
* detector's original (possibly package-relative) `directory`.
|
|
9908
|
+
*
|
|
9909
|
+
* @remarks
|
|
9910
|
+
* When the prod build has written `dist/prod/targets.json`, that binding is
|
|
9911
|
+
* authoritative: every surviving target's directory must be one of the group
|
|
9912
|
+
* directories it names. A directory outside the binding means detection did
|
|
9913
|
+
* not select the prod output — the `yaml-effect@0.7.1` shape, where a dev
|
|
9914
|
+
* manifest carrying `catalog:` specifiers was packed and published. Rather
|
|
9915
|
+
* than ship those bytes, fail with {@link PublishTargetBindingError}.
|
|
9916
|
+
*
|
|
9917
|
+
* Before the prod build runs there is no binding, and the detector's
|
|
9918
|
+
* placeholder directories are left alone.
|
|
9797
9919
|
*/
|
|
9798
|
-
static resolveTargets(pkg: WorkspacePackage, root: string): Effect.Effect<ReadonlyArray<PublishTarget>,
|
|
9920
|
+
static resolveTargets(pkg: WorkspacePackage, root: string): Effect.Effect<ReadonlyArray<PublishTarget>, PublishTargetBindingError, PublishabilityDetector | FileSystem.FileSystem>;
|
|
9799
9921
|
/**
|
|
9800
9922
|
* The publishable, non-ignored packages, resolved through the single
|
|
9801
9923
|
* {@link SilkPublishability} (which already honors changeset ignore in adaptive mode).
|
|
@@ -10300,7 +10422,7 @@ declare class TurboDigest {
|
|
|
10300
10422
|
}
|
|
10301
10423
|
//#endregion
|
|
10302
10424
|
//#region src/turbo/errors.d.ts
|
|
10303
|
-
declare const TurboNotInstalledError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
10425
|
+
declare const TurboNotInstalledError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
10304
10426
|
readonly _tag: "TurboNotInstalledError";
|
|
10305
10427
|
} & Readonly<A>;
|
|
10306
10428
|
/**
|
|
@@ -10313,7 +10435,7 @@ declare class TurboNotInstalledError extends TurboNotInstalledError_base<{
|
|
|
10313
10435
|
}> {
|
|
10314
10436
|
get message(): string;
|
|
10315
10437
|
}
|
|
10316
|
-
declare const NotATurboRepoError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
10438
|
+
declare const NotATurboRepoError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
10317
10439
|
readonly _tag: "NotATurboRepoError";
|
|
10318
10440
|
} & Readonly<A>;
|
|
10319
10441
|
/**
|
|
@@ -10326,7 +10448,7 @@ declare class NotATurboRepoError extends NotATurboRepoError_base<{
|
|
|
10326
10448
|
}> {
|
|
10327
10449
|
get message(): string;
|
|
10328
10450
|
}
|
|
10329
|
-
declare const DryRunParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
10451
|
+
declare const DryRunParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
10330
10452
|
readonly _tag: "DryRunParseError";
|
|
10331
10453
|
} & Readonly<A>;
|
|
10332
10454
|
/**
|
|
@@ -10340,7 +10462,7 @@ declare class DryRunParseError extends DryRunParseError_base<{
|
|
|
10340
10462
|
}> {
|
|
10341
10463
|
get message(): string;
|
|
10342
10464
|
}
|
|
10343
|
-
declare const TurboExecError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
10465
|
+
declare const TurboExecError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
10344
10466
|
readonly _tag: "TurboExecError";
|
|
10345
10467
|
} & Readonly<A>;
|
|
10346
10468
|
/**
|
|
@@ -10419,5 +10541,5 @@ declare namespace index_d_exports$3 {
|
|
|
10419
10541
|
export { AffectedResult, AffectedResultType, CacheDiagnosis, CacheDiagnosisType, DryRunParseError, GlobalHashSummary, GraphNode, MissExplanation, NotATurboRepoError, PackageCacheStatus, TaskGraphResult, TaskGraphResultType, TurboCache, TurboDigest, TurboDryRun, TurboDryRunType, TurboDryTask, TurboDryTaskType, TurboEnvVars, TurboError, TurboExecError, TurboGlobalCacheInputs, TurboInspector, TurboInspectorLive, TurboNotInstalledError };
|
|
10420
10542
|
}
|
|
10421
10543
|
//#endregion
|
|
10422
|
-
export { AnalyzedWorkspace, BiomeSchemaSync, BiomeSchemaSyncLive, BiomeSyncError, type BiomeSyncOptions, type BiomeSyncResult, ChangesetConfig, ChangesetConfigError, type ChangesetConfigFile, ChangesetConfigLive, ChangesetConfigReader, ChangesetConfigReaderLive, type ChangesetMode, index_d_exports as Changesets, CheckResult, type CheckResultDefinition, type CommentStyle, index_d_exports$1 as Commitlint, type CommitlintPlugin, type CommitlintUserConfig, ConfigDiscovery, ConfigDiscoveryLive, type ConfigDiscoveryOptions, type ConfigLocation, ConfigNotFoundError, type ConfigSource, index_d_exports$2 as Lint, ManagedSection, ManagedSectionLive, type PromptConfig, type PromptSettings, PublishabilityDetectorAdaptiveLive, type PublishablePackage, type RawPackageJson, type RawPublishConfig, type RawPublishTargets, type RawTargetObject, type RawTargetValue, ResolutionPolicy, type ResolutionPolicyDefinition, ResolvedTool, type RuleApplicability, type RuleConfigTuple, type RuleSeverity, type RulesConfig, SavvyBaseSection, SavvyHooksSection, SectionBlock, SectionDefinition, SectionDiff, type SectionDiffDefinition, SectionParseError, SectionValidationError, SectionWriteError, ShellSectionDefinition, type SilkChangesetConfigFile, SilkPublishConfig, SilkPublishability, SilkPublishabilityDetectorLive, SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive, SourceRequirement, type SourceRequirementDefinition, SyncResult, type SyncResultDefinition, TagFormatError, TagStrategy, TagStrategyLive, type TagStrategyType, type TargetBinding, type TargetGroupBinding, type TargetsBinding, ToolCommand, ToolDefinition, ToolDiscovery, ToolDiscoveryLive, ToolNotFoundError, ToolResolutionError, ToolSource, ToolVersionMismatchError, index_d_exports$3 as Turbo, VersionExtractor, type VersionExtractorDefinition, VersioningDetectionError, VersioningStrategy, VersioningStrategyLive, type VersioningStrategyResult, type VersioningStrategyType, WorkspaceAnalysis, WorkspaceAnalysisError, buildSchemaUrl, extractSemver, readTargetsBinding, savvyBasePreamble, savvyHooksHygiene, savvyToolSection };
|
|
10544
|
+
export { AnalyzedWorkspace, BiomeSchemaSync, BiomeSchemaSyncLive, BiomeSyncError, type BiomeSyncOptions, type BiomeSyncResult, ChangesetConfig, ChangesetConfigError, type ChangesetConfigFile, ChangesetConfigLive, ChangesetConfigReader, ChangesetConfigReaderLive, type ChangesetMode, index_d_exports as Changesets, CheckResult, type CheckResultDefinition, type CommentStyle, index_d_exports$1 as Commitlint, type CommitlintPlugin, type CommitlintUserConfig, ConfigDiscovery, ConfigDiscoveryLive, type ConfigDiscoveryOptions, type ConfigLocation, ConfigNotFoundError, type ConfigSource, index_d_exports$2 as Lint, ManagedSection, ManagedSectionLive, type PromptConfig, type PromptSettings, PublishTargetBindingError, PublishabilityDetectorAdaptiveLive, type PublishablePackage, type RawPackageJson, type RawPublishConfig, type RawPublishTargets, type RawTargetObject, type RawTargetValue, ResolutionPolicy, type ResolutionPolicyDefinition, ResolvedTool, type RuleApplicability, type RuleConfigTuple, type RuleSeverity, type RulesConfig, SavvyBaseSection, SavvyHooksSection, SectionBlock, SectionDefinition, SectionDiff, type SectionDiffDefinition, SectionParseError, SectionValidationError, SectionWriteError, ShellSectionDefinition, type SilkChangesetConfigFile, SilkPublishConfig, SilkPublishability, SilkPublishabilityDetectorLive, SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive, SourceRequirement, type SourceRequirementDefinition, SyncResult, type SyncResultDefinition, TagFormatError, TagStrategy, TagStrategyLive, type TagStrategyType, type TargetBinding, type TargetGroupBinding, type TargetsBinding, ToolCommand, ToolDefinition, ToolDiscovery, ToolDiscoveryLive, ToolNotFoundError, ToolResolutionError, ToolSource, ToolVersionMismatchError, index_d_exports$3 as Turbo, VersionExtractor, type VersionExtractorDefinition, VersioningDetectionError, VersioningStrategy, VersioningStrategyLive, type VersioningStrategyResult, type VersioningStrategyType, WorkspaceAnalysis, WorkspaceAnalysisError, buildSchemaUrl, extractSemver, readTargetsBinding, savvyBasePreamble, savvyHooksHygiene, savvyToolSection };
|
|
10423
10545
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChangesetConfigError } from "./errors/ChangesetConfigError.js";
|
|
2
2
|
import { ChangesetConfigReader, ChangesetConfigReaderLive } from "./services/ChangesetConfigReader.js";
|
|
3
|
+
import { PublishTargetBindingError } from "./errors/PublishTargetBindingError.js";
|
|
3
4
|
import { ChangesetConfig, ChangesetConfigLive } from "./services/ChangesetConfig.js";
|
|
4
5
|
import { PublishabilityDetectorAdaptiveLive, SilkPublishability, SilkPublishabilityDetectorLive, readTargetsBinding } from "./services/SilkPublishability.js";
|
|
5
6
|
import { changesets_exports } from "./changesets/index.js";
|
|
@@ -34,4 +35,4 @@ import { SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive } from "./services/Sil
|
|
|
34
35
|
import { ToolDiscovery, ToolDiscoveryLive } from "./services/ToolDiscovery.js";
|
|
35
36
|
import { turbo_exports } from "./turbo/index.js";
|
|
36
37
|
|
|
37
|
-
export { AnalyzedWorkspace, BiomeSchemaSync, BiomeSchemaSyncLive, BiomeSyncError, ChangesetConfig, ChangesetConfigError, ChangesetConfigLive, ChangesetConfigReader, ChangesetConfigReaderLive, changesets_exports as Changesets, CheckResult, commitlint_exports as Commitlint, ConfigDiscovery, ConfigDiscoveryLive, ConfigNotFoundError, lint_exports as Lint, ManagedSection, ManagedSectionLive, PublishabilityDetectorAdaptiveLive, ResolutionPolicy, ResolvedTool, SavvyBaseSection, SavvyHooksSection, SectionBlock, SectionDefinition, SectionDiff, SectionParseError, SectionValidationError, SectionWriteError, ShellSectionDefinition, SilkPublishConfig, SilkPublishability, SilkPublishabilityDetectorLive, SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive, SourceRequirement, SyncResult, TagFormatError, TagStrategy, TagStrategyLive, ToolCommand, ToolDefinition, ToolDiscovery, ToolDiscoveryLive, ToolNotFoundError, ToolResolutionError, ToolSource, ToolVersionMismatchError, turbo_exports as Turbo, VersionExtractor, VersioningDetectionError, VersioningStrategy, VersioningStrategyLive, WorkspaceAnalysis, WorkspaceAnalysisError, buildSchemaUrl, extractSemver, readTargetsBinding, savvyBasePreamble, savvyHooksHygiene, savvyToolSection };
|
|
38
|
+
export { AnalyzedWorkspace, BiomeSchemaSync, BiomeSchemaSyncLive, BiomeSyncError, ChangesetConfig, ChangesetConfigError, ChangesetConfigLive, ChangesetConfigReader, ChangesetConfigReaderLive, changesets_exports as Changesets, CheckResult, commitlint_exports as Commitlint, ConfigDiscovery, ConfigDiscoveryLive, ConfigNotFoundError, lint_exports as Lint, ManagedSection, ManagedSectionLive, PublishTargetBindingError, PublishabilityDetectorAdaptiveLive, ResolutionPolicy, ResolvedTool, SavvyBaseSection, SavvyHooksSection, SectionBlock, SectionDefinition, SectionDiff, SectionParseError, SectionValidationError, SectionWriteError, ShellSectionDefinition, SilkPublishConfig, SilkPublishability, SilkPublishabilityDetectorLive, SilkWorkspaceAnalyzer, SilkWorkspaceAnalyzerLive, SourceRequirement, SyncResult, TagFormatError, TagStrategy, TagStrategyLive, ToolCommand, ToolDefinition, ToolDiscovery, ToolDiscoveryLive, ToolNotFoundError, ToolResolutionError, ToolSource, ToolVersionMismatchError, turbo_exports as Turbo, VersionExtractor, VersioningDetectionError, VersioningStrategy, VersioningStrategyLive, WorkspaceAnalysis, WorkspaceAnalysisError, buildSchemaUrl, extractSemver, readTargetsBinding, savvyBasePreamble, savvyHooksHygiene, savvyToolSection };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/silk-effects",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared Effect library for Silk Suite conventions",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk-effects",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"unified": "^11.0.5",
|
|
48
48
|
"unified-lint-rule": "^3.0.1",
|
|
49
49
|
"unist-util-visit": "^5.1.0",
|
|
50
|
-
"workspaces-effect": "^2.0.
|
|
50
|
+
"workspaces-effect": "^2.0.3",
|
|
51
51
|
"yaml": "^2.9.0",
|
|
52
52
|
"yaml-effect": "^0.7.2",
|
|
53
53
|
"yaml-lint": "^1.7.0"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { PublishTargetBindingError } from "../errors/PublishTargetBindingError.js";
|
|
1
2
|
import { ChangesetConfig } from "./ChangesetConfig.js";
|
|
2
3
|
import { Effect, Layer } from "effect";
|
|
3
|
-
import { isAbsolute, join } from "node:path";
|
|
4
|
+
import { isAbsolute, join, relative } from "node:path";
|
|
4
5
|
import { FileSystem } from "@effect/platform";
|
|
5
6
|
import { PublishTarget, PublishabilityDetector, PublishabilityDetectorLive, WorkspaceDiscovery } from "workspaces-effect";
|
|
6
7
|
|
|
@@ -119,6 +120,17 @@ var SilkPublishability = class {
|
|
|
119
120
|
* Resolve a package's publish targets via {@link SilkPublishability}, then drop any
|
|
120
121
|
* whose built `directory` package.json is `private: true`. Returned targets keep the
|
|
121
122
|
* detector's original (possibly package-relative) `directory`.
|
|
123
|
+
*
|
|
124
|
+
* @remarks
|
|
125
|
+
* When the prod build has written `dist/prod/targets.json`, that binding is
|
|
126
|
+
* authoritative: every surviving target's directory must be one of the group
|
|
127
|
+
* directories it names. A directory outside the binding means detection did
|
|
128
|
+
* not select the prod output — the `yaml-effect@0.7.1` shape, where a dev
|
|
129
|
+
* manifest carrying `catalog:` specifiers was packed and published. Rather
|
|
130
|
+
* than ship those bytes, fail with {@link PublishTargetBindingError}.
|
|
131
|
+
*
|
|
132
|
+
* Before the prod build runs there is no binding, and the detector's
|
|
133
|
+
* placeholder directories are left alone.
|
|
122
134
|
*/
|
|
123
135
|
static resolveTargets(pkg, root) {
|
|
124
136
|
return Effect.gen(function* () {
|
|
@@ -130,6 +142,18 @@ var SilkPublishability = class {
|
|
|
130
142
|
const dir = isAbsolute(t.directory) ? t.directory : join(pkg.path, t.directory);
|
|
131
143
|
if (!(yield* isTargetPrivate(fs, dir))) kept.push(t);
|
|
132
144
|
}
|
|
145
|
+
const binding = yield* readTargetsBinding(fs, pkg.path);
|
|
146
|
+
if (binding === null) return kept;
|
|
147
|
+
const boundDirectories = binding.groups.map((g) => normalizeDir(g.dir));
|
|
148
|
+
const bound = new Set(boundDirectories);
|
|
149
|
+
for (const t of kept) {
|
|
150
|
+
const relativeDir = normalizeDir(isAbsolute(t.directory) ? relative(pkg.path, t.directory) : t.directory);
|
|
151
|
+
if (!bound.has(relativeDir)) return yield* Effect.fail(new PublishTargetBindingError({
|
|
152
|
+
pkg: pkg.name,
|
|
153
|
+
directory: relativeDir,
|
|
154
|
+
boundDirectories
|
|
155
|
+
}));
|
|
156
|
+
}
|
|
133
157
|
return kept;
|
|
134
158
|
});
|
|
135
159
|
}
|
|
@@ -156,6 +180,26 @@ var SilkPublishability = class {
|
|
|
156
180
|
});
|
|
157
181
|
}
|
|
158
182
|
};
|
|
183
|
+
/**
|
|
184
|
+
* Reduce a directory to a comparable package-relative POSIX path: backslashes to
|
|
185
|
+
* forward slashes, no `./` prefix, no trailing slash. `""` (the package root)
|
|
186
|
+
* normalizes to `.`, matching how a root-directory target is recorded.
|
|
187
|
+
*
|
|
188
|
+
* @remarks
|
|
189
|
+
* Trailing slashes are trimmed with an index scan rather than `/\/+$/`. That
|
|
190
|
+
* regex is unanchored at the start, so the engine retries the match from every
|
|
191
|
+
* position and degrades to O(n²) on a path of many slashes (CodeQL
|
|
192
|
+
* `js/polynomial-redos`). `dir` reaches here from `dist/prod/targets.json`, which
|
|
193
|
+
* the bundler writes but a consumer repo could hand-edit.
|
|
194
|
+
*/
|
|
195
|
+
const normalizeDir = (dir) => {
|
|
196
|
+
const slashed = dir.replaceAll("\\", "/");
|
|
197
|
+
const withoutPrefix = slashed.startsWith("./") ? slashed.slice(2) : slashed;
|
|
198
|
+
let end = withoutPrefix.length;
|
|
199
|
+
while (end > 0 && withoutPrefix[end - 1] === "/") end -= 1;
|
|
200
|
+
const normalized = withoutPrefix.slice(0, end);
|
|
201
|
+
return normalized === "" ? "." : normalized;
|
|
202
|
+
};
|
|
159
203
|
/** True when a built target directory's package.json is `private: true`. Missing/unreadable/malformed → false. */
|
|
160
204
|
const isTargetPrivate = (fs, targetDir) => fs.readFileString(join(targetDir, "package.json")).pipe(Effect.flatMap((content) => Effect.try({
|
|
161
205
|
try: () => JSON.parse(content).private === true,
|