@fern-api/fern-api-dev 5.23.3-2169-g281ae2aaa8b → 5.23.3-2174-ge9a9c59f582

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 +43 -37
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -706738,7 +706738,7 @@ var AccessTokenPosthogManager = class {
706738
706738
  properties: {
706739
706739
  ...event,
706740
706740
  ...event.properties,
706741
- version: "5.23.3-2169-g281ae2aaa8b",
706741
+ version: "5.23.3-2174-ge9a9c59f582",
706742
706742
  usingAccessToken: true,
706743
706743
  ...getRunIdProperties()
706744
706744
  }
@@ -706804,7 +706804,7 @@ var UserPosthogManager = class {
706804
706804
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
706805
706805
  event: "CLI",
706806
706806
  properties: {
706807
- version: "5.23.3-2169-g281ae2aaa8b",
706807
+ version: "5.23.3-2174-ge9a9c59f582",
706808
706808
  ...event,
706809
706809
  ...event.properties,
706810
706810
  usingAccessToken: false,
@@ -888507,7 +888507,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
888507
888507
  var LOGS_FOLDER_NAME = "logs";
888508
888508
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
888509
888509
  function getCliSource() {
888510
- const version7 = "5.23.3-2169-g281ae2aaa8b";
888510
+ const version7 = "5.23.3-2174-ge9a9c59f582";
888511
888511
  return `cli@${version7}`;
888512
888512
  }
888513
888513
  var DebugLogger = class {
@@ -915855,7 +915855,7 @@ var LegacyDocsPublisher = class {
915855
915855
  previewId,
915856
915856
  disableTemplates: void 0,
915857
915857
  skipUpload,
915858
- cliVersion: "5.23.3-2169-g281ae2aaa8b",
915858
+ cliVersion: "5.23.3-2174-ge9a9c59f582",
915859
915859
  loginCommand: "fern auth login"
915860
915860
  });
915861
915861
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -954562,11 +954562,16 @@ var IfElse = class extends AstNode6 {
954562
954562
  ifBranch;
954563
954563
  elseIfs;
954564
954564
  elseBody;
954565
- constructor({ if: ifBranch, elseIf, elseBody }) {
954565
+ negated;
954566
+ constructor({ if: ifBranch, elseIf, elseBody, negated }) {
954566
954567
  super();
954567
954568
  this.ifBranch = ifBranch;
954568
954569
  this.elseIfs = elseIf ?? [];
954569
954570
  this.elseBody = elseBody ? Array.isArray(elseBody) ? elseBody : [elseBody] : void 0;
954571
+ this.negated = negated ?? false;
954572
+ if (this.negated && this.elseIfs.length > 0) {
954573
+ throw new Error("Ruby has no `elsunless`; a negated IfElse cannot have elseIf branches");
954574
+ }
954570
954575
  }
954571
954576
  write(writer2) {
954572
954577
  const modifier = this.renderAsModifier(writer2);
@@ -954575,7 +954580,7 @@ var IfElse = class extends AstNode6 {
954575
954580
  writer2.writeNewLineIfLastLineNot();
954576
954581
  return;
954577
954582
  }
954578
- writer2.write("if ");
954583
+ writer2.write(this.negated ? "unless " : "if ");
954579
954584
  this.ifBranch.condition.write(writer2);
954580
954585
  writer2.writeLine();
954581
954586
  writer2.indent();
@@ -954608,8 +954613,8 @@ var IfElse = class extends AstNode6 {
954608
954613
  writer2.writeNewLineIfLastLineNot();
954609
954614
  }
954610
954615
  /**
954611
- * Returns the modifier-form rendering (`stmt if cond`) when this if is
954612
- * eligible:
954616
+ * Returns the modifier-form rendering (`stmt if cond`, or `stmt unless cond`
954617
+ * when negated) when this if is eligible:
954613
954618
  * - exactly one statement in the then-body
954614
954619
  * - no elsif and no else
954615
954620
  * - the single statement is not an intrinsically multi-line AST node
@@ -954649,7 +954654,7 @@ var IfElse = class extends AstNode6 {
954649
954654
  if (stmtRendered.includes("\n") || conditionRendered.includes("\n")) {
954650
954655
  return void 0;
954651
954656
  }
954652
- return `${stmtRendered} if ${conditionRendered}`;
954657
+ return `${stmtRendered} ${this.negated ? "unless" : "if"} ${conditionRendered}`;
954653
954658
  }
954654
954659
  };
954655
954660
  function isKnownMultiLineNode(node4) {
@@ -954790,17 +954795,19 @@ var MethodInvocation6 = class extends AstNode6 {
954790
954795
  arguments_;
954791
954796
  keywordArguments;
954792
954797
  block;
954793
- constructor({ on: on2, method: method8, arguments_, keywordArguments, block: block2 }) {
954798
+ safeNavigation;
954799
+ constructor({ on: on2, method: method8, arguments_, keywordArguments, block: block2, safeNavigation }) {
954794
954800
  super();
954795
954801
  this.on = on2;
954796
954802
  this.method = method8;
954797
954803
  this.arguments_ = arguments_;
954798
954804
  this.keywordArguments = keywordArguments;
954799
954805
  this.block = block2;
954806
+ this.safeNavigation = safeNavigation ?? false;
954800
954807
  }
954801
954808
  write(writer2) {
954802
954809
  this.on.write(writer2);
954803
- writer2.write(".");
954810
+ writer2.write(this.safeNavigation ? "&." : ".");
954804
954811
  writer2.write(this.method);
954805
954812
  const allArguments = [];
954806
954813
  for (const node4 of this.arguments_) {
@@ -954809,31 +954816,30 @@ var MethodInvocation6 = class extends AstNode6 {
954809
954816
  for (const arg of this.keywordArguments || []) {
954810
954817
  allArguments.push({ kind: "keyword", arg });
954811
954818
  }
954812
- if (allArguments.length === 0 && this.block == null) {
954813
- return;
954814
- }
954815
- writer2.write("(");
954816
- if (allArguments.length > 1) {
954817
- writer2.indent();
954818
- writer2.newLine();
954819
- allArguments.forEach((argument, index3) => {
954820
- if (index3 > 0) {
954821
- writer2.write(",");
954822
- writer2.newLine();
954823
- }
954824
- writeArgument3(writer2, argument);
954825
- });
954826
- writer2.newLine();
954827
- writer2.dedent();
954828
- } else {
954829
- allArguments.forEach((argument, index3) => {
954830
- if (index3 > 0) {
954831
- writer2.write(", ");
954832
- }
954833
- writeArgument3(writer2, argument);
954834
- });
954819
+ if (allArguments.length > 0) {
954820
+ writer2.write("(");
954821
+ if (allArguments.length > 1) {
954822
+ writer2.indent();
954823
+ writer2.newLine();
954824
+ allArguments.forEach((argument, index3) => {
954825
+ if (index3 > 0) {
954826
+ writer2.write(",");
954827
+ writer2.newLine();
954828
+ }
954829
+ writeArgument3(writer2, argument);
954830
+ });
954831
+ writer2.newLine();
954832
+ writer2.dedent();
954833
+ } else {
954834
+ allArguments.forEach((argument, index3) => {
954835
+ if (index3 > 0) {
954836
+ writer2.write(", ");
954837
+ }
954838
+ writeArgument3(writer2, argument);
954839
+ });
954840
+ }
954841
+ writer2.write(")");
954835
954842
  }
954836
- writer2.write(")");
954837
954843
  if (this.block) {
954838
954844
  const [args, codelines] = this.block;
954839
954845
  writer2.write(" do");
@@ -983273,7 +983279,7 @@ function getAutomationContextFromEnv() {
983273
983279
  config_branch: process.env.FERN_CONFIG_BRANCH,
983274
983280
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
983275
983281
  trigger: process.env.GITHUB_EVENT_NAME,
983276
- cli_version: "5.23.3-2169-g281ae2aaa8b"
983282
+ cli_version: "5.23.3-2174-ge9a9c59f582"
983277
983283
  };
983278
983284
  }
983279
983285
  function isAutomationMode() {
@@ -984105,7 +984111,7 @@ var CliContext = class _CliContext {
984105
984111
  if (false) {
984106
984112
  this.logger.error("CLI_VERSION is not defined");
984107
984113
  }
984108
- return "5.23.3-2169-g281ae2aaa8b";
984114
+ return "5.23.3-2174-ge9a9c59f582";
984109
984115
  }
984110
984116
  getCliName() {
984111
984117
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.23.3-2169-g281ae2aaa8b",
2
+ "version": "5.23.3-2174-ge9a9c59f582",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",