@fern-api/fern-api-dev 5.17.1 → 5.18.0-1-g1183ddd9214

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.
Files changed (2) hide show
  1. package/cli.cjs +454 -207
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -66496,6 +66496,22 @@ var init_getFileContent = __esm({
66496
66496
  }
66497
66497
  });
66498
66498
 
66499
+ // ../../commons/github/lib/getGithubApiBaseUrl.js
66500
+ function getGithubApiBaseUrl(repositoryUri) {
66501
+ const { remote } = parseRepository(repositoryUri);
66502
+ if (remote === DEFAULT_REMOTE) {
66503
+ return void 0;
66504
+ }
66505
+ return `https://${remote}/api/v3`;
66506
+ }
66507
+ var init_getGithubApiBaseUrl = __esm({
66508
+ "../../commons/github/lib/getGithubApiBaseUrl.js"() {
66509
+ "use strict";
66510
+ init_constants2();
66511
+ init_parseRepository();
66512
+ }
66513
+ });
66514
+
66499
66515
  // ../../commons/github/lib/getLatestRelease.js
66500
66516
  function isSemverPrerelease(tag2) {
66501
66517
  return import_semver6.default.prerelease(tag2) != null;
@@ -66571,6 +66587,7 @@ __export(lib_exports3, {
66571
66587
  createOrUpdatePullRequest: () => createOrUpdatePullRequest,
66572
66588
  deleteBranch: () => deleteBranch,
66573
66589
  getFileContent: () => getFileContent,
66590
+ getGithubApiBaseUrl: () => getGithubApiBaseUrl,
66574
66591
  getLatestRelease: () => getLatestRelease,
66575
66592
  getOrUpdateBranch: () => getOrUpdateBranch,
66576
66593
  parseRepository: () => parseRepository
@@ -66583,6 +66600,7 @@ var init_lib7 = __esm({
66583
66600
  init_createOrUpdatePullRequest();
66584
66601
  init_deleteBranch();
66585
66602
  init_getFileContent();
66603
+ init_getGithubApiBaseUrl();
66586
66604
  init_getLatestRelease();
66587
66605
  init_getOrUpdateBranch();
66588
66606
  init_parseRepository();
@@ -354406,9 +354424,9 @@ var require_diff3 = __commonJS({
354406
354424
  }
354407
354425
  });
354408
354426
 
354409
- // ../../../node_modules/.pnpm/@fern-api+replay@0.14.1/node_modules/@fern-api/replay/dist/index.cjs
354427
+ // ../../../node_modules/.pnpm/@fern-api+replay@0.15.0/node_modules/@fern-api/replay/dist/index.cjs
354410
354428
  var require_dist13 = __commonJS({
354411
- "../../../node_modules/.pnpm/@fern-api+replay@0.14.1/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
354429
+ "../../../node_modules/.pnpm/@fern-api+replay@0.15.0/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
354412
354430
  "use strict";
354413
354431
  var __defProp4 = Object.defineProperty;
354414
354432
  var __getOwnPropDesc4 = Object.getOwnPropertyDescriptor;
@@ -357919,6 +357937,66 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
357919
357937
  }
357920
357938
  return snapshot;
357921
357939
  }
357940
+ /**
357941
+ * FER-10203: returns true when a `[fern-autoversion]` commit between
357942
+ * `fromSha` and `toSha` touched any of the patch's `files`. Re-classifies
357943
+ * each grep match via `isGenerationCommit` so a customer commit that
357944
+ * merely quotes the marker in its body doesn't false-positive.
357945
+ */
357946
+ async hasAutoversionContamination(fromSha, toSha, files) {
357947
+ if (files.length === 0) return false;
357948
+ const log4 = await this.git.exec([
357949
+ "log",
357950
+ `${fromSha}..${toSha}`,
357951
+ "--grep=\\[fern-autoversion\\]",
357952
+ "--extended-regexp",
357953
+ "--format=%H%x09%aN%x09%ae%x09%s",
357954
+ "--",
357955
+ ...files
357956
+ ]).catch(() => "");
357957
+ if (!log4.trim()) return false;
357958
+ for (const line of log4.trim().split("\n")) {
357959
+ const [sha, authorName, authorEmail, message] = line.split(" ");
357960
+ if (sha == null) continue;
357961
+ if (isGenerationCommit({
357962
+ sha,
357963
+ authorName: authorName ?? "",
357964
+ authorEmail: authorEmail ?? "",
357965
+ message: message ?? ""
357966
+ })) {
357967
+ return true;
357968
+ }
357969
+ }
357970
+ return false;
357971
+ }
357972
+ /**
357973
+ * FER-10203: rebuild patch_content from `theirs_snapshot` (captured at
357974
+ * detection time, predates pipeline content) rather than a HEAD-relative
357975
+ * diff. Returns `null` when snapshot is missing or doesn't cover every
357976
+ * file in `patch.files` — caller leaves the patch unchanged.
357977
+ */
357978
+ async computeSnapshotBasedPatchDiff(patch5, currentGen) {
357979
+ if (!patch5.theirs_snapshot) return null;
357980
+ if (Object.keys(patch5.theirs_snapshot).length === 0) return null;
357981
+ for (const file4 of patch5.files) {
357982
+ if (patch5.theirs_snapshot[file4] == null) return null;
357983
+ }
357984
+ const fragments = [];
357985
+ for (const file4 of patch5.files) {
357986
+ const theirsContent = patch5.theirs_snapshot[file4];
357987
+ const oursContent = await this.git.showFile(currentGen, file4).catch(() => null);
357988
+ if (oursContent == null) {
357989
+ fragments.push(synthesizeNewFileDiff(file4, theirsContent));
357990
+ continue;
357991
+ }
357992
+ if (oursContent === theirsContent) continue;
357993
+ const fileDiff = await unifiedDiff(oursContent, theirsContent, file4);
357994
+ if (fileDiff.trim()) {
357995
+ fragments.push(fileDiff);
357996
+ }
357997
+ }
357998
+ return fragments.join("");
357999
+ }
357922
358000
  /**
357923
358001
  * Read THEIRS snapshot from a git tree-ish (commit, branch, or tree).
357924
358002
  * Used when the diff that produced `patch_content` was relative to that
@@ -358184,6 +358262,41 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
358184
358262
  }
358185
358263
  if (patch5.base_generation === currentGen) {
358186
358264
  try {
358265
+ const contaminated = await this.hasAutoversionContamination(
358266
+ currentGen,
358267
+ "HEAD",
358268
+ patch5.files
358269
+ );
358270
+ if (contaminated) {
358271
+ const snapshotDiff = await this.computeSnapshotBasedPatchDiff(
358272
+ patch5,
358273
+ currentGen
358274
+ );
358275
+ if (snapshotDiff === null) continue;
358276
+ if (!snapshotDiff.trim()) {
358277
+ if (await allPatchFilesUserOwned(patch5)) continue;
358278
+ this.lockManager.removePatch(patch5.id);
358279
+ contentRefreshed++;
358280
+ continue;
358281
+ }
358282
+ const snapHasStaleMarkers = snapshotDiff.split("\n").some(
358283
+ (l9) => l9.startsWith("+<<<<<<< Generated") || l9.startsWith("+>>>>>>> Your customization")
358284
+ );
358285
+ if (snapHasStaleMarkers) continue;
358286
+ const isProtectedSnap = patch5.files.some(
358287
+ (file4) => file4 === ".fernignore" || fernignorePatterns.some((p14) => file4 === p14 || (0, import_minimatch22.minimatch)(file4, p14))
358288
+ );
358289
+ if (isProtectedSnap) continue;
358290
+ const snapHash = this.detector.computeContentHash(snapshotDiff);
358291
+ if (snapHash !== patch5.content_hash) {
358292
+ this.lockManager.updatePatch(patch5.id, {
358293
+ patch_content: snapshotDiff,
358294
+ content_hash: snapHash
358295
+ });
358296
+ contentRefreshed++;
358297
+ }
358298
+ continue;
358299
+ }
358187
358300
  const ppResult = await computePerPatchDiffWithFallback(
358188
358301
  patch5,
358189
358302
  (f4) => this.git.showFile(currentGen, f4),
@@ -358235,6 +358348,42 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
358235
358348
  try {
358236
358349
  const markerFiles = await this.git.exec(["grep", "-l", "<<<<<<< Generated", "HEAD", "--", ...patch5.files]).catch(() => "");
358237
358350
  if (markerFiles.trim()) continue;
358351
+ const contaminated = await this.hasAutoversionContamination(
358352
+ currentGen,
358353
+ "HEAD",
358354
+ patch5.files
358355
+ );
358356
+ if (contaminated) {
358357
+ const snapshotDiff = await this.computeSnapshotBasedPatchDiff(
358358
+ patch5,
358359
+ currentGen
358360
+ );
358361
+ if (snapshotDiff === null) continue;
358362
+ if (!snapshotDiff.trim()) {
358363
+ if (await allPatchFilesUserOwned(patch5)) {
358364
+ try {
358365
+ this.lockManager.updatePatch(patch5.id, { base_generation: currentGen });
358366
+ } catch {
358367
+ }
358368
+ continue;
358369
+ }
358370
+ this.lockManager.removePatch(patch5.id);
358371
+ conflictAbsorbed++;
358372
+ continue;
358373
+ }
358374
+ const snapHasStaleMarkers = snapshotDiff.split("\n").some(
358375
+ (l9) => l9.startsWith("+<<<<<<< Generated") || l9.startsWith("+>>>>>>> Your customization")
358376
+ );
358377
+ if (snapHasStaleMarkers) continue;
358378
+ const snapHash = this.detector.computeContentHash(snapshotDiff);
358379
+ this.lockManager.updatePatch(patch5.id, {
358380
+ base_generation: currentGen,
358381
+ patch_content: snapshotDiff,
358382
+ content_hash: snapHash
358383
+ });
358384
+ conflictResolved++;
358385
+ continue;
358386
+ }
358238
358387
  const ppResult = await computePerPatchDiffWithFallback(
358239
358388
  patch5,
358240
358389
  (f4) => this.git.showFile(currentGen, f4),
@@ -363983,8 +364132,8 @@ var require_GithubStep = __commonJS({
363983
364132
  }
363984
364133
  async executePullRequestMode(repository, newPrBranch, skipCommit, replayConflictInfo, replayResult, resolved) {
363985
364134
  const baseBranch = this.config.branch ?? await repository.getDefaultBranch();
363986
- const octokit = new rest_1.Octokit({ auth: this.config.token });
363987
- const { owner, repo } = (0, github_1.parseRepository)(this.config.uri);
364135
+ const octokit = this.createOctokit();
364136
+ const { owner, repo, remote } = (0, github_1.parseRepository)(this.config.uri);
363988
364137
  let prBranch;
363989
364138
  let isUpdatingExistingPR = false;
363990
364139
  let generationBaseSha;
@@ -364053,7 +364202,7 @@ var require_GithubStep = __commonJS({
364053
364202
  logger: this.logger
364054
364203
  });
364055
364204
  const pushedBranch = await repository.getCurrentBranch();
364056
- result.branchUrl = `https://github.com/${this.config.uri}/tree/${pushedBranch}`;
364205
+ result.branchUrl = `https://${remote}/${owner}/${repo}/tree/${pushedBranch}`;
364057
364206
  this.logger.info(`Pushed branch: ${result.branchUrl}`);
364058
364207
  if (generationBaseSha != null) {
364059
364208
  try {
@@ -364068,7 +364217,7 @@ var require_GithubStep = __commonJS({
364068
364217
  }
364069
364218
  }
364070
364219
  const headSha = await repository.getHeadSha();
364071
- const changelogUrl = resolved.changelogEntry ? `https://github.com/${this.config.uri}/blob/${headSha}/changelog.md` : void 0;
364220
+ const changelogUrl = resolved.changelogEntry ? `https://${remote}/${owner}/${repo}/blob/${headSha}/changelog.md` : void 0;
364072
364221
  const { prTitle, prBody } = (0, parseCommitMessage_1.parseCommitMessageForPR)(resolved.commitMessage, resolved.changelogEntry, resolved.prDescription, resolved.versionBumpReason, resolved.previousVersion, resolved.newVersion, resolved.versionBump, changelogUrl);
364073
364222
  const replaySection = (0, replay_summary_1.formatReplayPrBody)(replayResult, { branchName: prBranch, repoUri: this.config.uri });
364074
364223
  let enrichedBody = replaySection != null ? prBody + "\n\n---\n\n" + replaySection : prBody;
@@ -364150,8 +364299,8 @@ var require_GithubStep = __commonJS({
364150
364299
  success: true
364151
364300
  };
364152
364301
  if (!this.config.previewMode) {
364153
- const octokit = new rest_1.Octokit({ auth: this.config.token });
364154
- const { owner, repo } = (0, github_1.parseRepository)(this.config.uri);
364302
+ const octokit = this.createOctokit();
364303
+ const { owner, repo, remote } = (0, github_1.parseRepository)(this.config.uri);
364155
364304
  await (0, pushSignedCommit_1.pushSignedCommit)({
364156
364305
  repository,
364157
364306
  octokit,
@@ -364163,11 +364312,18 @@ var require_GithubStep = __commonJS({
364163
364312
  logger: this.logger
364164
364313
  });
364165
364314
  const pushedBranch = await repository.getCurrentBranch();
364166
- result.branchUrl = `https://github.com/${this.config.uri}/tree/${pushedBranch}`;
364315
+ result.branchUrl = `https://${remote}/${owner}/${repo}/tree/${pushedBranch}`;
364167
364316
  this.logger.info(`Pushed branch: ${result.branchUrl}`);
364168
364317
  }
364169
364318
  return result;
364170
364319
  }
364320
+ createOctokit() {
364321
+ const opts = { auth: this.config.token };
364322
+ if (this.config.apiBaseUrl != null) {
364323
+ opts.baseUrl = this.config.apiBaseUrl;
364324
+ }
364325
+ return new rest_1.Octokit(opts);
364326
+ }
364171
364327
  async ensureFernignore() {
364172
364328
  this.logger.debug("Checking for .fernignore file...");
364173
364329
  const fernignorePath = (0, path_1.join)(this.outputDir, ".fernignore");
@@ -385817,8 +385973,10 @@ var require_GitHub = __commonJS({
385817
385973
  await this.restoreFiles(repository, fernIgnoreFiles);
385818
385974
  await repository.commit("SDK Generation");
385819
385975
  await repository.push();
385976
+ const apiBaseUrl = (0, github_1.getGithubApiBaseUrl)(this.githubConfig.uri);
385820
385977
  const octokit = new rest_1.Octokit({
385821
- auth: this.githubConfig.token
385978
+ auth: this.githubConfig.token,
385979
+ ...apiBaseUrl != null ? { baseUrl: apiBaseUrl } : {}
385822
385980
  });
385823
385981
  const parsedRepo = (0, github_1.parseRepository)(this.githubConfig.uri);
385824
385982
  const { owner, repo } = parsedRepo;
@@ -653612,139 +653770,6 @@ async function isLoggedIn() {
653612
653770
  }
653613
653771
  }
653614
653772
 
653615
- // ../config/lib/schemas/index.js
653616
- var schemas_exports13 = {};
653617
- __export(schemas_exports13, {
653618
- AiChatConfigSchema: () => AiChatConfigSchema,
653619
- AiConfigSchema: () => AiConfigSchema,
653620
- AiExamplesConfigSchema: () => AiExamplesConfigSchema,
653621
- AiProviderSchema: () => AiProviderSchema,
653622
- AnalyticsConfigSchema: () => AnalyticsConfigSchema2,
653623
- AnnouncementConfigSchema: () => AnnouncementConfigSchema2,
653624
- ApiDefinitionSchema: () => ApiDefinitionSchema3,
653625
- ApiReferenceConfigurationSchema: () => ApiReferenceConfigurationSchema,
653626
- ApiSpecSchema: () => ApiSpecSchema,
653627
- ApisSchema: () => ApisSchema,
653628
- AsyncApiSettingsSchema: () => AsyncApiSettingsSchema2,
653629
- AsyncApiSpecSchema: () => AsyncApiSpecSchema2,
653630
- AuthSchemesSchema: () => AuthSchemesSchema,
653631
- AuthorSchema: () => AuthorSchema,
653632
- AvailabilitySchema: () => AvailabilitySchema4,
653633
- BackgroundImageConfigurationSchema: () => BackgroundImageConfigurationSchema,
653634
- BaseApiSettingsSchema: () => BaseApiSettingsSchema2,
653635
- ChangelogConfigurationSchema: () => ChangelogConfigurationSchema,
653636
- CliSchema: () => CliSchema,
653637
- ColorsConfigurationSchema: () => ColorsConfigurationSchema,
653638
- ConjureSettingsSchema: () => ConjureSettingsSchema,
653639
- ConjureSpecSchema: () => ConjureSpecSchema,
653640
- CratesPublishSchema: () => CratesPublishSchema,
653641
- CssConfigSchema: () => CssConfigSchema2,
653642
- DefaultIntegerFormatSchema: () => DefaultIntegerFormatSchema,
653643
- DocsInstanceSchema: () => DocsInstanceSchema,
653644
- DocsSchema: () => DocsSchema,
653645
- DocsSettingsConfigSchema: () => DocsSettingsConfigSchema2,
653646
- EditThisPageConfigSchema: () => EditThisPageConfigSchema,
653647
- EnvironmentSchema: () => EnvironmentSchema4,
653648
- ExampleGenerationSchema: () => ExampleGenerationSchema,
653649
- ExampleStyleSchema: () => ExampleStyleSchema,
653650
- ExperimentalConfigSchema: () => ExperimentalConfigSchema,
653651
- FeatureFlagConfigurationSchema: () => FeatureFlagConfigurationSchema,
653652
- FeatureFlagSchema: () => FeatureFlagSchema,
653653
- FernRcAccountSchema: () => FernRcAccountSchema,
653654
- FernRcAiProviderSchema: () => FernRcAiProviderSchema,
653655
- FernRcAiSchema: () => FernRcAiSchema,
653656
- FernRcAuthSchema: () => FernRcAuthSchema,
653657
- FernRcCacheSchema: () => FernRcCacheSchema,
653658
- FernRcSchema: () => FernRcSchema,
653659
- FernSettingsSchema: () => FernSettingsSchema,
653660
- FernSpecSchema: () => FernSpecSchema,
653661
- FernYmlSchema: () => FernYmlSchema,
653662
- FolderConfigurationSchema: () => FolderConfigurationSchema,
653663
- FooterLinksConfigSchema: () => FooterLinksConfigSchema,
653664
- FormParameterEncodingSchema: () => FormParameterEncodingSchema,
653665
- GeneratorImageObjectSchema: () => GeneratorImageObjectSchema2,
653666
- GeneratorImageSchema: () => GeneratorImageSchema,
653667
- GitHubOutputModeSchema: () => GitHubOutputModeSchema,
653668
- GitHubRepositoryOutputModeSchema: () => GitHubRepositoryOutputModeSchema,
653669
- GitHubRepositoryOutputSchema: () => GitHubRepositoryOutputSchema,
653670
- GitOutputSchema: () => GitOutputSchema,
653671
- GitSelfHostedOutputModeSchema: () => GitSelfHostedOutputModeSchema,
653672
- GitSelfHostedOutputSchema: () => GitSelfHostedOutputSchema,
653673
- GraphQlSpecSchema: () => GraphQlSpecSchema2,
653674
- HeaderConfigSchema: () => HeaderConfigSchema,
653675
- HeaderSchema: () => HeaderSchema2,
653676
- IntegrationsConfigSchema: () => IntegrationsConfigSchema2,
653677
- IntercomConfigSchema: () => IntercomConfigSchema2,
653678
- JsConfigSchema: () => JsConfigSchema2,
653679
- LayoutConfigSchema: () => LayoutConfigSchema,
653680
- LibraryConfigurationSchema: () => LibraryConfigurationSchema,
653681
- LibraryInputConfigurationSchema: () => LibraryInputConfigurationSchema,
653682
- LibraryOutputConfigurationSchema: () => LibraryOutputConfigurationSchema,
653683
- LibraryReferenceConfigurationSchema: () => LibraryReferenceConfigurationSchema,
653684
- LicenseSchema: () => LicenseSchema,
653685
- LinkConfigurationSchema: () => LinkConfigurationSchema,
653686
- LogoConfigurationSchema: () => LogoConfigurationSchema2,
653687
- MavenPublishSchema: () => MavenPublishSchema,
653688
- MavenSignatureSchema: () => MavenSignatureSchema,
653689
- MessageNamingVersionSchema: () => MessageNamingVersionSchema,
653690
- MetadataConfigSchema: () => MetadataConfigSchema2,
653691
- MetadataSchema: () => MetadataSchema,
653692
- MultiServerStrategySchema: () => MultiServerStrategySchema,
653693
- MultipleBaseUrlsEnvironmentSchema: () => MultipleBaseUrlsEnvironmentSchema3,
653694
- NavbarLinkSchema: () => NavbarLinkSchema2,
653695
- NavigationConfigSchema: () => NavigationConfigSchema4,
653696
- NavigationItem: () => NavigationItem3,
653697
- NpmPublishSchema: () => NpmPublishSchema,
653698
- NugetPublishSchema: () => NugetPublishSchema,
653699
- OpenApiExampleGenerationSchema: () => OpenApiExampleGenerationSchema2,
653700
- OpenApiFilterSchema: () => OpenApiFilterSchema2,
653701
- OpenApiSettingsSchema: () => OpenApiSettingsSchema2,
653702
- OpenApiSpecSchema: () => OpenApiSpecSchema2,
653703
- OpenRpcSettingsSchema: () => OpenRpcSettingsSchema,
653704
- OpenRpcSpecSchema: () => OpenRpcSpecSchema2,
653705
- OutputObjectSchema: () => OutputObjectSchema,
653706
- OutputSchema: () => OutputSchema,
653707
- PageActionsConfigSchema: () => PageActionsConfigSchema2,
653708
- PageConfigurationSchema: () => PageConfigurationSchema,
653709
- PathParameterOrderSchema: () => PathParameterOrderSchema,
653710
- PlaygroundSettingsSchema: () => PlaygroundSettingsSchema,
653711
- ProductConfigSchema: () => ProductConfigSchema,
653712
- ProtobufDefinitionSchema: () => ProtobufDefinitionSchema2,
653713
- ProtobufSettingsSchema: () => ProtobufSettingsSchema,
653714
- ProtobufSpecSchema: () => ProtobufSpecSchema2,
653715
- PublishSchema: () => PublishSchema,
653716
- PypiMetadataSchema: () => PypiMetadataSchema,
653717
- PypiPublishSchema: () => PypiPublishSchema,
653718
- ReadmeCustomSectionSchema: () => ReadmeCustomSectionSchema2,
653719
- ReadmeEndpointSchema: () => ReadmeEndpointSchema2,
653720
- ReadmeSchema: () => ReadmeSchema2,
653721
- RedirectConfigSchema: () => RedirectConfigSchema2,
653722
- RemoveDiscriminantsFromSchemasSchema: () => RemoveDiscriminantsFromSchemasSchema,
653723
- ResolveAliasesSchema: () => ResolveAliasesSchema2,
653724
- ReviewersSchema: () => ReviewersSchema2,
653725
- RoleSchema: () => RoleSchema,
653726
- RubygemsPublishSchema: () => RubygemsPublishSchema,
653727
- SdkTargetLanguageSchema: () => SdkTargetLanguageSchema,
653728
- SdkTargetSchema: () => SdkTargetSchema,
653729
- SdksSchema: () => SdksSchema,
653730
- SectionConfigurationSchema: () => SectionConfigurationSchema,
653731
- SingleBaseUrlEnvironmentSchema: () => SingleBaseUrlEnvironmentSchema3,
653732
- SnippetsConfigurationSchema: () => SnippetsConfigurationSchema,
653733
- TabConfigSchema: () => TabConfigSchema,
653734
- TabVariantSchema: () => TabVariantSchema,
653735
- TabbedNavigationConfigSchema: () => TabbedNavigationConfigSchema,
653736
- TabbedNavigationItemSchema: () => TabbedNavigationItemSchema,
653737
- ThemeConfigSchema: () => ThemeConfigSchema4,
653738
- TypographyConfigSchema: () => TypographyConfigSchema,
653739
- UntabbedNavigationConfigSchema: () => UntabbedNavigationConfigSchema,
653740
- VersionConfigSchema: () => VersionConfigSchema,
653741
- createEmptyFernRcSchema: () => createEmptyFernRcSchema,
653742
- isGitOutputGitHubRepository: () => isGitOutputGitHubRepository,
653743
- isGitOutputSelfHosted: () => isGitOutputSelfHosted,
653744
- isWellKnownLicense: () => isWellKnownLicense,
653745
- resolveOutputObjectSchema: () => resolveOutputObjectSchema
653746
- });
653747
-
653748
653773
  // ../config/lib/schemas/AiProviderSchema.js
653749
653774
  var AiProviderSchema = external_exports.enum(["openai", "anthropic", "bedrock"]);
653750
653775
 
@@ -654086,67 +654111,9 @@ var CliSchema = external_exports.object({
654086
654111
  version: external_exports.string().optional()
654087
654112
  });
654088
654113
 
654089
- // ../config/lib/schemas/CratesPublishSchema.js
654090
- var CratesPublishSchema = external_exports.object({
654091
- packageName: external_exports.string(),
654092
- url: external_exports.string().optional(),
654093
- token: external_exports.string().optional()
654094
- });
654095
-
654096
654114
  // ../config/lib/schemas/docs/DocsSchema.js
654097
654115
  var DocsSchema = docs_yml_exports.DocsYmlSchemas.DocsConfiguration;
654098
654116
 
654099
- // ../config/lib/schemas/docs/index.js
654100
- var S5 = docs_yml_exports.DocsYmlSchemas;
654101
- var DocsInstanceSchema = S5.DocsInstance;
654102
- var EditThisPageConfigSchema = S5.EditThisPageConfig;
654103
- var NavigationConfigSchema4 = S5.NavigationConfig;
654104
- var TabbedNavigationConfigSchema = S5.TabbedNavigationConfig;
654105
- var UntabbedNavigationConfigSchema = S5.UntabbedNavigationConfig;
654106
- var NavigationItem3 = S5.NavigationItem;
654107
- var PageConfigurationSchema = S5.PageConfiguration;
654108
- var SectionConfigurationSchema = S5.SectionConfiguration;
654109
- var ApiReferenceConfigurationSchema = S5.ApiReferenceConfiguration;
654110
- var LinkConfigurationSchema = S5.LinkConfiguration;
654111
- var ChangelogConfigurationSchema = S5.ChangelogConfiguration;
654112
- var LibraryReferenceConfigurationSchema = S5.LibraryReferenceConfiguration;
654113
- var FolderConfigurationSchema = S5.FolderConfiguration;
654114
- var TabbedNavigationItemSchema = S5.TabbedNavigationItem;
654115
- var TabVariantSchema = S5.TabVariant;
654116
- var TabConfigSchema = S5.TabConfig;
654117
- var VersionConfigSchema = S5.VersionConfig;
654118
- var ProductConfigSchema = S5.ProductConfig;
654119
- var SnippetsConfigurationSchema = S5.SnippetsConfiguration;
654120
- var PlaygroundSettingsSchema = S5.PlaygroundSettings;
654121
- var LogoConfigurationSchema2 = S5.LogoConfiguration;
654122
- var BackgroundImageConfigurationSchema = S5.BackgroundImageConfiguration;
654123
- var ColorsConfigurationSchema = S5.ColorsConfiguration;
654124
- var TypographyConfigSchema = S5.DocsTypographyConfig;
654125
- var LayoutConfigSchema = S5.LayoutConfig;
654126
- var DocsSettingsConfigSchema2 = S5.DocsSettingsConfig;
654127
- var ThemeConfigSchema4 = S5.ThemeConfig;
654128
- var NavbarLinkSchema2 = S5.NavbarLink;
654129
- var FooterLinksConfigSchema = S5.FooterLinksConfig;
654130
- var PageActionsConfigSchema2 = S5.PageActionsConfig;
654131
- var AnalyticsConfigSchema2 = S5.AnalyticsConfig;
654132
- var MetadataConfigSchema2 = S5.MetadataConfig;
654133
- var RedirectConfigSchema2 = S5.RedirectConfig;
654134
- var AiChatConfigSchema = S5.AIChatConfig;
654135
- var AiExamplesConfigSchema = S5.AiExamplesConfig;
654136
- var AnnouncementConfigSchema2 = S5.AnnouncementConfig;
654137
- var IntegrationsConfigSchema2 = S5.IntegrationsConfig;
654138
- var IntercomConfigSchema2 = S5.IntercomConfig;
654139
- var LibraryConfigurationSchema = S5.LibraryConfiguration;
654140
- var LibraryInputConfigurationSchema = S5.LibraryInputConfiguration;
654141
- var LibraryOutputConfigurationSchema = S5.LibraryOutputConfiguration;
654142
- var CssConfigSchema2 = S5.CssConfig;
654143
- var JsConfigSchema2 = S5.JsConfig;
654144
- var ExperimentalConfigSchema = S5.ExperimentalConfig;
654145
- var FeatureFlagSchema = S5.FeatureFlag;
654146
- var FeatureFlagConfigurationSchema = S5.FeatureFlagConfiguration;
654147
- var AvailabilitySchema4 = S5.Availability;
654148
- var RoleSchema = S5.Role;
654149
-
654150
654117
  // ../config/lib/schemas/SdkTargetLanguageSchema.js
654151
654118
  var SdkTargetLanguageSchema = external_exports.enum([
654152
654119
  "csharp",
@@ -654259,6 +654226,13 @@ var OutputObjectSchema = external_exports.object({
654259
654226
  // ../config/lib/schemas/OutputSchema.js
654260
654227
  var OutputSchema = external_exports.union([external_exports.string(), OutputObjectSchema]);
654261
654228
 
654229
+ // ../config/lib/schemas/CratesPublishSchema.js
654230
+ var CratesPublishSchema = external_exports.object({
654231
+ packageName: external_exports.string(),
654232
+ url: external_exports.string().optional(),
654233
+ token: external_exports.string().optional()
654234
+ });
654235
+
654262
654236
  // ../config/lib/schemas/MavenPublishSchema.js
654263
654237
  var MavenSignatureSchema = external_exports.object({
654264
654238
  keyId: external_exports.string(),
@@ -654358,6 +654332,243 @@ var FernYmlSchema = external_exports.object({
654358
654332
  apis: ApisSchema.optional()
654359
654333
  });
654360
654334
 
654335
+ // ../config/lib/jsonSchemas.js
654336
+ var SCHEMA_ENTRIES = [
654337
+ {
654338
+ name: "api",
654339
+ description: "A single API definition (the `api:` block in fern.yml).",
654340
+ schema: ApiDefinitionSchema3
654341
+ },
654342
+ {
654343
+ name: "apis",
654344
+ description: "A map of named API definitions (the `apis:` block in fern.yml).",
654345
+ schema: ApisSchema
654346
+ },
654347
+ {
654348
+ name: "sdks",
654349
+ description: "The `sdks:` block in fern.yml, including defaultGroup, targets, and readme.",
654350
+ schema: SdksSchema
654351
+ },
654352
+ {
654353
+ name: "sdks.targets",
654354
+ description: "A single SDK target (a value inside `sdks.targets`).",
654355
+ schema: SdkTargetSchema
654356
+ },
654357
+ {
654358
+ name: "docs",
654359
+ description: "The `docs:` block in fern.yml (documentation configuration).",
654360
+ schema: DocsSchema
654361
+ },
654362
+ {
654363
+ name: "ai",
654364
+ description: "The `ai:` block in fern.yml (AI-powered example generation config).",
654365
+ schema: AiConfigSchema
654366
+ },
654367
+ {
654368
+ name: "cli",
654369
+ description: "The `cli:` block in fern.yml (CLI version pinning).",
654370
+ schema: CliSchema
654371
+ }
654372
+ ];
654373
+ var JSON_SCHEMA_ENTRIES = SCHEMA_ENTRIES.map(({ name: name2, description }) => ({ name: name2, description }));
654374
+ function getJsonSchemaByName(name2) {
654375
+ const entry = SCHEMA_ENTRIES.find((e8) => e8.name === name2);
654376
+ if (entry == null) {
654377
+ return void 0;
654378
+ }
654379
+ return external_exports.toJSONSchema(entry.schema);
654380
+ }
654381
+ function getJsonSchemaNames() {
654382
+ return SCHEMA_ENTRIES.map((e8) => e8.name);
654383
+ }
654384
+ function getFernYmlJsonSchema() {
654385
+ return external_exports.toJSONSchema(FernYmlSchema);
654386
+ }
654387
+
654388
+ // ../config/lib/schemas/index.js
654389
+ var schemas_exports13 = {};
654390
+ __export(schemas_exports13, {
654391
+ AiChatConfigSchema: () => AiChatConfigSchema,
654392
+ AiConfigSchema: () => AiConfigSchema,
654393
+ AiExamplesConfigSchema: () => AiExamplesConfigSchema,
654394
+ AiProviderSchema: () => AiProviderSchema,
654395
+ AnalyticsConfigSchema: () => AnalyticsConfigSchema2,
654396
+ AnnouncementConfigSchema: () => AnnouncementConfigSchema2,
654397
+ ApiDefinitionSchema: () => ApiDefinitionSchema3,
654398
+ ApiReferenceConfigurationSchema: () => ApiReferenceConfigurationSchema,
654399
+ ApiSpecSchema: () => ApiSpecSchema,
654400
+ ApisSchema: () => ApisSchema,
654401
+ AsyncApiSettingsSchema: () => AsyncApiSettingsSchema2,
654402
+ AsyncApiSpecSchema: () => AsyncApiSpecSchema2,
654403
+ AuthSchemesSchema: () => AuthSchemesSchema,
654404
+ AuthorSchema: () => AuthorSchema,
654405
+ AvailabilitySchema: () => AvailabilitySchema4,
654406
+ BackgroundImageConfigurationSchema: () => BackgroundImageConfigurationSchema,
654407
+ BaseApiSettingsSchema: () => BaseApiSettingsSchema2,
654408
+ ChangelogConfigurationSchema: () => ChangelogConfigurationSchema,
654409
+ CliSchema: () => CliSchema,
654410
+ ColorsConfigurationSchema: () => ColorsConfigurationSchema,
654411
+ ConjureSettingsSchema: () => ConjureSettingsSchema,
654412
+ ConjureSpecSchema: () => ConjureSpecSchema,
654413
+ CratesPublishSchema: () => CratesPublishSchema,
654414
+ CssConfigSchema: () => CssConfigSchema2,
654415
+ DefaultIntegerFormatSchema: () => DefaultIntegerFormatSchema,
654416
+ DocsInstanceSchema: () => DocsInstanceSchema,
654417
+ DocsSchema: () => DocsSchema,
654418
+ DocsSettingsConfigSchema: () => DocsSettingsConfigSchema2,
654419
+ EditThisPageConfigSchema: () => EditThisPageConfigSchema,
654420
+ EnvironmentSchema: () => EnvironmentSchema4,
654421
+ ExampleGenerationSchema: () => ExampleGenerationSchema,
654422
+ ExampleStyleSchema: () => ExampleStyleSchema,
654423
+ ExperimentalConfigSchema: () => ExperimentalConfigSchema,
654424
+ FeatureFlagConfigurationSchema: () => FeatureFlagConfigurationSchema,
654425
+ FeatureFlagSchema: () => FeatureFlagSchema,
654426
+ FernRcAccountSchema: () => FernRcAccountSchema,
654427
+ FernRcAiProviderSchema: () => FernRcAiProviderSchema,
654428
+ FernRcAiSchema: () => FernRcAiSchema,
654429
+ FernRcAuthSchema: () => FernRcAuthSchema,
654430
+ FernRcCacheSchema: () => FernRcCacheSchema,
654431
+ FernRcSchema: () => FernRcSchema,
654432
+ FernSettingsSchema: () => FernSettingsSchema,
654433
+ FernSpecSchema: () => FernSpecSchema,
654434
+ FernYmlSchema: () => FernYmlSchema,
654435
+ FolderConfigurationSchema: () => FolderConfigurationSchema,
654436
+ FooterLinksConfigSchema: () => FooterLinksConfigSchema,
654437
+ FormParameterEncodingSchema: () => FormParameterEncodingSchema,
654438
+ GeneratorImageObjectSchema: () => GeneratorImageObjectSchema2,
654439
+ GeneratorImageSchema: () => GeneratorImageSchema,
654440
+ GitHubOutputModeSchema: () => GitHubOutputModeSchema,
654441
+ GitHubRepositoryOutputModeSchema: () => GitHubRepositoryOutputModeSchema,
654442
+ GitHubRepositoryOutputSchema: () => GitHubRepositoryOutputSchema,
654443
+ GitOutputSchema: () => GitOutputSchema,
654444
+ GitSelfHostedOutputModeSchema: () => GitSelfHostedOutputModeSchema,
654445
+ GitSelfHostedOutputSchema: () => GitSelfHostedOutputSchema,
654446
+ GraphQlSpecSchema: () => GraphQlSpecSchema2,
654447
+ HeaderConfigSchema: () => HeaderConfigSchema,
654448
+ HeaderSchema: () => HeaderSchema2,
654449
+ IntegrationsConfigSchema: () => IntegrationsConfigSchema2,
654450
+ IntercomConfigSchema: () => IntercomConfigSchema2,
654451
+ JsConfigSchema: () => JsConfigSchema2,
654452
+ LayoutConfigSchema: () => LayoutConfigSchema,
654453
+ LibraryConfigurationSchema: () => LibraryConfigurationSchema,
654454
+ LibraryInputConfigurationSchema: () => LibraryInputConfigurationSchema,
654455
+ LibraryOutputConfigurationSchema: () => LibraryOutputConfigurationSchema,
654456
+ LibraryReferenceConfigurationSchema: () => LibraryReferenceConfigurationSchema,
654457
+ LicenseSchema: () => LicenseSchema,
654458
+ LinkConfigurationSchema: () => LinkConfigurationSchema,
654459
+ LogoConfigurationSchema: () => LogoConfigurationSchema2,
654460
+ MavenPublishSchema: () => MavenPublishSchema,
654461
+ MavenSignatureSchema: () => MavenSignatureSchema,
654462
+ MessageNamingVersionSchema: () => MessageNamingVersionSchema,
654463
+ MetadataConfigSchema: () => MetadataConfigSchema2,
654464
+ MetadataSchema: () => MetadataSchema,
654465
+ MultiServerStrategySchema: () => MultiServerStrategySchema,
654466
+ MultipleBaseUrlsEnvironmentSchema: () => MultipleBaseUrlsEnvironmentSchema3,
654467
+ NavbarLinkSchema: () => NavbarLinkSchema2,
654468
+ NavigationConfigSchema: () => NavigationConfigSchema4,
654469
+ NavigationItem: () => NavigationItem3,
654470
+ NpmPublishSchema: () => NpmPublishSchema,
654471
+ NugetPublishSchema: () => NugetPublishSchema,
654472
+ OpenApiExampleGenerationSchema: () => OpenApiExampleGenerationSchema2,
654473
+ OpenApiFilterSchema: () => OpenApiFilterSchema2,
654474
+ OpenApiSettingsSchema: () => OpenApiSettingsSchema2,
654475
+ OpenApiSpecSchema: () => OpenApiSpecSchema2,
654476
+ OpenRpcSettingsSchema: () => OpenRpcSettingsSchema,
654477
+ OpenRpcSpecSchema: () => OpenRpcSpecSchema2,
654478
+ OutputObjectSchema: () => OutputObjectSchema,
654479
+ OutputSchema: () => OutputSchema,
654480
+ PageActionsConfigSchema: () => PageActionsConfigSchema2,
654481
+ PageConfigurationSchema: () => PageConfigurationSchema,
654482
+ PathParameterOrderSchema: () => PathParameterOrderSchema,
654483
+ PlaygroundSettingsSchema: () => PlaygroundSettingsSchema,
654484
+ ProductConfigSchema: () => ProductConfigSchema,
654485
+ ProtobufDefinitionSchema: () => ProtobufDefinitionSchema2,
654486
+ ProtobufSettingsSchema: () => ProtobufSettingsSchema,
654487
+ ProtobufSpecSchema: () => ProtobufSpecSchema2,
654488
+ PublishSchema: () => PublishSchema,
654489
+ PypiMetadataSchema: () => PypiMetadataSchema,
654490
+ PypiPublishSchema: () => PypiPublishSchema,
654491
+ ReadmeCustomSectionSchema: () => ReadmeCustomSectionSchema2,
654492
+ ReadmeEndpointSchema: () => ReadmeEndpointSchema2,
654493
+ ReadmeSchema: () => ReadmeSchema2,
654494
+ RedirectConfigSchema: () => RedirectConfigSchema2,
654495
+ RemoveDiscriminantsFromSchemasSchema: () => RemoveDiscriminantsFromSchemasSchema,
654496
+ ResolveAliasesSchema: () => ResolveAliasesSchema2,
654497
+ ReviewersSchema: () => ReviewersSchema2,
654498
+ RoleSchema: () => RoleSchema,
654499
+ RubygemsPublishSchema: () => RubygemsPublishSchema,
654500
+ SdkTargetLanguageSchema: () => SdkTargetLanguageSchema,
654501
+ SdkTargetSchema: () => SdkTargetSchema,
654502
+ SdksSchema: () => SdksSchema,
654503
+ SectionConfigurationSchema: () => SectionConfigurationSchema,
654504
+ SingleBaseUrlEnvironmentSchema: () => SingleBaseUrlEnvironmentSchema3,
654505
+ SnippetsConfigurationSchema: () => SnippetsConfigurationSchema,
654506
+ TabConfigSchema: () => TabConfigSchema,
654507
+ TabVariantSchema: () => TabVariantSchema,
654508
+ TabbedNavigationConfigSchema: () => TabbedNavigationConfigSchema,
654509
+ TabbedNavigationItemSchema: () => TabbedNavigationItemSchema,
654510
+ ThemeConfigSchema: () => ThemeConfigSchema4,
654511
+ TypographyConfigSchema: () => TypographyConfigSchema,
654512
+ UntabbedNavigationConfigSchema: () => UntabbedNavigationConfigSchema,
654513
+ VersionConfigSchema: () => VersionConfigSchema,
654514
+ createEmptyFernRcSchema: () => createEmptyFernRcSchema,
654515
+ isGitOutputGitHubRepository: () => isGitOutputGitHubRepository,
654516
+ isGitOutputSelfHosted: () => isGitOutputSelfHosted,
654517
+ isWellKnownLicense: () => isWellKnownLicense,
654518
+ resolveOutputObjectSchema: () => resolveOutputObjectSchema
654519
+ });
654520
+
654521
+ // ../config/lib/schemas/docs/index.js
654522
+ var S5 = docs_yml_exports.DocsYmlSchemas;
654523
+ var DocsInstanceSchema = S5.DocsInstance;
654524
+ var EditThisPageConfigSchema = S5.EditThisPageConfig;
654525
+ var NavigationConfigSchema4 = S5.NavigationConfig;
654526
+ var TabbedNavigationConfigSchema = S5.TabbedNavigationConfig;
654527
+ var UntabbedNavigationConfigSchema = S5.UntabbedNavigationConfig;
654528
+ var NavigationItem3 = S5.NavigationItem;
654529
+ var PageConfigurationSchema = S5.PageConfiguration;
654530
+ var SectionConfigurationSchema = S5.SectionConfiguration;
654531
+ var ApiReferenceConfigurationSchema = S5.ApiReferenceConfiguration;
654532
+ var LinkConfigurationSchema = S5.LinkConfiguration;
654533
+ var ChangelogConfigurationSchema = S5.ChangelogConfiguration;
654534
+ var LibraryReferenceConfigurationSchema = S5.LibraryReferenceConfiguration;
654535
+ var FolderConfigurationSchema = S5.FolderConfiguration;
654536
+ var TabbedNavigationItemSchema = S5.TabbedNavigationItem;
654537
+ var TabVariantSchema = S5.TabVariant;
654538
+ var TabConfigSchema = S5.TabConfig;
654539
+ var VersionConfigSchema = S5.VersionConfig;
654540
+ var ProductConfigSchema = S5.ProductConfig;
654541
+ var SnippetsConfigurationSchema = S5.SnippetsConfiguration;
654542
+ var PlaygroundSettingsSchema = S5.PlaygroundSettings;
654543
+ var LogoConfigurationSchema2 = S5.LogoConfiguration;
654544
+ var BackgroundImageConfigurationSchema = S5.BackgroundImageConfiguration;
654545
+ var ColorsConfigurationSchema = S5.ColorsConfiguration;
654546
+ var TypographyConfigSchema = S5.DocsTypographyConfig;
654547
+ var LayoutConfigSchema = S5.LayoutConfig;
654548
+ var DocsSettingsConfigSchema2 = S5.DocsSettingsConfig;
654549
+ var ThemeConfigSchema4 = S5.ThemeConfig;
654550
+ var NavbarLinkSchema2 = S5.NavbarLink;
654551
+ var FooterLinksConfigSchema = S5.FooterLinksConfig;
654552
+ var PageActionsConfigSchema2 = S5.PageActionsConfig;
654553
+ var AnalyticsConfigSchema2 = S5.AnalyticsConfig;
654554
+ var MetadataConfigSchema2 = S5.MetadataConfig;
654555
+ var RedirectConfigSchema2 = S5.RedirectConfig;
654556
+ var AiChatConfigSchema = S5.AIChatConfig;
654557
+ var AiExamplesConfigSchema = S5.AiExamplesConfig;
654558
+ var AnnouncementConfigSchema2 = S5.AnnouncementConfig;
654559
+ var IntegrationsConfigSchema2 = S5.IntegrationsConfig;
654560
+ var IntercomConfigSchema2 = S5.IntercomConfig;
654561
+ var LibraryConfigurationSchema = S5.LibraryConfiguration;
654562
+ var LibraryInputConfigurationSchema = S5.LibraryInputConfiguration;
654563
+ var LibraryOutputConfigurationSchema = S5.LibraryOutputConfiguration;
654564
+ var CssConfigSchema2 = S5.CssConfig;
654565
+ var JsConfigSchema2 = S5.JsConfig;
654566
+ var ExperimentalConfigSchema = S5.ExperimentalConfig;
654567
+ var FeatureFlagSchema = S5.FeatureFlag;
654568
+ var FeatureFlagConfigurationSchema = S5.FeatureFlagConfiguration;
654569
+ var AvailabilitySchema4 = S5.Availability;
654570
+ var RoleSchema = S5.Role;
654571
+
654361
654572
  // ../config/lib/schemas/fernrc/FernRcAccountSchema.js
654362
654573
  var FernRcAccountSchema = external_exports.object({
654363
654574
  /** Account identifier (email address) */
@@ -660880,7 +661091,7 @@ var AccessTokenPosthogManager = class {
660880
661091
  properties: {
660881
661092
  ...event,
660882
661093
  ...event.properties,
660883
- version: "5.17.1",
661094
+ version: "5.18.0-1-g1183ddd9214",
660884
661095
  usingAccessToken: true,
660885
661096
  ...getRunIdProperties()
660886
661097
  }
@@ -660935,7 +661146,7 @@ var UserPosthogManager = class {
660935
661146
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
660936
661147
  event: "CLI",
660937
661148
  properties: {
660938
- version: "5.17.1",
661149
+ version: "5.18.0-1-g1183ddd9214",
660939
661150
  ...event,
660940
661151
  ...event.properties,
660941
661152
  usingAccessToken: false,
@@ -851918,7 +852129,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
851918
852129
  var LOGS_FOLDER_NAME = "logs";
851919
852130
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
851920
852131
  function getCliSource() {
851921
- const version7 = "5.17.1";
852132
+ const version7 = "5.18.0-1-g1183ddd9214";
851922
852133
  return `cli@${version7}`;
851923
852134
  }
851924
852135
  var DebugLogger = class {
@@ -864727,7 +864938,7 @@ var LegacyDocsPublisher = class {
864727
864938
  previewId,
864728
864939
  disableTemplates: void 0,
864729
864940
  skipUpload,
864730
- cliVersion: "5.17.1",
864941
+ cliVersion: "5.18.0-1-g1183ddd9214",
864731
864942
  loginCommand: "fern auth login"
864732
864943
  });
864733
864944
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -867757,6 +867968,40 @@ function addReplayCommand(cli) {
867757
867968
  ]);
867758
867969
  }
867759
867970
 
867971
+ // ../cli-v2/lib/commands/schema/command.js
867972
+ var SchemaCommand = class {
867973
+ async handle(context3, args) {
867974
+ if (args.name == null) {
867975
+ this.writeJson(context3, getFernYmlJsonSchema(), args.pretty);
867976
+ return;
867977
+ }
867978
+ const schema2 = getJsonSchemaByName(args.name);
867979
+ if (schema2 == null) {
867980
+ const available = getJsonSchemaNames().join(", ");
867981
+ throw new CliError({
867982
+ message: `Unknown schema '${args.name}'. Available subsections: ${available}.`,
867983
+ code: CliError.Code.ConfigError
867984
+ });
867985
+ }
867986
+ this.writeJson(context3, schema2, args.pretty);
867987
+ }
867988
+ writeJson(context3, value2, pretty) {
867989
+ const json3 = pretty ? JSON.stringify(value2, null, 2) : JSON.stringify(value2);
867990
+ context3.stdout.info(json3);
867991
+ }
867992
+ };
867993
+ function addSchemaCommand(cli) {
867994
+ const cmd = new SchemaCommand();
867995
+ command2(cli, "schema [name]", "Print a JSON Schema for fern.yml (or a dot-delimited subsection like `sdks` or `sdks.targets`)", (context3, args) => cmd.handle(context3, args), (yargs) => yargs.positional("name", {
867996
+ type: "string",
867997
+ description: `Dot-delimited subsection of fern.yml. Omit to print the full schema. Available subsections: ${getJsonSchemaNames().join(", ")}.`
867998
+ }).option("pretty", {
867999
+ type: "boolean",
868000
+ default: true,
868001
+ description: "Pretty-print the JSON output"
868002
+ }));
868003
+ }
868004
+
867760
868005
  // ../cli-v2/lib/commands/sdk/utils/gitUrl.js
867761
868006
  function isGitUrl(value2) {
867762
868007
  return value2.endsWith(".git") || value2.startsWith("https://github.com/") || value2.startsWith("https://gitlab.com/") || value2.startsWith("git@");
@@ -917523,7 +917768,8 @@ generators:
917523
917768
  skipIfNoDiff,
917524
917769
  hasBreakingChanges,
917525
917770
  breakingChangesSummary: hasBreakingChanges ? autoVersioningPrDescription : void 0,
917526
- runId: process.env.FERN_RUN_ID
917771
+ runId: process.env.FERN_RUN_ID,
917772
+ apiBaseUrl: getGithubApiBaseUrl(selfhostedGithubConfig.uri)
917527
917773
  },
917528
917774
  cliVersion: workspace.cliVersion ?? "unknown",
917529
917775
  generatorVersions: {
@@ -920183,6 +920429,7 @@ function createCliV2(argv) {
920183
920429
  addInitCommand(cli);
920184
920430
  addOrgCommand(cli);
920185
920431
  addReplayCommand(cli);
920432
+ addSchemaCommand(cli);
920186
920433
  addSdkCommand(cli);
920187
920434
  addTelemetryCommand(cli);
920188
920435
  return cli;
@@ -939305,7 +939552,7 @@ var CliContext = class _CliContext {
939305
939552
  if (false) {
939306
939553
  this.logger.error("CLI_VERSION is not defined");
939307
939554
  }
939308
- return "5.17.1";
939555
+ return "5.18.0-1-g1183ddd9214";
939309
939556
  }
939310
939557
  getCliName() {
939311
939558
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.17.1",
2
+ "version": "5.18.0-1-g1183ddd9214",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",