@fern-api/fern-api-dev 5.109.1 → 5.109.3

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 +76 -10
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -347311,6 +347311,9 @@ var init_ErrorCollector = __esm({
347311
347311
  });
347312
347312
 
347313
347313
  // ../api-importers/v3-importer-commons/lib/AbstractConverterContext.js
347314
+ function isMarkedDeprecated(node4) {
347315
+ return "deprecated" in node4 && node4.deprecated === true;
347316
+ }
347314
347317
  var AbstractConverterContext;
347315
347318
  var init_AbstractConverterContext = __esm({
347316
347319
  "../api-importers/v3-importer-commons/lib/AbstractConverterContext.js"() {
@@ -347733,13 +347736,30 @@ var init_AbstractConverterContext = __esm({
347733
347736
  return converted.audiences;
347734
347737
  }
347735
347738
  getAvailability({ node: node4, breadcrumbs }) {
347739
+ const visitedReferences = /* @__PURE__ */ new Set();
347736
347740
  while (this.isReferenceObject(node4)) {
347741
+ const declared = this.getDeclaredAvailability({ node: node4, breadcrumbs });
347742
+ if (declared != null) {
347743
+ return declared;
347744
+ }
347745
+ if (visitedReferences.has(node4.$ref)) {
347746
+ return void 0;
347747
+ }
347748
+ visitedReferences.add(node4.$ref);
347737
347749
  const resolved = this.resolveReference({ reference: node4 });
347738
347750
  if (!resolved.resolved) {
347739
347751
  return void 0;
347740
347752
  }
347741
347753
  node4 = resolved.value;
347742
347754
  }
347755
+ return this.getDeclaredAvailability({ node: node4, breadcrumbs });
347756
+ }
347757
+ /**
347758
+ * Reads the availability declared directly on a node, without resolving references.
347759
+ * Annotations written alongside a `$ref` describe that particular usage, so callers
347760
+ * consult them before falling back to the referenced schema.
347761
+ */
347762
+ getDeclaredAvailability({ node: node4, breadcrumbs }) {
347743
347763
  const availabilityExtension = new extensions_exports.FernAvailabilityExtension({
347744
347764
  node: node4,
347745
347765
  breadcrumbs,
@@ -347752,7 +347772,7 @@ var init_AbstractConverterContext = __esm({
347752
347772
  message: void 0
347753
347773
  };
347754
347774
  }
347755
- if (node4.deprecated === true) {
347775
+ if (isMarkedDeprecated(node4)) {
347756
347776
  return {
347757
347777
  status: AvailabilityStatus.Deprecated,
347758
347778
  message: void 0
@@ -352364,7 +352384,11 @@ var init_SchemaOrReferenceConverter = __esm({
352364
352384
  if (response.ok) {
352365
352385
  return {
352366
352386
  type: this.wrapTypeReference(response.reference),
352367
- inlinedTypes: response.inlinedTypes ?? {}
352387
+ inlinedTypes: response.inlinedTypes ?? {},
352388
+ availability: this.context.getAvailability({
352389
+ node: schemaOrReference,
352390
+ breadcrumbs: this.breadcrumbs
352391
+ })
352368
352392
  };
352369
352393
  }
352370
352394
  }
@@ -352384,7 +352408,8 @@ var init_SchemaOrReferenceConverter = __esm({
352384
352408
  if (response.ok) {
352385
352409
  return {
352386
352410
  type: this.wrapTypeReference(response.reference),
352387
- inlinedTypes: response.inlinedTypes ?? {}
352411
+ inlinedTypes: response.inlinedTypes ?? {},
352412
+ availability: this.getAvailabilityOfSelfOrReference(allOfReference)
352388
352413
  };
352389
352414
  }
352390
352415
  }
@@ -352406,13 +352431,39 @@ var init_SchemaOrReferenceConverter = __esm({
352406
352431
  if (response.ok) {
352407
352432
  return {
352408
352433
  type: this.wrapTypeReference(response.reference),
352409
- inlinedTypes: response.inlinedTypes ?? {}
352434
+ inlinedTypes: response.inlinedTypes ?? {},
352435
+ availability: this.getAvailabilityOfSelfOrReference(singleRef)
352410
352436
  };
352411
352437
  }
352412
352438
  }
352413
352439
  }
352414
352440
  return void 0;
352415
352441
  }
352442
+ /**
352443
+ * Availability declared alongside the `allOf` takes precedence over the availability
352444
+ * of the referenced schema, since the outer schema is the more specific declaration.
352445
+ * Inline `allOf` siblings are consulted next: when the sibling carries nothing but
352446
+ * metadata we short-circuit to the `$ref`, so a `deprecated` written there would
352447
+ * otherwise be dropped.
352448
+ */
352449
+ getAvailabilityOfSelfOrReference(reference4) {
352450
+ for (const node4 of [...this.getSelfAndInlineAllOfElements(), reference4]) {
352451
+ const availability = this.context.getAvailability({ node: node4, breadcrumbs: this.breadcrumbs });
352452
+ if (availability != null) {
352453
+ return availability;
352454
+ }
352455
+ }
352456
+ return void 0;
352457
+ }
352458
+ getSelfAndInlineAllOfElements() {
352459
+ if (this.context.isReferenceObject(this.schemaOrReference) || this.schemaOrReference.allOf == null) {
352460
+ return [this.schemaOrReference];
352461
+ }
352462
+ return [
352463
+ this.schemaOrReference,
352464
+ ...this.schemaOrReference.allOf.filter((element4) => !this.context.isReferenceObject(element4))
352465
+ ];
352466
+ }
352416
352467
  convertSchemaObject({ schema }) {
352417
352468
  const schemaId = this.schemaIdOverride ?? this.context.convertBreadcrumbsToName(this.breadcrumbs);
352418
352469
  const namespacedSchemaId = this.context.getNamespacedSchemaId(schemaId);
@@ -373999,6 +374050,17 @@ async function getAuthFromOverrideFiles(specs) {
373999
374050
  }
374000
374051
  return void 0;
374001
374052
  }
374053
+ function getOrphanedAuthSchemeWarning(api2) {
374054
+ if (api2?.auth != null) {
374055
+ return void 0;
374056
+ }
374057
+ const names2 = Object.keys(api2?.["auth-schemes"] ?? {});
374058
+ const first3 = names2[0];
374059
+ if (first3 == null) {
374060
+ return void 0;
374061
+ }
374062
+ return `generators.yml declares auth-schemes (${names2.join(", ")}) but no \`api.auth\`, so the entire auth-schemes block is ignored \u2014 including any \`env:\` overrides. Add \`auth: ${first3}\` under \`api\`` + (names2.length > 1 ? ", or list them all under an `auth.any` key" : "") + ". Without it, auth is re-derived from the spec's securitySchemes and each generator falls back to its own default environment variable name.";
374063
+ }
374002
374064
  var import_promises41, OSSWorkspace;
374003
374065
  var init_OSSWorkspace = __esm({
374004
374066
  "../workspace/lazy-fern-workspace/lib/OSSWorkspace.js"() {
@@ -374176,6 +374238,10 @@ var init_OSSWorkspace = __esm({
374176
374238
  const specs = await this.getOpenAPISpecsCached({ context: context3 });
374177
374239
  const documents = await this.loader.loadDocuments({ context: context3, specs });
374178
374240
  let authOverrides = this.generatorsConfiguration?.api?.auth != null ? { ...this.generatorsConfiguration?.api } : void 0;
374241
+ const orphanedAuthSchemeWarning = getOrphanedAuthSchemeWarning(this.generatorsConfiguration?.api);
374242
+ if (orphanedAuthSchemeWarning != null) {
374243
+ context3.logger.warn(orphanedAuthSchemeWarning);
374244
+ }
374179
374245
  if (authOverrides == null) {
374180
374246
  authOverrides = await getAuthFromOverrideFiles(specs);
374181
374247
  }
@@ -705213,7 +705279,7 @@ var AccessTokenPosthogManager = class {
705213
705279
  properties: {
705214
705280
  ...event,
705215
705281
  ...event.properties,
705216
- version: "5.109.1",
705282
+ version: "5.109.3",
705217
705283
  usingAccessToken: true,
705218
705284
  ...getRunIdProperties()
705219
705285
  }
@@ -705279,7 +705345,7 @@ var UserPosthogManager = class {
705279
705345
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
705280
705346
  event: "CLI",
705281
705347
  properties: {
705282
- version: "5.109.1",
705348
+ version: "5.109.3",
705283
705349
  ...event,
705284
705350
  ...event.properties,
705285
705351
  usingAccessToken: false,
@@ -886953,7 +887019,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
886953
887019
  var LOGS_FOLDER_NAME = "logs";
886954
887020
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
886955
887021
  function getCliSource() {
886956
- const version7 = "5.109.1";
887022
+ const version7 = "5.109.3";
886957
887023
  return `cli@${version7}`;
886958
887024
  }
886959
887025
  var DebugLogger = class {
@@ -913917,7 +913983,7 @@ var LegacyDocsPublisher = class {
913917
913983
  previewId,
913918
913984
  disableTemplates: void 0,
913919
913985
  skipUpload,
913920
- cliVersion: "5.109.1",
913986
+ cliVersion: "5.109.3",
913921
913987
  loginCommand: "fern auth login"
913922
913988
  });
913923
913989
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -980837,7 +980903,7 @@ function getAutomationContextFromEnv() {
980837
980903
  config_branch: process.env.FERN_CONFIG_BRANCH,
980838
980904
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
980839
980905
  trigger: process.env.GITHUB_EVENT_NAME,
980840
- cli_version: "5.109.1"
980906
+ cli_version: "5.109.3"
980841
980907
  };
980842
980908
  }
980843
980909
  function isAutomationMode() {
@@ -981669,7 +981735,7 @@ var CliContext = class _CliContext {
981669
981735
  if (false) {
981670
981736
  this.logger.error("CLI_VERSION is not defined");
981671
981737
  }
981672
- return "5.109.1";
981738
+ return "5.109.3";
981673
981739
  }
981674
981740
  getCliName() {
981675
981741
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.109.1",
2
+ "version": "5.109.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",