@fern-api/fern-api-dev 4.90.0-1-g35b7d24cb0b → 4.90.0-14-g871c1a60e90

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 +372 -51
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -332867,21 +332867,33 @@ var require_AutoVersionStep = __commonJS({
332867
332867
  async handleNormalFlow(params2) {
332868
332868
  const { prepared, service, language, mappedMagicVersion, previousGenerationSha } = params2;
332869
332869
  const rawDiff = this.gitDiff(previousGenerationSha, prepared.currentGenerationSha);
332870
- if (rawDiff.trim().length === 0) {
332871
- this.logger.info("AutoVersionStep: empty diff between generations; skipping autoversion.");
332872
- return { executed: true, success: true };
332873
- }
332874
332870
  const previousVersion = await this.resolvePreviousVersion({ service, rawDiff, mappedMagicVersion });
332875
332871
  if (previousVersion == null) {
332876
332872
  return await this.handleFirstGeneration({ service, language, mappedMagicVersion });
332877
332873
  }
332874
+ if (rawDiff.trim().length === 0) {
332875
+ this.logger.info(`AutoVersionStep: empty diff between generations; rewriting placeholder to ${previousVersion}.`);
332876
+ return await this.finalizeNoChange({
332877
+ service,
332878
+ language,
332879
+ mappedMagicVersion,
332880
+ previousVersion,
332881
+ reason: "no diff between generations"
332882
+ });
332883
+ }
332878
332884
  const cleanedDiff = service.cleanDiffForAI(rawDiff, mappedMagicVersion);
332879
332885
  const rawBytes = Buffer.byteLength(rawDiff, "utf-8");
332880
332886
  const cleanedBytes = Buffer.byteLength(cleanedDiff, "utf-8");
332881
332887
  this.logger.debug(`AutoVersionStep: raw=${(0, index_1.formatSizeKB)(rawBytes)}KB (${(0, index_1.countFilesInDiff)(rawDiff)} files), cleaned=${(0, index_1.formatSizeKB)(cleanedBytes)}KB (${(0, index_1.countFilesInDiff)(cleanedDiff)} files)`);
332882
332888
  if (cleanedDiff.trim().length === 0) {
332883
- this.logger.info("AutoVersionStep: cleaned diff is empty; no semantic changes.");
332884
- return { executed: true, success: true };
332889
+ this.logger.info(`AutoVersionStep: cleaned diff is empty; no semantic changes \u2014 rewriting placeholder to ${previousVersion}.`);
332890
+ return await this.finalizeNoChange({
332891
+ service,
332892
+ language,
332893
+ mappedMagicVersion,
332894
+ previousVersion,
332895
+ reason: "no semantic changes"
332896
+ });
332885
332897
  }
332886
332898
  if (cleanedBytes > index_1.MAX_RAW_DIFF_BYTES) {
332887
332899
  this.logger.warn(`AutoVersionStep: diff too large for FAI (${(0, index_1.formatSizeKB)(cleanedBytes)}KB, limit ${(0, index_1.formatSizeKB)(index_1.MAX_RAW_DIFF_BYTES)}KB). Falling back to PATCH.`);
@@ -332907,13 +332919,14 @@ var require_AutoVersionStep = __commonJS({
332907
332919
  analysis = { versionBump: "PATCH", message: this.brandMessage("SDK regeneration") };
332908
332920
  }
332909
332921
  if (analysis == null) {
332910
- this.logger.info("AutoVersionStep: FAI returned NO_CHANGE; skipping autoversion commit.");
332911
- return {
332912
- executed: true,
332913
- success: true,
332922
+ this.logger.info(`AutoVersionStep: FAI returned NO_CHANGE; rewriting placeholder to ${previousVersion}.`);
332923
+ return await this.finalizeNoChange({
332924
+ service,
332925
+ language,
332926
+ mappedMagicVersion,
332914
332927
  previousVersion,
332915
- versionBump: "NO_CHANGE"
332916
- };
332928
+ reason: "FAI returned NO_CHANGE"
332929
+ });
332917
332930
  }
332918
332931
  return await this.finalizeWithBump({
332919
332932
  service,
@@ -332923,6 +332936,38 @@ var require_AutoVersionStep = __commonJS({
332923
332936
  analysis
332924
332937
  });
332925
332938
  }
332939
+ /**
332940
+ * Terminal path for runs that determine no semver bump is needed. The
332941
+ * current working tree still contains `0.0.0-fern-placeholder` from this
332942
+ * run's generator output, so we must rewrite it to `previousVersion`
332943
+ * before exiting — otherwise the SDK ships with the placeholder embedded
332944
+ * in manifests (package.json, pyproject.toml, .fern/metadata.json) and
332945
+ * user-agent strings (e.g. `X-Fern-SDK-Version`). Commits the rewrite as
332946
+ * `[fern-autoversion]` so the replay + github steps see a stable base.
332947
+ */
332948
+ async finalizeNoChange(params2) {
332949
+ const { service, language, mappedMagicVersion, previousVersion, reason } = params2;
332950
+ if (!(0, index_1.isValidSemver)(previousVersion)) {
332951
+ const errorMessage = `AutoVersionStep: resolved previousVersion ${JSON.stringify(previousVersion)} is not a valid semver string. Refusing to rewrite placeholder to avoid shell injection.`;
332952
+ this.logger.error(errorMessage);
332953
+ return { executed: true, success: false, errorMessage };
332954
+ }
332955
+ await service.replaceMagicVersion(this.outputDir, mappedMagicVersion, previousVersion);
332956
+ if (language === "go") {
332957
+ await service.addGoMajorVersionSuffix(this.outputDir, previousVersion);
332958
+ }
332959
+ const commitMessage = this.brandMessage(`SDK regeneration (no semver change: ${reason})`);
332960
+ const commitSha = this.commitAutoversion(commitMessage);
332961
+ return {
332962
+ executed: true,
332963
+ success: true,
332964
+ version: previousVersion,
332965
+ previousVersion,
332966
+ versionBump: "NO_CHANGE",
332967
+ commitMessage,
332968
+ commitSha
332969
+ };
332970
+ }
332926
332971
  async finalizeWithBump(params2) {
332927
332972
  const { service, language, mappedMagicVersion, previousVersion, analysis } = params2;
332928
332973
  const newVersion = (0, index_1.incrementVersion)(previousVersion, analysis.versionBump);
@@ -343160,6 +343205,7 @@ var require_GithubStep = __commonJS({
343160
343205
  "use strict";
343161
343206
  Object.defineProperty(exports2, "__esModule", { value: true });
343162
343207
  exports2.GithubStep = void 0;
343208
+ exports2.resolvePrFields = resolvePrFields;
343163
343209
  exports2.enrichPrBodyForAutomation = enrichPrBodyForAutomation;
343164
343210
  exports2.shouldEnableAutomerge = shouldEnableAutomerge;
343165
343211
  exports2.shouldCheckNoDiff = shouldCheckNoDiff;
@@ -343185,8 +343231,10 @@ var require_GithubStep = __commonJS({
343185
343231
  }
343186
343232
  async execute(context3) {
343187
343233
  const replayResult = context3.previousStepResults.replay;
343234
+ const autoVersionResult = context3.previousStepResults.autoVersion;
343188
343235
  const skipCommit = this.config.skipCommit ?? this.deriveSkipCommit(replayResult);
343189
343236
  const replayConflictInfo = this.config.replayConflictInfo ?? this.deriveReplayConflictInfo(replayResult);
343237
+ const resolvedPrFields = this.resolvePrFields(autoVersionResult);
343190
343238
  try {
343191
343239
  this.logger.debug("Starting GitHub self-hosted flow in directory: " + this.outputDir);
343192
343240
  const repository = github_1.ClonedRepository.createAtPath(this.outputDir);
@@ -343200,9 +343248,9 @@ var require_GithubStep = __commonJS({
343200
343248
  const mode = this.config.mode;
343201
343249
  switch (mode) {
343202
343250
  case "pull-request":
343203
- return await this.executePullRequestMode(repository, newPrBranch, skipCommit, replayConflictInfo, replayResult);
343251
+ return await this.executePullRequestMode(repository, newPrBranch, skipCommit, replayConflictInfo, replayResult, resolvedPrFields);
343204
343252
  case "push":
343205
- return await this.executePushMode(repository);
343253
+ return await this.executePushMode(repository, resolvedPrFields);
343206
343254
  default: {
343207
343255
  const exhaustive = mode;
343208
343256
  throw new Error(`Unexpected GitHub mode: ${String(exhaustive)}`);
@@ -343218,7 +343266,7 @@ var require_GithubStep = __commonJS({
343218
343266
  };
343219
343267
  }
343220
343268
  }
343221
- async executePullRequestMode(repository, newPrBranch, skipCommit, replayConflictInfo, replayResult) {
343269
+ async executePullRequestMode(repository, newPrBranch, skipCommit, replayConflictInfo, replayResult, resolved) {
343222
343270
  const baseBranch = this.config.branch ?? await repository.getDefaultBranch();
343223
343271
  const octokit = new rest_1.Octokit({ auth: this.config.token });
343224
343272
  const { owner, repo } = (0, github_1.parseRepository)(this.config.uri);
@@ -343245,7 +343293,7 @@ var require_GithubStep = __commonJS({
343245
343293
  switch (branchAction) {
343246
343294
  case "replay-branch":
343247
343295
  if (shouldPushGenerationBaseTag(replayResult)) {
343248
- generationBaseSha = await (0, createReplayBranch_1.createReplayBranch)(repository, prBranch, this.config.commitMessage, replayConflictInfo, this.logger);
343296
+ generationBaseSha = await (0, createReplayBranch_1.createReplayBranch)(repository, prBranch, resolved.commitMessage, replayConflictInfo, this.logger);
343249
343297
  } else {
343250
343298
  await repository.createBranchFromHead(prBranch);
343251
343299
  }
@@ -343264,8 +343312,7 @@ var require_GithubStep = __commonJS({
343264
343312
  if (!skipCommit) {
343265
343313
  await this.ensureFernignore();
343266
343314
  this.logger.debug("Committing changes...");
343267
- const finalCommitMessage2 = this.config.commitMessage ?? "SDK Generation";
343268
- await repository.commitAllChanges(finalCommitMessage2);
343315
+ await repository.commitAllChanges(resolved.commitMessage);
343269
343316
  this.logger.debug(`Committed changes to local copy of GitHub repository at ${this.outputDir}`);
343270
343317
  }
343271
343318
  if (shouldCheckNoDiff(this.config)) {
@@ -343305,13 +343352,12 @@ var require_GithubStep = __commonJS({
343305
343352
  }
343306
343353
  }
343307
343354
  }
343308
- const finalCommitMessage = this.config.commitMessage ?? "SDK Generation";
343309
343355
  const headSha = await repository.getHeadSha();
343310
- const changelogUrl = this.config.changelogEntry ? `https://github.com/${this.config.uri}/blob/${headSha}/changelog.md` : void 0;
343311
- const { prTitle, prBody } = (0, parseCommitMessage_1.parseCommitMessageForPR)(finalCommitMessage, this.config.changelogEntry, this.config.prDescription, this.config.versionBumpReason, this.config.previousVersion, this.config.newVersion, this.config.versionBump, changelogUrl);
343356
+ const changelogUrl = resolved.changelogEntry ? `https://github.com/${this.config.uri}/blob/${headSha}/changelog.md` : void 0;
343357
+ const { prTitle, prBody } = (0, parseCommitMessage_1.parseCommitMessageForPR)(resolved.commitMessage, resolved.changelogEntry, resolved.prDescription, resolved.versionBumpReason, resolved.previousVersion, resolved.newVersion, resolved.versionBump, changelogUrl);
343312
343358
  const replaySection = (0, replay_summary_1.formatReplayPrBody)(replayResult, { branchName: prBranch, repoUri: this.config.uri });
343313
343359
  let enrichedBody = replaySection != null ? prBody + "\n\n---\n\n" + replaySection : prBody;
343314
- enrichedBody = enrichPrBodyForAutomation(enrichedBody, this.config);
343360
+ enrichedBody = enrichPrBodyForAutomation(enrichedBody, this.config, resolved);
343315
343361
  if (isUpdatingExistingPR && existingPR != null) {
343316
343362
  this.logger.info(`Updated existing pull request: ${existingPR.htmlUrl}`);
343317
343363
  result.prUrl = existingPR.htmlUrl;
@@ -343342,7 +343388,7 @@ var require_GithubStep = __commonJS({
343342
343388
  this.logger.info(`Created pull request: ${pullRequest.html_url}`);
343343
343389
  result.prUrl = pullRequest.html_url;
343344
343390
  result.prNumber = pullRequest.number;
343345
- if (shouldEnableAutomerge(this.config) && pullRequest.node_id) {
343391
+ if (shouldEnableAutomerge(this.config, resolved) && pullRequest.node_id) {
343346
343392
  try {
343347
343393
  await octokit.graphql(`mutation($pullRequestId: ID!) {
343348
343394
  enablePullRequestAutoMerge(input: {
@@ -343367,7 +343413,7 @@ var require_GithubStep = __commonJS({
343367
343413
  }
343368
343414
  return result;
343369
343415
  }
343370
- async executePushMode(repository) {
343416
+ async executePushMode(repository, resolved) {
343371
343417
  const baseBranch = this.config.branch ?? await repository.getDefaultBranch();
343372
343418
  if (this.config.branch != null) {
343373
343419
  this.logger.debug(`Checking out branch ${this.config.branch}`);
@@ -343375,8 +343421,7 @@ var require_GithubStep = __commonJS({
343375
343421
  }
343376
343422
  await this.ensureFernignore();
343377
343423
  this.logger.debug("Committing changes...");
343378
- const finalCommitMessage = this.config.commitMessage ?? "SDK Generation";
343379
- await repository.commitAllChanges(finalCommitMessage);
343424
+ await repository.commitAllChanges(resolved.commitMessage);
343380
343425
  this.logger.debug(`Committed changes to local copy of GitHub repository at ${this.outputDir}`);
343381
343426
  if (shouldCheckNoDiff(this.config)) {
343382
343427
  const noDiff = await repository.treeHashEquals(`origin/${baseBranch}`);
@@ -343439,15 +343484,34 @@ var require_GithubStep = __commonJS({
343439
343484
  }
343440
343485
  return void 0;
343441
343486
  }
343487
+ resolvePrFields(autoVersion) {
343488
+ return resolvePrFields(this.config, autoVersion);
343489
+ }
343442
343490
  };
343443
343491
  exports2.GithubStep = GithubStep;
343444
- function enrichPrBodyForAutomation(body, config5) {
343492
+ function resolvePrFields(config5, autoVersion) {
343493
+ const autoVersionBreaking = autoVersion?.versionBump === "MAJOR";
343494
+ return {
343495
+ commitMessage: config5.commitMessage ?? autoVersion?.commitMessage ?? "SDK Generation",
343496
+ changelogEntry: config5.changelogEntry ?? autoVersion?.changelogEntry,
343497
+ prDescription: config5.prDescription ?? autoVersion?.prDescription,
343498
+ versionBumpReason: config5.versionBumpReason ?? autoVersion?.versionBumpReason,
343499
+ previousVersion: config5.previousVersion ?? autoVersion?.previousVersion,
343500
+ newVersion: config5.newVersion ?? autoVersion?.version,
343501
+ versionBump: config5.versionBump ?? autoVersion?.versionBump,
343502
+ hasBreakingChanges: config5.hasBreakingChanges ?? autoVersionBreaking,
343503
+ breakingChangesSummary: config5.breakingChangesSummary ?? autoVersion?.prDescription
343504
+ };
343505
+ }
343506
+ function enrichPrBodyForAutomation(body, config5, breaking = {}) {
343445
343507
  if (!config5.automationMode) {
343446
343508
  return body;
343447
343509
  }
343510
+ const hasBreakingChanges = breaking.hasBreakingChanges ?? config5.hasBreakingChanges;
343511
+ const breakingChangesSummary = breaking.breakingChangesSummary ?? config5.breakingChangesSummary;
343448
343512
  let result = body;
343449
- if (config5.hasBreakingChanges && config5.breakingChangesSummary) {
343450
- result += "\n\n---\n\n## \u26A0\uFE0F Breaking Changes\n\nThis release contains breaking changes that require manual review:\n\n" + config5.breakingChangesSummary;
343513
+ if (hasBreakingChanges && breakingChangesSummary) {
343514
+ result += "\n\n---\n\n## \u26A0\uFE0F Breaking Changes\n\nThis release contains breaking changes that require manual review:\n\n" + breakingChangesSummary;
343451
343515
  }
343452
343516
  if (config5.runId) {
343453
343517
  result += `
@@ -343458,8 +343522,9 @@ _Fern Run ID: \`${config5.runId}\`_`;
343458
343522
  }
343459
343523
  return result;
343460
343524
  }
343461
- function shouldEnableAutomerge(config5) {
343462
- return config5.automationMode === true && config5.autoMerge === true && config5.hasBreakingChanges !== true;
343525
+ function shouldEnableAutomerge(config5, breaking = {}) {
343526
+ const hasBreakingChanges = breaking.hasBreakingChanges ?? config5.hasBreakingChanges;
343527
+ return config5.automationMode === true && config5.autoMerge === true && hasBreakingChanges !== true;
343463
343528
  }
343464
343529
  function shouldCheckNoDiff(config5) {
343465
343530
  return config5.skipIfNoDiff === true;
@@ -343636,8 +343701,10 @@ var require_PostGenerationPipeline = __commonJS({
343636
343701
  try {
343637
343702
  const stepResult = await step.execute(pipelineContext);
343638
343703
  if (step.name === "generationCommit") {
343639
- result.steps.generationCommit = stepResult;
343640
- pipelineContext.previousStepResults.generationCommit = stepResult;
343704
+ const gcResult = stepResult;
343705
+ const { preparedReplay: _preparedReplay, ...serializable } = gcResult;
343706
+ result.steps.generationCommit = serializable;
343707
+ pipelineContext.previousStepResults.generationCommit = gcResult;
343641
343708
  } else if (step.name === "replay") {
343642
343709
  result.steps.replay = stepResult;
343643
343710
  pipelineContext.previousStepResults.replay = stepResult;
@@ -475527,6 +475594,7 @@ var SourceSchema = schemas_exports.undiscriminatedUnion([OpenApiSourceSchema, Pr
475527
475594
  // ../fern-definition/schema/lib/schemas/serialization/resources/types/types/BaseTypeReferenceSchema.js
475528
475595
  var BaseTypeReferenceSchema = schemas_exports.object({
475529
475596
  default: schemas_exports.unknown().optional(),
475597
+ "client-default": schemas_exports.unknown().optional(),
475530
475598
  encoding: EncodingSchema.optional(),
475531
475599
  validation: ValidationSchema.optional()
475532
475600
  }).extend(WithDocsSchema).extend(WithAvailability);
@@ -475815,7 +475883,8 @@ var DiscriminatedUnionSchema = schemas_exports.object({
475815
475883
  discriminant: UnionDiscriminant.optional(),
475816
475884
  extends: ObjectExtendsSchema.optional(),
475817
475885
  "base-properties": schemas_exports.record(schemas_exports.string(), TypeReferenceSchema).optional(),
475818
- union: schemas_exports.record(schemas_exports.string(), SingleUnionTypeSchema)
475886
+ union: schemas_exports.record(schemas_exports.string(), SingleUnionTypeSchema),
475887
+ "default-variant": schemas_exports.string().optional()
475819
475888
  }).extend(BaseTypeDeclarationSchema);
475820
475889
 
475821
475890
  // ../fern-definition/schema/lib/schemas/serialization/resources/types/types/CasingOverridesSchema.js
@@ -488639,6 +488708,7 @@ function visitEndpoint({ endpointId, endpoint: endpoint3, service, visitor, node
488639
488708
  audiences: noop2,
488640
488709
  encoding: noop2,
488641
488710
  default: noop2,
488711
+ "client-default": noop2,
488642
488712
  validation: noop2
488643
488713
  });
488644
488714
  }
@@ -488702,6 +488772,7 @@ function visitEndpoint({ endpointId, endpoint: endpoint3, service, visitor, node
488702
488772
  audiences: noop2,
488703
488773
  encoding: noop2,
488704
488774
  default: noop2,
488775
+ "client-default": noop2,
488705
488776
  validation: noop2
488706
488777
  });
488707
488778
  }
@@ -488951,6 +489022,7 @@ function visitPathParameters({ pathParameters, visitor, nodePath }) {
488951
489022
  availability: noop2,
488952
489023
  encoding: noop2,
488953
489024
  default: noop2,
489025
+ "client-default": noop2,
488954
489026
  validation: noop2,
488955
489027
  name: noop2,
488956
489028
  audiences: noop2
@@ -488984,6 +489056,7 @@ function visitHeaders({ headers: headers2, visitor, nodePath }) {
488984
489056
  encoding: noop2,
488985
489057
  env: noop2,
488986
489058
  default: noop2,
489059
+ "client-default": noop2,
488987
489060
  validation: noop2
488988
489061
  });
488989
489062
  }
@@ -489078,6 +489151,7 @@ function visitTypeDeclaration({ typeName, declaration, visitor, nodePathForType
489078
489151
  audiences: noop2,
489079
489152
  encoding: noop2,
489080
489153
  default: noop2,
489154
+ "client-default": noop2,
489081
489155
  validation: noop2,
489082
489156
  access: noop2
489083
489157
  });
@@ -489326,6 +489400,7 @@ function visitWebhooks({ webhook, visitor, nodePathForWebhook }) {
489326
489400
  audiences: noop2,
489327
489401
  encoding: noop2,
489328
489402
  default: noop2,
489403
+ "client-default": noop2,
489329
489404
  validation: noop2,
489330
489405
  access: noop2
489331
489406
  });
@@ -489371,6 +489446,7 @@ function visitHeaders2({ headers: headers2, visitor, nodePath }) {
489371
489446
  encoding: noop2,
489372
489447
  env: noop2,
489373
489448
  default: noop2,
489449
+ "client-default": noop2,
489374
489450
  validation: noop2
489375
489451
  });
489376
489452
  }
@@ -519690,7 +519766,7 @@ function buildHeader({ header, context: context3, fileContainingReference, names
519690
519766
  headerSchema.availability = convertAvailability(header.availability);
519691
519767
  }
519692
519768
  if (header.clientDefault != null) {
519693
- headerSchema.default = header.clientDefault;
519769
+ headerSchema["client-default"] = header.clientDefault;
519694
519770
  }
519695
519771
  return headerSchema;
519696
519772
  }
@@ -519719,7 +519795,7 @@ function buildPathParameter({ pathParameter, context: context3, fileContainingRe
519719
519795
  pathParameterSchema.availability = convertAvailability(pathParameter.availability);
519720
519796
  }
519721
519797
  if (pathParameter.clientDefault != null && "type" in pathParameterSchema) {
519722
- pathParameterSchema.default = pathParameter.clientDefault;
519798
+ pathParameterSchema["client-default"] = pathParameter.clientDefault;
519723
519799
  }
519724
519800
  return pathParameterSchema;
519725
519801
  }
@@ -519747,8 +519823,9 @@ function buildQueryParameter({ queryParameter, context: context3, fileContaining
519747
519823
  type: queryParameterType
519748
519824
  };
519749
519825
  if (queryParameter.clientDefault != null) {
519750
- queryParameterSchema.default = queryParameter.clientDefault;
519751
- } else if (queryParameterDefault != null) {
519826
+ queryParameterSchema["client-default"] = queryParameter.clientDefault;
519827
+ }
519828
+ if (queryParameterDefault != null) {
519752
519829
  queryParameterSchema.default = queryParameterDefault;
519753
519830
  }
519754
519831
  if (typeReference2.allowMultiple) {
@@ -519771,7 +519848,7 @@ function buildQueryParameter({ queryParameter, context: context3, fileContaining
519771
519848
  queryParameterSchema.validation = typeReference2.value.validation;
519772
519849
  }
519773
519850
  }
519774
- if (queryParameterSchema.default == null && queryParameterSchema["allow-multiple"] == null && queryParameterSchema.docs == null && queryParameterSchema.name == null && queryParameterSchema.availability == null && queryParameterSchema.validation == null && queryParameterSchema.explode == null) {
519851
+ if (queryParameterSchema.default == null && queryParameterSchema["client-default"] == null && queryParameterSchema["allow-multiple"] == null && queryParameterSchema.docs == null && queryParameterSchema.name == null && queryParameterSchema.availability == null && queryParameterSchema.validation == null && queryParameterSchema.explode == null) {
519775
519852
  return queryParameterType;
519776
519853
  }
519777
519854
  return queryParameterSchema;
@@ -521141,7 +521218,7 @@ function buildGlobalHeaders(context3) {
521141
521218
  })) ?? defaultType : defaultType
521142
521219
  };
521143
521220
  if (typeof header.clientDefault === "string" || typeof header.clientDefault === "boolean") {
521144
- schema2.default = header.clientDefault;
521221
+ schema2["client-default"] = header.clientDefault;
521145
521222
  }
521146
521223
  }
521147
521224
  context3.builder.addGlobalHeader({
@@ -557530,7 +557607,7 @@ function convertSingleUnionType({ rawValueType, rawSingleUnionType, fileContaini
557530
557607
  function convertQueryParameter({ file: file4, queryParameterKey, queryParameter }) {
557531
557608
  const { name: name2 } = getQueryParameterName({ queryParameterKey, queryParameter });
557532
557609
  const valueType = file4.parseTypeReference(queryParameter);
557533
- const defaultValue = typeof queryParameter !== "string" ? queryParameter.default : void 0;
557610
+ const clientDefaultValue = typeof queryParameter !== "string" ? queryParameter["client-default"] : void 0;
557534
557611
  return {
557535
557612
  ...convertDeclaration(queryParameter),
557536
557613
  name: file4.casingsGenerator.generateNameAndWireValue({
@@ -557539,7 +557616,7 @@ function convertQueryParameter({ file: file4, queryParameterKey, queryParameter
557539
557616
  }),
557540
557617
  valueType,
557541
557618
  allowMultiple: typeof queryParameter !== "string" && queryParameter["allow-multiple"] != null ? queryParameter["allow-multiple"] : false,
557542
- clientDefault: convertDefaultToLiteral(defaultValue),
557619
+ clientDefault: convertDefaultToLiteral(clientDefaultValue),
557543
557620
  v2Examples: {
557544
557621
  userSpecifiedExamples: {},
557545
557622
  autogeneratedExamples: {}
@@ -558609,14 +558686,14 @@ function convertPathParameters2({ pathParameters, location: location2, file: fil
558609
558686
  }));
558610
558687
  }
558611
558688
  function convertPathParameter({ parameterName, parameter: parameter6, location: location2, file: file4, variableResolver }) {
558612
- const defaultValue = typeof parameter6 !== "string" && "type" in parameter6 ? parameter6.default : void 0;
558689
+ const clientDefaultValue = typeof parameter6 !== "string" && "type" in parameter6 ? parameter6["client-default"] : void 0;
558613
558690
  return {
558614
558691
  ...convertDeclaration(parameter6),
558615
558692
  name: file4.casingsGenerator.generateName(parameterName),
558616
558693
  valueType: getPathParameterType({ parameter: parameter6, variableResolver, file: file4 }),
558617
558694
  location: location2,
558618
558695
  variable: isVariablePathParameter(parameter6) ? variableResolver.getVariableIdOrThrow(typeof parameter6 === "string" ? parameter6 : parameter6.variable) : void 0,
558619
- clientDefault: convertDefaultToLiteral(defaultValue),
558696
+ clientDefault: convertDefaultToLiteral(clientDefaultValue),
558620
558697
  v2Examples: {
558621
558698
  userSpecifiedExamples: {},
558622
558699
  autogeneratedExamples: {}
@@ -558682,7 +558759,7 @@ function convertHttpMethod(method8) {
558682
558759
  }
558683
558760
  function convertHttpHeader({ headerKey, header, file: file4 }) {
558684
558761
  const { name: name2 } = getHeaderName3({ headerKey, header });
558685
- const defaultValue = typeof header !== "string" ? header.default : void 0;
558762
+ const clientDefaultValue = typeof header !== "string" ? header["client-default"] : void 0;
558686
558763
  return {
558687
558764
  ...convertDeclaration(header),
558688
558765
  name: file4.casingsGenerator.generateNameAndWireValue({
@@ -558691,7 +558768,7 @@ function convertHttpHeader({ headerKey, header, file: file4 }) {
558691
558768
  }),
558692
558769
  valueType: file4.parseTypeReference(header),
558693
558770
  env: typeof header === "string" ? void 0 : header.env,
558694
- clientDefault: convertDefaultToLiteral(defaultValue),
558771
+ clientDefault: convertDefaultToLiteral(clientDefaultValue),
558695
558772
  v2Examples: {
558696
558773
  userSpecifiedExamples: {},
558697
558774
  autogeneratedExamples: {}
@@ -586541,6 +586618,23 @@ var definitions = {
586541
586618
  }
586542
586619
  ]
586543
586620
  },
586621
+ "client-default": {
586622
+ oneOf: [
586623
+ {
586624
+ type: [
586625
+ "string",
586626
+ "number",
586627
+ "boolean",
586628
+ "object",
586629
+ "array",
586630
+ "null"
586631
+ ]
586632
+ },
586633
+ {
586634
+ type: "null"
586635
+ }
586636
+ ]
586637
+ },
586544
586638
  encoding: {
586545
586639
  oneOf: [
586546
586640
  {
@@ -586691,6 +586785,23 @@ var definitions = {
586691
586785
  }
586692
586786
  ]
586693
586787
  },
586788
+ "client-default": {
586789
+ oneOf: [
586790
+ {
586791
+ type: [
586792
+ "string",
586793
+ "number",
586794
+ "boolean",
586795
+ "object",
586796
+ "array",
586797
+ "null"
586798
+ ]
586799
+ },
586800
+ {
586801
+ type: "null"
586802
+ }
586803
+ ]
586804
+ },
586694
586805
  encoding: {
586695
586806
  oneOf: [
586696
586807
  {
@@ -587679,6 +587790,23 @@ var definitions2 = {
587679
587790
  }
587680
587791
  ]
587681
587792
  },
587793
+ "client-default": {
587794
+ oneOf: [
587795
+ {
587796
+ type: [
587797
+ "string",
587798
+ "number",
587799
+ "boolean",
587800
+ "object",
587801
+ "array",
587802
+ "null"
587803
+ ]
587804
+ },
587805
+ {
587806
+ type: "null"
587807
+ }
587808
+ ]
587809
+ },
587682
587810
  encoding: {
587683
587811
  oneOf: [
587684
587812
  {
@@ -588161,6 +588289,23 @@ var definitions2 = {
588161
588289
  }
588162
588290
  ]
588163
588291
  },
588292
+ "client-default": {
588293
+ oneOf: [
588294
+ {
588295
+ type: [
588296
+ "string",
588297
+ "number",
588298
+ "boolean",
588299
+ "object",
588300
+ "array",
588301
+ "null"
588302
+ ]
588303
+ },
588304
+ {
588305
+ type: "null"
588306
+ }
588307
+ ]
588308
+ },
588164
588309
  encoding: {
588165
588310
  oneOf: [
588166
588311
  {
@@ -588478,6 +588623,16 @@ var definitions2 = {
588478
588623
  additionalProperties: {
588479
588624
  $ref: "#/definitions/types.SingleUnionTypeSchema"
588480
588625
  }
588626
+ },
588627
+ "default-variant": {
588628
+ oneOf: [
588629
+ {
588630
+ type: "string"
588631
+ },
588632
+ {
588633
+ type: "null"
588634
+ }
588635
+ ]
588481
588636
  }
588482
588637
  },
588483
588638
  required: [
@@ -588884,6 +589039,23 @@ var definitions2 = {
588884
589039
  }
588885
589040
  ]
588886
589041
  },
589042
+ "client-default": {
589043
+ oneOf: [
589044
+ {
589045
+ type: [
589046
+ "string",
589047
+ "number",
589048
+ "boolean",
589049
+ "object",
589050
+ "array",
589051
+ "null"
589052
+ ]
589053
+ },
589054
+ {
589055
+ type: "null"
589056
+ }
589057
+ ]
589058
+ },
588887
589059
  encoding: {
588888
589060
  oneOf: [
588889
589061
  {
@@ -588956,6 +589128,16 @@ var definitions2 = {
588956
589128
  type: "null"
588957
589129
  }
588958
589130
  ]
589131
+ },
589132
+ explode: {
589133
+ oneOf: [
589134
+ {
589135
+ type: "boolean"
589136
+ },
589137
+ {
589138
+ type: "null"
589139
+ }
589140
+ ]
588959
589141
  }
588960
589142
  },
588961
589143
  required: [
@@ -588996,6 +589178,23 @@ var definitions2 = {
588996
589178
  }
588997
589179
  ]
588998
589180
  },
589181
+ "client-default": {
589182
+ oneOf: [
589183
+ {
589184
+ type: [
589185
+ "string",
589186
+ "number",
589187
+ "boolean",
589188
+ "object",
589189
+ "array",
589190
+ "null"
589191
+ ]
589192
+ },
589193
+ {
589194
+ type: "null"
589195
+ }
589196
+ ]
589197
+ },
588999
589198
  encoding: {
589000
589199
  oneOf: [
589001
589200
  {
@@ -589141,6 +589340,23 @@ var definitions2 = {
589141
589340
  }
589142
589341
  ]
589143
589342
  },
589343
+ "client-default": {
589344
+ oneOf: [
589345
+ {
589346
+ type: [
589347
+ "string",
589348
+ "number",
589349
+ "boolean",
589350
+ "object",
589351
+ "array",
589352
+ "null"
589353
+ ]
589354
+ },
589355
+ {
589356
+ type: "null"
589357
+ }
589358
+ ]
589359
+ },
589144
589360
  encoding: {
589145
589361
  oneOf: [
589146
589362
  {
@@ -591785,6 +592001,23 @@ var definitions3 = {
591785
592001
  }
591786
592002
  ]
591787
592003
  },
592004
+ "client-default": {
592005
+ oneOf: [
592006
+ {
592007
+ type: [
592008
+ "string",
592009
+ "number",
592010
+ "boolean",
592011
+ "object",
592012
+ "array",
592013
+ "null"
592014
+ ]
592015
+ },
592016
+ {
592017
+ type: "null"
592018
+ }
592019
+ ]
592020
+ },
591788
592021
  encoding: {
591789
592022
  oneOf: [
591790
592023
  {
@@ -592267,6 +592500,23 @@ var definitions3 = {
592267
592500
  }
592268
592501
  ]
592269
592502
  },
592503
+ "client-default": {
592504
+ oneOf: [
592505
+ {
592506
+ type: [
592507
+ "string",
592508
+ "number",
592509
+ "boolean",
592510
+ "object",
592511
+ "array",
592512
+ "null"
592513
+ ]
592514
+ },
592515
+ {
592516
+ type: "null"
592517
+ }
592518
+ ]
592519
+ },
592270
592520
  encoding: {
592271
592521
  oneOf: [
592272
592522
  {
@@ -592584,6 +592834,16 @@ var definitions3 = {
592584
592834
  additionalProperties: {
592585
592835
  $ref: "#/definitions/types.SingleUnionTypeSchema"
592586
592836
  }
592837
+ },
592838
+ "default-variant": {
592839
+ oneOf: [
592840
+ {
592841
+ type: "string"
592842
+ },
592843
+ {
592844
+ type: "null"
592845
+ }
592846
+ ]
592587
592847
  }
592588
592848
  },
592589
592849
  required: [
@@ -592990,6 +593250,23 @@ var definitions3 = {
592990
593250
  }
592991
593251
  ]
592992
593252
  },
593253
+ "client-default": {
593254
+ oneOf: [
593255
+ {
593256
+ type: [
593257
+ "string",
593258
+ "number",
593259
+ "boolean",
593260
+ "object",
593261
+ "array",
593262
+ "null"
593263
+ ]
593264
+ },
593265
+ {
593266
+ type: "null"
593267
+ }
593268
+ ]
593269
+ },
592993
593270
  encoding: {
592994
593271
  oneOf: [
592995
593272
  {
@@ -593062,6 +593339,16 @@ var definitions3 = {
593062
593339
  type: "null"
593063
593340
  }
593064
593341
  ]
593342
+ },
593343
+ explode: {
593344
+ oneOf: [
593345
+ {
593346
+ type: "boolean"
593347
+ },
593348
+ {
593349
+ type: "null"
593350
+ }
593351
+ ]
593065
593352
  }
593066
593353
  },
593067
593354
  required: [
@@ -593102,6 +593389,23 @@ var definitions3 = {
593102
593389
  }
593103
593390
  ]
593104
593391
  },
593392
+ "client-default": {
593393
+ oneOf: [
593394
+ {
593395
+ type: [
593396
+ "string",
593397
+ "number",
593398
+ "boolean",
593399
+ "object",
593400
+ "array",
593401
+ "null"
593402
+ ]
593403
+ },
593404
+ {
593405
+ type: "null"
593406
+ }
593407
+ ]
593408
+ },
593105
593409
  encoding: {
593106
593410
  oneOf: [
593107
593411
  {
@@ -593247,6 +593551,23 @@ var definitions3 = {
593247
593551
  }
593248
593552
  ]
593249
593553
  },
593554
+ "client-default": {
593555
+ oneOf: [
593556
+ {
593557
+ type: [
593558
+ "string",
593559
+ "number",
593560
+ "boolean",
593561
+ "object",
593562
+ "array",
593563
+ "null"
593564
+ ]
593565
+ },
593566
+ {
593567
+ type: "null"
593568
+ }
593569
+ ]
593570
+ },
593250
593571
  encoding: {
593251
593572
  oneOf: [
593252
593573
  {
@@ -617921,7 +618242,7 @@ var AccessTokenPosthogManager = class {
617921
618242
  properties: {
617922
618243
  ...event,
617923
618244
  ...event.properties,
617924
- version: "4.90.0-1-g35b7d24cb0b",
618245
+ version: "4.90.0-14-g871c1a60e90",
617925
618246
  usingAccessToken: true
617926
618247
  }
617927
618248
  });
@@ -617975,7 +618296,7 @@ var UserPosthogManager = class {
617975
618296
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
617976
618297
  event: "CLI",
617977
618298
  properties: {
617978
- version: "4.90.0-1-g35b7d24cb0b",
618299
+ version: "4.90.0-14-g871c1a60e90",
617979
618300
  ...event,
617980
618301
  ...event.properties,
617981
618302
  usingAccessToken: false,
@@ -835543,7 +835864,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
835543
835864
  var LOGS_FOLDER_NAME = "logs";
835544
835865
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
835545
835866
  function getCliSource() {
835546
- const version7 = "4.90.0-1-g35b7d24cb0b";
835867
+ const version7 = "4.90.0-14-g871c1a60e90";
835547
835868
  return `cli@${version7}`;
835548
835869
  }
835549
835870
  var DebugLogger = class {
@@ -847294,7 +847615,7 @@ var LegacyDocsPublisher = class {
847294
847615
  previewId,
847295
847616
  disableTemplates: void 0,
847296
847617
  skipUpload,
847297
- cliVersion: "4.90.0-1-g35b7d24cb0b"
847618
+ cliVersion: "4.90.0-14-g871c1a60e90"
847298
847619
  });
847299
847620
  if (taskContext.getResult() === TaskResult.Failure) {
847300
847621
  return { success: false };
@@ -921332,7 +921653,7 @@ var CliContext = class _CliContext {
921332
921653
  if (false) {
921333
921654
  this.logger.error("CLI_VERSION is not defined");
921334
921655
  }
921335
- return "4.90.0-1-g35b7d24cb0b";
921656
+ return "4.90.0-14-g871c1a60e90";
921336
921657
  }
921337
921658
  getCliName() {
921338
921659
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.90.0-1-g35b7d24cb0b",
2
+ "version": "4.90.0-14-g871c1a60e90",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",