@fern-api/fern-api-dev 3.30.4 → 3.30.6

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 +59 -22
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1413665,7 +1413665,7 @@ var AccessTokenPosthogManager = class {
1413665
1413665
  properties: {
1413666
1413666
  ...event,
1413667
1413667
  ...event.properties,
1413668
- version: "3.30.4",
1413668
+ version: "3.30.6",
1413669
1413669
  usingAccessToken: true
1413670
1413670
  }
1413671
1413671
  });
@@ -1413764,7 +1413764,7 @@ var UserPosthogManager = class {
1413764
1413764
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1413765
1413765
  event: "CLI",
1413766
1413766
  properties: {
1413767
- version: "3.30.4",
1413767
+ version: "3.30.6",
1413768
1413768
  ...event,
1413769
1413769
  ...event.properties,
1413770
1413770
  usingAccessToken: false,
@@ -1493831,7 +1493831,7 @@ var CliContext = class {
1493831
1493831
  if (false) {
1493832
1493832
  this.logger.error("CLI_VERSION is not defined");
1493833
1493833
  }
1493834
- return "3.30.4";
1493834
+ return "3.30.6";
1493835
1493835
  }
1493836
1493836
  getCliName() {
1493837
1493837
  if (false) {
@@ -1534528,6 +1534528,30 @@ var AsyncAPIConverterContext = class extends AbstractConverterContext {
1534528
1534528
  // ../api-importers/openapi-to-ir/lib/3.1/OpenAPIConverter.js
1534529
1534529
  var import_openapi_types2 = __toESM(require_dist20(), 1);
1534530
1534530
 
1534531
+ // ../api-importers/openapi-to-ir/lib/extensions/x-fern-base-path.js
1534532
+ var FernBasePathExtension = class extends AbstractExtension {
1534533
+ document;
1534534
+ key = "x-fern-base-path";
1534535
+ constructor({ breadcrumbs, document: document4, context: context2 }) {
1534536
+ super({ breadcrumbs, context: context2 });
1534537
+ this.document = document4;
1534538
+ }
1534539
+ convert() {
1534540
+ const extensionValue = this.getExtensionValue(this.document);
1534541
+ if (extensionValue == null) {
1534542
+ return void 0;
1534543
+ }
1534544
+ if (typeof extensionValue !== "string") {
1534545
+ this.context.errorCollector.collect({
1534546
+ message: "Received unexpected non-string value for x-fern-base-path",
1534547
+ path: this.breadcrumbs
1534548
+ });
1534549
+ return void 0;
1534550
+ }
1534551
+ return extensionValue;
1534552
+ }
1534553
+ };
1534554
+
1534531
1534555
  // ../api-importers/openapi-to-ir/lib/extensions/x-fern-global-headers.js
1534532
1534556
  var FernGlobalHeadersExtension = class extends AbstractExtension {
1534533
1534557
  document;
@@ -1537051,6 +1537075,7 @@ var OpenAPIConverter = class extends AbstractSpecConverter {
1537051
1537075
  this.overrideOpenApiAuthWithGeneratorsAuth();
1537052
1537076
  this.convertSecuritySchemes();
1537053
1537077
  this.convertGlobalHeaders();
1537078
+ this.convertBasePath();
1537054
1537079
  this.convertSchemas();
1537055
1537080
  this.convertWebhooks();
1537056
1537081
  const { endpointLevelServers, errors: errors4 } = this.convertPaths();
@@ -1537081,6 +1537106,17 @@ var OpenAPIConverter = class extends AbstractSpecConverter {
1537081
1537106
  this.context.setGlobalHeaders(globalHeaders);
1537082
1537107
  }
1537083
1537108
  }
1537109
+ convertBasePath() {
1537110
+ const basePathExtension = new FernBasePathExtension({
1537111
+ breadcrumbs: ["x-fern-base-path"],
1537112
+ document: this.context.spec,
1537113
+ context: this.context
1537114
+ });
1537115
+ const basePath = basePathExtension.convert();
1537116
+ if (basePath != null) {
1537117
+ this.ir.basePath = constructHttpPath(basePath);
1537118
+ }
1537119
+ }
1537084
1537120
  convertSecuritySchemes() {
1537085
1537121
  if (this.context.authOverrides) {
1537086
1537122
  const overrideAuth = convertApiAuth({
@@ -1588652,7 +1588688,7 @@ var import_path35 = __toESM(require("path"), 1);
1588652
1588688
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1588653
1588689
  var LOGS_FOLDER_NAME = "logs";
1588654
1588690
  function getCliSource() {
1588655
- const version6 = "3.30.4";
1588691
+ const version6 = "3.30.6";
1588656
1588692
  return `cli@${version6}`;
1588657
1588693
  }
1588658
1588694
  var DebugLogger = class {
@@ -1622686,23 +1622722,6 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
1622686
1622722
  interactiveTaskContext.logger.debug("Setting IR source configuration ...");
1622687
1622723
  ir14.sourceConfig = sourceConfig;
1622688
1622724
  }
1622689
- if (generatorInvocation.language != null && packageName != null && resolvedVersion != null && !isPreview) {
1622690
- try {
1622691
- await uploadDynamicIRForSdkGeneration({
1622692
- fdr,
1622693
- organization,
1622694
- version: resolvedVersion,
1622695
- language: generatorInvocation.language,
1622696
- packageName,
1622697
- ir: ir14,
1622698
- smartCasing: generatorInvocation.smartCasing,
1622699
- dynamicGeneratorConfig,
1622700
- context: interactiveTaskContext
1622701
- });
1622702
- } catch (error2) {
1622703
- interactiveTaskContext.logger.warn(`Failed to upload dynamic IR for SDK generation: ${error2 instanceof Error ? error2.message : String(error2)}`);
1622704
- }
1622705
- }
1622706
1622725
  const job = await createAndStartJob({
1622707
1622726
  projectConfig,
1622708
1622727
  workspace,
@@ -1622736,12 +1622755,30 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
1622736
1622755
  interactiveTaskContext,
1622737
1622756
  absolutePathToPreview
1622738
1622757
  });
1622739
- return await pollJobAndReportStatus({
1622758
+ const result = await pollJobAndReportStatus({
1622740
1622759
  job,
1622741
1622760
  taskHandler,
1622742
1622761
  taskId,
1622743
1622762
  context: interactiveTaskContext
1622744
1622763
  });
1622764
+ if (result != null && generatorInvocation.language != null && packageName != null && resolvedVersion != null && !isPreview) {
1622765
+ try {
1622766
+ await uploadDynamicIRForSdkGeneration({
1622767
+ fdr,
1622768
+ organization,
1622769
+ version: resolvedVersion,
1622770
+ language: generatorInvocation.language,
1622771
+ packageName,
1622772
+ ir: ir14,
1622773
+ smartCasing: generatorInvocation.smartCasing,
1622774
+ dynamicGeneratorConfig,
1622775
+ context: interactiveTaskContext
1622776
+ });
1622777
+ } catch (error2) {
1622778
+ interactiveTaskContext.logger.warn(`Failed to upload dynamic IR for SDK generation: ${error2 instanceof Error ? error2.message : String(error2)}`);
1622779
+ }
1622780
+ }
1622781
+ return result;
1622745
1622782
  }
1622746
1622783
  function getPublishConfig({ generatorInvocation }) {
1622747
1622784
  return generatorInvocation.outputMode._visit({
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.30.4",
2
+ "version": "3.30.6",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",