@fern-api/fern-api-dev 5.80.1 → 5.80.3

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 +88 -6
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -129428,6 +129428,7 @@ var init_BaseTypeReferenceSchema4 = __esm({
129428
129428
  init_ValidationSchema4();
129429
129429
  BaseTypeReferenceSchema2 = schemas_exports8.object({
129430
129430
  default: schemas_exports8.unknown().optional(),
129431
+ "client-default": schemas_exports8.unknown().optional(),
129431
129432
  encoding: EncodingSchema2.optional(),
129432
129433
  validation: ValidationSchema2.optional()
129433
129434
  }).extend(WithDocsSchema2).extend(WithAvailability2);
@@ -566096,6 +566097,7 @@ var require_AutoVersioningService = __commonJS({
566096
566097
  }
566097
566098
  }
566098
566099
  let processedContent = this.removeGoModulePathSuffixPairs(contentLines);
566100
+ processedContent = this.removeGoExplicitFieldBitConstantPairs(processedContent);
566099
566101
  processedContent = this.removeVersionChangePairs(processedContent, mappedMagicVersion);
566100
566102
  processedContent = this.removeRemainingMagicVersionLines(processedContent, mappedMagicVersion);
566101
566103
  let hasChanges2 = false;
@@ -566298,6 +566300,86 @@ var require_AutoVersioningService = __commonJS({
566298
566300
  hasSuffix: suffixPattern.test(content5)
566299
566301
  };
566300
566302
  }
566303
+ /**
566304
+ * Removes Go `explicitFields` bit-constant reindexing churn from a diff section.
566305
+ *
566306
+ * The Go SDK tracks which optional fields were explicitly set via a per-struct `big.Int`
566307
+ * bitmask. For each struct property it generates a private constant whose value is a single
566308
+ * bit at the property's positional index, e.g.
566309
+ *
566310
+ * var (
566311
+ * entityFieldGeoShape = big.NewInt(1 << 3)
566312
+ * entityFieldGeoDetails = big.NewInt(1 << 4)
566313
+ * )
566314
+ *
566315
+ * Inserting a new field earlier in the struct shifts every following constant's bit index by
566316
+ * one, producing a deletion/addition pair per field that differs only by the integer:
566317
+ *
566318
+ * - entityFieldGeoShape = big.NewInt(1 << 3)
566319
+ * + entityFieldGeoShape = big.NewInt(1 << 4)
566320
+ *
566321
+ * This is a purely mechanical artifact of the field addition: the bit is assigned and read
566322
+ * within the same generated version (the wire format is name-based JSON, not bit position),
566323
+ * so shifting it is not observable to consumers. Left in the diff, the AI analyzer reads the
566324
+ * shifted bit positions as a serialization-compatibility break and misclassifies an additive
566325
+ * change as a spurious MAJOR bump. The genuinely new field, its own new bit constant, and its
566326
+ * setter are all pure additions with no matching deletion, so they survive this pass and the
566327
+ * AI still sees (and correctly classifies) the field addition as MINOR.
566328
+ */
566329
+ removeGoExplicitFieldBitConstantPairs(lines) {
566330
+ const additions = [];
566331
+ for (let index3 = 0; index3 < lines.length; index3++) {
566332
+ const line = lines[index3];
566333
+ if (line == null || !this.isAdditionLine(line)) {
566334
+ continue;
566335
+ }
566336
+ const info = this.analyzeGoBitConstantLine(line);
566337
+ if (info != null) {
566338
+ additions.push({ index: index3, normalized: info.normalized });
566339
+ }
566340
+ }
566341
+ const removed = /* @__PURE__ */ new Set();
566342
+ const usedAdditions = /* @__PURE__ */ new Set();
566343
+ for (let index3 = 0; index3 < lines.length; index3++) {
566344
+ const line = lines[index3];
566345
+ if (line == null || !this.isDeletionLine(line)) {
566346
+ continue;
566347
+ }
566348
+ const info = this.analyzeGoBitConstantLine(line);
566349
+ if (info == null) {
566350
+ continue;
566351
+ }
566352
+ const match3 = additions.find((addition) => !usedAdditions.has(addition.index) && addition.normalized === info.normalized);
566353
+ if (match3 != null) {
566354
+ usedAdditions.add(match3.index);
566355
+ removed.add(index3);
566356
+ removed.add(match3.index);
566357
+ }
566358
+ }
566359
+ if (removed.size === 0) {
566360
+ return lines;
566361
+ }
566362
+ return lines.filter((_5, index3) => !removed.has(index3));
566363
+ }
566364
+ /**
566365
+ * If a diff line (with its leading +/- stripped) is a generated Go `explicitFields`
566366
+ * bit constant — `<name> = big.NewInt(1 << N)` or the >=63 form
566367
+ * `<name> = big.NewInt(0).Lsh(big.NewInt(1), N)` — returns a normalized key with the bit
566368
+ * index removed so a deletion and its reindexed addition compare equal. Requiring the exact
566369
+ * `big.NewInt` bit-shift shape keeps this from matching ordinary integer assignments.
566370
+ */
566371
+ analyzeGoBitConstantLine(line) {
566372
+ const content5 = line.substring(1);
566373
+ const shiftMatch = content5.match(/^(\s*)([A-Za-z_][A-Za-z0-9_]*)\s*=\s*big\.NewInt\(1\s*<<\s*\d+\)\s*$/);
566374
+ if (shiftMatch?.[2] != null) {
566375
+ return { normalized: `${shiftMatch[2]}=big.NewInt(1<<#)` };
566376
+ }
566377
+ const lshMatch = content5.match(/^(\s*)([A-Za-z_][A-Za-z0-9_]*)\s*=\s*big\.NewInt\(0\)\.Lsh\(big\.NewInt\(1\),\s*\d+\)\s*$/);
566378
+ if (lshMatch?.[2] != null) {
566379
+ return { normalized: `${lshMatch[2]}=big.NewInt(0).Lsh(big.NewInt(1),#)` };
566380
+ }
566381
+ return void 0;
566382
+ }
566301
566383
  /**
566302
566384
  * Gets the latest semantic version from git tags in the given repository.
566303
566385
  * Used as a fallback when the magic version is not embedded in any generated file
@@ -691502,7 +691584,7 @@ var AccessTokenPosthogManager = class {
691502
691584
  properties: {
691503
691585
  ...event,
691504
691586
  ...event.properties,
691505
- version: "5.80.1",
691587
+ version: "5.80.3",
691506
691588
  usingAccessToken: true,
691507
691589
  ...getRunIdProperties()
691508
691590
  }
@@ -691568,7 +691650,7 @@ var UserPosthogManager = class {
691568
691650
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
691569
691651
  event: "CLI",
691570
691652
  properties: {
691571
- version: "5.80.1",
691653
+ version: "5.80.3",
691572
691654
  ...event,
691573
691655
  ...event.properties,
691574
691656
  usingAccessToken: false,
@@ -872674,7 +872756,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
872674
872756
  var LOGS_FOLDER_NAME = "logs";
872675
872757
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
872676
872758
  function getCliSource() {
872677
- const version7 = "5.80.1";
872759
+ const version7 = "5.80.3";
872678
872760
  return `cli@${version7}`;
872679
872761
  }
872680
872762
  var DebugLogger = class {
@@ -905352,7 +905434,7 @@ var LegacyDocsPublisher = class {
905352
905434
  previewId,
905353
905435
  disableTemplates: void 0,
905354
905436
  skipUpload,
905355
- cliVersion: "5.80.1",
905437
+ cliVersion: "5.80.3",
905356
905438
  loginCommand: "fern auth login"
905357
905439
  });
905358
905440
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -972270,7 +972352,7 @@ function getAutomationContextFromEnv() {
972270
972352
  config_branch: process.env.FERN_CONFIG_BRANCH,
972271
972353
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
972272
972354
  trigger: process.env.GITHUB_EVENT_NAME,
972273
- cli_version: "5.80.1"
972355
+ cli_version: "5.80.3"
972274
972356
  };
972275
972357
  }
972276
972358
  function isAutomationMode() {
@@ -973102,7 +973184,7 @@ var CliContext = class _CliContext {
973102
973184
  if (false) {
973103
973185
  this.logger.error("CLI_VERSION is not defined");
973104
973186
  }
973105
- return "5.80.1";
973187
+ return "5.80.3";
973106
973188
  }
973107
973189
  getCliName() {
973108
973190
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.80.1",
2
+ "version": "5.80.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",