@fern-api/fern-api-dev 5.17.1 → 5.18.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.
Files changed (2) hide show
  1. package/cli.cjs +417 -198
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -354406,9 +354406,9 @@ var require_diff3 = __commonJS({
354406
354406
  }
354407
354407
  });
354408
354408
 
354409
- // ../../../node_modules/.pnpm/@fern-api+replay@0.14.1/node_modules/@fern-api/replay/dist/index.cjs
354409
+ // ../../../node_modules/.pnpm/@fern-api+replay@0.15.0/node_modules/@fern-api/replay/dist/index.cjs
354410
354410
  var require_dist13 = __commonJS({
354411
- "../../../node_modules/.pnpm/@fern-api+replay@0.14.1/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
354411
+ "../../../node_modules/.pnpm/@fern-api+replay@0.15.0/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
354412
354412
  "use strict";
354413
354413
  var __defProp4 = Object.defineProperty;
354414
354414
  var __getOwnPropDesc4 = Object.getOwnPropertyDescriptor;
@@ -357919,6 +357919,66 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
357919
357919
  }
357920
357920
  return snapshot;
357921
357921
  }
357922
+ /**
357923
+ * FER-10203: returns true when a `[fern-autoversion]` commit between
357924
+ * `fromSha` and `toSha` touched any of the patch's `files`. Re-classifies
357925
+ * each grep match via `isGenerationCommit` so a customer commit that
357926
+ * merely quotes the marker in its body doesn't false-positive.
357927
+ */
357928
+ async hasAutoversionContamination(fromSha, toSha, files) {
357929
+ if (files.length === 0) return false;
357930
+ const log4 = await this.git.exec([
357931
+ "log",
357932
+ `${fromSha}..${toSha}`,
357933
+ "--grep=\\[fern-autoversion\\]",
357934
+ "--extended-regexp",
357935
+ "--format=%H%x09%aN%x09%ae%x09%s",
357936
+ "--",
357937
+ ...files
357938
+ ]).catch(() => "");
357939
+ if (!log4.trim()) return false;
357940
+ for (const line of log4.trim().split("\n")) {
357941
+ const [sha, authorName, authorEmail, message] = line.split(" ");
357942
+ if (sha == null) continue;
357943
+ if (isGenerationCommit({
357944
+ sha,
357945
+ authorName: authorName ?? "",
357946
+ authorEmail: authorEmail ?? "",
357947
+ message: message ?? ""
357948
+ })) {
357949
+ return true;
357950
+ }
357951
+ }
357952
+ return false;
357953
+ }
357954
+ /**
357955
+ * FER-10203: rebuild patch_content from `theirs_snapshot` (captured at
357956
+ * detection time, predates pipeline content) rather than a HEAD-relative
357957
+ * diff. Returns `null` when snapshot is missing or doesn't cover every
357958
+ * file in `patch.files` — caller leaves the patch unchanged.
357959
+ */
357960
+ async computeSnapshotBasedPatchDiff(patch5, currentGen) {
357961
+ if (!patch5.theirs_snapshot) return null;
357962
+ if (Object.keys(patch5.theirs_snapshot).length === 0) return null;
357963
+ for (const file4 of patch5.files) {
357964
+ if (patch5.theirs_snapshot[file4] == null) return null;
357965
+ }
357966
+ const fragments = [];
357967
+ for (const file4 of patch5.files) {
357968
+ const theirsContent = patch5.theirs_snapshot[file4];
357969
+ const oursContent = await this.git.showFile(currentGen, file4).catch(() => null);
357970
+ if (oursContent == null) {
357971
+ fragments.push(synthesizeNewFileDiff(file4, theirsContent));
357972
+ continue;
357973
+ }
357974
+ if (oursContent === theirsContent) continue;
357975
+ const fileDiff = await unifiedDiff(oursContent, theirsContent, file4);
357976
+ if (fileDiff.trim()) {
357977
+ fragments.push(fileDiff);
357978
+ }
357979
+ }
357980
+ return fragments.join("");
357981
+ }
357922
357982
  /**
357923
357983
  * Read THEIRS snapshot from a git tree-ish (commit, branch, or tree).
357924
357984
  * Used when the diff that produced `patch_content` was relative to that
@@ -358184,6 +358244,41 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
358184
358244
  }
358185
358245
  if (patch5.base_generation === currentGen) {
358186
358246
  try {
358247
+ const contaminated = await this.hasAutoversionContamination(
358248
+ currentGen,
358249
+ "HEAD",
358250
+ patch5.files
358251
+ );
358252
+ if (contaminated) {
358253
+ const snapshotDiff = await this.computeSnapshotBasedPatchDiff(
358254
+ patch5,
358255
+ currentGen
358256
+ );
358257
+ if (snapshotDiff === null) continue;
358258
+ if (!snapshotDiff.trim()) {
358259
+ if (await allPatchFilesUserOwned(patch5)) continue;
358260
+ this.lockManager.removePatch(patch5.id);
358261
+ contentRefreshed++;
358262
+ continue;
358263
+ }
358264
+ const snapHasStaleMarkers = snapshotDiff.split("\n").some(
358265
+ (l9) => l9.startsWith("+<<<<<<< Generated") || l9.startsWith("+>>>>>>> Your customization")
358266
+ );
358267
+ if (snapHasStaleMarkers) continue;
358268
+ const isProtectedSnap = patch5.files.some(
358269
+ (file4) => file4 === ".fernignore" || fernignorePatterns.some((p14) => file4 === p14 || (0, import_minimatch22.minimatch)(file4, p14))
358270
+ );
358271
+ if (isProtectedSnap) continue;
358272
+ const snapHash = this.detector.computeContentHash(snapshotDiff);
358273
+ if (snapHash !== patch5.content_hash) {
358274
+ this.lockManager.updatePatch(patch5.id, {
358275
+ patch_content: snapshotDiff,
358276
+ content_hash: snapHash
358277
+ });
358278
+ contentRefreshed++;
358279
+ }
358280
+ continue;
358281
+ }
358187
358282
  const ppResult = await computePerPatchDiffWithFallback(
358188
358283
  patch5,
358189
358284
  (f4) => this.git.showFile(currentGen, f4),
@@ -358235,6 +358330,42 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
358235
358330
  try {
358236
358331
  const markerFiles = await this.git.exec(["grep", "-l", "<<<<<<< Generated", "HEAD", "--", ...patch5.files]).catch(() => "");
358237
358332
  if (markerFiles.trim()) continue;
358333
+ const contaminated = await this.hasAutoversionContamination(
358334
+ currentGen,
358335
+ "HEAD",
358336
+ patch5.files
358337
+ );
358338
+ if (contaminated) {
358339
+ const snapshotDiff = await this.computeSnapshotBasedPatchDiff(
358340
+ patch5,
358341
+ currentGen
358342
+ );
358343
+ if (snapshotDiff === null) continue;
358344
+ if (!snapshotDiff.trim()) {
358345
+ if (await allPatchFilesUserOwned(patch5)) {
358346
+ try {
358347
+ this.lockManager.updatePatch(patch5.id, { base_generation: currentGen });
358348
+ } catch {
358349
+ }
358350
+ continue;
358351
+ }
358352
+ this.lockManager.removePatch(patch5.id);
358353
+ conflictAbsorbed++;
358354
+ continue;
358355
+ }
358356
+ const snapHasStaleMarkers = snapshotDiff.split("\n").some(
358357
+ (l9) => l9.startsWith("+<<<<<<< Generated") || l9.startsWith("+>>>>>>> Your customization")
358358
+ );
358359
+ if (snapHasStaleMarkers) continue;
358360
+ const snapHash = this.detector.computeContentHash(snapshotDiff);
358361
+ this.lockManager.updatePatch(patch5.id, {
358362
+ base_generation: currentGen,
358363
+ patch_content: snapshotDiff,
358364
+ content_hash: snapHash
358365
+ });
358366
+ conflictResolved++;
358367
+ continue;
358368
+ }
358238
358369
  const ppResult = await computePerPatchDiffWithFallback(
358239
358370
  patch5,
358240
358371
  (f4) => this.git.showFile(currentGen, f4),
@@ -653612,139 +653743,6 @@ async function isLoggedIn() {
653612
653743
  }
653613
653744
  }
653614
653745
 
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
653746
  // ../config/lib/schemas/AiProviderSchema.js
653749
653747
  var AiProviderSchema = external_exports.enum(["openai", "anthropic", "bedrock"]);
653750
653748
 
@@ -654086,67 +654084,9 @@ var CliSchema = external_exports.object({
654086
654084
  version: external_exports.string().optional()
654087
654085
  });
654088
654086
 
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
654087
  // ../config/lib/schemas/docs/DocsSchema.js
654097
654088
  var DocsSchema = docs_yml_exports.DocsYmlSchemas.DocsConfiguration;
654098
654089
 
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
654090
  // ../config/lib/schemas/SdkTargetLanguageSchema.js
654151
654091
  var SdkTargetLanguageSchema = external_exports.enum([
654152
654092
  "csharp",
@@ -654259,6 +654199,13 @@ var OutputObjectSchema = external_exports.object({
654259
654199
  // ../config/lib/schemas/OutputSchema.js
654260
654200
  var OutputSchema = external_exports.union([external_exports.string(), OutputObjectSchema]);
654261
654201
 
654202
+ // ../config/lib/schemas/CratesPublishSchema.js
654203
+ var CratesPublishSchema = external_exports.object({
654204
+ packageName: external_exports.string(),
654205
+ url: external_exports.string().optional(),
654206
+ token: external_exports.string().optional()
654207
+ });
654208
+
654262
654209
  // ../config/lib/schemas/MavenPublishSchema.js
654263
654210
  var MavenSignatureSchema = external_exports.object({
654264
654211
  keyId: external_exports.string(),
@@ -654358,6 +654305,243 @@ var FernYmlSchema = external_exports.object({
654358
654305
  apis: ApisSchema.optional()
654359
654306
  });
654360
654307
 
654308
+ // ../config/lib/jsonSchemas.js
654309
+ var SCHEMA_ENTRIES = [
654310
+ {
654311
+ name: "api",
654312
+ description: "A single API definition (the `api:` block in fern.yml).",
654313
+ schema: ApiDefinitionSchema3
654314
+ },
654315
+ {
654316
+ name: "apis",
654317
+ description: "A map of named API definitions (the `apis:` block in fern.yml).",
654318
+ schema: ApisSchema
654319
+ },
654320
+ {
654321
+ name: "sdks",
654322
+ description: "The `sdks:` block in fern.yml, including defaultGroup, targets, and readme.",
654323
+ schema: SdksSchema
654324
+ },
654325
+ {
654326
+ name: "sdks.targets",
654327
+ description: "A single SDK target (a value inside `sdks.targets`).",
654328
+ schema: SdkTargetSchema
654329
+ },
654330
+ {
654331
+ name: "docs",
654332
+ description: "The `docs:` block in fern.yml (documentation configuration).",
654333
+ schema: DocsSchema
654334
+ },
654335
+ {
654336
+ name: "ai",
654337
+ description: "The `ai:` block in fern.yml (AI-powered example generation config).",
654338
+ schema: AiConfigSchema
654339
+ },
654340
+ {
654341
+ name: "cli",
654342
+ description: "The `cli:` block in fern.yml (CLI version pinning).",
654343
+ schema: CliSchema
654344
+ }
654345
+ ];
654346
+ var JSON_SCHEMA_ENTRIES = SCHEMA_ENTRIES.map(({ name: name2, description }) => ({ name: name2, description }));
654347
+ function getJsonSchemaByName(name2) {
654348
+ const entry = SCHEMA_ENTRIES.find((e8) => e8.name === name2);
654349
+ if (entry == null) {
654350
+ return void 0;
654351
+ }
654352
+ return external_exports.toJSONSchema(entry.schema);
654353
+ }
654354
+ function getJsonSchemaNames() {
654355
+ return SCHEMA_ENTRIES.map((e8) => e8.name);
654356
+ }
654357
+ function getFernYmlJsonSchema() {
654358
+ return external_exports.toJSONSchema(FernYmlSchema);
654359
+ }
654360
+
654361
+ // ../config/lib/schemas/index.js
654362
+ var schemas_exports13 = {};
654363
+ __export(schemas_exports13, {
654364
+ AiChatConfigSchema: () => AiChatConfigSchema,
654365
+ AiConfigSchema: () => AiConfigSchema,
654366
+ AiExamplesConfigSchema: () => AiExamplesConfigSchema,
654367
+ AiProviderSchema: () => AiProviderSchema,
654368
+ AnalyticsConfigSchema: () => AnalyticsConfigSchema2,
654369
+ AnnouncementConfigSchema: () => AnnouncementConfigSchema2,
654370
+ ApiDefinitionSchema: () => ApiDefinitionSchema3,
654371
+ ApiReferenceConfigurationSchema: () => ApiReferenceConfigurationSchema,
654372
+ ApiSpecSchema: () => ApiSpecSchema,
654373
+ ApisSchema: () => ApisSchema,
654374
+ AsyncApiSettingsSchema: () => AsyncApiSettingsSchema2,
654375
+ AsyncApiSpecSchema: () => AsyncApiSpecSchema2,
654376
+ AuthSchemesSchema: () => AuthSchemesSchema,
654377
+ AuthorSchema: () => AuthorSchema,
654378
+ AvailabilitySchema: () => AvailabilitySchema4,
654379
+ BackgroundImageConfigurationSchema: () => BackgroundImageConfigurationSchema,
654380
+ BaseApiSettingsSchema: () => BaseApiSettingsSchema2,
654381
+ ChangelogConfigurationSchema: () => ChangelogConfigurationSchema,
654382
+ CliSchema: () => CliSchema,
654383
+ ColorsConfigurationSchema: () => ColorsConfigurationSchema,
654384
+ ConjureSettingsSchema: () => ConjureSettingsSchema,
654385
+ ConjureSpecSchema: () => ConjureSpecSchema,
654386
+ CratesPublishSchema: () => CratesPublishSchema,
654387
+ CssConfigSchema: () => CssConfigSchema2,
654388
+ DefaultIntegerFormatSchema: () => DefaultIntegerFormatSchema,
654389
+ DocsInstanceSchema: () => DocsInstanceSchema,
654390
+ DocsSchema: () => DocsSchema,
654391
+ DocsSettingsConfigSchema: () => DocsSettingsConfigSchema2,
654392
+ EditThisPageConfigSchema: () => EditThisPageConfigSchema,
654393
+ EnvironmentSchema: () => EnvironmentSchema4,
654394
+ ExampleGenerationSchema: () => ExampleGenerationSchema,
654395
+ ExampleStyleSchema: () => ExampleStyleSchema,
654396
+ ExperimentalConfigSchema: () => ExperimentalConfigSchema,
654397
+ FeatureFlagConfigurationSchema: () => FeatureFlagConfigurationSchema,
654398
+ FeatureFlagSchema: () => FeatureFlagSchema,
654399
+ FernRcAccountSchema: () => FernRcAccountSchema,
654400
+ FernRcAiProviderSchema: () => FernRcAiProviderSchema,
654401
+ FernRcAiSchema: () => FernRcAiSchema,
654402
+ FernRcAuthSchema: () => FernRcAuthSchema,
654403
+ FernRcCacheSchema: () => FernRcCacheSchema,
654404
+ FernRcSchema: () => FernRcSchema,
654405
+ FernSettingsSchema: () => FernSettingsSchema,
654406
+ FernSpecSchema: () => FernSpecSchema,
654407
+ FernYmlSchema: () => FernYmlSchema,
654408
+ FolderConfigurationSchema: () => FolderConfigurationSchema,
654409
+ FooterLinksConfigSchema: () => FooterLinksConfigSchema,
654410
+ FormParameterEncodingSchema: () => FormParameterEncodingSchema,
654411
+ GeneratorImageObjectSchema: () => GeneratorImageObjectSchema2,
654412
+ GeneratorImageSchema: () => GeneratorImageSchema,
654413
+ GitHubOutputModeSchema: () => GitHubOutputModeSchema,
654414
+ GitHubRepositoryOutputModeSchema: () => GitHubRepositoryOutputModeSchema,
654415
+ GitHubRepositoryOutputSchema: () => GitHubRepositoryOutputSchema,
654416
+ GitOutputSchema: () => GitOutputSchema,
654417
+ GitSelfHostedOutputModeSchema: () => GitSelfHostedOutputModeSchema,
654418
+ GitSelfHostedOutputSchema: () => GitSelfHostedOutputSchema,
654419
+ GraphQlSpecSchema: () => GraphQlSpecSchema2,
654420
+ HeaderConfigSchema: () => HeaderConfigSchema,
654421
+ HeaderSchema: () => HeaderSchema2,
654422
+ IntegrationsConfigSchema: () => IntegrationsConfigSchema2,
654423
+ IntercomConfigSchema: () => IntercomConfigSchema2,
654424
+ JsConfigSchema: () => JsConfigSchema2,
654425
+ LayoutConfigSchema: () => LayoutConfigSchema,
654426
+ LibraryConfigurationSchema: () => LibraryConfigurationSchema,
654427
+ LibraryInputConfigurationSchema: () => LibraryInputConfigurationSchema,
654428
+ LibraryOutputConfigurationSchema: () => LibraryOutputConfigurationSchema,
654429
+ LibraryReferenceConfigurationSchema: () => LibraryReferenceConfigurationSchema,
654430
+ LicenseSchema: () => LicenseSchema,
654431
+ LinkConfigurationSchema: () => LinkConfigurationSchema,
654432
+ LogoConfigurationSchema: () => LogoConfigurationSchema2,
654433
+ MavenPublishSchema: () => MavenPublishSchema,
654434
+ MavenSignatureSchema: () => MavenSignatureSchema,
654435
+ MessageNamingVersionSchema: () => MessageNamingVersionSchema,
654436
+ MetadataConfigSchema: () => MetadataConfigSchema2,
654437
+ MetadataSchema: () => MetadataSchema,
654438
+ MultiServerStrategySchema: () => MultiServerStrategySchema,
654439
+ MultipleBaseUrlsEnvironmentSchema: () => MultipleBaseUrlsEnvironmentSchema3,
654440
+ NavbarLinkSchema: () => NavbarLinkSchema2,
654441
+ NavigationConfigSchema: () => NavigationConfigSchema4,
654442
+ NavigationItem: () => NavigationItem3,
654443
+ NpmPublishSchema: () => NpmPublishSchema,
654444
+ NugetPublishSchema: () => NugetPublishSchema,
654445
+ OpenApiExampleGenerationSchema: () => OpenApiExampleGenerationSchema2,
654446
+ OpenApiFilterSchema: () => OpenApiFilterSchema2,
654447
+ OpenApiSettingsSchema: () => OpenApiSettingsSchema2,
654448
+ OpenApiSpecSchema: () => OpenApiSpecSchema2,
654449
+ OpenRpcSettingsSchema: () => OpenRpcSettingsSchema,
654450
+ OpenRpcSpecSchema: () => OpenRpcSpecSchema2,
654451
+ OutputObjectSchema: () => OutputObjectSchema,
654452
+ OutputSchema: () => OutputSchema,
654453
+ PageActionsConfigSchema: () => PageActionsConfigSchema2,
654454
+ PageConfigurationSchema: () => PageConfigurationSchema,
654455
+ PathParameterOrderSchema: () => PathParameterOrderSchema,
654456
+ PlaygroundSettingsSchema: () => PlaygroundSettingsSchema,
654457
+ ProductConfigSchema: () => ProductConfigSchema,
654458
+ ProtobufDefinitionSchema: () => ProtobufDefinitionSchema2,
654459
+ ProtobufSettingsSchema: () => ProtobufSettingsSchema,
654460
+ ProtobufSpecSchema: () => ProtobufSpecSchema2,
654461
+ PublishSchema: () => PublishSchema,
654462
+ PypiMetadataSchema: () => PypiMetadataSchema,
654463
+ PypiPublishSchema: () => PypiPublishSchema,
654464
+ ReadmeCustomSectionSchema: () => ReadmeCustomSectionSchema2,
654465
+ ReadmeEndpointSchema: () => ReadmeEndpointSchema2,
654466
+ ReadmeSchema: () => ReadmeSchema2,
654467
+ RedirectConfigSchema: () => RedirectConfigSchema2,
654468
+ RemoveDiscriminantsFromSchemasSchema: () => RemoveDiscriminantsFromSchemasSchema,
654469
+ ResolveAliasesSchema: () => ResolveAliasesSchema2,
654470
+ ReviewersSchema: () => ReviewersSchema2,
654471
+ RoleSchema: () => RoleSchema,
654472
+ RubygemsPublishSchema: () => RubygemsPublishSchema,
654473
+ SdkTargetLanguageSchema: () => SdkTargetLanguageSchema,
654474
+ SdkTargetSchema: () => SdkTargetSchema,
654475
+ SdksSchema: () => SdksSchema,
654476
+ SectionConfigurationSchema: () => SectionConfigurationSchema,
654477
+ SingleBaseUrlEnvironmentSchema: () => SingleBaseUrlEnvironmentSchema3,
654478
+ SnippetsConfigurationSchema: () => SnippetsConfigurationSchema,
654479
+ TabConfigSchema: () => TabConfigSchema,
654480
+ TabVariantSchema: () => TabVariantSchema,
654481
+ TabbedNavigationConfigSchema: () => TabbedNavigationConfigSchema,
654482
+ TabbedNavigationItemSchema: () => TabbedNavigationItemSchema,
654483
+ ThemeConfigSchema: () => ThemeConfigSchema4,
654484
+ TypographyConfigSchema: () => TypographyConfigSchema,
654485
+ UntabbedNavigationConfigSchema: () => UntabbedNavigationConfigSchema,
654486
+ VersionConfigSchema: () => VersionConfigSchema,
654487
+ createEmptyFernRcSchema: () => createEmptyFernRcSchema,
654488
+ isGitOutputGitHubRepository: () => isGitOutputGitHubRepository,
654489
+ isGitOutputSelfHosted: () => isGitOutputSelfHosted,
654490
+ isWellKnownLicense: () => isWellKnownLicense,
654491
+ resolveOutputObjectSchema: () => resolveOutputObjectSchema
654492
+ });
654493
+
654494
+ // ../config/lib/schemas/docs/index.js
654495
+ var S5 = docs_yml_exports.DocsYmlSchemas;
654496
+ var DocsInstanceSchema = S5.DocsInstance;
654497
+ var EditThisPageConfigSchema = S5.EditThisPageConfig;
654498
+ var NavigationConfigSchema4 = S5.NavigationConfig;
654499
+ var TabbedNavigationConfigSchema = S5.TabbedNavigationConfig;
654500
+ var UntabbedNavigationConfigSchema = S5.UntabbedNavigationConfig;
654501
+ var NavigationItem3 = S5.NavigationItem;
654502
+ var PageConfigurationSchema = S5.PageConfiguration;
654503
+ var SectionConfigurationSchema = S5.SectionConfiguration;
654504
+ var ApiReferenceConfigurationSchema = S5.ApiReferenceConfiguration;
654505
+ var LinkConfigurationSchema = S5.LinkConfiguration;
654506
+ var ChangelogConfigurationSchema = S5.ChangelogConfiguration;
654507
+ var LibraryReferenceConfigurationSchema = S5.LibraryReferenceConfiguration;
654508
+ var FolderConfigurationSchema = S5.FolderConfiguration;
654509
+ var TabbedNavigationItemSchema = S5.TabbedNavigationItem;
654510
+ var TabVariantSchema = S5.TabVariant;
654511
+ var TabConfigSchema = S5.TabConfig;
654512
+ var VersionConfigSchema = S5.VersionConfig;
654513
+ var ProductConfigSchema = S5.ProductConfig;
654514
+ var SnippetsConfigurationSchema = S5.SnippetsConfiguration;
654515
+ var PlaygroundSettingsSchema = S5.PlaygroundSettings;
654516
+ var LogoConfigurationSchema2 = S5.LogoConfiguration;
654517
+ var BackgroundImageConfigurationSchema = S5.BackgroundImageConfiguration;
654518
+ var ColorsConfigurationSchema = S5.ColorsConfiguration;
654519
+ var TypographyConfigSchema = S5.DocsTypographyConfig;
654520
+ var LayoutConfigSchema = S5.LayoutConfig;
654521
+ var DocsSettingsConfigSchema2 = S5.DocsSettingsConfig;
654522
+ var ThemeConfigSchema4 = S5.ThemeConfig;
654523
+ var NavbarLinkSchema2 = S5.NavbarLink;
654524
+ var FooterLinksConfigSchema = S5.FooterLinksConfig;
654525
+ var PageActionsConfigSchema2 = S5.PageActionsConfig;
654526
+ var AnalyticsConfigSchema2 = S5.AnalyticsConfig;
654527
+ var MetadataConfigSchema2 = S5.MetadataConfig;
654528
+ var RedirectConfigSchema2 = S5.RedirectConfig;
654529
+ var AiChatConfigSchema = S5.AIChatConfig;
654530
+ var AiExamplesConfigSchema = S5.AiExamplesConfig;
654531
+ var AnnouncementConfigSchema2 = S5.AnnouncementConfig;
654532
+ var IntegrationsConfigSchema2 = S5.IntegrationsConfig;
654533
+ var IntercomConfigSchema2 = S5.IntercomConfig;
654534
+ var LibraryConfigurationSchema = S5.LibraryConfiguration;
654535
+ var LibraryInputConfigurationSchema = S5.LibraryInputConfiguration;
654536
+ var LibraryOutputConfigurationSchema = S5.LibraryOutputConfiguration;
654537
+ var CssConfigSchema2 = S5.CssConfig;
654538
+ var JsConfigSchema2 = S5.JsConfig;
654539
+ var ExperimentalConfigSchema = S5.ExperimentalConfig;
654540
+ var FeatureFlagSchema = S5.FeatureFlag;
654541
+ var FeatureFlagConfigurationSchema = S5.FeatureFlagConfiguration;
654542
+ var AvailabilitySchema4 = S5.Availability;
654543
+ var RoleSchema = S5.Role;
654544
+
654361
654545
  // ../config/lib/schemas/fernrc/FernRcAccountSchema.js
654362
654546
  var FernRcAccountSchema = external_exports.object({
654363
654547
  /** Account identifier (email address) */
@@ -660880,7 +661064,7 @@ var AccessTokenPosthogManager = class {
660880
661064
  properties: {
660881
661065
  ...event,
660882
661066
  ...event.properties,
660883
- version: "5.17.1",
661067
+ version: "5.18.0",
660884
661068
  usingAccessToken: true,
660885
661069
  ...getRunIdProperties()
660886
661070
  }
@@ -660935,7 +661119,7 @@ var UserPosthogManager = class {
660935
661119
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
660936
661120
  event: "CLI",
660937
661121
  properties: {
660938
- version: "5.17.1",
661122
+ version: "5.18.0",
660939
661123
  ...event,
660940
661124
  ...event.properties,
660941
661125
  usingAccessToken: false,
@@ -851918,7 +852102,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
851918
852102
  var LOGS_FOLDER_NAME = "logs";
851919
852103
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
851920
852104
  function getCliSource() {
851921
- const version7 = "5.17.1";
852105
+ const version7 = "5.18.0";
851922
852106
  return `cli@${version7}`;
851923
852107
  }
851924
852108
  var DebugLogger = class {
@@ -864727,7 +864911,7 @@ var LegacyDocsPublisher = class {
864727
864911
  previewId,
864728
864912
  disableTemplates: void 0,
864729
864913
  skipUpload,
864730
- cliVersion: "5.17.1",
864914
+ cliVersion: "5.18.0",
864731
864915
  loginCommand: "fern auth login"
864732
864916
  });
864733
864917
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -867757,6 +867941,40 @@ function addReplayCommand(cli) {
867757
867941
  ]);
867758
867942
  }
867759
867943
 
867944
+ // ../cli-v2/lib/commands/schema/command.js
867945
+ var SchemaCommand = class {
867946
+ async handle(context3, args) {
867947
+ if (args.name == null) {
867948
+ this.writeJson(context3, getFernYmlJsonSchema(), args.pretty);
867949
+ return;
867950
+ }
867951
+ const schema2 = getJsonSchemaByName(args.name);
867952
+ if (schema2 == null) {
867953
+ const available = getJsonSchemaNames().join(", ");
867954
+ throw new CliError({
867955
+ message: `Unknown schema '${args.name}'. Available subsections: ${available}.`,
867956
+ code: CliError.Code.ConfigError
867957
+ });
867958
+ }
867959
+ this.writeJson(context3, schema2, args.pretty);
867960
+ }
867961
+ writeJson(context3, value2, pretty) {
867962
+ const json3 = pretty ? JSON.stringify(value2, null, 2) : JSON.stringify(value2);
867963
+ context3.stdout.info(json3);
867964
+ }
867965
+ };
867966
+ function addSchemaCommand(cli) {
867967
+ const cmd = new SchemaCommand();
867968
+ 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", {
867969
+ type: "string",
867970
+ description: `Dot-delimited subsection of fern.yml. Omit to print the full schema. Available subsections: ${getJsonSchemaNames().join(", ")}.`
867971
+ }).option("pretty", {
867972
+ type: "boolean",
867973
+ default: true,
867974
+ description: "Pretty-print the JSON output"
867975
+ }));
867976
+ }
867977
+
867760
867978
  // ../cli-v2/lib/commands/sdk/utils/gitUrl.js
867761
867979
  function isGitUrl(value2) {
867762
867980
  return value2.endsWith(".git") || value2.startsWith("https://github.com/") || value2.startsWith("https://gitlab.com/") || value2.startsWith("git@");
@@ -920183,6 +920401,7 @@ function createCliV2(argv) {
920183
920401
  addInitCommand(cli);
920184
920402
  addOrgCommand(cli);
920185
920403
  addReplayCommand(cli);
920404
+ addSchemaCommand(cli);
920186
920405
  addSdkCommand(cli);
920187
920406
  addTelemetryCommand(cli);
920188
920407
  return cli;
@@ -939305,7 +939524,7 @@ var CliContext = class _CliContext {
939305
939524
  if (false) {
939306
939525
  this.logger.error("CLI_VERSION is not defined");
939307
939526
  }
939308
- return "5.17.1";
939527
+ return "5.18.0";
939309
939528
  }
939310
939529
  getCliName() {
939311
939530
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.17.1",
2
+ "version": "5.18.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",