@fern-api/fern-api-dev 4.37.9 → 4.37.11

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 +61 -12
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -568008,7 +568008,7 @@ var RequestBodyConverter = class extends converters_exports.AbstractConverters.A
568008
568008
  return {
568009
568009
  requestBody: HttpRequestBody.inlinedRequestBody({
568010
568010
  contentType,
568011
- docs: this.description,
568011
+ docs: this.description ?? convertedSchema.schema?.typeDeclaration.docs,
568012
568012
  name: this.context.casingsGenerator.generateName(this.schemaId),
568013
568013
  extendedProperties: requestBodyTypeShape.extendedProperties,
568014
568014
  extends: requestBodyTypeShape.extends,
@@ -568214,7 +568214,7 @@ var RequestBodyConverter = class extends converters_exports.AbstractConverters.A
568214
568214
  return {
568215
568215
  requestBody: HttpRequestBody.inlinedRequestBody({
568216
568216
  contentType,
568217
- docs: void 0,
568217
+ docs: this.description ?? convertedSchema.schema?.typeDeclaration.docs,
568218
568218
  name: this.context.casingsGenerator.generateName(isStreaming ? this.streamingExtension?.streamRequestName ?? `${this.schemaId}_streaming` : this.schemaId),
568219
568219
  extendedProperties: requestBodyTypeShape.extendedProperties,
568220
568220
  extends: requestBodyTypeShape.extends,
@@ -572006,6 +572006,43 @@ fern protoc-gen-fern "$@"
572006
572006
  `;
572007
572007
 
572008
572008
  // ../workspace/lazy-fern-workspace/lib/protobuf/ProtobufIRGenerator.js
572009
+ var fernGlobalInstallPromise;
572010
+ async function isFernOnPath(logger) {
572011
+ try {
572012
+ await runExeca(void 0, "fern", ["--version"], {
572013
+ stdout: "ignore",
572014
+ stderr: "ignore"
572015
+ });
572016
+ return true;
572017
+ } catch (error49) {
572018
+ const isNotFound = error49 != null && typeof error49 === "object" && "code" in error49 && error49.code === "ENOENT";
572019
+ if (!isNotFound) {
572020
+ logger.debug(`Unexpected error checking for fern on PATH: ${error49 instanceof Error ? error49.message : String(error49)}`);
572021
+ }
572022
+ return false;
572023
+ }
572024
+ }
572025
+ async function ensureFernGloballyInstalled(cwd2, logger) {
572026
+ if (await isFernOnPath(logger)) {
572027
+ return;
572028
+ }
572029
+ if (fernGlobalInstallPromise) {
572030
+ return fernGlobalInstallPromise;
572031
+ }
572032
+ fernGlobalInstallPromise = (async () => {
572033
+ try {
572034
+ await runExeca(void 0, "npm", ["install", "-g", "fern-api"], {
572035
+ cwd: cwd2,
572036
+ stdout: "ignore",
572037
+ stderr: "pipe"
572038
+ });
572039
+ } catch (err) {
572040
+ fernGlobalInstallPromise = void 0;
572041
+ throw err;
572042
+ }
572043
+ })();
572044
+ return fernGlobalInstallPromise;
572045
+ }
572009
572046
  var ProtobufIRGenerator = class {
572010
572047
  context;
572011
572048
  isAirGapped;
@@ -572114,11 +572151,7 @@ var ProtobufIRGenerator = class {
572114
572151
  stdout: "ignore",
572115
572152
  stderr: "pipe"
572116
572153
  });
572117
- await runExeca(void 0, "npm", ["install", "-g", "fern-api"], {
572118
- cwd: protobufGeneratorConfigPath,
572119
- stdout: "ignore",
572120
- stderr: "pipe"
572121
- });
572154
+ await ensureFernGloballyInstalled(protobufGeneratorConfigPath, this.context.logger);
572122
572155
  await (0, import_promises33.writeFile)(join2(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_GENERATOR_CONFIG_FILENAME)), PROTOBUF_GEN_CONFIG);
572123
572156
  const shellProxyPath = join2(protobufGeneratorConfigPath, RelativeFilePath2.of(PROTOBUF_SHELL_PROXY_FILENAME));
572124
572157
  await (0, import_promises33.writeFile)(shellProxyPath, PROTOBUF_SHELL_PROXY);
@@ -581567,7 +581600,7 @@ var AccessTokenPosthogManager = class {
581567
581600
  properties: {
581568
581601
  ...event,
581569
581602
  ...event.properties,
581570
- version: "4.37.9",
581603
+ version: "4.37.11",
581571
581604
  usingAccessToken: true
581572
581605
  }
581573
581606
  });
@@ -581618,7 +581651,7 @@ var UserPosthogManager = class {
581618
581651
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
581619
581652
  event: "CLI",
581620
581653
  properties: {
581621
- version: "4.37.9",
581654
+ version: "4.37.11",
581622
581655
  ...event,
581623
581656
  ...event.properties,
581624
581657
  usingAccessToken: false,
@@ -787721,7 +787754,7 @@ var import_path51 = __toESM(require("path"), 1);
787721
787754
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
787722
787755
  var LOGS_FOLDER_NAME = "logs";
787723
787756
  function getCliSource() {
787724
- const version8 = "4.37.9";
787757
+ const version8 = "4.37.11";
787725
787758
  return `cli@${version8}`;
787726
787759
  }
787727
787760
  var DebugLogger = class {
@@ -798516,7 +798549,7 @@ var LegacyDocsPublisher = class {
798516
798549
  previewId: void 0,
798517
798550
  disableTemplates: void 0,
798518
798551
  skipUpload,
798519
- cliVersion: "4.37.9"
798552
+ cliVersion: "4.37.11"
798520
798553
  });
798521
798554
  if (taskContext.getResult() === TaskResult.Failure) {
798522
798555
  return { success: false };
@@ -814005,6 +814038,17 @@ var Enum = class extends Node5 {
814005
814038
  writer2.pushScope();
814006
814039
  writer2.writeLine(`writer.WriteStringValue(_enumToString.TryGetValue(value, out var stringValue) ? stringValue : null);`);
814007
814040
  writer2.popScope();
814041
+ writer2.newLine();
814042
+ writer2.writeLine(`public override ${this.name} ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options)`);
814043
+ writer2.pushScope();
814044
+ writer2.writeLine(`var stringValue = reader.GetString() ?? throw new global::System.Exception("The JSON property name could not be read as a string.");`);
814045
+ writer2.writeLine(`return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default;`);
814046
+ writer2.popScope();
814047
+ writer2.newLine();
814048
+ writer2.writeLine(`public override void WriteAsPropertyName(global::System.Text.Json.Utf8JsonWriter writer, ${this.name} value, global::System.Text.Json.JsonSerializerOptions options)`);
814049
+ writer2.pushScope();
814050
+ writer2.writeLine(`writer.WritePropertyName(_enumToString.TryGetValue(value, out var stringValue) ? stringValue : value.ToString());`);
814051
+ writer2.popScope();
814008
814052
  writer2.popScope();
814009
814053
  }
814010
814054
  };
@@ -818009,6 +818053,11 @@ var Generation = class {
818009
818053
  origin: this.model.staticExplicit("Closed"),
818010
818054
  namespace: this.namespaces.webSocketsCore
818011
818055
  }),
818056
+ /** Reconnection info for WebSocket connections */
818057
+ ReconnectionInfo: () => this.csharp.classReference({
818058
+ origin: this.model.staticExplicit("ReconnectionInfo"),
818059
+ namespace: this.namespaces.webSocketsCore
818060
+ }),
818012
818061
  /**
818013
818062
  * Custom pagination class for iterating over paged results.
818014
818063
  * @param itemType - The type of items in each page
@@ -871091,7 +871140,7 @@ var CliContext = class {
871091
871140
  if (false) {
871092
871141
  this.logger.error("CLI_VERSION is not defined");
871093
871142
  }
871094
- return "4.37.9";
871143
+ return "4.37.11";
871095
871144
  }
871096
871145
  getCliName() {
871097
871146
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.37.9",
2
+ "version": "4.37.11",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",