@fern-api/fern-api-dev 5.18.1-28-g6d4a12fcf0b → 5.18.1-29-g159d8be45b8

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 +81 -13
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -386136,7 +386136,7 @@ var require_replay_init = __commonJS({
386136
386136
  lockfileContent,
386137
386137
  fernignoreEntries: fernignore_1.REPLAY_FERNIGNORE_ENTRIES,
386138
386138
  gitattributesEntries: fernignore_1.GITATTRIBUTES_ENTRIES,
386139
- prBody: buildPrBody(bootstrapResult)
386139
+ prBody: buildPrBody2(bootstrapResult)
386140
386140
  };
386141
386141
  }
386142
386142
  function formatBootstrapSummary3(result) {
@@ -386197,7 +386197,7 @@ var require_replay_init = __commonJS({
386197
386197
  }
386198
386198
  return entries24;
386199
386199
  }
386200
- function buildPrBody(result) {
386200
+ function buildPrBody2(result) {
386201
386201
  const lines = [
386202
386202
  "## Replay Initialization",
386203
386203
  "",
@@ -661096,7 +661096,7 @@ var AccessTokenPosthogManager = class {
661096
661096
  properties: {
661097
661097
  ...event,
661098
661098
  ...event.properties,
661099
- version: "5.18.1-28-g6d4a12fcf0b",
661099
+ version: "5.18.1-29-g159d8be45b8",
661100
661100
  usingAccessToken: true,
661101
661101
  ...getRunIdProperties()
661102
661102
  }
@@ -661151,7 +661151,7 @@ var UserPosthogManager = class {
661151
661151
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
661152
661152
  event: "CLI",
661153
661153
  properties: {
661154
- version: "5.18.1-28-g6d4a12fcf0b",
661154
+ version: "5.18.1-29-g159d8be45b8",
661155
661155
  ...event,
661156
661156
  ...event.properties,
661157
661157
  usingAccessToken: false,
@@ -852134,7 +852134,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
852134
852134
  var LOGS_FOLDER_NAME = "logs";
852135
852135
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
852136
852136
  function getCliSource() {
852137
- const version7 = "5.18.1-28-g6d4a12fcf0b";
852137
+ const version7 = "5.18.1-29-g159d8be45b8";
852138
852138
  return `cli@${version7}`;
852139
852139
  }
852140
852140
  var DebugLogger = class {
@@ -864943,7 +864943,7 @@ var LegacyDocsPublisher = class {
864943
864943
  previewId,
864944
864944
  disableTemplates: void 0,
864945
864945
  skipUpload,
864946
- cliVersion: "5.18.1-28-g6d4a12fcf0b",
864946
+ cliVersion: "5.18.1-29-g159d8be45b8",
864947
864947
  loginCommand: "fern auth login"
864948
864948
  });
864949
864949
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -939557,7 +939557,7 @@ var CliContext = class _CliContext {
939557
939557
  if (false) {
939558
939558
  this.logger.error("CLI_VERSION is not defined");
939559
939559
  }
939560
- return "5.18.1-28-g6d4a12fcf0b";
939560
+ return "5.18.1-29-g159d8be45b8";
939561
939561
  }
939562
939562
  getCliName() {
939563
939563
  if (false) {
@@ -947055,15 +947055,19 @@ async function executeAutomationsUpgrade({
947055
947055
  project,
947056
947056
  includeMajor: options2.includeMajor
947057
947057
  });
947058
+ const cliResult = {
947059
+ from: cliVersionBefore,
947060
+ to: cliVersionAfter,
947061
+ upgraded: cliUpgraded
947062
+ };
947063
+ const hasChanges2 = cliUpgraded || generatorResults.generators.length > 0;
947064
+ const pr11 = hasChanges2 ? buildPrSuggestion({ cli: cliResult, generators: generatorResults.generators }) : null;
947058
947065
  const result = {
947059
- cli: {
947060
- from: cliVersionBefore,
947061
- to: cliVersionAfter,
947062
- upgraded: cliUpgraded
947063
- },
947066
+ cli: cliResult,
947064
947067
  generators: generatorResults.generators,
947065
947068
  skippedMajor: generatorResults.skippedMajor,
947066
- alreadyUpToDate: generatorResults.alreadyUpToDate
947069
+ alreadyUpToDate: generatorResults.alreadyUpToDate,
947070
+ pr: pr11
947067
947071
  };
947068
947072
  return result;
947069
947073
  }
@@ -947132,6 +947136,70 @@ async function upgradeGeneratorsForAllWorkspaces({
947132
947136
  alreadyUpToDate.sort((a3, b8) => a3.name.localeCompare(b8.name));
947133
947137
  return { generators, skippedMajor, alreadyUpToDate };
947134
947138
  }
947139
+ function getShortGeneratorName(name2) {
947140
+ return name2.replace(/^fernapi\/fern-/, "");
947141
+ }
947142
+ function buildPrTitle({
947143
+ cli,
947144
+ generators
947145
+ }) {
947146
+ const parts = [];
947147
+ if (cli.upgraded) {
947148
+ parts.push(`CLI ${cli.from} \u2192 ${cli.to}`);
947149
+ }
947150
+ if (generators.length > 0) {
947151
+ parts.push(`${generators.length} generator${generators.length === 1 ? "" : "s"}`);
947152
+ }
947153
+ return `chore(fern): upgrade ${parts.join(" and ")}`;
947154
+ }
947155
+ function buildPrBody({
947156
+ cli,
947157
+ generators
947158
+ }) {
947159
+ const sections = ["## Fern Upgrade\n"];
947160
+ if (cli.upgraded) {
947161
+ sections.push(`### CLI
947162
+ - \`${cli.from}\` \u2192 \`${cli.to}\`
947163
+ `);
947164
+ }
947165
+ if (generators.length > 0) {
947166
+ sections.push("### Generators");
947167
+ sections.push("| Generator | From | To | Changelog |");
947168
+ sections.push("|-----------|------|----|-----------|");
947169
+ for (const g8 of generators) {
947170
+ const link3 = g8.changelog != null ? `[View](${g8.changelog})` : "\u2014";
947171
+ sections.push(`| ${g8.name} | ${g8.from} | ${g8.to} | ${link3} |`);
947172
+ }
947173
+ sections.push("");
947174
+ }
947175
+ sections.push(
947176
+ "---\n\u{1F916} This PR was automatically created by [fern-upgrade](https://github.com/fern-api/actions/tree/main/upgrade)"
947177
+ );
947178
+ return sections.join("\n");
947179
+ }
947180
+ function buildCommitMessage({
947181
+ cli,
947182
+ generators
947183
+ }) {
947184
+ const parts = [];
947185
+ if (cli.upgraded) {
947186
+ parts.push(`cli ${cli.from} -> ${cli.to}`);
947187
+ }
947188
+ for (const g8 of generators) {
947189
+ parts.push(`${getShortGeneratorName(g8.name)} ${g8.from} -> ${g8.to}`);
947190
+ }
947191
+ return `chore: upgrade fern ${parts.join(", ")}`;
947192
+ }
947193
+ function buildPrSuggestion({
947194
+ cli,
947195
+ generators
947196
+ }) {
947197
+ return {
947198
+ title: buildPrTitle({ cli, generators }),
947199
+ body: buildPrBody({ cli, generators }),
947200
+ commitMessage: buildCommitMessage({ cli, generators })
947201
+ };
947202
+ }
947135
947203
 
947136
947204
  // src/commands/diff/diff.ts
947137
947205
  init_lib4();
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.18.1-28-g6d4a12fcf0b",
2
+ "version": "5.18.1-29-g159d8be45b8",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",