@fern-api/generator-cli 0.6.11 → 0.8.0
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/dist/api.d.ts +19 -16
- package/dist/api.js +178 -178
- package/dist/cli.js +908 -638
- package/package.json +3 -3
package/dist/api.d.ts
CHANGED
|
@@ -532,6 +532,12 @@ interface GithubStepConfig {
|
|
|
532
532
|
branch?: string;
|
|
533
533
|
/** Commit message for the generation */
|
|
534
534
|
commitMessage?: string;
|
|
535
|
+
/** User-facing changelog entry for PR body. When present, used instead of commit message body. */
|
|
536
|
+
changelogEntry?: string;
|
|
537
|
+
/** Structured PR description with Before/After code fences for breaking changes. Takes priority over changelogEntry for PR body. */
|
|
538
|
+
prDescription?: string;
|
|
539
|
+
/** One-sentence justification for WHY the version bump was chosen. Prepended to PR body when present. */
|
|
540
|
+
versionBumpReason?: string;
|
|
535
541
|
/** Skip push/PR creation, just prepare branches locally */
|
|
536
542
|
previewMode?: boolean;
|
|
537
543
|
/** Generator name for namespaced fern-generation-base tag */
|
|
@@ -611,16 +617,12 @@ declare function formatReplayPrBody(result: ReplayStepResult | undefined, option
|
|
|
611
617
|
interface ReplayInitParams {
|
|
612
618
|
/** GitHub repo URI (e.g., "fern-demo/fern-replay-testbed-java-sdk") */
|
|
613
619
|
githubRepo: string;
|
|
614
|
-
/** GitHub token
|
|
620
|
+
/** GitHub token for clone (read access) */
|
|
615
621
|
token: string;
|
|
616
622
|
/** Report what would happen but don't create PR */
|
|
617
623
|
dryRun?: boolean;
|
|
618
624
|
/** Max commits to scan for generation history */
|
|
619
625
|
maxCommitsToScan?: number;
|
|
620
|
-
/** Title for the PR */
|
|
621
|
-
prTitle?: string;
|
|
622
|
-
/** Body for the PR */
|
|
623
|
-
prBody?: string;
|
|
624
626
|
/** Overwrite existing lockfile if present. Default: false */
|
|
625
627
|
force?: boolean;
|
|
626
628
|
/** Scan git history for existing patches (migration). Default: false */
|
|
@@ -629,25 +631,26 @@ interface ReplayInitParams {
|
|
|
629
631
|
interface ReplayInitResult {
|
|
630
632
|
/** Bootstrap result from fern-replay */
|
|
631
633
|
bootstrap: BootstrapResult;
|
|
632
|
-
/**
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
|
|
634
|
+
/** Raw lockfile YAML content, present when bootstrap succeeded and not dry-run */
|
|
635
|
+
lockfileContent?: string;
|
|
636
|
+
/** Raw replay.yml content, present only when fernignore migration created it */
|
|
637
|
+
replayYmlContent?: string;
|
|
638
|
+
/** Fernignore entries that the server should ensure exist */
|
|
639
|
+
fernignoreEntries: string[];
|
|
640
|
+
/** Generated PR body markdown for the server to use */
|
|
641
|
+
prBody?: string;
|
|
636
642
|
}
|
|
637
643
|
/**
|
|
638
644
|
* Initialize Replay for an SDK repository.
|
|
639
645
|
*
|
|
640
|
-
*
|
|
646
|
+
* Runs bootstrap locally (read-only) and returns the lockfile content
|
|
647
|
+
* for the caller to send to Fiddle for server-side PR creation.
|
|
641
648
|
*
|
|
642
649
|
* Flow:
|
|
643
|
-
* 1. Clone the SDK repo
|
|
650
|
+
* 1. Clone the SDK repo (read-only)
|
|
644
651
|
* 2. Run bootstrap() to scan history and create lockfile
|
|
645
652
|
* 3. Ensure .fernignore has replay entries
|
|
646
|
-
* 4.
|
|
647
|
-
* 5. Push branch and open PR
|
|
648
|
-
*
|
|
649
|
-
* The [fern-replay] commit message prefix ensures the bootstrap commit
|
|
650
|
-
* is NOT treated as a user customization patch by ReplayDetector.
|
|
653
|
+
* 4. Read lockfile content from disk and return it
|
|
651
654
|
*/
|
|
652
655
|
declare function replayInit(params: ReplayInitParams): Promise<ReplayInitResult>;
|
|
653
656
|
interface BootstrapLogEntry {
|