@fern-api/fern-api-dev 5.17.1-1-g545030fdd96 → 5.17.1

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 +7 -138
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -354406,9 +354406,9 @@ var require_diff3 = __commonJS({
354406
354406
  }
354407
354407
  });
354408
354408
 
354409
- // ../../../node_modules/.pnpm/@fern-api+replay@0.15.0/node_modules/@fern-api/replay/dist/index.cjs
354409
+ // ../../../node_modules/.pnpm/@fern-api+replay@0.14.1/node_modules/@fern-api/replay/dist/index.cjs
354410
354410
  var require_dist13 = __commonJS({
354411
- "../../../node_modules/.pnpm/@fern-api+replay@0.15.0/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
354411
+ "../../../node_modules/.pnpm/@fern-api+replay@0.14.1/node_modules/@fern-api/replay/dist/index.cjs"(exports2, module4) {
354412
354412
  "use strict";
354413
354413
  var __defProp4 = Object.defineProperty;
354414
354414
  var __getOwnPropDesc4 = Object.getOwnPropertyDescriptor;
@@ -357919,66 +357919,6 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
357919
357919
  }
357920
357920
  return snapshot;
357921
357921
  }
357922
- /**
357923
- * FER-10203: returns true when a `[fern-autoversion]` commit between
357924
- * `fromSha` and `toSha` touched any of the patch's `files`. Re-classifies
357925
- * each grep match via `isGenerationCommit` so a customer commit that
357926
- * merely quotes the marker in its body doesn't false-positive.
357927
- */
357928
- async hasAutoversionContamination(fromSha, toSha, files) {
357929
- if (files.length === 0) return false;
357930
- const log4 = await this.git.exec([
357931
- "log",
357932
- `${fromSha}..${toSha}`,
357933
- "--grep=\\[fern-autoversion\\]",
357934
- "--extended-regexp",
357935
- "--format=%H%x09%aN%x09%ae%x09%s",
357936
- "--",
357937
- ...files
357938
- ]).catch(() => "");
357939
- if (!log4.trim()) return false;
357940
- for (const line of log4.trim().split("\n")) {
357941
- const [sha, authorName, authorEmail, message] = line.split(" ");
357942
- if (sha == null) continue;
357943
- if (isGenerationCommit({
357944
- sha,
357945
- authorName: authorName ?? "",
357946
- authorEmail: authorEmail ?? "",
357947
- message: message ?? ""
357948
- })) {
357949
- return true;
357950
- }
357951
- }
357952
- return false;
357953
- }
357954
- /**
357955
- * FER-10203: rebuild patch_content from `theirs_snapshot` (captured at
357956
- * detection time, predates pipeline content) rather than a HEAD-relative
357957
- * diff. Returns `null` when snapshot is missing or doesn't cover every
357958
- * file in `patch.files` — caller leaves the patch unchanged.
357959
- */
357960
- async computeSnapshotBasedPatchDiff(patch5, currentGen) {
357961
- if (!patch5.theirs_snapshot) return null;
357962
- if (Object.keys(patch5.theirs_snapshot).length === 0) return null;
357963
- for (const file4 of patch5.files) {
357964
- if (patch5.theirs_snapshot[file4] == null) return null;
357965
- }
357966
- const fragments = [];
357967
- for (const file4 of patch5.files) {
357968
- const theirsContent = patch5.theirs_snapshot[file4];
357969
- const oursContent = await this.git.showFile(currentGen, file4).catch(() => null);
357970
- if (oursContent == null) {
357971
- fragments.push(synthesizeNewFileDiff(file4, theirsContent));
357972
- continue;
357973
- }
357974
- if (oursContent === theirsContent) continue;
357975
- const fileDiff = await unifiedDiff(oursContent, theirsContent, file4);
357976
- if (fileDiff.trim()) {
357977
- fragments.push(fileDiff);
357978
- }
357979
- }
357980
- return fragments.join("");
357981
- }
357982
357922
  /**
357983
357923
  * Read THEIRS snapshot from a git tree-ish (commit, branch, or tree).
357984
357924
  * Used when the diff that produced `patch_content` was relative to that
@@ -358244,41 +358184,6 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
358244
358184
  }
358245
358185
  if (patch5.base_generation === currentGen) {
358246
358186
  try {
358247
- const contaminated = await this.hasAutoversionContamination(
358248
- currentGen,
358249
- "HEAD",
358250
- patch5.files
358251
- );
358252
- if (contaminated) {
358253
- const snapshotDiff = await this.computeSnapshotBasedPatchDiff(
358254
- patch5,
358255
- currentGen
358256
- );
358257
- if (snapshotDiff === null) continue;
358258
- if (!snapshotDiff.trim()) {
358259
- if (await allPatchFilesUserOwned(patch5)) continue;
358260
- this.lockManager.removePatch(patch5.id);
358261
- contentRefreshed++;
358262
- continue;
358263
- }
358264
- const snapHasStaleMarkers = snapshotDiff.split("\n").some(
358265
- (l9) => l9.startsWith("+<<<<<<< Generated") || l9.startsWith("+>>>>>>> Your customization")
358266
- );
358267
- if (snapHasStaleMarkers) continue;
358268
- const isProtectedSnap = patch5.files.some(
358269
- (file4) => file4 === ".fernignore" || fernignorePatterns.some((p14) => file4 === p14 || (0, import_minimatch22.minimatch)(file4, p14))
358270
- );
358271
- if (isProtectedSnap) continue;
358272
- const snapHash = this.detector.computeContentHash(snapshotDiff);
358273
- if (snapHash !== patch5.content_hash) {
358274
- this.lockManager.updatePatch(patch5.id, {
358275
- patch_content: snapshotDiff,
358276
- content_hash: snapHash
358277
- });
358278
- contentRefreshed++;
358279
- }
358280
- continue;
358281
- }
358282
358187
  const ppResult = await computePerPatchDiffWithFallback(
358283
358188
  patch5,
358284
358189
  (f4) => this.git.showFile(currentGen, f4),
@@ -358330,42 +358235,6 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
358330
358235
  try {
358331
358236
  const markerFiles = await this.git.exec(["grep", "-l", "<<<<<<< Generated", "HEAD", "--", ...patch5.files]).catch(() => "");
358332
358237
  if (markerFiles.trim()) continue;
358333
- const contaminated = await this.hasAutoversionContamination(
358334
- currentGen,
358335
- "HEAD",
358336
- patch5.files
358337
- );
358338
- if (contaminated) {
358339
- const snapshotDiff = await this.computeSnapshotBasedPatchDiff(
358340
- patch5,
358341
- currentGen
358342
- );
358343
- if (snapshotDiff === null) continue;
358344
- if (!snapshotDiff.trim()) {
358345
- if (await allPatchFilesUserOwned(patch5)) {
358346
- try {
358347
- this.lockManager.updatePatch(patch5.id, { base_generation: currentGen });
358348
- } catch {
358349
- }
358350
- continue;
358351
- }
358352
- this.lockManager.removePatch(patch5.id);
358353
- conflictAbsorbed++;
358354
- continue;
358355
- }
358356
- const snapHasStaleMarkers = snapshotDiff.split("\n").some(
358357
- (l9) => l9.startsWith("+<<<<<<< Generated") || l9.startsWith("+>>>>>>> Your customization")
358358
- );
358359
- if (snapHasStaleMarkers) continue;
358360
- const snapHash = this.detector.computeContentHash(snapshotDiff);
358361
- this.lockManager.updatePatch(patch5.id, {
358362
- base_generation: currentGen,
358363
- patch_content: snapshotDiff,
358364
- content_hash: snapHash
358365
- });
358366
- conflictResolved++;
358367
- continue;
358368
- }
358369
358238
  const ppResult = await computePerPatchDiffWithFallback(
358370
358239
  patch5,
358371
358240
  (f4) => this.git.showFile(currentGen, f4),
@@ -661011,7 +660880,7 @@ var AccessTokenPosthogManager = class {
661011
660880
  properties: {
661012
660881
  ...event,
661013
660882
  ...event.properties,
661014
- version: "5.17.1-1-g545030fdd96",
660883
+ version: "5.17.1",
661015
660884
  usingAccessToken: true,
661016
660885
  ...getRunIdProperties()
661017
660886
  }
@@ -661066,7 +660935,7 @@ var UserPosthogManager = class {
661066
660935
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
661067
660936
  event: "CLI",
661068
660937
  properties: {
661069
- version: "5.17.1-1-g545030fdd96",
660938
+ version: "5.17.1",
661070
660939
  ...event,
661071
660940
  ...event.properties,
661072
660941
  usingAccessToken: false,
@@ -852049,7 +851918,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
852049
851918
  var LOGS_FOLDER_NAME = "logs";
852050
851919
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
852051
851920
  function getCliSource() {
852052
- const version7 = "5.17.1-1-g545030fdd96";
851921
+ const version7 = "5.17.1";
852053
851922
  return `cli@${version7}`;
852054
851923
  }
852055
851924
  var DebugLogger = class {
@@ -864858,7 +864727,7 @@ var LegacyDocsPublisher = class {
864858
864727
  previewId,
864859
864728
  disableTemplates: void 0,
864860
864729
  skipUpload,
864861
- cliVersion: "5.17.1-1-g545030fdd96",
864730
+ cliVersion: "5.17.1",
864862
864731
  loginCommand: "fern auth login"
864863
864732
  });
864864
864733
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -939436,7 +939305,7 @@ var CliContext = class _CliContext {
939436
939305
  if (false) {
939437
939306
  this.logger.error("CLI_VERSION is not defined");
939438
939307
  }
939439
- return "5.17.1-1-g545030fdd96";
939308
+ return "5.17.1";
939440
939309
  }
939441
939310
  getCliName() {
939442
939311
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.17.1-1-g545030fdd96",
2
+ "version": "5.17.1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",