@fern-api/fern-api-dev 4.67.1-5-g6f7f6d50210 → 4.67.1-57-gcb2da2e3a5f

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 +91 -41
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -363248,9 +363248,9 @@ var require_diff3 = __commonJS({
363248
363248
  }
363249
363249
  });
363250
363250
 
363251
- // ../../../node_modules/.pnpm/@fern-api+replay@0.10.3/node_modules/@fern-api/replay/dist/index.cjs
363251
+ // ../../../node_modules/.pnpm/@fern-api+replay@0.10.4/node_modules/@fern-api/replay/dist/index.cjs
363252
363252
  var require_dist14 = __commonJS({
363253
- "../../../node_modules/.pnpm/@fern-api+replay@0.10.3/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
363253
+ "../../../node_modules/.pnpm/@fern-api+replay@0.10.4/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
363254
363254
  "use strict";
363255
363255
  var __defProp4 = Object.defineProperty;
363256
363256
  var __getOwnPropDesc4 = Object.getOwnPropertyDescriptor;
@@ -363893,6 +363893,7 @@ var require_dist14 = __commonJS({
363893
363893
  }
363894
363894
  const log4 = await this.git.exec([
363895
363895
  "log",
363896
+ "--first-parent",
363896
363897
  "--format=%H%x00%an%x00%ae%x00%s",
363897
363898
  `${lastGen.commit_sha}..HEAD`,
363898
363899
  "--",
@@ -363908,11 +363909,20 @@ var require_dist14 = __commonJS({
363908
363909
  if (isGenerationCommit(commit)) {
363909
363910
  continue;
363910
363911
  }
363911
- const parents = await this.git.getCommitParents(commit.sha);
363912
- if (parents.length > 1) {
363912
+ if (lock.patches.find((p10) => p10.original_commit === commit.sha)) {
363913
363913
  continue;
363914
363914
  }
363915
- if (lock.patches.find((p10) => p10.original_commit === commit.sha)) {
363915
+ const parents = await this.git.getCommitParents(commit.sha);
363916
+ if (parents.length > 1) {
363917
+ const compositePatch = await this.createMergeCompositePatch({
363918
+ mergeCommit: commit,
363919
+ firstParent: parents[0],
363920
+ lastGen,
363921
+ lock
363922
+ });
363923
+ if (compositePatch) {
363924
+ newPatches.push(compositePatch);
363925
+ }
363916
363926
  continue;
363917
363927
  }
363918
363928
  let patchContent;
@@ -364011,6 +364021,46 @@ var require_dist14 = __commonJS({
364011
364021
  const normalized = patchContent.split("\n").filter((line) => !line.startsWith("From ") && !line.startsWith("index ") && !line.startsWith("Date: ")).join("\n");
364012
364022
  return `sha256:${(0, import_node_crypto7.createHash)("sha256").update(normalized).digest("hex")}`;
364013
364023
  }
364024
+ /**
364025
+ * Create a single composite patch for a merge commit by diffing the merge
364026
+ * commit against its first parent. This captures the net change of the
364027
+ * entire merged branch as one patch, eliminating accumulator chaining and
364028
+ * zero-net-change ghost conflicts.
364029
+ */
364030
+ async createMergeCompositePatch(input3) {
364031
+ const { mergeCommit, firstParent, lastGen, lock } = input3;
364032
+ const forgottenHashes = new Set(lock.forgotten_hashes ?? []);
364033
+ const filesOutput = await this.git.exec([
364034
+ "diff",
364035
+ "--name-only",
364036
+ firstParent,
364037
+ mergeCommit.sha
364038
+ ]);
364039
+ const files = filesOutput.trim().split("\n").filter(Boolean).filter((f10) => !INFRASTRUCTURE_FILES.has(f10)).filter((f10) => !f10.startsWith(".fern/"));
364040
+ if (files.length === 0) return null;
364041
+ const diff2 = await this.git.exec([
364042
+ "diff",
364043
+ firstParent,
364044
+ mergeCommit.sha,
364045
+ "--",
364046
+ ...files
364047
+ ]);
364048
+ if (!diff2.trim()) return null;
364049
+ const contentHash = this.computeContentHash(diff2);
364050
+ if (lock.patches.some((p10) => p10.content_hash === contentHash) || forgottenHashes.has(contentHash)) {
364051
+ return null;
364052
+ }
364053
+ return {
364054
+ id: `patch-merge-${mergeCommit.sha.slice(0, 8)}`,
364055
+ content_hash: contentHash,
364056
+ original_commit: mergeCommit.sha,
364057
+ original_message: mergeCommit.message,
364058
+ original_author: `${mergeCommit.authorName} <${mergeCommit.authorEmail}>`,
364059
+ base_generation: lastGen.commit_sha,
364060
+ files,
364061
+ patch_content: diff2
364062
+ };
364063
+ }
364014
364064
  /**
364015
364065
  * Detect patches via tree diff for non-linear history. Returns a composite patch.
364016
364066
  * Revert reconciliation is skipped here because tree-diff produces a single composite
@@ -405313,9 +405363,9 @@ var require_file2 = __commonJS({
405313
405363
  }
405314
405364
  });
405315
405365
 
405316
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseControlResponse.js
405366
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseControlResponse.js
405317
405367
  var require_parseControlResponse = __commonJS({
405318
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseControlResponse.js"(exports2) {
405368
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseControlResponse.js"(exports2) {
405319
405369
  "use strict";
405320
405370
  Object.defineProperty(exports2, "__esModule", { value: true });
405321
405371
  exports2.parseControlResponse = parseControlResponse;
@@ -405365,9 +405415,9 @@ var require_parseControlResponse = __commonJS({
405365
405415
  }
405366
405416
  });
405367
405417
 
405368
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/FtpContext.js
405418
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/FtpContext.js
405369
405419
  var require_FtpContext = __commonJS({
405370
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/FtpContext.js"(exports2) {
405420
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/FtpContext.js"(exports2) {
405371
405421
  "use strict";
405372
405422
  Object.defineProperty(exports2, "__esModule", { value: true });
405373
405423
  exports2.FTPContext = exports2.FTPError = void 0;
@@ -405509,6 +405559,9 @@ var require_FtpContext = __commonJS({
405509
405559
  * Send an FTP command without waiting for or handling the result.
405510
405560
  */
405511
405561
  send(command3) {
405562
+ if (/[\r\n\0]/.test(command3)) {
405563
+ throw new Error(`Invalid command: Contains control characters. (${command3})`);
405564
+ }
405512
405565
  const containsPassword = command3.startsWith("PASS");
405513
405566
  const message = containsPassword ? "> PASS ###" : `> ${command3}`;
405514
405567
  this.log(message);
@@ -405682,9 +405735,9 @@ Closing reason: ${this._closingError.stack}`;
405682
405735
  }
405683
405736
  });
405684
405737
 
405685
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/FileInfo.js
405738
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/FileInfo.js
405686
405739
  var require_FileInfo = __commonJS({
405687
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/FileInfo.js"(exports2) {
405740
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/FileInfo.js"(exports2) {
405688
405741
  "use strict";
405689
405742
  Object.defineProperty(exports2, "__esModule", { value: true });
405690
405743
  exports2.FileInfo = exports2.FileType = void 0;
@@ -405739,9 +405792,9 @@ var require_FileInfo = __commonJS({
405739
405792
  }
405740
405793
  });
405741
405794
 
405742
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseListDOS.js
405795
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseListDOS.js
405743
405796
  var require_parseListDOS = __commonJS({
405744
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseListDOS.js"(exports2) {
405797
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseListDOS.js"(exports2) {
405745
405798
  "use strict";
405746
405799
  Object.defineProperty(exports2, "__esModule", { value: true });
405747
405800
  exports2.testLine = testLine;
@@ -405782,9 +405835,9 @@ var require_parseListDOS = __commonJS({
405782
405835
  }
405783
405836
  });
405784
405837
 
405785
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseListUnix.js
405838
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseListUnix.js
405786
405839
  var require_parseListUnix = __commonJS({
405787
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseListUnix.js"(exports2) {
405840
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseListUnix.js"(exports2) {
405788
405841
  "use strict";
405789
405842
  Object.defineProperty(exports2, "__esModule", { value: true });
405790
405843
  exports2.testLine = testLine;
@@ -405868,9 +405921,9 @@ var require_parseListUnix = __commonJS({
405868
405921
  }
405869
405922
  });
405870
405923
 
405871
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseListMLSD.js
405924
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseListMLSD.js
405872
405925
  var require_parseListMLSD = __commonJS({
405873
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseListMLSD.js"(exports2) {
405926
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseListMLSD.js"(exports2) {
405874
405927
  "use strict";
405875
405928
  Object.defineProperty(exports2, "__esModule", { value: true });
405876
405929
  exports2.testLine = testLine;
@@ -406033,9 +406086,9 @@ var require_parseListMLSD = __commonJS({
406033
406086
  }
406034
406087
  });
406035
406088
 
406036
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseList.js
406089
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseList.js
406037
406090
  var require_parseList = __commonJS({
406038
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/parseList.js"(exports2) {
406091
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/parseList.js"(exports2) {
406039
406092
  "use strict";
406040
406093
  var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o14, m11, k19, k23) {
406041
406094
  if (k23 === void 0) k23 = k19;
@@ -406111,9 +406164,9 @@ var require_parseList = __commonJS({
406111
406164
  }
406112
406165
  });
406113
406166
 
406114
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/ProgressTracker.js
406167
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/ProgressTracker.js
406115
406168
  var require_ProgressTracker = __commonJS({
406116
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/ProgressTracker.js"(exports2) {
406169
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/ProgressTracker.js"(exports2) {
406117
406170
  "use strict";
406118
406171
  Object.defineProperty(exports2, "__esModule", { value: true });
406119
406172
  exports2.ProgressTracker = void 0;
@@ -406182,9 +406235,9 @@ var require_ProgressTracker = __commonJS({
406182
406235
  }
406183
406236
  });
406184
406237
 
406185
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/StringWriter.js
406238
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/StringWriter.js
406186
406239
  var require_StringWriter = __commonJS({
406187
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/StringWriter.js"(exports2) {
406240
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/StringWriter.js"(exports2) {
406188
406241
  "use strict";
406189
406242
  Object.defineProperty(exports2, "__esModule", { value: true });
406190
406243
  exports2.StringWriter = void 0;
@@ -406210,9 +406263,9 @@ var require_StringWriter = __commonJS({
406210
406263
  }
406211
406264
  });
406212
406265
 
406213
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/netUtils.js
406266
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/netUtils.js
406214
406267
  var require_netUtils = __commonJS({
406215
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/netUtils.js"(exports2) {
406268
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/netUtils.js"(exports2) {
406216
406269
  "use strict";
406217
406270
  Object.defineProperty(exports2, "__esModule", { value: true });
406218
406271
  exports2.describeTLS = describeTLS;
@@ -406261,9 +406314,9 @@ var require_netUtils = __commonJS({
406261
406314
  }
406262
406315
  });
406263
406316
 
406264
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/transfer.js
406317
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/transfer.js
406265
406318
  var require_transfer = __commonJS({
406266
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/transfer.js"(exports2) {
406319
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/transfer.js"(exports2) {
406267
406320
  "use strict";
406268
406321
  Object.defineProperty(exports2, "__esModule", { value: true });
406269
406322
  exports2.enterPassiveModeIPv6 = enterPassiveModeIPv6;
@@ -406513,9 +406566,9 @@ var require_transfer = __commonJS({
406513
406566
  }
406514
406567
  });
406515
406568
 
406516
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/Client.js
406569
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/Client.js
406517
406570
  var require_Client14 = __commonJS({
406518
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/Client.js"(exports2) {
406571
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/Client.js"(exports2) {
406519
406572
  "use strict";
406520
406573
  Object.defineProperty(exports2, "__esModule", { value: true });
406521
406574
  exports2.Client = void 0;
@@ -407147,9 +407200,6 @@ var require_Client14 = __commonJS({
407147
407200
  * a given path to fix that issue for most cases.
407148
407201
  */
407149
407202
  async protectWhitespace(path97) {
407150
- if (/[\r\n\0]/.test(path97)) {
407151
- throw new Error("Invalid path: Contains control characters");
407152
- }
407153
407203
  if (!path97.startsWith(" ")) {
407154
407204
  return path97;
407155
407205
  }
@@ -407249,17 +407299,17 @@ var require_Client14 = __commonJS({
407249
407299
  }
407250
407300
  });
407251
407301
 
407252
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/StringEncoding.js
407302
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/StringEncoding.js
407253
407303
  var require_StringEncoding = __commonJS({
407254
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/StringEncoding.js"(exports2) {
407304
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/StringEncoding.js"(exports2) {
407255
407305
  "use strict";
407256
407306
  Object.defineProperty(exports2, "__esModule", { value: true });
407257
407307
  }
407258
407308
  });
407259
407309
 
407260
- // ../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/index.js
407310
+ // ../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/index.js
407261
407311
  var require_dist17 = __commonJS({
407262
- "../../../node_modules/.pnpm/basic-ftp@5.2.1/node_modules/basic-ftp/dist/index.js"(exports2) {
407312
+ "../../../node_modules/.pnpm/basic-ftp@5.2.2/node_modules/basic-ftp/dist/index.js"(exports2) {
407263
407313
  "use strict";
407264
407314
  var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o14, m11, k19, k23) {
407265
407315
  if (k23 === void 0) k23 = k19;
@@ -627553,7 +627603,7 @@ var AccessTokenPosthogManager = class {
627553
627603
  properties: {
627554
627604
  ...event,
627555
627605
  ...event.properties,
627556
- version: "4.67.1-5-g6f7f6d50210",
627606
+ version: "4.67.1-57-gcb2da2e3a5f",
627557
627607
  usingAccessToken: true
627558
627608
  }
627559
627609
  });
@@ -627604,7 +627654,7 @@ var UserPosthogManager = class {
627604
627654
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
627605
627655
  event: "CLI",
627606
627656
  properties: {
627607
- version: "4.67.1-5-g6f7f6d50210",
627657
+ version: "4.67.1-57-gcb2da2e3a5f",
627608
627658
  ...event,
627609
627659
  ...event.properties,
627610
627660
  usingAccessToken: false,
@@ -843873,7 +843923,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
843873
843923
  var LOGS_FOLDER_NAME = "logs";
843874
843924
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
843875
843925
  function getCliSource() {
843876
- const version7 = "4.67.1-5-g6f7f6d50210";
843926
+ const version7 = "4.67.1-57-gcb2da2e3a5f";
843877
843927
  return `cli@${version7}`;
843878
843928
  }
843879
843929
  var DebugLogger = class {
@@ -855121,7 +855171,7 @@ var LegacyDocsPublisher = class {
855121
855171
  previewId,
855122
855172
  disableTemplates: void 0,
855123
855173
  skipUpload,
855124
- cliVersion: "4.67.1-5-g6f7f6d50210"
855174
+ cliVersion: "4.67.1-57-gcb2da2e3a5f"
855125
855175
  });
855126
855176
  if (taskContext.getResult() === TaskResult.Failure) {
855127
855177
  return { success: false };
@@ -928863,7 +928913,7 @@ var CliContext = class _CliContext {
928863
928913
  if (false) {
928864
928914
  this.logger.error("CLI_VERSION is not defined");
928865
928915
  }
928866
- return "4.67.1-5-g6f7f6d50210";
928916
+ return "4.67.1-57-gcb2da2e3a5f";
928867
928917
  }
928868
928918
  getCliName() {
928869
928919
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.67.1-5-g6f7f6d50210",
2
+ "version": "4.67.1-57-gcb2da2e3a5f",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",