@fern-api/fern-api-dev 5.110.0 → 5.111.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 +229 -24
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -25708,6 +25708,116 @@ var init_addPrefixToString = __esm({
25708
25708
  }
25709
25709
  });
25710
25710
 
25711
+ // ../../commons/core-utils/lib/anyOfPresenceConstraint.js
25712
+ function isRecord(value2) {
25713
+ return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
25714
+ }
25715
+ function isObjectTypeOrAbsent(type7) {
25716
+ if (type7 == null) {
25717
+ return true;
25718
+ }
25719
+ if (typeof type7 === "string") {
25720
+ return type7 === "object";
25721
+ }
25722
+ if (Array.isArray(type7)) {
25723
+ const nonNull = type7.filter((entry) => entry !== "null");
25724
+ return nonNull.length === 1 && nonNull[0] === "object";
25725
+ }
25726
+ return false;
25727
+ }
25728
+ function restatesSiblingSubschema(branchSubschema, siblingSubschema) {
25729
+ if (branchSubschema === true) {
25730
+ return true;
25731
+ }
25732
+ if (!isRecord(branchSubschema)) {
25733
+ return false;
25734
+ }
25735
+ const sibling2 = isRecord(siblingSubschema) ? siblingSubschema : void 0;
25736
+ for (const [keyword, value2] of Object.entries(branchSubschema)) {
25737
+ if (ANNOTATION_KEYWORDS.has(keyword)) {
25738
+ continue;
25739
+ }
25740
+ if (sibling2 == null || !(keyword in sibling2) || !deepEquals(value2, sibling2[keyword])) {
25741
+ return false;
25742
+ }
25743
+ }
25744
+ return true;
25745
+ }
25746
+ function deepEquals(a3, b5) {
25747
+ if (a3 === b5) {
25748
+ return true;
25749
+ }
25750
+ if (Array.isArray(a3) && Array.isArray(b5)) {
25751
+ return a3.length === b5.length && a3.every((entry, index3) => deepEquals(entry, b5[index3]));
25752
+ }
25753
+ if (isRecord(a3) && isRecord(b5)) {
25754
+ const aKeys = Object.keys(a3).sort();
25755
+ const bKeys = Object.keys(b5).sort();
25756
+ return aKeys.length === bKeys.length && aKeys.every((key2, index3) => key2 === bKeys[index3]) && aKeys.every((key2) => deepEquals(a3[key2], b5[key2]));
25757
+ }
25758
+ return false;
25759
+ }
25760
+ function isPresenceConstraintBranch(branch, siblingProperties) {
25761
+ if (!isRecord(branch) || "$ref" in branch) {
25762
+ return false;
25763
+ }
25764
+ if (branch.allOf != null || branch.oneOf != null || branch.anyOf != null || branch.additionalProperties != null || !isObjectTypeOrAbsent(branch.type)) {
25765
+ return false;
25766
+ }
25767
+ const branchProperties = isRecord(branch.properties) ? branch.properties : {};
25768
+ const branchRequired = Array.isArray(branch.required) ? branch.required : [];
25769
+ if (Object.keys(branchProperties).length === 0 && branchRequired.length === 0) {
25770
+ return false;
25771
+ }
25772
+ for (const name2 of branchRequired) {
25773
+ if (typeof name2 !== "string" || !(name2 in siblingProperties)) {
25774
+ return false;
25775
+ }
25776
+ }
25777
+ for (const [name2, subschema] of Object.entries(branchProperties)) {
25778
+ if (!(name2 in siblingProperties)) {
25779
+ return false;
25780
+ }
25781
+ if (!restatesSiblingSubschema(subschema, siblingProperties[name2])) {
25782
+ return false;
25783
+ }
25784
+ }
25785
+ return true;
25786
+ }
25787
+ function anyOfIsPresenceConstraint(schema) {
25788
+ const anyOf = schema.anyOf;
25789
+ if (!Array.isArray(anyOf) || anyOf.length === 0) {
25790
+ return false;
25791
+ }
25792
+ if (schema.oneOf != null || schema.allOf != null) {
25793
+ return false;
25794
+ }
25795
+ if (!isRecord(schema.properties) || Object.keys(schema.properties).length === 0) {
25796
+ return false;
25797
+ }
25798
+ const siblingProperties = schema.properties;
25799
+ return anyOf.every((branch) => isPresenceConstraintBranch(branch, siblingProperties));
25800
+ }
25801
+ var ANNOTATION_KEYWORDS;
25802
+ var init_anyOfPresenceConstraint = __esm({
25803
+ "../../commons/core-utils/lib/anyOfPresenceConstraint.js"() {
25804
+ "use strict";
25805
+ ANNOTATION_KEYWORDS = /* @__PURE__ */ new Set([
25806
+ "title",
25807
+ "description",
25808
+ "default",
25809
+ "deprecated",
25810
+ "example",
25811
+ "examples",
25812
+ "readOnly",
25813
+ "writeOnly",
25814
+ "externalDocs",
25815
+ "xml",
25816
+ "$comment"
25817
+ ]);
25818
+ }
25819
+ });
25820
+
25711
25821
  // ../../../node_modules/.pnpm/jsonpath-plus@10.4.0/node_modules/jsonpath-plus/dist/index-node-esm.js
25712
25822
  function push(arr, item) {
25713
25823
  arr = arr.slice();
@@ -44690,6 +44800,7 @@ __export(lib_exports, {
44690
44800
  SKIP_MARKER: () => SKIP_MARKER,
44691
44801
  SymbolRegistry: () => SymbolRegistry,
44692
44802
  addPrefixToString: () => addPrefixToString,
44803
+ anyOfIsPresenceConstraint: () => anyOfIsPresenceConstraint,
44693
44804
  applyOpenAPIOverlay: () => applyOpenAPIOverlay,
44694
44805
  assert: () => assert2,
44695
44806
  assertDefined: () => assertDefined,
@@ -44710,6 +44821,7 @@ __export(lib_exports, {
44710
44821
  isGitAvailable: () => isGitAvailable,
44711
44822
  isNonNullish: () => isNonNullish,
44712
44823
  isPlainObject: () => isPlainObject4,
44824
+ isPresenceConstraintBranch: () => isPresenceConstraintBranch,
44713
44825
  keys: () => keys2,
44714
44826
  mapValues: () => mapValues2,
44715
44827
  mergeWithOverrides: () => mergeWithOverrides,
@@ -44737,6 +44849,7 @@ var init_lib4 = __esm({
44737
44849
  "../../commons/core-utils/lib/index.js"() {
44738
44850
  "use strict";
44739
44851
  init_addPrefixToString();
44852
+ init_anyOfPresenceConstraint();
44740
44853
  init_applyOpenAPIOverlay();
44741
44854
  init_assert();
44742
44855
  init_delay();
@@ -131124,6 +131237,7 @@ var init_OpenApiSettingsSchema2 = __esm({
131124
131237
  "type-dates-as-strings": schemas_exports8.boolean().optional(),
131125
131238
  "preserve-single-schema-oneof": schemas_exports8.boolean().optional(),
131126
131239
  "preserve-one-of-in-all-of": schemas_exports8.boolean().optional(),
131240
+ "any-of-sibling-properties-as-object": schemas_exports8.boolean().optional(),
131127
131241
  "inline-all-of-schemas": schemas_exports8.boolean().optional(),
131128
131242
  "resolve-aliases": ResolveAliases.optional(),
131129
131243
  "group-multi-api-environments": schemas_exports8.boolean().optional(),
@@ -152982,6 +153096,7 @@ var init_options2 = __esm({
152982
153096
  typeDatesAsStrings: false,
152983
153097
  preserveSingleSchemaOneOf: false,
152984
153098
  preserveOneOfInAllOf: false,
153099
+ anyOfSiblingPropertiesAsObject: false,
152985
153100
  inlineAllOfSchemas: false,
152986
153101
  resolveAliases: false,
152987
153102
  groupMultiApiEnvironments: false,
@@ -156641,6 +156756,12 @@ function convertSchemaObject(schema, wrapAsOptional, wrapAsNullable, context3, b
156641
156756
  }
156642
156757
  }
156643
156758
  if (schema.anyOf != null && schema.anyOf.length > 0) {
156759
+ if (context3.options.anyOfSiblingPropertiesAsObject && anyOfIsPresenceConstraint(schema)) {
156760
+ context3.logger.debug(`Treating the anyOf at ${breadcrumbs.join(".")} as an "at least one of" constraint over its sibling properties rather than a union, and converting the schema as an object.`);
156761
+ const { anyOf: _constraint, ...schemaWithoutAnyOf } = schema;
156762
+ const convertedSchema = convertSchema2(schemaWithoutAnyOf, wrapAsOptional, wrapAsNullable, context3, breadcrumbs, source2, namespace, referencedAsRequest);
156763
+ return maybeInjectDescriptionOrGroupName(convertedSchema, description, namespace, groupName);
156764
+ }
156644
156765
  if (schema.anyOf.length === 1 && schema.anyOf[0] != null) {
156645
156766
  const convertedSchema = convertSchema2(schema.anyOf[0], wrapAsOptional, wrapAsNullable, context3, breadcrumbs, source2, namespace, referencedAsRequest);
156646
156767
  return maybeInjectDescriptionOrGroupName(convertedSchema, description, namespace, groupName);
@@ -157251,6 +157372,7 @@ var SCHEMA_REFERENCE_PREFIX, globalTitleCollisionTracker;
157251
157372
  var init_convertSchemas = __esm({
157252
157373
  "../api-importers/openapi/openapi-ir-parser/lib/schema/convertSchemas.js"() {
157253
157374
  "use strict";
157375
+ init_lib4();
157254
157376
  init_lib13();
157255
157377
  init_lib6();
157256
157378
  init_lodash();
@@ -200202,6 +200324,7 @@ var init_getAPIDefinitionSettings = __esm({
200202
200324
  typeDatesAsStrings: "typeDatesAsStrings",
200203
200325
  preserveSingleSchemaOneOf: "preserveSingleSchemaOneOf",
200204
200326
  preserveOneOfInAllOf: "preserveOneOfInAllOf",
200327
+ anyOfSiblingPropertiesAsObject: "anyOfSiblingPropertiesAsObject",
200205
200328
  inlineAllOfSchemas: "inlineAllOfSchemas",
200206
200329
  resolveAliases: "resolveAliases",
200207
200330
  groupMultiApiEnvironments: "groupMultiApiEnvironments",
@@ -264823,6 +264946,7 @@ function parseOpenApiDefinitionSettingsSchema(settings) {
264823
264946
  typeDatesAsStrings: settings?.["type-dates-as-strings"],
264824
264947
  preserveSingleSchemaOneOf: settings?.["preserve-single-schema-oneof"],
264825
264948
  preserveOneOfInAllOf: settings?.["preserve-one-of-in-all-of"],
264949
+ anyOfSiblingPropertiesAsObject: settings?.["any-of-sibling-properties-as-object"],
264826
264950
  inlineAllOfSchemas: settings?.["inline-all-of-schemas"],
264827
264951
  resolveAliases: settings?.["resolve-aliases"],
264828
264952
  groupMultiApiEnvironments: settings?.["group-multi-api-environments"],
@@ -265685,6 +265809,7 @@ var init_convertGeneratorsConfiguration = __esm({
265685
265809
  typeDatesAsStrings: void 0,
265686
265810
  preserveSingleSchemaOneOf: void 0,
265687
265811
  preserveOneOfInAllOf: void 0,
265812
+ anyOfSiblingPropertiesAsObject: void 0,
265688
265813
  inlineAllOfSchemas: void 0,
265689
265814
  resolveAliases: void 0,
265690
265815
  groupMultiApiEnvironments: void 0,
@@ -343851,7 +343976,7 @@ var require_oas_kit_common = __commonJS({
343851
343976
  function allSame(array3) {
343852
343977
  return new Set(array3).size <= 1;
343853
343978
  }
343854
- function deepEquals(obj1, obj2) {
343979
+ function deepEquals2(obj1, obj2) {
343855
343980
  function _equals(obj12, obj22) {
343856
343981
  return sjs.stringify(obj12) === sjs.stringify(Object.assign({}, obj12, obj22));
343857
343982
  }
@@ -343861,7 +343986,7 @@ var require_oas_kit_common = __commonJS({
343861
343986
  let result = [];
343862
343987
  for (let candidate of arr) {
343863
343988
  let dupe = result.find(function(e2, i5, a3) {
343864
- return deepEquals(e2, candidate);
343989
+ return deepEquals2(e2, candidate);
343865
343990
  });
343866
343991
  if (!dupe) result.push(candidate);
343867
343992
  }
@@ -346319,7 +346444,7 @@ async function parseOverlayFile(absoluteFilePathToOverlay, context3) {
346319
346444
  }
346320
346445
  }
346321
346446
  function validateOverlay(overlay, context3) {
346322
- if (!isRecord(overlay)) {
346447
+ if (!isRecord2(overlay)) {
346323
346448
  context3.logger.error("Overlay file must be a YAML or JSON object");
346324
346449
  return false;
346325
346450
  }
@@ -346328,7 +346453,7 @@ function validateOverlay(overlay, context3) {
346328
346453
  return false;
346329
346454
  }
346330
346455
  const info = overlay.info;
346331
- if (!isRecord(info) || typeof info.title !== "string" || info.title.length === 0 || typeof info.version !== "string" || info.version.length === 0) {
346456
+ if (!isRecord2(info) || typeof info.title !== "string" || info.title.length === 0 || typeof info.version !== "string" || info.version.length === 0) {
346332
346457
  context3.logger.error("Overlay file missing required 'info.title' or 'info.version' field");
346333
346458
  return false;
346334
346459
  }
@@ -346339,7 +346464,7 @@ function validateOverlay(overlay, context3) {
346339
346464
  }
346340
346465
  for (let i5 = 0; i5 < actions.length; i5++) {
346341
346466
  const action = actions[i5];
346342
- if (!isRecord(action) || !action.target) {
346467
+ if (!isRecord2(action) || !action.target) {
346343
346468
  context3.logger.error(`Overlay action at index ${i5} missing required 'target' field`);
346344
346469
  return false;
346345
346470
  }
@@ -346350,7 +346475,7 @@ function validateOverlay(overlay, context3) {
346350
346475
  }
346351
346476
  return true;
346352
346477
  }
346353
- function isRecord(value2) {
346478
+ function isRecord2(value2) {
346354
346479
  return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
346355
346480
  }
346356
346481
  var import_promises28, import_path36, import_tmp_promise6, tempDir;
@@ -351696,6 +351821,7 @@ var TYPE_INVARIANT_KEYS, SchemaConverter;
351696
351821
  var init_SchemaConverter = __esm({
351697
351822
  "../api-importers/v3-importer-commons/lib/converters/schema/SchemaConverter.js"() {
351698
351823
  "use strict";
351824
+ init_lib4();
351699
351825
  init_lib9();
351700
351826
  init_lib30();
351701
351827
  init_CreateTypeReferenceFromFernType();
@@ -351769,6 +351895,10 @@ var init_SchemaConverter = __esm({
351769
351895
  if (maybeConvertedTypeArraySchema != null) {
351770
351896
  return maybeConvertedTypeArraySchema;
351771
351897
  }
351898
+ const maybeConvertedSiblingAnyOfConstraint = this.tryConvertSiblingAnyOfConstraint();
351899
+ if (maybeConvertedSiblingAnyOfConstraint != null) {
351900
+ return maybeConvertedSiblingAnyOfConstraint;
351901
+ }
351772
351902
  const maybeConvertedOneOfAnyOfSchema = this.tryConvertOneOfAnyOfSchema();
351773
351903
  if (maybeConvertedOneOfAnyOfSchema != null) {
351774
351904
  return maybeConvertedOneOfAnyOfSchema;
@@ -352109,6 +352239,50 @@ var init_SchemaConverter = __esm({
352109
352239
  }
352110
352240
  return void 0;
352111
352241
  }
352242
+ /**
352243
+ * A schema may declare `properties` alongside an `anyOf` whose branches only
352244
+ * re-declare some of those same properties as required, for example:
352245
+ *
352246
+ * type: object
352247
+ * properties: { a: {...}, b: {...} }
352248
+ * anyOf:
352249
+ * - { properties: { a: {...} }, required: [a] }
352250
+ * - { properties: { b: {...} }, required: [b] }
352251
+ *
352252
+ * Per JSON Schema an instance must satisfy both keywords, so the `anyOf` here
352253
+ * is a validation constraint -- "at least one of a, b" -- and not a set of
352254
+ * variants. Converting it as a union discards the sibling `properties`
352255
+ * entirely and makes the variants mutually exclusive, so a body carrying both
352256
+ * `a` and `b` silently loses one on the wire.
352257
+ *
352258
+ * Drop the `anyOf` and convert the schema as the object it declares. The "at
352259
+ * least one" constraint is not expressible in the IR and is not enforced.
352260
+ *
352261
+ * This only applies when every branch is an inline object whose properties are
352262
+ * a subset of the sibling `properties`. A branch that introduces a property,
352263
+ * or is a reference, is a genuine variant and is left to the union converter.
352264
+ *
352265
+ * Gated behind the `any-of-sibling-properties-as-object` setting.
352266
+ */
352267
+ tryConvertSiblingAnyOfConstraint() {
352268
+ if (!this.context.settings.anyOfSiblingPropertiesAsObject) {
352269
+ return void 0;
352270
+ }
352271
+ if (!anyOfIsPresenceConstraint(this.schema)) {
352272
+ return void 0;
352273
+ }
352274
+ this.context.logger.debug(`Treating the anyOf at ${this.breadcrumbs.join(".")} as an "at least one of" constraint over its sibling properties rather than a union, and converting the schema as an object.`);
352275
+ const { anyOf: _constraint, ...schemaWithoutAnyOf } = this.schema;
352276
+ return new _SchemaConverter({
352277
+ id: this.id,
352278
+ context: this.context,
352279
+ breadcrumbs: this.breadcrumbs,
352280
+ schema: schemaWithoutAnyOf,
352281
+ inlined: this.inlined,
352282
+ nameOverride: this.nameOverride,
352283
+ visitedRefs: this.visitedRefs
352284
+ }).convert();
352285
+ }
352112
352286
  tryConvertOneOfAnyOfSchema() {
352113
352287
  if (this.schema.oneOf != null || this.schema.anyOf != null) {
352114
352288
  const oneOfConverter = new OneOfSchemaConverter({
@@ -374121,6 +374295,8 @@ var init_OSSWorkspace = __esm({
374121
374295
  // This avoids running buf generate twice when both toFernWorkspace() and
374122
374296
  // validateOSSWorkspace() need the same OpenAPI specs.
374123
374297
  openApiSpecsCache = /* @__PURE__ */ new Map();
374298
+ /** Guards the orphaned-`auth-schemes` warning so one command warns once. */
374299
+ hasWarnedOrphanedAuthSchemes = false;
374124
374300
  constructor({ allSpecs, specs, ...superArgs }) {
374125
374301
  const openapiSpecs = specs.filter((spec) => spec.type === "openapi" && spec.source.type === "openapi");
374126
374302
  super({
@@ -374260,10 +374436,7 @@ var init_OSSWorkspace = __esm({
374260
374436
  const specs = await this.getOpenAPISpecsCached({ context: context3 });
374261
374437
  const documents = await this.loader.loadDocuments({ context: context3, specs });
374262
374438
  let authOverrides = this.generatorsConfiguration?.api?.auth != null ? { ...this.generatorsConfiguration?.api } : void 0;
374263
- const orphanedAuthSchemeWarning = getOrphanedAuthSchemeWarning(this.generatorsConfiguration?.api);
374264
- if (orphanedAuthSchemeWarning != null) {
374265
- context3.logger.warn(orphanedAuthSchemeWarning);
374266
- }
374439
+ this.warnOnOrphanedAuthSchemes(context3);
374267
374440
  if (authOverrides == null) {
374268
374441
  authOverrides = await getAuthFromOverrideFiles(specs);
374269
374442
  }
@@ -374442,7 +374615,29 @@ var init_OSSWorkspace = __esm({
374442
374615
  }
374443
374616
  return results;
374444
374617
  }
374618
+ /**
374619
+ * Emit the orphaned-`auth-schemes` warning, at most once per workspace.
374620
+ *
374621
+ * Called from BOTH `toFernWorkspace` and `getIntermediateRepresentation`,
374622
+ * because they are different entry points: `fern generate` and plain
374623
+ * `fern check` go through the former, and only `fern check --from-openapi`
374624
+ * reaches the latter (see `validateWorkspaces.ts`, where that branch is
374625
+ * gated on `directFromOpenapi`). Warning from only one of them meant the
374626
+ * customer who hits this bug — silently, on `fern generate` — saw nothing,
374627
+ * which is the entire failure mode.
374628
+ */
374629
+ warnOnOrphanedAuthSchemes(context3) {
374630
+ if (this.hasWarnedOrphanedAuthSchemes) {
374631
+ return;
374632
+ }
374633
+ const warning = getOrphanedAuthSchemeWarning(this.generatorsConfiguration?.api);
374634
+ if (warning != null) {
374635
+ this.hasWarnedOrphanedAuthSchemes = true;
374636
+ context3.logger.warn(warning);
374637
+ }
374638
+ }
374445
374639
  async toFernWorkspace({ context: context3 }, settings, specsOverride) {
374640
+ this.warnOnOrphanedAuthSchemes(context3);
374446
374641
  if (specsOverride != null) {
374447
374642
  return this.createWorkspaceWithSpecsOverride({ context: context3 }, specsOverride, settings);
374448
374643
  }
@@ -696657,6 +696852,14 @@ var OpenApiSettingsSchema2 = BaseApiSettingsSchema2.extend({
696657
696852
  * Defaults to false.
696658
696853
  */
696659
696854
  preserveOneOfInAllOf: external_exports.boolean().optional(),
696855
+ /**
696856
+ * When a schema declares `properties` alongside an `anyOf` that only marks
696857
+ * some of those same properties required, the `anyOf` is a constraint rather
696858
+ * than a set of variants. Set to true to convert such a schema as an object.
696859
+ * Defaults to false, converting it to a union, which drops the sibling
696860
+ * `properties`.
696861
+ */
696862
+ anyOfSiblingPropertiesAsObject: external_exports.boolean().optional(),
696660
696863
  /**
696661
696864
  * Whether to inline allOf schemas. If false, allOf schemas will be
696662
696865
  * extended in the code generation.
@@ -705301,7 +705504,7 @@ var AccessTokenPosthogManager = class {
705301
705504
  properties: {
705302
705505
  ...event,
705303
705506
  ...event.properties,
705304
- version: "5.110.0",
705507
+ version: "5.111.0",
705305
705508
  usingAccessToken: true,
705306
705509
  ...getRunIdProperties()
705307
705510
  }
@@ -705367,7 +705570,7 @@ var UserPosthogManager = class {
705367
705570
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
705368
705571
  event: "CLI",
705369
705572
  properties: {
705370
- version: "5.110.0",
705573
+ version: "5.111.0",
705371
705574
  ...event,
705372
705575
  ...event.properties,
705373
705576
  usingAccessToken: false,
@@ -712176,6 +712379,7 @@ var LegacyApiSpecAdapter = class {
712176
712379
  typeDatesAsStrings: settings.typeDatesAsStrings,
712177
712380
  preserveSingleSchemaOneOf: settings.preserveSingleSchemaOneof,
712178
712381
  preserveOneOfInAllOf: settings.preserveOneOfInAllOf,
712382
+ anyOfSiblingPropertiesAsObject: settings.anyOfSiblingPropertiesAsObject,
712179
712383
  inlineAllOfSchemas: settings.inlineAllOfSchemas,
712180
712384
  resolveAliases: settings.resolveAliases,
712181
712385
  groupMultiApiEnvironments: settings.groupMultiApiEnvironments,
@@ -885132,6 +885336,7 @@ var SETTINGS_KEY_MAP = {
885132
885336
  "type-dates-as-strings": "typeDatesAsStrings",
885133
885337
  "preserve-single-schema-oneof": "preserveSingleSchemaOneof",
885134
885338
  "preserve-one-of-in-all-of": "preserveOneOfInAllOf",
885339
+ "any-of-sibling-properties-as-object": "anyOfSiblingPropertiesAsObject",
885135
885340
  "inline-all-of-schemas": "inlineAllOfSchemas",
885136
885341
  "resolve-aliases": "resolveAliases",
885137
885342
  "group-multi-api-environments": "groupMultiApiEnvironments",
@@ -887041,7 +887246,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
887041
887246
  var LOGS_FOLDER_NAME = "logs";
887042
887247
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
887043
887248
  function getCliSource() {
887044
- const version7 = "5.110.0";
887249
+ const version7 = "5.111.0";
887045
887250
  return `cli@${version7}`;
887046
887251
  }
887047
887252
  var DebugLogger = class {
@@ -914005,7 +914210,7 @@ var LegacyDocsPublisher = class {
914005
914210
  previewId,
914006
914211
  disableTemplates: void 0,
914007
914212
  skipUpload,
914008
- cliVersion: "5.110.0",
914213
+ cliVersion: "5.111.0",
914009
914214
  loginCommand: "fern auth login"
914010
914215
  });
914011
914216
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -930482,16 +930687,16 @@ var TestClass = class extends Node5 {
930482
930687
  };
930483
930688
 
930484
930689
  // ../../../generators/csharp/codegen/lib/context/filesystem-nuget-publish-target.js
930485
- function isRecord2(value2) {
930690
+ function isRecord3(value2) {
930486
930691
  return typeof value2 === "object" && value2 != null;
930487
930692
  }
930488
930693
  function getFilesystemNugetPublishTarget(ir3) {
930489
930694
  const publishConfig = ir3.publishConfig;
930490
- if (!isRecord2(publishConfig) || publishConfig.type !== "filesystem") {
930695
+ if (!isRecord3(publishConfig) || publishConfig.type !== "filesystem") {
930491
930696
  return void 0;
930492
930697
  }
930493
930698
  const publishTarget = publishConfig.publishTarget;
930494
- if (!isRecord2(publishTarget) || publishTarget.type !== "nuget") {
930699
+ if (!isRecord3(publishTarget) || publishTarget.type !== "nuget") {
930495
930700
  return void 0;
930496
930701
  }
930497
930702
  return {
@@ -973180,11 +973385,11 @@ function getFirstUrlSegment({ path: path122 }) {
973180
973385
  }
973181
973386
 
973182
973387
  // ../docs-importers/mintlify/lib/MintlifyImporter.js
973183
- function isRecord3(value2) {
973388
+ function isRecord4(value2) {
973184
973389
  return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
973185
973390
  }
973186
973391
  function hasNavigationArray(value2) {
973187
- return isRecord3(value2) && Array.isArray(value2.navigation);
973392
+ return isRecord4(value2) && Array.isArray(value2.navigation);
973188
973393
  }
973189
973394
  var MintlifyImporter = class extends DocsImporter {
973190
973395
  documentationTab = void 0;
@@ -980925,7 +981130,7 @@ function getAutomationContextFromEnv() {
980925
981130
  config_branch: process.env.FERN_CONFIG_BRANCH,
980926
981131
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
980927
981132
  trigger: process.env.GITHUB_EVENT_NAME,
980928
- cli_version: "5.110.0"
981133
+ cli_version: "5.111.0"
980929
981134
  };
980930
981135
  }
980931
981136
  function isAutomationMode() {
@@ -981757,7 +981962,7 @@ var CliContext = class _CliContext {
981757
981962
  if (false) {
981758
981963
  this.logger.error("CLI_VERSION is not defined");
981759
981964
  }
981760
- return "5.110.0";
981965
+ return "5.111.0";
981761
981966
  }
981762
981967
  getCliName() {
981763
981968
  if (false) {
@@ -994973,7 +995178,7 @@ function upsertServerInJsonConfig({
994973
995178
  includeTransportType
994974
995179
  }) {
994975
995180
  const config5 = parseJsonConfig(existingContents);
994976
- const mcpServers = isRecord4(config5.mcpServers) ? config5.mcpServers : {};
995181
+ const mcpServers = isRecord5(config5.mcpServers) ? config5.mcpServers : {};
994977
995182
  config5.mcpServers = {
994978
995183
  ...mcpServers,
994979
995184
  [MCP_SERVER_NAME]: {
@@ -994990,12 +995195,12 @@ function parseJsonConfig(existingContents) {
994990
995195
  return {};
994991
995196
  }
994992
995197
  const parsed = JSON.parse(existingContents);
994993
- if (!isRecord4(parsed)) {
995198
+ if (!isRecord5(parsed)) {
994994
995199
  throw new Error("Expected the config to contain a JSON object");
994995
995200
  }
994996
995201
  return parsed;
994997
995202
  }
994998
- function isRecord4(value2) {
995203
+ function isRecord5(value2) {
994999
995204
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
995000
995205
  }
995001
995206
  var CODEX_SERVER_TABLE_PATH = `mcp_servers.${MCP_SERVER_NAME}`;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.110.0",
2
+ "version": "5.111.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",