@fern-api/fern-api-dev 4.65.3-4-g72908b63716 → 4.65.3-6-gfc20f801ab1

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 +33 -10
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -363152,9 +363152,9 @@ var require_diff3 = __commonJS({
363152
363152
  }
363153
363153
  });
363154
363154
 
363155
- // ../../../node_modules/.pnpm/@fern-api+replay@0.10.1/node_modules/@fern-api/replay/dist/index.cjs
363155
+ // ../../../node_modules/.pnpm/@fern-api+replay@0.10.2/node_modules/@fern-api/replay/dist/index.cjs
363156
363156
  var require_dist14 = __commonJS({
363157
- "../../../node_modules/.pnpm/@fern-api+replay@0.10.1/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
363157
+ "../../../node_modules/.pnpm/@fern-api+replay@0.10.2/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
363158
363158
  "use strict";
363159
363159
  var __defProp4 = Object.defineProperty;
363160
363160
  var __getOwnPropDesc4 = Object.getOwnPropertyDescriptor;
@@ -364389,9 +364389,10 @@ var require_dist14 = __commonJS({
364389
364389
  const resolvedPath = await this.resolveFilePath(filePath, baseGen.tree_hash, currentTreeHash);
364390
364390
  const base4 = await this.git.showFile(baseGen.tree_hash, filePath);
364391
364391
  const theirs = await this.applyPatchToContent(base4, patch5.patch_content, filePath, tempGit, tempDir2);
364392
- if (theirs) {
364392
+ const effectiveTheirs = theirs ?? await (0, import_promises182.readFile)((0, import_node_path210.join)(this.outputDir, resolvedPath), "utf-8").catch(() => null);
364393
+ if (effectiveTheirs) {
364393
364394
  this.fileTheirsAccumulator.set(resolvedPath, {
364394
- content: theirs,
364395
+ content: effectiveTheirs,
364395
364396
  baseGeneration: patch5.base_generation
364396
364397
  });
364397
364398
  }
@@ -364435,8 +364436,12 @@ var require_dist14 = __commonJS({
364435
364436
  };
364436
364437
  } catch {
364437
364438
  for (const [resolvedPath, content5] of snapshots) {
364439
+ const fullPath = (0, import_node_path210.join)(this.outputDir, resolvedPath);
364438
364440
  if (content5 != null) {
364439
- await (0, import_promises182.writeFile)((0, import_node_path210.join)(this.outputDir, resolvedPath), content5);
364441
+ await (0, import_promises182.writeFile)(fullPath, content5);
364442
+ } else {
364443
+ await (0, import_promises182.unlink)(fullPath).catch(() => {
364444
+ });
364440
364445
  }
364441
364446
  }
364442
364447
  }
@@ -627383,7 +627388,7 @@ var AccessTokenPosthogManager = class {
627383
627388
  properties: {
627384
627389
  ...event,
627385
627390
  ...event.properties,
627386
- version: "4.65.3-4-g72908b63716",
627391
+ version: "4.65.3-6-gfc20f801ab1",
627387
627392
  usingAccessToken: true
627388
627393
  }
627389
627394
  });
@@ -627434,7 +627439,7 @@ var UserPosthogManager = class {
627434
627439
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
627435
627440
  event: "CLI",
627436
627441
  properties: {
627437
- version: "4.65.3-4-g72908b63716",
627442
+ version: "4.65.3-6-gfc20f801ab1",
627438
627443
  ...event,
627439
627444
  ...event.properties,
627440
627445
  usingAccessToken: false,
@@ -843663,7 +843668,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
843663
843668
  var LOGS_FOLDER_NAME = "logs";
843664
843669
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
843665
843670
  function getCliSource() {
843666
- const version7 = "4.65.3-4-g72908b63716";
843671
+ const version7 = "4.65.3-6-gfc20f801ab1";
843667
843672
  return `cli@${version7}`;
843668
843673
  }
843669
843674
  var DebugLogger = class {
@@ -854861,7 +854866,7 @@ var LegacyDocsPublisher = class {
854861
854866
  previewId,
854862
854867
  disableTemplates: void 0,
854863
854868
  skipUpload,
854864
- cliVersion: "4.65.3-4-g72908b63716"
854869
+ cliVersion: "4.65.3-6-gfc20f801ab1"
854865
854870
  });
854866
854871
  if (taskContext.getResult() === TaskResult.Failure) {
854867
854872
  return { success: false };
@@ -875030,6 +875035,9 @@ var DynamicLiteralMapper = class extends WithGeneration {
875030
875035
  });
875031
875036
  }
875032
875037
  convertLiteral({ literal: literal3, value, fallbackToDefault }) {
875038
+ if (this.settings.generateLiterals) {
875039
+ return this.csharp.Literal.nop();
875040
+ }
875033
875041
  switch (literal3.type) {
875034
875042
  case "boolean": {
875035
875043
  const bool2 = this.context.getValueAsBoolean({ value });
@@ -875096,6 +875104,15 @@ var DynamicLiteralMapper = class extends WithGeneration {
875096
875104
  convertNamed({ named, value, as: as8, fallbackToDefault }) {
875097
875105
  switch (named.type) {
875098
875106
  case "alias":
875107
+ if (this.settings.generateLiterals && named.typeReference.type === "literal") {
875108
+ return this.csharp.Literal.reference(this.csharp.instantiateClass({
875109
+ classReference: this.csharp.classReference({
875110
+ origin: named.declaration,
875111
+ namespace: this.context.getNamespace(named.declaration.fernFilepath)
875112
+ }),
875113
+ arguments_: []
875114
+ }));
875115
+ }
875099
875116
  return this.convert({ typeReference: named.typeReference, value, as: as8, fallbackToDefault });
875100
875117
  case "discriminatedUnion":
875101
875118
  if (this.settings.shouldGeneratedDiscriminatedUnions) {
@@ -875604,6 +875621,12 @@ var DynamicTypeMapper = class extends WithGeneration {
875604
875621
  convertNamed({ named }) {
875605
875622
  switch (named.type) {
875606
875623
  case "alias":
875624
+ if (this.settings.generateLiterals && named.typeReference.type === "literal") {
875625
+ return this.csharp.classReference({
875626
+ origin: named.declaration,
875627
+ namespace: this.context.getNamespace(named.declaration.fernFilepath)
875628
+ });
875629
+ }
875607
875630
  return this.convert({ typeReference: named.typeReference });
875608
875631
  case "enum":
875609
875632
  case "object":
@@ -928419,7 +928442,7 @@ var CliContext = class {
928419
928442
  if (false) {
928420
928443
  this.logger.error("CLI_VERSION is not defined");
928421
928444
  }
928422
- return "4.65.3-4-g72908b63716";
928445
+ return "4.65.3-6-gfc20f801ab1";
928423
928446
  }
928424
928447
  getCliName() {
928425
928448
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.65.3-4-g72908b63716",
2
+ "version": "4.65.3-6-gfc20f801ab1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",